bt-runner 4.0.7 → 4.0.8
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/dist/index.js +2 -1
- package/dist/util/Server.js +2 -2
- package/dist/util/runTests.js +1 -3
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
const fs = __importStar(require("fs"));
|
|
30
31
|
const path = __importStar(require("path"));
|
|
31
32
|
const helpers_1 = require("yargs/helpers");
|
|
32
33
|
const yargs_1 = __importDefault(require("yargs/yargs"));
|
|
@@ -46,7 +47,7 @@ async function run() {
|
|
|
46
47
|
description: "run in debug mode",
|
|
47
48
|
default: false
|
|
48
49
|
}).argv;
|
|
49
|
-
const config =
|
|
50
|
+
const config = JSON.parse(fs.readFileSync(path.join(process.cwd(), args.config), "utf8"));
|
|
50
51
|
const server = util_1.Server.create(config, port).start();
|
|
51
52
|
let exitCode = 0;
|
|
52
53
|
try {
|
package/dist/util/Server.js
CHANGED
|
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Server = void 0;
|
|
30
30
|
const express_1 = __importDefault(require("express"));
|
|
31
|
+
const express_http_proxy_1 = __importDefault(require("express-http-proxy"));
|
|
31
32
|
const path = __importStar(require("path"));
|
|
32
33
|
const generateHtml_1 = require("./generateHtml");
|
|
33
34
|
class Server {
|
|
@@ -49,10 +50,9 @@ class Server {
|
|
|
49
50
|
});
|
|
50
51
|
app.use("/test", express_1.default.static(this.testFolder));
|
|
51
52
|
if (this.config.proxies) {
|
|
52
|
-
const httpproxy = require("express-http-proxy");
|
|
53
53
|
const proxies = this.config.proxies.map((proxy) => this.transformProxy(proxy));
|
|
54
54
|
for (const proxy of proxies) {
|
|
55
|
-
app.use(proxy.local,
|
|
55
|
+
app.use(proxy.local, (0, express_http_proxy_1.default)(proxy.remote));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
this.server = app.listen(this.port);
|
package/dist/util/runTests.js
CHANGED
|
@@ -11,9 +11,7 @@ async function runTests(serverPort, testRunners, debug) {
|
|
|
11
11
|
args: ["--disable-gpu", "--disable-dev-shm-usage", "--disable-setuid-sandbox", "--no-sandbox"]
|
|
12
12
|
});
|
|
13
13
|
const page = await browser.newPage();
|
|
14
|
-
page.on("console", (message) =>
|
|
15
|
-
console.log.apply(console, message.args().map((arg) => arg.remoteObject().value));
|
|
16
|
-
});
|
|
14
|
+
page.on("console", (message) => console.log(...message.args().map((arg) => arg.remoteObject().value)));
|
|
17
15
|
for (let i = 0; i < testRunners.length; i++) {
|
|
18
16
|
const runner = testRunners[i];
|
|
19
17
|
const runnerNumber = i + 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bt-runner",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "github:js-soft/bt-runner",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,26 +19,26 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
21
|
"lint": "npm run lint:prettier && npm run lint:eslint && npm run lint:tsc",
|
|
22
|
-
"lint:eslint": "eslint
|
|
22
|
+
"lint:eslint": "eslint",
|
|
23
23
|
"lint:prettier": "prettier --check .",
|
|
24
24
|
"lint:tsc": "tsc --noEmit",
|
|
25
25
|
"test": "npm run test --workspace example"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"express": "^
|
|
28
|
+
"express": "^5.1.0",
|
|
29
29
|
"express-http-proxy": "^2.1.1",
|
|
30
|
-
"puppeteer": "^24.
|
|
31
|
-
"yargs": "^
|
|
30
|
+
"puppeteer": "^24.13.0",
|
|
31
|
+
"yargs": "^18.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@js-soft/eslint-config-ts": "^
|
|
34
|
+
"@js-soft/eslint-config-ts": "^2.0.1",
|
|
35
35
|
"@js-soft/license-check": "^1.0.9",
|
|
36
|
-
"@types/express": "^5.0.
|
|
36
|
+
"@types/express": "^5.0.3",
|
|
37
37
|
"@types/express-http-proxy": "^1.6.6",
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^24.0.14",
|
|
39
39
|
"@types/yargs": "^17.0.33",
|
|
40
|
-
"eslint": "^
|
|
41
|
-
"prettier": "^3.
|
|
40
|
+
"eslint": "^9.31.0",
|
|
41
|
+
"prettier": "^3.6.2"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|