create-alta-app 2.6.0 → 2.9.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 +15 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -450,7 +450,8 @@ async function main() {
|
|
|
450
450
|
if (canRun('pnpm --version')) {
|
|
451
451
|
const spinnerInstall = ora({ text: 'Installing dependencies...', indent: 2 }).start();
|
|
452
452
|
try {
|
|
453
|
-
|
|
453
|
+
// Install from monorepo root so pnpm workspace resolves deps correctly
|
|
454
|
+
run('pnpm install', process.cwd());
|
|
454
455
|
spinnerInstall.succeed(pc.green('Dependencies installed'));
|
|
455
456
|
} catch {
|
|
456
457
|
spinnerInstall.fail(pc.yellow('Failed to install dependencies'));
|
|
@@ -466,11 +467,16 @@ async function main() {
|
|
|
466
467
|
if (credentials) {
|
|
467
468
|
const spinnerLink = ora({ text: 'Linking Supabase project...', indent: 2 }).start();
|
|
468
469
|
try {
|
|
469
|
-
run
|
|
470
|
-
|
|
470
|
+
// Login is global — run from monorepo root where supabase CLI is installed
|
|
471
|
+
spinnerLink.text = 'Logging in to Supabase...';
|
|
472
|
+
runVerbose(`npx supabase login --token ${credentials.supabaseToken}`, process.cwd());
|
|
473
|
+
// Link needs supabase/config.toml — run from app dir
|
|
474
|
+
spinnerLink.text = `Linking Supabase project: ${credentials.supabaseProjectRef}...`;
|
|
475
|
+
runVerbose(`npx supabase link --project-ref ${credentials.supabaseProjectRef}`, targetDir);
|
|
471
476
|
spinnerLink.succeed(pc.green('Supabase project linked'));
|
|
472
|
-
} catch {
|
|
477
|
+
} catch (err) {
|
|
473
478
|
spinnerLink.warn(pc.yellow('Could not link Supabase project'));
|
|
479
|
+
console.log(` ${pc.dim('Error: ' + err.message)}`);
|
|
474
480
|
console.log(` ${pc.dim(`Run manually: npx supabase login && npx supabase link --project-ref ${credentials.supabaseProjectRef}`)}`);
|
|
475
481
|
}
|
|
476
482
|
}
|
|
@@ -507,9 +513,9 @@ async function main() {
|
|
|
507
513
|
spinnerVercel.text = 'Could not source ~/.zshrc — using process.env instead';
|
|
508
514
|
}
|
|
509
515
|
|
|
510
|
-
// Link
|
|
516
|
+
// Link from monorepo root — matches rootDirectory setting on Vercel project
|
|
511
517
|
spinnerVercel.text = `Linking Vercel project: ${projectName}...`;
|
|
512
|
-
runVerbose(`npx vercel link --project ${projectName} --yes --token ${credentials.vercelToken}`,
|
|
518
|
+
runVerbose(`npx vercel link --project ${projectName} --yes --token ${credentials.vercelToken}`, process.cwd());
|
|
513
519
|
spinnerVercel.succeed(pc.green('Vercel configured & linked'));
|
|
514
520
|
} catch (err) {
|
|
515
521
|
spinnerVercel.warn(pc.yellow('Could not configure Vercel'));
|
|
@@ -582,8 +588,9 @@ async function main() {
|
|
|
582
588
|
if (credentials?.vercelToken) {
|
|
583
589
|
const spinnerDeploy = ora({ text: 'Deploying to Vercel...', indent: 2 }).start();
|
|
584
590
|
try {
|
|
585
|
-
|
|
586
|
-
|
|
591
|
+
// Deploy from monorepo root — rootDirectory on Vercel project points to the app
|
|
592
|
+
spinnerDeploy.text = `Deploying from monorepo root...`;
|
|
593
|
+
const deployOutput = runVerbose(`npx vercel --yes --token ${credentials.vercelToken}`, process.cwd());
|
|
587
594
|
if (deployOutput) console.log(`\n${pc.dim(deployOutput.trim())}`);
|
|
588
595
|
spinnerDeploy.succeed(pc.green(`Deployed to Vercel → ${credentials.vercelUrl || projectName + '.vercel.app'}`));
|
|
589
596
|
} catch (err) {
|