@midscene/cli 0.30.10 → 0.30.11-beta-20251218071621.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 CHANGED
@@ -21,22 +21,22 @@ import { EventEmitter } from "node:events";
21
21
  import node_stream from "node:stream";
22
22
  import { StringDecoder } from "node:string_decoder";
23
23
  import { fileURLToPath as external_url_fileURLToPath } from "url";
24
- import * as __WEBPACK_EXTERNAL_MODULE_assert__ from "assert";
25
- import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
26
- import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
27
- import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
28
- import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
29
- import * as __WEBPACK_EXTERNAL_MODULE_tty__ from "tty";
30
- import * as __WEBPACK_EXTERNAL_MODULE_util__ from "util";
31
- import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
24
+ import * as __rspack_external_assert from "assert";
25
+ import * as __rspack_external_crypto from "crypto";
26
+ import * as __rspack_external_fs from "fs";
27
+ import * as __rspack_external_os from "os";
28
+ import * as __rspack_external_path from "path";
29
+ import * as __rspack_external_tty from "tty";
30
+ import * as __rspack_external_util from "util";
31
+ import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
32
32
  var __webpack_modules__ = {
33
- "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js": function(module) {
33
+ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js" (module) {
34
34
  module.exports = ({ onlyFirst = false } = {})=>{
35
35
  const pattern = "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))";
36
36
  return new RegExp(pattern, onlyFirst ? void 0 : 'g');
37
37
  };
38
38
  },
39
- "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
39
+ "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js" (module, __unused_rspack_exports, __webpack_require__) {
40
40
  module = __webpack_require__.nmd(module);
41
41
  const wrapAnsi16 = (fn, offset)=>(...args)=>{
42
42
  const code = fn(...args);
@@ -290,7 +290,7 @@ var __webpack_modules__ = {
290
290
  get: assembleStyles
291
291
  });
292
292
  },
293
- "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js": function(module) {
293
+ "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js" (module) {
294
294
  module.exports = balanced;
295
295
  function balanced(a, b, str) {
296
296
  if (a instanceof RegExp) a = maybeMatch(a, str);
@@ -347,7 +347,7 @@ var __webpack_modules__ = {
347
347
  return result;
348
348
  }
349
349
  },
350
- "../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
350
+ "../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js" (module, __unused_rspack_exports, __webpack_require__) {
351
351
  var balanced = __webpack_require__("../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js");
352
352
  module.exports = expandTop;
353
353
  var escSlash = '\0SLASH' + Math.random() + '\0';
@@ -483,7 +483,7 @@ var __webpack_modules__ = {
483
483
  return expansions;
484
484
  }
485
485
  },
486
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
486
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js" (module, __unused_rspack_exports, __webpack_require__) {
487
487
  const ansiStyles = __webpack_require__("../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js");
488
488
  const { stdout: stdoutColor, stderr: stderrColor } = __webpack_require__("../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js");
489
489
  const { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = __webpack_require__("../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js");
@@ -644,7 +644,7 @@ var __webpack_modules__ = {
644
644
  chalk.stderr.supportsColor = stderrColor;
645
645
  module.exports = chalk;
646
646
  },
647
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js": function(module) {
647
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js" (module) {
648
648
  const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
649
649
  const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
650
650
  const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
@@ -766,7 +766,7 @@ var __webpack_modules__ = {
766
766
  return chunks.join('');
767
767
  };
768
768
  },
769
- "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js": function(module) {
769
+ "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js" (module) {
770
770
  const stringReplaceAll = (string, substring, replacer)=>{
771
771
  let index = string.indexOf(substring);
772
772
  if (-1 === index) return string;
@@ -798,7 +798,7 @@ var __webpack_modules__ = {
798
798
  stringEncaseCRLFWithFirstIndex
799
799
  };
800
800
  },
801
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js": function(module, __unused_webpack_exports, __webpack_require__) {
801
+ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js" (module, __unused_rspack_exports, __webpack_require__) {
802
802
  const cssKeywords = __webpack_require__("../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js");
803
803
  const reverseKeywords = {};
804
804
  for (const key of Object.keys(cssKeywords))reverseKeywords[cssKeywords[key]] = key;
@@ -1621,7 +1621,7 @@ var __webpack_modules__ = {
1621
1621
  ];
1622
1622
  };
1623
1623
  },
1624
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
1624
+ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1625
1625
  const conversions = __webpack_require__("../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js");
1626
1626
  const route = __webpack_require__("../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js");
1627
1627
  const convert = {};
@@ -1666,7 +1666,7 @@ var __webpack_modules__ = {
1666
1666
  });
1667
1667
  module.exports = convert;
1668
1668
  },
1669
- "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js": function(module, __unused_webpack_exports, __webpack_require__) {
1669
+ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js" (module, __unused_rspack_exports, __webpack_require__) {
1670
1670
  const conversions = __webpack_require__("../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js");
1671
1671
  function buildGraph() {
1672
1672
  const graph = {};
@@ -1730,7 +1730,7 @@ var __webpack_modules__ = {
1730
1730
  return conversion;
1731
1731
  };
1732
1732
  },
1733
- "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js": function(module) {
1733
+ "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js" (module) {
1734
1734
  module.exports = {
1735
1735
  aliceblue: [
1736
1736
  240,
@@ -2474,7 +2474,7 @@ var __webpack_modules__ = {
2474
2474
  ]
2475
2475
  };
2476
2476
  },
2477
- "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js": function(module, __unused_webpack_exports, __webpack_require__) {
2477
+ "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js" (module, __unused_rspack_exports, __webpack_require__) {
2478
2478
  const fs = __webpack_require__("fs");
2479
2479
  const path = __webpack_require__("path");
2480
2480
  const os = __webpack_require__("os");
@@ -2700,12 +2700,12 @@ var __webpack_modules__ = {
2700
2700
  module.exports.populate = DotenvModule.populate;
2701
2701
  module.exports = DotenvModule;
2702
2702
  },
2703
- "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js": function(module) {
2703
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js" (module) {
2704
2704
  module.exports = function() {
2705
2705
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
2706
2706
  };
2707
2707
  },
2708
- "../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2708
+ "../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2709
2709
  const { dirname, resolve } = __webpack_require__("path");
2710
2710
  const { readdirSync, statSync } = __webpack_require__("fs");
2711
2711
  module.exports = function(start, callback) {
@@ -2720,7 +2720,7 @@ var __webpack_modules__ = {
2720
2720
  }
2721
2721
  };
2722
2722
  },
2723
- "../../node_modules/.pnpm/get-caller-file@2.0.5/node_modules/get-caller-file/index.js": function(module) {
2723
+ "../../node_modules/.pnpm/get-caller-file@2.0.5/node_modules/get-caller-file/index.js" (module) {
2724
2724
  module.exports = function(position) {
2725
2725
  if (void 0 === position) position = 2;
2726
2726
  if (position >= Error.stackTraceLimit) throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`');
@@ -2733,7 +2733,7 @@ var __webpack_modules__ = {
2733
2733
  if (null !== stack && 'object' == typeof stack) return stack[position] ? stack[position].getFileName() : void 0;
2734
2734
  };
2735
2735
  },
2736
- "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js": function(module) {
2736
+ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js" (module) {
2737
2737
  module.exports = (flag, argv = process.argv)=>{
2738
2738
  const prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--';
2739
2739
  const position = argv.indexOf(prefix + flag);
@@ -2741,7 +2741,7 @@ var __webpack_modules__ = {
2741
2741
  return -1 !== position && (-1 === terminatorPosition || position < terminatorPosition);
2742
2742
  };
2743
2743
  },
2744
- "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": function(module) {
2744
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js" (module) {
2745
2745
  const isFullwidthCodePoint = (codePoint)=>{
2746
2746
  if (Number.isNaN(codePoint)) return false;
2747
2747
  if (codePoint >= 0x1100 && (codePoint <= 0x115F || 0x2329 === codePoint || 0x232A === codePoint || 0x2E80 <= codePoint && codePoint <= 0x3247 && 0x303F !== codePoint || 0x3250 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE6B || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x3FFFD)) return true;
@@ -2750,7 +2750,7 @@ var __webpack_modules__ = {
2750
2750
  module.exports = isFullwidthCodePoint;
2751
2751
  module.exports["default"] = isFullwidthCodePoint;
2752
2752
  },
2753
- "../../node_modules/.pnpm/require-directory@2.1.1/node_modules/require-directory/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2753
+ "../../node_modules/.pnpm/require-directory@2.1.1/node_modules/require-directory/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2754
2754
  var fs = __webpack_require__("fs"), join = __webpack_require__("path").join, resolve = __webpack_require__("path").resolve, dirname = __webpack_require__("path").dirname, defaultOptions = {
2755
2755
  extensions: [
2756
2756
  'js',
@@ -2793,7 +2793,7 @@ var __webpack_modules__ = {
2793
2793
  module.exports = requireDirectory;
2794
2794
  module.exports.defaults = defaultOptions;
2795
2795
  },
2796
- "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2796
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2797
2797
  const stripAnsi = __webpack_require__("../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js");
2798
2798
  const isFullwidthCodePoint = __webpack_require__("../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js");
2799
2799
  const emojiRegex = __webpack_require__("../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js");
@@ -2817,11 +2817,11 @@ var __webpack_modules__ = {
2817
2817
  module.exports = stringWidth;
2818
2818
  module.exports["default"] = stringWidth;
2819
2819
  },
2820
- "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2820
+ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2821
2821
  const ansiRegex = __webpack_require__("../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js");
2822
2822
  module.exports = (string)=>'string' == typeof string ? string.replace(ansiRegex(), '') : string;
2823
2823
  },
2824
- "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2824
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2825
2825
  const os = __webpack_require__("os");
2826
2826
  const tty = __webpack_require__("tty");
2827
2827
  const hasFlag = __webpack_require__("../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js");
@@ -2888,7 +2888,7 @@ var __webpack_modules__ = {
2888
2888
  stderr: translateLevel(supportsColor(true, tty.isatty(2)))
2889
2889
  };
2890
2890
  },
2891
- "../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
2891
+ "../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2892
2892
  const stringWidth = __webpack_require__("../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js");
2893
2893
  const stripAnsi = __webpack_require__("../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js");
2894
2894
  const ansiStyles = __webpack_require__("../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js");
@@ -3021,12 +3021,10 @@ var __webpack_modules__ = {
3021
3021
  };
3022
3022
  module.exports = (string, columns, options)=>String(string).normalize().replace(/\r\n/g, '\n').split('\n').map((line)=>exec(line, columns, options)).join('\n');
3023
3023
  },
3024
- "./src/index.ts": function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
3024
+ "./src/index.ts" (__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3025
3025
  var main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js");
3026
3026
  var main_default = /*#__PURE__*/ __webpack_require__.n(main);
3027
- var package_namespaceObject = {
3028
- i8: "0.30.10"
3029
- };
3027
+ var package_namespaceObject = JSON.parse('{"rE":"0.30.11-beta-20251218071621.0"}');
3030
3028
  class Node {
3031
3029
  value;
3032
3030
  next;
@@ -3153,35 +3151,45 @@ var __webpack_modules__ = {
3153
3151
  resolve(server);
3154
3152
  });
3155
3153
  });
3154
+ function resolveTestId(cliTestId, yamlTestId, fileName) {
3155
+ return cliTestId ?? yamlTestId ?? fileName;
3156
+ }
3157
+ function buildAgentOptions(yamlAgent, preferenceTestId, fileName) {
3158
+ return {
3159
+ ...yamlAgent || {},
3160
+ cache: processCacheConfig(yamlAgent?.cache, fileName),
3161
+ testId: preferenceTestId
3162
+ };
3163
+ }
3156
3164
  async function createYamlPlayer(file, script, options) {
3157
- const yamlScript = script || parseYamlScript((0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.readFileSync)(file, 'utf-8'), file);
3165
+ const yamlScript = script || parseYamlScript((0, __rspack_external_node_fs_5ea92f0c.readFileSync)(file, 'utf-8'), file);
3166
+ const clonedYamlScript = structuredClone(yamlScript);
3158
3167
  const fileName = basename(file, extname(file));
3159
3168
  const preference = {
3160
- headed: null == options ? void 0 : options.headed,
3161
- keepWindow: null == options ? void 0 : options.keepWindow,
3162
- testId: fileName
3169
+ headed: options?.headed,
3170
+ keepWindow: options?.keepWindow,
3171
+ testId: resolveTestId(options?.testId, clonedYamlScript.agent?.testId, fileName)
3163
3172
  };
3164
- const player = new ScriptPlayer(yamlScript, async ()=>{
3173
+ const player = new ScriptPlayer(clonedYamlScript, async ()=>{
3165
3174
  const freeFn = [];
3166
- const webTarget = yamlScript.web || yamlScript.target;
3175
+ const webTarget = clonedYamlScript.web || clonedYamlScript.target;
3167
3176
  const targetCount = [
3168
3177
  void 0 !== webTarget,
3169
- void 0 !== yamlScript.android,
3170
- void 0 !== yamlScript.ios,
3171
- void 0 !== yamlScript.interface
3178
+ void 0 !== clonedYamlScript.android,
3179
+ void 0 !== clonedYamlScript.ios,
3180
+ void 0 !== clonedYamlScript.interface
3172
3181
  ].filter(Boolean).length;
3173
3182
  if (targetCount > 1) {
3174
3183
  const specifiedTargets = [
3175
3184
  void 0 !== webTarget ? 'web' : null,
3176
- void 0 !== yamlScript.android ? 'android' : null,
3177
- void 0 !== yamlScript.ios ? 'ios' : null,
3178
- void 0 !== yamlScript.interface ? 'interface' : null
3185
+ void 0 !== clonedYamlScript.android ? 'android' : null,
3186
+ void 0 !== clonedYamlScript.ios ? 'ios' : null,
3187
+ void 0 !== clonedYamlScript.interface ? 'interface' : null
3179
3188
  ].filter(Boolean);
3180
3189
  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.`);
3181
3190
  }
3182
3191
  if (void 0 !== webTarget) {
3183
- var _yamlScript_agent;
3184
- if (void 0 !== yamlScript.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.");
3192
+ 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.");
3185
3193
  let localServer;
3186
3194
  let urlToVisit;
3187
3195
  if (webTarget.serve) {
@@ -3190,17 +3198,16 @@ var __webpack_modules__ = {
3190
3198
  const serverAddress = localServer.server.address();
3191
3199
  freeFn.push({
3192
3200
  name: 'local_server',
3193
- fn: ()=>null == localServer ? void 0 : localServer.server.close()
3201
+ fn: ()=>localServer?.server.close()
3194
3202
  });
3195
- urlToVisit = webTarget.url.startsWith('/') ? `http://${null == serverAddress ? void 0 : serverAddress.address}:${null == serverAddress ? void 0 : serverAddress.port}${webTarget.url}` : `http://${null == serverAddress ? void 0 : serverAddress.address}:${null == serverAddress ? void 0 : serverAddress.port}/${webTarget.url}`;
3203
+ urlToVisit = webTarget.url.startsWith('/') ? `http://${serverAddress?.address}:${serverAddress?.port}${webTarget.url}` : `http://${serverAddress?.address}:${serverAddress?.port}/${webTarget.url}`;
3196
3204
  webTarget.url = urlToVisit;
3197
3205
  }
3198
3206
  if (!webTarget.bridgeMode) {
3199
- var _yamlScript_agent1;
3200
3207
  const { agent, freeFn: newFreeFn } = await puppeteerAgentForTarget(webTarget, {
3201
3208
  ...preference,
3202
- cache: processCacheConfig(null == (_yamlScript_agent1 = yamlScript.agent) ? void 0 : _yamlScript_agent1.cache, fileName)
3203
- }, null == options ? void 0 : options.browser);
3209
+ ...buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName)
3210
+ }, options?.browser);
3204
3211
  freeFn.push(...newFreeFn);
3205
3212
  return {
3206
3213
  agent,
@@ -3208,10 +3215,10 @@ var __webpack_modules__ = {
3208
3215
  };
3209
3216
  }
3210
3217
  node_assert('newTabWithUrl' === webTarget.bridgeMode || 'currentTab' === webTarget.bridgeMode, `bridgeMode config value must be either "newTabWithUrl" or "currentTab", but got ${webTarget.bridgeMode}`);
3211
- if (webTarget.userAgent || webTarget.viewportWidth || webTarget.viewportHeight || webTarget.viewportScale || webTarget.waitForNetworkIdle || webTarget.cookie) console.warn('puppeteer options (userAgent, viewportWidth, viewportHeight, viewportScale, waitForNetworkIdle, cookie) are not supported in bridge mode. They will be ignored.');
3218
+ if (webTarget.userAgent || webTarget.viewportWidth || webTarget.viewportHeight || webTarget.viewportScale || webTarget.waitForNetworkIdle || webTarget.cookie || webTarget.chromeArgs) console.warn('puppeteer options (userAgent, viewportWidth, viewportHeight, viewportScale, waitForNetworkIdle, cookie, chromeArgs) are not supported in bridge mode. They will be ignored.');
3212
3219
  const agent = new AgentOverChromeBridge({
3213
3220
  closeNewTabsAfterDisconnect: webTarget.closeNewTabsAfterDisconnect,
3214
- cache: processCacheConfig(null == (_yamlScript_agent = yamlScript.agent) ? void 0 : _yamlScript_agent.cache, fileName)
3221
+ ...buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName)
3215
3222
  });
3216
3223
  if ('newTabWithUrl' === webTarget.bridgeMode) await agent.connectNewTabWithUrl(webTarget.url);
3217
3224
  else {
@@ -3227,13 +3234,13 @@ var __webpack_modules__ = {
3227
3234
  freeFn
3228
3235
  };
3229
3236
  }
3230
- if (void 0 !== yamlScript.android) {
3231
- var _yamlScript_agent2;
3232
- const androidTarget = yamlScript.android;
3233
- const agent = await agentFromAdbDevice(null == androidTarget ? void 0 : androidTarget.deviceId, {
3234
- cache: processCacheConfig(null == (_yamlScript_agent2 = yamlScript.agent) ? void 0 : _yamlScript_agent2.cache, fileName)
3237
+ if (void 0 !== clonedYamlScript.android) {
3238
+ const androidTarget = clonedYamlScript.android;
3239
+ const agent = await agentFromAdbDevice(androidTarget?.deviceId, {
3240
+ ...androidTarget,
3241
+ ...buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName)
3235
3242
  });
3236
- if (null == androidTarget ? void 0 : androidTarget.launch) await agent.launch(androidTarget.launch);
3243
+ if (androidTarget?.launch) await agent.launch(androidTarget.launch);
3237
3244
  freeFn.push({
3238
3245
  name: 'destroy_android_agent',
3239
3246
  fn: ()=>agent.destroy()
@@ -3243,13 +3250,13 @@ var __webpack_modules__ = {
3243
3250
  freeFn
3244
3251
  };
3245
3252
  }
3246
- if (void 0 !== yamlScript.ios) {
3247
- const iosTarget = yamlScript.ios;
3253
+ if (void 0 !== clonedYamlScript.ios) {
3254
+ const iosTarget = clonedYamlScript.ios;
3248
3255
  const agent = await agentFromWebDriverAgent({
3249
- wdaPort: null == iosTarget ? void 0 : iosTarget.wdaPort,
3250
- wdaHost: null == iosTarget ? void 0 : iosTarget.wdaHost
3256
+ ...iosTarget,
3257
+ ...buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName)
3251
3258
  });
3252
- if (null == iosTarget ? void 0 : iosTarget.launch) await agent.launch(iosTarget.launch);
3259
+ if (iosTarget?.launch) await agent.launch(iosTarget.launch);
3253
3260
  freeFn.push({
3254
3261
  name: 'destroy_ios_agent',
3255
3262
  fn: ()=>agent.destroy()
@@ -3259,9 +3266,8 @@ var __webpack_modules__ = {
3259
3266
  freeFn
3260
3267
  };
3261
3268
  }
3262
- if (void 0 !== yamlScript.interface) {
3263
- var _yamlScript_agent3;
3264
- const interfaceTarget = yamlScript.interface;
3269
+ if (void 0 !== clonedYamlScript.interface) {
3270
+ const interfaceTarget = clonedYamlScript.interface;
3265
3271
  const moduleSpecifier = interfaceTarget.module;
3266
3272
  let finalModuleSpecifier;
3267
3273
  if (moduleSpecifier.startsWith('./') || moduleSpecifier.startsWith('../') || node_path.isAbsolute(moduleSpecifier)) {
@@ -3274,10 +3280,7 @@ var __webpack_modules__ = {
3274
3280
  debug('DeviceClass', DeviceClass, 'with param', interfaceTarget.param);
3275
3281
  const device = new DeviceClass(interfaceTarget.param || {});
3276
3282
  debug('creating agent from device', device);
3277
- const agent = createAgent(device, {
3278
- ...yamlScript.agent,
3279
- cache: processCacheConfig(null == (_yamlScript_agent3 = yamlScript.agent) ? void 0 : _yamlScript_agent3.cache, fileName)
3280
- });
3283
+ const agent = createAgent(device, buildAgentOptions(clonedYamlScript.agent, preference.testId, fileName));
3281
3284
  freeFn.push({
3282
3285
  name: 'destroy_general_interface_agent',
3283
3286
  fn: ()=>{
@@ -3299,26 +3302,25 @@ var __webpack_modules__ = {
3299
3302
  const printer_indent = ' ';
3300
3303
  const spinnerInterval = 80;
3301
3304
  const spinnerFrames = [
3302
- "\u25F0",
3303
- "\u25F3",
3304
- "\u25F2",
3305
- "\u25F1"
3305
+ '◰',
3306
+ '◳',
3307
+ '◲',
3308
+ '◱'
3306
3309
  ];
3307
3310
  const currentSpinningFrame = ()=>spinnerFrames[Math.floor(Date.now() / spinnerInterval) % spinnerFrames.length];
3308
3311
  function indicatorForStatus(status) {
3309
- if ('init' === status) return source_default().gray("\u25CC");
3312
+ if ('init' === status) return source_default().gray('◌');
3310
3313
  if ('running' === status) return source_default().yellowBright(currentSpinningFrame());
3311
- if ('done' === status) return source_default().green("\u2714\uFE0E");
3312
- if ('error' === status) return source_default().red("\u2718");
3314
+ if ('done' === status) return source_default().green('✔︎');
3315
+ if ('error' === status) return source_default().red('✘');
3313
3316
  }
3314
3317
  const contextInfo = (context)=>{
3315
- var _context_player_errorInSetup, _context_player_errorInSetup1;
3316
3318
  const filePath = context.file;
3317
3319
  const filePathToShow = external_node_path_relative(process.cwd(), filePath);
3318
3320
  const fileNameToPrint = `${source_default().gray(`${filePathToShow}`)}`;
3319
3321
  const fileStatusText = indicatorForStatus(context.player.status);
3320
3322
  const contextActionText = void 0 === context.player.currentTaskIndex && 'running' === context.player.status ? source_default().gray('(navigating)') : '';
3321
- const errorText = context.player.errorInSetup ? `\n${printer_indent}${source_default().red('error:')} ${null == (_context_player_errorInSetup = context.player.errorInSetup) ? void 0 : _context_player_errorInSetup.message}\n${printer_indent}${printer_indent}${null == (_context_player_errorInSetup1 = context.player.errorInSetup) ? void 0 : _context_player_errorInSetup1.stack}` : '';
3323
+ const errorText = context.player.errorInSetup ? `\n${printer_indent}${source_default().red('error:')} ${context.player.errorInSetup?.message}\n${printer_indent}${printer_indent}${context.player.errorInSetup?.stack}` : '';
3322
3324
  const outputFile = context.player.output;
3323
3325
  const outputText = outputFile && Object.keys(context.player.result || {}).length > 0 ? `\n${printer_indent}${source_default().gray(`output: ${outputFile}`)}` : '';
3324
3326
  const reportFile = context.player.reportFile;
@@ -3336,7 +3338,6 @@ var __webpack_modules__ = {
3336
3338
  };
3337
3339
  };
3338
3340
  const singleTaskInfo = (task)=>{
3339
- var _task_error;
3340
3341
  let stepText = '';
3341
3342
  if ('init' === task.status) stepText = '';
3342
3343
  else if ('running' === task.status || 'error' === task.status) if (void 0 === task.currentStep) stepText = source_default().gray('(navigating)');
@@ -3344,7 +3345,7 @@ var __webpack_modules__ = {
3344
3345
  const actionText = '';
3345
3346
  stepText = source_default().gray(`(task ${task.currentStep + 1}/${task.totalSteps}${actionText})`.trim());
3346
3347
  } else stepText = source_default().gray('(unknown task)');
3347
- const errorText = 'error' === task.status ? `\n${printer_indent}${source_default().gray('error:')}\n${printer_indent}${printer_indent}${null == (_task_error = task.error) ? void 0 : _task_error.message}` : '';
3348
+ const errorText = 'error' === task.status ? `\n${printer_indent}${source_default().gray('error:')}\n${printer_indent}${printer_indent}${task.error?.message}` : '';
3348
3349
  const statusText = indicatorForStatus(task.status);
3349
3350
  const mergedLine = `${statusText} ${task.name} ${stepText}${errorText}`;
3350
3351
  return {
@@ -3645,7 +3646,7 @@ var __webpack_modules__ = {
3645
3646
  }
3646
3647
  current.message += next.message;
3647
3648
  }
3648
- if (current) this.render(null == current ? void 0 : current.message, null == current ? void 0 : current.type);
3649
+ if (current) this.render(current?.message, current?.type);
3649
3650
  }
3650
3651
  render(message, type = 'output') {
3651
3652
  if (this.finished) {
@@ -3680,7 +3681,7 @@ var __webpack_modules__ = {
3680
3681
  type,
3681
3682
  message: chunk.toString()
3682
3683
  });
3683
- null == callback || callback();
3684
+ callback?.();
3684
3685
  };
3685
3686
  return function() {
3686
3687
  stream.write = original;
@@ -3773,7 +3774,7 @@ var __webpack_modules__ = {
3773
3774
  };
3774
3775
  delete clonedFileConfig.target;
3775
3776
  }
3776
- if (null == globalConfig ? void 0 : globalConfig.target) {
3777
+ if (globalConfig?.target) {
3777
3778
  globalConfig.web = {
3778
3779
  ...globalConfig.target,
3779
3780
  ...globalConfig.web
@@ -3839,7 +3840,7 @@ var __webpack_modules__ = {
3839
3840
  };
3840
3841
  await this.executeConcurrently(fileContextList, executeFile, executedResults, notExecutedContexts);
3841
3842
  if (!isTTY) {
3842
- console.log("\n\uD83D\uDCCB Execution Results:");
3843
+ console.log('\n📋 Execution Results:');
3843
3844
  for (const context of executedResults)console.log(contextTaskListSummary(context.player.taskStatusList, context));
3844
3845
  }
3845
3846
  } finally{
@@ -3887,9 +3888,8 @@ var __webpack_modules__ = {
3887
3888
  async processResults(executedContexts, notExecutedContexts) {
3888
3889
  const results = [];
3889
3890
  for (const context of executedContexts){
3890
- var _player_taskStatusList, _player_errorInSetup;
3891
3891
  const { file, player, duration } = context;
3892
- const hasFailedTasks = (null == (_player_taskStatusList = player.taskStatusList) ? void 0 : _player_taskStatusList.some((task)=>'error' === task.status)) ?? false;
3892
+ const hasFailedTasks = player.taskStatusList?.some((task)=>'error' === task.status) ?? false;
3893
3893
  const hasPlayerError = 'error' === player.status;
3894
3894
  let success;
3895
3895
  let resultType;
@@ -3906,7 +3906,7 @@ var __webpack_modules__ = {
3906
3906
  let reportFile;
3907
3907
  if (player.reportFile) reportFile = player.reportFile;
3908
3908
  let outputPath = player.output || void 0;
3909
- if (outputPath && !(0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(outputPath)) outputPath = void 0;
3909
+ if (outputPath && !(0, __rspack_external_node_fs_5ea92f0c.existsSync)(outputPath)) outputPath = void 0;
3910
3910
  results.push({
3911
3911
  file,
3912
3912
  success,
@@ -3915,7 +3915,7 @@ var __webpack_modules__ = {
3915
3915
  report: reportFile,
3916
3916
  duration,
3917
3917
  resultType,
3918
- error: (null == (_player_errorInSetup = player.errorInSetup) ? void 0 : _player_errorInSetup.message) || (hasPlayerError ? 'Execution failed' : void 0) || (hasFailedTasks ? 'Some tasks failed' : void 0)
3918
+ error: player.errorInSetup?.message || (hasPlayerError ? 'Execution failed' : void 0) || (hasFailedTasks ? 'Some tasks failed' : void 0)
3919
3919
  });
3920
3920
  }
3921
3921
  for (const context of notExecutedContexts)results.push({
@@ -3931,7 +3931,7 @@ var __webpack_modules__ = {
3931
3931
  return results;
3932
3932
  }
3933
3933
  async loadFileConfig(file) {
3934
- const content = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.readFileSync)(file, 'utf8');
3934
+ const content = (0, __rspack_external_node_fs_5ea92f0c.readFileSync)(file, 'utf8');
3935
3935
  return parseYamlScript(content, file);
3936
3936
  }
3937
3937
  getSummaryAbsolutePath() {
@@ -3940,7 +3940,7 @@ var __webpack_modules__ = {
3940
3940
  printExecutionPlan() {
3941
3941
  console.log(' Scripts:');
3942
3942
  for (const file of this.config.files)console.log(` - ${file}`);
3943
- console.log("\uD83D\uDCCB Execution plan");
3943
+ console.log('📋 Execution plan');
3944
3944
  console.log(` Concurrency: ${this.config.concurrent}`);
3945
3945
  console.log(` Keep window: ${this.config.keepWindow}`);
3946
3946
  console.log(` Headed: ${this.config.headed}`);
@@ -3952,7 +3952,7 @@ var __webpack_modules__ = {
3952
3952
  const indexPath = external_node_path_resolve(getMidsceneRunSubDir('output'), this.config.summary);
3953
3953
  const outputDir = dirname(indexPath);
3954
3954
  try {
3955
- (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.mkdirSync)(outputDir, {
3955
+ (0, __rspack_external_node_fs_5ea92f0c.mkdirSync)(outputDir, {
3956
3956
  recursive: true
3957
3957
  });
3958
3958
  const indexData = {
@@ -3978,7 +3978,7 @@ var __webpack_modules__ = {
3978
3978
  duration: result.duration
3979
3979
  }))
3980
3980
  };
3981
- (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.writeFileSync)(indexPath, JSON.stringify(indexData, null, 2));
3981
+ (0, __rspack_external_node_fs_5ea92f0c.writeFileSync)(indexPath, JSON.stringify(indexData, null, 2));
3982
3982
  console.log('Execution finished:');
3983
3983
  } catch (error) {
3984
3984
  console.error('Failed to generate output index:', error);
@@ -4018,7 +4018,7 @@ var __webpack_modules__ = {
4018
4018
  printExecutionSummary() {
4019
4019
  const summary = this.getExecutionSummary();
4020
4020
  const success = 0 === summary.failed && 0 === summary.partialFailed && 0 === summary.notExecuted;
4021
- console.log("\n\uD83D\uDCCA Execution Summary:");
4021
+ console.log('\n📊 Execution Summary:');
4022
4022
  console.log(` Total files: ${summary.total}`);
4023
4023
  console.log(` Successful: ${summary.successful}`);
4024
4024
  console.log(` Failed: ${summary.failed}`);
@@ -4027,31 +4027,31 @@ var __webpack_modules__ = {
4027
4027
  console.log(` Duration: ${(summary.totalDuration / 1000).toFixed(2)}s`);
4028
4028
  console.log(` Summary: ${this.getSummaryAbsolutePath()}`);
4029
4029
  if (summary.successful > 0) {
4030
- console.log("\n\u2705 Successful files:");
4030
+ console.log('\n Successful files:');
4031
4031
  this.getSuccessfulFiles().forEach((file)=>{
4032
4032
  console.log(` ${file}`);
4033
4033
  });
4034
4034
  }
4035
4035
  if (summary.failed > 0) {
4036
- console.log("\n\u274C Failed files");
4036
+ console.log('\n Failed files');
4037
4037
  this.getFailedFiles().forEach((file)=>{
4038
4038
  console.log(` ${file}`);
4039
4039
  });
4040
4040
  }
4041
4041
  if (summary.partialFailed > 0) {
4042
- console.log("\n\u26A0\uFE0F Partial failed files (some tasks failed with continueOnError)");
4042
+ console.log('\n⚠️ Partial failed files (some tasks failed with continueOnError)');
4043
4043
  this.getPartialFailedFiles().forEach((file)=>{
4044
4044
  console.log(` ${file}`);
4045
4045
  });
4046
4046
  }
4047
4047
  if (summary.notExecuted > 0) {
4048
- console.log("\n\u23F8\uFE0F Not executed files");
4048
+ console.log('\n⏸️ Not executed files');
4049
4049
  this.getNotExecutedFiles().forEach((file)=>{
4050
4050
  console.log(` ${file}`);
4051
4051
  });
4052
4052
  }
4053
- if (success) console.log("\n\uD83C\uDF89 All files executed successfully!");
4054
- else console.log("\n\u26A0\uFE0F Some files failed or were not executed.");
4053
+ if (success) console.log('\n🎉 All files executed successfully!');
4054
+ else console.log('\n⚠️ Some files failed or were not executed.');
4055
4055
  return success;
4056
4056
  }
4057
4057
  constructor(config){
@@ -6700,7 +6700,7 @@ var __webpack_modules__ = {
6700
6700
  realpath: realpath
6701
6701
  }
6702
6702
  };
6703
- const fsFromOption = (fsOption)=>fsOption && fsOption !== defaultFS && fsOption !== __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ ? {
6703
+ const fsFromOption = (fsOption)=>fsOption && fsOption !== defaultFS && fsOption !== __rspack_external_node_fs_5ea92f0c ? {
6704
6704
  ...defaultFS,
6705
6705
  ...fsOption,
6706
6706
  promises: {
@@ -11723,15 +11723,11 @@ var __webpack_modules__ = {
11723
11723
  };
11724
11724
  async function expandFilePatterns(patterns, basePath) {
11725
11725
  const allFiles = [];
11726
- const seenFiles = new Set();
11727
11726
  for (const pattern of patterns)try {
11728
11727
  const yamlFiles = await matchYamlFiles(pattern, {
11729
11728
  cwd: basePath
11730
11729
  });
11731
- for (const file of yamlFiles)if (!seenFiles.has(file)) {
11732
- seenFiles.add(file);
11733
- allFiles.push(file);
11734
- }
11730
+ for (const file of yamlFiles)allFiles.push(file);
11735
11731
  } catch (error) {
11736
11732
  console.warn(`Warning: Failed to expand pattern "${pattern}":`, error);
11737
11733
  }
@@ -11739,7 +11735,7 @@ var __webpack_modules__ = {
11739
11735
  }
11740
11736
  async function parseConfigYaml(configYamlPath) {
11741
11737
  const basePath = dirname(external_node_path_resolve(configYamlPath));
11742
- const configContent = (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.readFileSync)(configYamlPath, 'utf8');
11738
+ const configContent = (0, __rspack_external_node_fs_5ea92f0c.readFileSync)(configYamlPath, 'utf8');
11743
11739
  const interpolatedContent = interpolateEnvVars(configContent);
11744
11740
  let configYaml;
11745
11741
  try {
@@ -11747,8 +11743,8 @@ var __webpack_modules__ = {
11747
11743
  } catch (error) {
11748
11744
  throw new Error(`Failed to parse config YAML: ${error}`);
11749
11745
  }
11750
- if (!(null == configYaml ? void 0 : configYaml.files) || !Array.isArray(null == configYaml ? void 0 : configYaml.files)) throw new Error('Config YAML must contain a "files" array');
11751
- const files = await expandFilePatterns(null == configYaml ? void 0 : configYaml.files, basePath);
11746
+ if (!configYaml?.files || !Array.isArray(configYaml?.files)) throw new Error('Config YAML must contain a "files" array');
11747
+ const files = await expandFilePatterns(configYaml?.files, basePath);
11752
11748
  if (0 === files.length) throw new Error('No YAML files found matching the patterns in "files"');
11753
11749
  const configFileName = basename(configYamlPath, extname(configYamlPath));
11754
11750
  const timestamp = Date.now();
@@ -11778,23 +11774,23 @@ var __webpack_modules__ = {
11778
11774
  ios: parsedConfig.ios,
11779
11775
  target: parsedConfig.target
11780
11776
  }, {
11781
- web: null == options ? void 0 : options.web,
11782
- android: null == options ? void 0 : options.android,
11783
- ios: null == options ? void 0 : options.ios
11777
+ web: options?.web,
11778
+ android: options?.android,
11779
+ ios: options?.ios
11784
11780
  });
11785
- const keepWindow = (null == options ? void 0 : options.keepWindow) ?? parsedConfig.keepWindow;
11786
- const headed = (null == options ? void 0 : options.headed) ?? parsedConfig.headed;
11781
+ const keepWindow = options?.keepWindow ?? parsedConfig.keepWindow;
11782
+ const headed = options?.headed ?? parsedConfig.headed;
11787
11783
  const finalHeaded = keepWindow || headed;
11788
11784
  return {
11789
11785
  files: parsedConfig.files,
11790
- concurrent: (null == options ? void 0 : options.concurrent) ?? parsedConfig.concurrent,
11791
- continueOnError: (null == options ? void 0 : options.continueOnError) ?? parsedConfig.continueOnError,
11792
- summary: (null == options ? void 0 : options.summary) ?? parsedConfig.summary,
11793
- shareBrowserContext: (null == options ? void 0 : options.shareBrowserContext) ?? parsedConfig.shareBrowserContext,
11786
+ concurrent: options?.concurrent ?? parsedConfig.concurrent,
11787
+ continueOnError: options?.continueOnError ?? parsedConfig.continueOnError,
11788
+ summary: options?.summary ?? parsedConfig.summary,
11789
+ shareBrowserContext: options?.shareBrowserContext ?? parsedConfig.shareBrowserContext,
11794
11790
  headed: finalHeaded,
11795
11791
  keepWindow: keepWindow,
11796
- dotenvOverride: (null == options ? void 0 : options.dotenvOverride) ?? parsedConfig.dotenvOverride,
11797
- dotenvDebug: (null == options ? void 0 : options.dotenvDebug) ?? parsedConfig.dotenvDebug,
11792
+ dotenvOverride: options?.dotenvOverride ?? parsedConfig.dotenvOverride,
11793
+ dotenvDebug: options?.dotenvDebug ?? parsedConfig.dotenvDebug,
11798
11794
  globalConfig
11799
11795
  };
11800
11796
  }
@@ -11823,8 +11819,16 @@ var __webpack_modules__ = {
11823
11819
  };
11824
11820
  }
11825
11821
  const cli_utils_debug = getDebug('midscene:cli');
11822
+ function kebabToCamel(str) {
11823
+ return str.replace(/-([a-z])/g, (_, letter)=>letter.toUpperCase());
11824
+ }
11825
+ function camelToKebab(str) {
11826
+ return str.replace(/[A-Z]/g, (letter)=>`-${letter.toLowerCase()}`).replace(/^-/, '');
11827
+ }
11826
11828
  const parseProcessArgs = async ()=>{
11827
- const args = yargs(hideBin(process.argv)).usage(`Midscene.js helps you automate browser actions, assertions, and data extraction by AI.
11829
+ const args = yargs(hideBin(process.argv)).parserConfiguration({
11830
+ 'dot-notation': true
11831
+ }).usage(`Midscene.js helps you automate browser actions, assertions, and data extraction by AI.
11828
11832
  Homepage: https://midscenejs.com
11829
11833
  Github: https://github.com/web-infra-dev/midscene
11830
11834
 
@@ -11872,76 +11876,34 @@ Usage:
11872
11876
  'dotenv-debug': {
11873
11877
  type: 'boolean',
11874
11878
  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}`
11875
- },
11876
- 'web.user-agent': {
11877
- alias: 'web.userAgent',
11878
- type: 'string',
11879
- description: 'Override user agent for web environments.'
11880
- },
11881
- 'web.viewport-width': {
11882
- alias: 'web.viewportWidth',
11883
- type: 'number',
11884
- description: 'Override viewport width for web environments.'
11885
- },
11886
- 'web.viewport-height': {
11887
- alias: 'web.viewportHeight',
11888
- type: 'number',
11889
- description: 'Override viewport height for web environments.'
11890
- },
11891
- 'android.device-id': {
11892
- alias: 'android.deviceId',
11893
- type: 'string',
11894
- description: 'Override device ID for Android environments.'
11895
- },
11896
- 'ios.device-id': {
11897
- alias: 'ios.deviceId',
11898
- type: 'string',
11899
- description: 'Override device ID for iOS environments.'
11900
- },
11901
- 'ios.wda-port': {
11902
- alias: 'ios.wdaPort',
11903
- type: 'number',
11904
- description: 'Override WebDriverAgent port for iOS environments.'
11905
- },
11906
- 'ios.wda-host': {
11907
- alias: 'ios.wdaHost',
11908
- type: 'string',
11909
- description: 'Override WebDriverAgent host for iOS environments.'
11910
11879
  }
11911
- }).version('version', 'Show version number', "0.30.10").help().wrap(yargs().terminalWidth());
11880
+ }).version('version', 'Show version number', "0.30.11-beta-20251218071621.0").help().epilogue(`For complete list of configuration options, please visit:
11881
+ • Web options: https://midscenejs.com/automate-with-scripts-in-yaml#the-web-part
11882
+ • Android options: https://midscenejs.com/automate-with-scripts-in-yaml#the-android-part
11883
+ • iOS options: https://midscenejs.com/automate-with-scripts-in-yaml#the-ios-part
11884
+
11885
+ Examples:
11886
+ $0 script.yaml --web.user-agent "Custom Agent" --web.viewport-width 1920
11887
+ $0 script.yaml --android.device-id emulator-5554 --android.ime-strategy yadb-for-non-ascii
11888
+ $0 script.yaml --ios.wda-port 8100 --ios.auto-dismiss-keyboard`).wrap(yargs().terminalWidth());
11912
11889
  const argv = await args.argv;
11913
11890
  cli_utils_debug('argv', argv);
11914
11891
  const transformedArgv = {
11915
11892
  ...argv
11916
11893
  };
11917
- if (argv['web.user-agent']) {
11918
- transformedArgv.web = transformedArgv.web || {};
11919
- transformedArgv.web.userAgent = argv['web.user-agent'];
11920
- }
11921
- if (argv['web.viewport-width']) {
11922
- transformedArgv.web = transformedArgv.web || {};
11923
- transformedArgv.web.viewportWidth = argv['web.viewport-width'];
11924
- }
11925
- if (argv['web.viewport-height']) {
11926
- transformedArgv.web = transformedArgv.web || {};
11927
- transformedArgv.web.viewportHeight = argv['web.viewport-height'];
11928
- }
11929
- if (argv['android.device-id']) {
11930
- transformedArgv.android = transformedArgv.android || {};
11931
- transformedArgv.android.deviceId = argv['android.device-id'];
11932
- }
11933
- if (argv['ios.device-id']) {
11934
- transformedArgv.ios = transformedArgv.ios || {};
11935
- transformedArgv.ios.deviceId = argv['ios.device-id'];
11936
- }
11937
- if (argv['ios.wda-port']) {
11938
- transformedArgv.ios = transformedArgv.ios || {};
11939
- transformedArgv.ios.wdaPort = argv['ios.wda-port'];
11940
- }
11941
- if (argv['ios.wda-host']) {
11942
- transformedArgv.ios = transformedArgv.ios || {};
11943
- transformedArgv.ios.wdaHost = argv['ios.wda-host'];
11944
- }
11894
+ const ensureBothFormats = (obj)=>{
11895
+ const result = {};
11896
+ Object.keys(obj).forEach((key)=>{
11897
+ const camelKey = kebabToCamel(key);
11898
+ const kebabKey = camelToKebab(key);
11899
+ result[kebabKey] = obj[key];
11900
+ result[camelKey] = obj[key];
11901
+ });
11902
+ return result;
11903
+ };
11904
+ if (argv.web && 'object' == typeof argv.web) transformedArgv.web = ensureBothFormats(argv.web);
11905
+ if (argv.android && 'object' == typeof argv.android) transformedArgv.android = ensureBothFormats(argv.android);
11906
+ if (argv.ios && 'object' == typeof argv.ios) transformedArgv.ios = ensureBothFormats(argv.ios);
11945
11907
  return {
11946
11908
  path: argv._[0],
11947
11909
  files: argv.files,
@@ -11949,7 +11911,7 @@ Usage:
11949
11911
  };
11950
11912
  };
11951
11913
  async function matchYamlFiles(fileGlob, options) {
11952
- if ((0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(fileGlob) && (0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.statSync)(fileGlob).isDirectory()) fileGlob = join(fileGlob, '**/*.{yml,yaml}');
11914
+ if ((0, __rspack_external_node_fs_5ea92f0c.existsSync)(fileGlob) && (0, __rspack_external_node_fs_5ea92f0c.statSync)(fileGlob).isDirectory()) fileGlob = join(fileGlob, '**/*.{yml,yaml}');
11953
11915
  const { cwd } = options || {};
11954
11916
  const ignore = [
11955
11917
  '**/node_modules/**'
@@ -11965,7 +11927,7 @@ Usage:
11965
11927
  }
11966
11928
  Promise.resolve((async ()=>{
11967
11929
  const { options, path, files: cmdFiles } = await parseProcessArgs();
11968
- const welcome = `\nWelcome to @midscene/cli v${package_namespaceObject.i8}\n`;
11930
+ const welcome = `\nWelcome to @midscene/cli v${package_namespaceObject.rE}\n`;
11969
11931
  console.log(welcome);
11970
11932
  if (options.url) {
11971
11933
  console.error("the cli mode is no longer supported, please use yaml file instead. See https://midscenejs.com/automate-with-scripts-in-yaml for more information. Sorry for the inconvenience.");
@@ -12010,7 +11972,7 @@ Usage:
12010
11972
  process.exit(1);
12011
11973
  }
12012
11974
  const dotEnvConfigFile = join(process.cwd(), '.env');
12013
- if ((0, __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.existsSync)(dotEnvConfigFile)) {
11975
+ if ((0, __rspack_external_node_fs_5ea92f0c.existsSync)(dotEnvConfigFile)) {
12014
11976
  console.log(` Env file: ${dotEnvConfigFile}`);
12015
11977
  main_default().config({
12016
11978
  path: dotEnvConfigFile,
@@ -12033,28 +11995,28 @@ Usage:
12033
11995
  process.exit(1);
12034
11996
  }));
12035
11997
  },
12036
- assert: function(module) {
12037
- module.exports = __WEBPACK_EXTERNAL_MODULE_assert__;
11998
+ assert (module) {
11999
+ module.exports = __rspack_external_assert;
12038
12000
  },
12039
- crypto: function(module) {
12040
- module.exports = __WEBPACK_EXTERNAL_MODULE_crypto__;
12001
+ crypto (module) {
12002
+ module.exports = __rspack_external_crypto;
12041
12003
  },
12042
- fs: function(module) {
12043
- module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;
12004
+ fs (module) {
12005
+ module.exports = __rspack_external_fs;
12044
12006
  },
12045
- os: function(module) {
12046
- module.exports = __WEBPACK_EXTERNAL_MODULE_os__;
12007
+ os (module) {
12008
+ module.exports = __rspack_external_os;
12047
12009
  },
12048
- path: function(module) {
12049
- module.exports = __WEBPACK_EXTERNAL_MODULE_path__;
12010
+ path (module) {
12011
+ module.exports = __rspack_external_path;
12050
12012
  },
12051
- tty: function(module) {
12052
- module.exports = __WEBPACK_EXTERNAL_MODULE_tty__;
12013
+ tty (module) {
12014
+ module.exports = __rspack_external_tty;
12053
12015
  },
12054
- util: function(module) {
12055
- module.exports = __WEBPACK_EXTERNAL_MODULE_util__;
12016
+ util (module) {
12017
+ module.exports = __rspack_external_util;
12056
12018
  },
12057
- "../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/build/index.cjs": function(module, __unused_webpack_exports, __webpack_require__) {
12019
+ "../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/build/index.cjs" (module, __unused_rspack_exports, __webpack_require__) {
12058
12020
  const align = {
12059
12021
  right: alignRight,
12060
12022
  center: alignCenter
@@ -12274,7 +12236,7 @@ Usage:
12274
12236
  }
12275
12237
  module.exports = ui;
12276
12238
  },
12277
- "../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/index.cjs": function(module, __unused_webpack_exports, __webpack_require__) {
12239
+ "../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/index.cjs" (module, __unused_rspack_exports, __webpack_require__) {
12278
12240
  var fs = __webpack_require__("fs");
12279
12241
  var util = __webpack_require__("util");
12280
12242
  var path = __webpack_require__("path");
@@ -12431,7 +12393,7 @@ Usage:
12431
12393
  const y18n = (opts)=>y18n$1(opts, nodePlatformShim);
12432
12394
  module.exports = y18n;
12433
12395
  },
12434
- "../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs": function(module, __unused_webpack_exports, __webpack_require__) {
12396
+ "../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/index.cjs" (module, __unused_rspack_exports, __webpack_require__) {
12435
12397
  var util = __webpack_require__("util");
12436
12398
  var path = __webpack_require__("path");
12437
12399
  __webpack_require__("fs");
@@ -13239,7 +13201,7 @@ Usage:
13239
13201
  yargsParser.looksLikeNumber = looksLikeNumber;
13240
13202
  module.exports = yargsParser;
13241
13203
  },
13242
- "../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/index.cjs": function(module, __unused_webpack_exports, __webpack_require__) {
13204
+ "../../node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/build/index.cjs" (module, __unused_rspack_exports, __webpack_require__) {
13243
13205
  var t1 = __webpack_require__("assert");
13244
13206
  class e1 extends Error {
13245
13207
  constructor(t1){
@@ -15323,7 +15285,7 @@ Usage:
15323
15285
  };
15324
15286
  module.exports = ue;
15325
15287
  },
15326
- "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json": function(module) {
15288
+ "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json" (module) {
15327
15289
  module.exports = JSON.parse('{"name":"dotenv","version":"16.4.5","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}');
15328
15290
  }
15329
15291
  };