@ruan-cat/vercel-deploy-tool 0.1.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruan-cat/vercel-deploy-tool",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "阮喵喵自用的vercel部署工具,用于实现复杂项目的部署。",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -50,10 +50,10 @@
50
50
  "lodash-es": "4.17.21",
51
51
  "mkdirp": "^3.0.1",
52
52
  "pathe": "^1.1.2",
53
- "rimraf": "^5.0.7",
53
+ "rimraf": "^6.0.1",
54
54
  "shx": "^0.3.4",
55
55
  "vercel": "^34.2.7",
56
- "@ruan-cat/utils": "^1.1.1"
56
+ "@ruan-cat/utils": "^1.2.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/cpx": "^1.5.5",
package/src/config.ts CHANGED
@@ -92,6 +92,15 @@ export interface Config {
92
92
  /** 用户项目id */
93
93
  vercelProjectId: string;
94
94
 
95
+ /**
96
+ * 用户提供的 vercel.json 配置文件
97
+ * @description
98
+ * 有时候 用户需要提供自己的一套配置文件
99
+ *
100
+ * 这里提供配置路径
101
+ */
102
+ vercelJsonPath?: string;
103
+
95
104
  /** 在build命令阶段后 执行的用户命令 */
96
105
  afterBuildTasks?: string[];
97
106
 
package/src/index.ts CHANGED
@@ -133,9 +133,15 @@ function getVercelTokenCommandArgument() {
133
133
  return <const>[`--token=${config.vercelToken}`];
134
134
  }
135
135
 
136
- /** 以命令参数数组的形式,获得项目vercel的本地配置 */
136
+ /**
137
+ * 以命令参数数组的形式,获得项目vercel的本地配置
138
+ * @description
139
+ * 如果用户自己提供了vercel的本地配置 那么就使用用户的。
140
+ *
141
+ * 否则就使用自己生成的文件。
142
+ */
137
143
  function getVercelLocalConfigCommandArgument() {
138
- return <const>[`--local-config=${vercelNullConfigPath}`];
144
+ return <const>[`--local-config=${config?.vercelJsonPath ?? vercelNullConfigPath}`];
139
145
  }
140
146
 
141
147
  /** 以命令参数数组的形式,获得工作目录 */