@aiot-toolkit/emulator 2.0.2 → 2.0.3-beta.2

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.
@@ -164,20 +164,7 @@ class CommonInstance {
164
164
  /** 停止模拟器并释放相关资源 */
165
165
  stop() {
166
166
  return __awaiter(this, void 0, void 0, function* () {
167
- var _a, _b;
168
- if (this.goldfishProcess) {
169
- // Linux删除goldfishProcess后,子进程仍存在,导致模拟器窗口未关闭
170
- // 这里的作用是手动删除创建出来的子进程
171
- // if (os.platform() === 'linux' && this.goldfishProcess.pid) {
172
- // process.kill(this.goldfishProcess.pid + 1)
173
- // }
174
- this.killProcess(this.goldfishProcess);
175
- if ((_a = this.startOptions) === null || _a === void 0 ? void 0 : _a.avdName) {
176
- const emulatorProcessFlag = `-avd ${(_b = this.startOptions) === null || _b === void 0 ? void 0 : _b.avdName} -avd-arch`;
177
- yield (0, utils_1.killProcessByCmd)(emulatorProcessFlag);
178
- }
179
- this.goldfishProcess = undefined;
180
- }
167
+ adbMiwt.execAdbCmdSync(`adb -s ${this.sn} shell poweroff`);
181
168
  });
182
169
  }
183
170
  /** 重启模拟器 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/emulator",
3
- "version": "2.0.2",
3
+ "version": "2.0.3-beta.2",
4
4
  "description": "vela emulator tool.",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -35,8 +35,8 @@
35
35
  "emulator"
36
36
  ],
37
37
  "dependencies": {
38
- "@aiot-toolkit/aiotpack": "2.0.2",
39
- "@aiot-toolkit/shared-utils": "2.0.2",
38
+ "@aiot-toolkit/aiotpack": "2.0.3-beta.2",
39
+ "@aiot-toolkit/shared-utils": "2.0.3-beta.2",
40
40
  "@miwt/adb": "^0.9.0",
41
41
  "dayjs": "^1.11.12",
42
42
  "find-process": "^1.4.7",
@@ -50,5 +50,5 @@
50
50
  "@types/fs-extra": "^11.0.4",
51
51
  "@types/ini": "^4.1.1"
52
52
  },
53
- "gitHead": "8ca4bf2ed7bcf11911e5c514696951bdba4fc12d"
53
+ "gitHead": "7776973f6a81d7f13eb330be8df5801d9143c83c"
54
54
  }