appium-xcuitest-driver 7.34.1 → 7.34.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [7.34.2](https://github.com/appium/appium-xcuitest-driver/compare/v7.34.1...v7.34.2) (2024-12-19)
2
+
3
+ ### Bug Fixes
4
+
5
+ * Adjust log level for BiDi events ([#2505](https://github.com/appium/appium-xcuitest-driver/issues/2505)) ([1a73fcd](https://github.com/appium/appium-xcuitest-driver/commit/1a73fcd0c879f2bb70e0c431e110c8d601ff754d))
6
+
1
7
  ## [7.34.1](https://github.com/appium/appium-xcuitest-driver/compare/v7.34.0...v7.34.1) (2024-12-14)
2
8
 
3
9
  ### Miscellaneous Chores
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bidi/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAYzC,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,wBAE1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,gBAAiB,MAAM,wBAElE,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAczG"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bidi/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAgB,MAAM,SAAS,CAAC;AAGrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAazC,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,wBAE1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,gBAAiB,MAAM,wBAElE,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAczG"}
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.makeObsoleteContextUpdatedEvent = exports.makeContextUpdatedEvent = void 0;
4
7
  exports.makeLogEntryAddedEvent = makeLogEntryAddedEvent;
5
8
  const utils_1 = require("../../utils");
6
9
  const constants_1 = require("./constants");
10
+ const lodash_1 = __importDefault(require("lodash"));
7
11
  function toContextUpdatedEvent(method, contextName) {
8
12
  return {
9
13
  method,
@@ -26,7 +30,7 @@ function makeLogEntryAddedEvent(entry, context, type) {
26
30
  method: constants_1.LOG_ENTRY_ADDED_EVENT,
27
31
  params: {
28
32
  type,
29
- level: entry.level,
33
+ level: adjustLogLevel(entry.level),
30
34
  source: {
31
35
  realm: '',
32
36
  },
@@ -35,4 +39,16 @@ function makeLogEntryAddedEvent(entry, context, type) {
35
39
  },
36
40
  };
37
41
  }
42
+ function adjustLogLevel(originalLevel) {
43
+ const originalLevelLc = lodash_1.default.toLower(originalLevel);
44
+ switch (originalLevelLc) {
45
+ case 'debug':
46
+ case 'info':
47
+ case 'warn':
48
+ case 'error':
49
+ return originalLevelLc;
50
+ default:
51
+ return 'info';
52
+ }
53
+ }
38
54
  //# sourceMappingURL=models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../lib/commands/bidi/models.ts"],"names":[],"mappings":";;;AA0BA,wDAcC;AAvCD,uCAAyC;AACzC,2CAA2G;AAG3G,SAAS,qBAAqB,CAAC,MAAc,EAAE,WAAmB;IAChE,OAAO;QACL,MAAM;QACN,MAAM,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AAuB,2BAElC;AAEF;;GAEG;AACI,MAAM,+BAA+B,GAAG,CAAC,WAAmB,EAAE,EAAE,CAAC,qBAAqB,CAC3F,0CAA8B,EAAE,WAAW,CAC5C,CAAC;AAFW,QAAA,+BAA+B,mCAE1C;AAEF,SAAgB,sBAAsB,CAAC,KAAe,EAAE,OAAe,EAAE,IAAY;IACnF,OAAO;QACL,OAAO;QACP,MAAM,EAAE,iCAAqB;QAC7B,MAAM,EAAE;YACN,IAAI;YACJ,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC;YAClC,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;YACD,IAAI,EAAE,KAAK,CAAC,OAAO;YACnB,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B;KACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,aAAqB;IAC3C,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACjD,QAAQ,eAAe,EAAE,CAAC;QACxB,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,eAA+B,CAAC;QACzC;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -5,9 +5,10 @@ interface BiDiEvent<TParams> {
5
5
  interface LogEntrySource {
6
6
  realm: string;
7
7
  }
8
+ export type BiDiLogLevel = 'debug' | 'info' | 'warn' | 'error';
8
9
  interface LogEntryAddedEventParams {
9
10
  type: string;
10
- level: string;
11
+ level: BiDiLogLevel;
11
12
  source: LogEntrySource;
12
13
  text: string;
13
14
  timestamp: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../lib/commands/bidi/types.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS,CAAC,OAAO;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU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1,8 @@
1
- import type { LogEntryAddedEvent, ContextUpdatedEvent } from './types';
1
+ import type { LogEntryAddedEvent, ContextUpdatedEvent, BiDiLogLevel } from './types';
2
2
  import { NATIVE_WIN } from '../../utils';
3
3
  import { CONTEXT_UPDATED_EVENT, CONTEXT_UPDATED_EVENT_OBSOLETE, LOG_ENTRY_ADDED_EVENT } from './constants';
4
4
  import type { LogEntry } from '../types';
5
+ import _ from 'lodash';
5
6
 
6
7
  function toContextUpdatedEvent(method: string, contextName: string): ContextUpdatedEvent {
7
8
  return {
@@ -30,7 +31,7 @@ export function makeLogEntryAddedEvent(entry: LogEntry, context: string, type: s
30
31
  method: LOG_ENTRY_ADDED_EVENT,
31
32
  params: {
32
33
  type,
33
- level: entry.level,
34
+ level: adjustLogLevel(entry.level),
34
35
  source: {
35
36
  realm: '',
36
37
  },
@@ -39,3 +40,16 @@ export function makeLogEntryAddedEvent(entry: LogEntry, context: string, type: s
39
40
  },
40
41
  };
41
42
  }
43
+
44
+ function adjustLogLevel(originalLevel: string): BiDiLogLevel {
45
+ const originalLevelLc = _.toLower(originalLevel);
46
+ switch (originalLevelLc) {
47
+ case 'debug':
48
+ case 'info':
49
+ case 'warn':
50
+ case 'error':
51
+ return originalLevelLc as BiDiLogLevel;
52
+ default:
53
+ return 'info';
54
+ }
55
+ }
@@ -7,9 +7,11 @@ interface LogEntrySource {
7
7
  realm: string;
8
8
  }
9
9
 
10
+ export type BiDiLogLevel = 'debug' | 'info' | 'warn' | 'error';
11
+
10
12
  interface LogEntryAddedEventParams {
11
13
  type: string;
12
- level: string;
14
+ level: BiDiLogLevel;
13
15
  source: LogEntrySource;
14
16
  text: string;
15
17
  timestamp: number;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "appium-xcuitest-driver",
3
- "version": "7.34.1",
3
+ "version": "7.34.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-xcuitest-driver",
9
- "version": "7.34.1",
9
+ "version": "7.34.2",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@colors/colors": "^1.6.0",
@@ -1256,24 +1256,6 @@
1256
1256
  "node": ">= 0.8"
1257
1257
  }
1258
1258
  },
1259
- "node_modules/call-bind": {
1260
- "version": "1.0.8",
1261
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
1262
- "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
1263
- "license": "MIT",
1264
- "dependencies": {
1265
- "call-bind-apply-helpers": "^1.0.0",
1266
- "es-define-property": "^1.0.0",
1267
- "get-intrinsic": "^1.2.4",
1268
- "set-function-length": "^1.2.2"
1269
- },
1270
- "engines": {
1271
- "node": ">= 0.4"
1272
- },
1273
- "funding": {
1274
- "url": "https://github.com/sponsors/ljharb"
1275
- }
1276
- },
1277
1259
  "node_modules/call-bind-apply-helpers": {
1278
1260
  "version": "1.0.1",
1279
1261
  "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz",
@@ -1288,13 +1270,13 @@
1288
1270
  }
1289
1271
  },
1290
1272
  "node_modules/call-bound": {
1291
- "version": "1.0.2",
1292
- "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz",
1293
- "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==",
1273
+ "version": "1.0.3",
1274
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
1275
+ "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
1294
1276
  "license": "MIT",
1295
1277
  "dependencies": {
1296
- "call-bind": "^1.0.8",
1297
- "get-intrinsic": "^1.2.5"
1278
+ "call-bind-apply-helpers": "^1.0.1",
1279
+ "get-intrinsic": "^1.2.6"
1298
1280
  },
1299
1281
  "engines": {
1300
1282
  "node": ">= 0.4"
@@ -1598,23 +1580,6 @@
1598
1580
  }
1599
1581
  }
1600
1582
  },
1601
- "node_modules/define-data-property": {
1602
- "version": "1.1.4",
1603
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
1604
- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
1605
- "license": "MIT",
1606
- "dependencies": {
1607
- "es-define-property": "^1.0.0",
1608
- "es-errors": "^1.3.0",
1609
- "gopd": "^1.0.1"
1610
- },
1611
- "engines": {
1612
- "node": ">= 0.4"
1613
- },
1614
- "funding": {
1615
- "url": "https://github.com/sponsors/ljharb"
1616
- }
1617
- },
1618
1583
  "node_modules/delayed-stream": {
1619
1584
  "version": "1.0.0",
1620
1585
  "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -1670,12 +1635,12 @@
1670
1635
  }
1671
1636
  },
1672
1637
  "node_modules/dunder-proto": {
1673
- "version": "1.0.0",
1674
- "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz",
1675
- "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==",
1638
+ "version": "1.0.1",
1639
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
1640
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
1676
1641
  "license": "MIT",
1677
1642
  "dependencies": {
1678
- "call-bind-apply-helpers": "^1.0.0",
1643
+ "call-bind-apply-helpers": "^1.0.1",
1679
1644
  "es-errors": "^1.3.0",
1680
1645
  "gopd": "^1.2.0"
1681
1646
  },
@@ -2147,18 +2112,6 @@
2147
2112
  "node": ">=8"
2148
2113
  }
2149
2114
  },
2150
- "node_modules/has-property-descriptors": {
2151
- "version": "1.0.2",
2152
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
2153
- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
2154
- "license": "MIT",
2155
- "dependencies": {
2156
- "es-define-property": "^1.0.0"
2157
- },
2158
- "funding": {
2159
- "url": "https://github.com/sponsors/ljharb"
2160
- }
2161
- },
2162
2115
  "node_modules/has-symbols": {
2163
2116
  "version": "1.1.0",
2164
2117
  "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
@@ -2624,9 +2577,9 @@
2624
2577
  "license": "ISC"
2625
2578
  },
2626
2579
  "node_modules/math-intrinsics": {
2627
- "version": "1.0.0",
2628
- "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz",
2629
- "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==",
2580
+ "version": "1.1.0",
2581
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
2582
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
2630
2583
  "license": "MIT",
2631
2584
  "engines": {
2632
2585
  "node": ">= 0.4"
@@ -3634,23 +3587,6 @@
3634
3587
  "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
3635
3588
  "license": "ISC"
3636
3589
  },
3637
- "node_modules/set-function-length": {
3638
- "version": "1.2.2",
3639
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
3640
- "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
3641
- "license": "MIT",
3642
- "dependencies": {
3643
- "define-data-property": "^1.1.4",
3644
- "es-errors": "^1.3.0",
3645
- "function-bind": "^1.1.2",
3646
- "get-intrinsic": "^1.2.4",
3647
- "gopd": "^1.0.1",
3648
- "has-property-descriptors": "^1.0.2"
3649
- },
3650
- "engines": {
3651
- "node": ">= 0.4"
3652
- }
3653
- },
3654
3590
  "node_modules/setprototypeof": {
3655
3591
  "version": "1.2.0",
3656
3592
  "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "xcuitest",
9
9
  "xctest"
10
10
  ],
11
- "version": "7.34.1",
11
+ "version": "7.34.2",
12
12
  "author": "Appium Contributors",
13
13
  "license": "Apache-2.0",
14
14
  "repository": {