@wdio/cli 8.0.0-alpha.621 → 8.0.0-alpha.629
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/commands/run.d.ts +1 -1
- package/build/commands/run.d.ts.map +1 -1
- package/build/commands/run.js +29 -29
- package/build/constants.d.ts +1 -1
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +3 -3
- package/build/utils.js +1 -1
- package/package.json +9 -9
package/build/commands/run.d.ts
CHANGED
|
@@ -169,6 +169,6 @@ export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{}, "fr
|
|
|
169
169
|
};
|
|
170
170
|
}>>;
|
|
171
171
|
export declare function launchWithStdin(wdioConfPath: string, params: Partial<RunCommandArguments>): void;
|
|
172
|
-
export declare function launch(wdioConfPath: string, params: Partial<RunCommandArguments>): Promise<void
|
|
172
|
+
export declare function launch(wdioConfPath: string, params: Partial<RunCommandArguments>): Promise<void>;
|
|
173
173
|
export declare function handler(argv: RunCommandArguments): Promise<void | cp.ChildProcess>;
|
|
174
174
|
//# sourceMappingURL=run.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,eAAO,MAAM,OAAO,qBAAqB,CAAA;AAEzC,eAAO,MAAM,IAAI,yEAAyE,CAAA;AAE1F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUlC,CAAA;AAED,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,eAAO,MAAM,OAAO,qBAAqB,CAAA;AAEzC,eAAO,MAAM,IAAI,yEAAyE,CAAA;AAE1F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUlC,CAAA;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,QAczF;AAED,wBAAsB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,iBAgBtF;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,mCAmFtD"}
|
package/build/commands/run.js
CHANGED
|
@@ -115,6 +115,33 @@ export function launchWithStdin(wdioConfPath, params) {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
export async function launch(wdioConfPath, params) {
|
|
118
|
+
const launcher = new Launcher(wdioConfPath, params);
|
|
119
|
+
return launcher.run()
|
|
120
|
+
.then((...args) => {
|
|
121
|
+
/* istanbul ignore if */
|
|
122
|
+
if (!process.env.VITEST_WORKER_ID) {
|
|
123
|
+
process.exit(...args);
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
.catch(err => {
|
|
127
|
+
console.error(err);
|
|
128
|
+
/* istanbul ignore if */
|
|
129
|
+
if (!process.env.VITEST_WORKER_ID) {
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
export async function handler(argv) {
|
|
135
|
+
const { configPath, ...params } = argv;
|
|
136
|
+
const canAccessConfigPath = await fs.access(configPath).then(() => true, () => false);
|
|
137
|
+
if (!canAccessConfigPath) {
|
|
138
|
+
const configFullPath = path.join(process.cwd(), configPath);
|
|
139
|
+
await missingConfigurationPrompt('run', configFullPath);
|
|
140
|
+
}
|
|
141
|
+
const localConf = path.join(process.cwd(), 'wdio.conf.js');
|
|
142
|
+
const wdioConf = configPath || ((await fs.access(localConf).then(() => true, () => false))
|
|
143
|
+
? localConf
|
|
144
|
+
: undefined);
|
|
118
145
|
/**
|
|
119
146
|
* In order to load TypeScript files in ESM we need to apply the ts-node loader.
|
|
120
147
|
* Let's have WebdriverIO set it automatically if the user doesn't.
|
|
@@ -124,11 +151,11 @@ export async function launch(wdioConfPath, params) {
|
|
|
124
151
|
const runsWithLoader = (Boolean(process.argv.find((arg) => arg.startsWith('--loader')) &&
|
|
125
152
|
process.argv.find((arg) => arg.endsWith('ts-node/esm'))) ||
|
|
126
153
|
NODE_OPTIONS?.includes('ts-node/esm'));
|
|
127
|
-
if (
|
|
154
|
+
if (wdioConf.endsWith('.ts') && !runsWithLoader && nodePath) {
|
|
128
155
|
NODE_OPTIONS += ' --loader ts-node/esm/transpile-only --no-warnings';
|
|
129
156
|
const localTSConfigPath = ((params.autoCompileOpts?.tsNodeOpts?.project &&
|
|
130
157
|
path.resolve(process.cwd(), params.autoCompileOpts?.tsNodeOpts?.project)) ||
|
|
131
|
-
path.join(path.dirname(
|
|
158
|
+
path.join(path.dirname(wdioConf), 'tsconfig.json'));
|
|
132
159
|
const hasLocalTSConfig = await fs.access(localTSConfigPath).then(() => true, () => false);
|
|
133
160
|
const tsProcess = cp.spawn(nodePath, process.argv.slice(1), {
|
|
134
161
|
cwd: process.cwd(),
|
|
@@ -146,33 +173,6 @@ export async function launch(wdioConfPath, params) {
|
|
|
146
173
|
tsProcess.on('close', (code) => process.exit(code || 0));
|
|
147
174
|
return tsProcess;
|
|
148
175
|
}
|
|
149
|
-
const launcher = new Launcher(wdioConfPath, params);
|
|
150
|
-
return launcher.run()
|
|
151
|
-
.then((...args) => {
|
|
152
|
-
/* istanbul ignore if */
|
|
153
|
-
if (!process.env.VITEST_WORKER_ID) {
|
|
154
|
-
process.exit(...args);
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
.catch(err => {
|
|
158
|
-
console.error(err);
|
|
159
|
-
/* istanbul ignore if */
|
|
160
|
-
if (!process.env.VITEST_WORKER_ID) {
|
|
161
|
-
process.exit(1);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
export async function handler(argv) {
|
|
166
|
-
const { configPath, ...params } = argv;
|
|
167
|
-
const canAccessConfigPath = await fs.access(configPath).then(() => true, () => false);
|
|
168
|
-
if (!canAccessConfigPath) {
|
|
169
|
-
const configFullPath = path.join(process.cwd(), configPath);
|
|
170
|
-
await missingConfigurationPrompt('run', configFullPath);
|
|
171
|
-
}
|
|
172
|
-
const localConf = path.join(process.cwd(), 'wdio.conf.js');
|
|
173
|
-
const wdioConf = configPath || ((await fs.access(localConf).then(() => true, () => false))
|
|
174
|
-
? localConf
|
|
175
|
-
: undefined);
|
|
176
176
|
/**
|
|
177
177
|
* if `--watch` param is set, run launcher in watch mode
|
|
178
178
|
*/
|
package/build/constants.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const EXCLUSIVE_SERVICES: {
|
|
|
7
7
|
message: string;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export declare const CONFIG_HELPER_INTRO = "\n
|
|
10
|
+
export declare const CONFIG_HELPER_INTRO = "\n===============================\n\uD83E\uDD16 WDIO Configuration Wizard \uD83E\uDDD9\n===============================\n";
|
|
11
11
|
export declare const CONFIG_HELPER_SUCCESS_MESSAGE = "\n\uD83E\uDD16 Successfully setup project at %s \uD83C\uDF89\n\nJoin our Gitter community and instantly find answers to your issues or queries. Or just join and say hi \uD83D\uDC4B!\n \uD83D\uDD17 https://gitter.im/webdriverio/webdriverio\n\nVisit the project on GitHub to report bugs \uD83D\uDC1B or raise feature requests \uD83D\uDCA1:\n \uD83D\uDD17 https://github.com/webdriverio/webdriverio\n\nTo run your tests, execute:\n$ cd %s\n$ npm run wdio\n";
|
|
12
12
|
export declare const DEPENDENCIES_INSTALLATION_MESSAGE = "\nTo install dependencies, execute:\n%s\n";
|
|
13
13
|
export declare const NPM_INSTALL = "";
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,GAAG,KAA6B,CAAA;AAE7C,eAAO,MAAM,YAAY,QAAqE,CAAA;AAE9F,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAA;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,GAAG,KAA6B,CAAA;AAE7C,eAAO,MAAM,YAAY,QAAqE,CAAA;AAE9F,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAA;AAED,eAAO,MAAM,mBAAmB,8HAI/B,CAAA;AAED,eAAO,MAAM,6BAA6B,4cAYzC,CAAA;AAED,eAAO,MAAM,iCAAiC,8CAG7C,CAAA;AAED,eAAO,MAAM,WAAW,KAAK,CAAA;AAE7B,eAAO,MAAM,cAAc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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2BR,MAAM,EAAE;;IA+BzD,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -10,9 +10,9 @@ export const EXCLUSIVE_SERVICES = {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
export const CONFIG_HELPER_INTRO = `
|
|
13
|
-
|
|
14
|
-
WDIO Configuration
|
|
15
|
-
|
|
13
|
+
===============================
|
|
14
|
+
🤖 WDIO Configuration Wizard 🧙
|
|
15
|
+
===============================
|
|
16
16
|
`;
|
|
17
17
|
export const CONFIG_HELPER_SUCCESS_MESSAGE = `
|
|
18
18
|
🤖 Successfully setup project at %s 🎉
|
package/build/utils.js
CHANGED
|
@@ -648,7 +648,7 @@ export async function createWDIOScript(parsedAnswers) {
|
|
|
648
648
|
try {
|
|
649
649
|
console.log(`Adding ${chalk.bold('"wdio"')} script to package.json.`);
|
|
650
650
|
const script = `wdio run ./${path.join('.', parsedAnswers.wdioConfigPath.replace(projectProps?.path || process.cwd(), ''))}`;
|
|
651
|
-
await runProgram('npm', ['
|
|
651
|
+
await runProgram('npm', ['pkg', 'set', `scripts.wdio="${script}"`], { cwd: parsedAnswers.projectRootDir });
|
|
652
652
|
console.log(chalk.green.bold('✔ Success!'));
|
|
653
653
|
}
|
|
654
654
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cli",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.629+3481c8ac3",
|
|
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",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"@types/lodash.union": "^4.6.7",
|
|
41
41
|
"@types/recursive-readdir": "^2.2.1",
|
|
42
42
|
"@types/yargs": "^17.0.10",
|
|
43
|
-
"@wdio/config": "8.0.0-alpha.
|
|
44
|
-
"@wdio/globals": "8.0.0-alpha.
|
|
45
|
-
"@wdio/logger": "8.0.0-alpha.
|
|
46
|
-
"@wdio/protocols": "8.0.0-alpha.
|
|
47
|
-
"@wdio/types": "8.0.0-alpha.
|
|
48
|
-
"@wdio/utils": "8.0.0-alpha.
|
|
43
|
+
"@wdio/config": "8.0.0-alpha.629+3481c8ac3",
|
|
44
|
+
"@wdio/globals": "8.0.0-alpha.629+3481c8ac3",
|
|
45
|
+
"@wdio/logger": "8.0.0-alpha.629+3481c8ac3",
|
|
46
|
+
"@wdio/protocols": "8.0.0-alpha.629+3481c8ac3",
|
|
47
|
+
"@wdio/types": "8.0.0-alpha.629+3481c8ac3",
|
|
48
|
+
"@wdio/utils": "8.0.0-alpha.629+3481c8ac3",
|
|
49
49
|
"async-exit-hook": "^2.0.1",
|
|
50
50
|
"chalk": "^5.0.1",
|
|
51
51
|
"chokidar": "^3.5.3",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"mkdirp": "^1.0.4",
|
|
60
60
|
"read-pkg-up": "9.1.0",
|
|
61
61
|
"recursive-readdir": "^2.2.2",
|
|
62
|
-
"webdriverio": "8.0.0-alpha.
|
|
62
|
+
"webdriverio": "8.0.0-alpha.629+3481c8ac3",
|
|
63
63
|
"yargs": "^17.5.1",
|
|
64
64
|
"yarn-install": "^1.0.0"
|
|
65
65
|
},
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/node": "^18.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "3481c8ac3cfa6ed7965eb9de0b4f2d2dfe4ab7c2"
|
|
73
73
|
}
|