@midscene/shared 1.15.4 → 1.15.5

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.
@@ -11,10 +11,11 @@ function walkCliArgs(args, setArgValue) {
11
11
  if (eqIdx >= 0) {
12
12
  const key = body.slice(0, eqIdx);
13
13
  setArgValue(key, body.slice(eqIdx + 1));
14
- } else if (args[i + 1] && !args[i + 1].startsWith('--')) {
14
+ } else if (void 0 === args[i + 1] || args[i + 1].startsWith('--')) setArgValue(body, true);
15
+ else {
15
16
  i++;
16
17
  setArgValue(body, args[i]);
17
- } else setArgValue(body, true);
18
+ }
18
19
  }
19
20
  }
20
21
  function buildCliFieldIndex(def) {
@@ -5,7 +5,7 @@ import { assert } from "../utils.mjs";
5
5
  import { maskConfig, parseJson } from "./helper.mjs";
6
6
  import { initDebugConfig } from "./init-debug.mjs";
7
7
  const MODEL_CONFIG_DOC_URL = 'https://midscenejs.com/model-common-config.html';
8
- const getCurrentVersion = ()=>"1.15.4";
8
+ const getCurrentVersion = ()=>"1.15.5";
9
9
  const getInvalidModelFamilyMessage = (modelFamily)=>`Invalid MIDSCENE_MODEL_FAMILY value: ${modelFamily}. Current version v${getCurrentVersion()} accepts the following model families: ${MODEL_FAMILY_VALUES.join(', ')}. You can also visit ${MODEL_CONFIG_DOC_URL} for the latest configuration information.`;
10
10
  const KEYS_MAP = {
11
11
  insight: INSIGHT_MODEL_CONFIG_KEYS,
@@ -43,10 +43,11 @@ function walkCliArgs(args, setArgValue) {
43
43
  if (eqIdx >= 0) {
44
44
  const key = body.slice(0, eqIdx);
45
45
  setArgValue(key, body.slice(eqIdx + 1));
46
- } else if (args[i + 1] && !args[i + 1].startsWith('--')) {
46
+ } else if (void 0 === args[i + 1] || args[i + 1].startsWith('--')) setArgValue(body, true);
47
+ else {
47
48
  i++;
48
49
  setArgValue(body, args[i]);
49
- } else setArgValue(body, true);
50
+ }
50
51
  }
51
52
  }
52
53
  function buildCliFieldIndex(def) {
@@ -37,7 +37,7 @@ const external_utils_js_namespaceObject = require("../utils.js");
37
37
  const external_helper_js_namespaceObject = require("./helper.js");
38
38
  const external_init_debug_js_namespaceObject = require("./init-debug.js");
39
39
  const MODEL_CONFIG_DOC_URL = 'https://midscenejs.com/model-common-config.html';
40
- const getCurrentVersion = ()=>"1.15.4";
40
+ const getCurrentVersion = ()=>"1.15.5";
41
41
  const getInvalidModelFamilyMessage = (modelFamily)=>`Invalid MIDSCENE_MODEL_FAMILY value: ${modelFamily}. Current version v${getCurrentVersion()} accepts the following model families: ${external_types_js_namespaceObject.MODEL_FAMILY_VALUES.join(', ')}. You can also visit ${MODEL_CONFIG_DOC_URL} for the latest configuration information.`;
42
42
  const KEYS_MAP = {
43
43
  insight: external_constants_js_namespaceObject.INSIGHT_MODEL_CONFIG_KEYS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/shared",
3
- "version": "1.15.4",
3
+ "version": "1.15.5",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
@@ -19,7 +19,7 @@ function walkCliArgs(
19
19
  if (eqIdx >= 0) {
20
20
  const key = body.slice(0, eqIdx);
21
21
  setArgValue(key, body.slice(eqIdx + 1));
22
- } else if (args[i + 1] && !args[i + 1].startsWith('--')) {
22
+ } else if (args[i + 1] !== undefined && !args[i + 1].startsWith('--')) {
23
23
  i++;
24
24
  setArgValue(body, args[i]);
25
25
  } else {