momentic 0.0.11 → 0.0.13
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/bin/cli.js +11 -0
- package/package.json +3 -1
package/bin/cli.js
CHANGED
|
@@ -56,6 +56,7 @@ import exec from "@actions/exec";
|
|
|
56
56
|
import io from "@actions/io";
|
|
57
57
|
import chalk from "chalk";
|
|
58
58
|
import { Command as Command4, Option } from "commander";
|
|
59
|
+
import { registry } from "playwright-core/lib/server";
|
|
59
60
|
import quote from "quote";
|
|
60
61
|
import parseArgsStringToArgv2 from "string-argv";
|
|
61
62
|
import waitOnFn from "wait-on";
|
|
@@ -3135,6 +3136,9 @@ function runTest(_0) {
|
|
|
3135
3136
|
// src/cli.ts
|
|
3136
3137
|
var program = new Command4();
|
|
3137
3138
|
program.name("momentic").description("Momentic CLI").version(version);
|
|
3139
|
+
program.command("install-browsers").action(() => __async(void 0, null, function* () {
|
|
3140
|
+
yield installBrowsers();
|
|
3141
|
+
}));
|
|
3138
3142
|
program.command("run-tests").addOption(
|
|
3139
3143
|
new Option(
|
|
3140
3144
|
"--tests <tests...>",
|
|
@@ -3194,6 +3198,7 @@ program.command("run-tests").addOption(
|
|
|
3194
3198
|
process.exit(1);
|
|
3195
3199
|
}
|
|
3196
3200
|
console.log(chalk.green(`All ${results.length} tests passed!`));
|
|
3201
|
+
process.exit(0);
|
|
3197
3202
|
}));
|
|
3198
3203
|
var execCommand = (fullCommand, waitToFinish = true) => __async(void 0, null, function* () {
|
|
3199
3204
|
const args = parseArgsStringToArgv2(fullCommand);
|
|
@@ -3204,6 +3209,12 @@ var execCommand = (fullCommand, waitToFinish = true) => __async(void 0, null, fu
|
|
|
3204
3209
|
return promise;
|
|
3205
3210
|
}
|
|
3206
3211
|
});
|
|
3212
|
+
function installBrowsers() {
|
|
3213
|
+
return __async(this, null, function* () {
|
|
3214
|
+
const executables = registry.defaultExecutables();
|
|
3215
|
+
yield registry.install(executables, false);
|
|
3216
|
+
});
|
|
3217
|
+
}
|
|
3207
3218
|
function main() {
|
|
3208
3219
|
return __async(this, null, function* () {
|
|
3209
3220
|
yield program.parseAsync(process.argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "momentic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "The Momentic SDK for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@actions/exec": "^1.1.1",
|
|
41
41
|
"@actions/io": "^1.1.3",
|
|
42
42
|
"@playwright/browser-chromium": "1.39.0",
|
|
43
|
+
"@playwright/test": "1.39.0",
|
|
43
44
|
"chalk": "^5.3.0",
|
|
44
45
|
"commander": "^11.1.0",
|
|
45
46
|
"cron-validator": "^1.3.1",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"diff-lines": "^1.1.1",
|
|
48
49
|
"fetch-retry": "^5.0.6",
|
|
49
50
|
"playwright": "1.39.0",
|
|
51
|
+
"playwright-core": "1.39.0",
|
|
50
52
|
"quote": "^0.4.0",
|
|
51
53
|
"set-cookie-parser": "^2.6.0",
|
|
52
54
|
"string-argv": "^0.3.2",
|