@wdio/appium-service 8.0.0-alpha.412 → 8.0.0-alpha.504
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.d.ts.map +1 -1
- package/build/launcher.js +8 -10
- package/package.json +5 -10
package/build/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGlE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAYzE,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,QAAQ,CAAC,eAAe;IAQ/D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO,CAAC;IATpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,CAA+C;gBAGpD,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,YAAY,CAAC,kBAAkB,EAC9C,OAAO,CAAC,gCAAoB;IAUxC,OAAO,CAAC,WAAW;IAqBnB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA6BlB,SAAS;IAkBf,UAAU;IAOV,OAAO,CAAC,YAAY;YA2BN,kBAAkB;IAehC,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAcnC"}
|
package/build/launcher.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import fsp from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
1
4
|
import { spawn } from 'node:child_process';
|
|
2
5
|
import { promisify } from 'node:util';
|
|
3
6
|
import { createRequire } from 'node:module';
|
|
@@ -8,16 +11,10 @@ const log = logger('@wdio/appium-service');
|
|
|
8
11
|
const DEFAULT_LOG_FILENAME = 'wdio-appium.log';
|
|
9
12
|
const DEFAULT_CONNECTION = {
|
|
10
13
|
protocol: 'http',
|
|
11
|
-
hostname: '
|
|
14
|
+
hostname: '127.0.0.1',
|
|
12
15
|
port: 4723,
|
|
13
16
|
path: '/'
|
|
14
17
|
};
|
|
15
|
-
const require = createRequire(import.meta.url);
|
|
16
|
-
/**
|
|
17
|
-
* 'fs-extra' has no support for ESM
|
|
18
|
-
* https://github.com/jprichardson/node-fs-extra/issues/746
|
|
19
|
-
*/
|
|
20
|
-
const { createWriteStream, ensureFileSync } = require('fs-extra');
|
|
21
18
|
export default class AppiumLauncher {
|
|
22
19
|
_options;
|
|
23
20
|
_capabilities;
|
|
@@ -117,20 +114,21 @@ export default class AppiumLauncher {
|
|
|
117
114
|
callback(new Error(errorMessage), null);
|
|
118
115
|
});
|
|
119
116
|
}
|
|
120
|
-
_redirectLogStream(logPath) {
|
|
117
|
+
async _redirectLogStream(logPath) {
|
|
121
118
|
if (!this._process) {
|
|
122
119
|
throw Error('No Appium process to redirect log stream');
|
|
123
120
|
}
|
|
124
121
|
const logFile = getFilePath(logPath, DEFAULT_LOG_FILENAME);
|
|
125
122
|
// ensure file & directory exists
|
|
126
|
-
|
|
123
|
+
await fsp.mkdir(path.dirname(logFile), { recursive: true });
|
|
127
124
|
log.debug(`Appium logs written to: ${logFile}`);
|
|
128
|
-
const logStream = createWriteStream(logFile, { flags: 'w' });
|
|
125
|
+
const logStream = fs.createWriteStream(logFile, { flags: 'w' });
|
|
129
126
|
this._process.stdout.pipe(logStream);
|
|
130
127
|
this._process.stderr.pipe(logStream);
|
|
131
128
|
}
|
|
132
129
|
static _getAppiumCommand(moduleName = 'appium') {
|
|
133
130
|
try {
|
|
131
|
+
const require = createRequire(import.meta.url);
|
|
134
132
|
return require.resolve(moduleName);
|
|
135
133
|
}
|
|
136
134
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/appium-service",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.504+428a9d729",
|
|
4
4
|
"description": "A WebdriverIO service to start & stop Appium Server",
|
|
5
5
|
"author": "Morten Bjerg Gregersen <morten@mogee.dk>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-appium-service",
|
|
@@ -30,18 +30,13 @@
|
|
|
30
30
|
"types": "./build/index.d.ts",
|
|
31
31
|
"typeScriptVersion": "3.8.3",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@wdio/
|
|
35
|
-
"@wdio/
|
|
36
|
-
"@wdio/types": "8.0.0-alpha.412+a2bc7ec67",
|
|
37
|
-
"fs-extra": "^10.1.0",
|
|
33
|
+
"@wdio/config": "8.0.0-alpha.504+428a9d729",
|
|
34
|
+
"@wdio/logger": "8.0.0-alpha.504+428a9d729",
|
|
35
|
+
"@wdio/types": "8.0.0-alpha.504+428a9d729",
|
|
38
36
|
"param-case": "^3.0.4"
|
|
39
37
|
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"@wdio/cli": "next"
|
|
42
|
-
},
|
|
43
38
|
"publishConfig": {
|
|
44
39
|
"access": "public"
|
|
45
40
|
},
|
|
46
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "428a9d729ae6231968a60908732fa3f607d195e9"
|
|
47
42
|
}
|