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.
@@ -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
- const parsedRef = linkOutput.match(/Selected project:\s*([a-z0-9-]+)/i)?.[1];
234
- let projectRef = parsedRef;
235
-
236
- if (!projectRef) {
237
- const manualProjectId = await clack.text({
238
- message:
239
- 'supabase/config.toml was not created. Enter your Supabase project ref (from the link output, e.g., abcdefghijklmnopqrstu):',
240
- validate: (val) => (!val ? 'Project ref is required' : undefined),
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextblock",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {