@ruan-cat/vercel-deploy-tool 0.4.0 → 0.4.2

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/package.json +1 -1
  2. package/src/index.ts +17 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruan-cat/vercel-deploy-tool",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "阮喵喵自用的vercel部署工具,用于实现复杂项目的部署。",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/index.ts CHANGED
@@ -474,7 +474,9 @@ async function main() {
474
474
  parameters: [],
475
475
  });
476
476
  consola.start(` 开始用户命令任务 `);
477
- const { stdout } = await userCommand();
477
+ const child = await userCommand();
478
+ process.stdout.write(child.stdout);
479
+ process.stderr.write(child.stderr);
478
480
  // consola.success(` 完成用户命令任务 ${code} `);
479
481
  consola.success(` 完成用户命令任务 `);
480
482
  // consola.box(stdout);
@@ -511,10 +513,23 @@ async function main() {
511
513
  generateSimpleAsyncTask(async () => {
512
514
  const deploy = generateDeployTask(deployTarget);
513
515
  consola.start(` 开始部署任务 `);
514
- const { stdout } = await deploy();
516
+ const { stdout, error, stderr } = await deploy();
517
+
518
+ if (error) {
519
+ consola.error(" 部署失败了 \n");
520
+ consola.error(error);
521
+ process.stderr.write(stderr);
522
+ return;
523
+ }
524
+
515
525
  const vercelUrl = stdout.toString();
516
526
  consola.success(` 完成部署任务 检查生成的url为 \n `);
517
527
  consola.box(vercelUrl);
528
+
529
+ consola.success(` 部署任务输出如下: \n`);
530
+ process.stdout.write(stdout);
531
+ console.log(`\n`);
532
+
518
533
  return vercelUrl;
519
534
  }),
520
535