the-frame-ai 0.9.1 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/languages.js +9 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "the-frame-ai",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "FRAME — Framework for AI-Assisted Solo Development",
5
5
  "type": "module",
6
6
  "bin": {
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
- return new Promise((resolve) => {
56
- rl.question(prompt + options + footer, (answer) => {
57
- const choice = answer.trim();
58
- if (choice === '' || choice === '1') {
59
- rl.close();
60
- return resolve('auto');
61
- }
55
+ const answer = (await ask(rl, prompt + options + footer)).trim();
56
+ rl.close();
62
57
 
63
- const idx = parseInt(choice, 10) - 1;
64
- if (idx >= 0 && idx < LANGUAGES.length) {
65
- rl.close();
66
- return resolve(LANGUAGES[idx].code);
67
- }
58
+ if (answer === '' || answer === '1') return 'auto';
68
59
 
69
- rl.question(' Enter custom language code (e.g., "ja", "ko", "fr"): ', (code) => {
70
- rl.close();
71
- resolve(code.trim().toLowerCase() || 'auto');
72
- });
73
- });
60
+ const idx = parseInt(answer, 10) - 1;
61
+ if (idx >= 0 && idx < LANGUAGES.length) return LANGUAGES[idx].code;
74
62
 
75
- rl.on('close', () => resolve('auto'));
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 = {