@ruan-cat/vercel-deploy-tool 0.12.2 → 1.1.0
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/README.md +375 -75
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +578 -0
- package/dist/index.d.ts +247 -0
- package/dist/index.js +566 -0
- package/package.json +14 -6
- package/src/cli.ts +61 -0
- package/src/commands/deploy.ts +50 -0
- package/src/commands/init.ts +92 -0
- package/src/config/define-config.ts +20 -0
- package/src/config/loader.ts +95 -0
- package/src/config/schema.ts +108 -0
- package/src/core/executor.ts +50 -0
- package/src/core/tasks/after-build.ts +46 -0
- package/src/core/tasks/alias.ts +37 -0
- package/src/core/tasks/build.ts +50 -0
- package/src/core/tasks/copy-dist.ts +59 -0
- package/src/core/tasks/deploy.ts +54 -0
- package/src/core/tasks/index.ts +144 -0
- package/src/core/tasks/link.ts +49 -0
- package/src/core/tasks/user-commands.ts +31 -0
- package/src/core/vercel.ts +55 -0
- package/src/index.ts +68 -550
- package/src/templates/vercel-deploy-tool.config.ts +129 -0
- package/src/types/index.ts +14 -0
- package/src/utils/type-guards.ts +33 -0
- package/src/utils/vercel-null-config.ts +46 -0
- package/tsconfig.json +3 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 阮喵喵自用的
|
|
1
|
+
# 阮喵喵自用的 Vercel 部署工具
|
|
2
2
|
|
|
3
3
|
<!-- automd:badges color="yellow" name="@ruan-cat/vercel-deploy-tool" -->
|
|
4
4
|
|
|
@@ -7,137 +7,437 @@
|
|
|
7
7
|
|
|
8
8
|
<!-- /automd -->
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
一个功能完善的 Vercel 部署工具,支持 **CLI 命令行** 和 **API 编程式** 两种使用方式。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
生成满足 [Vercel Output API (v3)](https://vercel.com/docs/build-output-api) 规范的目录结构,并自动部署到 Vercel 平台。
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## ✨ 特性
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
16
|
+
- 🚀 **CLI 工具**:提供 `deploy` 和 `init` 命令,开箱即用
|
|
17
|
+
- 📦 **API 导出**:支持编程式调用,灵活集成到自定义工作流
|
|
18
|
+
- 🏗️ **Monorepo 支持**:完美支持 monorepo 和单体项目
|
|
19
|
+
- ⚡ **并行执行**:使用 [tasuku](https://github.com/privatenumber/tasuku) 实现任务可视化和并行调度
|
|
20
|
+
- 🎯 **类型安全**:导出 `defineConfig` 提供完整的 TypeScript 类型提示
|
|
21
|
+
- 🔧 **灵活配置**:基于 [c12](https://github.com/unjs/c12) 支持多种配置文件格式
|
|
22
|
+
- 🎨 **多命令别名**:支持 `vercel-deploy-tool`、`vdt`、`@ruan-cat/vercel-deploy-tool`
|
|
22
23
|
|
|
23
|
-
## 安装
|
|
24
|
+
## 📦 安装
|
|
24
25
|
|
|
25
26
|
```bash
|
|
26
|
-
pnpm
|
|
27
|
+
pnpm add -D @ruan-cat/vercel-deploy-tool
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
## 环境要求
|
|
30
|
+
## 🔧 环境要求
|
|
30
31
|
|
|
31
|
-
-
|
|
32
|
-
- pnpm >=9
|
|
32
|
+
- Node.js >= 18
|
|
33
|
+
- pnpm >= 9 (推荐)
|
|
33
34
|
|
|
34
|
-
##
|
|
35
|
+
## 🚀 快速开始
|
|
35
36
|
|
|
36
|
-
###
|
|
37
|
+
### 方式一:使用 CLI(推荐)
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
#### 1. 初始化配置
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npx vercel-deploy-tool init
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
这将在项目根目录生成 `vercel-deploy-tool.config.ts` 配置文件,并自动更新 `package.json` 添加部署脚本。
|
|
46
|
+
|
|
47
|
+
#### 2. 配置 Vercel 凭据
|
|
48
|
+
|
|
49
|
+
获取 Vercel 项目凭据(使用 `vc link` 命令):
|
|
41
50
|
|
|
42
51
|
```bash
|
|
43
|
-
|
|
44
|
-
.vercel
|
|
45
|
-
# 忽略自动生成vercel部署配置文件
|
|
46
|
-
vercel.null.def.json
|
|
52
|
+
npx vercel link
|
|
47
53
|
```
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
将凭据添加到环境变量(推荐)或配置文件:
|
|
50
56
|
|
|
51
57
|
```bash
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.env.production.local
|
|
57
|
-
.env.local
|
|
58
|
+
# .env
|
|
59
|
+
VERCEL_TOKEN=your_vercel_token
|
|
60
|
+
VERCEL_ORG_ID=team_your_vercel_orgId
|
|
61
|
+
VERCEL_PROJECT_ID=prj_your_vercel_projectId
|
|
58
62
|
```
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
#### 3. 编辑配置文件
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// vercel-deploy-tool.config.ts
|
|
68
|
+
import { defineConfig } from "@ruan-cat/vercel-deploy-tool";
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
export default defineConfig({
|
|
71
|
+
vercelProjectName: "my-awesome-project",
|
|
72
|
+
vercelToken: process.env.VERCEL_TOKEN || "",
|
|
73
|
+
vercelOrgId: process.env.VERCEL_ORG_ID || "",
|
|
74
|
+
vercelProjectId: process.env.VERCEL_PROJECT_ID || "",
|
|
63
75
|
|
|
64
|
-
|
|
76
|
+
deployTargets: [
|
|
77
|
+
{
|
|
78
|
+
type: "userCommands",
|
|
79
|
+
targetCWD: "./packages/docs",
|
|
80
|
+
url: ["docs.example.com"],
|
|
81
|
+
userCommands: ["pnpm build:docs"],
|
|
82
|
+
outputDirectory: "docs/.vitepress/dist",
|
|
83
|
+
isCopyDist: true, // 默认为 true
|
|
84
|
+
},
|
|
85
|
+
],
|
|
65
86
|
|
|
66
|
-
|
|
87
|
+
// 可选:在所有构建完成后执行的全局任务
|
|
88
|
+
afterBuildTasks: [
|
|
89
|
+
// "echo 'All builds completed!'",
|
|
90
|
+
],
|
|
91
|
+
});
|
|
92
|
+
```
|
|
67
93
|
|
|
68
|
-
|
|
94
|
+
#### 4. 运行部署
|
|
69
95
|
|
|
70
96
|
```bash
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
pnpm run deploy-vercel
|
|
98
|
+
# 或直接使用 CLI
|
|
99
|
+
npx vercel-deploy-tool deploy
|
|
100
|
+
# 或使用短别名
|
|
101
|
+
npx vdt deploy
|
|
102
|
+
|
|
103
|
+
# 如需指定自定义 dotenv 文件
|
|
104
|
+
npx vdt deploy --env-path .env.production
|
|
105
|
+
# 等价:设置环境变量再运行
|
|
106
|
+
VERCEL_DEPLOY_TOOL_ENV_PATH=.env.production npx vdt deploy
|
|
107
|
+
# 多文件场景(依赖 dotenvx)
|
|
108
|
+
dotenvx run -f .env.test -f .env.test-2 -- vdt deploy
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 方式二:使用 API
|
|
112
|
+
|
|
113
|
+
适用于需要在代码中编程式调用部署功能的场景。
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { defineConfig, executeDeploymentWorkflow } from "@ruan-cat/vercel-deploy-tool";
|
|
117
|
+
|
|
118
|
+
const config = defineConfig({
|
|
119
|
+
vercelProjectName: "my-project",
|
|
120
|
+
vercelToken: process.env.VERCEL_TOKEN || "",
|
|
121
|
+
vercelOrgId: process.env.VERCEL_ORG_ID || "",
|
|
122
|
+
vercelProjectId: process.env.VERCEL_PROJECT_ID || "",
|
|
123
|
+
deployTargets: [
|
|
124
|
+
{
|
|
125
|
+
type: "userCommands",
|
|
126
|
+
targetCWD: "./apps/web",
|
|
127
|
+
url: ["app.example.com"],
|
|
128
|
+
userCommands: ["pnpm build"],
|
|
129
|
+
outputDirectory: "dist",
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// 执行部署工作流
|
|
135
|
+
await executeDeploymentWorkflow(config);
|
|
74
136
|
```
|
|
75
137
|
|
|
76
|
-
|
|
138
|
+
## 📝 配置说明
|
|
77
139
|
|
|
78
|
-
###
|
|
140
|
+
### 主配置项
|
|
79
141
|
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
|
|
142
|
+
```typescript
|
|
143
|
+
interface VercelDeployConfig {
|
|
144
|
+
/** Vercel 项目名称 */
|
|
145
|
+
vercelProjectName: string;
|
|
83
146
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
147
|
+
/** Vercel Token(推荐使用环境变量) */
|
|
148
|
+
vercelToken: string;
|
|
149
|
+
|
|
150
|
+
/** Vercel 组织 ID */
|
|
151
|
+
vercelOrgId: string;
|
|
152
|
+
|
|
153
|
+
/** Vercel 项目 ID */
|
|
154
|
+
vercelProjectId: string;
|
|
155
|
+
|
|
156
|
+
/** 可选:自定义 Vercel 配置文件路径 */
|
|
157
|
+
vercelJsonPath?: string;
|
|
158
|
+
|
|
159
|
+
/** 可选:在所有构建完成后执行的全局任务 */
|
|
160
|
+
afterBuildTasks?: string[];
|
|
161
|
+
|
|
162
|
+
/** 部署目标列表 */
|
|
163
|
+
deployTargets: DeployTarget[];
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### 部署目标配置
|
|
168
|
+
|
|
169
|
+
#### 基础配置
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
interface DeployTargetBase {
|
|
173
|
+
/** 目标类型 */
|
|
174
|
+
type: "static" | "userCommands";
|
|
175
|
+
|
|
176
|
+
/** 目标工作目录(相对于项目根目录) */
|
|
177
|
+
targetCWD: `./${string}`;
|
|
178
|
+
|
|
179
|
+
/** 部署后的自定义域名列表 */
|
|
180
|
+
url: string[];
|
|
181
|
+
|
|
182
|
+
/** 是否需要执行 vercel build(默认 true) */
|
|
183
|
+
isNeedVercelBuild?: boolean;
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### 用户命令配置
|
|
188
|
+
|
|
189
|
+
当 `type: "userCommands"` 时,额外支持:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
interface DeployTargetWithUserCommands extends DeployTargetBase {
|
|
193
|
+
type: "userCommands";
|
|
194
|
+
|
|
195
|
+
/** 构建命令列表(按顺序执行) */
|
|
196
|
+
userCommands: string[];
|
|
197
|
+
|
|
198
|
+
/** 构建产物目录 */
|
|
199
|
+
outputDirectory: string;
|
|
200
|
+
|
|
201
|
+
/** 是否复制构建产物到部署目录(默认 true) */
|
|
202
|
+
isCopyDist?: boolean;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 配置示例
|
|
207
|
+
|
|
208
|
+
#### Monorepo 多项目部署
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
import { defineConfig } from "@ruan-cat/vercel-deploy-tool";
|
|
212
|
+
|
|
213
|
+
export default defineConfig({
|
|
214
|
+
vercelProjectName: "my-monorepo",
|
|
215
|
+
vercelToken: process.env.VERCEL_TOKEN || "",
|
|
216
|
+
vercelOrgId: process.env.VERCEL_ORG_ID || "",
|
|
217
|
+
vercelProjectId: process.env.VERCEL_PROJECT_ID || "",
|
|
90
218
|
|
|
91
219
|
deployTargets: [
|
|
220
|
+
// VitePress 文档站点
|
|
221
|
+
{
|
|
222
|
+
type: "userCommands",
|
|
223
|
+
targetCWD: "./packages/docs",
|
|
224
|
+
url: ["docs.example.com"],
|
|
225
|
+
userCommands: ["pnpm build:docs"],
|
|
226
|
+
outputDirectory: "docs/.vitepress/dist",
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
// VuePress 文档站点
|
|
92
230
|
{
|
|
93
231
|
type: "userCommands",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
232
|
+
targetCWD: "./apps/blog",
|
|
233
|
+
url: ["blog.example.com"],
|
|
234
|
+
userCommands: ["pnpm build"],
|
|
235
|
+
outputDirectory: ".vuepress/dist",
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
// 静态站点(无需自定义构建命令)
|
|
239
|
+
{
|
|
240
|
+
type: "static",
|
|
241
|
+
targetCWD: "./apps/landing",
|
|
242
|
+
url: ["www.example.com"],
|
|
243
|
+
isNeedVercelBuild: true,
|
|
98
244
|
},
|
|
99
245
|
],
|
|
100
|
-
};
|
|
101
246
|
|
|
102
|
-
|
|
247
|
+
// 全局后置任务(在所有构建完成后执行)
|
|
248
|
+
afterBuildTasks: ["echo 'Deployment completed!'", "curl -X POST https://api.example.com/notify"],
|
|
249
|
+
});
|
|
103
250
|
```
|
|
104
251
|
|
|
105
|
-
|
|
252
|
+
## 🔄 部署工作流
|
|
106
253
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
254
|
+
工具会按以下顺序执行任务:
|
|
255
|
+
|
|
256
|
+
1. **Link 阶段**(并行):将所有目标与 Vercel 项目关联
|
|
257
|
+
2. **Build 阶段**(并行):执行所有需要构建的目标
|
|
258
|
+
3. **AfterBuild 阶段**(串行):执行全局后置任务
|
|
259
|
+
4. **UserCommands + CopyDist 阶段**(并行目标,串行步骤):
|
|
260
|
+
- 执行用户自定义构建命令
|
|
261
|
+
- 复制构建产物到部署目录
|
|
262
|
+
5. **Deploy + Alias 阶段**(并行目标,串行步骤):
|
|
263
|
+
- 部署到 Vercel
|
|
264
|
+
- 设置自定义域名别名
|
|
265
|
+
|
|
266
|
+
### 环境变量优先级
|
|
267
|
+
|
|
268
|
+
- `--env-path` / `VERCEL_DEPLOY_TOOL_ENV_PATH` 指定的 dotenv(如 `.env.production`)
|
|
269
|
+
- 现有 `process.env`
|
|
270
|
+
- c12 自动加载的 `.env*`
|
|
271
|
+
- 配置默认值
|
|
272
|
+
|
|
273
|
+
## 📋 .gitignore 配置
|
|
274
|
+
|
|
275
|
+
添加以下内容到 `.gitignore`:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Vercel 本地文件
|
|
279
|
+
.vercel
|
|
280
|
+
vercel.null.def.json
|
|
281
|
+
|
|
282
|
+
# 环境变量文件(如果使用 .env)
|
|
283
|
+
.env
|
|
284
|
+
.env.local
|
|
285
|
+
.env.*.local
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## 🎯 CLI 命令
|
|
289
|
+
|
|
290
|
+
### `deploy`
|
|
291
|
+
|
|
292
|
+
执行部署工作流:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
vercel-deploy-tool deploy
|
|
296
|
+
# 或
|
|
297
|
+
vdt deploy
|
|
298
|
+
# 或
|
|
299
|
+
@ruan-cat/vercel-deploy-tool deploy
|
|
111
300
|
```
|
|
112
301
|
|
|
113
|
-
###
|
|
302
|
+
### `init`
|
|
303
|
+
|
|
304
|
+
初始化配置文件:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
vercel-deploy-tool init [options]
|
|
308
|
+
|
|
309
|
+
Options:
|
|
310
|
+
-f, --force 强制覆盖已存在的配置文件
|
|
311
|
+
```
|
|
114
312
|
|
|
115
|
-
|
|
313
|
+
## 📚 API 导出
|
|
314
|
+
|
|
315
|
+
### 配置系统
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
import { defineConfig, loadConfig, getConfig } from "@ruan-cat/vercel-deploy-tool";
|
|
319
|
+
|
|
320
|
+
// 定义配置(提供类型提示)
|
|
321
|
+
export const config = defineConfig({
|
|
322
|
+
/* ... */
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// 加载配置(异步工厂函数)
|
|
326
|
+
const config = await loadConfig();
|
|
327
|
+
|
|
328
|
+
// 获取配置(同步获取)
|
|
329
|
+
const config = getConfig();
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### 类型定义
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
import type {
|
|
336
|
+
VercelDeployConfig,
|
|
337
|
+
DeployTarget,
|
|
338
|
+
DeployTargetBase,
|
|
339
|
+
DeployTargetWithUserCommands,
|
|
340
|
+
DeployTargetType,
|
|
341
|
+
} from "@ruan-cat/vercel-deploy-tool";
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### 核心功能
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { executeDeploymentWorkflow } from "@ruan-cat/vercel-deploy-tool";
|
|
348
|
+
|
|
349
|
+
// 执行完整的部署工作流
|
|
350
|
+
await executeDeploymentWorkflow(config);
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### 命令工厂(高级用法)
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
import { createDeployCommand, createInitCommand } from "@ruan-cat/vercel-deploy-tool";
|
|
357
|
+
import { Command } from "commander";
|
|
358
|
+
|
|
359
|
+
const program = new Command();
|
|
360
|
+
program.addCommand(createDeployCommand());
|
|
361
|
+
program.addCommand(createInitCommand());
|
|
362
|
+
program.parse();
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## 🔧 环境变量
|
|
366
|
+
|
|
367
|
+
工具会自动读取以下环境变量(优先级高于配置文件):
|
|
368
|
+
|
|
369
|
+
| 环境变量 | 说明 | 示例 |
|
|
370
|
+
| ------------------- | ---------------- | --------------------------- |
|
|
371
|
+
| `VERCEL_TOKEN` | Vercel API Token | `your_vercel_token` |
|
|
372
|
+
| `VERCEL_ORG_ID` | Vercel 组织 ID | `team_your_vercel_orgId` |
|
|
373
|
+
| `VERCEL_PROJECT_ID` | Vercel 项目 ID | `prj_your_vercel_projectId` |
|
|
374
|
+
|
|
375
|
+
推荐使用 `.env` 文件管理环境变量(确保已添加到 `.gitignore`)。
|
|
376
|
+
|
|
377
|
+
## 📖 从 v0.x 迁移到 v1.0
|
|
378
|
+
|
|
379
|
+
v1.0 是一个**破坏性更新**,请参考 [迁移指南](./src/docs/migration-guide.md) 了解详细的迁移步骤。
|
|
380
|
+
|
|
381
|
+
### 主要变更
|
|
382
|
+
|
|
383
|
+
- ❌ 移除:直接运行 TypeScript 脚本的方式
|
|
384
|
+
- ✅ 新增:CLI 命令(`vercel-deploy-tool deploy`)
|
|
385
|
+
- ✅ 新增:`defineConfig` 类型安全配置
|
|
386
|
+
- ✅ 新增:`init` 命令生成配置模板
|
|
387
|
+
- 🔄 变更:配置字段重命名(`vercelProjetName` → `vercelProjectName`)
|
|
388
|
+
- 🔄 变更:API 导入路径
|
|
389
|
+
|
|
390
|
+
### 快速迁移
|
|
391
|
+
|
|
392
|
+
**旧版本 (v0.x)**:
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
// bin/vercel-deploy-tool.ts
|
|
396
|
+
import "@ruan-cat/vercel-deploy-tool/src/index.ts";
|
|
397
|
+
```
|
|
116
398
|
|
|
117
399
|
```json
|
|
400
|
+
// package.json
|
|
118
401
|
{
|
|
119
|
-
"engines": {
|
|
120
|
-
"node": ">=22.6.0",
|
|
121
|
-
"pnpm": ">=9"
|
|
122
|
-
},
|
|
123
402
|
"scripts": {
|
|
124
403
|
"deploy-vercel": "tsx ./bin/vercel-deploy-tool.ts"
|
|
125
404
|
}
|
|
126
405
|
}
|
|
127
406
|
```
|
|
128
407
|
|
|
129
|
-
|
|
408
|
+
**新版本 (v1.0)**:
|
|
130
409
|
|
|
131
410
|
```bash
|
|
132
|
-
|
|
411
|
+
# 初始化配置
|
|
412
|
+
npx vercel-deploy-tool init
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
```json
|
|
416
|
+
// package.json
|
|
417
|
+
{
|
|
418
|
+
"scripts": {
|
|
419
|
+
"deploy-vercel": "vercel-deploy-tool deploy"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
133
422
|
```
|
|
134
423
|
|
|
135
|
-
|
|
424
|
+
## 🛠️ 设计初衷
|
|
425
|
+
|
|
426
|
+
- ✅ 优化冗长的 GitHub Actions 写法
|
|
427
|
+
- ✅ 同时支持 monorepo 和单体项目的部署
|
|
428
|
+
- ✅ 自动实现文件移动,避免用户手写文件操作命令
|
|
429
|
+
- ✅ 实现复杂部署任务的并行执行,提高运行性能
|
|
430
|
+
- ✅ 配置实现类型提示,对用户友好
|
|
431
|
+
- ✅ 实现单一 Vercel 项目的多目标部署,绕开 Vercel 针对 monorepo 的部署限制
|
|
432
|
+
- ✅ 提供 CLI 和 API 双模式,适应不同使用场景
|
|
433
|
+
|
|
434
|
+
## 📜 许可证
|
|
435
|
+
|
|
436
|
+
ISC
|
|
136
437
|
|
|
137
|
-
##
|
|
438
|
+
## 🔗 相关链接
|
|
138
439
|
|
|
139
|
-
- [
|
|
140
|
-
- [
|
|
141
|
-
- [
|
|
142
|
-
- [
|
|
143
|
-
- [x] 去其他项目,自主完成配置与部署。
|
|
440
|
+
- [Vercel CLI 文档](https://vercel.com/docs/cli)
|
|
441
|
+
- [Vercel Output API](https://vercel.com/docs/build-output-api)
|
|
442
|
+
- [tasuku - 任务执行器](https://github.com/privatenumber/tasuku)
|
|
443
|
+
- [c12 - 配置加载器](https://github.com/unjs/c12)
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|