create-alta-app 2.1.0 → 2.2.0
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/index.mjs +16 -22
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -448,7 +448,7 @@ async function main() {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
|
|
451
|
-
// ── Step 6: Login & link Supabase
|
|
451
|
+
// ── Step 6: Login & link Supabase ──
|
|
452
452
|
if (credentials) {
|
|
453
453
|
const spinnerLink = ora({ text: 'Linking Supabase project...', indent: 2 }).start();
|
|
454
454
|
try {
|
|
@@ -459,33 +459,27 @@ async function main() {
|
|
|
459
459
|
spinnerLink.warn(pc.yellow('Could not link Supabase project'));
|
|
460
460
|
console.log(` ${pc.dim(`Run manually: npx supabase login && npx supabase link --project-ref ${credentials.supabaseProjectRef}`)}`);
|
|
461
461
|
}
|
|
462
|
+
}
|
|
462
463
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
);
|
|
473
|
-
|
|
474
|
-
// Set current team scope
|
|
475
|
-
const configPath = path.join(vercelConfigDir, 'config.json');
|
|
476
|
-
let vercelConfig = {};
|
|
477
|
-
if (fs.existsSync(configPath)) {
|
|
478
|
-
vercelConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
464
|
+
// ── Step 6b: Login & link Vercel ──
|
|
465
|
+
if (credentials) {
|
|
466
|
+
// Check if already logged in to Vercel
|
|
467
|
+
if (!canRun('npx vercel whoami')) {
|
|
468
|
+
console.log(`\n ${pc.cyan('Vercel login required — opening browser...')}\n`);
|
|
469
|
+
try {
|
|
470
|
+
execSync('npx vercel login', { cwd: targetDir, stdio: 'inherit' });
|
|
471
|
+
} catch {
|
|
472
|
+
console.log(` ${pc.dim('Vercel login skipped — run "vercel login" later to enable deploys')}`);
|
|
479
473
|
}
|
|
480
|
-
|
|
481
|
-
fs.writeFileSync(configPath, JSON.stringify(vercelConfig, null, 2) + '\n');
|
|
474
|
+
}
|
|
482
475
|
|
|
483
|
-
|
|
476
|
+
const spinnerVercel = ora({ text: 'Linking Vercel project...', indent: 2 }).start();
|
|
477
|
+
try {
|
|
484
478
|
run(`npx vercel link --project ${projectName} --yes`, targetDir);
|
|
485
|
-
spinnerVercel.succeed(pc.green('Vercel
|
|
479
|
+
spinnerVercel.succeed(pc.green('Vercel project linked'));
|
|
486
480
|
} catch {
|
|
487
481
|
spinnerVercel.warn(pc.yellow('Could not link Vercel project'));
|
|
488
|
-
console.log(` ${pc.dim('
|
|
482
|
+
console.log(` ${pc.dim('Run manually: vercel link --project ' + projectName)}`);
|
|
489
483
|
}
|
|
490
484
|
}
|
|
491
485
|
|