📦 deps(thirdparty): update snapshots
This commit is contained in:
@@ -173,7 +173,7 @@ class TestShadcnInstaller:
|
||||
# Verify correct command was called
|
||||
mock_run.assert_called_once()
|
||||
call_args = mock_run.call_args[0][0]
|
||||
assert call_args[:3] == ["npx", "shadcn@latest", "add"]
|
||||
assert call_args[:3] == ["npx", "shadcn@2.3.0", "add"]
|
||||
assert "button" in call_args
|
||||
assert "card" in call_args
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"displayName": "Codex",
|
||||
"installType": "full",
|
||||
"folderStructure": {
|
||||
"root": ".codex",
|
||||
"root": ".agents",
|
||||
"skillPath": "skills/ui-ux-pro-max",
|
||||
"filename": "SKILL.md"
|
||||
},
|
||||
|
||||
@@ -4,9 +4,6 @@ import { spawnSync } from 'node:child_process';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const isWindows = process.platform === 'win32';
|
||||
const localBin = (name) => join('node_modules', '.bin', isWindows ? `${name}.cmd` : name);
|
||||
|
||||
function run(command, args) {
|
||||
const result = spawnSync(command, args, { stdio: 'inherit', shell: false });
|
||||
if (result.error && result.error.code === 'ENOENT') {
|
||||
@@ -20,7 +17,7 @@ if (!bunResult.missing) {
|
||||
process.exit(bunResult.status);
|
||||
}
|
||||
|
||||
const tsc = localBin('tsc');
|
||||
const tsc = join('node_modules', 'typescript', 'bin', 'tsc');
|
||||
if (!existsSync(tsc)) {
|
||||
console.error('Build failed: neither bun nor local TypeScript compiler is available.');
|
||||
console.error('Run `npm ci` first, or install Bun from https://bun.sh/docs/installation.');
|
||||
@@ -28,5 +25,5 @@ if (!existsSync(tsc)) {
|
||||
}
|
||||
|
||||
console.warn('bun not found; falling back to TypeScript compiler output.');
|
||||
const tscResult = run(tsc, []);
|
||||
const tscResult = run(process.execPath, [tsc]);
|
||||
process.exit(tscResult.status);
|
||||
|
||||
@@ -19,7 +19,10 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult {
|
||||
if (existsSync(join(cwd, '.windsurf'))) {
|
||||
detected.push('windsurf');
|
||||
}
|
||||
if (existsSync(join(cwd, '.agents')) || existsSync(join(cwd, '.agent'))) {
|
||||
if (existsSync(join(cwd, '.agents'))) {
|
||||
detected.push('antigravity');
|
||||
detected.push('codex');
|
||||
} else if (existsSync(join(cwd, '.agent'))) {
|
||||
detected.push('antigravity');
|
||||
}
|
||||
if (existsSync(join(cwd, '.github'))) {
|
||||
@@ -28,7 +31,7 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult {
|
||||
if (existsSync(join(cwd, '.kiro'))) {
|
||||
detected.push('kiro');
|
||||
}
|
||||
if (existsSync(join(cwd, '.codex'))) {
|
||||
if (existsSync(join(cwd, '.codex')) && !detected.includes('codex')) {
|
||||
detected.push('codex');
|
||||
}
|
||||
if (existsSync(join(cwd, '.roo'))) {
|
||||
@@ -72,6 +75,13 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult {
|
||||
let suggested: AIType | null = null;
|
||||
if (detected.length === 1) {
|
||||
suggested = detected[0];
|
||||
} else if (
|
||||
detected.length === 2 &&
|
||||
detected.includes('antigravity') &&
|
||||
detected.includes('codex')
|
||||
) {
|
||||
// Both platforms share `.agents`; avoid suggesting an install for every AI.
|
||||
suggested = 'codex';
|
||||
} else if (detected.length > 1) {
|
||||
suggested = 'all';
|
||||
}
|
||||
@@ -94,7 +104,7 @@ export function getAITypeDescription(aiType: AIType): string {
|
||||
case 'kiro':
|
||||
return 'Kiro (.kiro/steering/)';
|
||||
case 'codex':
|
||||
return 'Codex (.codex/skills/)';
|
||||
return 'Codex (.agents/skills/)';
|
||||
case 'roocode':
|
||||
return 'RooCode (.roo/skills/)';
|
||||
case 'qoder':
|
||||
|
||||
@@ -294,10 +294,20 @@ export async function generatePlatformFiles(
|
||||
*/
|
||||
export async function generateAllPlatformFiles(targetDir: string, isGlobal = false, force = false): Promise<string[]> {
|
||||
const allFolders = new Set<string>();
|
||||
const generatedSkillFiles = new Set<string>();
|
||||
|
||||
for (const aiType of Object.keys(AI_TO_PLATFORM)) {
|
||||
try {
|
||||
const config = await loadPlatformConfig(aiType);
|
||||
const skillFile = join(
|
||||
config.folderStructure.root,
|
||||
config.folderStructure.skillPath,
|
||||
config.folderStructure.filename
|
||||
);
|
||||
if (generatedSkillFiles.has(skillFile)) continue;
|
||||
|
||||
const folders = await generatePlatformFiles(targetDir, aiType, isGlobal, force);
|
||||
generatedSkillFiles.add(skillFile);
|
||||
folders.forEach(f => allFolders.add(f));
|
||||
} catch {
|
||||
// Skip if generation fails for a platform
|
||||
|
||||
Reference in New Issue
Block a user