zerostart-cli 0.0.19 → 0.0.21
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/out/cli.js +17 -12
- package/out/managers/NetlifyManager.js +10 -15
- package/package.json +1 -1
package/out/cli.js
CHANGED
|
@@ -83,7 +83,7 @@ function showGitHubTokenHelp() {
|
|
|
83
83
|
program
|
|
84
84
|
.name('zerostart')
|
|
85
85
|
.description('Create and deploy a complete project with one command')
|
|
86
|
-
.version('0.0.
|
|
86
|
+
.version('0.0.21');
|
|
87
87
|
program
|
|
88
88
|
.command('deploy-vercel')
|
|
89
89
|
.description('Deploy the current project to Vercel')
|
|
@@ -213,13 +213,16 @@ program
|
|
|
213
213
|
nSpinner.succeed(chalk_1.default.green('Authenticated'));
|
|
214
214
|
}
|
|
215
215
|
const dSpinner = (0, ora_1.default)('Deploying to Netlify...').start();
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
console.log(
|
|
216
|
+
dSpinner.stop(); // Stop spinner to allow interactive input
|
|
217
|
+
const success = await netlifyManager.deploy(cwd);
|
|
218
|
+
if (success) {
|
|
219
|
+
console.log();
|
|
220
|
+
console.log(chalk_1.default.green(' ✔ Deployed to Netlify!'));
|
|
221
|
+
console.log(chalk_1.default.gray(' Run ') + chalk_1.default.cyan('netlify open') + chalk_1.default.gray(' to view your site.'));
|
|
220
222
|
}
|
|
221
223
|
else {
|
|
222
|
-
|
|
224
|
+
console.log();
|
|
225
|
+
console.log(chalk_1.default.red(' ✖ Deployment failed'));
|
|
223
226
|
console.log(chalk_1.default.gray(' Try running ') + chalk_1.default.cyan('netlify login') + chalk_1.default.gray(' and ') + chalk_1.default.cyan('netlify deploy') + chalk_1.default.gray(' manually.'));
|
|
224
227
|
}
|
|
225
228
|
}
|
|
@@ -588,14 +591,16 @@ program
|
|
|
588
591
|
nSpinner.succeed(chalk_1.default.green('Authenticated with Netlify'));
|
|
589
592
|
}
|
|
590
593
|
const dSpinner = (0, ora_1.default)('Deploying to Netlify...').start();
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
console.log(chalk_1.default.
|
|
594
|
+
dSpinner.stop(); // Stop spinner to allow interactive input
|
|
595
|
+
const success = await netlifyManager.deploy(config.path);
|
|
596
|
+
if (success) {
|
|
597
|
+
console.log();
|
|
598
|
+
console.log(chalk_1.default.green(' ✔ Deployed to Netlify!'));
|
|
599
|
+
console.log(chalk_1.default.gray(' Run ') + chalk_1.default.cyan('netlify open') + chalk_1.default.gray(' to view your site.'));
|
|
596
600
|
}
|
|
597
601
|
else {
|
|
598
|
-
|
|
602
|
+
console.log();
|
|
603
|
+
console.log(chalk_1.default.red(' ✖ Deployment failed'));
|
|
599
604
|
console.log(chalk_1.default.gray(' Try running ') + chalk_1.default.cyan('netlify login') + chalk_1.default.gray(' and ') + chalk_1.default.cyan('netlify deploy') + chalk_1.default.gray(' manually.'));
|
|
600
605
|
}
|
|
601
606
|
}
|
|
@@ -59,21 +59,16 @@ class NetlifyManager {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
async deploy(cwd) {
|
|
62
|
-
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
// If failure is due to login, we might want to tell them.
|
|
74
|
-
console.error(`Netlify deployment setup failed: ${error.message}`);
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
62
|
+
return new Promise((resolve) => {
|
|
63
|
+
// Use spawn with stdio: 'inherit' to allow interactive site creation
|
|
64
|
+
const child = (0, child_process_1.spawn)('netlify', ['deploy', '--prod'], {
|
|
65
|
+
cwd,
|
|
66
|
+
stdio: 'inherit'
|
|
67
|
+
});
|
|
68
|
+
child.on('close', (code) => {
|
|
69
|
+
resolve(code === 0);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
77
72
|
}
|
|
78
73
|
async checkAuth() {
|
|
79
74
|
try {
|