aiot-toolkit 2.0.6-beta.25 → 2.0.6-beta.27
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 +22 -19
- package/package.json +7 -7
package/lib/bin.js
CHANGED
|
@@ -10,7 +10,6 @@ var _VelaUxBuilder = _interopRequireDefault(require("./builder/VelaUxBuilder"));
|
|
|
10
10
|
var _AndroidUxStart = _interopRequireDefault(require("./starter/AndroidUxStart"));
|
|
11
11
|
var _VelaUxStarter = _interopRequireDefault(require("./starter/VelaUxStarter"));
|
|
12
12
|
var _DeviceUtil = _interopRequireDefault(require("./utils/DeviceUtil"));
|
|
13
|
-
var _VelaAvdUtils = _interopRequireDefault(require("./utils/VelaAvdUtils"));
|
|
14
13
|
var _ZipUtil = _interopRequireDefault(require("@aiot-toolkit/aiotpack/lib/compiler/javascript/vela/utils/ZipUtil"));
|
|
15
14
|
var _BuildNameFormatType = _interopRequireDefault(require("@aiot-toolkit/aiotpack/lib/compiler/javascript/vela/enum/BuildNameFormatType"));
|
|
16
15
|
var _Jsc = _interopRequireDefault(require("@aiot-toolkit/aiotpack/lib/compiler/javascript/vela/utils/Jsc"));
|
|
@@ -20,6 +19,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
20
19
|
// 支持的最低node版本
|
|
21
20
|
const NODE_MINIMUM_VERSION = '18.0.0';
|
|
22
21
|
checkVersion();
|
|
22
|
+
|
|
23
|
+
// VelaAvdUtil is lazy-imported in emulator commands to avoid loading emulator code for build/release
|
|
24
|
+
|
|
23
25
|
// 校验当前环境中的node
|
|
24
26
|
function checkVersion() {
|
|
25
27
|
const currentVersion = process.versions.node;
|
|
@@ -142,36 +144,37 @@ async function main() {
|
|
|
142
144
|
name: 'createVVD',
|
|
143
145
|
description: 'create a vela virtual device',
|
|
144
146
|
action: async () => {
|
|
145
|
-
|
|
147
|
+
const VelaAvdUtil = (await import('./utils/VelaAvdUtils')).default;
|
|
148
|
+
await VelaAvdUtil.createVelaVvdByInquire();
|
|
146
149
|
}
|
|
147
150
|
}, {
|
|
148
151
|
name: 'deleteVVD',
|
|
149
152
|
description: 'delete vela virtual device(s)',
|
|
150
|
-
|
|
151
|
-
name: 'avdNames',
|
|
152
|
-
description: 'avd names to delete',
|
|
153
|
-
enableInquirer: true,
|
|
154
|
-
type: 'checkbox',
|
|
155
|
-
choices: _VelaAvdUtils.default.vvdManager.getVvdList().map(item => {
|
|
156
|
-
return {
|
|
157
|
-
name: item.name,
|
|
158
|
-
value: item.name
|
|
159
|
-
};
|
|
160
|
-
})
|
|
161
|
-
}],
|
|
162
|
-
action: async option => {
|
|
153
|
+
action: async () => {
|
|
163
154
|
const {
|
|
164
|
-
|
|
165
|
-
} =
|
|
155
|
+
checkbox
|
|
156
|
+
} = await import('@inquirer/prompts');
|
|
157
|
+
const VelaAvdUtil = (await import('./utils/VelaAvdUtils')).default;
|
|
158
|
+
const vvdList = VelaAvdUtil.vvdManager.getVvdList();
|
|
159
|
+
const avdNames = await checkbox({
|
|
160
|
+
message: 'avd names to delete',
|
|
161
|
+
choices: vvdList.map(item => {
|
|
162
|
+
return {
|
|
163
|
+
name: item.name,
|
|
164
|
+
value: item.name
|
|
165
|
+
};
|
|
166
|
+
})
|
|
167
|
+
});
|
|
166
168
|
avdNames.forEach(avdName => {
|
|
167
|
-
|
|
169
|
+
VelaAvdUtil.vvdManager.deleteVvd(avdName);
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
}, {
|
|
171
173
|
name: 'initEmulatorEnv',
|
|
172
174
|
description: 'init/reset emulator environment',
|
|
173
175
|
action: async () => {
|
|
174
|
-
|
|
176
|
+
const VelaAvdUtil = (await import('./utils/VelaAvdUtils')).default;
|
|
177
|
+
await VelaAvdUtil.initEmulatorEnv();
|
|
175
178
|
}
|
|
176
179
|
}, {
|
|
177
180
|
name: 'resign',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiot-toolkit",
|
|
3
|
-
"version": "2.0.6-beta.
|
|
3
|
+
"version": "2.0.6-beta.27",
|
|
4
4
|
"description": "Tools for creating, developing, and packaging aiot applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiot"
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"test": "node ./__tests__/aiot-toolkit.test.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aiot-toolkit/aiotpack": "2.0.6-beta.
|
|
26
|
-
"@aiot-toolkit/commander": "2.0.6-beta.
|
|
27
|
-
"@aiot-toolkit/emulator": "2.0.6-beta.
|
|
28
|
-
"@aiot-toolkit/shared-utils": "2.0.6-beta.
|
|
25
|
+
"@aiot-toolkit/aiotpack": "2.0.6-beta.27",
|
|
26
|
+
"@aiot-toolkit/commander": "2.0.6-beta.27",
|
|
27
|
+
"@aiot-toolkit/emulator": "2.0.6-beta.27",
|
|
28
|
+
"@aiot-toolkit/shared-utils": "2.0.6-beta.27",
|
|
29
29
|
"@inquirer/prompts": "^5.3.0",
|
|
30
30
|
"@miwt/adb": "^0.9.0",
|
|
31
31
|
"axios": "^1.7.4",
|
|
32
|
-
"file-lane": "2.0.6-beta.
|
|
32
|
+
"file-lane": "2.0.6-beta.27",
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"koa-router": "^13.0.1",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@types/qr-image": "^3.2.9",
|
|
44
44
|
"@types/semver": "^7.5.8"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "1348e0b4f0fb3b43bc3adc4a4c5b2b0be29c680b"
|
|
47
47
|
}
|