@hmharness/domain-harmony 0.8.0 → 0.11.0
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/dist/index.d.ts +1 -1
- package/dist/index.js +13 -1
- package/dist/ondevice.js +5 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { parseSdkVersion, compareSdk, capabilitiesFor, CAPABILITY_MATRIX, type S
|
|
|
14
14
|
export { harmonyBuildDoctor, diagnoseBuildFailure, firstErrorBlock } from './builddoctor.ts';
|
|
15
15
|
export { harmonyProjectProfile, profileProject } from './profile.ts';
|
|
16
16
|
export { harmonySign, resolveSigningIdentity, ensureDebugProfile, signHap, hapsignToolPaths, type SigningIdentity } from './signing.ts';
|
|
17
|
-
export { harmonyDeviceTest, runDeviceTest, type DeviceTestStep } from './ondevice.ts';
|
|
17
|
+
export { harmonyDeviceTest, runDeviceTest, type DeviceTestStep, type DeviceTestOptions } from './ondevice.ts';
|
|
18
18
|
export { harmonyApiLookup, buildApiIndex, loadApiIndex, lookupSymbol, parseDeclaration, sdkApiDir, type ApiIndex, type ApiSymbolEntry } from './apikg.ts';
|
|
19
19
|
export { harmonyUiRegression, runUiRegression, captureDeviceScreen, type UiRegressionCase, type UiRegressionResult } from './uiregress.ts';
|
|
20
20
|
export { harmonyImageDownloadCheck } from './emulator.ts';
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,19 @@ import { harmonyApiLookup } from "./apikg.js";
|
|
|
23
23
|
import { harmonyUiRegression } from "./uiregress.js";
|
|
24
24
|
const exec = promisify(execFile);
|
|
25
25
|
function devecoHome() {
|
|
26
|
-
|
|
26
|
+
if (process.env.HM_DEVECO_HOME)
|
|
27
|
+
return process.env.HM_DEVECO_HOME;
|
|
28
|
+
// standard install locations probed in order: the old bare-drive default
|
|
29
|
+
// missed the common "Program Files" install and broke every device tool
|
|
30
|
+
// on stock DevEco setups (mcp-serve round-trip test caught it)
|
|
31
|
+
for (const home of ['C:\\Program Files\\Huawei\\DevEco Studio', 'D:\\Program Files\\Huawei\\DevEco Studio', 'C:\\DevEco-Studio']) {
|
|
32
|
+
try {
|
|
33
|
+
accessSync(join(home, 'sdk', 'default', 'openharmony', 'toolchains', 'hdc.exe'));
|
|
34
|
+
return home;
|
|
35
|
+
}
|
|
36
|
+
catch { /* next */ }
|
|
37
|
+
}
|
|
38
|
+
return 'C:\\DevEco-Studio';
|
|
27
39
|
}
|
|
28
40
|
async function run(cmd, args, timeoutMs = 20_000, cwd, extraEnv) {
|
|
29
41
|
try {
|
package/dist/ondevice.js
CHANGED
|
@@ -38,10 +38,12 @@ export async function runDeviceTest(o) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
const steps = [];
|
|
41
|
-
// 1. install
|
|
42
|
-
|
|
41
|
+
// 1. install - hdc mangles mixed-separator paths into "cwd + G:/..." on
|
|
42
|
+
// Windows: always hand it a resolved native absolute path
|
|
43
|
+
const hapNative = resolve(o.hap);
|
|
44
|
+
let r = await run(['install', '-r', hapNative], 120_000);
|
|
43
45
|
if (!r.ok || /fail/i.test(r.out))
|
|
44
|
-
r = await run(['app', 'install', '-r',
|
|
46
|
+
r = await run(['app', 'install', '-r', hapNative], 120_000);
|
|
45
47
|
steps.push({ step: 'install', pass: r.ok && /success/i.test(r.out), detail: r.out.slice(0, 200) });
|
|
46
48
|
if (!steps[0].pass)
|
|
47
49
|
return steps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/domain-harmony",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
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",
|