the-frame-ai 0.9.0 → 0.9.2
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/package.json +1 -1
- package/src/init.js +1 -1
- package/src/languages.js +9 -19
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -147,7 +147,7 @@ export async function init(target, flags = {}) {
|
|
|
147
147
|
|
|
148
148
|
ensureDir(join(destPath, '..'));
|
|
149
149
|
const content = readFileSync(srcPath, 'utf-8');
|
|
150
|
-
const replaced = applyVars(content, vars, qualityVars);
|
|
150
|
+
const replaced = relPath.startsWith('specs/_template/') ? content : applyVars(content, vars, qualityVars);
|
|
151
151
|
writeFile(destPath, replaced);
|
|
152
152
|
fileCount++;
|
|
153
153
|
}
|
package/src/languages.js
CHANGED
|
@@ -52,28 +52,18 @@ export async function promptLanguage(langOverride, yes = false) {
|
|
|
52
52
|
const options = LANGUAGES.map((l, i) => ` ${i + 1}) ${l.label}`).join('\n');
|
|
53
53
|
const footer = `\n Enter number [1-${LANGUAGES.length}] (or press Enter for auto): `;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const answer = (await ask(rl, prompt + options + footer)).trim();
|
|
56
|
+
rl.close();
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
const choice = answer.trim();
|
|
60
|
-
if (choice === '' || choice === '1') {
|
|
61
|
-
rl.close();
|
|
62
|
-
return resolve('auto');
|
|
63
|
-
}
|
|
58
|
+
if (answer === '' || answer === '1') return 'auto';
|
|
64
59
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
rl.close();
|
|
68
|
-
return resolve(LANGUAGES[idx].code);
|
|
69
|
-
}
|
|
60
|
+
const idx = parseInt(answer, 10) - 1;
|
|
61
|
+
if (idx >= 0 && idx < LANGUAGES.length) return LANGUAGES[idx].code;
|
|
70
62
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
});
|
|
63
|
+
const rl2 = createInterface({ input: process.stdin, output: process.stdout });
|
|
64
|
+
const custom = (await ask(rl2, ' Enter custom language code (e.g., "ja", "ko", "fr"): ')).trim().toLowerCase();
|
|
65
|
+
rl2.close();
|
|
66
|
+
return custom || 'auto';
|
|
77
67
|
}
|
|
78
68
|
|
|
79
69
|
const STACK_PRESETS = {
|