@rushstack/playwright-browser-tunnel 0.1.0

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.
Files changed (55) hide show
  1. package/.rush/temp/chunked-rush-logs/playwright-browser-tunnel._phase_build.chunks.jsonl +8 -0
  2. package/.rush/temp/operation/_phase_build/all.log +8 -0
  3. package/.rush/temp/operation/_phase_build/log-chunks.jsonl +8 -0
  4. package/.rush/temp/operation/_phase_build/state.json +3 -0
  5. package/.rush/temp/rushstack+playwright-browser-tunnel-_phase_build-83a085f61cdc0a4bb81c20aa939830fc5b5cff2f.tar.log +42 -0
  6. package/.rush/temp/shrinkwrap-deps.json +104 -0
  7. package/CHANGELOG.json +17 -0
  8. package/CHANGELOG.md +11 -0
  9. package/README.md +128 -0
  10. package/config/api-extractor.json +19 -0
  11. package/config/rig.json +7 -0
  12. package/dist/playwright-browser-tunnel.d.ts +276 -0
  13. package/eslint.config.js +18 -0
  14. package/lib/HttpServer.d.ts +20 -0
  15. package/lib/HttpServer.d.ts.map +1 -0
  16. package/lib/HttpServer.js +77 -0
  17. package/lib/HttpServer.js.map +1 -0
  18. package/lib/LaunchOptionsValidator.d.ts +93 -0
  19. package/lib/LaunchOptionsValidator.d.ts.map +1 -0
  20. package/lib/LaunchOptionsValidator.js +163 -0
  21. package/lib/LaunchOptionsValidator.js.map +1 -0
  22. package/lib/PlaywrightBrowserTunnel.d.ts +92 -0
  23. package/lib/PlaywrightBrowserTunnel.d.ts.map +1 -0
  24. package/lib/PlaywrightBrowserTunnel.js +468 -0
  25. package/lib/PlaywrightBrowserTunnel.js.map +1 -0
  26. package/lib/index.d.ts +23 -0
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +33 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/tsdoc-metadata.json +11 -0
  31. package/lib/tunneledBrowserConnection.d.ts +48 -0
  32. package/lib/tunneledBrowserConnection.d.ts.map +1 -0
  33. package/lib/tunneledBrowserConnection.js +216 -0
  34. package/lib/tunneledBrowserConnection.js.map +1 -0
  35. package/lib/utilities.d.ts +17 -0
  36. package/lib/utilities.d.ts.map +1 -0
  37. package/lib/utilities.js +41 -0
  38. package/lib/utilities.js.map +1 -0
  39. package/package.json +44 -0
  40. package/playwright.config.ts +45 -0
  41. package/rush-logs/playwright-browser-tunnel._phase_build.cache.log +3 -0
  42. package/rush-logs/playwright-browser-tunnel._phase_build.log +8 -0
  43. package/src/HttpServer.ts +87 -0
  44. package/src/LaunchOptionsValidator.ts +234 -0
  45. package/src/PlaywrightBrowserTunnel.ts +590 -0
  46. package/src/index.ts +38 -0
  47. package/src/tunneledBrowserConnection.ts +284 -0
  48. package/src/utilities.ts +42 -0
  49. package/temp/build/lint/_eslint-5eVG3S6w.json +30 -0
  50. package/temp/build/lint/lint.sarif +233 -0
  51. package/temp/build/typescript/ts_l9Fw4VUO.json +1 -0
  52. package/temp/playwright-browser-tunnel.api.md +120 -0
  53. package/tests/demo.spec.ts +10 -0
  54. package/tests/testFixture.ts +22 -0
  55. package/tsconfig.json +6 -0
@@ -0,0 +1,8 @@
1
+ {"kind":"O","text":"Invoking: heft run --only build -- --clean --production\n"}
2
+ {"kind":"O","text":" ---- build started ---- \n"}
3
+ {"kind":"O","text":"[build:typescript] Using TypeScript version 5.8.2\n"}
4
+ {"kind":"O","text":"[build:lint] Using ESLint version 9.37.0\n"}
5
+ {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.55.5\n"}
6
+ {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.8.2\n"}
7
+ {"kind":"O","text":" ---- build finished (22.696s) ---- \n"}
8
+ {"kind":"O","text":"\u001b[1m\u001b[32m-------------------- Finished (22.704s) --------------------\u001b[39m\u001b[22m\n"}
@@ -0,0 +1,8 @@
1
+ Invoking: heft run --only build -- --clean --production
2
+ ---- build started ----
3
+ [build:typescript] Using TypeScript version 5.8.2
4
+ [build:lint] Using ESLint version 9.37.0
5
+ [build:api-extractor] Using API Extractor version 7.55.5
6
+ [build:api-extractor] Analysis will use the bundled TypeScript version 5.8.2
7
+ ---- build finished (22.696s) ----
8
+ -------------------- Finished (22.704s) --------------------
@@ -0,0 +1,8 @@
1
+ {"kind":"O","text":"Invoking: heft run --only build -- --clean --production\n"}
2
+ {"kind":"O","text":" ---- build started ---- \n"}
3
+ {"kind":"O","text":"[build:typescript] Using TypeScript version 5.8.2\n"}
4
+ {"kind":"O","text":"[build:lint] Using ESLint version 9.37.0\n"}
5
+ {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.55.5\n"}
6
+ {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.8.2\n"}
7
+ {"kind":"O","text":" ---- build finished (22.696s) ---- \n"}
8
+ {"kind":"O","text":"\u001b[1m\u001b[32m-------------------- Finished (22.704s) --------------------\u001b[39m\u001b[22m\n"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "nonCachedDurationMs": 23874.630682000017
3
+ }
@@ -0,0 +1,42 @@
1
+ Start time: Sat Jan 24 2026 01:09:00 GMT+0000 (Coordinated Universal Time)
2
+ Invoking "/usr/bin/tar -c -f /mnt/vss/_work/1/s/common/temp/build-cache/rushstack+playwright-browser-tunnel-_phase_build-83a085f61cdc0a4bb81c20aa939830fc5b5cff2f-a7eb0343c78a82a6.temp -z --files-from=-"
3
+
4
+ ======= BEGIN PROCESS INPUT ======
5
+ .rush/temp/operation/_phase_build/all.log
6
+ .rush/temp/operation/_phase_build/log-chunks.jsonl
7
+ .rush/temp/operation/_phase_build/state.json
8
+ dist/playwright-browser-tunnel.d.ts
9
+ lib/HttpServer.d.ts
10
+ lib/HttpServer.d.ts.map
11
+ lib/HttpServer.js
12
+ lib/HttpServer.js.map
13
+ lib/LaunchOptionsValidator.d.ts
14
+ lib/LaunchOptionsValidator.d.ts.map
15
+ lib/LaunchOptionsValidator.js
16
+ lib/LaunchOptionsValidator.js.map
17
+ lib/PlaywrightBrowserTunnel.d.ts
18
+ lib/PlaywrightBrowserTunnel.d.ts.map
19
+ lib/PlaywrightBrowserTunnel.js
20
+ lib/PlaywrightBrowserTunnel.js.map
21
+ lib/index.d.ts
22
+ lib/index.d.ts.map
23
+ lib/index.js
24
+ lib/index.js.map
25
+ lib/tsdoc-metadata.json
26
+ lib/tunneledBrowserConnection.d.ts
27
+ lib/tunneledBrowserConnection.d.ts.map
28
+ lib/tunneledBrowserConnection.js
29
+ lib/tunneledBrowserConnection.js.map
30
+ lib/utilities.d.ts
31
+ lib/utilities.d.ts.map
32
+ lib/utilities.js
33
+ lib/utilities.js.map
34
+ temp/build/lint/_eslint-5eVG3S6w.json
35
+ temp/build/lint/lint.sarif
36
+ temp/build/typescript/ts_l9Fw4VUO.json
37
+ temp/playwright-browser-tunnel.api.md
38
+ ======== END PROCESS INPUT =======
39
+ ======= BEGIN PROCESS OUTPUT =======
40
+ ======== END PROCESS OUTPUT ========
41
+
42
+ Exited with code "0"
@@ -0,0 +1,104 @@
1
+ {
2
+ "../../../apps/playwright-browser-tunnel": "../../../apps/playwright-browser-tunnel:VAFT2Uck1psUu/wgAGu6FEIRmrknNzLBuqYSnDfdQcE=:",
3
+ "@eslint-community/eslint-utils@4.9.1(eslint@9.37.0)": "@eslint-community/eslint-utils@4.9.1(eslint@9.37.0):pV7d94Vt5clzbavGnpkK+61F+5rS6yhGRWSY9HuA0As=:",
4
+ "@eslint-community/regexpp@4.12.2": "@eslint-community/regexpp@4.12.2:uyU80Ai40ZGDQuC92buVjo14SacTIk973Fr0MVtegFM=:",
5
+ "@eslint/config-array@0.21.1(supports-color@8.1.1)": "@eslint/config-array@0.21.1(supports-color@8.1.1):BjPPdCV5Gps4AZbqok+KhAPNwYuYHqaV7Ykl9pzMX+8=:",
6
+ "@eslint/config-helpers@0.4.2": "@eslint/config-helpers@0.4.2:OQdwP6BWyWIP2cHcj6QsSKp4aZLy4SIvBcCT09oBoBQ=:",
7
+ "@eslint/core@0.16.0": "@eslint/core@0.16.0:uzexS4qhmTDm8p5iApsOFpljpWgc7qKg9r9GGqrWzEE=:",
8
+ "@eslint/core@0.17.0": "@eslint/core@0.17.0:cHGqSr/9YApIhRP1zR3cifWv6FHEI/8z3xArH1WgAmE=:",
9
+ "@eslint/eslintrc@3.3.3(supports-color@8.1.1)": "@eslint/eslintrc@3.3.3(supports-color@8.1.1):ShwO2tSNyy1rB84VRfRN2uZ9v6C8pnoNqEGUth4xQAA=:",
10
+ "@eslint/js@9.37.0": "@eslint/js@9.37.0:1lHv+cylTPmaROJN1v+8t/cCOs2jawM8vupYMA3wfiw=:",
11
+ "@eslint/object-schema@2.1.7": "@eslint/object-schema@2.1.7:jSARpbAJ2LddSiVdJ/haY5BZQWoFbBzpJbgwBNzsK/Q=:",
12
+ "@eslint/plugin-kit@0.4.1": "@eslint/plugin-kit@0.4.1:U6S4UH9ougLAXu8snBF6KcGRAXOoHRNhy7UdpKr7P6M=:",
13
+ "@humanfs/core@0.19.1": "@humanfs/core@0.19.1:wVMMJ7xR7qZsFBWq1CxNkTDgR8snl9RoLZ4sH6O/HZM=:",
14
+ "@humanfs/node@0.16.7": "@humanfs/node@0.16.7:xINqZCR6kwIO6xT8DoNiqgB3td5hBnIvvaDgHS4UdEY=:",
15
+ "@humanwhocodes/module-importer@1.0.1": "@humanwhocodes/module-importer@1.0.1:fCoQC76P4Q2f226CjJ4vv5EpSL0Ainb2lbdIe97K1Rc=:",
16
+ "@humanwhocodes/retry@0.4.3": "@humanwhocodes/retry@0.4.3:dWob8oSma9FiVHp6V9fD4fB7S4qF4lhJOj7e6ZgdmOs=:",
17
+ "@playwright/test@1.56.1": "@playwright/test@1.56.1:pdUlT2QUyr1MoKBMsmPf1zstnjAlhS+SR4uhJlcPhtA=:",
18
+ "@types/estree@1.0.8": "@types/estree@1.0.8:727QzLEbjgy3FW8Yk/uPIap1d/zZp1OEZ2HILIT9sT0=:",
19
+ "@types/json-schema@7.0.15": "@types/json-schema@7.0.15:5S/TXvz5YP0wDZWCWUSdt1XDMkd9xx63ujRzhL/gHU4=:",
20
+ "@types/node@20.17.19": "@types/node@20.17.19:+6KIVq7zX8nA6B25Ngx73W26GCcLlrkrFk5GaNt15ho=:",
21
+ "@types/node@22.9.3": "@types/node@22.9.3:t0gtGlLs8WG40aHdH+VfugJr0QpnJsBHUeDRLsN/E8g=:",
22
+ "@types/semver@7.5.0": "@types/semver@7.5.0:cBnHv74/WywAe4Zc8V2nX4hcYm21FBnW+Vl+YpY+Hhs=:",
23
+ "@types/ws@8.5.5": "@types/ws@8.5.5:g2S9VjIbuP2mC6EXAo7J60f4Qi2dwQb38JH8iHn6cn8=:",
24
+ "acorn-jsx@5.3.2(acorn@8.15.0)": "acorn-jsx@5.3.2(acorn@8.15.0):fYH9IGa681Wprd2CRN1aUjancVsqumDOmywpFTf5AtI=:",
25
+ "acorn@8.15.0": "acorn@8.15.0:mx7eZhL1y7nHABvAD/MxE7xMMjwGbTabG8ZBsg09kTA=:",
26
+ "ajv@6.12.6": "ajv@6.12.6:Ryd2S/pDCZXGjaJ48IE14Vqa2/k+mLa4SA86apZM7p8=:",
27
+ "ansi-styles@4.3.0": "ansi-styles@4.3.0:ZWSFBwfXYCdLBmX2ZXoVqBWX7sfMR5ZmhLs9Hyh39XY=:",
28
+ "argparse@2.0.1": "argparse@2.0.1:CP2O+CSzekXy2j3jQ2OmDYinunOHtc5Csm3rkUFULc8=:",
29
+ "balanced-match@1.0.2": "balanced-match@1.0.2:gfGr4W+ea8r5s//ubOMelyZUtW6NYxDKRn7E320nT9E=:",
30
+ "brace-expansion@1.1.12": "brace-expansion@1.1.12:WZ7loigFQpKsxn/o3ZZyFCIEJvMvQqIiWubBtlXlQFE=:",
31
+ "callsites@3.1.0": "callsites@3.1.0:idWjoLeDJlAOwomjUQAaBzJpd4IMT3jWXtplCrKm6Ww=:",
32
+ "chalk@4.1.2": "chalk@4.1.2:Ye65wHsxO5agCiS0ku7VLLTcMR3e7m+jrhWtLo91SF4=:",
33
+ "color-convert@2.0.1": "color-convert@2.0.1:hZZd3CXw35XLVUEhmk6HzkHqcS6buTTuyYdCKAwTOK0=:",
34
+ "color-name@1.1.4": "color-name@1.1.4:Hgpi2Zjl2gtvUFUeFu42DzFvXVPruG3eFssCSCVbWE8=:",
35
+ "concat-map@0.0.1": "concat-map@0.0.1:GoKrPWMm+s3dcLfPBXyb8fDpbzIk2Y+KRd32fgfdNAM=:",
36
+ "cross-spawn@7.0.6": "cross-spawn@7.0.6:QjGdMcMYECyN5KGfM8tKE6N8fydsYKJWcjXEKd2LNC0=:",
37
+ "debug@4.4.3(supports-color@8.1.1)": "debug@4.4.3(supports-color@8.1.1):ANJDTwuR2ff7h9OW74kfn2QhH6QfrX46YyeOCgPXZ14=:",
38
+ "deep-is@0.1.4": "deep-is@0.1.4:9bzdBDlCEbKIHwMcLTgO5A7Cx9Qt2EvGWJ6rFD82XiU=:",
39
+ "escape-string-regexp@4.0.0": "escape-string-regexp@4.0.0:CPzYl7HWqJw841Bt4gVlED3dDts6LmLIZgDLWvZQwBY=:",
40
+ "eslint-scope@8.4.0": "eslint-scope@8.4.0:8sCuk/6sg3/iCXu4ikInhuUYyvcQoTXETHdBY6JCzr0=:",
41
+ "eslint-visitor-keys@3.4.3": "eslint-visitor-keys@3.4.3:JgR2rf9Jpzva8lFrKE+5yhxLwgC8qNXtm9LsuSBeAT8=:",
42
+ "eslint-visitor-keys@4.2.1": "eslint-visitor-keys@4.2.1:uyQNsuDcPZL1cJ29uclbt/ITeoMox36b0gbaWL8EB2E=:",
43
+ "eslint@9.37.0": "eslint@9.37.0:rk3skjy1IyyOhzGEhT2sq+UKUs3RmcUrWMaScHhroz0=:",
44
+ "espree@10.4.0": "espree@10.4.0:NLXs2uyUi7cK0j1u0OxWFDO6zYcblsb73pCi4SupIOE=:",
45
+ "esquery@1.7.0": "esquery@1.7.0:7lTtVBqirWgWzvUR2UO+6Vgzeyg40AnBbmtPEJHSYnI=:",
46
+ "esrecurse@4.3.0": "esrecurse@4.3.0:Uyo8CNm+VUgeJSS5C3ZgOky7Jzoy9NqvDpoJmqgzC1s=:",
47
+ "estraverse@5.3.0": "estraverse@5.3.0:00AEUywuhKDu6n0lVb10DR2UWrNOIvYuMGqHj0CdwnU=:",
48
+ "esutils@2.0.3": "esutils@2.0.3:aJX9PGT17yCKr7iAZ5tgGa3YKT3+hJEsQnqywiqu4Ls=:",
49
+ "fast-deep-equal@3.1.3": "fast-deep-equal@3.1.3:sQzlu0W93kExDoLpH+J9nRYeCD3IKRR56QR+L5402As=:",
50
+ "fast-json-stable-stringify@2.1.0": "fast-json-stable-stringify@2.1.0:K10zIkqqk5HN6fyP489Qokzz+PPha5DypCjM/vsSlHQ=:",
51
+ "fast-levenshtein@2.0.6": "fast-levenshtein@2.0.6:cj7tvs40k4b5TCsQAzLpftvxrNH656DEVTohBtwuznY=:",
52
+ "file-entry-cache@8.0.0": "file-entry-cache@8.0.0:SQqaU0bN18sw2FrNETBKmQ2diPepNTukqj8c1h6Z17M=:",
53
+ "find-up@5.0.0": "find-up@5.0.0:qGgTzQhtN9dzd8OFSODArCGrmz7K7p1ru5REFT+nuJM=:",
54
+ "flat-cache@4.0.1": "flat-cache@4.0.1:a+DWDtWKRdbcXR3b2WwRzt19oEmJI2bzSsPiFD4OftY=:",
55
+ "flatted@3.3.3": "flatted@3.3.3:n/tySR+oJ9GqN0MHUglQk6rKnm/pocLOndnVVqnwZX8=:",
56
+ "fsevents@2.3.2": "fsevents@2.3.2:bNXAkzb2IPp9wM21PQ4kmMBZQP1jfL1E0/P7aFe2MAE=:",
57
+ "glob-parent@6.0.2": "glob-parent@6.0.2:0p37uOI61LJEBi5J0LqvCZpybCryfpCHpgXAbdojSAU=:",
58
+ "globals@14.0.0": "globals@14.0.0:8M+Pg41xX4x7jxpJEHvAkp8r+p6TD38x0LOnrLneS38=:",
59
+ "has-flag@4.0.0": "has-flag@4.0.0:zgfmr3OsDLCMHlibU0ENn6OJauYzOf52DD0KUMi60HM=:",
60
+ "ignore@5.3.2": "ignore@5.3.2:yDHLBnXz3uWHnrTYakTFCNYHQ8taE2k5y6mSNt2aPIA=:",
61
+ "import-fresh@3.3.1": "import-fresh@3.3.1:V85oxEIxh/3C01hNHGqCBxZvLr0D/OsKG70pMGc2c0U=:",
62
+ "imurmurhash@0.1.4": "imurmurhash@0.1.4:Do4JJP58nt9bhIKZ6PdBxKNLuILFDd2QEH8LRaO9rvE=:",
63
+ "is-extglob@2.1.1": "is-extglob@2.1.1:AMteoIRG/AM61zOJM8SDhzp+j5Az1DLUiE+Xa0axHgc=:",
64
+ "is-glob@4.0.3": "is-glob@4.0.3:IV1BYKFvh0lG6Iv4rcSZbUF8fezvPI6gta6HezidaLA=:",
65
+ "isexe@2.0.0": "isexe@2.0.0:8n/cuvODXVLGPi7fczU6oeUOBtC1KPQg3RpBNdTdLPc=:",
66
+ "js-yaml@4.1.1": "js-yaml@4.1.1:U1+0lgDx+2f92l4id3YhAISRxaHOuGpc0d+LD6yKbrI=:",
67
+ "json-buffer@3.0.1": "json-buffer@3.0.1:KnG+FGWhYZ7WwE6FB1gTZ1x+vLjjpFK5hEP3osbgBos=:",
68
+ "json-schema-traverse@0.4.1": "json-schema-traverse@0.4.1:MmYShm+RH8i/sFAvj54xnWkkSkqqYi7EpDgoXnyqus4=:",
69
+ "json-stable-stringify-without-jsonify@1.0.1": "json-stable-stringify-without-jsonify@1.0.1:TDV4Iv8qj2BIUNgKi3LYEx9gKwYu2Azddhj50w6wTws=:",
70
+ "keyv@4.5.4": "keyv@4.5.4:IOAKQ0jOlet3hwxtEDYImR5HjaBV79JKkCnqiVDhjwM=:",
71
+ "levn@0.4.1": "levn@0.4.1:RV/RjN8oIKM36mly7RXqmmuZwnsfJvN9fuLBZK+Ht10=:",
72
+ "locate-path@6.0.0": "locate-path@6.0.0:E+wgrR8ZCmpCgttUQXSCTlPKs302KbvcF8qt5X/MbcU=:",
73
+ "lodash.merge@4.6.2": "lodash.merge@4.6.2:EXgcubv0+a/3dVPS5zFM1runKQWf9swiWEUu51lBRqw=:",
74
+ "lru-cache@6.0.0": "lru-cache@6.0.0:3AD1svQPW1+cP8N7PBlyo7Vbo2CBtRMgnBp+SQkY3Jo=:",
75
+ "minimatch@3.1.2": "minimatch@3.1.2:760dxYkpzsi3CWx9C5IcpXx924w+anGnFHkN6mxMxto=:",
76
+ "ms@2.1.3": "ms@2.1.3:xgLWg3kVMamVjHxNqBOX2ye0Wk7IMAMEzH0+Ih3GdAI=:",
77
+ "natural-compare@1.4.0": "natural-compare@1.4.0:TYI1bmKu+ZHaobZXs/B5hNXj1gFjP1MbXA/aTJrSvXk=:",
78
+ "optionator@0.9.4": "optionator@0.9.4:VXQcNvIxRkutRM+nV1xLnPEIz3OkO0yzxnaUtDpUbFE=:",
79
+ "p-limit@3.1.0": "p-limit@3.1.0:LdKRSSgTab016qRCjAyMxtMfWqqbZWRWjYN5Azfl13Q=:",
80
+ "p-locate@5.0.0": "p-locate@5.0.0:jSPkRsfoMWQdFIprhJqMLiq3pQVVMpAKDWCH+Jzzyhc=:",
81
+ "parent-module@1.0.1": "parent-module@1.0.1:7jcQBBr0dPfjyj7XXd1T3kplUES6v+rOhYu0x8cMK5I=:",
82
+ "path-exists@4.0.0": "path-exists@4.0.0:U8NGTjSfw+tTNMrI25cZA7Kr4QZlrBG6tOCKmu3WuJA=:",
83
+ "path-key@3.1.1": "path-key@3.1.1:G/7uS4scwsLV/mJitoXLEoSeLcbOLyC7mq3JaNY5L/Y=:",
84
+ "playwright-core@1.56.1": "playwright-core@1.56.1:KmvAlXcQEsa4yYhXi0planXfrk0mmtKVdJAqpcre1Vw=:",
85
+ "playwright@1.56.1": "playwright@1.56.1:pngkVuSZ2DV4D3e40SnraHTYxwxwx7oFNJlCuPUAh44=:",
86
+ "prelude-ls@1.2.1": "prelude-ls@1.2.1:77jm+R+stVYevlHR6mLJHVcOyB9clSWbWPCMOrhoFM4=:",
87
+ "punycode@2.3.1": "punycode@2.3.1:hBQ2kq3SCuY+AhrWXH8OhCuKpGtK75O10qdh6clgs7g=:",
88
+ "resolve-from@4.0.0": "resolve-from@4.0.0:DX1R0DdeDdDijEG++piS/gfwnUozHRPIUEeE+d9jpuk=:",
89
+ "semver@7.5.4": "semver@7.5.4:vr18fdeTHE/7/4+CZQKpQvhoyIF589eUll5uzzQA25I=:",
90
+ "shebang-command@2.0.0": "shebang-command@2.0.0:OLAZ6j51uPEAszP1K4Rex7GU7xSTv4E8umEZftOq2Ag=:",
91
+ "shebang-regex@3.0.0": "shebang-regex@3.0.0:ny+KjAiF2rsJrYeyelqno4XXRBhG1xbGdeGqew0SiFE=:",
92
+ "string-argv@0.3.2": "string-argv@0.3.2:+8yETLVj+NVram+4+d1tPctOQVhWroEJQkJhxH4XHKw=:",
93
+ "strip-json-comments@3.1.1": "strip-json-comments@3.1.1:b7Guud8xp0BNfyZNDrMqD/tnkn5cu9tjzD+P3X7OI9Y=:",
94
+ "supports-color@7.2.0": "supports-color@7.2.0:sYeXIOoG2x32GA0jy95SyyfTIGn4njaK3SOfylJNpbE=:",
95
+ "supports-color@8.1.1": "supports-color@8.1.1:IlKnJib+1wvgnU/NB8X/o14yZNJZAaN87xE6uQ0OU7I=:",
96
+ "type-check@0.4.0": "type-check@0.4.0:IVtRP5BW1I8SGLuymCsuyGHe6YzISs02l3ZaR/nY1kw=:",
97
+ "undici-types@6.19.8": "undici-types@6.19.8:M3UKXFY+kvTf3TQ0qq53jqwsCpwWEyI+A/MbyHL0rVU=:",
98
+ "uri-js@4.4.1": "uri-js@4.4.1:Q2BobLd4waRYnsj44SvcxeaDwkPIjLhPfH3BclqOaF4=:",
99
+ "which@2.0.2": "which@2.0.2:80HW1PmNzsNX+pyT6n7O+c62iDakyLL2/dI8hSmvNlk=:",
100
+ "word-wrap@1.2.5": "word-wrap@1.2.5:lNGZNaQ0hxB5pVG85e6u0w4w0K+uOJi6Y2P1fJqOqRo=:",
101
+ "ws@8.14.2": "ws@8.14.2:495eqSMGTG4fTLVkvOEGhqoXqAm0IjaxgWNMtJQIGyg=:",
102
+ "yallist@4.0.0": "yallist@4.0.0:g1l0JjkndK5+D0dThS2GGmGJkQ/MTilVWHNa5Je4fy4=:",
103
+ "yocto-queue@0.1.0": "yocto-queue@0.1.0:Dtxi56M74yiecaLhTY5kTZuzXvCHfjZlLQG4jzDqAAc=:"
104
+ }
package/CHANGELOG.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@rushstack/playwright-browser-tunnel",
3
+ "entries": [
4
+ {
5
+ "version": "0.1.0",
6
+ "tag": "@rushstack/playwright-browser-tunnel_v0.1.0",
7
+ "date": "Sat, 24 Jan 2026 01:13:02 GMT",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "comment": "Introduce CLI based tool to launch a remote browser provider for Playwright."
12
+ }
13
+ ]
14
+ }
15
+ }
16
+ ]
17
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Change Log - @rushstack/playwright-browser-tunnel
2
+
3
+ This log was last generated on Sat, 24 Jan 2026 01:13:02 GMT and should not be manually modified.
4
+
5
+ ## 0.1.0
6
+ Sat, 24 Jan 2026 01:13:02 GMT
7
+
8
+ ### Minor changes
9
+
10
+ - Introduce CLI based tool to launch a remote browser provider for Playwright.
11
+
package/README.md ADDED
@@ -0,0 +1,128 @@
1
+
2
+ # @rushstack/playwright-browser-tunnel
3
+
4
+ Run a Playwright browser server in one environment and drive it from another environment by forwarding Playwright’s WebSocket traffic through a tunnel.
5
+
6
+ This package is intended for remote development / CI scenarios (for example: Codespaces, devcontainers, or a separate “browser host” machine) where you want tests to run “here” but the actual browser process to run “there”.
7
+
8
+ ## Relationship to the Playwright on Codespaces VS Code extension
9
+
10
+ This package is the core tunneling/runtime layer used by the **Playwright on Codespaces** VS Code extension (located at [vscode-extensions/playwright-on-codespaces-vscode-extension](../../vscode-extensions/playwright-on-codespaces-vscode-extension)).
11
+
12
+ In a typical Codespaces workflow:
13
+
14
+ - Your **tests** run inside the Codespace and call `tunneledBrowserConnection()`.
15
+ - `tunneledBrowserConnection()` starts a WebSocket server (by default on port `3000`) that a browser host can attach to.
16
+ - The VS Code extension runs on the **UI side** and starts a `PlaywrightTunnel` which connects to `ws://127.0.0.1:3000`.
17
+ - In Codespaces, this works when port `3000` is forwarded to your local machine (VS Code port forwarding makes the remote port reachable as `localhost:3000`).
18
+ - Once connected, the extension hosts the actual Playwright browser process locally, while your tests continue to run remotely.
19
+
20
+ The extension provides a UI wrapper around this library (start/stop commands, status bar state, and logs), while `@rushstack/playwright-browser-tunnel` provides the underlying protocol forwarding and browser lifecycle management.
21
+
22
+ ### Detecting whether the VS Code extension is present
23
+
24
+ Some remote test fixtures want to detect whether the **Playwright on Codespaces** extension is installed/active (for example, to skip local-browser-only scenarios when the extension isn’t available).
25
+
26
+ The extension writes a marker file named `.playwright-codespaces-extension-installed.txt` into the remote environment’s `os.tmpdir()` using VS Code’s remote filesystem APIs.
27
+
28
+ On the remote side, `isExtensionInstalledAsync()` checks for that marker file and returns `true` if it exists:
29
+
30
+ ```ts
31
+ import { isExtensionInstalledAsync } from '@rushstack/playwright-browser-tunnel';
32
+
33
+ if (!(await isExtensionInstalledAsync())) {
34
+ throw new Error('Playwright on Codespaces extension is not installed/active in this environment');
35
+ }
36
+ ```
37
+
38
+
39
+ ## Requirements
40
+
41
+ - Node.js `>= 20` (see `engines` in `package.json`)
42
+ - A compatible Playwright version (this package is built/tested with Playwright `1.56.x`)
43
+
44
+ ## Exports
45
+
46
+ From [src/index.ts](src/index.ts):
47
+
48
+ - `PlaywrightTunnel` (class)
49
+ - `IPlaywrightTunnelOptions` (type)
50
+ - `TunnelStatus` (type)
51
+ - `BrowserNames` (type)
52
+ - `tunneledBrowserConnection()` (function)
53
+ - `tunneledBrowser()` (function)
54
+ - `IDisposableTunneledBrowserConnection` (type)
55
+ - `isExtensionInstalledAsync()` (function)
56
+
57
+ ## Usage
58
+
59
+ There are two pieces:
60
+
61
+ 1) **Browser host**: run a `PlaywrightTunnel` to launch the real browser server and forward messages.
62
+ 2) **Test runner**: create a local endpoint via `tunneledBrowserConnection()` that your Playwright client can connect to (it forwards to the browser host).
63
+
64
+ ### 1) Browser host: run the tunnel
65
+
66
+ Use `PlaywrightTunnel` in the environment where you want the browser process to run.
67
+
68
+ ```ts
69
+ import { ConsoleTerminalProvider, Terminal, TerminalProviderSeverity } from '@rushstack/terminal';
70
+ import { PlaywrightTunnel } from '@rushstack/playwright-browser-tunnel';
71
+ import path from 'node:path';
72
+ import os from 'node:os';
73
+
74
+ const terminalProvider = new ConsoleTerminalProvider();
75
+ const terminal = new Terminal(terminalProvider);
76
+
77
+ const tunnel = new PlaywrightTunnel({
78
+ mode: 'wait-for-incoming-connection',
79
+ listenPort: 3000,
80
+ tmpPath: path.join(os.tmpdir(), 'playwright-browser-tunnel'),
81
+ terminal,
82
+ onStatusChange: (status) => terminal.writeLine(`status: ${status}`)
83
+ });
84
+
85
+ await tunnel.startAsync({ keepRunning: true });
86
+ ```
87
+
88
+ Notes:
89
+
90
+ - `mode: 'wait-for-incoming-connection'` starts a WebSocket server and waits for the other side to connect.
91
+ - `mode: 'poll-connection'` repeatedly attempts to connect to a WebSocket endpoint you provide (`wsEndpoint`).
92
+ - `tmpPath` is used as a working directory to install the requested `playwright-core` version and run its CLI.
93
+
94
+ ### 2) Test runner: create a local endpoint to connect()
95
+
96
+ Use `tunneledBrowserConnection()` in the environment where your tests run.
97
+
98
+ It starts:
99
+
100
+ - a **remote** WebSocket server (port `3000`) that the browser host connects to
101
+ - a **local** WebSocket endpoint (random port) that your Playwright client connects to
102
+
103
+ ```ts
104
+ import { tunneledBrowserConnection } from '@rushstack/playwright-browser-tunnel';
105
+ import playwright from 'playwright-core';
106
+
107
+ using connection = await tunneledBrowserConnection();
108
+
109
+ // Build the connect URL with query parameters consumed by the local proxy.
110
+ const url = new URL(connection.remoteEndpoint);
111
+ url.searchParams.set('browser', 'chromium');
112
+ url.searchParams.set('launchOptions', JSON.stringify({ headless: true }));
113
+
114
+ const browser = await playwright.chromium.connect(url.toString());
115
+ // ...run tests...
116
+ await browser.close();
117
+ ```
118
+
119
+ ## Development
120
+
121
+ - Build: `rush build --to playwright-browser-tunnel`
122
+ - Demo script (if configured): `rushx demo`
123
+
124
+ ## Troubleshooting
125
+
126
+ - If the tunnel is stuck in `waiting-for-connection`, ensure the counterpart process is reachable and ports are forwarded correctly.
127
+ - If browser installation is slow/repeated, ensure `tmpPath` is stable and writable for the host environment.
128
+
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts",
5
+
6
+ "apiReport": {
7
+ "enabled": true,
8
+ "reportFolder": "../../../common/reviews/api"
9
+ },
10
+
11
+ "docModel": {
12
+ "enabled": true,
13
+ "apiJsonFilePath": "../../../common/temp/api/<unscopedPackageName>.api.json"
14
+ },
15
+
16
+ "dtsRollup": {
17
+ "enabled": true
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ // The "rig.json" file directs tools to look for their config files in an external package.
3
+ // Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4
+ "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5
+
6
+ "rigPackageName": "local-node-rig"
7
+ }
@@ -0,0 +1,276 @@
1
+ /**
2
+ * Run a Playwright browser server in one environment and drive it from another environment by
3
+ * forwarding Playwright's WebSocket traffic through a tunnel.
4
+ *
5
+ * @remarks
6
+ * This package is intended for remote development and CI scenarios (for example: Codespaces,
7
+ * devcontainers, or a separate "browser host" machine) where you want tests to run in one
8
+ * environment but the actual browser process to run in another.
9
+ *
10
+ * The package provides two main APIs:
11
+ * - {@link PlaywrightTunnel} - Run on the browser host to launch the real browser server and forward messages
12
+ * - {@link tunneledBrowserConnection} - Run on the test runner to create a local endpoint that your Playwright client can connect to
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ import type { Browser } from 'playwright-core';
18
+ import { ITerminal } from '@rushstack/terminal';
19
+ import type { LaunchOptions } from 'playwright-core';
20
+ import semver from 'semver';
21
+
22
+ /**
23
+ * Allowed Playwright browser names.
24
+ * @beta
25
+ */
26
+ export declare type BrowserName = 'chromium' | 'firefox' | 'webkit';
27
+
28
+ /**
29
+ * Creates a Playwright Browser instance connected via a tunneled WebSocket connection.
30
+ * @beta
31
+ */
32
+ export declare function createTunneledBrowserAsync(browserName: BrowserName, launchOptions: LaunchOptions, logger?: ITerminal, port?: number): Promise<IDisposableTunneledBrowser>;
33
+
34
+ /**
35
+ * The filename used to indicate that the Playwright on Codespaces extension is installed.
36
+ * @beta
37
+ */
38
+ export declare const EXTENSION_INSTALLED_FILENAME: string;
39
+
40
+ /**
41
+ * Normalizes an error to a string for logging purposes.
42
+ * @beta
43
+ */
44
+ export declare function getNormalizedErrorString(error: unknown): string;
45
+
46
+ /**
47
+ * Disposable handle returned by {@link createTunneledBrowserAsync}.
48
+ * @beta
49
+ */
50
+ export declare interface IDisposableTunneledBrowser {
51
+ /**
52
+ * The connected Playwright Browser instance.
53
+ */
54
+ browser: Browser;
55
+ /**
56
+ * Async dispose method that closes the browser connection.
57
+ * Called automatically when using `await using` syntax.
58
+ */
59
+ [Symbol.asyncDispose]: () => Promise<void>;
60
+ }
61
+
62
+ /**
63
+ * Disposable handle returned by {@link tunneledBrowserConnection}.
64
+ * @beta
65
+ */
66
+ export declare interface IDisposableTunneledBrowserConnection {
67
+ /**
68
+ * The WebSocket endpoint URL that the local Playwright client should connect to.
69
+ */
70
+ remoteEndpoint: string;
71
+ /**
72
+ * Dispose method that closes the WebSocket servers.
73
+ * Called automatically when using `using` syntax.
74
+ */
75
+ [Symbol.dispose]: () => void;
76
+ /**
77
+ * Promise that resolves when the remote WebSocket server closes.
78
+ */
79
+ closePromise: Promise<void>;
80
+ }
81
+
82
+ /**
83
+ * Handshake data exchanged during the initial WebSocket connection.
84
+ * @beta
85
+ */
86
+ export declare interface IHandshake {
87
+ action: 'handshake';
88
+ browserName: BrowserName;
89
+ launchOptions: LaunchOptions;
90
+ playwrightVersion: semver.SemVer;
91
+ }
92
+
93
+ /**
94
+ * Interface for the allowlist configuration stored in the user's local file system.
95
+ * @beta
96
+ */
97
+ export declare interface ILaunchOptionsAllowlist {
98
+ /**
99
+ * Set of launch option keys that the user has explicitly allowed.
100
+ * These bypass the default security restrictions.
101
+ */
102
+ allowedOptions: string[];
103
+ /**
104
+ * Version of the allowlist format, for future compatibility.
105
+ */
106
+ version: number;
107
+ }
108
+
109
+ /**
110
+ * Result of validating launch options against the allowlist.
111
+ * @beta
112
+ */
113
+ export declare interface ILaunchOptionsValidationResult {
114
+ /**
115
+ * Whether the launch options are valid and allowed.
116
+ */
117
+ isValid: boolean;
118
+ /**
119
+ * Launch options that were denied due to security restrictions.
120
+ */
121
+ deniedOptions: Array<keyof LaunchOptions>;
122
+ /**
123
+ * Filtered launch options with denied properties removed.
124
+ */
125
+ filteredOptions: LaunchOptions;
126
+ /**
127
+ * Warning messages about denied options.
128
+ */
129
+ warnings: string[];
130
+ }
131
+
132
+ /**
133
+ * Options for configuring a {@link PlaywrightTunnel} instance.
134
+ * @beta
135
+ */
136
+ export declare type IPlaywrightTunnelOptions = {
137
+ terminal: ITerminal;
138
+ onStatusChange: (status: TunnelStatus) => void;
139
+ playwrightInstallPath: string;
140
+ /**
141
+ * Optional callback invoked before launching the browser server.
142
+ * Receives the handshake data including launch options.
143
+ * If the callback returns false, the browser server launch will be aborted.
144
+ * This allows the client to prompt the user for approval before starting.
145
+ */
146
+ onBeforeLaunch?: (handshake: IHandshake) => Promise<boolean> | boolean;
147
+ } & ({
148
+ mode: 'poll-connection';
149
+ wsEndpoint: string;
150
+ } | {
151
+ mode: 'wait-for-incoming-connection';
152
+ listenPort: number;
153
+ });
154
+
155
+ /**
156
+ * Helper to determine if the Playwright on Codespaces extension is installed. This check's for the
157
+ * existence of a well-known file in the OS temp directory.
158
+ * @beta
159
+ */
160
+ export declare function isExtensionInstalledAsync(): Promise<boolean>;
161
+
162
+ /**
163
+ * The filename used to store the launch options allowlist.
164
+ * Stored in the user's home directory/.playwright-browser-tunnel folder.
165
+ * @beta
166
+ */
167
+ export declare const LAUNCH_OPTIONS_ALLOWLIST_FILENAME: string;
168
+
169
+ /**
170
+ * Validates Playwright launch options against security allowlists.
171
+ * Provides utilities for managing client-side allowlist configuration.
172
+ * @beta
173
+ */
174
+ export declare class LaunchOptionsValidator {
175
+ private static readonly _allowlistVersion;
176
+ /**
177
+ * Gets the path to the allowlist file in the user's local preferences folder.
178
+ * This follows the pattern of playwright-browser-installed.txt but stores in user's home directory.
179
+ */
180
+ static getAllowlistFilePath(): string;
181
+ /**
182
+ * Reads the allowlist from the user's local file system.
183
+ * Returns an empty allowlist if the file doesn't exist or is invalid.
184
+ */
185
+ static readAllowlistAsync(): Promise<ILaunchOptionsAllowlist>;
186
+ /**
187
+ * Writes the allowlist to the user's local file system.
188
+ */
189
+ static writeAllowlistAsync(allowlist: ILaunchOptionsAllowlist): Promise<void>;
190
+ /**
191
+ * Validates launch options against the security allowlist.
192
+ * All launch options are denied by default unless explicitly allowed by the user.
193
+ *
194
+ * @param launchOptions - The launch options to validate
195
+ * @param terminal - Optional terminal for logging warnings
196
+ * @returns Validation result with filtered options and warnings
197
+ */
198
+ static validateLaunchOptionsAsync(launchOptions: LaunchOptions, terminal?: ITerminal): Promise<ILaunchOptionsValidationResult>;
199
+ /**
200
+ * Adds an option to the allowlist.
201
+ */
202
+ static addToAllowlistAsync(option: keyof LaunchOptions): Promise<void>;
203
+ /**
204
+ * Removes an option from the allowlist.
205
+ */
206
+ static removeFromAllowlistAsync(option: keyof LaunchOptions): Promise<void>;
207
+ /**
208
+ * Clears the entire allowlist.
209
+ */
210
+ static clearAllowlistAsync(): Promise<void>;
211
+ /**
212
+ * Gets a human-readable description of the allowlist security model.
213
+ */
214
+ static getAllowlistDescription(): string;
215
+ }
216
+
217
+ /**
218
+ * Hosts a Playwright browser server and forwards traffic over a WebSocket tunnel.
219
+ * @beta
220
+ */
221
+ export declare class PlaywrightTunnel {
222
+ private readonly _terminal;
223
+ private readonly _onStatusChange;
224
+ private readonly _onBeforeLaunch?;
225
+ private readonly _playwrightBrowsersInstalled;
226
+ private readonly _wsEndpoint;
227
+ private readonly _listenPort;
228
+ private readonly _playwrightInstallPath;
229
+ private _status;
230
+ private _initWsPromise?;
231
+ private _keepRunning;
232
+ private _ws?;
233
+ private _mode;
234
+ private _pendingConnectionAttempt?;
235
+ private _pollInterval?;
236
+ constructor(options: IPlaywrightTunnelOptions);
237
+ get status(): TunnelStatus;
238
+ private set status(value);
239
+ waitForCloseAsync(): Promise<void>;
240
+ startAsync(options?: {
241
+ keepRunning?: boolean;
242
+ }): Promise<void>;
243
+ stopAsync(): Promise<void>;
244
+ [Symbol.asyncDispose](): Promise<void>;
245
+ cleanTempFilesAsync(): Promise<void>;
246
+ private _runCommandAsync;
247
+ private _installPlaywrightCoreAsync;
248
+ private _installPlaywrightBrowsersAsync;
249
+ private _tryConnectAsync;
250
+ private _pollConnectionAsync;
251
+ private _waitForIncomingConnectionAsync;
252
+ private _setupPlaywrightAsync;
253
+ private _getPlaywrightBrowserServerProxyAsync;
254
+ private _validateHandshake;
255
+ private _setupForwardingAsync;
256
+ /**
257
+ * Initializes the Playwright browser tunnel by establishing a WebSocket connection
258
+ * and setting up the browser server.
259
+ * Returns when the handshake is complete and the browser server is running.
260
+ */
261
+ private _initPlaywrightBrowserTunnelAsync;
262
+ }
263
+
264
+ /**
265
+ * Creates a tunneled WebSocket endpoint that a local Playwright client can connect to.
266
+ * @beta
267
+ */
268
+ export declare function tunneledBrowserConnection(logger: ITerminal, port?: number): Promise<IDisposableTunneledBrowserConnection>;
269
+
270
+ /**
271
+ * Status values reported by {@link PlaywrightTunnel}.
272
+ * @beta
273
+ */
274
+ export declare type TunnelStatus = 'waiting-for-connection' | 'browser-server-running' | 'stopped' | 'setting-up-browser-server' | 'error';
275
+
276
+ export { }
@@ -0,0 +1,18 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+
4
+ const nodeTrustedToolProfile = require('local-node-rig/profiles/default/includes/eslint/flat/profile/node-trusted-tool');
5
+ const friendlyLocalsMixin = require('local-node-rig/profiles/default/includes/eslint/flat/mixins/friendly-locals');
6
+
7
+ module.exports = [
8
+ ...nodeTrustedToolProfile,
9
+ ...friendlyLocalsMixin,
10
+ {
11
+ files: ['**/*.ts', '**/*.tsx'],
12
+ languageOptions: {
13
+ parserOptions: {
14
+ tsconfigRootDir: __dirname
15
+ }
16
+ }
17
+ }
18
+ ];