From f62648f250ef0daff688dfb55863b52929b6c93e Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Sat, 30 Nov 2024 01:54:05 -0600 Subject: [PATCH] fix: ws eventlistener bug --- package.json | 8 +- pnpm-lock.yaml | 152 ++++++++++++------------ src/client/shared/requests/websocket.ts | 16 +-- src/client/shared/worker.ts | 4 - 4 files changed, 90 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index a80d666..3b2e309 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "license": "ISC", "devDependencies": { "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "^9.15.0", + "@eslint/js": "^9.16.0", "@estruyf/github-actions-reporter": "^1.9.2", "@fastify/static": "^8.0.3", "@mercuryworkshop/bare-as-module3": "^2.2.5", @@ -43,12 +43,12 @@ "@rspack/core": "^1.1.4", "@types/eslint": "^9.6.1", "@types/estree": "^1.0.6", - "@types/node": "^22.10.0", - "@types/serviceworker": "^0.0.106", + "@types/node": "^22.10.1", + "@types/serviceworker": "^0.0.107", "@typescript-eslint/eslint-plugin": "^8.16.0", "@typescript-eslint/parser": "^8.16.0", "dotenv": "^16.4.5", - "eslint": "^9.15.0", + "eslint": "^9.16.0", "fastify": "^5.1.0", "playwright": "^1.49.0", "prettier": "^3.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1c45d5..1f67bd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,8 +34,8 @@ importers: specifier: ^3.2.0 version: 3.2.0 '@eslint/js': - specifier: ^9.15.0 - version: 9.15.0 + specifier: ^9.16.0 + version: 9.16.0 '@estruyf/github-actions-reporter': specifier: ^1.9.2 version: 1.9.2(@playwright/test@1.49.0) @@ -73,23 +73,23 @@ importers: specifier: ^1.0.6 version: 1.0.6 '@types/node': - specifier: ^22.10.0 - version: 22.10.0 + specifier: ^22.10.1 + version: 22.10.1 '@types/serviceworker': - specifier: ^0.0.106 - version: 0.0.106 + specifier: ^0.0.107 + version: 0.0.107 '@typescript-eslint/eslint-plugin': specifier: ^8.16.0 - version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2) + version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: ^8.16.0 - version: 8.16.0(eslint@9.15.0)(typescript@5.7.2) + version: 8.16.0(eslint@9.16.0)(typescript@5.7.2) dotenv: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.15.0 - version: 9.15.0 + specifier: ^9.16.0 + version: 9.16.0 fastify: specifier: ^5.1.0 version: 5.1.0 @@ -161,8 +161,8 @@ packages: resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.15.0': - resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + '@eslint/js@9.16.0': + resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': @@ -490,8 +490,8 @@ packages: '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - '@types/node@22.10.0': - resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} '@types/qs@6.9.17': resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} @@ -514,8 +514,8 @@ packages: '@types/serve-static@1.15.7': resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} - '@types/serviceworker@0.0.106': - resolution: {integrity: sha512-iczPiHSCn+ILH1w0fz5Lt4ljBG1+742/XnRdR9ZKJkR0SsFZvz8AN0dDyykIkYIvO6UMDC5ex+Z96XEaOmb7aQ==} + '@types/serviceworker@0.0.107': + resolution: {integrity: sha512-FfMNCrVjiz9w6RZKIfbfXZ6Vuyba4SZFf/cTyjs4ppl8DcFL9wBGm1SC/n6bilUJylKbbNcfTodjyf0hrvaQJg==} '@types/sockjs@0.3.36': resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} @@ -1037,8 +1037,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.65: - resolution: {integrity: sha512-PWVzBjghx7/wop6n22vS2MLU8tKGd4Q91aCEGhG/TYmW6PP5OcSXcdnxTe1NNt0T66N8D6jxh4kC8UsdzOGaIw==} + electron-to-chromium@1.5.67: + resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1124,8 +1124,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.15.0: - resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + eslint@9.16.0: + resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1347,8 +1347,9 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.1.0: + resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} + engines: {node: '>= 0.4'} graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -2073,8 +2074,9 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -2259,8 +2261,8 @@ packages: peerDependencies: tslib: '2' - ts-api-utils@1.4.2: - resolution: {integrity: sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -2499,9 +2501,9 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0)': dependencies: - eslint: 9.15.0 + eslint: 9.16.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -2530,7 +2532,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.15.0': {} + '@eslint/js@9.16.0': {} '@eslint/object-schema@2.1.4': {} @@ -2921,26 +2923,26 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.0.2 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/connect@3.4.38': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/cookie@0.4.1': {} '@types/cors@2.8.17': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/eslint@9.6.1': dependencies: @@ -2953,14 +2955,14 @@ snapshots: '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 '@types/express-serve-static-core@5.0.2': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -2975,27 +2977,27 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/http-errors@2.0.4': {} '@types/http-proxy@1.17.15': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/json-schema@7.0.15': {} '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/mime@1.3.5': {} '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 - '@types/node@22.10.0': + '@types/node@22.10.1': dependencies: undici-types: 6.20.0 @@ -3010,7 +3012,7 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/serve-index@1.9.4': dependencies: @@ -3019,14 +3021,14 @@ snapshots: '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/send': 0.17.4 - '@types/serviceworker@0.0.106': {} + '@types/serviceworker@0.0.107': {} '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/tapable@2.2.7': dependencies: @@ -3034,34 +3036,34 @@ snapshots: '@types/ws@8.5.13': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 - eslint: 9.15.0 + eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.2(typescript@5.7.2) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 - eslint: 9.15.0 + eslint: 9.16.0 optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3072,13 +3074,13 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) debug: 4.3.7 - eslint: 9.15.0 - ts-api-utils: 1.4.2(typescript@5.7.2) + eslint: 9.16.0 + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3095,19 +3097,19 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.2(typescript@5.7.2) + ts-api-utils: 1.4.3(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - eslint: 9.15.0 + eslint: 9.16.0 optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3348,7 +3350,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001684 - electron-to-chromium: 1.5.65 + electron-to-chromium: 1.5.67 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -3526,7 +3528,7 @@ snapshots: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 - gopd: 1.0.1 + gopd: 1.1.0 define-lazy-prop@2.0.0: {} @@ -3572,7 +3574,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.65: {} + electron-to-chromium@1.5.67: {} emoji-regex@8.0.0: {} @@ -3588,7 +3590,7 @@ snapshots: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 22.10.0 + '@types/node': 22.10.1 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -3647,14 +3649,14 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.15.0: + eslint@9.16.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.0 '@eslint/core': 0.9.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.15.0 + '@eslint/js': 9.16.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -3955,7 +3957,7 @@ snapshots: globals@14.0.0: {} - gopd@1.0.1: + gopd@1.1.0: dependencies: get-intrinsic: 1.2.4 @@ -4134,7 +4136,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -4173,7 +4175,7 @@ snapshots: launch-editor@2.9.1: dependencies: picocolors: 1.1.1 - shell-quote: 1.8.1 + shell-quote: 1.8.2 levn@0.4.1: dependencies: @@ -4605,7 +4607,7 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 - gopd: 1.0.1 + gopd: 1.1.0 has-property-descriptors: 1.0.2 setprototypeof@1.1.0: {} @@ -4618,7 +4620,7 @@ snapshots: shebang-regex@3.0.0: {} - shell-quote@1.8.1: {} + shell-quote@1.8.2: {} side-channel@1.0.6: dependencies: @@ -4819,7 +4821,7 @@ snapshots: dependencies: tslib: 2.8.1 - ts-api-utils@1.4.2(typescript@5.7.2): + ts-api-utils@1.4.3(typescript@5.7.2): dependencies: typescript: 5.7.2 diff --git a/src/client/shared/requests/websocket.ts b/src/client/shared/requests/websocket.ts index 76ac2fd..0f75c66 100644 --- a/src/client/shared/requests/websocket.ts +++ b/src/client/shared/requests/websocket.ts @@ -7,10 +7,10 @@ type FakeWebSocketState = { url: string; binaryType: string; barews: BareWebSocket; - + /* captureListeners: Record; listeners: Record; - + */ onclose?: (ev: CloseEvent) => any; onerror?: (ev: Event) => any; onmessage?: (ev: MessageEvent) => any; @@ -49,13 +49,14 @@ export default function (client: ScramjetClient, self: typeof globalThis) { url: ctx.args[0], binaryType: "blob", barews, - + /* + captureListeners: {}, + listeners: {}, + */ onclose: null, onerror: null, onmessage: null, onopen: null, - captureListeners: {}, - listeners: {}, }; function fakeEventSend(fakeev: Event) { @@ -106,7 +107,8 @@ export default function (client: ScramjetClient, self: typeof globalThis) { ctx.return(fakeWebSocket); }, }); - + // i have no clue why this is here but it prevents the real event listener from ever happening so im commenting it out for now + /* client.Proxy("EventTarget.prototype.addEventListener", { apply(ctx) { const ws = socketmap.get(ctx.this); @@ -156,7 +158,7 @@ export default function (client: ScramjetClient, self: typeof globalThis) { ctx.return(undefined); }, }); - + */ client.Trap("WebSocket.prototype.binaryType", { get(ctx) { const ws = socketmap.get(ctx.this); diff --git a/src/client/shared/worker.ts b/src/client/shared/worker.ts index 3a13e9a..1cb625b 100644 --- a/src/client/shared/worker.ts +++ b/src/client/shared/worker.ts @@ -7,8 +7,6 @@ export default function (client: ScramjetClient, self: typeof globalThis) { if (self.Worker) { client.Proxy("Worker", { construct({ args, call }) { - if (args[0] instanceof URL) args[0] = args[0].href; - args[0] = rewriteUrl(args[0], client.meta) + "?dest=worker"; if (args[1] && args[1].type === "module") { @@ -43,8 +41,6 @@ export default function (client: ScramjetClient, self: typeof globalThis) { // sharedworkers can only be constructed from window client.Proxy("SharedWorker", { construct({ args, call }) { - if (args[0] instanceof URL) args[0] = args[0].href; - args[0] = rewriteUrl(args[0], client.meta) + "?dest=worker"; if (args[1] && typeof args[1] === "string")