fix(aidocs, config): migrate aidocs configuration handling from npmextra to smartconfig

This commit is contained in:
2026-03-24 15:07:49 +00:00
parent fc85f28f69
commit a3a0537ddc
9 changed files with 53 additions and 26 deletions

View File

@@ -79,15 +79,15 @@ Don't wrap the JSON in \`\`\`json\`\`\` - just return the raw JSON object.
const projectContext = new ProjectContext(this.projectDir);
const files = await projectContext.gatherFiles();
// Update npmextra.json
const npmextraJson = files.smartfilesNpmextraJSON;
const npmextraJsonContent = JSON.parse(npmextraJson.contents.toString());
// Update smartconfig.json
const smartconfigJson = files.smartfilesNpmextraJSON;
const smartconfigJsonContent = JSON.parse(smartconfigJson.contents.toString());
npmextraJsonContent['@git.zone/cli'].module.description = resultObject.description;
npmextraJsonContent['@git.zone/cli'].module.keywords = resultObject.keywords;
smartconfigJsonContent['@git.zone/cli'].module.description = resultObject.description;
smartconfigJsonContent['@git.zone/cli'].module.keywords = resultObject.keywords;
npmextraJson.contents = Buffer.from(JSON.stringify(npmextraJsonContent, null, 2));
await npmextraJson.write();
smartconfigJson.contents = Buffer.from(JSON.stringify(smartconfigJsonContent, null, 2));
await smartconfigJson.write();
// Update package.json
const packageJson = files.smartfilePackageJSON;