the-frame-ai 0.10.2 → 0.10.4
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/languages.js +3 -1
- package/src/update.js +13 -12
package/package.json
CHANGED
package/src/languages.js
CHANGED
|
@@ -142,7 +142,9 @@ export async function promptCopilot(yes = false) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
export async function promptFrontend(yes = false) {
|
|
145
|
-
if (
|
|
145
|
+
if (yes) return false;
|
|
146
|
+
process.stderr.write(`[FRAME] promptFrontend called, isTTY=${process.stdin.isTTY}\n`);
|
|
147
|
+
if (!process.stdin.isTTY) return false;
|
|
146
148
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
147
149
|
return new Promise((resolve) => {
|
|
148
150
|
rl.question('\n? Is this a frontend project? Adds Playwright MCP for UI verification (y/N): ', (answer) => {
|
package/src/update.js
CHANGED
|
@@ -51,6 +51,17 @@ export async function update(target, flags = {}) {
|
|
|
51
51
|
|
|
52
52
|
log(`\nFRAME update: ${installedVersion} → ${VERSION}\n`);
|
|
53
53
|
|
|
54
|
+
// Ask frontend question early, before file operations
|
|
55
|
+
let frontendDecided = config.frontend === true;
|
|
56
|
+
if (!config.frontend && process.stdin.isTTY && !flags.yes) {
|
|
57
|
+
const frontend = await promptFrontend(false);
|
|
58
|
+
if (frontend) {
|
|
59
|
+
config.frontend = true;
|
|
60
|
+
frontendDecided = true;
|
|
61
|
+
writeFileSync(join(target, '.frame', 'config.json'), JSON.stringify(config, null, 2), 'utf-8');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
54
65
|
let updated = 0;
|
|
55
66
|
|
|
56
67
|
// 1. Update commands
|
|
@@ -100,18 +111,8 @@ export async function update(target, flags = {}) {
|
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
113
|
|
|
103
|
-
// 5.
|
|
104
|
-
if (
|
|
105
|
-
if (process.stdin.isTTY && !flags.yes) {
|
|
106
|
-
const frontend = await promptFrontend(false);
|
|
107
|
-
if (frontend) {
|
|
108
|
-
config.frontend = true;
|
|
109
|
-
writeFileSync(join(target, '.frame', 'config.json'), JSON.stringify(config, null, 2), 'utf-8');
|
|
110
|
-
mergeClaudeSettings(join(target, '.claude', 'settings.json'));
|
|
111
|
-
if (config.copilot) mergeVscodeMcp(join(target, '.vscode', 'mcp.json'));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
114
|
+
// 5. Apply Playwright MCP if frontend
|
|
115
|
+
if (frontendDecided) {
|
|
115
116
|
mergeClaudeSettings(join(target, '.claude', 'settings.json'));
|
|
116
117
|
if (config.copilot) mergeVscodeMcp(join(target, '.vscode', 'mcp.json'));
|
|
117
118
|
}
|