create-universal-ai-context 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-ai-context.js +20 -9
- package/package.json +1 -1
package/bin/create-ai-context.js
CHANGED
|
@@ -40,6 +40,7 @@ const {
|
|
|
40
40
|
getSyncHistory,
|
|
41
41
|
CONFLICT_STRATEGY
|
|
42
42
|
} = require('../lib/cross-tool-sync');
|
|
43
|
+
const { getAdapterNames } = require('../lib/adapters');
|
|
43
44
|
const packageJson = require('../package.json');
|
|
44
45
|
|
|
45
46
|
// ASCII Banner
|
|
@@ -51,7 +52,7 @@ ${chalk.cyan('╚═════════════════════
|
|
|
51
52
|
`;
|
|
52
53
|
|
|
53
54
|
// Supported AI tools
|
|
54
|
-
const AI_TOOLS = ['claude', 'copilot', 'cline', 'antigravity', 'all'];
|
|
55
|
+
const AI_TOOLS = ['claude', 'copilot', 'cline', 'antigravity', 'windsurf', 'aider', 'continue', 'all'];
|
|
55
56
|
|
|
56
57
|
// Parse AI tools helper
|
|
57
58
|
function parseAiTools(toolsString) {
|
|
@@ -62,7 +63,8 @@ function parseAiTools(toolsString) {
|
|
|
62
63
|
console.error(chalk.gray(` Valid options: ${AI_TOOLS.join(', ')}`));
|
|
63
64
|
process.exit(1);
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
+
const allTools = ['claude', 'copilot', 'cline', 'antigravity', 'windsurf', 'aider', 'continue'];
|
|
67
|
+
return tools.includes('all') ? allTools : tools;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
program
|
|
@@ -79,7 +81,7 @@ program
|
|
|
79
81
|
.option('--no-git', 'Skip git initialization')
|
|
80
82
|
.option('-n, --dry-run', 'Show what would be done without making changes')
|
|
81
83
|
.option('-v, --verbose', 'Show detailed output')
|
|
82
|
-
.option('--ai <tools>', 'Generate for specific AI tools (comma-separated: claude,copilot,cline,antigravity,all)', 'all')
|
|
84
|
+
.option('--ai <tools>', 'Generate for specific AI tools (comma-separated: claude,copilot,cline,antigravity,windsurf,aider,continue,all)', 'all')
|
|
83
85
|
.option('--force-ai', 'Force AI-enhanced mode (creates INIT_REQUEST.md)')
|
|
84
86
|
.option('--static', 'Force standalone mode (static analysis only, no AI setup)')
|
|
85
87
|
.option('--analyze-only', 'Run codebase analysis without installation')
|
|
@@ -123,7 +125,7 @@ program
|
|
|
123
125
|
backup: options.backup,
|
|
124
126
|
force: options.force || false,
|
|
125
127
|
// Placeholder validation
|
|
126
|
-
failOnUnreplaced: options.failOnUnreplaced
|
|
128
|
+
failOnUnreplaced: options.failOnUnreplaced === true
|
|
127
129
|
});
|
|
128
130
|
} catch (error) {
|
|
129
131
|
console.error(chalk.red('\n✖ Error:'), error.message);
|
|
@@ -559,7 +561,7 @@ program
|
|
|
559
561
|
|
|
560
562
|
const config = {
|
|
561
563
|
projectName: path.basename(projectRoot),
|
|
562
|
-
aiTools:
|
|
564
|
+
aiTools: getAdapterNames()
|
|
563
565
|
};
|
|
564
566
|
|
|
565
567
|
const results = await syncAllFromCodebase(projectRoot, config);
|
|
@@ -575,7 +577,12 @@ program
|
|
|
575
577
|
|
|
576
578
|
console.log(chalk.red('\nErrors:'));
|
|
577
579
|
for (const error of results.errors) {
|
|
578
|
-
|
|
580
|
+
// error object has: { tool, errors: [] } or { tool, message }
|
|
581
|
+
const errorText = error.message ||
|
|
582
|
+
(error.errors && error.errors.length > 0
|
|
583
|
+
? error.errors.map(e => e.message || e).join('; ')
|
|
584
|
+
: error.tool);
|
|
585
|
+
console.error(chalk.red(` ✖ ${error.tool || 'Unknown'}: ${errorText}`));
|
|
579
586
|
}
|
|
580
587
|
process.exit(1);
|
|
581
588
|
} else {
|
|
@@ -607,7 +614,7 @@ program
|
|
|
607
614
|
const projectRoot = path.resolve(options.path);
|
|
608
615
|
const spinner = createSpinner();
|
|
609
616
|
|
|
610
|
-
const validTools =
|
|
617
|
+
const validTools = getAdapterNames();
|
|
611
618
|
if (!validTools.includes(sourceTool)) {
|
|
612
619
|
console.error(chalk.red(`\n✖ Error: Invalid tool: ${sourceTool}`));
|
|
613
620
|
console.error(chalk.gray(` Valid options: ${validTools.join(', ')}`));
|
|
@@ -639,7 +646,11 @@ program
|
|
|
639
646
|
|
|
640
647
|
console.log(chalk.red('\nErrors:'));
|
|
641
648
|
for (const error of results.errors) {
|
|
642
|
-
|
|
649
|
+
const errorText = error.message ||
|
|
650
|
+
(error.errors && error.errors.length > 0
|
|
651
|
+
? error.errors.map(e => e.message || e).join('; ')
|
|
652
|
+
: 'Unknown error');
|
|
653
|
+
console.error(chalk.red(` ✖ ${error.tool || 'Unknown'}: ${errorText}`));
|
|
643
654
|
}
|
|
644
655
|
process.exit(1);
|
|
645
656
|
} else {
|
|
@@ -681,7 +692,7 @@ program
|
|
|
681
692
|
|
|
682
693
|
const config = {
|
|
683
694
|
projectName: path.basename(projectRoot),
|
|
684
|
-
aiTools:
|
|
695
|
+
aiTools: getAdapterNames()
|
|
685
696
|
};
|
|
686
697
|
|
|
687
698
|
const result = await resolveConflict(
|
package/package.json
CHANGED