@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.
- package/package.json +1 -1
- package/src/index.ts +17 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -474,7 +474,9 @@ async function main() {
|
|
|
474
474
|
parameters: [],
|
|
475
475
|
});
|
|
476
476
|
consola.start(` 开始用户命令任务 `);
|
|
477
|
-
const
|
|
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
|
|