@hmharness/domain-harmony 0.11.0 → 0.13.1

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.
Files changed (2) hide show
  1. package/dist/emulator.js +15 -1
  2. package/package.json +1 -1
package/dist/emulator.js CHANGED
@@ -26,7 +26,21 @@ export function imageRoot() {
26
26
  return join(localAppData(), 'Huawei', 'Sdk');
27
27
  }
28
28
  function emulatorExe() {
29
- return join(process.env.HM_DEVECO_HOME ?? 'C:\\DevEco-Studio', 'tools', 'emulator', 'Emulator.exe');
29
+ // same discoverability contract as findHdc: honor HM_DEVECO_HOME, then
30
+ // probe the standard install locations. The bare-drive default missed the
31
+ // common "Program Files" install and broke every emulator tool on stock
32
+ // DevEco setups (day-18 SELFFEED: the agent had to fake a junction).
33
+ if (process.env.HM_DEVECO_HOME)
34
+ return join(process.env.HM_DEVECO_HOME, 'tools', 'emulator', 'Emulator.exe');
35
+ for (const home of ['C:\\Program Files\\Huawei\\DevEco Studio', 'D:\\Program Files\\Huawei\\DevEco Studio', 'C:\\DevEco-Studio']) {
36
+ const cand = join(home, 'tools', 'emulator', 'Emulator.exe');
37
+ try {
38
+ accessSync(cand);
39
+ return cand;
40
+ }
41
+ catch { /* next */ }
42
+ }
43
+ return join('C:\\DevEco-Studio', 'tools', 'emulator', 'Emulator.exe');
30
44
  }
31
45
  async function readLists() {
32
46
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/domain-harmony",
3
- "version": "0.11.0",
3
+ "version": "0.13.1",
4
4
  "description": "hmharness HarmonyOS domain core: device, toolchain, build, and project lifecycle capabilities. HarmonyOS is the framework's native domain, not an add-on.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",