@qse/edu-scripts 1.14.17 → 1.15.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/CHANGELOG.md +8 -0
- package/lib/utils/beforeStart.js +0 -12
- package/package.json +4 -3
- package/src/utils/beforeStart.js +0 -23
package/CHANGELOG.md
CHANGED
package/lib/utils/beforeStart.js
CHANGED
|
@@ -3,19 +3,7 @@ var fs = require("fs");
|
|
|
3
3
|
var paths = require("../config/paths");
|
|
4
4
|
var chalk = require("chalk");
|
|
5
5
|
var pkg = require("../../package.json");
|
|
6
|
-
var updateNotifier = require("update-notifier");
|
|
7
6
|
var semver = require("semver");
|
|
8
|
-
var notifier = updateNotifier({
|
|
9
|
-
pkg,
|
|
10
|
-
shouldNotifyInNpmScript: true,
|
|
11
|
-
updateCheckInterval: 1e3 * 60
|
|
12
|
-
// 时刻保持更新
|
|
13
|
-
});
|
|
14
|
-
if (notifier.update && ["minor", "major"].includes(notifier.update.type)) {
|
|
15
|
-
const message = "发现新版本 " + chalk.dim("{currentVersion}") + chalk.reset(" → ") + chalk.green("{latestVersion}") + " \n运行 " + chalk.cyan("{updateCommand}") + " 进行更新\n\n" + chalk.bold.red("请始终保持最新版本\n") + "更新日志: " + chalk.green(`${pkg.homepage}#/changelog`);
|
|
16
|
-
notifier.notify({ message });
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
7
|
var appPkg = require(paths.package);
|
|
20
8
|
var appConfig = require("./appConfig");
|
|
21
9
|
if (semver.valid(appPkg.version) === null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qse/edu-scripts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"author": "Kinoko",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "教育工程化基础框架",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"homepage": "http://192.168.10.19:3339/qsxxwapdev/edu-scripts/",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"registry": "https://registry.npmjs.org/",
|
|
25
|
-
"access": "public"
|
|
25
|
+
"access": "public",
|
|
26
|
+
"tag": "webpack"
|
|
26
27
|
},
|
|
27
28
|
"bin": {
|
|
28
29
|
"edu-scripts": "lib/cli.js",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"babel-plugin-import": "^1.13.8",
|
|
51
52
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
52
53
|
"chalk": "^4.1.2",
|
|
54
|
+
"ora": "^5.1.0",
|
|
53
55
|
"chokidar": "^3.6.0",
|
|
54
56
|
"cookie-parser": "^1.4.7",
|
|
55
57
|
"css-loader": "^6.11.0",
|
|
@@ -87,7 +89,6 @@
|
|
|
87
89
|
"terser-webpack-plugin": "~5.3.14",
|
|
88
90
|
"tmp": "^0.2.3",
|
|
89
91
|
"typescript": "^5.8.3",
|
|
90
|
-
"update-notifier": "^5.1.0",
|
|
91
92
|
"url-loader": "^4.1.1",
|
|
92
93
|
"webpack": "^5.99.6",
|
|
93
94
|
"webpack-bundle-analyzer": "^4.10.2",
|
package/src/utils/beforeStart.js
CHANGED
|
@@ -2,30 +2,7 @@ const fs = require('fs')
|
|
|
2
2
|
const paths = require('../config/paths')
|
|
3
3
|
const chalk = require('chalk')
|
|
4
4
|
const pkg = require('../../package.json')
|
|
5
|
-
const updateNotifier = require('update-notifier')
|
|
6
5
|
const semver = require('semver')
|
|
7
|
-
|
|
8
|
-
const notifier = updateNotifier({
|
|
9
|
-
pkg,
|
|
10
|
-
shouldNotifyInNpmScript: true,
|
|
11
|
-
updateCheckInterval: 1000 * 60, // 时刻保持更新
|
|
12
|
-
})
|
|
13
|
-
if (notifier.update && ['minor', 'major'].includes(notifier.update.type)) {
|
|
14
|
-
const message =
|
|
15
|
-
'发现新版本 ' +
|
|
16
|
-
chalk.dim('{currentVersion}') +
|
|
17
|
-
chalk.reset(' → ') +
|
|
18
|
-
chalk.green('{latestVersion}') +
|
|
19
|
-
' \n运行 ' +
|
|
20
|
-
chalk.cyan('{updateCommand}') +
|
|
21
|
-
' 进行更新\n\n' +
|
|
22
|
-
chalk.bold.red('请始终保持最新版本\n') +
|
|
23
|
-
'更新日志: ' +
|
|
24
|
-
chalk.green(`${pkg.homepage}#/changelog`)
|
|
25
|
-
notifier.notify({ message })
|
|
26
|
-
process.exit(1)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
6
|
const appPkg = require(paths.package)
|
|
30
7
|
const appConfig = require('./appConfig')
|
|
31
8
|
|