@aiot-toolkit/emulator 2.0.5-beta.20 → 2.0.5-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.
@@ -57,14 +57,14 @@ const VelaImageVersionList = exports.VelaImageVersionList = [{
57
57
  label: 'vela-miwear-watch-5.0',
58
58
  description: '适用于手表/手环的,带表盘的 vela 5.0 镜像,不可自定义模拟器尺寸',
59
59
  value: _Vvd.VelaImageType.VELA_MIWEAR_WATCH_5,
60
- time: '20250612',
60
+ time: '20250619',
61
61
  hide: false,
62
62
  icon: ''
63
63
  }, {
64
64
  label: 'vela-watch-5.0',
65
65
  description: '适用于手表/手环的,不带表盘的 vela 5.0 镜像,可自定义模拟器尺寸',
66
66
  value: _Vvd.VelaImageType.VELA_WATCH_5,
67
- time: '20250612',
67
+ time: '20250619',
68
68
  hide: false,
69
69
  icon: ''
70
70
  }, {
@@ -98,8 +98,16 @@ async function getRunningVvds() {
98
98
  return config.filter(c => adbDevices.some(e => e.sn === `emulator-${c['port.serial']}` && e.status === 'device'));
99
99
  }
100
100
  function getRunningAvdConfigByName(name) {
101
- const config = getRunningAvdConfig();
102
- return config.find(t => t['avd.name'] === name);
101
+ const iniFiles = getRunningAvdConfigFiles();
102
+ for (const iniFile of iniFiles) {
103
+ const iniConfig = _ini.default.parse(_fs.default.readFileSync(iniFile, 'utf-8'));
104
+ if (iniConfig['avd.name'] === name) {
105
+ return {
106
+ ...iniConfig,
107
+ path: iniFile
108
+ };
109
+ }
110
+ }
103
111
  }
104
112
  function getRunningVvdDebugPort(name) {
105
113
  const e = getRunningAvdConfigByName(name);
@@ -12,7 +12,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
12
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
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  class Vela5Instance extends _miwear.default {
15
- static emulatorStartedFlag = /Boot completed/;
15
+ static emulatorStartedFlag = /adb_register_service/;
16
16
  static appStartedFlag = /Start main loop/;
17
17
  imageType = (() => _Vvd.VelaImageType.VELA_WATCH_5)();
18
18
  appDir = '/data/app';
@@ -6,7 +6,6 @@
6
6
  "fastboot.forceChosenSnapshotBoot": "no",
7
7
  "fastboot.forceColdBoot": "yes",
8
8
  "fastboot.forceFastBoot": "no",
9
- "hw.accelerometer": "yes",
10
9
  "hw.arc": false,
11
10
  "hw.audioInput": "yes",
12
11
  "hw.battery": "yes",
@@ -35,5 +34,13 @@
35
34
  "showDeviceFrame": "yes",
36
35
  "skin.dynamic": "no",
37
36
  "skin.name": "",
38
- "skin.path": ""
37
+ "skin.path": "",
38
+ "hw.accelerometer": "yes",
39
+ "hw.gyroscope ": "yes",
40
+ "hw.sensors.magnetic_field ": "yes",
41
+ "hw.sensors.temperature ": "yes",
42
+ "hw.sensors.proximity ": "yes",
43
+ "hw.sensors.light ": "yes",
44
+ "hw.sensors.humidity ": "yes",
45
+ "hw.sensors.heart_rate ": "yes"
39
46
  }
@@ -1,5 +1,6 @@
1
1
  import { IVvdParams, IVvdResourcePaths, SDKParts, SDKDownloadOpt, SkinInfo, VelaImageType } from '../typing/Vvd';
2
2
  import { IStartOptions, IStartWithSerialPort } from '../typing/Instance';
3
+ import { EmulatorConfig } from '../emulatorutil';
3
4
  import { findInstance } from '../instance';
4
5
  import type { DownloadFileOptions } from 'ipull';
5
6
  import GrpcEmulator from './grpc';
@@ -54,6 +55,7 @@ export declare class VvdManager {
54
55
  coldBoot: boolean;
55
56
  emulatorInstance: ReturnType<typeof findInstance>;
56
57
  getAgent: () => GrpcEmulator;
58
+ grpcConfig: EmulatorConfig;
57
59
  }>;
58
60
  stopVvd(name: string, timeout?: number): Promise<void>;
59
61
  /** 获取模拟器平台的名称,darwin-aarch64 linux-aarch64 windows-x86_64等 */
package/lib/vvd/index.js CHANGED
@@ -448,7 +448,8 @@ class VvdManager {
448
448
  return {
449
449
  coldBoot: false,
450
450
  emulatorInstance,
451
- getAgent: () => (0, _grpc.createGrpcClient)(e)
451
+ getAgent: () => (0, _grpc.createGrpcClient)(e),
452
+ grpcConfig: e
452
453
  };
453
454
  }
454
455
 
@@ -490,7 +491,8 @@ class VvdManager {
490
491
  resolve({
491
492
  coldBoot: true,
492
493
  emulatorInstance,
493
- getAgent: () => (0, _grpc.createGrpcClient)(e)
494
+ getAgent: () => (0, _grpc.createGrpcClient)(e),
495
+ grpcConfig: e
494
496
  });
495
497
  } else {
496
498
  reject('get emulator running config failed');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/emulator",
3
- "version": "2.0.5-beta.20",
3
+ "version": "2.0.5-beta.22",
4
4
  "description": "vela emulator tool.",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -36,7 +36,7 @@
36
36
  "emulator"
37
37
  ],
38
38
  "dependencies": {
39
- "@aiot-toolkit/shared-utils": "2.0.5-beta.20",
39
+ "@aiot-toolkit/shared-utils": "2.0.5-beta.22",
40
40
  "@grpc/grpc-js": "^1.13.3",
41
41
  "@grpc/proto-loader": "^0.7.13",
42
42
  "@miwt/adb": "0.10.1",
@@ -53,5 +53,5 @@
53
53
  "@types/adm-zip": "^0.5.5",
54
54
  "@types/ini": "^4.1.1"
55
55
  },
56
- "gitHead": "e34506862fb5e24eb86b4a4aa67fa88bb76f6114"
56
+ "gitHead": "cb8b82107dd1d8e977a529fcd334095627bd5d7c"
57
57
  }