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 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.16');
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
- const url = await netlifyManager.deploy(cwd);
217
- if (url) {
218
- dSpinner.succeed(chalk_1.default.green('Deployed to Netlify!'));
219
- console.log(chalk_1.default.gray(' Check output for URL or run ') + chalk_1.default.cyan('netlify open'));
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
- dSpinner.fail(chalk_1.default.red('Deployment failed'));
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
- const deploymentOutput = await netlifyManager.deploy(config.path);
592
- if (deploymentOutput) {
593
- dSpinner.succeed(chalk_1.default.green('Deployed to Netlify!'));
594
- // Netlify output is verbose, maybe just say success
595
- console.log(chalk_1.default.gray(' Check output for URL or run ') + chalk_1.default.cyan('netlify open'));
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
- dSpinner.fail(chalk_1.default.red('Netlify deployment failed'));
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
- try {
63
- // netlify deploy --prod
64
- // This might require login. If not logged in, it will fail or prompt.
65
- // In a non-interactive shell or without TTY, prompts might fail.
66
- // We assume the user can handle the auth flow if triggered, or we catch the error.
67
- const { stdout } = await exec('netlify deploy --prod --json', { cwd });
68
- // Parse JSON output to find the deploy URL if possible, or just return success message
69
- // Netlify output is complex. simpler:
70
- return stdout.trim();
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 {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "zerostart": "./out/cli.js"
6
6
  },
7
7
  "description": "Create and deploy a complete project with one command.",
8
- "version": "0.0.19",
8
+ "version": "0.0.21",
9
9
  "engines": {
10
10
  "vscode": "^1.85.0"
11
11
  },