@midscene/cli 1.8.10-beta-20260604215059.0 → 1.9.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/es/framework/index.mjs +21 -2
- package/dist/es/framework/index.mjs.map +1 -1
- package/dist/es/index.mjs +783 -1115
- package/dist/es/index.mjs.map +1 -1
- package/dist/lib/framework/index.js +21 -2
- package/dist/lib/framework/index.js.map +1 -1
- package/dist/lib/index.js +783 -1115
- package/dist/lib/index.js.map +1 -1
- package/package.json +8 -7
|
@@ -3205,6 +3205,7 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
3205
3205
|
void 0 !== webTarget,
|
|
3206
3206
|
void 0 !== clonedYamlScript.android,
|
|
3207
3207
|
void 0 !== clonedYamlScript.ios,
|
|
3208
|
+
void 0 !== clonedYamlScript.harmony,
|
|
3208
3209
|
void 0 !== clonedYamlScript.computer,
|
|
3209
3210
|
void 0 !== clonedYamlScript.interface
|
|
3210
3211
|
].filter(Boolean).length;
|
|
@@ -3213,10 +3214,11 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
3213
3214
|
void 0 !== webTarget ? 'web' : null,
|
|
3214
3215
|
void 0 !== clonedYamlScript.android ? 'android' : null,
|
|
3215
3216
|
void 0 !== clonedYamlScript.ios ? 'ios' : null,
|
|
3217
|
+
void 0 !== clonedYamlScript.harmony ? 'harmony' : null,
|
|
3216
3218
|
void 0 !== clonedYamlScript.computer ? 'computer' : null,
|
|
3217
3219
|
void 0 !== clonedYamlScript.interface ? 'interface' : null
|
|
3218
3220
|
].filter(Boolean);
|
|
3219
|
-
throw new Error(`Only one target type can be specified, but found multiple: ${specifiedTargets.join(', ')}. Please specify only one of: web, android, ios, computer, or interface.`);
|
|
3221
|
+
throw new Error(`Only one target type can be specified, but found multiple: ${specifiedTargets.join(', ')}. Please specify only one of: web, android, ios, harmony, computer, or interface.`);
|
|
3220
3222
|
}
|
|
3221
3223
|
if (void 0 !== webTarget) {
|
|
3222
3224
|
if (void 0 !== clonedYamlScript.target) console.warn("target is deprecated, please use web instead. See https://midscenejs.com/automate-with-scripts-in-yaml for more information. Sorry for the inconvenience.");
|
|
@@ -3321,6 +3323,23 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
3321
3323
|
freeFn
|
|
3322
3324
|
};
|
|
3323
3325
|
}
|
|
3326
|
+
if (void 0 !== clonedYamlScript.harmony) {
|
|
3327
|
+
const harmonyTarget = clonedYamlScript.harmony;
|
|
3328
|
+
const { agentFromHdcDevice } = await import("@midscene/harmony");
|
|
3329
|
+
const agent = await agentFromHdcDevice(harmonyTarget?.deviceId, {
|
|
3330
|
+
...harmonyTarget,
|
|
3331
|
+
...buildAgentOptions(clonedYamlScript.agent, preference.reportFileName, fileName)
|
|
3332
|
+
});
|
|
3333
|
+
if (harmonyTarget?.launch) await agent.launch(harmonyTarget.launch);
|
|
3334
|
+
freeFn.push({
|
|
3335
|
+
name: 'destroy_harmony_agent',
|
|
3336
|
+
fn: ()=>agent.destroy()
|
|
3337
|
+
});
|
|
3338
|
+
return {
|
|
3339
|
+
agent,
|
|
3340
|
+
freeFn
|
|
3341
|
+
};
|
|
3342
|
+
}
|
|
3324
3343
|
if (void 0 !== clonedYamlScript.computer) {
|
|
3325
3344
|
const computerTarget = clonedYamlScript.computer;
|
|
3326
3345
|
const { agentForComputer } = await import("@midscene/computer");
|
|
@@ -3363,7 +3382,7 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
3363
3382
|
freeFn
|
|
3364
3383
|
};
|
|
3365
3384
|
}
|
|
3366
|
-
throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", "computer", or "interface"');
|
|
3385
|
+
throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", "harmony", "computer", or "interface"');
|
|
3367
3386
|
}, void 0, file);
|
|
3368
3387
|
return player;
|
|
3369
3388
|
}
|