browsermation 0.0.68 → 0.0.71
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/README.md +6 -0
- package/dist/bin/cli.js +24 -11
- package/package.json +5 -3
package/README.md
CHANGED
package/dist/bin/cli.js
CHANGED
|
@@ -42258,7 +42258,7 @@ var {
|
|
|
42258
42258
|
// package.json
|
|
42259
42259
|
var package_default = {
|
|
42260
42260
|
name: "browsermation",
|
|
42261
|
-
version: "0.0.
|
|
42261
|
+
version: "0.0.71",
|
|
42262
42262
|
description: "The testing platform for Playwright by Browsermation.",
|
|
42263
42263
|
main: "./dist/index.js",
|
|
42264
42264
|
types: "./dist/index.d.ts",
|
|
@@ -42269,7 +42269,7 @@ var package_default = {
|
|
|
42269
42269
|
"dist"
|
|
42270
42270
|
],
|
|
42271
42271
|
scripts: {
|
|
42272
|
-
"build:cli": "esbuild src/bin/cli.ts --bundle --platform=node --external:playwright --target=node22 --outfile=dist/bin/cli.js",
|
|
42272
|
+
"build:cli": "esbuild src/bin/cli.ts --bundle --platform=node --external:@browsermation/browser-engine --external:playwright --target=node22 --outfile=dist/bin/cli.js",
|
|
42273
42273
|
build: "rm -rf dist && npm run build:cli",
|
|
42274
42274
|
start: "node dist/bin/cli.js",
|
|
42275
42275
|
"build:start": "npm run build && npm start",
|
|
@@ -42282,7 +42282,7 @@ var package_default = {
|
|
|
42282
42282
|
"browsermation"
|
|
42283
42283
|
],
|
|
42284
42284
|
author: "Browsermation Team",
|
|
42285
|
-
license: "
|
|
42285
|
+
license: "UNLICENSED",
|
|
42286
42286
|
devDependencies: {
|
|
42287
42287
|
"@types/archiver": "^6.0.3",
|
|
42288
42288
|
"@types/node": "^24.0.13",
|
|
@@ -42290,12 +42290,14 @@ var package_default = {
|
|
|
42290
42290
|
typescript: "^5.9.2"
|
|
42291
42291
|
},
|
|
42292
42292
|
dependencies: {
|
|
42293
|
+
"@browsermation/browser-engine": "^0.0.19",
|
|
42293
42294
|
archiver: "^7.0.1",
|
|
42294
42295
|
axios: "^1.10.0",
|
|
42295
42296
|
chalk: "^5.4.1",
|
|
42296
42297
|
commander: "^14.0.0",
|
|
42297
42298
|
"form-data": "^4.0.3",
|
|
42298
42299
|
ora: "^8.2.0",
|
|
42300
|
+
"playwright-core": "^1.57.0",
|
|
42299
42301
|
"tiny-invariant": "^1.3.3",
|
|
42300
42302
|
"ts-morph": "^26.0.0",
|
|
42301
42303
|
"ts-node": "^10.9.2"
|
|
@@ -46633,10 +46635,10 @@ async function upload(zipBuffer, shardNumber, totalShards, playwrightConfig, opt
|
|
|
46633
46635
|
// src/tunnel.ts
|
|
46634
46636
|
var import_node_child_process = require("node:child_process");
|
|
46635
46637
|
function startTunnel(tunnelProcess, options) {
|
|
46636
|
-
if (!process.env.
|
|
46638
|
+
if (!process.env.BM_API_TOKEN) {
|
|
46637
46639
|
console.error(
|
|
46638
46640
|
source_default.red.bold(
|
|
46639
|
-
"\u274C Error:
|
|
46641
|
+
"\u274C Error: BM_API_TOKEN environment variable is not set. Please set it to your tunnel token."
|
|
46640
46642
|
)
|
|
46641
46643
|
);
|
|
46642
46644
|
process.exit(1);
|
|
@@ -46644,13 +46646,13 @@ function startTunnel(tunnelProcess, options) {
|
|
|
46644
46646
|
if (!options?.port) {
|
|
46645
46647
|
console.error(
|
|
46646
46648
|
source_default.red.bold(
|
|
46647
|
-
"\u274C Error: Please provide a port to expose via the tunnel using the --
|
|
46649
|
+
"\u274C Error: Please provide a port to expose via the tunnel using the --port option."
|
|
46648
46650
|
)
|
|
46649
46651
|
);
|
|
46650
46652
|
process.exit(1);
|
|
46651
46653
|
}
|
|
46652
46654
|
const defaultDomain = "browsermationtunnel.com";
|
|
46653
|
-
|
|
46655
|
+
const args = [
|
|
46654
46656
|
"-o",
|
|
46655
46657
|
"StrictHostKeyChecking=no",
|
|
46656
46658
|
"-o",
|
|
@@ -46662,8 +46664,12 @@ function startTunnel(tunnelProcess, options) {
|
|
|
46662
46664
|
"2200",
|
|
46663
46665
|
"http",
|
|
46664
46666
|
"--user",
|
|
46665
|
-
process.env.
|
|
46666
|
-
]
|
|
46667
|
+
process.env.BM_API_TOKEN || ""
|
|
46668
|
+
];
|
|
46669
|
+
if (options.host) {
|
|
46670
|
+
args.push("--host-header-rewrite", options.host);
|
|
46671
|
+
}
|
|
46672
|
+
tunnelProcess = (0, import_node_child_process.spawn)("ssh", args);
|
|
46667
46673
|
process.on("SIGINT", function() {
|
|
46668
46674
|
console.log("\nGracefully shutting down from SIGINT (Ctrl+C)");
|
|
46669
46675
|
if (tunnelProcess) {
|
|
@@ -46694,7 +46700,7 @@ function startTunnel(tunnelProcess, options) {
|
|
|
46694
46700
|
if (data.toString().includes("closed by remote host.")) {
|
|
46695
46701
|
console.error(
|
|
46696
46702
|
source_default.red.bold(
|
|
46697
|
-
"\u274C Error: Please check that your
|
|
46703
|
+
"\u274C Error: Please check that your BM_API_TOKEN is correct and has permissions to create tunnels."
|
|
46698
46704
|
)
|
|
46699
46705
|
);
|
|
46700
46706
|
process.exit(1);
|
|
@@ -46739,12 +46745,19 @@ async function downloadFile(fileUrl, outputLocationPath) {
|
|
|
46739
46745
|
}
|
|
46740
46746
|
|
|
46741
46747
|
// src/bin/cli.ts
|
|
46748
|
+
var import_browser_engine = __toESM(require("@browsermation/browser-engine"));
|
|
46742
46749
|
var program2 = new Command().name("browsermation").version(package_default.version).description(package_default.description);
|
|
46743
|
-
program2.command("tunnel").option("-p, --port <port>").action(async (options) => {
|
|
46750
|
+
program2.command("tunnel").option("-p, --port <port>").option("-h, --host <host>").action(async (options) => {
|
|
46744
46751
|
console.log(source_default.blue(`\u{1F680} Starting BrowserMation Tunnel...`));
|
|
46745
46752
|
let tunnelProcess = null;
|
|
46746
46753
|
await startTunnel(tunnelProcess, options);
|
|
46747
46754
|
});
|
|
46755
|
+
program2.command("runner").option("-p, --port <port>").option("-t, --tunnel").action(async (options) => {
|
|
46756
|
+
await (0, import_browser_engine.default)({
|
|
46757
|
+
port: options.port || 3e3,
|
|
46758
|
+
tunnel: options.tunnel || false
|
|
46759
|
+
});
|
|
46760
|
+
});
|
|
46748
46761
|
program2.command("test").option("-t, --tunnel <port>").option("-p, --proxy").option("--project <project>", "Run a specific project").option(
|
|
46749
46762
|
"-s, --subdomain <subdomain>",
|
|
46750
46763
|
"Use subdomain <subdomain> for BrowserMation tunnel"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browsermation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.71",
|
|
4
4
|
"description": "The testing platform for Playwright by Browsermation.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build:cli": "esbuild src/bin/cli.ts --bundle --platform=node --external:playwright --target=node22 --outfile=dist/bin/cli.js",
|
|
14
|
+
"build:cli": "esbuild src/bin/cli.ts --bundle --platform=node --external:@browsermation/browser-engine --external:playwright --target=node22 --outfile=dist/bin/cli.js",
|
|
15
15
|
"build": "rm -rf dist && npm run build:cli",
|
|
16
16
|
"start": "node dist/bin/cli.js",
|
|
17
17
|
"build:start": "npm run build && npm start",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"browsermation"
|
|
25
25
|
],
|
|
26
26
|
"author": "Browsermation Team",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "UNLICENSED",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/archiver": "^6.0.3",
|
|
30
30
|
"@types/node": "^24.0.13",
|
|
@@ -32,12 +32,14 @@
|
|
|
32
32
|
"typescript": "^5.9.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@browsermation/browser-engine": "^0.0.19",
|
|
35
36
|
"archiver": "^7.0.1",
|
|
36
37
|
"axios": "^1.10.0",
|
|
37
38
|
"chalk": "^5.4.1",
|
|
38
39
|
"commander": "^14.0.0",
|
|
39
40
|
"form-data": "^4.0.3",
|
|
40
41
|
"ora": "^8.2.0",
|
|
42
|
+
"playwright-core": "^1.57.0",
|
|
41
43
|
"tiny-invariant": "^1.3.3",
|
|
42
44
|
"ts-morph": "^26.0.0",
|
|
43
45
|
"ts-node": "^10.9.2"
|