@aiot-toolkit/emulator 2.0.6-beta.21 → 2.0.6-beta.22
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/instance/miwear.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { VelaImageType } from '../typing/Vvd';
|
|
|
7
7
|
declare class MiwearInstance extends CommonEmulatorInstance {
|
|
8
8
|
xmsInitedFlag: RegExp;
|
|
9
9
|
static appInstalledFlag: RegExp;
|
|
10
|
+
static appInstallFailedFlag: RegExp;
|
|
10
11
|
imageType: VelaImageType;
|
|
11
12
|
appDir: string;
|
|
12
13
|
static isAppInstalled(log: string, targetRpk: string): boolean;
|
package/lib/instance/miwear.js
CHANGED
|
@@ -20,12 +20,15 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
20
20
|
class MiwearInstance extends _common.default {
|
|
21
21
|
xmsInitedFlag = /quickapp_rpk_installer_init|rpk installer init done/;
|
|
22
22
|
static appInstalledFlag = /InstallState_Finished|install finished/;
|
|
23
|
+
static appInstallFailedFlag = /uv_mq_read_cb: install prepare failed|rpk_install_status: rpk install failed/;
|
|
23
24
|
imageType = (() => _Vvd.VelaImageType.REL)();
|
|
24
25
|
appDir = '/data/quickapp/app';
|
|
25
26
|
static isAppInstalled(log, targetRpk) {
|
|
26
27
|
// 注意:targetRpk 可能包含特殊字符,需要转义
|
|
27
28
|
const escapedRpk = targetRpk.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
28
|
-
|
|
29
|
+
// 旧版本日志格式:executeInstall: rpk install: <rpk> ... success
|
|
30
|
+
// 新版本日志格式:rpk_install_status: rpk file [<rpk>] installed, cleanup it
|
|
31
|
+
const reg = new RegExp(`executeInstall: rpk install: ${escapedRpk} .* success` + `|rpk_install_status: rpk file \\[${escapedRpk}\\] installed`);
|
|
29
32
|
return reg.test(log);
|
|
30
33
|
}
|
|
31
34
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/emulator",
|
|
3
|
-
"version": "2.0.6-beta.
|
|
3
|
+
"version": "2.0.6-beta.22",
|
|
4
4
|
"description": "vela emulator tool.",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"emulator"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aiot-toolkit/shared-utils": "2.0.6-beta.
|
|
35
|
+
"@aiot-toolkit/shared-utils": "2.0.6-beta.22",
|
|
36
36
|
"@grpc/grpc-js": "^1.13.3",
|
|
37
37
|
"@grpc/proto-loader": "^0.7.13",
|
|
38
38
|
"@miwt/adb": "0.10.5",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"@types/adm-zip": "^0.5.5",
|
|
51
51
|
"@types/ini": "^4.1.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "36e03348be739bca8665d981ce33d4d3f8cc4df5"
|
|
54
54
|
}
|