create-alta-app 2.7.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.
Files changed (2) hide show
  1. package/index.mjs +11 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -467,11 +467,16 @@ async function main() {
467
467
  if (credentials) {
468
468
  const spinnerLink = ora({ text: 'Linking Supabase project...', indent: 2 }).start();
469
469
  try {
470
- run(`npx supabase login --token ${credentials.supabaseToken}`, targetDir);
471
- run(`npx supabase link --project-ref ${credentials.supabaseProjectRef}`, targetDir);
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);
472
476
  spinnerLink.succeed(pc.green('Supabase project linked'));
473
- } catch {
477
+ } catch (err) {
474
478
  spinnerLink.warn(pc.yellow('Could not link Supabase project'));
479
+ console.log(` ${pc.dim('Error: ' + err.message)}`);
475
480
  console.log(` ${pc.dim(`Run manually: npx supabase login && npx supabase link --project-ref ${credentials.supabaseProjectRef}`)}`);
476
481
  }
477
482
  }
@@ -508,8 +513,7 @@ async function main() {
508
513
  spinnerVercel.text = 'Could not source ~/.zshrc — using process.env instead';
509
514
  }
510
515
 
511
- // Link the Vercel project
512
- // Link from monorepo root so rootDirectory (apps/ai-engineer/<name>) resolves correctly
516
+ // Link from monorepo root — matches rootDirectory setting on Vercel project
513
517
  spinnerVercel.text = `Linking Vercel project: ${projectName}...`;
514
518
  runVerbose(`npx vercel link --project ${projectName} --yes --token ${credentials.vercelToken}`, process.cwd());
515
519
  spinnerVercel.succeed(pc.green('Vercel configured & linked'));
@@ -584,8 +588,8 @@ async function main() {
584
588
  if (credentials?.vercelToken) {
585
589
  const spinnerDeploy = ora({ text: 'Deploying to Vercel...', indent: 2 }).start();
586
590
  try {
587
- // Deploy from monorepo root so rootDirectory (apps/ai-engineer/<name>) resolves correctly
588
- spinnerDeploy.text = `Running: vercel --token ${credentials.vercelToken.slice(0, 8)}... from monorepo root`;
591
+ // Deploy from monorepo root rootDirectory on Vercel project points to the app
592
+ spinnerDeploy.text = `Deploying from monorepo root...`;
589
593
  const deployOutput = runVerbose(`npx vercel --yes --token ${credentials.vercelToken}`, process.cwd());
590
594
  if (deployOutput) console.log(`\n${pc.dim(deployOutput.trim())}`);
591
595
  spinnerDeploy.succeed(pc.green(`Deployed to Vercel → ${credentials.vercelUrl || projectName + '.vercel.app'}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-alta-app",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "description": "Create a new Alta project",
5
5
  "bin": {
6
6
  "create-alta-app": "./index.mjs"