create-alta-app 1.4.0 → 1.5.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 +7 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -349,12 +349,17 @@ 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 || ''}`,
|
|
358
363
|
'',
|
|
359
364
|
].join('\n');
|
|
360
365
|
fs.writeFileSync(path.join(targetDir, '.env'), env);
|
|
@@ -427,7 +432,8 @@ async function main() {
|
|
|
427
432
|
|
|
428
433
|
}
|
|
429
434
|
if (credentials.githubRepoUrl) {
|
|
430
|
-
|
|
435
|
+
const cleanGitUrl = credentials.githubRepoUrl.replace(/https:\/\/[^@]+@/, 'https://');
|
|
436
|
+
console.log(` ${pc.magenta('◆')} ${pc.dim('GitHub')} ${cleanGitUrl}`);
|
|
431
437
|
}
|
|
432
438
|
console.log(` ${pc.magenta('◆')} ${pc.dim('DB pass')} Saved in .env`);
|
|
433
439
|
console.log('');
|