@wdio/utils 8.22.0 → 8.23.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/build/monad.d.ts CHANGED
@@ -1,11 +1,8 @@
1
- import { EventEmitter } from 'node:events';
2
1
  interface PropertiesObject {
3
2
  [key: string | symbol]: PropertyDescriptor;
4
3
  }
5
4
  export default function WebDriver(options: Record<string, any>, modifier?: Function, propertiesObject?: PropertiesObject): {
6
- (this: void, sessionId: string, commandWrapper?: Function, eventMiddleware?: {
7
- socket: Partial<EventEmitter>;
8
- }): any;
5
+ (this: void, sessionId: string, commandWrapper?: Function): any;
9
6
  /**
10
7
  * Enhance monad prototype with function
11
8
  * @param {string} name name of function to attach to prototype
@@ -1 +1 @@
1
- {"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAU1C,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAkBpG,IAAI,aAAa,MAAM,mBAAmB,QAAQ,oBAAoB;QAAE,MAAM,EAAE,QAAQ,YAAY,CAAC,CAAA;KAAE;IAmH5H;;;;;;OAMG;eACyB,MAAM,QAAQ,QAAQ,SAAS,OAAO,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EAmDzG"}
1
+ {"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAYA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAkBpG,IAAI,aAAa,MAAM,mBAAmB,QAAQ;IA+GvE;;;;;;OAMG;eACyB,MAAM,QAAQ,QAAQ,SAAS,OAAO,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EA6CzG"}
package/build/monad.js CHANGED
@@ -20,10 +20,7 @@ export default function WebDriver(options, modifier, propertiesObject = {}) {
20
20
  /**
21
21
  * WebDriver monad
22
22
  */
23
- function unit(sessionId, commandWrapper, eventMiddleware) {
24
- if (eventMiddleware) {
25
- prototype.eventMiddleware = eventMiddleware;
26
- }
23
+ function unit(sessionId, commandWrapper) {
27
24
  /**
28
25
  * capabilities attached to the instance prototype not being shown if
29
26
  * logging the instance
@@ -168,11 +165,6 @@ export default function WebDriver(options, modifier, propertiesObject = {}) {
168
165
  prototype[eventCommand] = function (...args) {
169
166
  const method = eventCommand;
170
167
  eventHandler[method]?.(...args);
171
- if (prototype.eventMiddleware) {
172
- if (typeof prototype.eventMiddleware[method] === 'function') {
173
- prototype.eventMiddleware.socket[method](...args);
174
- }
175
- }
176
168
  return this;
177
169
  };
178
170
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAK1C;;;;GAIG;AACH,eAAO,MAAM,SAAS,UAAW,MAAM,YAWtC,CAAA;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,oBAAoB,YAYvD;AAED,wBAAgB,sBAAsB,CAAC,UAAU,CAAC,EAAE,MAAM,sBAqBzD;AAED,wBAAsB,uBAAuB,CAAC,WAAW,CAAC,EAAE,MAAM,+BAiBjE;AAGD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,IAAI,EAAE,WAAW,CAAC,YAAY;;;;;;GA2G3F;AAED,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,WAAW,CAAC,YAAY,oGAS/D;AAED,wBAAgB,WAAW,CAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,YAAY,UAGxG;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAC,MAAM,UAM3D;AAED,wBAAsB,iBAAiB,CAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;;GAgDhF;AAED,wBAAgB,gBAAgB,CAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,mBAEzE;AAED,wBAAgB,eAAe,CAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,mBAExE"}
@@ -98,8 +98,15 @@ export const downloadProgressCallback = (artifact, downloadedBytes, totalBytes)
98
98
  * @param {InstallOptions & { unpack?: true | undefined }} args - An object containing installation options and an optional `unpack` flag.
99
99
  * @returns {Promise<void>} A Promise that resolves once the package is installed and clear the progress log.
100
100
  */
101
- const _install = async (args) => {
102
- await install(args);
101
+ const _install = async (args, retry = false) => {
102
+ await install(args).catch((err) => {
103
+ const error = `Failed downloading ${args.browser} v${args.buildId}: ${err.message}, retrying ...`;
104
+ if (retry) {
105
+ throw new Error(error);
106
+ }
107
+ log.error(error);
108
+ return _install(args, true);
109
+ });
103
110
  log.progress('');
104
111
  };
105
112
  function locateChromeSafely() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/utils",
3
- "version": "8.22.0",
3
+ "version": "8.23.0",
4
4
  "description": "A WDIO helper utility to provide several utility functions used across the project.",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@puppeteer/browsers": "^1.6.0",
41
41
  "@wdio/logger": "8.16.17",
42
- "@wdio/types": "8.21.0",
42
+ "@wdio/types": "8.23.0",
43
43
  "decamelize": "^6.0.0",
44
44
  "deepmerge-ts": "^5.1.0",
45
45
  "edgedriver": "^5.3.5",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "81496a30b1c50e7d4129be6997f1a557f9659224"
58
+ "gitHead": "b17ce5f554deb8588cc156ad9676bd4bd13defe7"
59
59
  }