Compare commits
1 Commits
feature/cl
...
feat/manif
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6717ddbb4b |
@@ -385,7 +385,9 @@ class Installer {
|
|||||||
// Generate CSV manifests for workflows, agents, tasks AND ALL FILES with hashes BEFORE IDE setup
|
// Generate CSV manifests for workflows, agents, tasks AND ALL FILES with hashes BEFORE IDE setup
|
||||||
spinner.start('Generating workflow and agent manifests...');
|
spinner.start('Generating workflow and agent manifests...');
|
||||||
const manifestGen = new ManifestGenerator();
|
const manifestGen = new ManifestGenerator();
|
||||||
const manifestStats = await manifestGen.generateManifests(bmadDir, config.modules || [], this.installedFiles);
|
const manifestStats = await manifestGen.generateManifests(bmadDir, config.modules || [], this.installedFiles, {
|
||||||
|
ides: config.ides || [],
|
||||||
|
});
|
||||||
|
|
||||||
spinner.succeed(
|
spinner.succeed(
|
||||||
`Manifests generated: ${manifestStats.workflows} workflows, ${manifestStats.agents} agents, ${manifestStats.tasks} tasks, ${manifestStats.files} files`,
|
`Manifests generated: ${manifestStats.workflows} workflows, ${manifestStats.agents} agents, ${manifestStats.tasks} tasks, ${manifestStats.files} files`,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ManifestGenerator {
|
|||||||
this.tasks = [];
|
this.tasks = [];
|
||||||
this.modules = [];
|
this.modules = [];
|
||||||
this.files = [];
|
this.files = [];
|
||||||
|
this.selectedIdes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,7 +23,7 @@ class ManifestGenerator {
|
|||||||
* @param {Array} selectedModules - Selected modules for installation
|
* @param {Array} selectedModules - Selected modules for installation
|
||||||
* @param {Array} installedFiles - All installed files (optional, for hash tracking)
|
* @param {Array} installedFiles - All installed files (optional, for hash tracking)
|
||||||
*/
|
*/
|
||||||
async generateManifests(bmadDir, selectedModules, installedFiles = []) {
|
async generateManifests(bmadDir, selectedModules, installedFiles = [], options = {}) {
|
||||||
// Create _cfg directory if it doesn't exist
|
// Create _cfg directory if it doesn't exist
|
||||||
const cfgDir = path.join(bmadDir, '_cfg');
|
const cfgDir = path.join(bmadDir, '_cfg');
|
||||||
await fs.ensureDir(cfgDir);
|
await fs.ensureDir(cfgDir);
|
||||||
@@ -32,6 +33,17 @@ class ManifestGenerator {
|
|||||||
this.bmadDir = bmadDir;
|
this.bmadDir = bmadDir;
|
||||||
this.allInstalledFiles = installedFiles;
|
this.allInstalledFiles = installedFiles;
|
||||||
|
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(options, 'ides')) {
|
||||||
|
throw new Error('ManifestGenerator requires `options.ides` to be provided – installer should supply the selected IDEs array.');
|
||||||
|
}
|
||||||
|
|
||||||
|
const resolvedIdes = options.ides ?? [];
|
||||||
|
if (!Array.isArray(resolvedIdes)) {
|
||||||
|
throw new TypeError('ManifestGenerator expected `options.ides` to be an array.');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selectedIdes = resolvedIdes;
|
||||||
|
|
||||||
// Collect workflow data
|
// Collect workflow data
|
||||||
await this.collectWorkflows(selectedModules);
|
await this.collectWorkflows(selectedModules);
|
||||||
|
|
||||||
@@ -324,7 +336,7 @@ class ManifestGenerator {
|
|||||||
lastUpdated: new Date().toISOString(),
|
lastUpdated: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
modules: this.modules,
|
modules: this.modules,
|
||||||
ides: ['claude-code'],
|
ides: this.selectedIdes,
|
||||||
};
|
};
|
||||||
|
|
||||||
const yamlStr = yaml.dump(manifest, {
|
const yamlStr = yaml.dump(manifest, {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ async function regenerateManifests() {
|
|||||||
console.log('Target directory:', bmadDir);
|
console.log('Target directory:', bmadDir);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await generator.generateManifests(bmadDir, selectedModules);
|
const result = await generator.generateManifests(bmadDir, selectedModules, [], { ides: [] });
|
||||||
console.log('✓ Manifests generated successfully:');
|
console.log('✓ Manifests generated successfully:');
|
||||||
console.log(` - ${result.workflows} workflows`);
|
console.log(` - ${result.workflows} workflows`);
|
||||||
console.log(` - ${result.agents} agents`);
|
console.log(` - ${result.agents} agents`);
|
||||||
|
|||||||
Reference in New Issue
Block a user