@wdio/config 7.13.2 → 7.16.3
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 +4 -7
- package/build/index.d.ts.map +1 -1
- package/build/index.js +15 -4
- package/build/lib/ConfigParser.d.ts +5 -22
- package/build/lib/ConfigParser.d.ts.map +1 -1
- package/build/lib/ConfigParser.js +22 -19
- package/build/lib/FileSystemPathService.d.ts +1 -1
- package/build/lib/FileSystemPathService.d.ts.map +1 -1
- package/build/lib/FileSystemPathService.js +0 -1
- package/build/lib/RequireLibrary.d.ts +1 -1
- package/build/types.d.ts +14 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/utils.d.ts +2 -8
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +3 -3
- package/package.json +4 -4
package/build/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import ConfigParser from './lib/ConfigParser';
|
|
2
|
-
import { validateConfig, isCloudCapability, ModuleRequireService } from './utils';
|
|
3
1
|
import { DEFAULT_CONFIGS } from './constants';
|
|
2
|
+
import { validateConfig, isCloudCapability } from './utils';
|
|
3
|
+
import ConfigParser from './lib/ConfigParser';
|
|
4
4
|
export { validateConfig, isCloudCapability, ConfigParser,
|
|
5
5
|
/**
|
|
6
6
|
* constants
|
|
7
7
|
*/
|
|
8
|
-
DEFAULT_CONFIGS
|
|
9
|
-
|
|
10
|
-
* types
|
|
11
|
-
*/
|
|
12
|
-
ModuleRequireService };
|
|
8
|
+
DEFAULT_CONFIGS };
|
|
9
|
+
export * from './types';
|
|
13
10
|
//# 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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EACH,cAAc,EACd,iBAAiB,EACjB,YAAY;AAEZ;;GAEG;AACH,eAAe,EAClB,CAAA;AAED,cAAc,SAAS,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
6
|
+
}) : (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
o[k2] = m[k];
|
|
9
|
+
}));
|
|
10
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
11
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
12
|
+
};
|
|
3
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
15
|
};
|
|
6
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
17
|
exports.DEFAULT_CONFIGS = exports.ConfigParser = exports.isCloudCapability = exports.validateConfig = void 0;
|
|
8
|
-
const
|
|
9
|
-
exports
|
|
18
|
+
const constants_1 = require("./constants");
|
|
19
|
+
Object.defineProperty(exports, "DEFAULT_CONFIGS", { enumerable: true, get: function () { return constants_1.DEFAULT_CONFIGS; } });
|
|
10
20
|
const utils_1 = require("./utils");
|
|
11
21
|
Object.defineProperty(exports, "validateConfig", { enumerable: true, get: function () { return utils_1.validateConfig; } });
|
|
12
22
|
Object.defineProperty(exports, "isCloudCapability", { enumerable: true, get: function () { return utils_1.isCloudCapability; } });
|
|
13
|
-
const
|
|
14
|
-
|
|
23
|
+
const ConfigParser_1 = __importDefault(require("./lib/ConfigParser"));
|
|
24
|
+
exports.ConfigParser = ConfigParser_1.default;
|
|
25
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Capabilities, Options, Services } from '@wdio/types';
|
|
2
|
-
import { ModuleRequireService } from '../
|
|
2
|
+
import type { PathService, ModuleRequireService } from '../types';
|
|
3
3
|
declare type Spec = string | string[];
|
|
4
4
|
interface TestrunnerOptionsWithParameters extends Omit<Options.Testrunner, 'capabilities'> {
|
|
5
5
|
watch?: boolean;
|
|
@@ -11,29 +11,12 @@ interface MergeConfig extends Omit<Partial<TestrunnerOptionsWithParameters>, 'sp
|
|
|
11
11
|
specs?: Spec[];
|
|
12
12
|
exclude?: string[];
|
|
13
13
|
}
|
|
14
|
-
interface CurrentPathFinder {
|
|
15
|
-
getcwd(): string;
|
|
16
|
-
}
|
|
17
|
-
interface LoadConfigFile {
|
|
18
|
-
loadFile<T>(path: string): T;
|
|
19
|
-
}
|
|
20
|
-
interface IsFileDetector {
|
|
21
|
-
isFile(path: string): boolean;
|
|
22
|
-
}
|
|
23
|
-
interface DeterminesAbsolutePath {
|
|
24
|
-
ensureAbsolutePath(path: string): string;
|
|
25
|
-
}
|
|
26
|
-
interface Globber {
|
|
27
|
-
glob(pattern: string): string[];
|
|
28
|
-
}
|
|
29
|
-
export interface PathService extends CurrentPathFinder, LoadConfigFile, IsFileDetector, Globber, DeterminesAbsolutePath {
|
|
30
|
-
}
|
|
31
14
|
export default class ConfigParser {
|
|
32
|
-
private _config;
|
|
33
|
-
private _capabilities;
|
|
34
15
|
private _pathService;
|
|
35
16
|
private _moduleRequireService;
|
|
36
|
-
|
|
17
|
+
private _config;
|
|
18
|
+
private _capabilities;
|
|
19
|
+
constructor(_pathService?: PathService, _moduleRequireService?: ModuleRequireService);
|
|
37
20
|
autoCompile(): void;
|
|
38
21
|
/**
|
|
39
22
|
* merges config file with default values
|
|
@@ -81,7 +64,7 @@ export default class ConfigParser {
|
|
|
81
64
|
* @param {number} hierarchy depth to prevent recursive calling beyond a depth of 1
|
|
82
65
|
* @return {String[] | String[][]} list of files
|
|
83
66
|
*/
|
|
84
|
-
static getFilePaths(patterns: Spec[], omitWarnings?: boolean, findAndGlob?:
|
|
67
|
+
static getFilePaths(patterns: Spec[], omitWarnings?: boolean, findAndGlob?: PathService, hierarchyDepth?: number): Spec[];
|
|
85
68
|
/**
|
|
86
69
|
* returns specs files with the excludes filtered
|
|
87
70
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/lib/ConfigParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/lib/ConfigParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAWlE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAKjE,aAAK,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AAE7B,UAAU,+BAAgC,SAAQ,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC;IACtF,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAA;CACjD;AAED,UAAU,WAAY,SAAQ,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7F,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAKzB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,qBAAqB;IALjC,OAAO,CAAC,OAAO,CAAqD;IACpE,OAAO,CAAC,aAAa,CAAsC;gBAG/C,YAAY,GAAE,WAAyC,EACvD,qBAAqB,GAAE,oBAA2C;IAG9E,WAAW;IASX;;;OAGG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM;IA+C9B;;;OAGG;IACH,KAAK,CAAC,MAAM,GAAE,WAAgB;IAwC9B;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK;IAkClC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE;IAoDnD;;;;;;;;OAQG;IACH,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;IAqCnE;;OAEG;IACH,SAAS;IAIT;;OAEG;IACH,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM;IAQ1B;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,WAAW,GAAE,WAAyC,EAAE,cAAc,CAAC,EAAE,MAAM;IA+C7I;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAU/C"}
|
|
@@ -5,25 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
7
7
|
const logger_1 = __importDefault(require("@wdio/logger"));
|
|
8
|
+
const RequireLibrary_1 = __importDefault(require("./RequireLibrary"));
|
|
9
|
+
const FileSystemPathService_1 = __importDefault(require("./FileSystemPathService"));
|
|
8
10
|
const utils_1 = require("../utils");
|
|
9
11
|
const constants_1 = require("../constants");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const RequireLibrary_1 = __importDefault(require("./RequireLibrary"));
|
|
13
|
-
const log = logger_1.default('@wdio/config:ConfigParser');
|
|
12
|
+
const constants_2 = require("../constants");
|
|
13
|
+
const log = (0, logger_1.default)('@wdio/config:ConfigParser');
|
|
14
14
|
const MERGE_OPTIONS = { clone: false };
|
|
15
15
|
class ConfigParser {
|
|
16
|
-
constructor(
|
|
17
|
-
this.
|
|
16
|
+
constructor(_pathService = new FileSystemPathService_1.default(), _moduleRequireService = new RequireLibrary_1.default()) {
|
|
17
|
+
this._pathService = _pathService;
|
|
18
|
+
this._moduleRequireService = _moduleRequireService;
|
|
19
|
+
this._config = (0, constants_2.DEFAULT_CONFIGS)();
|
|
18
20
|
this._capabilities = [];
|
|
19
|
-
this._pathService = pathService;
|
|
20
|
-
this._moduleRequireService = moduleRequireService;
|
|
21
21
|
}
|
|
22
22
|
autoCompile() {
|
|
23
23
|
/**
|
|
24
24
|
* on launcher compile files if Babel or TypeScript are installed using our defaults
|
|
25
25
|
*/
|
|
26
|
-
if (this._config.autoCompileOpts && !utils_1.loadAutoCompilers(this._config.autoCompileOpts, this._moduleRequireService)) {
|
|
26
|
+
if (this._config.autoCompileOpts && !(0, utils_1.loadAutoCompilers)(this._config.autoCompileOpts, this._moduleRequireService)) {
|
|
27
27
|
log.debug('No compiler found, continue without compiling files');
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -44,12 +44,12 @@ class ConfigParser {
|
|
|
44
44
|
/**
|
|
45
45
|
* clone the original config
|
|
46
46
|
*/
|
|
47
|
-
const fileConfig = deepmerge_1.default(config, {}, MERGE_OPTIONS);
|
|
47
|
+
const fileConfig = (0, deepmerge_1.default)(config, {}, MERGE_OPTIONS);
|
|
48
48
|
/**
|
|
49
49
|
* merge capabilities
|
|
50
50
|
*/
|
|
51
51
|
const defaultTo = Array.isArray(this._capabilities) ? [] : {};
|
|
52
|
-
this._capabilities = deepmerge_1.default(this._capabilities, fileConfig.capabilities || defaultTo, MERGE_OPTIONS);
|
|
52
|
+
this._capabilities = (0, deepmerge_1.default)(this._capabilities, fileConfig.capabilities || defaultTo, MERGE_OPTIONS);
|
|
53
53
|
delete fileConfig.capabilities;
|
|
54
54
|
/**
|
|
55
55
|
* Add hooks from the file config and remove them from file config object to avoid
|
|
@@ -59,7 +59,7 @@ class ConfigParser {
|
|
|
59
59
|
for (let hookName of constants_1.SUPPORTED_HOOKS) {
|
|
60
60
|
delete fileConfig[hookName];
|
|
61
61
|
}
|
|
62
|
-
this._config = deepmerge_1.default(this._config, fileConfig, MERGE_OPTIONS);
|
|
62
|
+
this._config = (0, deepmerge_1.default)(this._config, fileConfig, MERGE_OPTIONS);
|
|
63
63
|
/**
|
|
64
64
|
* remove `watch` from config as far as it can be only passed as command line argument
|
|
65
65
|
*/
|
|
@@ -77,7 +77,7 @@ class ConfigParser {
|
|
|
77
77
|
merge(object = {}) {
|
|
78
78
|
const spec = Array.isArray(object.spec) ? object.spec : [];
|
|
79
79
|
const exclude = Array.isArray(object.exclude) ? object.exclude : [];
|
|
80
|
-
this._config = deepmerge_1.default(this._config, object, MERGE_OPTIONS);
|
|
80
|
+
this._config = (0, deepmerge_1.default)(this._config, object, MERGE_OPTIONS);
|
|
81
81
|
/**
|
|
82
82
|
* overwrite config specs that got piped into the wdio command
|
|
83
83
|
*/
|
|
@@ -90,11 +90,11 @@ class ConfigParser {
|
|
|
90
90
|
/**
|
|
91
91
|
* overwrite capabilities
|
|
92
92
|
*/
|
|
93
|
-
this._capabilities = utils_1.validObjectOrArray(this._config.capabilities) ? this._config.capabilities : this._capabilities;
|
|
93
|
+
this._capabilities = (0, utils_1.validObjectOrArray)(this._config.capabilities) ? this._config.capabilities : this._capabilities;
|
|
94
94
|
/**
|
|
95
95
|
* save original specs if Cucumber's feature line number is provided
|
|
96
96
|
*/
|
|
97
|
-
if (this._config.spec && utils_1.isCucumberFeatureWithLineNumber(this._config.spec)) {
|
|
97
|
+
if (this._config.spec && (0, utils_1.isCucumberFeatureWithLineNumber)(this._config.spec)) {
|
|
98
98
|
/**
|
|
99
99
|
* `this._config.spec` is string instead of Array in watch mode
|
|
100
100
|
*/
|
|
@@ -116,15 +116,18 @@ class ConfigParser {
|
|
|
116
116
|
*/
|
|
117
117
|
addService(service) {
|
|
118
118
|
const addHook = (hookName, hook) => {
|
|
119
|
+
// @ts-ignore Expression produces a union type that is too complex to represent
|
|
119
120
|
const existingHooks = this._config[hookName];
|
|
120
121
|
if (!existingHooks) {
|
|
121
122
|
// @ts-ignore Expression produces a union type that is too complex to represent
|
|
122
123
|
this._config[hookName] = hook.bind(service);
|
|
123
124
|
}
|
|
124
125
|
else if (typeof existingHooks === 'function') {
|
|
126
|
+
// @ts-ignore Expression produces a union type that is too complex to represent
|
|
125
127
|
this._config[hookName] = [existingHooks, hook.bind(service)];
|
|
126
128
|
}
|
|
127
129
|
else {
|
|
130
|
+
// @ts-ignore Expression produces a union type that is too complex to represent
|
|
128
131
|
this._config[hookName] = [...existingHooks, hook.bind(service)];
|
|
129
132
|
}
|
|
130
133
|
};
|
|
@@ -205,7 +208,7 @@ class ConfigParser {
|
|
|
205
208
|
const filesToFilter = new Set();
|
|
206
209
|
const fileList = ConfigParser.getFilePaths(config, undefined, this._pathService);
|
|
207
210
|
cliArgFileList.forEach(filteredFile => {
|
|
208
|
-
filteredFile = utils_1.removeLineNumbers(filteredFile);
|
|
211
|
+
filteredFile = (0, utils_1.removeLineNumbers)(filteredFile);
|
|
209
212
|
// Send single file/file glob to getFilePaths - not supporting hierarchy in spec/exclude
|
|
210
213
|
// Return value will alwyas be string[]
|
|
211
214
|
let globMatchedFiles = ConfigParser.getFilePaths(this._pathService.glob(filteredFile), undefined, this._pathService);
|
|
@@ -278,9 +281,9 @@ class ConfigParser {
|
|
|
278
281
|
}
|
|
279
282
|
patterns = patterns.map(pattern => {
|
|
280
283
|
if (Array.isArray(pattern)) {
|
|
281
|
-
return pattern.map(subPattern => utils_1.removeLineNumbers(subPattern));
|
|
284
|
+
return pattern.map(subPattern => (0, utils_1.removeLineNumbers)(subPattern));
|
|
282
285
|
}
|
|
283
|
-
return utils_1.removeLineNumbers(pattern);
|
|
286
|
+
return (0, utils_1.removeLineNumbers)(pattern);
|
|
284
287
|
});
|
|
285
288
|
for (let pattern of patterns) {
|
|
286
289
|
// If pattern is an array, then call getFilePaths again
|
|
@@ -300,7 +303,7 @@ class ConfigParser {
|
|
|
300
303
|
if (filenames.length === 0 && !omitWarnings) {
|
|
301
304
|
log.warn('pattern', pattern, 'did not match any file');
|
|
302
305
|
}
|
|
303
|
-
files = deepmerge_1.default(files, filenames, MERGE_OPTIONS);
|
|
306
|
+
files = (0, deepmerge_1.default)(files, filenames, MERGE_OPTIONS);
|
|
304
307
|
}
|
|
305
308
|
}
|
|
306
309
|
return files;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystemPathService.d.ts","sourceRoot":"","sources":["../../src/lib/FileSystemPathService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileSystemPathService.d.ts","sourceRoot":"","sources":["../../src/lib/FileSystemPathService.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,WAAW;IAC7D,MAAM,IAAI,MAAM;IAQhB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAO5B,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIjC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAI/B,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAG/C"}
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// Main implementation (tests contain other implementations)
|
|
7
6
|
const fs_1 = __importDefault(require("fs"));
|
|
8
7
|
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const glob_1 = __importDefault(require("glob"));
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PathService {
|
|
2
|
+
getcwd(): string;
|
|
3
|
+
loadFile<T>(path: string): T;
|
|
4
|
+
isFile(path: string): boolean;
|
|
5
|
+
ensureAbsolutePath(path: string): string;
|
|
6
|
+
glob(pattern: string): string[];
|
|
7
|
+
}
|
|
8
|
+
export interface ModuleRequireService {
|
|
9
|
+
resolve(request: string, options?: {
|
|
10
|
+
paths?: string[];
|
|
11
|
+
}): string;
|
|
12
|
+
require<T>(module: string): T;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAExB,MAAM,IAAI,MAAM,CAAA;IAEhB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAA;IAE5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAC7B,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAExC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAAE,GAAG,MAAM,CAAA;IACjE,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC;CACjC"}
|
package/build/types.js
ADDED
package/build/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Capabilities, Options } from '@wdio/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ModuleRequireService } from './types';
|
|
3
3
|
export declare const validObjectOrArray: (object: any) => object is object | any[];
|
|
4
4
|
/**
|
|
5
5
|
* remove line numbers from file path, ex:
|
|
@@ -22,13 +22,7 @@ export declare function isCloudCapability(caps: Capabilities.Capabilities): bool
|
|
|
22
22
|
* @return {Object} validated config enriched with default values
|
|
23
23
|
*/
|
|
24
24
|
export declare function validateConfig<T>(defaults: Options.Definition<T>, options: T, keysToKeep?: (keyof T)[]): T;
|
|
25
|
-
export interface ModuleRequireService {
|
|
26
|
-
resolve(request: string, options?: {
|
|
27
|
-
paths?: string[];
|
|
28
|
-
}): string;
|
|
29
|
-
require<T>(module: string): T;
|
|
30
|
-
}
|
|
31
25
|
export declare function loadAutoCompilers(autoCompileConfig: Options.AutoCompileConfig, requireService: ModuleRequireService): boolean | undefined;
|
|
32
|
-
export declare function loadTypeScriptCompiler(tsNodeOpts:
|
|
26
|
+
export declare function loadTypeScriptCompiler(tsNodeOpts: any, tsConfigPathsOpts: Options.TSConfigPathsOptions | undefined, requireService: ModuleRequireService): boolean;
|
|
33
27
|
export declare function loadBabelCompiler(babelOpts: Record<string, any> | undefined, requireService: ModuleRequireService): boolean;
|
|
34
28
|
//# sourceMappingURL=utils.d.ts.map
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAInD,eAAO,MAAM,kBAAkB,WAAY,GAAG,6BACoB,CAAA;AAElE;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,UAMjD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,WAGtE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,WAEhE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,cAAoB,KA+C5G;AAED,wBAAgB,iBAAiB,CAAC,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,EAAE,cAAc,EAAE,oBAAoB,uBAgBnH;AAED,wBAAgB,sBAAsB,CAClC,UAAU,KAAU,EACpB,iBAAiB,EAAE,OAAO,CAAC,oBAAoB,GAAG,SAAS,EAC3D,cAAc,EAAE,oBAAoB,WAiBvC;AAED,wBAAgB,iBAAiB,CAAE,SAAS,iCAA0B,EAAE,cAAc,EAAE,oBAAoB,WAiB3G"}
|
package/build/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadBabelCompiler = exports.loadTypeScriptCompiler = exports.loadAutoCompilers = exports.validateConfig = exports.isCloudCapability = exports.isCucumberFeatureWithLineNumber = exports.removeLineNumbers = exports.validObjectOrArray = void 0;
|
|
7
7
|
const logger_1 = __importDefault(require("@wdio/logger"));
|
|
8
|
-
const log = logger_1.default('@wdio/config:utils');
|
|
8
|
+
const log = (0, logger_1.default)('@wdio/config:utils');
|
|
9
9
|
const validObjectOrArray = (object) => (Array.isArray(object) && object.length > 0) ||
|
|
10
10
|
(typeof object === 'object' && Object.keys(object).length > 0);
|
|
11
11
|
exports.validObjectOrArray = validObjectOrArray;
|
|
@@ -104,7 +104,7 @@ function loadTypeScriptCompiler(tsNodeOpts = {}, tsConfigPathsOpts, requireServi
|
|
|
104
104
|
}
|
|
105
105
|
return true;
|
|
106
106
|
}
|
|
107
|
-
catch (
|
|
107
|
+
catch (err) {
|
|
108
108
|
return false;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -122,7 +122,7 @@ function loadBabelCompiler(babelOpts = {}, requireService) {
|
|
|
122
122
|
log.debug('Found \'@babel/register\' package, auto-compiling files with Babel');
|
|
123
123
|
return true;
|
|
124
124
|
}
|
|
125
|
-
catch (
|
|
125
|
+
catch (err) {
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
128
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.3",
|
|
4
4
|
"description": "A helper utility to parse and validate WebdriverIO options",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-config",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"types": "./build/index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@wdio/logger": "7.
|
|
27
|
-
"@wdio/types": "7.
|
|
26
|
+
"@wdio/logger": "7.16.0",
|
|
27
|
+
"@wdio/types": "7.16.3",
|
|
28
28
|
"deepmerge": "^4.0.0",
|
|
29
29
|
"glob": "^7.1.2"
|
|
30
30
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"minimatch": "^3.0.4",
|
|
36
36
|
"tsconfig-paths": "^3.9.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "23e2af933060e829f03d7518089c377571c654e3"
|
|
39
39
|
}
|