@wdio/utils 8.16.9 → 8.16.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/driver/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAyB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/driver/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAyB,MAAM,oBAAoB,CAAA;AAQ1D,OAAO,EAA8B,KAAK,mBAAmB,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC7G,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACnF,OAAO,EAA0C,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,KAAK,EAAgB,OAAO,EAAE,MAAM,aAAa,CAAA;AAQxD,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,mBAAmB,GAAG,sBAAsB,CAAC,CAAA;AAChJ,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,mBAAoB,SAAQ,sBAAsB;SAAG;QAC/D,UAAU,kBAAmB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC;SAAG;QAC3E,UAAU,iBAAkB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;SAAG;QACzE,UAAU,mBAAoB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC;SAAG;KAChF;CACJ;AAKD,wBAAsB,cAAc,CAAE,OAAO,EAAE,OAAO,CAAC,SAAS,wCAuJ/D"}
|
package/build/driver/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import cp from 'node:child_process';
|
|
|
5
5
|
import getPort from 'get-port';
|
|
6
6
|
import waitPort from 'wait-port';
|
|
7
7
|
import logger from '@wdio/logger';
|
|
8
|
+
import split2 from 'split2';
|
|
8
9
|
import { deepmerge } from 'deepmerge-ts';
|
|
9
10
|
import { start as startSafaridriver } from 'safaridriver';
|
|
10
11
|
import { start as startGeckodriver } from 'geckodriver';
|
|
@@ -123,8 +124,8 @@ export async function startWebDriver(options) {
|
|
|
123
124
|
throw new Error(`Unknown browser name "${caps.browserName}". Make sure to pick from one of the following ` +
|
|
124
125
|
Object.values(SUPPORTED_BROWSERNAMES).flat(Infinity));
|
|
125
126
|
}
|
|
127
|
+
const logIdentifier = driver.split(' ').shift()?.toLowerCase() || 'driver';
|
|
126
128
|
if (options.outputDir) {
|
|
127
|
-
const logIdentifier = driver.split(' ').shift()?.toLowerCase();
|
|
128
129
|
const logFileName = process.env.WDIO_WORKER_ID
|
|
129
130
|
? `wdio-${process.env.WDIO_WORKER_ID}-${logIdentifier}.log`
|
|
130
131
|
: `wdio-${logIdentifier}-${port}.log`;
|
|
@@ -133,6 +134,11 @@ export async function startWebDriver(options) {
|
|
|
133
134
|
driverProcess.stdout?.pipe(logStream);
|
|
134
135
|
driverProcess.stderr?.pipe(logStream);
|
|
135
136
|
}
|
|
137
|
+
else {
|
|
138
|
+
const driverLog = logger(logIdentifier);
|
|
139
|
+
driverProcess.stdout?.pipe(split2()).on('data', driverLog.info.bind(driverLog));
|
|
140
|
+
driverProcess.stderr?.pipe(split2()).on('data', driverLog.warn.bind(driverLog));
|
|
141
|
+
}
|
|
136
142
|
await waitPort({ port, output: 'silent', timeout: DRIVER_WAIT_TIMEOUT })
|
|
137
143
|
.catch((e) => { throw new Error(`Timed out to connect to ${driver}: ${e.message}`); });
|
|
138
144
|
options.hostname = '0.0.0.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.16.
|
|
3
|
+
"version": "8.16.10",
|
|
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",
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"import-meta-resolve": "^3.0.0",
|
|
43
43
|
"locate-app": "^2.1.0",
|
|
44
44
|
"safaridriver": "^0.1.0",
|
|
45
|
+
"split2": "^4.2.0",
|
|
45
46
|
"wait-port": "^1.0.4"
|
|
46
47
|
},
|
|
47
48
|
"publishConfig": {
|
|
48
49
|
"access": "public"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9d1c1c5604b4ca2f7ea24c84111bf87d0b4f580a"
|
|
51
52
|
}
|