@wdio/utils 8.24.12 → 8.26.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/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -1
- package/build/pIteration.d.ts +15 -15
- package/build/pIteration.d.ts.map +1 -1
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ import { startWebDriver } from './startWebDriver.js';
|
|
|
4
4
|
import { initializeWorkerService, initializeLauncherService } from './initializeServices.js';
|
|
5
5
|
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability } from './utils.js';
|
|
6
6
|
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js';
|
|
7
|
+
import * as asyncIterators from './pIteration.js';
|
|
7
8
|
import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';
|
|
8
9
|
import { isW3C, capabilitiesEnvironmentDetector, sessionEnvironmentDetector, devtoolsEnvironmentDetector } from './envDetector.js';
|
|
9
10
|
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js';
|
|
10
|
-
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability,
|
|
11
|
+
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, asyncIterators,
|
|
11
12
|
/**
|
|
12
13
|
* runner shim
|
|
13
14
|
*/
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,MAAM,YAAY,CAAA;AACvC,OAAO,gBAAgB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,WAAW,CAAA;AAC3E,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EACH,KAAK,EAAE,+BAA+B,EACtC,0BAA0B,EAAE,2BAA2B,EAC1D,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EACf,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,KAAK,EACL,kBAAkB,EAClB,cAAc;AAEd;;GAEG;AACH,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,oBAAoB;AAEpB;;GAEG;AACH,KAAK,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B;AAE3B;;GAEG;AACH,kBAAkB,EAClB,eAAe,EAClB,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -5,10 +5,11 @@ import { startWebDriver } from './startWebDriver.js';
|
|
|
5
5
|
import { initializeWorkerService, initializeLauncherService } from './initializeServices.js';
|
|
6
6
|
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability } from './utils.js';
|
|
7
7
|
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js';
|
|
8
|
+
import * as asyncIterators from './pIteration.js';
|
|
8
9
|
import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';
|
|
9
10
|
import { isW3C, capabilitiesEnvironmentDetector, sessionEnvironmentDetector, devtoolsEnvironmentDetector } from './envDetector.js';
|
|
10
11
|
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js';
|
|
11
|
-
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability,
|
|
12
|
+
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, asyncIterators,
|
|
12
13
|
/**
|
|
13
14
|
* runner shim
|
|
14
15
|
*/
|
package/build/pIteration.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
9
9
|
* @return {Promise} - Returns a Promise with undefined value.
|
|
10
10
|
*/
|
|
11
|
-
export declare const forEach: (array:
|
|
11
|
+
export declare const forEach: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<void>;
|
|
12
12
|
/**
|
|
13
13
|
* Same functionality as [`forEach()`](global.html#forEach), but runs only one callback at a time.
|
|
14
14
|
* @param {Array} array - Array to iterate over.
|
|
@@ -16,7 +16,7 @@ export declare const forEach: (array: unknown[], callback: Function, thisArg?: u
|
|
|
16
16
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
17
17
|
* @return {Promise} - Returns a Promise with undefined value.
|
|
18
18
|
*/
|
|
19
|
-
export declare const forEachSeries: (array:
|
|
19
|
+
export declare const forEachSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Implements ES5 [`Array#map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) method.<br><br>
|
|
22
22
|
* Creates a new array with the results of calling the provided callback once for each element.<br>
|
|
@@ -28,7 +28,7 @@ export declare const forEachSeries: (array: unknown[], callback: Function, thisA
|
|
|
28
28
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
29
29
|
* @return {Promise} - Returns a Promise with the resultant *Array* as value.
|
|
30
30
|
*/
|
|
31
|
-
export declare const map: (array:
|
|
31
|
+
export declare const map: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<any[]>;
|
|
32
32
|
/**
|
|
33
33
|
* Same functionality as [`map()`](global.html#map), but runs only one callback at a time.
|
|
34
34
|
* @param {Array} array - Array to iterate over.
|
|
@@ -36,7 +36,7 @@ export declare const map: (array: unknown[], callback: Function, thisArg?: unkno
|
|
|
36
36
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
37
37
|
* @return {Promise} - Returns a Promise with the resultant *Array* as value.
|
|
38
38
|
*/
|
|
39
|
-
export declare const mapSeries: (array:
|
|
39
|
+
export declare const mapSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<any[]>;
|
|
40
40
|
/**
|
|
41
41
|
* Implements ES5 [`Array#find()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) method.<br><br>
|
|
42
42
|
* Returns the value of the element that satisfies the provided `callback`. The value returned is the one found first.<br>
|
|
@@ -47,7 +47,7 @@ export declare const mapSeries: (array: unknown[], callback: Function, thisArg?:
|
|
|
47
47
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
48
48
|
* @return {Promise} - Returns a Promise with the element that passed the test as value, otherwise *undefined*.
|
|
49
49
|
*/
|
|
50
|
-
export declare const find: (array:
|
|
50
|
+
export declare const find: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<T | undefined>;
|
|
51
51
|
/**
|
|
52
52
|
* Same functionality as [`find()`](global.html#find), but runs only one callback at a time.
|
|
53
53
|
* @param {Array} array - Array to iterate over.
|
|
@@ -55,7 +55,7 @@ export declare const find: (array: unknown[], callback: Function, thisArg?: unkn
|
|
|
55
55
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
56
56
|
* @return {Promise} - Returns a Promise with the element that passed the test as value, otherwise *undefined*.
|
|
57
57
|
*/
|
|
58
|
-
export declare const findSeries: (array:
|
|
58
|
+
export declare const findSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<T | undefined>;
|
|
59
59
|
/**
|
|
60
60
|
* Implements ES5 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) method.<br><br>
|
|
61
61
|
* Returns the index of the element that satisfies the provided `callback`. The index returned is the one found first.<br>
|
|
@@ -66,7 +66,7 @@ export declare const findSeries: (array: unknown[], callback: Function, thisArg?
|
|
|
66
66
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
67
67
|
* @return {Promise} - Returns a Promise with the index that passed the test as value, otherwise *-1*.
|
|
68
68
|
*/
|
|
69
|
-
export declare const findIndex: (array:
|
|
69
|
+
export declare const findIndex: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<unknown>;
|
|
70
70
|
/**
|
|
71
71
|
* Same functionality as [`findIndex()`](global.html#findIndex), but runs only one callback at a time.
|
|
72
72
|
* @param {Array} array - Array to iterate over.
|
|
@@ -74,7 +74,7 @@ export declare const findIndex: (array: unknown[], callback: Function, thisArg?:
|
|
|
74
74
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
75
75
|
* @return {Promise} - Returns a Promise with the index that passed the test, otherwise *-1*.
|
|
76
76
|
*/
|
|
77
|
-
export declare const findIndexSeries: (array:
|
|
77
|
+
export declare const findIndexSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<number | undefined>;
|
|
78
78
|
/**
|
|
79
79
|
* Implements ES5 [`Array#some()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) method.<br><br>
|
|
80
80
|
* Test if some element in `array` passes the test implemented in `callback`.<br>
|
|
@@ -85,7 +85,7 @@ export declare const findIndexSeries: (array: unknown[], callback: Function, thi
|
|
|
85
85
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
86
86
|
* @return {Promise} - Returns a Promise with *true* as value if some element passed the test, otherwise *false*.
|
|
87
87
|
*/
|
|
88
|
-
export declare const some: (array:
|
|
88
|
+
export declare const some: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<unknown>;
|
|
89
89
|
/**
|
|
90
90
|
* Same functionality as [`some()`](global.html#some), but runs only one callback at a time.
|
|
91
91
|
* @param {Array} array - Array to iterate over.
|
|
@@ -93,7 +93,7 @@ export declare const some: (array: unknown[], callback: Function, thisArg?: unkn
|
|
|
93
93
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
94
94
|
* @return {Promise} - Returns a Promise with *true* as value if some element passed the test, otherwise *false*.
|
|
95
95
|
*/
|
|
96
|
-
export declare const someSeries: (array:
|
|
96
|
+
export declare const someSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<boolean>;
|
|
97
97
|
/**
|
|
98
98
|
* Implements ES5 [`Array#every()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) method.<br><br>
|
|
99
99
|
* Test if all elements in `array` pass the test implemented in `callback`.<br>
|
|
@@ -104,7 +104,7 @@ export declare const someSeries: (array: unknown[], callback: Function, thisArg?
|
|
|
104
104
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
105
105
|
* @return {Promise} - Returns a Promise with *true* as value if all elements passed the test, otherwise *false*.
|
|
106
106
|
*/
|
|
107
|
-
export declare const every: (array:
|
|
107
|
+
export declare const every: <T>(array: T[], callback: any, thisArg?: T | undefined) => Promise<boolean>;
|
|
108
108
|
/**
|
|
109
109
|
* Same functionality as [`every()`](global.html#every), but runs only one callback at a time.<br><br>
|
|
110
110
|
* @param {Array} array - Array to iterate over.
|
|
@@ -112,7 +112,7 @@ export declare const every: (array: unknown[], callback: Function, thisArg?: unk
|
|
|
112
112
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
113
113
|
* @return {Promise} - Returns a Promise with *true* as value if all elements passed the test, otherwise *false*.
|
|
114
114
|
*/
|
|
115
|
-
export declare const everySeries: (array:
|
|
115
|
+
export declare const everySeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<boolean>;
|
|
116
116
|
/**
|
|
117
117
|
* Implements ES5 [`Array#filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) method.<br><br>
|
|
118
118
|
* Creates a new array with the elements that passed the test implemented in `callback`.<br>
|
|
@@ -122,14 +122,14 @@ export declare const everySeries: (array: unknown[], callback: Function, thisArg
|
|
|
122
122
|
* @param {Object} [thisArg] - Value to use as *this* when executing the `callback`.
|
|
123
123
|
* @return {Promise} - Returns a Promise with the resultant filtered *Array* as value.
|
|
124
124
|
*/
|
|
125
|
-
export declare const filter: (array:
|
|
125
|
+
export declare const filter: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<unknown>;
|
|
126
126
|
/**
|
|
127
127
|
* Same functionality as [`filter()`](global.html#filter), but runs only one callback at a time.
|
|
128
128
|
* @param {Array} array - Array to iterate over.
|
|
129
129
|
* @param {Function} callback - Function to apply each item in `array`. Accepts three arguments: `currentValue`, `index` and `array`.
|
|
130
130
|
* @return {Promise} - Returns a Promise with the resultant filtered *Array* as value.
|
|
131
131
|
*/
|
|
132
|
-
export declare const filterSeries: (array:
|
|
132
|
+
export declare const filterSeries: <T>(array: T[], callback: Function, thisArg?: T | undefined) => Promise<Awaited<T>[]>;
|
|
133
133
|
/**
|
|
134
134
|
* Implements ES5 [`Array#reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) method.<br><br>
|
|
135
135
|
* Applies a `callback` against an accumulator and each element in `array`.
|
|
@@ -138,5 +138,5 @@ export declare const filterSeries: (array: unknown[], callback: Function, thisAr
|
|
|
138
138
|
* @param {Object} [initialValue] - Used as first argument to the first call of `callback`.
|
|
139
139
|
* @return {Promise} - Returns a Promise with the resultant value from the reduction.
|
|
140
140
|
*/
|
|
141
|
-
export declare const reduce: (array:
|
|
141
|
+
export declare const reduce: <T>(array: T[], callback: Function, initialValue?: T | undefined) => Promise<any>;
|
|
142
142
|
//# sourceMappingURL=pIteration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pIteration.d.ts","sourceRoot":"","sources":["../src/pIteration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"pIteration.d.ts","sourceRoot":"","sources":["../src/pIteration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,4BAAmC,QAAQ,2CAW9D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,4BAAmC,QAAQ,2CAMpE,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,4BAAmC,QAAQ,4CAU1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,4BAAmC,QAAQ,4CAQhE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,4BAA6B,QAAQ,oDAqBrD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,4BAAmC,QAAQ,oDAMjE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,4BAA6B,QAAQ,8CAqB1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,4BAAmC,QAAQ,yDAMtE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,4BAA6B,QAAQ,8CAyBrD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,4BAAmC,QAAQ,8CAOjE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,4BAA6B,GAAG,8CAyBjD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,4BAAmC,QAAQ,8CAOlE,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,4BAA6B,QAAQ,8CAwBvD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,4BAAmC,QAAQ,mDAQnE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,4BAAmC,QAAQ,+CAmB7D,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.26.2",
|
|
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.24.12",
|
|
42
|
-
"@wdio/types": "8.
|
|
42
|
+
"@wdio/types": "8.26.2",
|
|
43
43
|
"decamelize": "^6.0.0",
|
|
44
44
|
"deepmerge-ts": "^5.1.0",
|
|
45
45
|
"edgedriver": "^5.3.5",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "a8d00d826d49b1b01bf4921a10974e1db47085f6"
|
|
58
58
|
}
|