create-nextblock 0.2.8 → 0.2.10
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-nextblock.js +10 -15
- package/package.json +1 -1
package/bin/create-nextblock.js
CHANGED
|
@@ -219,8 +219,6 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
219
219
|
// ignore if not supported
|
|
220
220
|
}
|
|
221
221
|
process.stdin.setEncoding('utf8');
|
|
222
|
-
process.stdin.removeAllListeners('data');
|
|
223
|
-
process.stdin.removeAllListeners('keypress');
|
|
224
222
|
}
|
|
225
223
|
process.stdin.resume();
|
|
226
224
|
|
|
@@ -230,20 +228,17 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
230
228
|
const configTomlPath = resolve(projectPath, 'supabase', 'config.toml');
|
|
231
229
|
let configToml = '';
|
|
232
230
|
if (!(await fs.pathExists(configTomlPath))) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
if (clack.isCancel(manualProjectId)) {
|
|
243
|
-
handleWizardCancel('Setup cancelled.');
|
|
244
|
-
}
|
|
245
|
-
projectRef = manualProjectId.trim();
|
|
231
|
+
let projectRef = linkOutput.match(/Selected project:\s*([a-z0-9-]+)/i)?.[1] || '';
|
|
232
|
+
const manualProjectId = await clack.text({
|
|
233
|
+
message:
|
|
234
|
+
'supabase/config.toml was not created. Enter your Supabase project ref (from the link output, e.g., abcdefghijklmnopqrstu):',
|
|
235
|
+
initialValue: projectRef,
|
|
236
|
+
validate: (val) => (!val ? 'Project ref is required' : undefined),
|
|
237
|
+
});
|
|
238
|
+
if (clack.isCancel(manualProjectId)) {
|
|
239
|
+
handleWizardCancel('Setup cancelled.');
|
|
246
240
|
}
|
|
241
|
+
projectRef = manualProjectId.trim();
|
|
247
242
|
|
|
248
243
|
configToml = `project_id = "${projectRef}"\n`;
|
|
249
244
|
await fs.writeFile(configTomlPath, configToml);
|