aiot-toolkit 2.0.2-dev.6 → 2.0.2-dev.8
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/lib/bin.js +13 -1
- package/package.json +9 -7
package/lib/bin.js
CHANGED
|
@@ -13,9 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
const semver_1 = __importDefault(require("semver"));
|
|
17
|
+
const ColorConsole_1 = __importDefault(require("@aiot-toolkit/shared-utils/lib/ColorConsole"));
|
|
18
|
+
// 支持的最低node版本
|
|
19
|
+
const NODE_MINIMUM_VERSION = '16.0.0';
|
|
20
|
+
checkVersion();
|
|
16
21
|
const CompileMode_1 = __importDefault(require("@aiot-toolkit/aiotpack/lib/compiler/enum/CompileMode"));
|
|
17
22
|
const commander_1 = require("@aiot-toolkit/commander");
|
|
18
|
-
const ColorConsole_1 = __importDefault(require("@aiot-toolkit/shared-utils/lib/ColorConsole"));
|
|
19
23
|
const fs_1 = __importDefault(require("fs"));
|
|
20
24
|
const path_1 = __importDefault(require("path"));
|
|
21
25
|
const UxBuilder_1 = __importDefault(require("./builder/UxBuilder"));
|
|
@@ -24,6 +28,14 @@ const UxStarter_1 = __importDefault(require("./starter/UxStarter"));
|
|
|
24
28
|
const XtsStarter_1 = __importDefault(require("./starter/XtsStarter"));
|
|
25
29
|
const DeviceUtil_1 = __importDefault(require("./utils/DeviceUtil"));
|
|
26
30
|
const VelaAvdUtils_1 = __importDefault(require("./utils/VelaAvdUtils"));
|
|
31
|
+
// 校验当前环境中的node
|
|
32
|
+
function checkVersion() {
|
|
33
|
+
const currentVersion = process.versions.node;
|
|
34
|
+
if (semver_1.default.lt(currentVersion, NODE_MINIMUM_VERSION)) {
|
|
35
|
+
ColorConsole_1.default.throw('It is detected that the current NodeJS version ', { word: currentVersion }, ' is too low, please upgrade to NodeJS version higher than ', { word: NODE_MINIMUM_VERSION });
|
|
36
|
+
process.exit();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
// 配置支持的 builder 类型,新增的项目类型,需在此处加上类型
|
|
28
40
|
const projectMapper = {
|
|
29
41
|
ux: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiot-toolkit",
|
|
3
|
-
"version": "2.0.2-dev.
|
|
3
|
+
"version": "2.0.2-dev.8",
|
|
4
4
|
"description": "Tools for creating, developing, and packaging aiot applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiot"
|
|
@@ -21,22 +21,24 @@
|
|
|
21
21
|
"test": "node ./__tests__/aiot-toolkit.test.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aiot-toolkit/commander": "2.0.2-dev.
|
|
25
|
-
"@aiot-toolkit/emulator": "2.0.2-dev.
|
|
26
|
-
"@aiot-toolkit/shared-utils": "2.0.2-dev.
|
|
24
|
+
"@aiot-toolkit/commander": "2.0.2-dev.8",
|
|
25
|
+
"@aiot-toolkit/emulator": "2.0.2-dev.8",
|
|
26
|
+
"@aiot-toolkit/shared-utils": "2.0.2-dev.8",
|
|
27
27
|
"@miwt/adb": "^0.7.1",
|
|
28
28
|
"adb-commander": "^0.1.9",
|
|
29
29
|
"adm-zip": "^0.5.10",
|
|
30
30
|
"axios": "^1.5.0",
|
|
31
31
|
"cli-progress": "^3.12.0",
|
|
32
|
-
"create-aiot": "2.0.2-dev.
|
|
32
|
+
"create-aiot": "2.0.2-dev.8",
|
|
33
33
|
"fast-glob": "^3.3.2",
|
|
34
|
-
"file-lane": "2.0.2-dev.
|
|
34
|
+
"file-lane": "2.0.2-dev.8",
|
|
35
|
+
"semver": "^7.6.0",
|
|
35
36
|
"ws": "^8.15.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@types/adm-zip": "^0.5.4",
|
|
40
|
+
"@types/semver": "^7.5.8",
|
|
39
41
|
"@types/ws": "^8.5.10"
|
|
40
42
|
},
|
|
41
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "831575362ba47778c9441f95cec41ddded36cffc"
|
|
42
44
|
}
|