@rushstack/playwright-browser-tunnel 0.2.4 → 0.3.1
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/CHANGELOG.json +38 -0
- package/CHANGELOG.md +15 -1
- package/LICENSE +24 -0
- package/{lib → lib-dts}/tsdoc-metadata.json +1 -1
- package/lib-esm/HttpServer.js +70 -0
- package/lib-esm/HttpServer.js.map +1 -0
- package/lib-esm/LaunchOptionsValidator.js +156 -0
- package/lib-esm/LaunchOptionsValidator.js.map +1 -0
- package/lib-esm/PlaywrightBrowserTunnel.js +467 -0
- package/lib-esm/PlaywrightBrowserTunnel.js.map +1 -0
- package/{src/index.ts → lib-esm/index.js} +2 -18
- package/lib-esm/index.js.map +1 -0
- package/{src/tunneledBrowserConnection/constants.ts → lib-esm/tunneledBrowserConnection/ITunneledBrowser.js} +2 -3
- package/lib-esm/tunneledBrowserConnection/ITunneledBrowser.js.map +1 -0
- package/lib-esm/tunneledBrowserConnection/ITunneledBrowserConnection.js +4 -0
- package/lib-esm/tunneledBrowserConnection/ITunneledBrowserConnection.js.map +1 -0
- package/lib-esm/tunneledBrowserConnection/TunneledBrowser.js +36 -0
- package/lib-esm/tunneledBrowserConnection/TunneledBrowser.js.map +1 -0
- package/lib-esm/tunneledBrowserConnection/TunneledBrowserConnection.js +195 -0
- package/lib-esm/tunneledBrowserConnection/TunneledBrowserConnection.js.map +1 -0
- package/lib-esm/tunneledBrowserConnection/constants.js +5 -0
- package/lib-esm/tunneledBrowserConnection/constants.js.map +1 -0
- package/{src/tunneledBrowserConnection/index.ts → lib-esm/tunneledBrowserConnection/index.js} +1 -4
- package/lib-esm/tunneledBrowserConnection/index.js.map +1 -0
- package/lib-esm/utilities.js +96 -0
- package/lib-esm/utilities.js.map +1 -0
- package/package.json +30 -7
- package/.rush/temp/chunked-rush-logs/playwright-browser-tunnel._phase_build.chunks.jsonl +0 -8
- package/.rush/temp/operation/_phase_build/all.log +0 -8
- package/.rush/temp/operation/_phase_build/log-chunks.jsonl +0 -8
- package/.rush/temp/operation/_phase_build/state.json +0 -3
- package/.rush/temp/rushstack+playwright-browser-tunnel-_phase_build-517a2999ebe527b217bbfe2e265943b73bf3856b.tar.log +0 -62
- package/.rush/temp/shrinkwrap-deps.json +0 -104
- package/config/api-extractor.json +0 -19
- package/config/rig.json +0 -7
- package/eslint.config.js +0 -18
- package/playwright.config.ts +0 -45
- package/rush-logs/playwright-browser-tunnel._phase_build.cache.log +0 -3
- package/rush-logs/playwright-browser-tunnel._phase_build.log +0 -8
- package/src/HttpServer.ts +0 -87
- package/src/LaunchOptionsValidator.ts +0 -234
- package/src/PlaywrightBrowserTunnel.ts +0 -650
- package/src/tunneledBrowserConnection/ITunneledBrowser.ts +0 -20
- package/src/tunneledBrowserConnection/ITunneledBrowserConnection.ts +0 -37
- package/src/tunneledBrowserConnection/TunneledBrowser.ts +0 -52
- package/src/tunneledBrowserConnection/TunneledBrowserConnection.ts +0 -232
- package/src/utilities.ts +0 -136
- package/temp/build/lint/_eslint-5eVG3S6w.json +0 -50
- package/temp/build/lint/lint.sarif +0 -258
- package/temp/build/typescript/ts_l9Fw4VUO.json +0 -1
- package/temp/playwright-browser-tunnel.api.md +0 -120
- package/tests/demo.spec.ts +0 -10
- package/tests/testFixture.ts +0 -22
- package/tsconfig.json +0 -6
- /package/{lib → lib-commonjs}/HttpServer.js +0 -0
- /package/{lib → lib-commonjs}/HttpServer.js.map +0 -0
- /package/{lib → lib-commonjs}/LaunchOptionsValidator.js +0 -0
- /package/{lib → lib-commonjs}/LaunchOptionsValidator.js.map +0 -0
- /package/{lib → lib-commonjs}/PlaywrightBrowserTunnel.js +0 -0
- /package/{lib → lib-commonjs}/PlaywrightBrowserTunnel.js.map +0 -0
- /package/{lib → lib-commonjs}/index.js +0 -0
- /package/{lib → lib-commonjs}/index.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/ITunneledBrowser.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/ITunneledBrowser.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/ITunneledBrowserConnection.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/ITunneledBrowserConnection.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/TunneledBrowser.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/TunneledBrowser.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/TunneledBrowserConnection.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/TunneledBrowserConnection.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/constants.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/constants.js.map +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/index.js +0 -0
- /package/{lib → lib-commonjs}/tunneledBrowserConnection/index.js.map +0 -0
- /package/{lib → lib-commonjs}/utilities.js +0 -0
- /package/{lib → lib-commonjs}/utilities.js.map +0 -0
- /package/{lib → lib-dts}/HttpServer.d.ts +0 -0
- /package/{lib → lib-dts}/HttpServer.d.ts.map +0 -0
- /package/{lib → lib-dts}/LaunchOptionsValidator.d.ts +0 -0
- /package/{lib → lib-dts}/LaunchOptionsValidator.d.ts.map +0 -0
- /package/{lib → lib-dts}/PlaywrightBrowserTunnel.d.ts +0 -0
- /package/{lib → lib-dts}/PlaywrightBrowserTunnel.d.ts.map +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/ITunneledBrowser.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/ITunneledBrowser.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/ITunneledBrowserConnection.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/ITunneledBrowserConnection.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/TunneledBrowser.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/TunneledBrowser.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/TunneledBrowserConnection.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/TunneledBrowserConnection.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/constants.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/constants.d.ts.map +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/index.d.ts +0 -0
- /package/{lib → lib-dts}/tunneledBrowserConnection/index.d.ts.map +0 -0
- /package/{lib → lib-dts}/utilities.d.ts +0 -0
- /package/{lib → lib-dts}/utilities.d.ts.map +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|
package/config/rig.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
package/eslint.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
];
|
package/playwright.config.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
testDir: './tests',
|
|
5
|
-
/* Run tests in files in parallel */
|
|
6
|
-
fullyParallel: true,
|
|
7
|
-
/* Retry on CI only */
|
|
8
|
-
retries: 0,
|
|
9
|
-
/* Opt out of parallel tests on CI. */
|
|
10
|
-
workers: 1,
|
|
11
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
12
|
-
reporter: 'html',
|
|
13
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
14
|
-
use: {
|
|
15
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
16
|
-
// baseURL: 'http://localhost:56767',
|
|
17
|
-
|
|
18
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
19
|
-
trace: 'on'
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
/* Configure projects for major browsers */
|
|
23
|
-
projects: [
|
|
24
|
-
{
|
|
25
|
-
name: 'chromium',
|
|
26
|
-
use: { ...devices['Desktop Chrome'] }
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'firefox',
|
|
30
|
-
use: { ...devices['Desktop Firefox'] }
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'webkit',
|
|
34
|
-
use: { ...devices['Desktop Safari'] }
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'Google Chrome',
|
|
38
|
-
use: { ...devices['Desktop Chrome'], channel: 'chrome' } // or 'chrome-beta'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Microsoft Edge',
|
|
42
|
-
use: { ...devices['Desktop Edge'], channel: 'msedge' } // or "msedge-beta" or 'msedge-dev'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
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.56.3
|
|
6
|
-
[build:api-extractor] Analysis will use the bundled TypeScript version 5.8.2
|
|
7
|
-
---- build finished (22.551s) ----
|
|
8
|
-
-------------------- Finished (22.555s) --------------------
|
package/src/HttpServer.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
import http from 'node:http';
|
|
5
|
-
import type { AddressInfo } from 'node:net';
|
|
6
|
-
import { URL } from 'node:url';
|
|
7
|
-
|
|
8
|
-
import { WebSocketServer, type WebSocket } from 'ws';
|
|
9
|
-
|
|
10
|
-
import type { ITerminal } from '@rushstack/terminal';
|
|
11
|
-
|
|
12
|
-
const LOCALHOST: string = 'localhost';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Formats an address info object into a WebSocket-compatible address string.
|
|
16
|
-
* IPv6 addresses are formatted with brackets: [address]:port
|
|
17
|
-
* IPv4 addresses are formatted as: address:port
|
|
18
|
-
*/
|
|
19
|
-
function formatAddress(addressInfo: AddressInfo): string {
|
|
20
|
-
return addressInfo.family === 'IPv6'
|
|
21
|
-
? `[${addressInfo.address}]:${addressInfo.port}`
|
|
22
|
-
: `${addressInfo.address}:${addressInfo.port}`;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* This HttpServer is used for the localProxyWs WebSocketServer.
|
|
27
|
-
* The purpose is to parse the query params and path for the websocket url to get the
|
|
28
|
-
* browserName and launchOptions.
|
|
29
|
-
*/
|
|
30
|
-
export class HttpServer {
|
|
31
|
-
private readonly _server: http.Server;
|
|
32
|
-
private readonly _wsServer: WebSocketServer; // local proxy websocket server accepting browser clients
|
|
33
|
-
private _listeningAddress: string | undefined;
|
|
34
|
-
private _logger: ITerminal;
|
|
35
|
-
|
|
36
|
-
public constructor(logger: ITerminal) {
|
|
37
|
-
this._logger = logger;
|
|
38
|
-
// We'll create an HTTP server and attach a WebSocketServer in noServer mode so we can
|
|
39
|
-
// manually parse the URL and extract query parameters before upgrading.
|
|
40
|
-
this._server = http.createServer();
|
|
41
|
-
this._wsServer = new WebSocketServer({ noServer: true });
|
|
42
|
-
|
|
43
|
-
this._server.on('upgrade', (request, socket, head) => {
|
|
44
|
-
// Accept all upgrades on the root path. We parse query string for browserName + launchOptions.
|
|
45
|
-
this._wsServer.handleUpgrade(request, socket, head, (ws: WebSocket) => {
|
|
46
|
-
this._wsServer.emit('connection', ws, request);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public async listenAsync(): Promise<URL> {
|
|
52
|
-
return await new Promise((resolve) => {
|
|
53
|
-
// Bind to 'localhost' which resolves to IPv4 (127.0.0.1) or IPv6 (::1)
|
|
54
|
-
// depending on system configuration and DNS resolution
|
|
55
|
-
this._server.listen(0, LOCALHOST, () => {
|
|
56
|
-
const addressInfo: AddressInfo | string | null = this._server.address();
|
|
57
|
-
if (!addressInfo) {
|
|
58
|
-
throw new Error('Server address is null - server may not be bound properly');
|
|
59
|
-
}
|
|
60
|
-
if (typeof addressInfo === 'string') {
|
|
61
|
-
throw new Error(`Server address is a pipe/socket path (${addressInfo}), expected an IP address`);
|
|
62
|
-
}
|
|
63
|
-
const formattedAddress: string = formatAddress(addressInfo);
|
|
64
|
-
this._listeningAddress = formattedAddress;
|
|
65
|
-
// This MUST be printed to terminal so VS Code can auto-port forward
|
|
66
|
-
this._logger.writeLine(`Local proxy HttpServer listening at ws://${formattedAddress}`);
|
|
67
|
-
resolve(new URL(`ws://${formattedAddress}`));
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public get endpoint(): string {
|
|
73
|
-
if (this._listeningAddress === undefined) {
|
|
74
|
-
throw new Error('HttpServer not listening yet');
|
|
75
|
-
}
|
|
76
|
-
return `ws://${this._listeningAddress}`;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
public get wsServer(): WebSocketServer {
|
|
80
|
-
return this._wsServer;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
public [Symbol.dispose](): void {
|
|
84
|
-
this._wsServer.close();
|
|
85
|
-
this._server.close();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,234 +0,0 @@
|
|
|
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
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
|
|
7
|
-
import type { LaunchOptions } from 'playwright-core';
|
|
8
|
-
|
|
9
|
-
import { FileSystem } from '@rushstack/node-core-library';
|
|
10
|
-
import type { ITerminal } from '@rushstack/terminal';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The filename used to store the launch options allowlist.
|
|
14
|
-
* Stored in the user's home directory/.playwright-browser-tunnel folder.
|
|
15
|
-
* @beta
|
|
16
|
-
*/
|
|
17
|
-
export const LAUNCH_OPTIONS_ALLOWLIST_FILENAME: string = '.playwright-launch-options-allowlist.json';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Interface for the allowlist configuration stored in the user's local file system.
|
|
21
|
-
* @beta
|
|
22
|
-
*/
|
|
23
|
-
export interface ILaunchOptionsAllowlist {
|
|
24
|
-
/**
|
|
25
|
-
* Set of launch option keys that the user has explicitly allowed.
|
|
26
|
-
* These bypass the default security restrictions.
|
|
27
|
-
*/
|
|
28
|
-
allowedOptions: string[];
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Version of the allowlist format, for future compatibility.
|
|
32
|
-
*/
|
|
33
|
-
version: number;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Result of validating launch options against the allowlist.
|
|
38
|
-
* @beta
|
|
39
|
-
*/
|
|
40
|
-
export interface ILaunchOptionsValidationResult {
|
|
41
|
-
/**
|
|
42
|
-
* Whether the launch options are valid and allowed.
|
|
43
|
-
*/
|
|
44
|
-
isValid: boolean;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Launch options that were denied due to security restrictions.
|
|
48
|
-
*/
|
|
49
|
-
deniedOptions: Array<keyof LaunchOptions>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Filtered launch options with denied properties removed.
|
|
53
|
-
*/
|
|
54
|
-
filteredOptions: LaunchOptions;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Warning messages about denied options.
|
|
58
|
-
*/
|
|
59
|
-
warnings: string[];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Validates Playwright launch options against security allowlists.
|
|
64
|
-
* Provides utilities for managing client-side allowlist configuration.
|
|
65
|
-
* @beta
|
|
66
|
-
*/
|
|
67
|
-
export class LaunchOptionsValidator {
|
|
68
|
-
private static readonly _allowlistVersion: number = 1;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Gets the path to the allowlist file in the user's local preferences folder.
|
|
72
|
-
* This follows the pattern of playwright-browser-installed.txt but stores in user's home directory.
|
|
73
|
-
*/
|
|
74
|
-
public static getAllowlistFilePath(): string {
|
|
75
|
-
// Store in user's home directory under .playwright-browser-tunnel
|
|
76
|
-
const homeDir: string = os.homedir();
|
|
77
|
-
const configDir: string = path.join(homeDir, '.playwright-browser-tunnel');
|
|
78
|
-
return path.join(configDir, LAUNCH_OPTIONS_ALLOWLIST_FILENAME);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Reads the allowlist from the user's local file system.
|
|
83
|
-
* Returns an empty allowlist if the file doesn't exist or is invalid.
|
|
84
|
-
*/
|
|
85
|
-
public static async readAllowlistAsync(): Promise<ILaunchOptionsAllowlist> {
|
|
86
|
-
const allowlistPath: string = this.getAllowlistFilePath();
|
|
87
|
-
|
|
88
|
-
try {
|
|
89
|
-
if (!FileSystem.exists(allowlistPath)) {
|
|
90
|
-
return {
|
|
91
|
-
allowedOptions: [],
|
|
92
|
-
version: this._allowlistVersion
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const content: string = await FileSystem.readFileAsync(allowlistPath);
|
|
97
|
-
const parsed: unknown = JSON.parse(content);
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
typeof parsed === 'object' &&
|
|
101
|
-
parsed !== null &&
|
|
102
|
-
'allowedOptions' in parsed &&
|
|
103
|
-
Array.isArray(parsed.allowedOptions) &&
|
|
104
|
-
'version' in parsed &&
|
|
105
|
-
typeof parsed.version === 'number'
|
|
106
|
-
) {
|
|
107
|
-
return parsed as ILaunchOptionsAllowlist;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Invalid format, return empty allowlist
|
|
111
|
-
return {
|
|
112
|
-
allowedOptions: [],
|
|
113
|
-
version: this._allowlistVersion
|
|
114
|
-
};
|
|
115
|
-
} catch (error) {
|
|
116
|
-
// If we can't read the file, return empty allowlist
|
|
117
|
-
return {
|
|
118
|
-
allowedOptions: [],
|
|
119
|
-
version: this._allowlistVersion
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Writes the allowlist to the user's local file system.
|
|
126
|
-
*/
|
|
127
|
-
public static async writeAllowlistAsync(allowlist: ILaunchOptionsAllowlist): Promise<void> {
|
|
128
|
-
const allowlistPath: string = this.getAllowlistFilePath();
|
|
129
|
-
const configDir: string = path.dirname(allowlistPath);
|
|
130
|
-
|
|
131
|
-
// Ensure the config directory exists
|
|
132
|
-
await FileSystem.ensureFolderAsync(configDir);
|
|
133
|
-
|
|
134
|
-
const content: string = JSON.stringify(allowlist, null, 2);
|
|
135
|
-
await FileSystem.writeFileAsync(allowlistPath, content, { ensureFolderExists: true });
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Validates launch options against the security allowlist.
|
|
140
|
-
* All launch options are denied by default unless explicitly allowed by the user.
|
|
141
|
-
*
|
|
142
|
-
* @param launchOptions - The launch options to validate
|
|
143
|
-
* @param terminal - Optional terminal for logging warnings
|
|
144
|
-
* @returns Validation result with filtered options and warnings
|
|
145
|
-
*/
|
|
146
|
-
public static async validateLaunchOptionsAsync(
|
|
147
|
-
launchOptions: LaunchOptions,
|
|
148
|
-
terminal?: ITerminal
|
|
149
|
-
): Promise<ILaunchOptionsValidationResult> {
|
|
150
|
-
const allowlist: ILaunchOptionsAllowlist = await this.readAllowlistAsync();
|
|
151
|
-
const allowedOptionsSet: Set<string> = new Set(allowlist.allowedOptions);
|
|
152
|
-
|
|
153
|
-
const deniedOptions: Array<keyof LaunchOptions> = [];
|
|
154
|
-
const warnings: string[] = [];
|
|
155
|
-
const filteredOptions: LaunchOptions = {};
|
|
156
|
-
|
|
157
|
-
// Check each provided launch option - deny all unless explicitly allowed
|
|
158
|
-
for (const key of Object.keys(launchOptions) as Array<keyof LaunchOptions>) {
|
|
159
|
-
if (allowedOptionsSet.has(key)) {
|
|
160
|
-
// Option is in the user's allowlist - permit it
|
|
161
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
162
|
-
(filteredOptions as any)[key] = launchOptions[key];
|
|
163
|
-
|
|
164
|
-
if (terminal) {
|
|
165
|
-
terminal.writeWarningLine(
|
|
166
|
-
`Launch option '${key}' is allowed by user allowlist. ` +
|
|
167
|
-
`Value: ${JSON.stringify(launchOptions[key])}`
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
} else {
|
|
171
|
-
// Option is not in allowlist - deny it
|
|
172
|
-
deniedOptions.push(key);
|
|
173
|
-
|
|
174
|
-
const warning: string =
|
|
175
|
-
`Launch option '${key}' was denied (not in allowlist). ` +
|
|
176
|
-
`To allow this option, add it to your local allowlist at: ${this.getAllowlistFilePath()}`;
|
|
177
|
-
warnings.push(warning);
|
|
178
|
-
|
|
179
|
-
if (terminal) {
|
|
180
|
-
terminal.writeWarningLine(warning);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return {
|
|
186
|
-
isValid: deniedOptions.length === 0,
|
|
187
|
-
deniedOptions,
|
|
188
|
-
filteredOptions,
|
|
189
|
-
warnings
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Adds an option to the allowlist.
|
|
195
|
-
*/
|
|
196
|
-
public static async addToAllowlistAsync(option: keyof LaunchOptions): Promise<void> {
|
|
197
|
-
const allowlist: ILaunchOptionsAllowlist = await this.readAllowlistAsync();
|
|
198
|
-
|
|
199
|
-
if (!allowlist.allowedOptions.includes(option)) {
|
|
200
|
-
allowlist.allowedOptions.push(option);
|
|
201
|
-
await this.writeAllowlistAsync(allowlist);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Removes an option from the allowlist.
|
|
207
|
-
*/
|
|
208
|
-
public static async removeFromAllowlistAsync(option: keyof LaunchOptions): Promise<void> {
|
|
209
|
-
const allowlist: ILaunchOptionsAllowlist = await this.readAllowlistAsync();
|
|
210
|
-
allowlist.allowedOptions = allowlist.allowedOptions.filter((opt) => opt !== option);
|
|
211
|
-
await this.writeAllowlistAsync(allowlist);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Clears the entire allowlist.
|
|
216
|
-
*/
|
|
217
|
-
public static async clearAllowlistAsync(): Promise<void> {
|
|
218
|
-
await this.writeAllowlistAsync({
|
|
219
|
-
allowedOptions: [],
|
|
220
|
-
version: this._allowlistVersion
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Gets a human-readable description of the allowlist security model.
|
|
226
|
-
*/
|
|
227
|
-
public static getAllowlistDescription(): string {
|
|
228
|
-
return (
|
|
229
|
-
`All launch options are denied by default for security.\n` +
|
|
230
|
-
`Only options explicitly added to your allowlist will be permitted.\n\n` +
|
|
231
|
-
`Allowlist location: ${this.getAllowlistFilePath()}`
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
}
|