webdriver 9.12.1 → 9.12.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/build/environment.d.ts +1 -1
- package/build/environment.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/node/bidi.d.ts +3 -3
- package/build/node/bidi.d.ts.map +1 -1
- package/build/node.js +12 -8
- package/package.json +6 -6
package/build/environment.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface EnvironmentVariables {
|
|
|
12
12
|
export interface EnvironmentDependencies {
|
|
13
13
|
Request: typeof FetchRequest;
|
|
14
14
|
Socket: typeof BrowserSocket;
|
|
15
|
-
createBidiConnection: (wsUrl?: string, options?:
|
|
15
|
+
createBidiConnection: (wsUrl?: string, options?: WebSocket.ClientOptions) => Promise<WebSocket | undefined>;
|
|
16
16
|
variables: EnvironmentVariables;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,IAAI,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,MAAM,SAAwD,CAAA;AAE3E,MAAM,WAAW,oBAAoB;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,OAAO,YAAY,CAAC;IAC7B,MAAM,EAAE,OAAO,aAAa,CAAC;IAC7B,oBAAoB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,IAAI,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,MAAM,SAAwD,CAAA;AAE3E,MAAM,WAAW,oBAAoB;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,OAAO,YAAY,CAAC;IAC7B,MAAM,EAAE,OAAO,aAAa,CAAC;IAC7B,oBAAoB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,aAAa,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAC5G,SAAS,EAAE,oBAAoB,CAAA;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE;IACtB,KAAK,EAAE,uBAAuB,CAAC;CAgBlC,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1643,7 +1643,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1643
1643
|
// package.json
|
|
1644
1644
|
var package_default = {
|
|
1645
1645
|
name: "webdriver",
|
|
1646
|
-
version: "9.
|
|
1646
|
+
version: "9.12.1",
|
|
1647
1647
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1648
1648
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1649
1649
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
package/build/node/bidi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import WebSocket from 'ws';
|
|
2
|
-
export declare function createBidiConnection(webSocketUrl: string, options?:
|
|
1
|
+
import WebSocket, { type ClientOptions } from 'ws';
|
|
2
|
+
export declare function createBidiConnection(webSocketUrl: string, options?: ClientOptions): Promise<WebSocket | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* Resolve hostnames to IPv4 and IPv6 addresses
|
|
5
5
|
* @returns list of websocket urls to try
|
|
@@ -11,5 +11,5 @@ export declare function listWebsocketCandidateUrls(webSocketUrl: string): Promis
|
|
|
11
11
|
* @param candidateUrls - list of websocket urls to try
|
|
12
12
|
* @returns true if the connection was successful
|
|
13
13
|
*/
|
|
14
|
-
export declare function connectWebsocket(candidateUrls: string[],
|
|
14
|
+
export declare function connectWebsocket(candidateUrls: string[], options?: ClientOptions): Promise<WebSocket | undefined>;
|
|
15
15
|
//# sourceMappingURL=bidi.d.ts.map
|
package/build/node/bidi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../src/node/bidi.ts"],"names":[],"mappings":"AAMA,OAAO,SAAS,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../src/node/bidi.ts"],"names":[],"mappings":"AAMA,OAAO,SAAS,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,IAAI,CAAA;AAKlD,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAGxH;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAqBxF;AAcD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAkDvH"}
|
package/build/node.js
CHANGED
|
@@ -1575,7 +1575,7 @@ var WebDriverResponseError = class _WebDriverResponseError extends WebDriverErro
|
|
|
1575
1575
|
// package.json
|
|
1576
1576
|
var package_default = {
|
|
1577
1577
|
name: "webdriver",
|
|
1578
|
-
version: "9.
|
|
1578
|
+
version: "9.12.1",
|
|
1579
1579
|
description: "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
1580
1580
|
author: "Christian Bromann <mail@bromann.dev>",
|
|
1581
1581
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -1861,18 +1861,22 @@ async function listWebsocketCandidateUrls(webSocketUrl) {
|
|
|
1861
1861
|
if (isIP(parsedUrl.hostname)) {
|
|
1862
1862
|
return candidateUrls;
|
|
1863
1863
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1864
|
+
try {
|
|
1865
|
+
const candidateIps = await dns2.lookup(parsedUrl.hostname, { family: 0, all: true });
|
|
1866
|
+
if (candidateIps.length > 1) {
|
|
1867
|
+
const hostnameMapper = (result) => webSocketUrl.replace(parsedUrl.hostname, result.address);
|
|
1868
|
+
candidateUrls.push(...candidateIps.map(hostnameMapper));
|
|
1869
|
+
}
|
|
1870
|
+
} catch (error) {
|
|
1871
|
+
log6.error(`Could not resolve hostname ${parsedUrl.hostname}: ${error}`);
|
|
1868
1872
|
}
|
|
1869
1873
|
return candidateUrls;
|
|
1870
1874
|
}
|
|
1871
|
-
async function connectWebsocket(candidateUrls,
|
|
1875
|
+
async function connectWebsocket(candidateUrls, options) {
|
|
1872
1876
|
const websockets = candidateUrls.map((candidateUrl) => {
|
|
1873
1877
|
log6.debug(`Attempt to connect to webSocketUrl ${candidateUrl}`);
|
|
1874
1878
|
try {
|
|
1875
|
-
const ws2 = new WebSocket(candidateUrl);
|
|
1879
|
+
const ws2 = new WebSocket(candidateUrl, options);
|
|
1876
1880
|
return ws2;
|
|
1877
1881
|
} catch {
|
|
1878
1882
|
return void 0;
|
|
@@ -1898,7 +1902,7 @@ async function connectWebsocket(candidateUrls, _) {
|
|
|
1898
1902
|
firstResolved(wsConnectPromises),
|
|
1899
1903
|
connectionTimeoutPromise
|
|
1900
1904
|
]);
|
|
1901
|
-
const socketsToCleanup = wsInfo ? websockets.filter((
|
|
1905
|
+
const socketsToCleanup = wsInfo ? websockets.filter((_, index) => wsInfo.index !== index) : websockets;
|
|
1902
1906
|
for (const socket of socketsToCleanup) {
|
|
1903
1907
|
socket.removeAllListeners();
|
|
1904
1908
|
if (socket.readyState === WebSocket.OPEN || socket.readyState === WebSocket.CLOSING) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webdriver",
|
|
3
|
-
"version": "9.12.
|
|
3
|
+
"version": "9.12.2",
|
|
4
4
|
"description": "A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/node": "^20.1.0",
|
|
40
40
|
"@types/ws": "^8.5.3",
|
|
41
|
-
"@wdio/config": "9.12.
|
|
41
|
+
"@wdio/config": "9.12.2",
|
|
42
42
|
"@wdio/logger": "9.4.4",
|
|
43
|
-
"@wdio/protocols": "9.
|
|
44
|
-
"@wdio/types": "9.
|
|
45
|
-
"@wdio/utils": "9.12.
|
|
43
|
+
"@wdio/protocols": "9.12.2",
|
|
44
|
+
"@wdio/types": "9.12.2",
|
|
45
|
+
"@wdio/utils": "9.12.2",
|
|
46
46
|
"deepmerge-ts": "^7.0.3",
|
|
47
47
|
"undici": "^6.20.1",
|
|
48
48
|
"ws": "^8.8.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "dc30cc8863706e3522c78ebb75b0c4a44746aa5b"
|
|
51
51
|
}
|