create-alta-app 2.5.0 → 2.6.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 +14 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -14,7 +14,17 @@ const ALTA_SERVICE_URL = 'https://ikbbbmmzxeemjwzrzsmt.supabase.co/functions/v1/
|
|
|
14
14
|
const ALTA_FINALIZE_URL = 'https://ikbbbmmzxeemjwzrzsmt.supabase.co/functions/v1/finalize-project';
|
|
15
15
|
|
|
16
16
|
function run(cmd, cwd) {
|
|
17
|
-
execSync(cmd, { cwd, stdio: '
|
|
17
|
+
execSync(cmd, { cwd, stdio: 'pipe' });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function runVerbose(cmd, cwd) {
|
|
21
|
+
try {
|
|
22
|
+
return execSync(cmd, { cwd, stdio: 'pipe', encoding: 'utf-8' });
|
|
23
|
+
} catch (err) {
|
|
24
|
+
const stderr = err.stderr?.toString() || '';
|
|
25
|
+
const stdout = err.stdout?.toString() || '';
|
|
26
|
+
throw new Error(stderr || stdout || err.message);
|
|
27
|
+
}
|
|
18
28
|
}
|
|
19
29
|
|
|
20
30
|
function canRun(cmd) {
|
|
@@ -499,7 +509,7 @@ async function main() {
|
|
|
499
509
|
|
|
500
510
|
// Link the Vercel project
|
|
501
511
|
spinnerVercel.text = `Linking Vercel project: ${projectName}...`;
|
|
502
|
-
|
|
512
|
+
runVerbose(`npx vercel link --project ${projectName} --yes --token ${credentials.vercelToken}`, targetDir);
|
|
503
513
|
spinnerVercel.succeed(pc.green('Vercel configured & linked'));
|
|
504
514
|
} catch (err) {
|
|
505
515
|
spinnerVercel.warn(pc.yellow('Could not configure Vercel'));
|
|
@@ -573,7 +583,8 @@ async function main() {
|
|
|
573
583
|
const spinnerDeploy = ora({ text: 'Deploying to Vercel...', indent: 2 }).start();
|
|
574
584
|
try {
|
|
575
585
|
spinnerDeploy.text = `Running: vercel --token ${credentials.vercelToken.slice(0, 8)}... in ${targetDir}`;
|
|
576
|
-
|
|
586
|
+
const deployOutput = runVerbose(`npx vercel --yes --token ${credentials.vercelToken}`, targetDir);
|
|
587
|
+
if (deployOutput) console.log(`\n${pc.dim(deployOutput.trim())}`);
|
|
577
588
|
spinnerDeploy.succeed(pc.green(`Deployed to Vercel → ${credentials.vercelUrl || projectName + '.vercel.app'}`));
|
|
578
589
|
} catch (err) {
|
|
579
590
|
spinnerDeploy.warn(pc.yellow('Could not deploy to Vercel'));
|