@wdio/cli 8.22.1 → 8.23.1
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/launcher.js
CHANGED
|
@@ -4,7 +4,7 @@ import exitHook from 'async-exit-hook';
|
|
|
4
4
|
import logger from '@wdio/logger';
|
|
5
5
|
import { validateConfig } from '@wdio/config';
|
|
6
6
|
import { ConfigParser } from '@wdio/config/node';
|
|
7
|
-
import {
|
|
7
|
+
import { initializePlugin, initializeLauncherService, sleep } from '@wdio/utils';
|
|
8
8
|
import { setupDriver, setupBrowser } from '@wdio/utils/node';
|
|
9
9
|
import CLInterface from './interface.js';
|
|
10
10
|
import { runLauncherHook, runOnCompleteHook, runServiceHook } from './utils.js';
|
|
@@ -72,7 +72,7 @@ class Launcher {
|
|
|
72
72
|
this.interface = new CLInterface(config, totalWorkerCnt, this._isWatchMode);
|
|
73
73
|
config.runnerEnv.FORCE_COLOR = Number(this.interface.hasAnsiSupport);
|
|
74
74
|
const [runnerName, runnerOptions] = Array.isArray(config.runner) ? config.runner : [config.runner, {}];
|
|
75
|
-
const Runner = (await
|
|
75
|
+
const Runner = (await initializePlugin(runnerName, 'runner')).default;
|
|
76
76
|
this.runner = new Runner(runnerOptions, config);
|
|
77
77
|
/**
|
|
78
78
|
* catches ctrl+c event
|
|
@@ -82,14 +82,14 @@ class Launcher {
|
|
|
82
82
|
let error = undefined;
|
|
83
83
|
try {
|
|
84
84
|
const caps = this.configParser.getCapabilities();
|
|
85
|
-
const { ignoredWorkerServices, launcherServices } = await
|
|
85
|
+
const { ignoredWorkerServices, launcherServices } = await initializeLauncherService(config, caps);
|
|
86
86
|
this._launcher = launcherServices;
|
|
87
87
|
this._args.ignoredWorkerServices = ignoredWorkerServices;
|
|
88
88
|
/**
|
|
89
89
|
* run pre test tasks for runner plugins
|
|
90
90
|
* (e.g. deploy Lambda function to AWS)
|
|
91
91
|
*/
|
|
92
|
-
await this.runner.
|
|
92
|
+
await this.runner.initialize();
|
|
93
93
|
/**
|
|
94
94
|
* run onPrepare hook
|
|
95
95
|
*/
|
|
@@ -309,7 +309,7 @@ class Launcher {
|
|
|
309
309
|
*/
|
|
310
310
|
async _startInstance(specs, caps, cid, rid, retries) {
|
|
311
311
|
if (!this.runner || !this.interface) {
|
|
312
|
-
throw new Error('Internal Error: no runner
|
|
312
|
+
throw new Error('Internal Error: no runner initialized, call run() first');
|
|
313
313
|
}
|
|
314
314
|
const config = this.configParser.getConfig();
|
|
315
315
|
// wait before retrying the spec file
|
|
@@ -384,7 +384,7 @@ class Launcher {
|
|
|
384
384
|
}
|
|
385
385
|
_workerHookError(error) {
|
|
386
386
|
if (!this.interface) {
|
|
387
|
-
throw new Error('Internal Error: no interface
|
|
387
|
+
throw new Error('Internal Error: no interface initialized, call run() first');
|
|
388
388
|
}
|
|
389
389
|
this.interface.logHookError(error);
|
|
390
390
|
if (this._resolve) {
|
|
@@ -228,7 +228,7 @@ if (answers.isUsingTypeScript) {
|
|
|
228
228
|
// onPrepare: function (config, capabilities) {
|
|
229
229
|
// },
|
|
230
230
|
/**
|
|
231
|
-
* Gets executed before a worker process is spawned and can be used to
|
|
231
|
+
* Gets executed before a worker process is spawned and can be used to initialize specific service
|
|
232
232
|
* for that worker as well as modify runtime environments in an async fashion.
|
|
233
233
|
* @param {string} cid capability id (e.g 0-0)
|
|
234
234
|
* @param {object} caps object containing capabilities for session that will be spawn in the worker
|
package/build/watcher.js
CHANGED
|
@@ -102,7 +102,7 @@ export default class Watcher {
|
|
|
102
102
|
*/
|
|
103
103
|
getWorkers(predicate, includeBusyWorker) {
|
|
104
104
|
if (!this._launcher.runner) {
|
|
105
|
-
throw new Error('Internal Error: no runner
|
|
105
|
+
throw new Error('Internal Error: no runner initialized, call run() first');
|
|
106
106
|
}
|
|
107
107
|
let workers = this._launcher.runner.workerPool;
|
|
108
108
|
if (typeof predicate === 'function') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.23.1",
|
|
4
4
|
"description": "WebdriverIO testrunner command line interface",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cli",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"typeScriptVersion": "3.8.3",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@types/node": "^20.1.1",
|
|
49
|
-
"@wdio/config": "8.
|
|
50
|
-
"@wdio/globals": "8.
|
|
49
|
+
"@wdio/config": "8.23.1",
|
|
50
|
+
"@wdio/globals": "8.23.1",
|
|
51
51
|
"@wdio/logger": "8.16.17",
|
|
52
|
-
"@wdio/protocols": "8.
|
|
53
|
-
"@wdio/types": "8.
|
|
54
|
-
"@wdio/utils": "8.
|
|
52
|
+
"@wdio/protocols": "8.23.0",
|
|
53
|
+
"@wdio/types": "8.23.1",
|
|
54
|
+
"@wdio/utils": "8.23.1",
|
|
55
55
|
"async-exit-hook": "^2.0.1",
|
|
56
56
|
"chalk": "^5.2.0",
|
|
57
57
|
"chokidar": "^3.5.3",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"lodash.union": "^4.6.0",
|
|
68
68
|
"read-pkg-up": "^10.0.0",
|
|
69
69
|
"recursive-readdir": "^2.2.3",
|
|
70
|
-
"webdriverio": "8.
|
|
70
|
+
"webdriverio": "8.23.1",
|
|
71
71
|
"yargs": "^17.7.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "64633b802ba4d00d23f6531dadc3fc724d8d7dd5"
|
|
87
87
|
}
|