@uuv/runner-commons 2.19.0 → 2.19.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/CHANGELOG.md +7 -0
- package/dist/cli/engine.js +7 -4
- package/dist/cli/helper.js +2 -1
- package/dist/cli/options.d.ts +6 -1
- package/dist/cli/options.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.19.1](https://github.com/Orange-OpenSource/uuv/compare/runner-commons-v2.19.0...runner-commons-v2.19.1) (2024-07-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **runner-commons:** improve uuv command control, [#682](https://github.com/Orange-OpenSource/uuv/issues/682) ([#698](https://github.com/Orange-OpenSource/uuv/issues/698)) ([e5327ce](https://github.com/Orange-OpenSource/uuv/commit/e5327ceb3c3bb1cdb6c6d9f87852ea14ab3b8700))
|
|
7
|
+
|
|
1
8
|
# [2.19.0](https://github.com/Orange-OpenSource/uuv/compare/runner-commons-v2.18.1...runner-commons-v2.19.0) (2024-07-14)
|
|
2
9
|
|
|
3
10
|
|
package/dist/cli/engine.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.UUVCliEngine = void 0;
|
|
7
7
|
const helper_1 = require("./helper");
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const options_1 = require("./options");
|
|
9
10
|
class UUVCliEngine {
|
|
10
11
|
runner;
|
|
11
12
|
constructor(runner) {
|
|
@@ -18,18 +19,20 @@ class UUVCliEngine {
|
|
|
18
19
|
this.checkArguments();
|
|
19
20
|
const options = helper_1.UUVCliHelper.extractArgs(this.runner.projectDir, this.runner.defaultBrowser);
|
|
20
21
|
helper_1.UUVCliHelper.printVariables(options);
|
|
22
|
+
if (options.command === undefined) {
|
|
23
|
+
throw new Error("Unknown command");
|
|
24
|
+
}
|
|
21
25
|
ipcServerProcess = helper_1.UUVCliHelper.startIpcServer();
|
|
22
26
|
await this.runner.prepare(options);
|
|
23
27
|
console.info(chalk_1.default.blueBright(`Executing UUV command ${options.command}...`));
|
|
24
28
|
switch (options.command) {
|
|
25
|
-
case
|
|
29
|
+
case options_1.UUV_TARGET_COMMAND.OPEN:
|
|
26
30
|
await this.runner.executeOpenCommand(options);
|
|
27
31
|
break;
|
|
28
|
-
case
|
|
32
|
+
case options_1.UUV_TARGET_COMMAND.RUN:
|
|
33
|
+
case options_1.UUV_TARGET_COMMAND.E2E:
|
|
29
34
|
await this.runner.executeE2eCommand(options);
|
|
30
35
|
break;
|
|
31
|
-
default:
|
|
32
|
-
throw new Error("Unknown command");
|
|
33
36
|
}
|
|
34
37
|
console.info(`UUV command ${options.command} executed`);
|
|
35
38
|
}
|
package/dist/cli/helper.js
CHANGED
|
@@ -8,6 +8,7 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
8
8
|
const figlet_1 = __importDefault(require("figlet"));
|
|
9
9
|
const minimist_1 = __importDefault(require("minimist"));
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const options_1 = require("./options");
|
|
11
12
|
const lodash_1 = require("lodash");
|
|
12
13
|
const child_process_1 = __importDefault(require("child_process"));
|
|
13
14
|
class UUVCliHelper {
|
|
@@ -43,7 +44,7 @@ class UUVCliHelper {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
static getTargetCommand(argv) {
|
|
46
|
-
return argv._[0];
|
|
47
|
+
return options_1.UUV_TARGET_COMMAND[(argv._[0]).toUpperCase()];
|
|
47
48
|
}
|
|
48
49
|
static extractArgs(projectDir, defaultBrowser) {
|
|
49
50
|
const argv = (0, minimist_1.default)(process.argv.slice(2));
|
package/dist/cli/options.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export declare enum UUV_TARGET_COMMAND {
|
|
2
|
+
OPEN = "open",
|
|
3
|
+
E2E = "e2e",
|
|
4
|
+
RUN = "run"
|
|
5
|
+
}
|
|
1
6
|
export type UUVCliOptions = {
|
|
2
7
|
baseUrl: string;
|
|
3
|
-
command:
|
|
8
|
+
command: UUV_TARGET_COMMAND;
|
|
4
9
|
browser: string;
|
|
5
10
|
targetTestFile: string;
|
|
6
11
|
report: {
|
package/dist/cli/options.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UUV_TARGET_COMMAND = void 0;
|
|
4
|
+
var UUV_TARGET_COMMAND;
|
|
5
|
+
(function (UUV_TARGET_COMMAND) {
|
|
6
|
+
UUV_TARGET_COMMAND["OPEN"] = "open";
|
|
7
|
+
UUV_TARGET_COMMAND["E2E"] = "e2e";
|
|
8
|
+
UUV_TARGET_COMMAND["RUN"] = "run";
|
|
9
|
+
})(UUV_TARGET_COMMAND || (exports.UUV_TARGET_COMMAND = UUV_TARGET_COMMAND = {}));
|
package/package.json
CHANGED