@ruan-cat/vercel-deploy-tool 0.4.2 → 0.5.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 +2 -1
- package/src/config.ts +7 -0
- package/src/index.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruan-cat/vercel-deploy-tool",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "阮喵喵自用的vercel部署工具,用于实现复杂项目的部署。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"c12": "^1.11.2",
|
|
45
45
|
"commander": "^12.0.0",
|
|
46
46
|
"consola": "^3.2.3",
|
|
47
|
+
"gradient-string": "^3.0.0",
|
|
47
48
|
"lodash-es": "4.17.21",
|
|
48
49
|
"pathe": "^1.1.2",
|
|
49
50
|
"rimraf": "^6.0.1",
|
package/src/config.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import fs, {
|
|
|
16
16
|
|
|
17
17
|
import { concat, isEmpty, isUndefined } from "lodash-es";
|
|
18
18
|
import { consola } from "consola";
|
|
19
|
+
import gradient from "gradient-string";
|
|
19
20
|
|
|
20
21
|
import {
|
|
21
22
|
isConditionsEvery,
|
|
@@ -169,6 +170,12 @@ function getTargetCWDCommandArgument(deployTarget: DeployTarget) {
|
|
|
169
170
|
*/
|
|
170
171
|
function generateExeca(execaSimpleParams: { command: string; parameters: string[] }) {
|
|
171
172
|
const { command, parameters } = execaSimpleParams;
|
|
173
|
+
|
|
174
|
+
if (config?.isShowCommand) {
|
|
175
|
+
const coloredCommand = gradient(["rgb(0, 153, 247)", "rgb(241, 23, 18)"])(`${command} ${parameters.join(" ")}`);
|
|
176
|
+
consola.info(` 当前运行的命令为: ${coloredCommand} \n`);
|
|
177
|
+
}
|
|
178
|
+
|
|
172
179
|
return generateSimpleAsyncTask(() => spawnSync(command, parameters, { shell: true }));
|
|
173
180
|
}
|
|
174
181
|
|