@wdio/utils
Advanced tools
Comparing version 8.22.0 to 8.23.0
@@ -1,2 +0,1 @@ | ||
import { EventEmitter } from 'node:events'; | ||
interface PropertiesObject { | ||
@@ -6,5 +5,3 @@ [key: string | symbol]: PropertyDescriptor; | ||
export default function WebDriver(options: Record<string, any>, modifier?: Function, propertiesObject?: PropertiesObject): { | ||
(this: void, sessionId: string, commandWrapper?: Function, eventMiddleware?: { | ||
socket: Partial<EventEmitter>; | ||
}): any; | ||
(this: void, sessionId: string, commandWrapper?: Function): any; | ||
/** | ||
@@ -11,0 +8,0 @@ * Enhance monad prototype with function |
@@ -23,6 +23,3 @@ import { EventEmitter } from 'node:events'; | ||
*/ | ||
function unit(sessionId, commandWrapper, eventMiddleware) { | ||
if (eventMiddleware) { | ||
prototype.eventMiddleware = eventMiddleware; | ||
} | ||
function unit(sessionId, commandWrapper) { | ||
/** | ||
@@ -172,7 +169,2 @@ * capabilities attached to the instance prototype not being shown if | ||
eventHandler[method]?.(...args); | ||
if (prototype.eventMiddleware) { | ||
if (typeof prototype.eventMiddleware[method] === 'function') { | ||
prototype.eventMiddleware.socket[method](...args); | ||
} | ||
} | ||
return this; | ||
@@ -179,0 +171,0 @@ }; |
@@ -101,4 +101,11 @@ import os from 'node:os'; | ||
*/ | ||
const _install = async (args) => { | ||
await install(args); | ||
const _install = async (args, retry = false) => { | ||
await install(args).catch((err) => { | ||
const error = `Failed downloading ${args.browser} v${args.buildId}: ${err.message}, retrying ...`; | ||
if (retry) { | ||
throw new Error(error); | ||
} | ||
log.error(error); | ||
return _install(args, true); | ||
}); | ||
log.progress(''); | ||
@@ -105,0 +112,0 @@ }; |
{ | ||
"name": "@wdio/utils", | ||
"version": "8.22.0", | ||
"version": "8.23.0", | ||
"description": "A WDIO helper utility to provide several utility functions used across the project.", | ||
@@ -42,3 +42,3 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@wdio/logger": "8.16.17", | ||
"@wdio/types": "8.21.0", | ||
"@wdio/types": "8.23.0", | ||
"decamelize": "^6.0.0", | ||
@@ -59,3 +59,3 @@ "deepmerge-ts": "^5.1.0", | ||
}, | ||
"gitHead": "81496a30b1c50e7d4129be6997f1a557f9659224" | ||
"gitHead": "b17ce5f554deb8588cc156ad9676bd4bd13defe7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157369
3250
+ Added@wdio/types@8.23.0(transitive)
- Removed@wdio/types@8.21.0(transitive)
Updated@wdio/types@8.23.0