create-nextblock 0.2.11 → 0.2.12
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 +4 -37
- package/package.json +1 -1
package/bin/create-nextblock.js
CHANGED
|
@@ -190,37 +190,12 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
190
190
|
await execa('npx', ['supabase', 'login'], { stdio: 'inherit', cwd: projectPath });
|
|
191
191
|
|
|
192
192
|
clack.note('Now, please select your NextBlock project in the browser.');
|
|
193
|
-
|
|
194
|
-
const linkProcess = execa('npx', ['supabase', 'link'], {
|
|
193
|
+
const { stdout: linkStdout, stderr: linkStderr } = await execa('npx', ['supabase', 'link'], {
|
|
195
194
|
cwd: projectPath,
|
|
196
|
-
stdin: 'inherit',
|
|
197
|
-
stdout: 'pipe',
|
|
198
|
-
stderr: 'pipe',
|
|
199
195
|
});
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
linkOutput += text;
|
|
204
|
-
process.stdout.write(text);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
if (linkProcess.stderr) {
|
|
208
|
-
linkProcess.stderr.on('data', (chunk) => {
|
|
209
|
-
const text = chunk.toString();
|
|
210
|
-
linkOutput += text;
|
|
211
|
-
process.stderr.write(text);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
await linkProcess;
|
|
215
|
-
if (process.stdin.isTTY) {
|
|
216
|
-
try {
|
|
217
|
-
process.stdin.setRawMode(false);
|
|
218
|
-
} catch (_) {
|
|
219
|
-
// ignore if not supported
|
|
220
|
-
}
|
|
221
|
-
process.stdin.setEncoding('utf8');
|
|
222
|
-
}
|
|
223
|
-
process.stdin.resume();
|
|
196
|
+
const linkOutput = `${linkStdout || ''}${linkStderr || ''}`;
|
|
197
|
+
if (linkStdout) process.stdout.write(linkStdout);
|
|
198
|
+
if (linkStderr) process.stderr.write(linkStderr);
|
|
224
199
|
|
|
225
200
|
// Ensure supabase assets exist (config + migrations) after link in case the CLI created/overrode files
|
|
226
201
|
await ensureSupabaseAssets(projectPath);
|
|
@@ -239,13 +214,6 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
239
214
|
}
|
|
240
215
|
|
|
241
216
|
clack.note('Please go to your Supabase project dashboard to get the following secrets.');
|
|
242
|
-
if (process.stdin.isTTY) {
|
|
243
|
-
try {
|
|
244
|
-
process.stdin.setRawMode(false);
|
|
245
|
-
} catch (_) {}
|
|
246
|
-
process.stdin.setEncoding('utf8');
|
|
247
|
-
process.stdin.resume();
|
|
248
|
-
}
|
|
249
217
|
const supabaseKeys = await clack.group(
|
|
250
218
|
{
|
|
251
219
|
dbPassword: () =>
|
|
@@ -285,7 +253,6 @@ async function runSetupWizard(projectDir, projectName) {
|
|
|
285
253
|
'',
|
|
286
254
|
'# Supabase',
|
|
287
255
|
`SUPABASE_PROJECT_ID=${projectId}`,
|
|
288
|
-
`SUPABASE_PROJECT_ID=${projectId}`,
|
|
289
256
|
`NEXT_PUBLIC_SUPABASE_URL=${supabaseUrl}`,
|
|
290
257
|
`NEXT_PUBLIC_SUPABASE_ANON_KEY=${supabaseKeys.anonKey}`,
|
|
291
258
|
`SUPABASE_SERVICE_ROLE_KEY=${supabaseKeys.serviceKey}`,
|