@browsermation/test 0.0.35 → 0.0.36
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/bin/cli.js +1 -1
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -42258,7 +42258,7 @@ var {
|
|
|
42258
42258
|
// package.json
|
|
42259
42259
|
var package_default = {
|
|
42260
42260
|
name: "@browsermation/test",
|
|
42261
|
-
version: "0.0.
|
|
42261
|
+
version: "0.0.36",
|
|
42262
42262
|
description: "The testing platform for Playwright by Browsermation.",
|
|
42263
42263
|
main: "./dist/index.js",
|
|
42264
42264
|
types: "./dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -613,6 +613,11 @@ async function fetchEndpoint() {
|
|
|
613
613
|
};
|
|
614
614
|
protocol.get(process.env.BM_SERVER_URL || "", options, (res) => {
|
|
615
615
|
if (res.statusCode && (res.statusCode < 200 || res.statusCode >= 400)) {
|
|
616
|
+
console.error(
|
|
617
|
+
source_default.red.bold(
|
|
618
|
+
`\u274C Error: HTTP status code ${res.statusCode} received`
|
|
619
|
+
)
|
|
620
|
+
);
|
|
616
621
|
return reject(new Error(`HTTP status code ${res.statusCode} received`));
|
|
617
622
|
}
|
|
618
623
|
res.on("error", (err) => {
|
|
@@ -630,6 +635,7 @@ async function fetchEndpoint() {
|
|
|
630
635
|
res.destroy();
|
|
631
636
|
}
|
|
632
637
|
} catch (error) {
|
|
638
|
+
console.log("Error parsing JSON:", error);
|
|
633
639
|
console.log(chunk.toString());
|
|
634
640
|
}
|
|
635
641
|
});
|
|
@@ -642,8 +648,10 @@ process.on("exit", () => {
|
|
|
642
648
|
});
|
|
643
649
|
async function defineConfig(config) {
|
|
644
650
|
const endpointUrl = await fetchEndpoint();
|
|
645
|
-
|
|
646
|
-
|
|
651
|
+
console.log(
|
|
652
|
+
source_default.green.bold(
|
|
653
|
+
`\u2705 WebSocket endpoint fetched successfully: ${endpointUrl}`
|
|
654
|
+
)
|
|
647
655
|
);
|
|
648
656
|
if (config.webServer && (Array.isArray(config.webServer) ? config.webServer.some((server) => server.port) : config.webServer.port)) {
|
|
649
657
|
await startTunnel(tunnelProcess, {
|