MCPcopy Create free account
hub / github.com/adobe/react-spectrum / writeIndexJson

Function writeIndexJson

packages/dev/s2-docs/scripts/generateAgentSkills.mjs:1123–1128  ·  view source on GitHub ↗
(wellKnownRoot, skills)

Source from the content-addressed store, hash-verified

1121}
1122
1123function writeIndexJson(wellKnownRoot, skills) {
1124 const indexPath = path.join(wellKnownRoot, 'index.json');
1125 const payload = {$schema: DISCOVERY_SCHEMA, skills};
1126 fs.writeFileSync(indexPath, JSON.stringify(payload, null, 2) + '\n');
1127 console.log(`Generated ${path.relative(REPO_ROOT, indexPath)}`);
1128}
1129
1130function sha256Digest(filePath) {
1131 const hash = crypto.createHash('sha256').update(fs.readFileSync(filePath)).digest('hex');

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected