@midscene/cli 1.2.1-beta-20260109075435.0 → 1.2.1-beta-20260112112154.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/index.mjs +22 -4
- package/dist/es/index.mjs.map +1 -1
- package/dist/lib/index.js +22 -4
- package/dist/lib/index.js.map +1 -1
- package/package.json +7 -6
package/dist/lib/index.js
CHANGED
|
@@ -3015,7 +3015,7 @@ var __webpack_modules__ = {
|
|
|
3015
3015
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
3016
3016
|
var main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js");
|
|
3017
3017
|
var main_default = /*#__PURE__*/ __webpack_require__.n(main);
|
|
3018
|
-
var package_namespaceObject = JSON.parse('{"rE":"1.2.1-beta-
|
|
3018
|
+
var package_namespaceObject = JSON.parse('{"rE":"1.2.1-beta-20260112112154.0"}');
|
|
3019
3019
|
const yaml_namespaceObject = require("@midscene/core/yaml");
|
|
3020
3020
|
const common_namespaceObject = require("@midscene/shared/common");
|
|
3021
3021
|
const puppeteer_agent_launcher_namespaceObject = require("@midscene/web/puppeteer-agent-launcher");
|
|
@@ -3144,6 +3144,7 @@ var __webpack_modules__ = {
|
|
|
3144
3144
|
const external_node_assert_namespaceObject = require("node:assert");
|
|
3145
3145
|
var external_node_assert_default = /*#__PURE__*/ __webpack_require__.n(external_node_assert_namespaceObject);
|
|
3146
3146
|
const android_namespaceObject = require("@midscene/android");
|
|
3147
|
+
const computer_namespaceObject = require("@midscene/computer");
|
|
3147
3148
|
const agent_namespaceObject = require("@midscene/core/agent");
|
|
3148
3149
|
const utils_namespaceObject = require("@midscene/core/utils");
|
|
3149
3150
|
const ios_namespaceObject = require("@midscene/ios");
|
|
@@ -3184,6 +3185,7 @@ var __webpack_modules__ = {
|
|
|
3184
3185
|
void 0 !== webTarget,
|
|
3185
3186
|
void 0 !== clonedYamlScript.android,
|
|
3186
3187
|
void 0 !== clonedYamlScript.ios,
|
|
3188
|
+
void 0 !== clonedYamlScript.computer,
|
|
3187
3189
|
void 0 !== clonedYamlScript.interface
|
|
3188
3190
|
].filter(Boolean).length;
|
|
3189
3191
|
if (targetCount > 1) {
|
|
@@ -3191,9 +3193,10 @@ var __webpack_modules__ = {
|
|
|
3191
3193
|
void 0 !== webTarget ? 'web' : null,
|
|
3192
3194
|
void 0 !== clonedYamlScript.android ? 'android' : null,
|
|
3193
3195
|
void 0 !== clonedYamlScript.ios ? 'ios' : null,
|
|
3196
|
+
void 0 !== clonedYamlScript.computer ? 'computer' : null,
|
|
3194
3197
|
void 0 !== clonedYamlScript.interface ? 'interface' : null
|
|
3195
3198
|
].filter(Boolean);
|
|
3196
|
-
throw new Error(`Only one target type can be specified, but found multiple: ${specifiedTargets.join(', ')}. Please specify only one of: web, android, ios, or interface.`);
|
|
3199
|
+
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.`);
|
|
3197
3200
|
}
|
|
3198
3201
|
if (void 0 !== webTarget) {
|
|
3199
3202
|
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.");
|
|
@@ -3273,6 +3276,21 @@ var __webpack_modules__ = {
|
|
|
3273
3276
|
freeFn
|
|
3274
3277
|
};
|
|
3275
3278
|
}
|
|
3279
|
+
if (void 0 !== clonedYamlScript.computer) {
|
|
3280
|
+
const computerTarget = clonedYamlScript.computer;
|
|
3281
|
+
const agent = await (0, computer_namespaceObject.agentFromComputer)({
|
|
3282
|
+
...computerTarget,
|
|
3283
|
+
...buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName)
|
|
3284
|
+
});
|
|
3285
|
+
freeFn.push({
|
|
3286
|
+
name: 'destroy_computer_agent',
|
|
3287
|
+
fn: ()=>agent.destroy()
|
|
3288
|
+
});
|
|
3289
|
+
return {
|
|
3290
|
+
agent,
|
|
3291
|
+
freeFn
|
|
3292
|
+
};
|
|
3293
|
+
}
|
|
3276
3294
|
if (void 0 !== clonedYamlScript.interface) {
|
|
3277
3295
|
const interfaceTarget = clonedYamlScript.interface;
|
|
3278
3296
|
const moduleSpecifier = interfaceTarget.module;
|
|
@@ -3299,7 +3317,7 @@ var __webpack_modules__ = {
|
|
|
3299
3317
|
freeFn
|
|
3300
3318
|
};
|
|
3301
3319
|
}
|
|
3302
|
-
throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", or "interface"');
|
|
3320
|
+
throw new Error('No valid interface configuration found in the yaml script, should be either "web", "android", "ios", "computer", or "interface"');
|
|
3303
3321
|
}, void 0, file);
|
|
3304
3322
|
return player;
|
|
3305
3323
|
}
|
|
@@ -11903,7 +11921,7 @@ Usage:
|
|
|
11903
11921
|
type: 'boolean',
|
|
11904
11922
|
description: `Turn on logging to help debug why certain keys or values are not being set as you expect, default is ${config_factory_defaultConfig.dotenvDebug}`
|
|
11905
11923
|
}
|
|
11906
|
-
}).version('version', 'Show version number', "1.2.1-beta-
|
|
11924
|
+
}).version('version', 'Show version number', "1.2.1-beta-20260112112154.0").help().epilogue(`For complete list of configuration options, please visit:
|
|
11907
11925
|
• Web options: https://midscenejs.com/automate-with-scripts-in-yaml#the-web-part
|
|
11908
11926
|
• Android options: https://midscenejs.com/automate-with-scripts-in-yaml#the-android-part
|
|
11909
11927
|
• iOS options: https://midscenejs.com/automate-with-scripts-in-yaml#the-ios-part
|