create-alta-app 1.4.0 → 1.5.1

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 +9 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -349,12 +349,19 @@ async function main() {
349
349
  // ── Step 4: Write env files ──
350
350
  if (credentials) {
351
351
  const spinnerEnv = ora({ text: 'Writing environment variables...', indent: 2 }).start();
352
+ const githubToken = credentials.githubRepoUrl
353
+ ? credentials.githubRepoUrl.match(/https:\/\/([^@]+)@/)?.[1] || ''
354
+ : '';
352
355
  const env = [
353
356
  `VITE_SUPABASE_URL=${credentials.supabaseUrl}`,
354
357
  `VITE_SUPABASE_ANON_KEY=${credentials.supabaseAnonKey}`,
355
358
  `SUPABASE_PROJECT_REF=${credentials.supabaseProjectRef}`,
356
359
  `SUPABASE_DB_PASSWORD=${credentials.dbPassword}`,
357
360
  `DATABASE_URL=${credentials.databaseUrl}`,
361
+ `GITHUB_TOKEN=${githubToken}`,
362
+ `GITHUB_REPO=${credentials.githubFullName || ''}`,
363
+ `VERCEL_URL=${credentials.vercelUrl || ''}`,
364
+ `SUPABASE_DASHBOARD=https://supabase.com/dashboard/project/${credentials.supabaseProjectRef}`,
358
365
  '',
359
366
  ].join('\n');
360
367
  fs.writeFileSync(path.join(targetDir, '.env'), env);
@@ -427,7 +434,8 @@ async function main() {
427
434
 
428
435
  }
429
436
  if (credentials.githubRepoUrl) {
430
- console.log(` ${pc.magenta('◆')} ${pc.dim('GitHub')} ${credentials.githubRepoUrl}`);
437
+ const cleanGitUrl = credentials.githubRepoUrl.replace(/https:\/\/[^@]+@/, 'https://');
438
+ console.log(` ${pc.magenta('◆')} ${pc.dim('GitHub')} ${cleanGitUrl}`);
431
439
  }
432
440
  console.log(` ${pc.magenta('◆')} ${pc.dim('DB pass')} Saved in .env`);
433
441
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-alta-app",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Create a new Alta project",
5
5
  "bin": {
6
6
  "create-alta-app": "./index.mjs"