@wdio/utils 8.18.2 → 8.19.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/constants.d.ts +4 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +24 -0
- package/build/index.d.ts +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/package.json +3 -3
package/build/constants.d.ts
CHANGED
|
@@ -88,4 +88,8 @@ export declare const SUPPORTED_BROWSERNAMES: {
|
|
|
88
88
|
export declare const DEFAULT_HOSTNAME = "0.0.0.0";
|
|
89
89
|
export declare const DEFAULT_PROTOCOL = "http";
|
|
90
90
|
export declare const DEFAULT_PATH = "/";
|
|
91
|
+
export declare const HOOK_DEFINITION: {
|
|
92
|
+
type: "object";
|
|
93
|
+
validate: (param: any) => void;
|
|
94
|
+
};
|
|
91
95
|
//# sourceMappingURL=constants.d.ts.map
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ErB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAA;AAED,eAAO,MAAM,gBAAgB,YAAY,CAAA;AACzC,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,YAAY,MAAM,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ErB,CAAA;AAEV,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAA;AAED,eAAO,MAAM,gBAAgB,YAAY,CAAA;AACzC,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,eAAO,MAAM,eAAe;;sBAEN,GAAG;CAsBxB,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -88,3 +88,27 @@ export const SUPPORTED_BROWSERNAMES = {
|
|
|
88
88
|
export const DEFAULT_HOSTNAME = '0.0.0.0';
|
|
89
89
|
export const DEFAULT_PROTOCOL = 'http';
|
|
90
90
|
export const DEFAULT_PATH = '/';
|
|
91
|
+
/* istanbul ignore next */
|
|
92
|
+
export const HOOK_DEFINITION = {
|
|
93
|
+
type: 'object',
|
|
94
|
+
validate: (param) => {
|
|
95
|
+
/**
|
|
96
|
+
* option must be an array
|
|
97
|
+
*/
|
|
98
|
+
if (!Array.isArray(param)) {
|
|
99
|
+
throw new Error('a hook option needs to be a list of functions');
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* array elements must be functions
|
|
103
|
+
*/
|
|
104
|
+
for (const option of param) {
|
|
105
|
+
/**
|
|
106
|
+
* either a string
|
|
107
|
+
*/
|
|
108
|
+
if (typeof option === 'function') {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
throw new Error('expected hook to be type of function');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
package/build/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';
|
|
|
7
7
|
import { isW3C, capabilitiesEnvironmentDetector, sessionEnvironmentDetector, devtoolsEnvironmentDetector } from './envDetector.js';
|
|
8
8
|
import { startWebDriver } from './driver/index.js';
|
|
9
9
|
import { setupDriver, setupBrowser } from './driver/manager.js';
|
|
10
|
-
import { UNICODE_CHARACTERS } from './constants.js';
|
|
10
|
+
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js';
|
|
11
11
|
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver,
|
|
12
12
|
/**
|
|
13
13
|
* runner shim
|
|
@@ -20,5 +20,5 @@ isW3C, sessionEnvironmentDetector, capabilitiesEnvironmentDetector, devtoolsEnvi
|
|
|
20
20
|
/**
|
|
21
21
|
* constants
|
|
22
22
|
*/
|
|
23
|
-
UNICODE_CHARACTERS };
|
|
23
|
+
UNICODE_CHARACTERS, HOOK_DEFINITION };
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
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,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAC5F,OAAO,cAAc,MAAM,YAAY,CAAA;AACvC,OAAO,EACH,oBAAoB,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EACnE,eAAe,EAAE,yBAAyB,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EACnF,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC3E,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,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAA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ED
|
@@ -8,7 +8,7 @@ import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';
|
|
|
8
8
|
import { isW3C, capabilitiesEnvironmentDetector, sessionEnvironmentDetector, devtoolsEnvironmentDetector } from './envDetector.js';
|
|
9
9
|
import { startWebDriver } from './driver/index.js';
|
|
10
10
|
import { setupDriver, setupBrowser } from './driver/manager.js';
|
|
11
|
-
import { UNICODE_CHARACTERS } from './constants.js';
|
|
11
|
+
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js';
|
|
12
12
|
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver,
|
|
13
13
|
/**
|
|
14
14
|
* runner shim
|
|
@@ -21,4 +21,4 @@ isW3C, sessionEnvironmentDetector, capabilitiesEnvironmentDetector, devtoolsEnvi
|
|
|
21
21
|
/**
|
|
22
22
|
* constants
|
|
23
23
|
*/
|
|
24
|
-
UNICODE_CHARACTERS };
|
|
24
|
+
UNICODE_CHARACTERS, HOOK_DEFINITION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.19.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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@puppeteer/browsers": "^1.6.0",
|
|
34
34
|
"@wdio/logger": "8.16.17",
|
|
35
|
-
"@wdio/types": "8.
|
|
35
|
+
"@wdio/types": "8.19.0",
|
|
36
36
|
"decamelize": "^6.0.0",
|
|
37
37
|
"deepmerge-ts": "^5.1.0",
|
|
38
38
|
"edgedriver": "^5.3.5",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "5179b3b3d0bced033e719890baf4517137ac1576"
|
|
52
52
|
}
|