From 26e7a2b14504f66625fd4c39743039c9b24d152c Mon Sep 17 00:00:00 2001 From: ruan-cat <1219043956@qq.com> Date: Tue, 3 Dec 2024 16:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(vercel-deploy-tool):=20?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E9=83=A8=E7=BD=B2=E4=BB=BB=E5=8A=A1=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vercel-deploy-tool/CHANGELOG.md | 6 ++++++ packages/vercel-deploy-tool/package.json | 2 +- packages/vercel-deploy-tool/src/index.ts | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/vercel-deploy-tool/CHANGELOG.md b/packages/vercel-deploy-tool/CHANGELOG.md index 06e9330..cdf9867 100644 --- a/packages/vercel-deploy-tool/CHANGELOG.md +++ b/packages/vercel-deploy-tool/CHANGELOG.md @@ -1,5 +1,11 @@ # @ruan-cat/vercel-deploy-tool +## 0.4.1 + +### Patch Changes + +- 输出部署任务的错误日志。 + ## 0.4.0 ### Minor Changes diff --git a/packages/vercel-deploy-tool/package.json b/packages/vercel-deploy-tool/package.json index 4cdeb2d..0b8442c 100644 --- a/packages/vercel-deploy-tool/package.json +++ b/packages/vercel-deploy-tool/package.json @@ -1,6 +1,6 @@ { "name": "@ruan-cat/vercel-deploy-tool", - "version": "0.4.0", + "version": "0.4.1", "description": "阮喵喵自用的vercel部署工具,用于实现复杂项目的部署。", "type": "module", "main": "./src/index.ts", diff --git a/packages/vercel-deploy-tool/src/index.ts b/packages/vercel-deploy-tool/src/index.ts index b9ef389..4b8f63b 100644 --- a/packages/vercel-deploy-tool/src/index.ts +++ b/packages/vercel-deploy-tool/src/index.ts @@ -511,7 +511,14 @@ async function main() { generateSimpleAsyncTask(async () => { const deploy = generateDeployTask(deployTarget); consola.start(` 开始部署任务 `); - const { stdout } = await deploy(); + const { stdout, error } = await deploy(); + + if (error) { + consola.error(" 部署失败了 "); + consola.error(error); + return; + } + const vercelUrl = stdout.toString(); consola.success(` 完成部署任务 检查生成的url为 \n `); consola.box(vercelUrl);