mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Moved non-essential markdown files to archive/root-cleanup/markdown/: - ALPHA_RELEASE_CHECKLIST.md - ALPHA_RELEASE_README.md - EPIC-DAA-SWARM-INTEGRATION.md - HOOKS.md - RELEASE_NOTES_ALPHA_16.md - RELEASE_NOTES_ALPHA_17.md - Moved test/fix scripts to archive/root-cleanup/scripts/: - fix-alpha-errors.cjs - fix-ts-property-errors.ts - Kept essential files in root: - README.md, CHANGELOG.md, LICENSE, CLAUDE.md - Package files: package.json, package-lock.json - Config files: tsconfig.json, jest.config.js, codecov.yml - Entry point: cli.mjs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
86 lines
2.0 KiB
JavaScript
86 lines
2.0 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Alpha Release Fix Script
|
|
* Fixes all remaining TypeScript compilation errors for clean alpha build
|
|
*/
|
|
|
|
const fs = require('fs').promises;
|
|
const path = require('path');
|
|
|
|
const fixes = [
|
|
// Fix chalk imports
|
|
{
|
|
file: 'src/cli/index.ts',
|
|
search: 'colors.green',
|
|
replace: 'chalk.green'
|
|
},
|
|
|
|
// Fix Table constructors
|
|
{
|
|
file: 'src/cli/commands/workflow.ts',
|
|
search: 'new Table({',
|
|
replace: 'new Table.default({'
|
|
},
|
|
|
|
// Fix workflow command chaining
|
|
{
|
|
file: 'src/cli/commands/workflow.ts',
|
|
search: '.command(\'create\', \'Create a new workflow\', workflowCommand)',
|
|
replace: '.command(\'create\').description(\'Create a new workflow\').action(workflowCommand)'
|
|
},
|
|
|
|
// Fix task command method calls
|
|
{
|
|
file: 'src/cli/commands/task.ts',
|
|
search: '.argument(',
|
|
replace: '.argument('
|
|
},
|
|
|
|
// Fix swarm Map usage
|
|
{
|
|
file: 'src/cli/commands/swarm-spawn.ts',
|
|
search: 'agents.push(agent)',
|
|
replace: 'agents.set(agent.id, agent)'
|
|
},
|
|
|
|
// Fix swarm-new properties
|
|
{
|
|
file: 'src/cli/commands/swarm-new.ts',
|
|
search: 'task.assignedAgent',
|
|
replace: 'task.assignedTo'
|
|
},
|
|
{
|
|
file: 'src/cli/commands/swarm-new.ts',
|
|
search: 'task.startTime',
|
|
replace: 'task.createdAt'
|
|
},
|
|
{
|
|
file: 'src/cli/commands/swarm-new.ts',
|
|
search: 'task.endTime',
|
|
replace: 'task.completedAt'
|
|
}
|
|
];
|
|
|
|
async function applyFixes() {
|
|
console.log('🔧 Applying alpha release fixes...');
|
|
|
|
for (const fix of fixes) {
|
|
try {
|
|
const filePath = path.join('/workspaces/claude-code-flow', fix.file);
|
|
let content = await fs.readFile(filePath, 'utf-8');
|
|
|
|
if (content.includes(fix.search)) {
|
|
content = content.replaceAll(fix.search, fix.replace);
|
|
await fs.writeFile(filePath, content);
|
|
console.log(`✅ Fixed: ${fix.file}`);
|
|
}
|
|
} catch (error) {
|
|
console.log(`⚠️ Could not fix ${fix.file}: ${error.message}`);
|
|
}
|
|
}
|
|
|
|
console.log('🎯 Alpha fixes complete!');
|
|
}
|
|
|
|
applyFixes().catch(console.error); |