@aiot-toolkit/emulator 2.0.2 → 2.0.3-beta.10
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/README.md +133 -8
- package/lib/emulatorutil/EmulatorLog.js +22 -18
- package/lib/emulatorutil/constants.d.ts +18 -5
- package/lib/emulatorutil/constants.js +94 -53
- package/lib/emulatorutil/index.d.ts +3 -2
- package/lib/emulatorutil/index.js +38 -8
- package/lib/emulatorutil/running.d.ts +24 -0
- package/lib/emulatorutil/running.js +108 -0
- package/lib/emulatorutil/skinLayoutParser.d.ts +14 -0
- package/lib/emulatorutil/skinLayoutParser.js +111 -0
- package/lib/index.d.ts +5 -5
- package/lib/index.js +76 -26
- package/lib/instance/common.d.ts +38 -39
- package/lib/instance/common.js +141 -236
- package/lib/instance/dev.d.ts +7 -42
- package/lib/instance/dev.js +54 -235
- package/lib/instance/index.d.ts +6 -5
- package/lib/instance/index.js +51 -35
- package/lib/instance/miwear.d.ts +14 -75
- package/lib/instance/miwear.js +93 -370
- package/lib/instance/pre.d.ts +11 -3
- package/lib/instance/pre.js +55 -93
- package/lib/instance/pre5.d.ts +11 -0
- package/lib/instance/pre5.js +38 -0
- package/lib/static/avdConfigIni.json +5 -5
- package/lib/typing/Instance.d.ts +30 -15
- package/lib/typing/Instance.js +13 -6
- package/lib/typing/Vvd.d.ts +105 -0
- package/lib/typing/Vvd.js +31 -0
- package/lib/utils/file.d.ts +0 -0
- package/lib/utils/file.js +1 -0
- package/lib/utils/index.js +86 -100
- package/lib/vvd/index.d.ts +107 -0
- package/lib/vvd/index.js +698 -0
- package/lib/vvd/logcat.d.ts +16 -0
- package/lib/vvd/logcat.js +67 -0
- package/package.json +9 -8
- package/lib/avd/index.d.ts +0 -28
- package/lib/avd/index.js +0 -173
- package/lib/emulatorutil/EmulatorCmd.d.ts +0 -9
- package/lib/emulatorutil/EmulatorCmd.js +0 -226
- package/lib/instance/preDev.d.ts +0 -53
- package/lib/instance/preDev.js +0 -249
- package/lib/typing/Avd.d.ts +0 -23
- package/lib/typing/Avd.js +0 -8
package/lib/instance/pre.js
CHANGED
|
@@ -1,100 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
17
5
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const path_1 = __importDefault(require("path"));
|
|
39
|
-
const fs_1 = __importDefault(require("fs"));
|
|
40
|
-
const dev_1 = __importDefault(require("./dev"));
|
|
41
|
-
const miwear_1 = __importDefault(require("./miwear"));
|
|
42
|
-
const ColorConsole_1 = __importDefault(require("@aiot-toolkit/shared-utils/lib/ColorConsole"));
|
|
43
|
-
const adbMiwt = __importStar(require("@miwt/adb"));
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _dev = _interopRequireDefault(require("./dev"));
|
|
8
|
+
var _ColorConsole = _interopRequireDefault(require("@aiot-toolkit/shared-utils/lib/ColorConsole"));
|
|
9
|
+
var adbMiwt = _interopRequireWildcard(require("@miwt/adb"));
|
|
10
|
+
var _Vvd = require("../typing/Vvd");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
44
14
|
/**
|
|
45
15
|
* 不带 miwear 的 4.0 镜像
|
|
46
16
|
*/
|
|
47
|
-
class PreInstance extends
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
rpkPath = rpkPath || `${this.appDir}/${appPackageName}.rpk`;
|
|
82
|
-
const targetPath = `${this.appDir}/${appPackageName}`;
|
|
83
|
-
const mkdirCmd = `adb -s ${this.sn} shell mkdir ${targetPath}`;
|
|
84
|
-
ColorConsole_1.default.info(`### Emulator mkdir cmd ${mkdirCmd}`);
|
|
85
|
-
yield adbMiwt.execAdbCmdAsync(mkdirCmd);
|
|
86
|
-
const unzipCmd = `adb -s ${this.sn} shell unzip -o ${rpkPath} -d ${targetPath}`;
|
|
87
|
-
ColorConsole_1.default.info(`### Emulator unzip cmd ${unzipCmd}`);
|
|
88
|
-
yield adbMiwt.execAdbCmdAsync(unzipCmd);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
pushAndInstall(rpkPath) {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const target = yield this.pushRpk(rpkPath);
|
|
94
|
-
yield this.installApp(target);
|
|
95
|
-
});
|
|
17
|
+
class PreInstance extends _dev.default {
|
|
18
|
+
imageType = (() => _Vvd.VelaImageType.PRE)();
|
|
19
|
+
appDir = '/data/quickapp/app';
|
|
20
|
+
async install(rpkPath, appPackageName) {
|
|
21
|
+
// 基于 vapp 启动的应用只需要将 rpk 解压到指定的目录下
|
|
22
|
+
rpkPath = rpkPath || `${this.appDir}/${appPackageName}.rpk`;
|
|
23
|
+
const targetPath = `${this.appDir}/${appPackageName}`;
|
|
24
|
+
const mkdirCmd = `adb -s ${this.sn} shell mkdir ${targetPath}`;
|
|
25
|
+
_ColorConsole.default.info(`### Emulator mkdir cmd ${mkdirCmd}`);
|
|
26
|
+
await adbMiwt.execAdbCmdAsync(mkdirCmd);
|
|
27
|
+
const unzipCmd = `adb -s ${this.sn} shell unzip -o ${rpkPath} -d ${targetPath}`;
|
|
28
|
+
_ColorConsole.default.info(`### Emulator unzip cmd ${unzipCmd}`);
|
|
29
|
+
await adbMiwt.execAdbCmdAsync(unzipCmd);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 在模拟器中启动快应用
|
|
34
|
+
* 通过vapp命令启动,调试时需额外配置--jsdebugger参数
|
|
35
|
+
* @param options
|
|
36
|
+
*/
|
|
37
|
+
async startApp(packageName) {
|
|
38
|
+
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
39
|
+
try {
|
|
40
|
+
let vappCmd = `adb -s ${this.sn} shell vapp app/${packageName} &`;
|
|
41
|
+
if (debug) {
|
|
42
|
+
vappCmd = `adb -s ${this.sn} shell vapp --jsdebugger=10.0.2.15:101 app/${packageName} &`;
|
|
43
|
+
}
|
|
44
|
+
_ColorConsole.default.log(`### Emulator ### Excuting adb cmd: ${vappCmd}`);
|
|
45
|
+
adbMiwt.execAdbCmd(vappCmd, {
|
|
46
|
+
stdio: 'ignore',
|
|
47
|
+
encoding: 'utf-8'
|
|
48
|
+
});
|
|
49
|
+
} catch (e) {
|
|
50
|
+
_ColorConsole.default.error(`### Emulator ### Failed to startup quickapp: ${e.message}`);
|
|
96
51
|
}
|
|
52
|
+
}
|
|
53
|
+
async closeApp(_appName) {
|
|
54
|
+
await this.reboot();
|
|
55
|
+
}
|
|
56
|
+
async reloadApp(appName) {
|
|
57
|
+
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
58
|
+
await this.reboot();
|
|
59
|
+
this.startApp(appName, debug);
|
|
60
|
+
}
|
|
97
61
|
}
|
|
98
|
-
|
|
99
|
-
PreInstance.prototype.startGoldfish = miwear_1.default.prototype.startGoldfish;
|
|
100
|
-
exports.default = PreInstance;
|
|
62
|
+
var _default = exports.default = PreInstance;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VelaImageType } from '../typing/Vvd';
|
|
2
|
+
import MiwearInstance from './miwear';
|
|
3
|
+
export declare class VelaPre5Instance extends MiwearInstance {
|
|
4
|
+
imageType: VelaImageType;
|
|
5
|
+
appDir: string;
|
|
6
|
+
/**
|
|
7
|
+
* 使用 pm 安装快应用
|
|
8
|
+
* @param targeRpk 快应用的rpk文件路径
|
|
9
|
+
*/
|
|
10
|
+
install(targeRpk: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VelaPre5Instance = void 0;
|
|
7
|
+
var _ColorConsole = _interopRequireDefault(require("@aiot-toolkit/shared-utils/lib/ColorConsole"));
|
|
8
|
+
var _Vvd = require("../typing/Vvd");
|
|
9
|
+
var _miwear = _interopRequireDefault(require("./miwear"));
|
|
10
|
+
var adbMiwt = _interopRequireWildcard(require("@miwt/adb"));
|
|
11
|
+
var _util = require("util");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
class VelaPre5Instance extends _miwear.default {
|
|
16
|
+
imageType = (() => _Vvd.VelaImageType.VELA_PRE_5)();
|
|
17
|
+
appDir = '/data/app';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 使用 pm 安装快应用
|
|
21
|
+
* @param targeRpk 快应用的rpk文件路径
|
|
22
|
+
*/
|
|
23
|
+
async install(targeRpk) {
|
|
24
|
+
const installCmd = `adb -s ${this.sn} shell pm install ${targeRpk}`;
|
|
25
|
+
_ColorConsole.default.info(`### Emulator ### Excuting cmd: ${installCmd}`);
|
|
26
|
+
const res = await adbMiwt.execAdbCmdAsync(installCmd);
|
|
27
|
+
await (0, _util.promisify)(process.nextTick)();
|
|
28
|
+
_ColorConsole.default.info(`### Emulator ### install result: ${res}`);
|
|
29
|
+
// vela 5 安装成功的日志为:
|
|
30
|
+
// onInstallResult: com.application.watch.demo(success 0)
|
|
31
|
+
if (res.includes('(success 0)')) {
|
|
32
|
+
return Promise.resolve();
|
|
33
|
+
} else {
|
|
34
|
+
return Promise.reject(res);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.VelaPre5Instance = VelaPre5Instance;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"fastboot.forceChosenSnapshotBoot": "no",
|
|
7
7
|
"fastboot.forceColdBoot": "yes",
|
|
8
8
|
"fastboot.forceFastBoot": "no",
|
|
9
|
-
"hw.accelerometer": "
|
|
9
|
+
"hw.accelerometer": "yes",
|
|
10
10
|
"hw.arc": false,
|
|
11
11
|
"hw.audioInput": "yes",
|
|
12
12
|
"hw.battery": "yes",
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"hw.dPad": "no",
|
|
18
18
|
"hw.gps": "yes",
|
|
19
19
|
"hw.gpu.enabled": "no",
|
|
20
|
-
"hw.gpu.mode": "
|
|
20
|
+
"hw.gpu.mode": "host",
|
|
21
21
|
"hw.initialOrientation": "Portrait",
|
|
22
22
|
"hw.keyboard": "yes",
|
|
23
23
|
"hw.lcd.density": 420,
|
|
24
|
-
"hw.lcd.height":
|
|
25
|
-
"hw.lcd.width":
|
|
24
|
+
"hw.lcd.height": 466,
|
|
25
|
+
"hw.lcd.width": 466,
|
|
26
26
|
"hw.mainKeys": "no",
|
|
27
27
|
"hw.ramSize": 512,
|
|
28
28
|
"hw.sdCard": "no",
|
|
29
29
|
"hw.sensors.orientation": "yes",
|
|
30
30
|
"hw.sensors.proximity": "yes",
|
|
31
31
|
"hw.trackBall": "no",
|
|
32
|
-
"image.sysdir.
|
|
32
|
+
"image.sysdir.2": "",
|
|
33
33
|
"runtime.network.latency": "none",
|
|
34
34
|
"runtime.network.speed": "full",
|
|
35
35
|
"showDeviceFrame": "yes",
|
package/lib/typing/Instance.d.ts
CHANGED
|
@@ -1,27 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import readline from 'readline';
|
|
2
|
+
import { ChildProcessWithoutNullStreams } from 'child_process';
|
|
3
|
+
export interface EmulatorReadlines {
|
|
4
|
+
stdoutReadline: readline.Interface;
|
|
5
|
+
stderrReadline: readline.Interface;
|
|
6
|
+
dispose(): void;
|
|
7
|
+
}
|
|
8
|
+
export interface IEmulatorInstanceParams extends Partial<EmulatorReadlines> {
|
|
9
|
+
serialPort: string;
|
|
10
|
+
debugPort?: number | string;
|
|
11
|
+
vvdName: string;
|
|
12
|
+
onStdout?: (msg: string) => void;
|
|
13
|
+
onErrout?: (msg: string) => void;
|
|
14
|
+
/** 模拟器日志输出进程 */
|
|
15
|
+
logcatProcess?: ChildProcessWithoutNullStreams;
|
|
7
16
|
}
|
|
8
17
|
export interface IStartOptions {
|
|
9
|
-
|
|
18
|
+
vvdName: string;
|
|
19
|
+
isRpk?: boolean;
|
|
10
20
|
devtool?: string;
|
|
11
21
|
/** @deprecated */
|
|
12
22
|
disableNSH?: boolean;
|
|
13
23
|
origin?: IStartOrigin;
|
|
14
|
-
|
|
24
|
+
sdkHome?: string;
|
|
15
25
|
grpcPort?: number;
|
|
16
|
-
|
|
26
|
+
qtHideWindow?: boolean;
|
|
27
|
+
verbose?: boolean;
|
|
17
28
|
debugPort?: number;
|
|
18
|
-
stdoutCallback?: (buffer:
|
|
19
|
-
stderrCallback?: (buffer:
|
|
29
|
+
stdoutCallback?: (buffer: string) => void;
|
|
30
|
+
stderrCallback?: (buffer: string) => void;
|
|
20
31
|
exitCallback?: (code: number | null) => void;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 如果指定了 serialPort 则必须同时指定 grpcPort
|
|
35
|
+
* 否则
|
|
36
|
+
*/
|
|
37
|
+
export interface IStartWithSerialPort extends IStartOptions {
|
|
38
|
+
serialPort: number;
|
|
39
|
+
grpcPort: number;
|
|
25
40
|
}
|
|
26
41
|
export declare enum IStartOrigin {
|
|
27
42
|
Terminal = "terminal",
|
package/lib/typing/Instance.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.IStartOrigin = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 如果指定了 serialPort 则必须同时指定 grpcPort
|
|
9
|
+
* 否则
|
|
10
|
+
*/
|
|
11
|
+
let IStartOrigin = exports.IStartOrigin = /*#__PURE__*/function (IStartOrigin) {
|
|
12
|
+
IStartOrigin["Terminal"] = "terminal";
|
|
13
|
+
IStartOrigin["Ide"] = "ide";
|
|
14
|
+
return IStartOrigin;
|
|
15
|
+
}({});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export interface IVvdResourcePaths {
|
|
2
|
+
vvdHome?: string;
|
|
3
|
+
sdkHome?: string;
|
|
4
|
+
imageHome?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare enum IVvdArchType {
|
|
7
|
+
arm = "arm",
|
|
8
|
+
arm64 = "arm64"
|
|
9
|
+
}
|
|
10
|
+
export declare enum VelaImageType {
|
|
11
|
+
VELA_PRE_5 = "vela-pre-5.0",
|
|
12
|
+
REL = "vela-release-4.0",
|
|
13
|
+
PRE = "vela-pre-4.0",
|
|
14
|
+
DEV = "vela-dev-0.0.4"
|
|
15
|
+
}
|
|
16
|
+
export interface IVvdParams {
|
|
17
|
+
name: string;
|
|
18
|
+
arch: IVvdArchType;
|
|
19
|
+
width: string;
|
|
20
|
+
height: string;
|
|
21
|
+
skin?: string;
|
|
22
|
+
'skin.path'?: string;
|
|
23
|
+
imageDir?: string;
|
|
24
|
+
customImagePath?: string;
|
|
25
|
+
shape?: string;
|
|
26
|
+
flavor?: string;
|
|
27
|
+
density?: string;
|
|
28
|
+
customLcdRadius?: string;
|
|
29
|
+
imageType: VelaImageType;
|
|
30
|
+
skinInfo?: EmulatorSkin;
|
|
31
|
+
}
|
|
32
|
+
export interface EmulatorPart {
|
|
33
|
+
display: {
|
|
34
|
+
width: string;
|
|
35
|
+
height: string;
|
|
36
|
+
x: string;
|
|
37
|
+
y: string;
|
|
38
|
+
shape?: string;
|
|
39
|
+
flavor?: string;
|
|
40
|
+
density?: string;
|
|
41
|
+
[i: string]: any;
|
|
42
|
+
};
|
|
43
|
+
background: {
|
|
44
|
+
mask?: string;
|
|
45
|
+
image: string;
|
|
46
|
+
[i: string]: any;
|
|
47
|
+
};
|
|
48
|
+
foreground: {
|
|
49
|
+
image?: string;
|
|
50
|
+
mask?: string;
|
|
51
|
+
[i: string]: any;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface EmulatorLayout {
|
|
55
|
+
width: string;
|
|
56
|
+
height: string;
|
|
57
|
+
part1: {
|
|
58
|
+
x: string;
|
|
59
|
+
y: string;
|
|
60
|
+
name: string;
|
|
61
|
+
value: EmulatorPart;
|
|
62
|
+
};
|
|
63
|
+
part2: {
|
|
64
|
+
x: string;
|
|
65
|
+
y: string;
|
|
66
|
+
name: string;
|
|
67
|
+
value: EmulatorPart;
|
|
68
|
+
};
|
|
69
|
+
[i: string]: any;
|
|
70
|
+
}
|
|
71
|
+
export interface SkinInfo {
|
|
72
|
+
parts: Record<string, EmulatorPart>;
|
|
73
|
+
layouts: {
|
|
74
|
+
portrait?: EmulatorLayout;
|
|
75
|
+
landscape?: EmulatorLayout;
|
|
76
|
+
};
|
|
77
|
+
props: {
|
|
78
|
+
default?: 'yes' | 'no';
|
|
79
|
+
shape?: string;
|
|
80
|
+
flavor?: string;
|
|
81
|
+
density?: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface EmulatorSkin {
|
|
85
|
+
name: string;
|
|
86
|
+
info: SkinInfo;
|
|
87
|
+
backgroundImage: string;
|
|
88
|
+
maskImage: string | undefined;
|
|
89
|
+
defaultLayout: EmulatorLayout;
|
|
90
|
+
}
|
|
91
|
+
export declare enum SDKChildren {
|
|
92
|
+
EMULATOR = "emulator",
|
|
93
|
+
QA = "qa",
|
|
94
|
+
SKINS = "skins",
|
|
95
|
+
SYSTEM_IMAGES = "system-images",
|
|
96
|
+
MODEM_SIMULATOR = "modem_simulator"
|
|
97
|
+
}
|
|
98
|
+
export declare enum VELAHOME {
|
|
99
|
+
SDK = ".export",
|
|
100
|
+
VVD = ".vela/vvd"
|
|
101
|
+
}
|
|
102
|
+
export type SDKDownloadOpt = {
|
|
103
|
+
force?: boolean;
|
|
104
|
+
parallelStreams?: number;
|
|
105
|
+
} & Parameters<typeof import('ipull').downloadSequence>[0];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VelaImageType = exports.VELAHOME = exports.SDKChildren = exports.IVvdArchType = void 0;
|
|
7
|
+
let IVvdArchType = exports.IVvdArchType = /*#__PURE__*/function (IVvdArchType) {
|
|
8
|
+
IVvdArchType["arm"] = "arm";
|
|
9
|
+
IVvdArchType["arm64"] = "arm64";
|
|
10
|
+
return IVvdArchType;
|
|
11
|
+
}({});
|
|
12
|
+
let VelaImageType = exports.VelaImageType = /*#__PURE__*/function (VelaImageType) {
|
|
13
|
+
VelaImageType["VELA_PRE_5"] = "vela-pre-5.0";
|
|
14
|
+
VelaImageType["REL"] = "vela-release-4.0";
|
|
15
|
+
VelaImageType["PRE"] = "vela-pre-4.0";
|
|
16
|
+
VelaImageType["DEV"] = "vela-dev-0.0.4";
|
|
17
|
+
return VelaImageType;
|
|
18
|
+
}({});
|
|
19
|
+
let SDKChildren = exports.SDKChildren = /*#__PURE__*/function (SDKChildren) {
|
|
20
|
+
SDKChildren["EMULATOR"] = "emulator";
|
|
21
|
+
SDKChildren["QA"] = "qa";
|
|
22
|
+
SDKChildren["SKINS"] = "skins";
|
|
23
|
+
SDKChildren["SYSTEM_IMAGES"] = "system-images";
|
|
24
|
+
SDKChildren["MODEM_SIMULATOR"] = "modem_simulator";
|
|
25
|
+
return SDKChildren;
|
|
26
|
+
}({});
|
|
27
|
+
let VELAHOME = exports.VELAHOME = /*#__PURE__*/function (VELAHOME) {
|
|
28
|
+
VELAHOME["SDK"] = ".export";
|
|
29
|
+
VELAHOME["VVD"] = ".vela/vvd";
|
|
30
|
+
return VELAHOME;
|
|
31
|
+
}({});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|