@taole/deploy-helper 1.2.2 → 1.2.3
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/index.mjs +9 -0
- package/package.json +3 -2
package/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { Client } from 'node-scp'
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import { join, basename, dirname } from "path";
|
|
6
6
|
import { simpleGit } from 'simple-git';
|
|
7
|
+
import updateNotifier from 'update-notifier';
|
|
7
8
|
import { runPipeline, checkYunxiaoToken, triggerPipeline } from './lib/pipelineApi.mjs';
|
|
8
9
|
import { setDebug, log } from './lib/util.mjs';
|
|
9
10
|
import path from 'path';
|
|
@@ -142,6 +143,14 @@ async function main() {
|
|
|
142
143
|
const packageJson = getPackageJson();
|
|
143
144
|
const version = packageJson.version;
|
|
144
145
|
|
|
146
|
+
updateNotifier({
|
|
147
|
+
pkg: packageJson,
|
|
148
|
+
updateCheckInterval: 1000 * 60 * 60 * 24,
|
|
149
|
+
}).notify({
|
|
150
|
+
defer: false,
|
|
151
|
+
message: `发现新版本 {latestVersion}(当前 {currentVersion}),建议更新:\n{updateCommand}`,
|
|
152
|
+
});
|
|
153
|
+
|
|
145
154
|
// process.argv.includes("--debug") ||
|
|
146
155
|
// 默认开启debug debug目前只是打印日志的时候额外打印时间
|
|
147
156
|
setDebug(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taole/deploy-helper",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "脚本部署工具,用于将项目部署到测试环境或生产环境",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"form-data": "^4.0.5",
|
|
30
30
|
"inquirer": "^12.11.1",
|
|
31
31
|
"node-scp": "^0.0.25",
|
|
32
|
-
"simple-git": "^3.28.0"
|
|
32
|
+
"simple-git": "^3.28.0",
|
|
33
|
+
"update-notifier": "^7.3.1"
|
|
33
34
|
}
|
|
34
35
|
}
|