MCPcopy Create free account
hub / github.com/SchemaStore/schemastore / buildXRegistry

Function buildXRegistry

cli.js:2110–2144  ·  view source on GitHub ↗

* Executes the xRegistry build process

()

Source from the content-addressed store, hash-verified

2108 * Executes the xRegistry build process
2109 */
2110 async function buildXRegistry() {
2111 try {
2112 console.info('Building xRegistry from catalog.json...')
2113 const { stdout, stderr } = await execFileAsync('node', [
2114 'scripts/build-xregistry.js',
2115 ])
2116 if (stdout) console.log(stdout)
2117 if (stderr) console.error(stderr)
2118
2119 const { stdout: siteStdout, stderr: siteStderr } = await execFileAsync(
2120 'sh',
2121 ['scripts/build_xregistry_site.sh'],
2122 )
2123 if (siteStdout) console.log(siteStdout)
2124 if (siteStderr) console.error(siteStderr)
2125
2126 const { stdout: postStdout, stderr: postStderr } = await execFileAsync(
2127 'node',
2128 ['scripts/postprocess-xregistry-site.js'],
2129 )
2130 if (postStdout) console.log(postStdout)
2131 if (postStderr) console.error(postStderr)
2132
2133 return true
2134 } catch (error) {
2135 if (error instanceof Error) {
2136 console.error('Error executing xRegistry build:', error.message)
2137 if ('stdout' in error) console.log(error.stdout)
2138 if ('stderr' in error) console.error(error.stderr)
2139 } else {
2140 console.error('Unknown error occurred during xRegistry build:', error)
2141 }
2142 return false
2143 }
2144 }
2145
2146 /**
2147 * Task to build the xRegistry

Callers 1

taskBuildXRegistryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected