@wdio/utils 9.0.6 → 9.1.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/envDetector.d.ts +1 -1
- package/build/envDetector.d.ts.map +1 -1
- package/build/index.js +13 -4
- package/build/node.js +3 -1
- package/build/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/build/envDetector.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function isW3C(capabilities?: WebdriverIO.Capabilities): boolean;
|
|
|
10
10
|
* @param {object} capabilities session capabilities
|
|
11
11
|
* @return {Boolean} true if session has WebDriver Bidi support
|
|
12
12
|
*/
|
|
13
|
-
export declare function isBidi(capabilities
|
|
13
|
+
export declare function isBidi(requestedCapabilities: Capabilities.RequestedStandaloneCapabilities, capabilities: WebdriverIO.Capabilities): boolean;
|
|
14
14
|
/**
|
|
15
15
|
* returns information about the environment before the session is created
|
|
16
16
|
* @param {Object} capabilities caps provided by user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envDetector.d.ts","sourceRoot":"","sources":["../src/envDetector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"envDetector.d.ts","sourceRoot":"","sources":["../src/envDetector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAU/C;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,YAAY,WAqC5D;AAsJD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,qBAAqB,EAAE,YAAY,CAAC,+BAA+B,EAAE,YAAY,EAAE,WAAW,CAAC,YAAY,WAUjI;AAoCD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,WAAW,CAAC,YAAY;;;;;;;;;EAWrF;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,YAAY,EACZ,qBAAqB,EACxB,EAAE;IACC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC;IACvC,qBAAqB,EAAE,YAAY,CAAC,+BAA+B,CAAA;CACtE;;;;;;;;;;;EAaA"}
|
package/build/index.js
CHANGED
|
@@ -292,7 +292,9 @@ function isBase64(str) {
|
|
|
292
292
|
function isAppiumCapability(caps) {
|
|
293
293
|
return Boolean(
|
|
294
294
|
caps && // @ts-expect-error outdated jsonwp cap
|
|
295
|
-
(caps.automationName || caps["appium:automationName"] ||
|
|
295
|
+
(caps.automationName || caps["appium:automationName"] || // @ts-expect-error outdated jsonwp cap
|
|
296
|
+
caps.deviceName || caps["appium:deviceName"] || // @ts-expect-error outdated jsonwp cap
|
|
297
|
+
caps.appiumVersion || caps["appium:appiumVersion"])
|
|
296
298
|
);
|
|
297
299
|
}
|
|
298
300
|
function definesRemoteDriver(options) {
|
|
@@ -1713,6 +1715,7 @@ function addMochaCommands(origFn, newFn) {
|
|
|
1713
1715
|
|
|
1714
1716
|
// src/envDetector.ts
|
|
1715
1717
|
init_constants();
|
|
1718
|
+
var APPIUM_CAPABILITY_PREFIX = "appium:";
|
|
1716
1719
|
var MOBILE_BROWSER_NAMES = ["ipad", "iphone", "android"];
|
|
1717
1720
|
var MOBILE_CAPABILITIES = [
|
|
1718
1721
|
"appium-version",
|
|
@@ -1814,10 +1817,16 @@ function isSauce(capabilities) {
|
|
|
1814
1817
|
caps["sauce:options"] && caps["sauce:options"].extendedDebugging
|
|
1815
1818
|
);
|
|
1816
1819
|
}
|
|
1817
|
-
function
|
|
1820
|
+
function isAppiumCapability2(capabilityName) {
|
|
1821
|
+
return capabilityName.startsWith(APPIUM_CAPABILITY_PREFIX);
|
|
1822
|
+
}
|
|
1823
|
+
function isBidi(requestedCapabilities, capabilities) {
|
|
1818
1824
|
if (!capabilities) {
|
|
1819
1825
|
return false;
|
|
1820
1826
|
}
|
|
1827
|
+
if (Object.keys(requestedCapabilities).some(isAppiumCapability2)) {
|
|
1828
|
+
return false;
|
|
1829
|
+
}
|
|
1821
1830
|
return typeof capabilities.webSocketUrl === "string";
|
|
1822
1831
|
}
|
|
1823
1832
|
function isSeleniumStandalone(capabilities) {
|
|
@@ -1849,7 +1858,7 @@ function capabilitiesEnvironmentDetector(capabilities) {
|
|
|
1849
1858
|
isIOS: isIOS(capabilities),
|
|
1850
1859
|
isAndroid: isAndroid(capabilities),
|
|
1851
1860
|
isSauce: isSauce(capabilities),
|
|
1852
|
-
isBidi: isBidi(capabilities),
|
|
1861
|
+
isBidi: isBidi({}, capabilities),
|
|
1853
1862
|
isChromium: isChromium(capabilities)
|
|
1854
1863
|
};
|
|
1855
1864
|
}
|
|
@@ -1866,7 +1875,7 @@ function sessionEnvironmentDetector({
|
|
|
1866
1875
|
isAndroid: isAndroid(capabilities),
|
|
1867
1876
|
isSauce: isSauce(requestedCapabilities),
|
|
1868
1877
|
isSeleniumStandalone: isSeleniumStandalone(capabilities),
|
|
1869
|
-
isBidi: isBidi(capabilities),
|
|
1878
|
+
isBidi: isBidi(requestedCapabilities, capabilities),
|
|
1870
1879
|
isChromium: isChromium(capabilities)
|
|
1871
1880
|
};
|
|
1872
1881
|
}
|
package/build/node.js
CHANGED
|
@@ -258,7 +258,9 @@ var DEFAULT_PATH = "/";
|
|
|
258
258
|
function isAppiumCapability(caps) {
|
|
259
259
|
return Boolean(
|
|
260
260
|
caps && // @ts-expect-error outdated jsonwp cap
|
|
261
|
-
(caps.automationName || caps["appium:automationName"] ||
|
|
261
|
+
(caps.automationName || caps["appium:automationName"] || // @ts-expect-error outdated jsonwp cap
|
|
262
|
+
caps.deviceName || caps["appium:deviceName"] || // @ts-expect-error outdated jsonwp cap
|
|
263
|
+
caps.appiumVersion || caps["appium:appiumVersion"])
|
|
262
264
|
);
|
|
263
265
|
}
|
|
264
266
|
function definesRemoteDriver(options) {
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.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H,wBAAgB,eAAe,CAAE,EAAE,EAAE,QAAQ,WAE5C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAE,IAAI,EAAE,GAAG,EAAE,SAE1C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,WAenC;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,mCAAoD,CAAA;AAEtE;;;;;EAKE;AACF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,GAAG,OAAO,CAe1E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC,WAQ/H;AAED,wBAAgB,QAAQ,CAAE,WAAW,CAAC,EAAE,MAAM,WAE7C;AACD,wBAAgB,QAAQ,CAAE,WAAW,CAAC,EAAE,MAAM,WAE7C;AACD,wBAAgB,SAAS,CAAE,WAAW,CAAC,EAAE,MAAM,WAE9C;AACD,wBAAgB,MAAM,CAAE,WAAW,CAAC,EAAE,MAAM,WAE3C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,OAAO,CAGjI;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"types": "./build/index.d.ts",
|
|
20
20
|
"typeScriptVersion": "3.8.3",
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=18"
|
|
22
|
+
"node": ">=18.20.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@puppeteer/browsers": "^2.2.0",
|
|
40
|
-
"@wdio/logger": "9.0
|
|
41
|
-
"@wdio/types": "9.0
|
|
40
|
+
"@wdio/logger": "9.1.0",
|
|
41
|
+
"@wdio/types": "9.1.0",
|
|
42
42
|
"decamelize": "^6.0.0",
|
|
43
43
|
"deepmerge-ts": "^7.0.3",
|
|
44
44
|
"edgedriver": "^5.6.1",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "e6b005f5a150c335a105cfc2e386d43ac526adac"
|
|
57
57
|
}
|