MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / buildTo

Function buildTo

scripts/build-compliance.cjs:557–570  ·  view source on GitHub ↗
(targetDir, version, sourceDir)

Source from the content-addressed store, hash-verified

555}
556
557function buildTo(targetDir, version, sourceDir) {
558 if (fs.existsSync(targetDir)) {
559 fs.rmSync(targetDir, { recursive: true, force: true });
560 }
561 ensureDir(targetDir);
562 copyTree(sourceDir, targetDir);
563 mirrorProtocolsToDomains(targetDir);
564 const index = generateIndex(version, sourceDir);
565 fs.writeFileSync(
566 path.join(targetDir, 'index.json'),
567 JSON.stringify(index, null, 2) + '\n'
568 );
569 return index;
570}
571
572function main() {
573 const version = getVersion();

Callers 1

mainFunction · 0.85

Calls 4

mirrorProtocolsToDomainsFunction · 0.85
generateIndexFunction · 0.85
ensureDirFunction · 0.70
copyTreeFunction · 0.70

Tested by

no test coverage detected