insite-ws 2.3.1 → 2.3.2
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/bun.lock +16 -152
- package/dist/client/WS.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +3 -3
- package/dist/client/node/index.js +1 -1
- package/dist/client/node/index.js.map +3 -3
- package/dist/client/types.d.ts +1 -0
- package/dist/client/types.d.ts.map +1 -1
- package/package.json +1 -1
package/bun.lock
CHANGED
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
"packages": {
|
|
22
|
-
"@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="],
|
|
23
|
-
|
|
24
22
|
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.27.1", "", {}, "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow=="],
|
|
25
23
|
|
|
26
24
|
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.4", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q=="],
|
|
@@ -81,11 +79,11 @@
|
|
|
81
79
|
|
|
82
80
|
"@eslint/config-helpers": ["@eslint/config-helpers@0.2.2", "", {}, "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg=="],
|
|
83
81
|
|
|
84
|
-
"@eslint/core": ["@eslint/core@0.
|
|
82
|
+
"@eslint/core": ["@eslint/core@0.14.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg=="],
|
|
85
83
|
|
|
86
84
|
"@eslint/eslintrc": ["@eslint/eslintrc@3.3.1", "", { "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ=="],
|
|
87
85
|
|
|
88
|
-
"@eslint/js": ["@eslint/js@9.
|
|
86
|
+
"@eslint/js": ["@eslint/js@9.27.0", "", {}, "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA=="],
|
|
89
87
|
|
|
90
88
|
"@eslint/object-schema": ["@eslint/object-schema@2.1.6", "", {}, "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA=="],
|
|
91
89
|
|
|
@@ -105,11 +103,9 @@
|
|
|
105
103
|
|
|
106
104
|
"@jsbits/get-package-version": ["@jsbits/get-package-version@1.0.3", "", {}, "sha512-IJy1jRL01x7p6UEpgKa1lVLstMUx8EiIR8pPoS5sBfsHEoeLkzYiNpAfxPx8zLDUJyS1yBbChJjcWdPqyH285w=="],
|
|
107
105
|
|
|
108
|
-
"@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.11.3", "", { "dependencies": { "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" } }, "sha512-rmOWVRUbUJD7iSvJugjUbFZshTAuJ48MXoZ80Osx1GM0K/H1w7rSEvmw8m6vdWxNASgtaHIhAgre4H/E9GJiYQ=="],
|
|
109
|
-
|
|
110
106
|
"@nesvet/conveyer": ["@nesvet/conveyer@2.5.2", "", { "dependencies": { "@nesvet/n": "^1.2.0", "anymatch": "^3.1.3", "chalk": "^5.4.1", "chokidar": "^4.0.3", "compare-versions": "^6.1.1", "esbuild": "^0.25.3", "esbuild-plugin-jscc": "^1.0.14", "fs-extra": "^11.3.0", "open": "^10.1.2", "ora": "^8.2.0", "process-request": "^1.1.6", "resolve-package-path": "^4.0.3", "zip-a-folder": "^3.1.9" }, "bin": { "conveyer": "lib/cli.js" } }, "sha512-Gr+skxTUyMwDJO0+uWAsmMn9oBOjtik0Lui74u4wZ+cNmpUNQyU1tBTQCVbQWGG75pV/QbOASQVTkESeOG1StA=="],
|
|
111
107
|
|
|
112
|
-
"@nesvet/eslint-config": ["@nesvet/eslint-config@2.1.
|
|
108
|
+
"@nesvet/eslint-config": ["@nesvet/eslint-config@2.1.2", "", { "dependencies": { "@eslint/js": "^9.26.0", "@stylistic/eslint-plugin": "^4.2.0", "@typescript-eslint/eslint-plugin": "^8.32.1", "@typescript-eslint/parser": "^8.32.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-import-newlines": "^1.4.0", "eslint-plugin-indent-empty-lines": "^1.0.2", "eslint-plugin-jsonc": "^2.20.0", "eslint-plugin-n": "^17.18.0", "eslint-plugin-perfectionist": "^4.13.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.1.0" } }, "sha512-jhbBpkA8xODRl+PIWn8PPmfdV5dzixk9UyRg2aykx4fwm7s10Q1HvyteYpEp9fWnl1ruzlfgK3GIHqi2BM9LtQ=="],
|
|
113
109
|
|
|
114
110
|
"@nesvet/n": ["@nesvet/n@1.2.0", "", {}, "sha512-PCeLtYYOGxP/dJJzEEFnpoldRplBvIpojD9jNJF+ot24IqTgChAhtJgOsWsKCweO2+S7g/yeWkn7tydWvjdNUg=="],
|
|
115
111
|
|
|
@@ -133,9 +129,7 @@
|
|
|
133
129
|
|
|
134
130
|
"@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="],
|
|
135
131
|
|
|
136
|
-
"@types/node": ["@types/node@22.15.
|
|
137
|
-
|
|
138
|
-
"@types/normalize-package-data": ["@types/normalize-package-data@2.4.4", "", {}, "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA=="],
|
|
132
|
+
"@types/node": ["@types/node@22.15.21", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ=="],
|
|
139
133
|
|
|
140
134
|
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
|
|
141
135
|
|
|
@@ -157,8 +151,6 @@
|
|
|
157
151
|
|
|
158
152
|
"abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="],
|
|
159
153
|
|
|
160
|
-
"accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="],
|
|
161
|
-
|
|
162
154
|
"acorn": ["acorn@8.14.1", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg=="],
|
|
163
155
|
|
|
164
156
|
"acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="],
|
|
@@ -207,8 +199,6 @@
|
|
|
207
199
|
|
|
208
200
|
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
|
209
201
|
|
|
210
|
-
"body-parser": ["body-parser@2.2.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.0", "http-errors": "^2.0.0", "iconv-lite": "^0.6.3", "on-finished": "^2.4.1", "qs": "^6.14.0", "raw-body": "^3.0.0", "type-is": "^2.0.0" } }, "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg=="],
|
|
211
|
-
|
|
212
202
|
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
|
213
203
|
|
|
214
204
|
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
|
|
@@ -223,8 +213,6 @@
|
|
|
223
213
|
|
|
224
214
|
"bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="],
|
|
225
215
|
|
|
226
|
-
"bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="],
|
|
227
|
-
|
|
228
216
|
"call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="],
|
|
229
217
|
|
|
230
218
|
"call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],
|
|
@@ -257,20 +245,10 @@
|
|
|
257
245
|
|
|
258
246
|
"concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
|
|
259
247
|
|
|
260
|
-
"content-disposition": ["content-disposition@1.0.0", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg=="],
|
|
261
|
-
|
|
262
|
-
"content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="],
|
|
263
|
-
|
|
264
|
-
"cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="],
|
|
265
|
-
|
|
266
|
-
"cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="],
|
|
267
|
-
|
|
268
248
|
"core-js-compat": ["core-js-compat@3.42.0", "", { "dependencies": { "browserslist": "^4.24.4" } }, "sha512-bQasjMfyDGyaeWKBIu33lHh9qlSR0MFE/Nmc6nMjf/iU9b3rSMdAYz1Baxrv4lPdGUsTqZudHA4jIGSJy0SWZQ=="],
|
|
269
249
|
|
|
270
250
|
"core-util-is": ["core-util-is@1.0.3", "", {}, "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="],
|
|
271
251
|
|
|
272
|
-
"cors": ["cors@2.8.5", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g=="],
|
|
273
|
-
|
|
274
252
|
"crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
|
|
275
253
|
|
|
276
254
|
"crc32-stream": ["crc32-stream@6.0.0", "", { "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^4.0.0" } }, "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g=="],
|
|
@@ -297,22 +275,16 @@
|
|
|
297
275
|
|
|
298
276
|
"define-properties": ["define-properties@1.2.1", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="],
|
|
299
277
|
|
|
300
|
-
"depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="],
|
|
301
|
-
|
|
302
278
|
"doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="],
|
|
303
279
|
|
|
304
280
|
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
|
305
281
|
|
|
306
282
|
"eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
|
|
307
283
|
|
|
308
|
-
"ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="],
|
|
309
|
-
|
|
310
284
|
"electron-to-chromium": ["electron-to-chromium@1.5.155", "", {}, "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng=="],
|
|
311
285
|
|
|
312
286
|
"emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
|
|
313
287
|
|
|
314
|
-
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
|
315
|
-
|
|
316
288
|
"enhanced-resolve": ["enhanced-resolve@5.18.1", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" } }, "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg=="],
|
|
317
289
|
|
|
318
290
|
"es-abstract": ["es-abstract@1.23.9", "", { "dependencies": { "array-buffer-byte-length": "^1.0.2", "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.3", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.0", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", "has-proto": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "internal-slot": "^1.1.0", "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", "is-regex": "^1.2.1", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", "is-weakref": "^1.1.0", "math-intrinsics": "^1.1.0", "object-inspect": "^1.13.3", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", "regexp.prototype.flags": "^1.5.3", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.3", "typed-array-byte-length": "^1.0.3", "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", "which-typed-array": "^1.1.18" } }, "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA=="],
|
|
@@ -337,11 +309,9 @@
|
|
|
337
309
|
|
|
338
310
|
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
|
339
311
|
|
|
340
|
-
"escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="],
|
|
341
|
-
|
|
342
312
|
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
|
343
313
|
|
|
344
|
-
"eslint": ["eslint@9.
|
|
314
|
+
"eslint": ["eslint@9.27.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.27.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.3.0", "eslint-visitor-keys": "^4.2.0", "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q=="],
|
|
345
315
|
|
|
346
316
|
"eslint-compat-utils": ["eslint-compat-utils@0.6.5", "", { "dependencies": { "semver": "^7.5.4" }, "peerDependencies": { "eslint": ">=6.0.0" } }, "sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ=="],
|
|
347
317
|
|
|
@@ -359,7 +329,7 @@
|
|
|
359
329
|
|
|
360
330
|
"eslint-plugin-indent-empty-lines": ["eslint-plugin-indent-empty-lines@1.0.2", "", {}, "sha512-F9ZWv0zuEyunNW4yxM6F834kmPO315JHrjWq4GloJcwO9fFEirz+rkwqW7T399YDUlzq1ahyOL9VZLsUeOUkvg=="],
|
|
361
331
|
|
|
362
|
-
"eslint-plugin-jsonc": ["eslint-plugin-jsonc@2.20.
|
|
332
|
+
"eslint-plugin-jsonc": ["eslint-plugin-jsonc@2.20.1", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.5.1", "eslint-compat-utils": "^0.6.4", "eslint-json-compat-utils": "^0.2.1", "espree": "^9.6.1 || ^10.3.0", "graphemer": "^1.4.0", "jsonc-eslint-parser": "^2.4.0", "natural-compare": "^1.4.0", "synckit": "^0.6.2 || ^0.7.3 || ^0.11.5" }, "peerDependencies": { "eslint": ">=6.0.0" } }, "sha512-gUzIwQHXx7ZPypUoadcyRi4WbHW2TPixDr0kqQ4miuJBU0emJmyGTlnaT3Og9X2a8R1CDayN9BFSq5weGWbTng=="],
|
|
363
333
|
|
|
364
334
|
"eslint-plugin-n": ["eslint-plugin-n@17.18.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.5.0", "enhanced-resolve": "^5.17.1", "eslint-plugin-es-x": "^7.8.0", "get-tsconfig": "^4.8.1", "globals": "^15.11.0", "ignore": "^5.3.2", "minimatch": "^9.0.5", "semver": "^7.6.3" }, "peerDependencies": { "eslint": ">=8.23.0" } }, "sha512-hvZ/HusueqTJ7VDLoCpjN0hx4N4+jHIWTXD4TMLHy9F23XkDagR9v+xQWRWR57yY55GPF8NnD4ox9iGTxirY8A=="],
|
|
365
335
|
|
|
@@ -367,7 +337,7 @@
|
|
|
367
337
|
|
|
368
338
|
"eslint-plugin-react": ["eslint-plugin-react@7.37.5", "", { "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", "array.prototype.flatmap": "^1.3.3", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", "es-iterator-helpers": "^1.2.1", "estraverse": "^5.3.0", "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", "object.entries": "^1.1.9", "object.fromentries": "^2.0.8", "object.values": "^1.2.1", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", "string.prototype.matchall": "^4.0.12", "string.prototype.repeat": "^1.0.0" }, "peerDependencies": { "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA=="],
|
|
369
339
|
|
|
370
|
-
"eslint-plugin-unicorn": ["eslint-plugin-unicorn@
|
|
340
|
+
"eslint-plugin-unicorn": ["eslint-plugin-unicorn@59.0.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "@eslint-community/eslint-utils": "^4.5.1", "@eslint/plugin-kit": "^0.2.7", "ci-info": "^4.2.0", "clean-regexp": "^1.0.0", "core-js-compat": "^3.41.0", "esquery": "^1.6.0", "find-up-simple": "^1.0.1", "globals": "^16.0.0", "indent-string": "^5.0.0", "is-builtin-module": "^5.0.0", "jsesc": "^3.1.0", "pluralize": "^8.0.0", "regexp-tree": "^0.1.27", "regjsparser": "^0.12.0", "semver": "^7.7.1", "strip-indent": "^4.0.0" }, "peerDependencies": { "eslint": ">=9.22.0" } }, "sha512-EtNXYuWPUmkgSU2E7Ttn57LbRREQesIP1BiLn7OZLKodopKfDXfBUkC/0j6mpw2JExwf43Uf3qLSvrSvppgy8Q=="],
|
|
371
341
|
|
|
372
342
|
"eslint-scope": ["eslint-scope@8.3.0", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ=="],
|
|
373
343
|
|
|
@@ -383,22 +353,12 @@
|
|
|
383
353
|
|
|
384
354
|
"esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="],
|
|
385
355
|
|
|
386
|
-
"etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="],
|
|
387
|
-
|
|
388
356
|
"event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="],
|
|
389
357
|
|
|
390
358
|
"eventemitter3": ["eventemitter3@5.0.1", "", {}, "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="],
|
|
391
359
|
|
|
392
360
|
"events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="],
|
|
393
361
|
|
|
394
|
-
"eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="],
|
|
395
|
-
|
|
396
|
-
"eventsource-parser": ["eventsource-parser@3.0.2", "", {}, "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA=="],
|
|
397
|
-
|
|
398
|
-
"express": ["express@5.1.0", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.0", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA=="],
|
|
399
|
-
|
|
400
|
-
"express-rate-limit": ["express-rate-limit@7.5.0", "", { "peerDependencies": { "express": "^4.11 || 5 || ^5.0.0-beta.1" } }, "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg=="],
|
|
401
|
-
|
|
402
362
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
|
403
363
|
|
|
404
364
|
"fast-fifo": ["fast-fifo@1.3.2", "", {}, "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="],
|
|
@@ -415,8 +375,6 @@
|
|
|
415
375
|
|
|
416
376
|
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
|
|
417
377
|
|
|
418
|
-
"finalhandler": ["finalhandler@2.1.0", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q=="],
|
|
419
|
-
|
|
420
378
|
"find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="],
|
|
421
379
|
|
|
422
380
|
"find-up-simple": ["find-up-simple@1.0.1", "", {}, "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ=="],
|
|
@@ -429,10 +387,6 @@
|
|
|
429
387
|
|
|
430
388
|
"foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
|
|
431
389
|
|
|
432
|
-
"forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="],
|
|
433
|
-
|
|
434
|
-
"fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="],
|
|
435
|
-
|
|
436
390
|
"fs-extra": ["fs-extra@11.3.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew=="],
|
|
437
391
|
|
|
438
392
|
"function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
|
|
@@ -449,7 +403,7 @@
|
|
|
449
403
|
|
|
450
404
|
"get-symbol-description": ["get-symbol-description@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6" } }, "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg=="],
|
|
451
405
|
|
|
452
|
-
"get-tsconfig": ["get-tsconfig@4.10.
|
|
406
|
+
"get-tsconfig": ["get-tsconfig@4.10.1", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ=="],
|
|
453
407
|
|
|
454
408
|
"glob": ["glob@11.0.2", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^4.0.1", "minimatch": "^10.0.0", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ=="],
|
|
455
409
|
|
|
@@ -479,12 +433,6 @@
|
|
|
479
433
|
|
|
480
434
|
"hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],
|
|
481
435
|
|
|
482
|
-
"hosted-git-info": ["hosted-git-info@7.0.2", "", { "dependencies": { "lru-cache": "^10.0.1" } }, "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w=="],
|
|
483
|
-
|
|
484
|
-
"http-errors": ["http-errors@2.0.0", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="],
|
|
485
|
-
|
|
486
|
-
"iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
|
|
487
|
-
|
|
488
436
|
"ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
|
|
489
437
|
|
|
490
438
|
"ignore": ["ignore@7.0.4", "", {}, "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A=="],
|
|
@@ -495,20 +443,16 @@
|
|
|
495
443
|
|
|
496
444
|
"indent-string": ["indent-string@5.0.0", "", {}, "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="],
|
|
497
445
|
|
|
498
|
-
"index-to-position": ["index-to-position@1.1.0", "", {}, "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg=="],
|
|
499
|
-
|
|
500
446
|
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
|
501
447
|
|
|
502
448
|
"insite-common": ["insite-common@2.3.0", "", { "peerDependencies": { "insite-http": "^2.3.0", "insite-ws": "^2.3.0" } }, "sha512-3YCuJ4dZ32BU4JoPxeBjDGv7QncfZas6LmUZRg6AE/5wTWrp5WYatsWjdXvYUrFrgV5Erk7gN6RmaWhhbMcnJQ=="],
|
|
503
449
|
|
|
504
|
-
"insite-http": ["insite-http@2.3.
|
|
450
|
+
"insite-http": ["insite-http@2.3.1", "", { "dependencies": { "@nesvet/n": "^1.2.0", "insite-common": "^2.3.0" } }, "sha512-Tx9Zw9XLnn+jWTRUa6OpES19Y/iO2QxydVa9YZcF6aguk09+07sLJKFqV44wFBvJ1H3xeQ5l5u/vpzoTD/6xag=="],
|
|
505
451
|
|
|
506
|
-
"insite-ws": ["insite-ws@2.3.
|
|
452
|
+
"insite-ws": ["insite-ws@2.3.1", "", { "dependencies": { "@nesvet/n": "^1.2.0", "eventemitter3": "^5.0.1", "insite-common": "^2.3.0", "ws": "^8.18.2" } }, "sha512-h3wjtRMTRqyCZTRo1qFWg9bgI8rSA8LPexeBEOI52vvp+ncv/QFxVd/kPnGlu/Qg0k9E7/foWiXLHpdW+X/kKg=="],
|
|
507
453
|
|
|
508
454
|
"internal-slot": ["internal-slot@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="],
|
|
509
455
|
|
|
510
|
-
"ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="],
|
|
511
|
-
|
|
512
456
|
"is-array-buffer": ["is-array-buffer@3.0.5", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "get-intrinsic": "^1.2.6" } }, "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A=="],
|
|
513
457
|
|
|
514
458
|
"is-async-function": ["is-async-function@2.1.1", "", { "dependencies": { "async-function": "^1.0.0", "call-bound": "^1.0.3", "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" } }, "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ=="],
|
|
@@ -549,8 +493,6 @@
|
|
|
549
493
|
|
|
550
494
|
"is-number-object": ["is-number-object@1.1.1", "", { "dependencies": { "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" } }, "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw=="],
|
|
551
495
|
|
|
552
|
-
"is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="],
|
|
553
|
-
|
|
554
496
|
"is-regex": ["is-regex@1.2.1", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="],
|
|
555
497
|
|
|
556
498
|
"is-set": ["is-set@2.0.3", "", {}, "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg=="],
|
|
@@ -627,18 +569,10 @@
|
|
|
627
569
|
|
|
628
570
|
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
|
|
629
571
|
|
|
630
|
-
"media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="],
|
|
631
|
-
|
|
632
|
-
"merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="],
|
|
633
|
-
|
|
634
572
|
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
|
635
573
|
|
|
636
574
|
"micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
|
|
637
575
|
|
|
638
|
-
"mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="],
|
|
639
|
-
|
|
640
|
-
"mime-types": ["mime-types@3.0.1", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA=="],
|
|
641
|
-
|
|
642
576
|
"mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],
|
|
643
577
|
|
|
644
578
|
"min-indent": ["min-indent@1.0.1", "", {}, "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="],
|
|
@@ -655,12 +589,8 @@
|
|
|
655
589
|
|
|
656
590
|
"natural-orderby": ["natural-orderby@5.0.0", "", {}, "sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg=="],
|
|
657
591
|
|
|
658
|
-
"negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
|
|
659
|
-
|
|
660
592
|
"node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="],
|
|
661
593
|
|
|
662
|
-
"normalize-package-data": ["normalize-package-data@6.0.2", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="],
|
|
663
|
-
|
|
664
594
|
"normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],
|
|
665
595
|
|
|
666
596
|
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
|
|
@@ -679,10 +609,6 @@
|
|
|
679
609
|
|
|
680
610
|
"object.values": ["object.values@1.2.1", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA=="],
|
|
681
611
|
|
|
682
|
-
"on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
|
|
683
|
-
|
|
684
|
-
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
|
685
|
-
|
|
686
612
|
"onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
|
687
613
|
|
|
688
614
|
"open": ["open@10.1.2", "", { "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", "is-wsl": "^3.1.0" } }, "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw=="],
|
|
@@ -701,10 +627,6 @@
|
|
|
701
627
|
|
|
702
628
|
"parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="],
|
|
703
629
|
|
|
704
|
-
"parse-json": ["parse-json@8.3.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "index-to-position": "^1.1.0", "type-fest": "^4.39.1" } }, "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ=="],
|
|
705
|
-
|
|
706
|
-
"parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="],
|
|
707
|
-
|
|
708
630
|
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
|
709
631
|
|
|
710
632
|
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
|
@@ -717,16 +639,12 @@
|
|
|
717
639
|
|
|
718
640
|
"path-scurry": ["path-scurry@2.0.0", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg=="],
|
|
719
641
|
|
|
720
|
-
"path-to-regexp": ["path-to-regexp@8.2.0", "", {}, "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ=="],
|
|
721
|
-
|
|
722
642
|
"perf-regexes": ["perf-regexes@1.0.1", "", {}, "sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng=="],
|
|
723
643
|
|
|
724
644
|
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
|
725
645
|
|
|
726
646
|
"picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
|
727
647
|
|
|
728
|
-
"pkce-challenge": ["pkce-challenge@5.0.0", "", {}, "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ=="],
|
|
729
|
-
|
|
730
648
|
"pluralize": ["pluralize@8.0.0", "", {}, "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA=="],
|
|
731
649
|
|
|
732
650
|
"possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],
|
|
@@ -741,24 +659,12 @@
|
|
|
741
659
|
|
|
742
660
|
"prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="],
|
|
743
661
|
|
|
744
|
-
"proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="],
|
|
745
|
-
|
|
746
662
|
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
|
747
663
|
|
|
748
|
-
"qs": ["qs@6.14.0", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w=="],
|
|
749
|
-
|
|
750
664
|
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
|
|
751
665
|
|
|
752
|
-
"range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="],
|
|
753
|
-
|
|
754
|
-
"raw-body": ["raw-body@3.0.0", "", { "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", "iconv-lite": "0.6.3", "unpipe": "1.0.0" } }, "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g=="],
|
|
755
|
-
|
|
756
666
|
"react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],
|
|
757
667
|
|
|
758
|
-
"read-package-up": ["read-package-up@11.0.0", "", { "dependencies": { "find-up-simple": "^1.0.0", "read-pkg": "^9.0.0", "type-fest": "^4.6.0" } }, "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ=="],
|
|
759
|
-
|
|
760
|
-
"read-pkg": ["read-pkg@9.0.1", "", { "dependencies": { "@types/normalize-package-data": "^2.4.3", "normalize-package-data": "^6.0.0", "parse-json": "^8.0.0", "type-fest": "^4.6.0", "unicorn-magic": "^0.1.0" } }, "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA=="],
|
|
761
|
-
|
|
762
668
|
"readable-stream": ["readable-stream@4.7.0", "", { "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", "process": "^0.11.10", "string_decoder": "^1.3.0" } }, "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg=="],
|
|
763
669
|
|
|
764
670
|
"readdir-glob": ["readdir-glob@1.1.3", "", { "dependencies": { "minimatch": "^5.1.0" } }, "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA=="],
|
|
@@ -785,8 +691,6 @@
|
|
|
785
691
|
|
|
786
692
|
"reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],
|
|
787
693
|
|
|
788
|
-
"router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="],
|
|
789
|
-
|
|
790
694
|
"run-applescript": ["run-applescript@7.0.0", "", {}, "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A=="],
|
|
791
695
|
|
|
792
696
|
"run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],
|
|
@@ -799,22 +703,14 @@
|
|
|
799
703
|
|
|
800
704
|
"safe-regex-test": ["safe-regex-test@1.1.0", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-regex": "^1.2.1" } }, "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw=="],
|
|
801
705
|
|
|
802
|
-
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
|
803
|
-
|
|
804
706
|
"semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
|
805
707
|
|
|
806
|
-
"send": ["send@1.2.0", "", { "dependencies": { "debug": "^4.3.5", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.0", "mime-types": "^3.0.1", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.1" } }, "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw=="],
|
|
807
|
-
|
|
808
|
-
"serve-static": ["serve-static@2.2.0", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ=="],
|
|
809
|
-
|
|
810
708
|
"set-function-length": ["set-function-length@1.2.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="],
|
|
811
709
|
|
|
812
710
|
"set-function-name": ["set-function-name@2.0.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" } }, "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ=="],
|
|
813
711
|
|
|
814
712
|
"set-proto": ["set-proto@1.0.0", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0" } }, "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw=="],
|
|
815
713
|
|
|
816
|
-
"setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="],
|
|
817
|
-
|
|
818
714
|
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
|
|
819
715
|
|
|
820
716
|
"shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
|
|
@@ -833,16 +729,6 @@
|
|
|
833
729
|
|
|
834
730
|
"sourcemap-codec": ["sourcemap-codec@1.4.8", "", {}, "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="],
|
|
835
731
|
|
|
836
|
-
"spdx-correct": ["spdx-correct@3.2.0", "", { "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA=="],
|
|
837
|
-
|
|
838
|
-
"spdx-exceptions": ["spdx-exceptions@2.5.0", "", {}, "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="],
|
|
839
|
-
|
|
840
|
-
"spdx-expression-parse": ["spdx-expression-parse@3.0.1", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="],
|
|
841
|
-
|
|
842
|
-
"spdx-license-ids": ["spdx-license-ids@3.0.21", "", {}, "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg=="],
|
|
843
|
-
|
|
844
|
-
"statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="],
|
|
845
|
-
|
|
846
732
|
"stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="],
|
|
847
733
|
|
|
848
734
|
"streamx": ["streamx@2.22.0", "", { "dependencies": { "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" } }, "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw=="],
|
|
@@ -877,9 +763,9 @@
|
|
|
877
763
|
|
|
878
764
|
"supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
|
|
879
765
|
|
|
880
|
-
"synckit": ["synckit@0.
|
|
766
|
+
"synckit": ["synckit@0.11.6", "", { "dependencies": { "@pkgr/core": "^0.2.4" } }, "sha512-2pR2ubZSV64f/vqm9eLPz/KOvR9Dm+Co/5ChLgeHl0yEDRc6h5hXHoxEQH8Y5Ljycozd3p1k5TTSVdzYGkPvLw=="],
|
|
881
767
|
|
|
882
|
-
"tapable": ["tapable@2.2.
|
|
768
|
+
"tapable": ["tapable@2.2.2", "", {}, "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg=="],
|
|
883
769
|
|
|
884
770
|
"tar-stream": ["tar-stream@3.1.7", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="],
|
|
885
771
|
|
|
@@ -887,20 +773,12 @@
|
|
|
887
773
|
|
|
888
774
|
"to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
|
|
889
775
|
|
|
890
|
-
"toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="],
|
|
891
|
-
|
|
892
776
|
"ts-api-utils": ["ts-api-utils@2.1.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ=="],
|
|
893
777
|
|
|
894
778
|
"tsconfig-paths": ["tsconfig-paths@3.15.0", "", { "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg=="],
|
|
895
779
|
|
|
896
|
-
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
897
|
-
|
|
898
780
|
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
|
899
781
|
|
|
900
|
-
"type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
|
901
|
-
|
|
902
|
-
"type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="],
|
|
903
|
-
|
|
904
782
|
"typed-array-buffer": ["typed-array-buffer@1.0.3", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-typed-array": "^1.1.14" } }, "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw=="],
|
|
905
783
|
|
|
906
784
|
"typed-array-byte-length": ["typed-array-byte-length@1.0.3", "", { "dependencies": { "call-bind": "^1.0.8", "for-each": "^0.3.3", "gopd": "^1.2.0", "has-proto": "^1.2.0", "is-typed-array": "^1.1.14" } }, "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg=="],
|
|
@@ -915,22 +793,14 @@
|
|
|
915
793
|
|
|
916
794
|
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
|
917
795
|
|
|
918
|
-
"unicorn-magic": ["unicorn-magic@0.1.0", "", {}, "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ=="],
|
|
919
|
-
|
|
920
796
|
"universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
|
|
921
797
|
|
|
922
|
-
"unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="],
|
|
923
|
-
|
|
924
798
|
"update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="],
|
|
925
799
|
|
|
926
800
|
"uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="],
|
|
927
801
|
|
|
928
802
|
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
|
929
803
|
|
|
930
|
-
"validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
|
|
931
|
-
|
|
932
|
-
"vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="],
|
|
933
|
-
|
|
934
804
|
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
|
935
805
|
|
|
936
806
|
"which-boxed-primitive": ["which-boxed-primitive@1.1.1", "", { "dependencies": { "is-bigint": "^1.1.0", "is-boolean-object": "^1.2.1", "is-number-object": "^1.1.1", "is-string": "^1.1.1", "is-symbol": "^1.1.1" } }, "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA=="],
|
|
@@ -947,8 +817,6 @@
|
|
|
947
817
|
|
|
948
818
|
"wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
|
949
819
|
|
|
950
|
-
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
|
951
|
-
|
|
952
820
|
"ws": ["ws@8.18.2", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ=="],
|
|
953
821
|
|
|
954
822
|
"yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
|
|
@@ -957,16 +825,14 @@
|
|
|
957
825
|
|
|
958
826
|
"zip-stream": ["zip-stream@6.0.1", "", { "dependencies": { "archiver-utils": "^5.0.0", "compress-commons": "^6.0.2", "readable-stream": "^4.0.0" } }, "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA=="],
|
|
959
827
|
|
|
960
|
-
"zod": ["zod@3.24.4", "", {}, "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg=="],
|
|
961
|
-
|
|
962
|
-
"zod-to-json-schema": ["zod-to-json-schema@3.24.5", "", { "peerDependencies": { "zod": "^3.24.1" } }, "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g=="],
|
|
963
|
-
|
|
964
828
|
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
|
|
965
829
|
|
|
966
830
|
"@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="],
|
|
967
831
|
|
|
968
832
|
"@eslint/eslintrc/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
|
969
833
|
|
|
834
|
+
"@eslint/plugin-kit/@eslint/core": ["@eslint/core@0.13.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw=="],
|
|
835
|
+
|
|
970
836
|
"@humanfs/node/@humanwhocodes/retry": ["@humanwhocodes/retry@0.3.1", "", {}, "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA=="],
|
|
971
837
|
|
|
972
838
|
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
|
@@ -981,6 +847,8 @@
|
|
|
981
847
|
|
|
982
848
|
"clean-regexp/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
|
983
849
|
|
|
850
|
+
"eslint/@eslint/plugin-kit": ["@eslint/plugin-kit@0.3.1", "", { "dependencies": { "@eslint/core": "^0.14.0", "levn": "^0.4.1" } }, "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w=="],
|
|
851
|
+
|
|
984
852
|
"eslint/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
|
985
853
|
|
|
986
854
|
"eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
|
@@ -1011,8 +879,6 @@
|
|
|
1011
879
|
|
|
1012
880
|
"glob/minimatch": ["minimatch@10.0.1", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ=="],
|
|
1013
881
|
|
|
1014
|
-
"hosted-git-info/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
|
1015
|
-
|
|
1016
882
|
"jsonc-eslint-parser/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
|
|
1017
883
|
|
|
1018
884
|
"jsonc-eslint-parser/espree": ["espree@9.6.1", "", { "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" } }, "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ=="],
|
|
@@ -1023,8 +889,6 @@
|
|
|
1023
889
|
|
|
1024
890
|
"log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="],
|
|
1025
891
|
|
|
1026
|
-
"normalize-package-data/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
|
1027
|
-
|
|
1028
892
|
"readdir-glob/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="],
|
|
1029
893
|
|
|
1030
894
|
"regjsparser/jsesc": ["jsesc@3.0.2", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g=="],
|
package/dist/client/WS.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WS.d.ts","sourceRoot":"","sources":["../../src/client/WS.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eA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B,IAAI,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,GAAG,MAAM;IAa5D,WAAW,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;IAM9B,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI;IACjG,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAsC9C,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe;IAM1D;;OAEG;IACH,SAAS,SATgB,MAAM,YAAY,eAAe,UAStB;IAEpC,qBAAqB,CAAC,IAAI,EAAE,MAAM;IAMlC;;OAEG;IACH,UAAU,SATkB,MAAM,UASM;IAuDxC,OAAO;IAiBP,MAAM,CAAC,kBAAkB;;;;;;MAMd;CAEX"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ee=Object.defineProperty;var Y=i=>{throw TypeError(i)};var te=(i,n,e)=>n in i?ee(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e;var c=(i,n,e)=>te(i,typeof n!="symbol"?n+"":n,e),V=(i,n,e)=>n.has(i)||Y("Cannot "+e);var t=(i,n,e)=>(V(i,n,"read from private field"),e?e.call(i):n.get(i)),r=(i,n,e)=>n.has(i)?Y("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(i):n.set(i,e),o=(i,n,e,s)=>(V(i,n,"write to private field"),s?s.call(i,e):n.set(i,e),e),S=(i,n,e)=>(V(i,n,"access private method"),e);var j=(i,n,e,s)=>({set _(h){o(i,n,h,e)},get _(){return t(i,n,s)}});import oe from"eventemitter3";import{noop as z,StatefulPromise as re}from"@nesvet/n";var J=Number.MAX_SAFE_INTEGER/2,f={NORMAL:1e3,PROTOCOL_ERROR:1002,ABNORMAL:1006,NO_HEARTBEAT:3e3,OFFLINE:3001,MANUAL:3500,REOPEN:4e3},K=[f.PROTOCOL_ERROR,f.MANUAL,f.REOPEN],L={REQUEST:"~r-q",RESPONSE:"~r-s"};var he=0,y,k,u,w,g,H,O,R,m,b,E,I,q,x,_,A,F,P,B,C,W,U,Q,G,D,p=class p extends oe{constructor(e={}){super();r(this,u);c(this,"isWebSocket",!0);c(this,"isWebSocketServer",!1);c(this,"isWebSocketServerClient",!1);c(this,"url");c(this,"name");c(this,"protocols");c(this,"reconnectAfter");r(this,y);r(this,k);c(this,"isUsed",!1);c(this,"connectionQuality",0);c(this,"webSocket",null);r(this,g);r(this,O);r(this,R,!1);r(this,m);r(this,b,!1);c(this,"isDestroyed",!1);r(this,E);r(this,I,!1);r(this,q,()=>{o(this,I,!0),t(this,E).resolve(),S(this,u,H).call(this),this.emit("open")});r(this,x,({data:e})=>{if(S(this,u,H).call(this),e){if(e!=="!")try{let[s,...h]=JSON.parse(e);switch(s){case L.REQUEST:t(this,G).call(this,...h);break;default:this.emit("message",s,...h),this.emit(`message:${s}`,...h)}}catch(s){t(this,_).call(this,s)}}else this.webSocket.send("")});r(this,_,e=>{e instanceof Event&&(e=void 0),t(this,E)?.isPending&&t(this,E).reject(e),this.emit("error",e)});r(this,A);r(this,P,e=>{let{code:s,reason:h,wasClean:d}=e;if(t(this,g)&&(clearTimeout(t(this,g)),o(this,g,void 0)),t(this,O)&&(clearTimeout(t(this,O)),o(this,O,void 0)),o(this,R,!1),t(this,m)&&(clearTimeout(t(this,m)),o(this,m,void 0)),o(this,b,!1),t(this,E)?.isPending&&t(this,E).reject(new Error("Closed")),process.env.NODE_ENV==="development"&&!t(this,y)){let a=`\u{1F50C} WS ${this.name} is closed`;switch(s&&(a+=` with code ${s}`),s&&h&&(a+=" and"),h&&(a+=` reason "${h}"`),h){case"no-heartbeat":a+=". Going offline"}!d||s===f.ABNORMAL?(a+=" [UNEXPECTED]",console.warn(a)):console.info(a)}let l=this.webSocket;l.removeEventListener("open",t(this,q)),l.removeEventListener("message",t(this,x)),l.removeEventListener("error",t(this,_)),t(this,I)&&(this.emit("close",e),o(this,I,!1)),this.webSocket=null,S(this,u,F).call(this,s),"navigator"in globalThis&&"addEventListener"in globalThis&&globalThis.removeEventListener("offline",t(this,D))});r(this,B,()=>t(this,E)?.isPending&&t(this,E).reject(new DOMException("Operation aborted","AbortError")));c(this,"connect",this.open);c(this,"disconnect",this.close);r(this,C,[]);r(this,W,()=>{for(let e of t(this,C))this.webSocket.send(e);t(this,C).length=0});r(this,U,0);r(this,Q,new Map);c(this,"onRequest",this.addRequestListener);c(this,"offRequest",this.removeRequestListener);r(this,G,async(e,s,...h)=>{let d=t(this,Q).get(s),l,a=null;if(d)try{l=await d.apply(this,h)}catch(N){if(N instanceof Error){let{message:v,...M}=N;a={message:v,...M}}}else a={message:`Unknown request kind "${s}"`};this.sendMessage(`${L.RESPONSE}-${e}`,a,l)});r(this,D,()=>{this.isOpen&&!t(this,R)&&(o(this,R,!0),S(this,u,w).call(this,p.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS),o(this,O,setTimeout(()=>{o(this,R,!1),o(this,b,!0),S(this,u,w).call(this,p.CONNECTION_QUALITY.UNRESPONSIVE),this.emit("unresponsive"),o(this,m,setTimeout(()=>{o(this,b,!1),this.close(f.OFFLINE,"offline",!1)},4e3))},1e3)),this.webSocket.send("?"))});let{url:s=globalThis.__insite?.wss_url||"/",name:h=(he++).toString(),protocols:d,immediately:l=!0,reconnectAfter:a=2e3,on:N,once:v,quiet:M=!1,signal:$}=e;if(this.url=s,this.name=h,this.protocols=d,this.reconnectAfter=a,N)for(let T in N)N[T]&&this.on(T,N[T]);if(v)for(let T in v)v[T]&&this.once(T,v[T]);o(this,y,M),o(this,k,$),t(this,k)?.addEventListener("abort",t(this,B),{once:!0}),this.url&&l&&this.open().catch(z),t(this,y)||this.on("error",T=>T&&console.error("\u{1F50C}\u2757\uFE0F WS",`${this.name}:`,T))}on(e,s){return super.on(e,s)}get state(){if(!this.webSocket)return"closed";switch(this.webSocket.readyState){case WebSocket.CONNECTING:return"connecting";case WebSocket.OPEN:return t(this,b)?"unresponsive":"open";case WebSocket.CLOSING:return"closing"}return"closed"}get isConnecting(){return this.webSocket?.readyState===WebSocket.CONNECTING}get isOpen(){return this.webSocket?.readyState===WebSocket.OPEN}get isClosing(){return this.webSocket?.readyState===WebSocket.CLOSING}get isClosed(){return!this.webSocket}async open(e={}){if(this.isDestroyed)throw new Error("WS has been destroyed");if(t(this,k)?.aborted)throw new DOMException("Operation aborted","AbortError");if(t(this,E)?.isPending)return t(this,E);this.isUsed?this.close(f.REOPEN,"reopen"):this.isUsed=!0;let s;return e.url&&this.url!==e.url&&(s=this.url,this.url=e.url),e.protocols&&(this.protocols=e.protocols),o(this,E,new re((h,d)=>{if(this.url){let l=new WebSocket(this.url,this.protocols);l.addEventListener("open",t(this,q),{once:!0}),l.addEventListener("message",t(this,x)),l.addEventListener("error",t(this,_)),l.addEventListener("close",t(this,P),{once:!0}),this.webSocket=l,s&&this.emit("server-change",this.url,s),this.emit("connecting"),"navigator"in globalThis&&"addEventListener"in globalThis&&globalThis.addEventListener("offline",t(this,D))}else this.webSocket=null,d(new Error("url prop is not set"))})),t(this,E)}close(e=f.MANUAL,s="manual",h=!0){this.isClosed?S(this,u,F).call(this,e):(this.webSocket.removeEventListener("close",t(this,P)),this.webSocket.close(e,s),t(this,P).call(this,Object.assign(new Event("close"),{code:e,reason:s,wasClean:h})))}send(e){this.isOpen?this.webSocket.send(e):(t(this,C).length||this.once("open",t(this,W)),t(this,C).push(e))}sendMessage(...e){return this.send(JSON.stringify(e))}sendRequest(...e){let s=j(this,U)._++;t(this,U)>=J&&o(this,U,0);let h=`message:${L.RESPONSE}-${s}`,d=e.at(-1);return typeof d=="function"?(this.once(h,d),this.sendMessage(L.REQUEST,s,...e.slice(0,-1)),this):new Promise((l,a)=>{this.once(h,(N,v)=>{if(N){let{message:M,...$}=N;a(Object.assign(new Error(M),$))}else l(v)}),this.sendMessage(L.REQUEST,s,...e)})}addRequestListener(e,s){return t(this,Q).set(e,s),this}removeRequestListener(e){return t(this,Q).delete(e),this}destroy(){this.isDestroyed=!0,t(this,C).length=0,this.close(f.NORMAL,"destroy"),this.emit("destroy"),this.removeAllListeners(),t(this,k)?.removeEventListener("abort",t(this,B))}};y=new WeakMap,k=new WeakMap,u=new WeakSet,w=function(e){if(e!==this.connectionQuality){let s=this.connectionQuality;this.connectionQuality=e,this.emit("connection-quality-change",this.connectionQuality,s)}},g=new WeakMap,H=function(){clearTimeout(t(this,g)),o(this,g,setTimeout(()=>this.close(f.NO_HEARTBEAT,"no-heartbeat",!1),35e3)),t(this,O)&&(clearTimeout(t(this,O)),o(this,O,void 0)),o(this,R,!1),t(this,m)&&(clearTimeout(t(this,m)),o(this,m,void 0)),t(this,b)&&(o(this,b,!1),this.emit("responsive")),S(this,u,w).call(this,p.CONNECTION_QUALITY.OPEN)},O=new WeakMap,R=new WeakMap,m=new WeakMap,b=new WeakMap,E=new WeakMap,I=new WeakMap,q=new WeakMap,x=new WeakMap,_=new WeakMap,A=new WeakMap,F=function(e){t(this,A)&&clearTimeout(t(this,A)),this.reconnectAfter&&!K.includes(e)?(process.env.NODE_ENV==="development"&&!t(this,y)&&console.info(`\u{1F50C} WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter/1e3)} seconds`),o(this,A,setTimeout(()=>this.open().catch(z),this.reconnectAfter)),S(this,u,w).call(this,p.CONNECTION_QUALITY.RECONNECTING)):(o(this,A,void 0),S(this,u,w).call(this,e===f.REOPEN?p.CONNECTION_QUALITY.RECONNECTING:p.CONNECTION_QUALITY.CLOSED))},P=new WeakMap,B=new WeakMap,C=new WeakMap,W=new WeakMap,U=new WeakMap,Q=new WeakMap,G=new WeakMap,D=new WeakMap,c(p,"CONNECTION_QUALITY",{CLOSED:0,RECONNECTING:1,UNRESPONSIVE:2,CHECKING_RESPONSIVENESS:3,OPEN:4});var Z=p;export{Z as WS};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/client/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/client/WS.ts", "../../src/common.ts"],
|
|
4
|
-
"sourcesContent": ["import EventEmitter from \"eventemitter3\";\nimport { noop, StatefulPromise } from \"@nesvet/n\";\nimport {\n\tCODES,\n\tHEARTBEAT_GAP,\n\tHEARTBEAT_INTERVAL,\n\tNON_RECONNECTABLE_CODES,\n\tOFFLINE_TIMEOUT,\n\tREQUEST_COUNTER_LIMIT,\n\tREQUEST_HEADERS,\n\tRESPONSIVENESS_TIMEOUT\n} from \"../common\";\nimport type { ConnectionQuality, Options, RequestListener } from \"./types\";\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nlet i = 0;\n\n\nexport class WS extends EventEmitter {\n\tconstructor(options: Options = {}) {\n\t\tsuper();\n\t\t\n\t\tconst {\n\t\t\turl = globalThis.__insite?.wss_url || \"/\",\n\t\t\tname = (i++).toString(),\n\t\t\tprotocols,\n\t\t\timmediately = true,\n\t\t\treconnectAfter = 2000,\n\t\t\ton,\n\t\t\tquiet = false,\n\t\t\tsignal\n\t\t} = options;\n\t\t\n\t\tthis.url = url;\n\t\tthis.name = name;\n\t\t\n\t\tthis.protocols = protocols;\n\t\t\n\t\tthis.reconnectAfter = reconnectAfter;\n\t\t\n\t\tif (on)\n\t\t\tfor (const eventName in on)\n\t\t\t\tif (on[eventName])\n\t\t\t\t\tthis.on(eventName, on[eventName]);\n\t\t\n\t\tthis.#isQuiet = quiet;\n\t\t\n\t\tthis.#abortSignal = signal;\n\t\tthis.#abortSignal?.addEventListener(\"abort\", this.#handleAbortSignalAbort, { once: true });\n\t\t\n\t\tif (this.url && immediately)\n\t\t\tthis.open().catch(noop);\n\t\t\n\t\tif (!this.#isQuiet)\n\t\t\tthis.on(\"error\", (error: Error) => error && console.error(\"\uD83D\uDD0C\u2757\uFE0F WS\", `${this.name}:`, error));\n\t\t\n\t}\n\t\n\ton(event: \"connecting\" | \"destroy\" | \"open\" | \"responsive\" | \"unresponsive\", callback: (this: this) => void): this;\n\ton<T extends unknown[]>(event: \"message\", callback: (this: this, kind: string, ...rest: T) => void): this;\n\ton<T extends unknown[]>(event: `message:${string}`, callback: (this: this, ...rest: T) => void): this;\n\ton(event: \"connection-quality-change\", callback: (this: this, connectionQuality: ConnectionQuality, prevConnectionQuality: ConnectionQuality) => void): this;\n\ton(event: \"close\", callback: (this: this, closeEvent: CloseEvent) => void): this;\n\ton(event: \"server-change\", callback: (this: this, url: string, prevURL: string) => void): this;\n\ton(event: \"error\", callback: (this: this, error: Error) => void): this;\n\t\n\ton<T extends string | symbol>(event: T, fn: (...args: any[]) => void): this;\n\ton(event: string | symbol, listener: (this: this, ...args: any[]) => void): this {\n\t\treturn super.on(event, listener);\n\t}\n\t\n\treadonly isWebSocket = true;\n\treadonly isWebSocketServer = false;\n\treadonly isWebSocketServerClient = false;\n\t\n\turl;\n\t\n\treadonly name;\n\t\n\tprotocols?;\n\t\n\treconnectAfter;\n\t\n\t#isQuiet;\n\t\n\t#abortSignal?: AbortSignal;\n\t\n\tisUsed = false;\n\t\n\tconnectionQuality: ConnectionQuality = 0;\n\t\n\t#updateConnectionQuality(connectionQuality: ConnectionQuality) {\n\t\tif (connectionQuality !== this.connectionQuality) {\n\t\t\tconst prevConnectionQuality = this.connectionQuality;\n\t\t\tthis.connectionQuality = connectionQuality;\n\t\t\t\n\t\t\tthis.emit(\"connection-quality-change\", this.connectionQuality, prevConnectionQuality);\n\t\t}\n\t\t\n\t}\n\t\n\twebSocket: WebSocket | null = null;\n\t\n\t#heartbeatTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#defib() {\n\t\t\n\t\tclearTimeout(this.#heartbeatTimeout);\n\t\tthis.#heartbeatTimeout = setTimeout(\n\t\t\t() => this.close(CODES.NO_HEARTBEAT, \"no-heartbeat\", false),\n\t\t\tHEARTBEAT_INTERVAL + HEARTBEAT_GAP\n\t\t);\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#isUnresponsive) {\n\t\t\tthis.#isUnresponsive = false;\n\t\t\t\n\t\t\tthis.emit(\"responsive\");\n\t\t}\n\t\t\n\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.OPEN);\n\t\t\n\t}\n\t\n\t#unresponsiveTimeout?: ReturnType<typeof setTimeout>;\n\t#isCheckingResponsiveness = false;\n\t\n\t#offlineTimeout?: ReturnType<typeof setTimeout>;\n\t#isUnresponsive = false;\n\t\n\tget state() {\n\t\t\n\t\tif (!this.webSocket)\n\t\t\treturn \"closed\";\n\t\t\n\t\tswitch (this.webSocket.readyState) {\n\t\t\tcase WebSocket.CONNECTING:\n\t\t\t\treturn \"connecting\";\n\t\t\t\n\t\t\tcase WebSocket.OPEN:\n\t\t\t\treturn this.#isUnresponsive ? \"unresponsive\" : \"open\";\n\t\t\t\n\t\t\tcase WebSocket.CLOSING:\n\t\t\t\treturn \"closing\";\n\t\t}\n\t\t\n\t\treturn \"closed\";\n\t}\n\t\n\tget isConnecting() {\n\t\treturn this.webSocket?.readyState === WebSocket.CONNECTING;\n\t}\n\t\n\tget isOpen() {\n\t\treturn this.webSocket?.readyState === WebSocket.OPEN;\n\t}\n\t\n\tget isClosing() {\n\t\treturn this.webSocket?.readyState === WebSocket.CLOSING;\n\t}\n\t\n\tget isClosed() {\n\t\treturn !this.webSocket;\n\t}\n\t\n\tisDestroyed = false;\n\t\n\t#openPromise?: StatefulPromise<void>;\n\t\n\t#wasOpened = false;\n\t\n\t#handleWebSocketOpen = () => {\n\t\t\n\t\tthis.#wasOpened = true;\n\t\t\n\t\tthis.#openPromise!.resolve();\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tthis.emit(\"open\");\n\t\t\n\t};\n\t\n\t#handleWebSocketMessage = ({ data: message }: MessageEvent<string>) => {\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tif (message) {\n\t\t\tif (message !== \"!\")\n\t\t\t\ttry {\n\t\t\t\t\tconst [ kind, ...rest ] = JSON.parse(message);\n\t\t\t\t\t\n\t\t\t\t\tswitch (kind) {\n\t\t\t\t\t\tcase REQUEST_HEADERS.REQUEST:\n\t\t\t\t\t\t\tvoid this.#handleRequest(...rest as [ id: number, kind: string, ...rest: unknown[] ]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthis.emit(\"message\", kind, ...rest);\n\t\t\t\t\t\t\tthis.emit(`message:${kind}`, ...rest);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.#handleWebSocketError(error as Error);\n\t\t\t\t}\n\t\t} else\n\t\t\tthis.webSocket!.send(\"\");\n\t\t\n\t};\n\t\n\t#handleWebSocketError = (error: Error | Event | undefined) => {\n\t\tif (error instanceof Event)\n\t\t\terror = undefined;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(error as Error);\n\t\t\n\t\tthis.emit(\"error\", error);\n\t\t\n\t};\n\t\n\t#reconnectTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#decideReconnect(code: number) {\n\t\t\n\t\tif (this.#reconnectTimeout)\n\t\t\tclearTimeout(this.#reconnectTimeout);\n\t\t\n\t\tif (this.reconnectAfter && !NON_RECONNECTABLE_CODES.includes(code as typeof NON_RECONNECTABLE_CODES[number])) {\n\t\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet)\n\t\t\t\tconsole.info(`\uD83D\uDD0C WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter / 1000)} seconds`);\n\t\t\t\n\t\t\tthis.#reconnectTimeout = setTimeout(() => this.open().catch(noop), this.reconnectAfter);\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.RECONNECTING);\n\t\t} else {\n\t\t\tthis.#reconnectTimeout = undefined;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(code === CODES.REOPEN ? WS.CONNECTION_QUALITY.RECONNECTING : WS.CONNECTION_QUALITY.CLOSED);\n\t\t}\n\t\t\n\t}\n\t\n\t#handleWebSocketClose = (event: CloseEvent) => {\n\t\tconst { code, reason, wasClean } = event;\n\t\t\n\t\tif (this.#heartbeatTimeout) {\n\t\t\tclearTimeout(this.#heartbeatTimeout);\n\t\t\tthis.#heartbeatTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isUnresponsive = false;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(new Error(\"Closed\"));\n\t\t\n\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet) {\n\t\t\tlet message = `\uD83D\uDD0C WS ${this.name} is closed`;\n\t\t\t\n\t\t\tif (code)\n\t\t\t\tmessage += ` with code ${code}`;\n\t\t\t\n\t\t\tif (code && reason)\n\t\t\t\tmessage += \" and\";\n\t\t\t\n\t\t\tif (reason)\n\t\t\t\tmessage += ` reason \"${reason}\"`;\n\t\t\t\n\t\t\tswitch (reason) {\n\t\t\t\tcase \"no-heartbeat\":\n\t\t\t\t\tmessage += \". Going offline\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!wasClean || code === CODES.ABNORMAL) {\n\t\t\t\tmessage += \" [UNEXPECTED]\";\n\t\t\t\tconsole.warn(message);\n\t\t\t} else\n\t\t\t\tconsole.info(message);\n\t\t}\n\t\t\n\t\tconst webSocket = this.webSocket!;\n\t\t\n\t\twebSocket.removeEventListener(\"open\", this.#handleWebSocketOpen);\n\t\twebSocket.removeEventListener(\"message\", this.#handleWebSocketMessage);\n\t\twebSocket.removeEventListener(\"error\", this.#handleWebSocketError);\n\t\t\n\t\tif (this.#wasOpened) {\n\t\t\tthis.emit(\"close\", event);\n\t\t\t\n\t\t\tthis.#wasOpened = false;\n\t\t}\n\t\t\n\t\tthis.webSocket = null;\n\t\t\n\t\tthis.#decideReconnect(code);\n\t\t\n\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\tglobalThis.removeEventListener(\"offline\", this.#handleOffline);\n\t\t\n\t};\n\t\n\t#handleAbortSignalAbort = () =>\n\t\tthis.#openPromise?.isPending &&\n\t\tthis.#openPromise.reject(new DOMException(\"Operation aborted\", \"AbortError\"));\n\t\n\tasync open(options: Pick<Options, \"protocols\" | \"url\"> = {}): Promise<void> {\n\t\t\n\t\tif (this.isDestroyed)\n\t\t\tthrow new Error(\"WS has been destroyed\");\n\t\t\n\t\tif (this.#abortSignal?.aborted)\n\t\t\tthrow new DOMException(\"Operation aborted\", \"AbortError\");\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\treturn this.#openPromise;\n\t\t\n\t\tif (this.isUsed)\n\t\t\tthis.close(CODES.REOPEN, \"reopen\");\n\t\telse\n\t\t\tthis.isUsed = true;\n\t\t\n\t\tlet prevURL: URL | string | undefined;\n\t\tif (options.url && this.url !== options.url) {\n\t\t\tprevURL = this.url;\n\t\t\tthis.url = options.url;\n\t\t}\n\t\t\n\t\tif (options.protocols)\n\t\t\tthis.protocols = options.protocols;\n\t\t\n\t\tthis.#openPromise = new StatefulPromise((_, reject) => {\n\t\t\t\n\t\t\tif (this.url) {\n\t\t\t\tconst webSocket = new WebSocket(this.url, this.protocols);\n\t\t\t\t\n\t\t\t\twebSocket.addEventListener(\"open\", this.#handleWebSocketOpen, { once: true });\n\t\t\t\twebSocket.addEventListener(\"message\", this.#handleWebSocketMessage);\n\t\t\t\twebSocket.addEventListener(\"error\", this.#handleWebSocketError);\n\t\t\t\twebSocket.addEventListener(\"close\", this.#handleWebSocketClose, { once: true });\n\t\t\t\t\n\t\t\t\tthis.webSocket = webSocket;\n\t\t\t\t\n\t\t\t\tif (prevURL)\n\t\t\t\t\tthis.emit(\"server-change\", this.url, prevURL);\n\t\t\t\t\n\t\t\t\tthis.emit(\"connecting\");\n\t\t\t\t\n\t\t\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\t\t\tglobalThis.addEventListener(\"offline\", this.#handleOffline);\n\t\t\t} else {\n\t\t\t\tthis.webSocket = null;\n\t\t\t\t\n\t\t\t\treject(new Error(\"url prop is not set\"));\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\treturn this.#openPromise;\n\t}\n\t\n\t/**\n\t * Alias for `open()`\n\t */\n\tconnect = this.open;\n\t\n\tclose(code: number = CODES.MANUAL, reason = \"manual\", wasClean: boolean = true) {\n\t\t\n\t\tif (this.isClosed)\n\t\t\tthis.#decideReconnect(code);\n\t\telse {\n\t\t\tthis.webSocket!.removeEventListener(\"close\", this.#handleWebSocketClose);\n\t\t\t\n\t\t\tthis.webSocket!.close(code, reason);\n\t\t\t\n\t\t\tthis.#handleWebSocketClose(Object.assign(new Event(\"close\"), {\n\t\t\t\tcode,\n\t\t\t\treason,\n\t\t\t\twasClean\n\t\t\t}));\n\t\t}\n\t\t\n\t}\n\t\n\t/**\n\t * Alias for `close()`\n\t */\n\tdisconnect = this.close;\n\t\n\t#queue: (ArrayBufferLike | ArrayBufferView | Blob | string)[] = [];\n\t\n\t#releaseQueue = () => {\n\t\t\n\t\tfor (const message of this.#queue)\n\t\t\tthis.webSocket!.send(message);\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t};\n\t\n\tsend(data: ArrayBufferLike | ArrayBufferView | Blob | string) {\n\t\t\n\t\tif (this.isOpen)\n\t\t\tthis.webSocket!.send(data);\n\t\telse {\n\t\t\tif (!this.#queue.length)\n\t\t\t\tthis.once(\"open\", this.#releaseQueue);\n\t\t\t\n\t\t\tthis.#queue.push(data);\n\t\t}\n\t\t\n\t}\n\t\n\tsendMessage(...args: unknown[]) {\n\t\treturn this.send(JSON.stringify(args));\n\t}\n\t\n\t#requestCounter = 0;\n\t\n\tsendRequest<T>(...args: [...unknown[], callback: (error: Error | null, result: T) => void]): this;\n\tsendRequest<T>(...args: unknown[]): Promise<T>;\n\tsendRequest<T>(...args: unknown[]) {\n\t\t\n\t\tconst id = this.#requestCounter++;\n\t\t\n\t\tif (this.#requestCounter >= REQUEST_COUNTER_LIMIT)\n\t\t\tthis.#requestCounter = 0;\n\t\t\n\t\tconst eventName = `message:${REQUEST_HEADERS.RESPONSE}-${id}`;\n\t\t\n\t\tconst lastArg = args.at(-1);\n\t\t\n\t\tif (typeof lastArg == \"function\") {\n\t\t\tthis.once(eventName, lastArg as (error: Error, result: T) => void);\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args.slice(0, -1));\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\treturn new Promise<T>((resolve, reject) => {\n\t\t\t\n\t\t\tthis.once(eventName, (error, result: T) => {\n\t\t\t\tif (error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\treject(Object.assign(new Error(message), restProps) as Error);\n\t\t\t\t} else\n\t\t\t\t\tresolve(result);\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args);\n\t\t\t\n\t\t});\n\t}\n\t\n\t#requestListeners = new Map<string, RequestListener>();\n\t\n\taddRequestListener(kind: string, listener: RequestListener) {\n\t\tthis.#requestListeners.set(kind, listener);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `addRequestListener()`\n\t */\n\tonRequest = this.addRequestListener;\n\t\n\tremoveRequestListener(kind: string) {\n\t\tthis.#requestListeners.delete(kind);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `removeRequestListener()`\n\t */\n\toffRequest = this.removeRequestListener;\n\t\n\t#handleRequest = async (id: number, kind: string, ...rest: unknown[]) => {\n\t\tconst listener = this.#requestListeners.get(kind);\n\t\t\n\t\tlet result;\n\t\tlet requestError = null;\n\t\t\n\t\tif (listener)\n\t\t\ttry {\n\t\t\t\tresult = await listener.apply(this, rest);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\trequestError = { message, ...restProps };\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\trequestError = { message: `Unknown request kind \"${kind}\"` };\n\t\t\n\t\tthis.sendMessage(`${REQUEST_HEADERS.RESPONSE}-${id}`, requestError, result);\n\t\t\n\t};\n\t\n\t#handleOffline = () => {\n\t\t\n\t\tif (this.isOpen && !this.#isCheckingResponsiveness) {\n\t\t\tthis.#isCheckingResponsiveness = true;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS);\n\t\t\t\n\t\t\tthis.#unresponsiveTimeout = setTimeout(() => {\n\t\t\t\t\n\t\t\t\tthis.#isCheckingResponsiveness = false;\n\t\t\t\tthis.#isUnresponsive = true;\n\t\t\t\t\n\t\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.UNRESPONSIVE);\n\t\t\t\t\n\t\t\t\tthis.emit(\"unresponsive\");\n\t\t\t\t\n\t\t\t\tthis.#offlineTimeout = setTimeout(() => {\n\t\t\t\t\t\n\t\t\t\t\tthis.#isUnresponsive = false;\n\t\t\t\t\t\n\t\t\t\t\tthis.close(CODES.OFFLINE, \"offline\", false);\n\t\t\t\t\t\n\t\t\t\t}, OFFLINE_TIMEOUT - RESPONSIVENESS_TIMEOUT);\n\t\t\t\t\n\t\t\t}, RESPONSIVENESS_TIMEOUT);\n\t\t\t\n\t\t\tthis.webSocket!.send(\"?\");\n\t\t}\n\t\t\n\t};\n\t\n\tdestroy() {\n\t\t\n\t\tthis.isDestroyed = true;\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t\tthis.close(CODES.NORMAL, \"destroy\");\n\t\t\n\t\tthis.removeAllListeners();\n\t\t\n\t\tthis.#abortSignal?.removeEventListener(\"abort\", this.#handleAbortSignalAbort);\n\t\t\n\t\tthis.emit(\"destroy\");\n\t\t\n\t}\n\t\n\t\n\tstatic CONNECTION_QUALITY = {\n\t\tCLOSED: 0,\n\t\tRECONNECTING: 1,\n\t\tUNRESPONSIVE: 2,\n\t\tCHECKING_RESPONSIVENESS: 3,\n\t\tOPEN: 4\n\t} as const;\n\t\n}\n", "export const HEARTBEAT_INTERVAL = 5_000;\nexport const HEARTBEAT_GAP = 30_000;\nexport const RESPONSIVENESS_TIMEOUT = 1000;\nexport const OFFLINE_TIMEOUT = 5000;\nexport const REQUEST_COUNTER_LIMIT = Number.MAX_SAFE_INTEGER / 2;\n\nexport const CODES = {\n\tNORMAL: 1000,\n\tPROTOCOL_ERROR: 1002,\n\tABNORMAL: 1006,\n\tNO_HEARTBEAT: 3000,\n\tOFFLINE: 3001,\n\tMANUAL: 3500,\n\tREOPEN: 4000\n} as const;\n\nexport const NON_RECONNECTABLE_CODES = [\n\tCODES.PROTOCOL_ERROR,\n\tCODES.MANUAL,\n\tCODES.REOPEN\n];\n\nexport const REQUEST_HEADERS = {\n\tREQUEST: \"~r-q\",\n\tRESPONSE: \"~r-s\"\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["EventEmitter", "noop", "StatefulPromise", "REQUEST_COUNTER_LIMIT", "CODES", "NON_RECONNECTABLE_CODES", "REQUEST_HEADERS", "i", "_isQuiet", "_abortSignal", "_WS_instances", "updateConnectionQuality_fn", "_heartbeatTimeout", "defib_fn", "_unresponsiveTimeout", "_isCheckingResponsiveness", "_offlineTimeout", "_isUnresponsive", "_openPromise", "_wasOpened", "_handleWebSocketOpen", "_handleWebSocketMessage", "_handleWebSocketError", "_reconnectTimeout", "decideReconnect_fn", "_handleWebSocketClose", "_handleAbortSignalAbort", "_queue", "_releaseQueue", "_requestCounter", "_requestListeners", "_handleRequest", "_handleOffline", "_WS", "EventEmitter", "options", "__privateAdd", "__publicField", "__privateSet", "__privateGet", "__privateMethod", "message", "kind", "rest", "REQUEST_HEADERS", "error", "event", "code", "reason", "wasClean", "CODES", "webSocket", "id", "listener", "result", "requestError", "restProps", "url", "name", "protocols", "immediately", "reconnectAfter", "on", "quiet", "signal", "eventName", "noop", "prevURL", "StatefulPromise", "_", "reject", "data", "args", "__privateWrapper", "REQUEST_COUNTER_LIMIT", "lastArg", "resolve", "connectionQuality", "prevConnectionQuality", "NON_RECONNECTABLE_CODES", "WS"]
|
|
4
|
+
"sourcesContent": ["import EventEmitter from \"eventemitter3\";\nimport { noop, StatefulPromise } from \"@nesvet/n\";\nimport {\n\tCODES,\n\tHEARTBEAT_GAP,\n\tHEARTBEAT_INTERVAL,\n\tNON_RECONNECTABLE_CODES,\n\tOFFLINE_TIMEOUT,\n\tREQUEST_COUNTER_LIMIT,\n\tREQUEST_HEADERS,\n\tRESPONSIVENESS_TIMEOUT\n} from \"../common\";\nimport type { ConnectionQuality, Options, RequestListener } from \"./types\";\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nlet i = 0;\n\n\nexport class WS extends EventEmitter {\n\tconstructor(options: Options = {}) {\n\t\tsuper();\n\t\t\n\t\tconst {\n\t\t\turl = globalThis.__insite?.wss_url || \"/\",\n\t\t\tname = (i++).toString(),\n\t\t\tprotocols,\n\t\t\timmediately = true,\n\t\t\treconnectAfter = 2000,\n\t\t\ton,\n\t\t\tonce,\n\t\t\tquiet = false,\n\t\t\tsignal\n\t\t} = options;\n\t\t\n\t\tthis.url = url;\n\t\tthis.name = name;\n\t\t\n\t\tthis.protocols = protocols;\n\t\t\n\t\tthis.reconnectAfter = reconnectAfter;\n\t\t\n\t\tif (on)\n\t\t\tfor (const eventName in on)\n\t\t\t\tif (on[eventName])\n\t\t\t\t\tthis.on(eventName, on[eventName]);\n\t\t\n\t\tif (once)\n\t\t\tfor (const eventName in once)\n\t\t\t\tif (once[eventName])\n\t\t\t\t\tthis.once(eventName, once[eventName]);\n\t\t\n\t\tthis.#isQuiet = quiet;\n\t\t\n\t\tthis.#abortSignal = signal;\n\t\tthis.#abortSignal?.addEventListener(\"abort\", this.#handleAbortSignalAbort, { once: true });\n\t\t\n\t\tif (this.url && immediately)\n\t\t\tthis.open().catch(noop);\n\t\t\n\t\tif (!this.#isQuiet)\n\t\t\tthis.on(\"error\", (error: Error) => error && console.error(\"\uD83D\uDD0C\u2757\uFE0F WS\", `${this.name}:`, error));\n\t\t\n\t}\n\t\n\ton(event: \"connecting\" | \"destroy\" | \"open\" | \"responsive\" | \"unresponsive\", callback: (this: this) => void): this;\n\ton<T extends unknown[]>(event: \"message\", callback: (this: this, kind: string, ...rest: T) => void): this;\n\ton<T extends unknown[]>(event: `message:${string}`, callback: (this: this, ...rest: T) => void): this;\n\ton(event: \"connection-quality-change\", callback: (this: this, connectionQuality: ConnectionQuality, prevConnectionQuality: ConnectionQuality) => void): this;\n\ton(event: \"close\", callback: (this: this, closeEvent: CloseEvent) => void): this;\n\ton(event: \"server-change\", callback: (this: this, url: string, prevURL: string) => void): this;\n\ton(event: \"error\", callback: (this: this, error: Error) => void): this;\n\t\n\ton<T extends string | symbol>(event: T, fn: (...args: any[]) => void): this;\n\ton(event: string | symbol, listener: (this: this, ...args: any[]) => void): this {\n\t\treturn super.on(event, listener);\n\t}\n\t\n\treadonly isWebSocket = true;\n\treadonly isWebSocketServer = false;\n\treadonly isWebSocketServerClient = false;\n\t\n\turl;\n\t\n\treadonly name;\n\t\n\tprotocols?;\n\t\n\treconnectAfter;\n\t\n\t#isQuiet;\n\t\n\t#abortSignal?: AbortSignal;\n\t\n\tisUsed = false;\n\t\n\tconnectionQuality: ConnectionQuality = 0;\n\t\n\t#updateConnectionQuality(connectionQuality: ConnectionQuality) {\n\t\tif (connectionQuality !== this.connectionQuality) {\n\t\t\tconst prevConnectionQuality = this.connectionQuality;\n\t\t\tthis.connectionQuality = connectionQuality;\n\t\t\t\n\t\t\tthis.emit(\"connection-quality-change\", this.connectionQuality, prevConnectionQuality);\n\t\t}\n\t\t\n\t}\n\t\n\twebSocket: WebSocket | null = null;\n\t\n\t#heartbeatTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#defib() {\n\t\t\n\t\tclearTimeout(this.#heartbeatTimeout);\n\t\tthis.#heartbeatTimeout = setTimeout(\n\t\t\t() => this.close(CODES.NO_HEARTBEAT, \"no-heartbeat\", false),\n\t\t\tHEARTBEAT_INTERVAL + HEARTBEAT_GAP\n\t\t);\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#isUnresponsive) {\n\t\t\tthis.#isUnresponsive = false;\n\t\t\t\n\t\t\tthis.emit(\"responsive\");\n\t\t}\n\t\t\n\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.OPEN);\n\t\t\n\t}\n\t\n\t#unresponsiveTimeout?: ReturnType<typeof setTimeout>;\n\t#isCheckingResponsiveness = false;\n\t\n\t#offlineTimeout?: ReturnType<typeof setTimeout>;\n\t#isUnresponsive = false;\n\t\n\tget state() {\n\t\t\n\t\tif (!this.webSocket)\n\t\t\treturn \"closed\";\n\t\t\n\t\tswitch (this.webSocket.readyState) {\n\t\t\tcase WebSocket.CONNECTING:\n\t\t\t\treturn \"connecting\";\n\t\t\t\n\t\t\tcase WebSocket.OPEN:\n\t\t\t\treturn this.#isUnresponsive ? \"unresponsive\" : \"open\";\n\t\t\t\n\t\t\tcase WebSocket.CLOSING:\n\t\t\t\treturn \"closing\";\n\t\t}\n\t\t\n\t\treturn \"closed\";\n\t}\n\t\n\tget isConnecting() {\n\t\treturn this.webSocket?.readyState === WebSocket.CONNECTING;\n\t}\n\t\n\tget isOpen() {\n\t\treturn this.webSocket?.readyState === WebSocket.OPEN;\n\t}\n\t\n\tget isClosing() {\n\t\treturn this.webSocket?.readyState === WebSocket.CLOSING;\n\t}\n\t\n\tget isClosed() {\n\t\treturn !this.webSocket;\n\t}\n\t\n\tisDestroyed = false;\n\t\n\t#openPromise?: StatefulPromise<void>;\n\t\n\t#wasOpened = false;\n\t\n\t#handleWebSocketOpen = () => {\n\t\t\n\t\tthis.#wasOpened = true;\n\t\t\n\t\tthis.#openPromise!.resolve();\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tthis.emit(\"open\");\n\t\t\n\t};\n\t\n\t#handleWebSocketMessage = ({ data: message }: MessageEvent<string>) => {\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tif (message) {\n\t\t\tif (message !== \"!\")\n\t\t\t\ttry {\n\t\t\t\t\tconst [ kind, ...rest ] = JSON.parse(message);\n\t\t\t\t\t\n\t\t\t\t\tswitch (kind) {\n\t\t\t\t\t\tcase REQUEST_HEADERS.REQUEST:\n\t\t\t\t\t\t\tvoid this.#handleRequest(...rest as [ id: number, kind: string, ...rest: unknown[] ]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthis.emit(\"message\", kind, ...rest);\n\t\t\t\t\t\t\tthis.emit(`message:${kind}`, ...rest);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.#handleWebSocketError(error as Error);\n\t\t\t\t}\n\t\t} else\n\t\t\tthis.webSocket!.send(\"\");\n\t\t\n\t};\n\t\n\t#handleWebSocketError = (error: Error | Event | undefined) => {\n\t\tif (error instanceof Event)\n\t\t\terror = undefined;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(error as Error);\n\t\t\n\t\tthis.emit(\"error\", error);\n\t\t\n\t};\n\t\n\t#reconnectTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#decideReconnect(code: number) {\n\t\t\n\t\tif (this.#reconnectTimeout)\n\t\t\tclearTimeout(this.#reconnectTimeout);\n\t\t\n\t\tif (this.reconnectAfter && !NON_RECONNECTABLE_CODES.includes(code as typeof NON_RECONNECTABLE_CODES[number])) {\n\t\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet)\n\t\t\t\tconsole.info(`\uD83D\uDD0C WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter / 1000)} seconds`);\n\t\t\t\n\t\t\tthis.#reconnectTimeout = setTimeout(() => this.open().catch(noop), this.reconnectAfter);\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.RECONNECTING);\n\t\t} else {\n\t\t\tthis.#reconnectTimeout = undefined;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(code === CODES.REOPEN ? WS.CONNECTION_QUALITY.RECONNECTING : WS.CONNECTION_QUALITY.CLOSED);\n\t\t}\n\t\t\n\t}\n\t\n\t#handleWebSocketClose = (event: CloseEvent) => {\n\t\tconst { code, reason, wasClean } = event;\n\t\t\n\t\tif (this.#heartbeatTimeout) {\n\t\t\tclearTimeout(this.#heartbeatTimeout);\n\t\t\tthis.#heartbeatTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isUnresponsive = false;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(new Error(\"Closed\"));\n\t\t\n\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet) {\n\t\t\tlet message = `\uD83D\uDD0C WS ${this.name} is closed`;\n\t\t\t\n\t\t\tif (code)\n\t\t\t\tmessage += ` with code ${code}`;\n\t\t\t\n\t\t\tif (code && reason)\n\t\t\t\tmessage += \" and\";\n\t\t\t\n\t\t\tif (reason)\n\t\t\t\tmessage += ` reason \"${reason}\"`;\n\t\t\t\n\t\t\tswitch (reason) {\n\t\t\t\tcase \"no-heartbeat\":\n\t\t\t\t\tmessage += \". Going offline\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!wasClean || code === CODES.ABNORMAL) {\n\t\t\t\tmessage += \" [UNEXPECTED]\";\n\t\t\t\tconsole.warn(message);\n\t\t\t} else\n\t\t\t\tconsole.info(message);\n\t\t}\n\t\t\n\t\tconst webSocket = this.webSocket!;\n\t\t\n\t\twebSocket.removeEventListener(\"open\", this.#handleWebSocketOpen);\n\t\twebSocket.removeEventListener(\"message\", this.#handleWebSocketMessage);\n\t\twebSocket.removeEventListener(\"error\", this.#handleWebSocketError);\n\t\t\n\t\tif (this.#wasOpened) {\n\t\t\tthis.emit(\"close\", event);\n\t\t\t\n\t\t\tthis.#wasOpened = false;\n\t\t}\n\t\t\n\t\tthis.webSocket = null;\n\t\t\n\t\tthis.#decideReconnect(code);\n\t\t\n\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\tglobalThis.removeEventListener(\"offline\", this.#handleOffline);\n\t\t\n\t};\n\t\n\t#handleAbortSignalAbort = () =>\n\t\tthis.#openPromise?.isPending &&\n\t\tthis.#openPromise.reject(new DOMException(\"Operation aborted\", \"AbortError\"));\n\t\n\tasync open(options: Pick<Options, \"protocols\" | \"url\"> = {}): Promise<void> {\n\t\t\n\t\tif (this.isDestroyed)\n\t\t\tthrow new Error(\"WS has been destroyed\");\n\t\t\n\t\tif (this.#abortSignal?.aborted)\n\t\t\tthrow new DOMException(\"Operation aborted\", \"AbortError\");\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\treturn this.#openPromise;\n\t\t\n\t\tif (this.isUsed)\n\t\t\tthis.close(CODES.REOPEN, \"reopen\");\n\t\telse\n\t\t\tthis.isUsed = true;\n\t\t\n\t\tlet prevURL: URL | string | undefined;\n\t\tif (options.url && this.url !== options.url) {\n\t\t\tprevURL = this.url;\n\t\t\tthis.url = options.url;\n\t\t}\n\t\t\n\t\tif (options.protocols)\n\t\t\tthis.protocols = options.protocols;\n\t\t\n\t\tthis.#openPromise = new StatefulPromise((_, reject) => {\n\t\t\t\n\t\t\tif (this.url) {\n\t\t\t\tconst webSocket = new WebSocket(this.url, this.protocols);\n\t\t\t\t\n\t\t\t\twebSocket.addEventListener(\"open\", this.#handleWebSocketOpen, { once: true });\n\t\t\t\twebSocket.addEventListener(\"message\", this.#handleWebSocketMessage);\n\t\t\t\twebSocket.addEventListener(\"error\", this.#handleWebSocketError);\n\t\t\t\twebSocket.addEventListener(\"close\", this.#handleWebSocketClose, { once: true });\n\t\t\t\t\n\t\t\t\tthis.webSocket = webSocket;\n\t\t\t\t\n\t\t\t\tif (prevURL)\n\t\t\t\t\tthis.emit(\"server-change\", this.url, prevURL);\n\t\t\t\t\n\t\t\t\tthis.emit(\"connecting\");\n\t\t\t\t\n\t\t\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\t\t\tglobalThis.addEventListener(\"offline\", this.#handleOffline);\n\t\t\t} else {\n\t\t\t\tthis.webSocket = null;\n\t\t\t\t\n\t\t\t\treject(new Error(\"url prop is not set\"));\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\treturn this.#openPromise;\n\t}\n\t\n\t/**\n\t * Alias for `open()`\n\t */\n\tconnect = this.open;\n\t\n\tclose(code: number = CODES.MANUAL, reason = \"manual\", wasClean: boolean = true) {\n\t\t\n\t\tif (this.isClosed)\n\t\t\tthis.#decideReconnect(code);\n\t\telse {\n\t\t\tthis.webSocket!.removeEventListener(\"close\", this.#handleWebSocketClose);\n\t\t\t\n\t\t\tthis.webSocket!.close(code, reason);\n\t\t\t\n\t\t\tthis.#handleWebSocketClose(Object.assign(new Event(\"close\"), {\n\t\t\t\tcode,\n\t\t\t\treason,\n\t\t\t\twasClean\n\t\t\t}));\n\t\t}\n\t\t\n\t}\n\t\n\t/**\n\t * Alias for `close()`\n\t */\n\tdisconnect = this.close;\n\t\n\t#queue: (ArrayBufferLike | ArrayBufferView | Blob | string)[] = [];\n\t\n\t#releaseQueue = () => {\n\t\t\n\t\tfor (const message of this.#queue)\n\t\t\tthis.webSocket!.send(message);\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t};\n\t\n\tsend(data: ArrayBufferLike | ArrayBufferView | Blob | string) {\n\t\t\n\t\tif (this.isOpen)\n\t\t\tthis.webSocket!.send(data);\n\t\telse {\n\t\t\tif (!this.#queue.length)\n\t\t\t\tthis.once(\"open\", this.#releaseQueue);\n\t\t\t\n\t\t\tthis.#queue.push(data);\n\t\t}\n\t\t\n\t}\n\t\n\tsendMessage(...args: unknown[]) {\n\t\treturn this.send(JSON.stringify(args));\n\t}\n\t\n\t#requestCounter = 0;\n\t\n\tsendRequest<T>(...args: [...unknown[], callback: (error: Error | null, result: T) => void]): this;\n\tsendRequest<T>(...args: unknown[]): Promise<T>;\n\tsendRequest<T>(...args: unknown[]) {\n\t\t\n\t\tconst id = this.#requestCounter++;\n\t\t\n\t\tif (this.#requestCounter >= REQUEST_COUNTER_LIMIT)\n\t\t\tthis.#requestCounter = 0;\n\t\t\n\t\tconst eventName = `message:${REQUEST_HEADERS.RESPONSE}-${id}`;\n\t\t\n\t\tconst lastArg = args.at(-1);\n\t\t\n\t\tif (typeof lastArg == \"function\") {\n\t\t\tthis.once(eventName, lastArg as (error: Error, result: T) => void);\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args.slice(0, -1));\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\treturn new Promise<T>((resolve, reject) => {\n\t\t\t\n\t\t\tthis.once(eventName, (error, result: T) => {\n\t\t\t\tif (error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\treject(Object.assign(new Error(message), restProps) as Error);\n\t\t\t\t} else\n\t\t\t\t\tresolve(result);\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args);\n\t\t\t\n\t\t});\n\t}\n\t\n\t#requestListeners = new Map<string, RequestListener>();\n\t\n\taddRequestListener(kind: string, listener: RequestListener) {\n\t\tthis.#requestListeners.set(kind, listener);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `addRequestListener()`\n\t */\n\tonRequest = this.addRequestListener;\n\t\n\tremoveRequestListener(kind: string) {\n\t\tthis.#requestListeners.delete(kind);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `removeRequestListener()`\n\t */\n\toffRequest = this.removeRequestListener;\n\t\n\t#handleRequest = async (id: number, kind: string, ...rest: unknown[]) => {\n\t\tconst listener = this.#requestListeners.get(kind);\n\t\t\n\t\tlet result;\n\t\tlet requestError = null;\n\t\t\n\t\tif (listener)\n\t\t\ttry {\n\t\t\t\tresult = await listener.apply(this, rest);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\trequestError = { message, ...restProps };\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\trequestError = { message: `Unknown request kind \"${kind}\"` };\n\t\t\n\t\tthis.sendMessage(`${REQUEST_HEADERS.RESPONSE}-${id}`, requestError, result);\n\t\t\n\t};\n\t\n\t#handleOffline = () => {\n\t\t\n\t\tif (this.isOpen && !this.#isCheckingResponsiveness) {\n\t\t\tthis.#isCheckingResponsiveness = true;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS);\n\t\t\t\n\t\t\tthis.#unresponsiveTimeout = setTimeout(() => {\n\t\t\t\t\n\t\t\t\tthis.#isCheckingResponsiveness = false;\n\t\t\t\tthis.#isUnresponsive = true;\n\t\t\t\t\n\t\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.UNRESPONSIVE);\n\t\t\t\t\n\t\t\t\tthis.emit(\"unresponsive\");\n\t\t\t\t\n\t\t\t\tthis.#offlineTimeout = setTimeout(() => {\n\t\t\t\t\t\n\t\t\t\t\tthis.#isUnresponsive = false;\n\t\t\t\t\t\n\t\t\t\t\tthis.close(CODES.OFFLINE, \"offline\", false);\n\t\t\t\t\t\n\t\t\t\t}, OFFLINE_TIMEOUT - RESPONSIVENESS_TIMEOUT);\n\t\t\t\t\n\t\t\t}, RESPONSIVENESS_TIMEOUT);\n\t\t\t\n\t\t\tthis.webSocket!.send(\"?\");\n\t\t}\n\t\t\n\t};\n\t\n\tdestroy() {\n\t\t\n\t\tthis.isDestroyed = true;\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t\tthis.close(CODES.NORMAL, \"destroy\");\n\t\t\n\t\tthis.emit(\"destroy\");\n\t\t\n\t\tthis.removeAllListeners();\n\t\t\n\t\tthis.#abortSignal?.removeEventListener(\"abort\", this.#handleAbortSignalAbort);\n\t\t\n\t}\n\t\n\t\n\tstatic CONNECTION_QUALITY = {\n\t\tCLOSED: 0,\n\t\tRECONNECTING: 1,\n\t\tUNRESPONSIVE: 2,\n\t\tCHECKING_RESPONSIVENESS: 3,\n\t\tOPEN: 4\n\t} as const;\n\t\n}\n", "export const HEARTBEAT_INTERVAL = 5_000;\nexport const HEARTBEAT_GAP = 30_000;\nexport const RESPONSIVENESS_TIMEOUT = 1000;\nexport const OFFLINE_TIMEOUT = 5000;\nexport const REQUEST_COUNTER_LIMIT = Number.MAX_SAFE_INTEGER / 2;\n\nexport const CODES = {\n\tNORMAL: 1000,\n\tPROTOCOL_ERROR: 1002,\n\tABNORMAL: 1006,\n\tNO_HEARTBEAT: 3000,\n\tOFFLINE: 3001,\n\tMANUAL: 3500,\n\tREOPEN: 4000\n} as const;\n\nexport const NON_RECONNECTABLE_CODES = [\n\tCODES.PROTOCOL_ERROR,\n\tCODES.MANUAL,\n\tCODES.REOPEN\n];\n\nexport const REQUEST_HEADERS = {\n\tREQUEST: \"~r-q\",\n\tRESPONSE: \"~r-s\"\n};\n"],
|
|
5
|
+
"mappings": "gmBAAA,OAAOA,OAAkB,gBACzB,OAAS,QAAAC,EAAM,mBAAAC,OAAuB,YCG/B,IAAMC,EAAwB,OAAO,iBAAmB,EAElDC,EAAQ,CACpB,OAAQ,IACR,eAAgB,KAChB,SAAU,KACV,aAAc,IACd,QAAS,KACT,OAAQ,KACR,OAAQ,GACT,EAEaC,EAA0B,CACtCD,EAAM,eACNA,EAAM,OACNA,EAAM,MACP,EAEaE,EAAkB,CAC9B,QAAS,OACT,SAAU,MACX,EDPA,IAAIC,GAAI,EAlBRC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAqBaC,EAAN,MAAMA,UAAWC,EAAa,CACpC,YAAYC,EAAmB,CAAC,EAAG,CAClC,MAAM,EAFDC,EAAA,KAAA1B,GA2DN2B,EAAA,KAAS,cAAc,IACvBA,EAAA,KAAS,oBAAoB,IAC7BA,EAAA,KAAS,0BAA0B,IAEnCA,EAAA,YAEAA,EAAA,KAAS,QAETA,EAAA,kBAEAA,EAA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|
+
"names": ["EventEmitter", "noop", "StatefulPromise", "REQUEST_COUNTER_LIMIT", "CODES", "NON_RECONNECTABLE_CODES", "REQUEST_HEADERS", "i", "_isQuiet", "_abortSignal", "_WS_instances", "updateConnectionQuality_fn", "_heartbeatTimeout", "defib_fn", "_unresponsiveTimeout", "_isCheckingResponsiveness", "_offlineTimeout", "_isUnresponsive", "_openPromise", "_wasOpened", "_handleWebSocketOpen", "_handleWebSocketMessage", "_handleWebSocketError", "_reconnectTimeout", "decideReconnect_fn", "_handleWebSocketClose", "_handleAbortSignalAbort", "_queue", "_releaseQueue", "_requestCounter", "_requestListeners", "_handleRequest", "_handleOffline", "_WS", "EventEmitter", "options", "__privateAdd", "__publicField", "__privateSet", "__privateGet", "__privateMethod", "message", "kind", "rest", "REQUEST_HEADERS", "error", "event", "code", "reason", "wasClean", "CODES", "webSocket", "id", "listener", "result", "requestError", "restProps", "url", "name", "protocols", "immediately", "reconnectAfter", "on", "once", "quiet", "signal", "eventName", "noop", "prevURL", "StatefulPromise", "_", "reject", "data", "args", "__privateWrapper", "REQUEST_COUNTER_LIMIT", "lastArg", "resolve", "connectionQuality", "prevConnectionQuality", "NON_RECONNECTABLE_CODES", "WS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import m from"ws";globalThis.WebSocket=m;import g from"eventemitter3";import{noop as S,StatefulPromise as R}from"@nesvet/n";var d=Number.MAX_SAFE_INTEGER/2,r={NORMAL:1e3,PROTOCOL_ERROR:1002,ABNORMAL:1006,NO_HEARTBEAT:3e3,OFFLINE:3001,MANUAL:3500,REOPEN:4e3},T=[r.PROTOCOL_ERROR,r.MANUAL,r.REOPEN],E={REQUEST:"~r-q",RESPONSE:"~r-s"};var C=0,O=class l extends g{constructor(e={}){super();let{url:t=globalThis.__insite?.wss_url||"/",name:s=(C++).toString(),protocols:o,immediately:i=!0,reconnectAfter:n=2e3,on:h,once:a,quiet:u=!1,signal:f}=e;if(this.url=t,this.name=s,this.protocols=o,this.reconnectAfter=n,h)for(let c in h)h[c]&&this.on(c,h[c]);if(a)for(let c in a)a[c]&&this.once(c,a[c]);this.#c=u,this.#a=f,this.#a?.addEventListener("abort",this.#p,{once:!0}),this.url&&i&&this.open().catch(S),this.#c||this.on("error",c=>c&&console.error("\u{1F50C}\u2757\uFE0F WS",`${this.name}:`,c))}on(e,t){return super.on(e,t)}isWebSocket=!0;isWebSocketServer=!1;isWebSocketServerClient=!1;url;name;protocols;reconnectAfter;#c;#a;isUsed=!1;connectionQuality=0;#n(e){if(e!==this.connectionQuality){let t=this.connectionQuality;this.connectionQuality=e,this.emit("connection-quality-change",this.connectionQuality,t)}}webSocket=null;#o;#N(){clearTimeout(this.#o),this.#o=setTimeout(()=>this.close(r.NO_HEARTBEAT,"no-heartbeat",!1),35e3),this.#t&&(clearTimeout(this.#t),this.#t=void 0),this.#r=!1,this.#s&&(clearTimeout(this.#s),this.#s=void 0),this.#i&&(this.#i=!1,this.emit("responsive")),this.#n(l.CONNECTION_QUALITY.OPEN)}#t;#r=!1;#s;#i=!1;get state(){if(!this.webSocket)return"closed";switch(this.webSocket.readyState){case WebSocket.CONNECTING:return"connecting";case WebSocket.OPEN:return this.#i?"unresponsive":"open";case WebSocket.CLOSING:return"closing"}return"closed"}get isConnecting(){return this.webSocket?.readyState===WebSocket.CONNECTING}get isOpen(){return this.webSocket?.readyState===WebSocket.OPEN}get isClosing(){return this.webSocket?.readyState===WebSocket.CLOSING}get isClosed(){return!this.webSocket}isDestroyed=!1;#e;#E=!1;#S=()=>{this.#E=!0,this.#e.resolve(),this.#N(),this.emit("open")};#O=({data:e})=>{if(this.#N(),e){if(e!=="!")try{let[t,...s]=JSON.parse(e);switch(t){case E.REQUEST:this.#g(...s);break;default:this.emit("message",t,...s),this.emit(`message:${t}`,...s)}}catch(t){this.#u(t)}}else this.webSocket.send("")};#u=e=>{e instanceof Event&&(e=void 0),this.#e?.isPending&&this.#e.reject(e),this.emit("error",e)};#l;#m(e){this.#l&&clearTimeout(this.#l),this.reconnectAfter&&!T.includes(e)?(process.env.NODE_ENV==="development"&&!this.#c&&console.info(`\u{1F50C} WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter/1e3)} seconds`),this.#l=setTimeout(()=>this.open().catch(S),this.reconnectAfter),this.#n(l.CONNECTION_QUALITY.RECONNECTING)):(this.#l=void 0,this.#n(e===r.REOPEN?l.CONNECTION_QUALITY.RECONNECTING:l.CONNECTION_QUALITY.CLOSED))}#f=e=>{let{code:t,reason:s,wasClean:o}=e;if(this.#o&&(clearTimeout(this.#o),this.#o=void 0),this.#t&&(clearTimeout(this.#t),this.#t=void 0),this.#r=!1,this.#s&&(clearTimeout(this.#s),this.#s=void 0),this.#i=!1,this.#e?.isPending&&this.#e.reject(new Error("Closed")),process.env.NODE_ENV==="development"&&!this.#c){let n=`\u{1F50C} WS ${this.name} is closed`;switch(t&&(n+=` with code ${t}`),t&&s&&(n+=" and"),s&&(n+=` reason "${s}"`),s){case"no-heartbeat":n+=". Going offline"}!o||t===r.ABNORMAL?(n+=" [UNEXPECTED]",console.warn(n)):console.info(n)}let i=this.webSocket;i.removeEventListener("open",this.#S),i.removeEventListener("message",this.#O),i.removeEventListener("error",this.#u),this.#E&&(this.emit("close",e),this.#E=!1),this.webSocket=null,this.#m(t),"navigator"in globalThis&&"addEventListener"in globalThis&&globalThis.removeEventListener("offline",this.#b)};#p=()=>this.#e?.isPending&&this.#e.reject(new DOMException("Operation aborted","AbortError"));async open(e={}){if(this.isDestroyed)throw new Error("WS has been destroyed");if(this.#a?.aborted)throw new DOMException("Operation aborted","AbortError");if(this.#e?.isPending)return this.#e;this.isUsed?this.close(r.REOPEN,"reopen"):this.isUsed=!0;let t;return e.url&&this.url!==e.url&&(t=this.url,this.url=e.url),e.protocols&&(this.protocols=e.protocols),this.#e=new R((s,o)=>{if(this.url){let i=new WebSocket(this.url,this.protocols);i.addEventListener("open",this.#S,{once:!0}),i.addEventListener("message",this.#O),i.addEventListener("error",this.#u),i.addEventListener("close",this.#f,{once:!0}),this.webSocket=i,t&&this.emit("server-change",this.url,t),this.emit("connecting"),"navigator"in globalThis&&"addEventListener"in globalThis&&globalThis.addEventListener("offline",this.#b)}else this.webSocket=null,o(new Error("url prop is not set"))}),this.#e}connect=this.open;close(e=r.MANUAL,t="manual",s=!0){this.isClosed?this.#m(e):(this.webSocket.removeEventListener("close",this.#f),this.webSocket.close(e,t),this.#f(Object.assign(new Event("close"),{code:e,reason:t,wasClean:s})))}disconnect=this.close;#h=[];#v=()=>{for(let e of this.#h)this.webSocket.send(e);this.#h.length=0};send(e){this.isOpen?this.webSocket.send(e):(this.#h.length||this.once("open",this.#v),this.#h.push(e))}sendMessage(...e){return this.send(JSON.stringify(e))}#d=0;sendRequest(...e){let t=this.#d++;this.#d>=d&&(this.#d=0);let s=`message:${E.RESPONSE}-${t}`,o=e.at(-1);return typeof o=="function"?(this.once(s,o),this.sendMessage(E.REQUEST,t,...e.slice(0,-1)),this):new Promise((i,n)=>{this.once(s,(h,a)=>{if(h){let{message:u,...f}=h;n(Object.assign(new Error(u),f))}else i(a)}),this.sendMessage(E.REQUEST,t,...e)})}#T=new Map;addRequestListener(e,t){return this.#T.set(e,t),this}onRequest=this.addRequestListener;removeRequestListener(e){return this.#T.delete(e),this}offRequest=this.removeRequestListener;#g=async(e,t,...s)=>{let o=this.#T.get(t),i,n=null;if(o)try{i=await o.apply(this,s)}catch(h){if(h instanceof Error){let{message:a,...u}=h;n={message:a,...u}}}else n={message:`Unknown request kind "${t}"`};this.sendMessage(`${E.RESPONSE}-${e}`,n,i)};#b=()=>{this.isOpen&&!this.#r&&(this.#r=!0,this.#n(l.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS),this.#t=setTimeout(()=>{this.#r=!1,this.#i=!0,this.#n(l.CONNECTION_QUALITY.UNRESPONSIVE),this.emit("unresponsive"),this.#s=setTimeout(()=>{this.#i=!1,this.close(r.OFFLINE,"offline",!1)},4e3)},1e3),this.webSocket.send("?"))};destroy(){this.isDestroyed=!0,this.#h.length=0,this.close(r.NORMAL,"destroy"),this.emit("destroy"),this.removeAllListeners(),this.#a?.removeEventListener("abort",this.#p)}static CONNECTION_QUALITY={CLOSED:0,RECONNECTING:1,UNRESPONSIVE:2,CHECKING_RESPONSIVENESS:3,OPEN:4}};export{O as WS};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/client/node/global.ts", "../../../src/client/WS.ts", "../../../src/common.ts"],
|
|
4
|
-
"sourcesContent": ["import WebSocket from \"ws\";\n\n\ndeclare global {\n\tvar WebSocket: typeof WebSocket;// eslint-disable-line no-var, @typescript-eslint/naming-convention, no-shadow\n}\n\nglobalThis.WebSocket = WebSocket as any;// eslint-disable-line @typescript-eslint/no-explicit-any\n", "import EventEmitter from \"eventemitter3\";\nimport { noop, StatefulPromise } from \"@nesvet/n\";\nimport {\n\tCODES,\n\tHEARTBEAT_GAP,\n\tHEARTBEAT_INTERVAL,\n\tNON_RECONNECTABLE_CODES,\n\tOFFLINE_TIMEOUT,\n\tREQUEST_COUNTER_LIMIT,\n\tREQUEST_HEADERS,\n\tRESPONSIVENESS_TIMEOUT\n} from \"../common\";\nimport type { ConnectionQuality, Options, RequestListener } from \"./types\";\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nlet i = 0;\n\n\nexport class WS extends EventEmitter {\n\tconstructor(options: Options = {}) {\n\t\tsuper();\n\t\t\n\t\tconst {\n\t\t\turl = globalThis.__insite?.wss_url || \"/\",\n\t\t\tname = (i++).toString(),\n\t\t\tprotocols,\n\t\t\timmediately = true,\n\t\t\treconnectAfter = 2000,\n\t\t\ton,\n\t\t\tquiet = false,\n\t\t\tsignal\n\t\t} = options;\n\t\t\n\t\tthis.url = url;\n\t\tthis.name = name;\n\t\t\n\t\tthis.protocols = protocols;\n\t\t\n\t\tthis.reconnectAfter = reconnectAfter;\n\t\t\n\t\tif (on)\n\t\t\tfor (const eventName in on)\n\t\t\t\tif (on[eventName])\n\t\t\t\t\tthis.on(eventName, on[eventName]);\n\t\t\n\t\tthis.#isQuiet = quiet;\n\t\t\n\t\tthis.#abortSignal = signal;\n\t\tthis.#abortSignal?.addEventListener(\"abort\", this.#handleAbortSignalAbort, { once: true });\n\t\t\n\t\tif (this.url && immediately)\n\t\t\tthis.open().catch(noop);\n\t\t\n\t\tif (!this.#isQuiet)\n\t\t\tthis.on(\"error\", (error: Error) => error && console.error(\"\uD83D\uDD0C\u2757\uFE0F WS\", `${this.name}:`, error));\n\t\t\n\t}\n\t\n\ton(event: \"connecting\" | \"destroy\" | \"open\" | \"responsive\" | \"unresponsive\", callback: (this: this) => void): this;\n\ton<T extends unknown[]>(event: \"message\", callback: (this: this, kind: string, ...rest: T) => void): this;\n\ton<T extends unknown[]>(event: `message:${string}`, callback: (this: this, ...rest: T) => void): this;\n\ton(event: \"connection-quality-change\", callback: (this: this, connectionQuality: ConnectionQuality, prevConnectionQuality: ConnectionQuality) => void): this;\n\ton(event: \"close\", callback: (this: this, closeEvent: CloseEvent) => void): this;\n\ton(event: \"server-change\", callback: (this: this, url: string, prevURL: string) => void): this;\n\ton(event: \"error\", callback: (this: this, error: Error) => void): this;\n\t\n\ton<T extends string | symbol>(event: T, fn: (...args: any[]) => void): this;\n\ton(event: string | symbol, listener: (this: this, ...args: any[]) => void): this {\n\t\treturn super.on(event, listener);\n\t}\n\t\n\treadonly isWebSocket = true;\n\treadonly isWebSocketServer = false;\n\treadonly isWebSocketServerClient = false;\n\t\n\turl;\n\t\n\treadonly name;\n\t\n\tprotocols?;\n\t\n\treconnectAfter;\n\t\n\t#isQuiet;\n\t\n\t#abortSignal?: AbortSignal;\n\t\n\tisUsed = false;\n\t\n\tconnectionQuality: ConnectionQuality = 0;\n\t\n\t#updateConnectionQuality(connectionQuality: ConnectionQuality) {\n\t\tif (connectionQuality !== this.connectionQuality) {\n\t\t\tconst prevConnectionQuality = this.connectionQuality;\n\t\t\tthis.connectionQuality = connectionQuality;\n\t\t\t\n\t\t\tthis.emit(\"connection-quality-change\", this.connectionQuality, prevConnectionQuality);\n\t\t}\n\t\t\n\t}\n\t\n\twebSocket: WebSocket | null = null;\n\t\n\t#heartbeatTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#defib() {\n\t\t\n\t\tclearTimeout(this.#heartbeatTimeout);\n\t\tthis.#heartbeatTimeout = setTimeout(\n\t\t\t() => this.close(CODES.NO_HEARTBEAT, \"no-heartbeat\", false),\n\t\t\tHEARTBEAT_INTERVAL + HEARTBEAT_GAP\n\t\t);\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#isUnresponsive) {\n\t\t\tthis.#isUnresponsive = false;\n\t\t\t\n\t\t\tthis.emit(\"responsive\");\n\t\t}\n\t\t\n\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.OPEN);\n\t\t\n\t}\n\t\n\t#unresponsiveTimeout?: ReturnType<typeof setTimeout>;\n\t#isCheckingResponsiveness = false;\n\t\n\t#offlineTimeout?: ReturnType<typeof setTimeout>;\n\t#isUnresponsive = false;\n\t\n\tget state() {\n\t\t\n\t\tif (!this.webSocket)\n\t\t\treturn \"closed\";\n\t\t\n\t\tswitch (this.webSocket.readyState) {\n\t\t\tcase WebSocket.CONNECTING:\n\t\t\t\treturn \"connecting\";\n\t\t\t\n\t\t\tcase WebSocket.OPEN:\n\t\t\t\treturn this.#isUnresponsive ? \"unresponsive\" : \"open\";\n\t\t\t\n\t\t\tcase WebSocket.CLOSING:\n\t\t\t\treturn \"closing\";\n\t\t}\n\t\t\n\t\treturn \"closed\";\n\t}\n\t\n\tget isConnecting() {\n\t\treturn this.webSocket?.readyState === WebSocket.CONNECTING;\n\t}\n\t\n\tget isOpen() {\n\t\treturn this.webSocket?.readyState === WebSocket.OPEN;\n\t}\n\t\n\tget isClosing() {\n\t\treturn this.webSocket?.readyState === WebSocket.CLOSING;\n\t}\n\t\n\tget isClosed() {\n\t\treturn !this.webSocket;\n\t}\n\t\n\tisDestroyed = false;\n\t\n\t#openPromise?: StatefulPromise<void>;\n\t\n\t#wasOpened = false;\n\t\n\t#handleWebSocketOpen = () => {\n\t\t\n\t\tthis.#wasOpened = true;\n\t\t\n\t\tthis.#openPromise!.resolve();\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tthis.emit(\"open\");\n\t\t\n\t};\n\t\n\t#handleWebSocketMessage = ({ data: message }: MessageEvent<string>) => {\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tif (message) {\n\t\t\tif (message !== \"!\")\n\t\t\t\ttry {\n\t\t\t\t\tconst [ kind, ...rest ] = JSON.parse(message);\n\t\t\t\t\t\n\t\t\t\t\tswitch (kind) {\n\t\t\t\t\t\tcase REQUEST_HEADERS.REQUEST:\n\t\t\t\t\t\t\tvoid this.#handleRequest(...rest as [ id: number, kind: string, ...rest: unknown[] ]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthis.emit(\"message\", kind, ...rest);\n\t\t\t\t\t\t\tthis.emit(`message:${kind}`, ...rest);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.#handleWebSocketError(error as Error);\n\t\t\t\t}\n\t\t} else\n\t\t\tthis.webSocket!.send(\"\");\n\t\t\n\t};\n\t\n\t#handleWebSocketError = (error: Error | Event | undefined) => {\n\t\tif (error instanceof Event)\n\t\t\terror = undefined;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(error as Error);\n\t\t\n\t\tthis.emit(\"error\", error);\n\t\t\n\t};\n\t\n\t#reconnectTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#decideReconnect(code: number) {\n\t\t\n\t\tif (this.#reconnectTimeout)\n\t\t\tclearTimeout(this.#reconnectTimeout);\n\t\t\n\t\tif (this.reconnectAfter && !NON_RECONNECTABLE_CODES.includes(code as typeof NON_RECONNECTABLE_CODES[number])) {\n\t\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet)\n\t\t\t\tconsole.info(`\uD83D\uDD0C WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter / 1000)} seconds`);\n\t\t\t\n\t\t\tthis.#reconnectTimeout = setTimeout(() => this.open().catch(noop), this.reconnectAfter);\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.RECONNECTING);\n\t\t} else {\n\t\t\tthis.#reconnectTimeout = undefined;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(code === CODES.REOPEN ? WS.CONNECTION_QUALITY.RECONNECTING : WS.CONNECTION_QUALITY.CLOSED);\n\t\t}\n\t\t\n\t}\n\t\n\t#handleWebSocketClose = (event: CloseEvent) => {\n\t\tconst { code, reason, wasClean } = event;\n\t\t\n\t\tif (this.#heartbeatTimeout) {\n\t\t\tclearTimeout(this.#heartbeatTimeout);\n\t\t\tthis.#heartbeatTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isUnresponsive = false;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(new Error(\"Closed\"));\n\t\t\n\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet) {\n\t\t\tlet message = `\uD83D\uDD0C WS ${this.name} is closed`;\n\t\t\t\n\t\t\tif (code)\n\t\t\t\tmessage += ` with code ${code}`;\n\t\t\t\n\t\t\tif (code && reason)\n\t\t\t\tmessage += \" and\";\n\t\t\t\n\t\t\tif (reason)\n\t\t\t\tmessage += ` reason \"${reason}\"`;\n\t\t\t\n\t\t\tswitch (reason) {\n\t\t\t\tcase \"no-heartbeat\":\n\t\t\t\t\tmessage += \". Going offline\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!wasClean || code === CODES.ABNORMAL) {\n\t\t\t\tmessage += \" [UNEXPECTED]\";\n\t\t\t\tconsole.warn(message);\n\t\t\t} else\n\t\t\t\tconsole.info(message);\n\t\t}\n\t\t\n\t\tconst webSocket = this.webSocket!;\n\t\t\n\t\twebSocket.removeEventListener(\"open\", this.#handleWebSocketOpen);\n\t\twebSocket.removeEventListener(\"message\", this.#handleWebSocketMessage);\n\t\twebSocket.removeEventListener(\"error\", this.#handleWebSocketError);\n\t\t\n\t\tif (this.#wasOpened) {\n\t\t\tthis.emit(\"close\", event);\n\t\t\t\n\t\t\tthis.#wasOpened = false;\n\t\t}\n\t\t\n\t\tthis.webSocket = null;\n\t\t\n\t\tthis.#decideReconnect(code);\n\t\t\n\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\tglobalThis.removeEventListener(\"offline\", this.#handleOffline);\n\t\t\n\t};\n\t\n\t#handleAbortSignalAbort = () =>\n\t\tthis.#openPromise?.isPending &&\n\t\tthis.#openPromise.reject(new DOMException(\"Operation aborted\", \"AbortError\"));\n\t\n\tasync open(options: Pick<Options, \"protocols\" | \"url\"> = {}): Promise<void> {\n\t\t\n\t\tif (this.isDestroyed)\n\t\t\tthrow new Error(\"WS has been destroyed\");\n\t\t\n\t\tif (this.#abortSignal?.aborted)\n\t\t\tthrow new DOMException(\"Operation aborted\", \"AbortError\");\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\treturn this.#openPromise;\n\t\t\n\t\tif (this.isUsed)\n\t\t\tthis.close(CODES.REOPEN, \"reopen\");\n\t\telse\n\t\t\tthis.isUsed = true;\n\t\t\n\t\tlet prevURL: URL | string | undefined;\n\t\tif (options.url && this.url !== options.url) {\n\t\t\tprevURL = this.url;\n\t\t\tthis.url = options.url;\n\t\t}\n\t\t\n\t\tif (options.protocols)\n\t\t\tthis.protocols = options.protocols;\n\t\t\n\t\tthis.#openPromise = new StatefulPromise((_, reject) => {\n\t\t\t\n\t\t\tif (this.url) {\n\t\t\t\tconst webSocket = new WebSocket(this.url, this.protocols);\n\t\t\t\t\n\t\t\t\twebSocket.addEventListener(\"open\", this.#handleWebSocketOpen, { once: true });\n\t\t\t\twebSocket.addEventListener(\"message\", this.#handleWebSocketMessage);\n\t\t\t\twebSocket.addEventListener(\"error\", this.#handleWebSocketError);\n\t\t\t\twebSocket.addEventListener(\"close\", this.#handleWebSocketClose, { once: true });\n\t\t\t\t\n\t\t\t\tthis.webSocket = webSocket;\n\t\t\t\t\n\t\t\t\tif (prevURL)\n\t\t\t\t\tthis.emit(\"server-change\", this.url, prevURL);\n\t\t\t\t\n\t\t\t\tthis.emit(\"connecting\");\n\t\t\t\t\n\t\t\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\t\t\tglobalThis.addEventListener(\"offline\", this.#handleOffline);\n\t\t\t} else {\n\t\t\t\tthis.webSocket = null;\n\t\t\t\t\n\t\t\t\treject(new Error(\"url prop is not set\"));\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\treturn this.#openPromise;\n\t}\n\t\n\t/**\n\t * Alias for `open()`\n\t */\n\tconnect = this.open;\n\t\n\tclose(code: number = CODES.MANUAL, reason = \"manual\", wasClean: boolean = true) {\n\t\t\n\t\tif (this.isClosed)\n\t\t\tthis.#decideReconnect(code);\n\t\telse {\n\t\t\tthis.webSocket!.removeEventListener(\"close\", this.#handleWebSocketClose);\n\t\t\t\n\t\t\tthis.webSocket!.close(code, reason);\n\t\t\t\n\t\t\tthis.#handleWebSocketClose(Object.assign(new Event(\"close\"), {\n\t\t\t\tcode,\n\t\t\t\treason,\n\t\t\t\twasClean\n\t\t\t}));\n\t\t}\n\t\t\n\t}\n\t\n\t/**\n\t * Alias for `close()`\n\t */\n\tdisconnect = this.close;\n\t\n\t#queue: (ArrayBufferLike | ArrayBufferView | Blob | string)[] = [];\n\t\n\t#releaseQueue = () => {\n\t\t\n\t\tfor (const message of this.#queue)\n\t\t\tthis.webSocket!.send(message);\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t};\n\t\n\tsend(data: ArrayBufferLike | ArrayBufferView | Blob | string) {\n\t\t\n\t\tif (this.isOpen)\n\t\t\tthis.webSocket!.send(data);\n\t\telse {\n\t\t\tif (!this.#queue.length)\n\t\t\t\tthis.once(\"open\", this.#releaseQueue);\n\t\t\t\n\t\t\tthis.#queue.push(data);\n\t\t}\n\t\t\n\t}\n\t\n\tsendMessage(...args: unknown[]) {\n\t\treturn this.send(JSON.stringify(args));\n\t}\n\t\n\t#requestCounter = 0;\n\t\n\tsendRequest<T>(...args: [...unknown[], callback: (error: Error | null, result: T) => void]): this;\n\tsendRequest<T>(...args: unknown[]): Promise<T>;\n\tsendRequest<T>(...args: unknown[]) {\n\t\t\n\t\tconst id = this.#requestCounter++;\n\t\t\n\t\tif (this.#requestCounter >= REQUEST_COUNTER_LIMIT)\n\t\t\tthis.#requestCounter = 0;\n\t\t\n\t\tconst eventName = `message:${REQUEST_HEADERS.RESPONSE}-${id}`;\n\t\t\n\t\tconst lastArg = args.at(-1);\n\t\t\n\t\tif (typeof lastArg == \"function\") {\n\t\t\tthis.once(eventName, lastArg as (error: Error, result: T) => void);\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args.slice(0, -1));\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\treturn new Promise<T>((resolve, reject) => {\n\t\t\t\n\t\t\tthis.once(eventName, (error, result: T) => {\n\t\t\t\tif (error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\treject(Object.assign(new Error(message), restProps) as Error);\n\t\t\t\t} else\n\t\t\t\t\tresolve(result);\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args);\n\t\t\t\n\t\t});\n\t}\n\t\n\t#requestListeners = new Map<string, RequestListener>();\n\t\n\taddRequestListener(kind: string, listener: RequestListener) {\n\t\tthis.#requestListeners.set(kind, listener);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `addRequestListener()`\n\t */\n\tonRequest = this.addRequestListener;\n\t\n\tremoveRequestListener(kind: string) {\n\t\tthis.#requestListeners.delete(kind);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `removeRequestListener()`\n\t */\n\toffRequest = this.removeRequestListener;\n\t\n\t#handleRequest = async (id: number, kind: string, ...rest: unknown[]) => {\n\t\tconst listener = this.#requestListeners.get(kind);\n\t\t\n\t\tlet result;\n\t\tlet requestError = null;\n\t\t\n\t\tif (listener)\n\t\t\ttry {\n\t\t\t\tresult = await listener.apply(this, rest);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\trequestError = { message, ...restProps };\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\trequestError = { message: `Unknown request kind \"${kind}\"` };\n\t\t\n\t\tthis.sendMessage(`${REQUEST_HEADERS.RESPONSE}-${id}`, requestError, result);\n\t\t\n\t};\n\t\n\t#handleOffline = () => {\n\t\t\n\t\tif (this.isOpen && !this.#isCheckingResponsiveness) {\n\t\t\tthis.#isCheckingResponsiveness = true;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS);\n\t\t\t\n\t\t\tthis.#unresponsiveTimeout = setTimeout(() => {\n\t\t\t\t\n\t\t\t\tthis.#isCheckingResponsiveness = false;\n\t\t\t\tthis.#isUnresponsive = true;\n\t\t\t\t\n\t\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.UNRESPONSIVE);\n\t\t\t\t\n\t\t\t\tthis.emit(\"unresponsive\");\n\t\t\t\t\n\t\t\t\tthis.#offlineTimeout = setTimeout(() => {\n\t\t\t\t\t\n\t\t\t\t\tthis.#isUnresponsive = false;\n\t\t\t\t\t\n\t\t\t\t\tthis.close(CODES.OFFLINE, \"offline\", false);\n\t\t\t\t\t\n\t\t\t\t}, OFFLINE_TIMEOUT - RESPONSIVENESS_TIMEOUT);\n\t\t\t\t\n\t\t\t}, RESPONSIVENESS_TIMEOUT);\n\t\t\t\n\t\t\tthis.webSocket!.send(\"?\");\n\t\t}\n\t\t\n\t};\n\t\n\tdestroy() {\n\t\t\n\t\tthis.isDestroyed = true;\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t\tthis.close(CODES.NORMAL, \"destroy\");\n\t\t\n\t\tthis.removeAllListeners();\n\t\t\n\t\tthis.#abortSignal?.removeEventListener(\"abort\", this.#handleAbortSignalAbort);\n\t\t\n\t\tthis.emit(\"destroy\");\n\t\t\n\t}\n\t\n\t\n\tstatic CONNECTION_QUALITY = {\n\t\tCLOSED: 0,\n\t\tRECONNECTING: 1,\n\t\tUNRESPONSIVE: 2,\n\t\tCHECKING_RESPONSIVENESS: 3,\n\t\tOPEN: 4\n\t} as const;\n\t\n}\n", "export const HEARTBEAT_INTERVAL = 5_000;\nexport const HEARTBEAT_GAP = 30_000;\nexport const RESPONSIVENESS_TIMEOUT = 1000;\nexport const OFFLINE_TIMEOUT = 5000;\nexport const REQUEST_COUNTER_LIMIT = Number.MAX_SAFE_INTEGER / 2;\n\nexport const CODES = {\n\tNORMAL: 1000,\n\tPROTOCOL_ERROR: 1002,\n\tABNORMAL: 1006,\n\tNO_HEARTBEAT: 3000,\n\tOFFLINE: 3001,\n\tMANUAL: 3500,\n\tREOPEN: 4000\n} as const;\n\nexport const NON_RECONNECTABLE_CODES = [\n\tCODES.PROTOCOL_ERROR,\n\tCODES.MANUAL,\n\tCODES.REOPEN\n];\n\nexport const REQUEST_HEADERS = {\n\tREQUEST: \"~r-q\",\n\tRESPONSE: \"~r-s\"\n};\n"],
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAe,KAOtB,WAAW,UAAYA,ECPvB,OAAOC,MAAkB,gBACzB,OAAS,QAAAC,EAAM,mBAAAC,MAAuB,YCG/B,IAAMC,EAAwB,OAAO,iBAAmB,EAElDC,EAAQ,CACpB,OAAQ,IACR,eAAgB,KAChB,SAAU,KACV,aAAc,IACd,QAAS,KACT,OAAQ,KACR,OAAQ,GACT,EAEaC,EAA0B,CACtCD,EAAM,eACNA,EAAM,OACNA,EAAM,MACP,EAEaE,EAAkB,CAC9B,QAAS,OACT,SAAU,MACX,EDPA,IAAIC,EAAI,EAGKC,EAAN,MAAMC,UAAWC,CAAa,CACpC,YAAYC,EAAmB,CAAC,EAAG,CAClC,MAAM,EAEN,GAAM,CACL,IAAAC,EAAM,WAAW,UAAU,SAAW,IACtC,KAAAC,GAAQN,KAAK,SAAS,EACtB,UAAAO,EACA,YAAAC,EAAc,GACd,eAAAC,EAAiB,IACjB,GAAAC,EACA,MAAAC,EAAQ,GACR,OAAAC,CACD,
|
|
6
|
-
"names": ["WebSocket", "EventEmitter", "noop", "StatefulPromise", "REQUEST_COUNTER_LIMIT", "CODES", "NON_RECONNECTABLE_CODES", "REQUEST_HEADERS", "i", "WS", "_WS", "EventEmitter", "options", "url", "name", "protocols", "immediately", "reconnectAfter", "on", "quiet", "signal", "eventName", "#isQuiet", "#abortSignal", "#handleAbortSignalAbort", "noop", "error", "event", "listener", "#updateConnectionQuality", "connectionQuality", "prevConnectionQuality", "#heartbeatTimeout", "#defib", "CODES", "#unresponsiveTimeout", "#isCheckingResponsiveness", "#offlineTimeout", "#isUnresponsive", "#openPromise", "#wasOpened", "#handleWebSocketOpen", "#handleWebSocketMessage", "message", "kind", "rest", "REQUEST_HEADERS", "#handleRequest", "#handleWebSocketError", "#reconnectTimeout", "#decideReconnect", "code", "NON_RECONNECTABLE_CODES", "#handleWebSocketClose", "reason", "wasClean", "webSocket", "#handleOffline", "prevURL", "StatefulPromise", "_", "reject", "#queue", "#releaseQueue", "data", "args", "#requestCounter", "id", "REQUEST_COUNTER_LIMIT", "lastArg", "resolve", "result", "restProps", "#requestListeners", "requestError"]
|
|
4
|
+
"sourcesContent": ["import WebSocket from \"ws\";\n\n\ndeclare global {\n\tvar WebSocket: typeof WebSocket;// eslint-disable-line no-var, @typescript-eslint/naming-convention, no-shadow\n}\n\nglobalThis.WebSocket = WebSocket as any;// eslint-disable-line @typescript-eslint/no-explicit-any\n", "import EventEmitter from \"eventemitter3\";\nimport { noop, StatefulPromise } from \"@nesvet/n\";\nimport {\n\tCODES,\n\tHEARTBEAT_GAP,\n\tHEARTBEAT_INTERVAL,\n\tNON_RECONNECTABLE_CODES,\n\tOFFLINE_TIMEOUT,\n\tREQUEST_COUNTER_LIMIT,\n\tREQUEST_HEADERS,\n\tRESPONSIVENESS_TIMEOUT\n} from \"../common\";\nimport type { ConnectionQuality, Options, RequestListener } from \"./types\";\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nlet i = 0;\n\n\nexport class WS extends EventEmitter {\n\tconstructor(options: Options = {}) {\n\t\tsuper();\n\t\t\n\t\tconst {\n\t\t\turl = globalThis.__insite?.wss_url || \"/\",\n\t\t\tname = (i++).toString(),\n\t\t\tprotocols,\n\t\t\timmediately = true,\n\t\t\treconnectAfter = 2000,\n\t\t\ton,\n\t\t\tonce,\n\t\t\tquiet = false,\n\t\t\tsignal\n\t\t} = options;\n\t\t\n\t\tthis.url = url;\n\t\tthis.name = name;\n\t\t\n\t\tthis.protocols = protocols;\n\t\t\n\t\tthis.reconnectAfter = reconnectAfter;\n\t\t\n\t\tif (on)\n\t\t\tfor (const eventName in on)\n\t\t\t\tif (on[eventName])\n\t\t\t\t\tthis.on(eventName, on[eventName]);\n\t\t\n\t\tif (once)\n\t\t\tfor (const eventName in once)\n\t\t\t\tif (once[eventName])\n\t\t\t\t\tthis.once(eventName, once[eventName]);\n\t\t\n\t\tthis.#isQuiet = quiet;\n\t\t\n\t\tthis.#abortSignal = signal;\n\t\tthis.#abortSignal?.addEventListener(\"abort\", this.#handleAbortSignalAbort, { once: true });\n\t\t\n\t\tif (this.url && immediately)\n\t\t\tthis.open().catch(noop);\n\t\t\n\t\tif (!this.#isQuiet)\n\t\t\tthis.on(\"error\", (error: Error) => error && console.error(\"\uD83D\uDD0C\u2757\uFE0F WS\", `${this.name}:`, error));\n\t\t\n\t}\n\t\n\ton(event: \"connecting\" | \"destroy\" | \"open\" | \"responsive\" | \"unresponsive\", callback: (this: this) => void): this;\n\ton<T extends unknown[]>(event: \"message\", callback: (this: this, kind: string, ...rest: T) => void): this;\n\ton<T extends unknown[]>(event: `message:${string}`, callback: (this: this, ...rest: T) => void): this;\n\ton(event: \"connection-quality-change\", callback: (this: this, connectionQuality: ConnectionQuality, prevConnectionQuality: ConnectionQuality) => void): this;\n\ton(event: \"close\", callback: (this: this, closeEvent: CloseEvent) => void): this;\n\ton(event: \"server-change\", callback: (this: this, url: string, prevURL: string) => void): this;\n\ton(event: \"error\", callback: (this: this, error: Error) => void): this;\n\t\n\ton<T extends string | symbol>(event: T, fn: (...args: any[]) => void): this;\n\ton(event: string | symbol, listener: (this: this, ...args: any[]) => void): this {\n\t\treturn super.on(event, listener);\n\t}\n\t\n\treadonly isWebSocket = true;\n\treadonly isWebSocketServer = false;\n\treadonly isWebSocketServerClient = false;\n\t\n\turl;\n\t\n\treadonly name;\n\t\n\tprotocols?;\n\t\n\treconnectAfter;\n\t\n\t#isQuiet;\n\t\n\t#abortSignal?: AbortSignal;\n\t\n\tisUsed = false;\n\t\n\tconnectionQuality: ConnectionQuality = 0;\n\t\n\t#updateConnectionQuality(connectionQuality: ConnectionQuality) {\n\t\tif (connectionQuality !== this.connectionQuality) {\n\t\t\tconst prevConnectionQuality = this.connectionQuality;\n\t\t\tthis.connectionQuality = connectionQuality;\n\t\t\t\n\t\t\tthis.emit(\"connection-quality-change\", this.connectionQuality, prevConnectionQuality);\n\t\t}\n\t\t\n\t}\n\t\n\twebSocket: WebSocket | null = null;\n\t\n\t#heartbeatTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#defib() {\n\t\t\n\t\tclearTimeout(this.#heartbeatTimeout);\n\t\tthis.#heartbeatTimeout = setTimeout(\n\t\t\t() => this.close(CODES.NO_HEARTBEAT, \"no-heartbeat\", false),\n\t\t\tHEARTBEAT_INTERVAL + HEARTBEAT_GAP\n\t\t);\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#isUnresponsive) {\n\t\t\tthis.#isUnresponsive = false;\n\t\t\t\n\t\t\tthis.emit(\"responsive\");\n\t\t}\n\t\t\n\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.OPEN);\n\t\t\n\t}\n\t\n\t#unresponsiveTimeout?: ReturnType<typeof setTimeout>;\n\t#isCheckingResponsiveness = false;\n\t\n\t#offlineTimeout?: ReturnType<typeof setTimeout>;\n\t#isUnresponsive = false;\n\t\n\tget state() {\n\t\t\n\t\tif (!this.webSocket)\n\t\t\treturn \"closed\";\n\t\t\n\t\tswitch (this.webSocket.readyState) {\n\t\t\tcase WebSocket.CONNECTING:\n\t\t\t\treturn \"connecting\";\n\t\t\t\n\t\t\tcase WebSocket.OPEN:\n\t\t\t\treturn this.#isUnresponsive ? \"unresponsive\" : \"open\";\n\t\t\t\n\t\t\tcase WebSocket.CLOSING:\n\t\t\t\treturn \"closing\";\n\t\t}\n\t\t\n\t\treturn \"closed\";\n\t}\n\t\n\tget isConnecting() {\n\t\treturn this.webSocket?.readyState === WebSocket.CONNECTING;\n\t}\n\t\n\tget isOpen() {\n\t\treturn this.webSocket?.readyState === WebSocket.OPEN;\n\t}\n\t\n\tget isClosing() {\n\t\treturn this.webSocket?.readyState === WebSocket.CLOSING;\n\t}\n\t\n\tget isClosed() {\n\t\treturn !this.webSocket;\n\t}\n\t\n\tisDestroyed = false;\n\t\n\t#openPromise?: StatefulPromise<void>;\n\t\n\t#wasOpened = false;\n\t\n\t#handleWebSocketOpen = () => {\n\t\t\n\t\tthis.#wasOpened = true;\n\t\t\n\t\tthis.#openPromise!.resolve();\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tthis.emit(\"open\");\n\t\t\n\t};\n\t\n\t#handleWebSocketMessage = ({ data: message }: MessageEvent<string>) => {\n\t\t\n\t\tthis.#defib();\n\t\t\n\t\tif (message) {\n\t\t\tif (message !== \"!\")\n\t\t\t\ttry {\n\t\t\t\t\tconst [ kind, ...rest ] = JSON.parse(message);\n\t\t\t\t\t\n\t\t\t\t\tswitch (kind) {\n\t\t\t\t\t\tcase REQUEST_HEADERS.REQUEST:\n\t\t\t\t\t\t\tvoid this.#handleRequest(...rest as [ id: number, kind: string, ...rest: unknown[] ]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthis.emit(\"message\", kind, ...rest);\n\t\t\t\t\t\t\tthis.emit(`message:${kind}`, ...rest);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.#handleWebSocketError(error as Error);\n\t\t\t\t}\n\t\t} else\n\t\t\tthis.webSocket!.send(\"\");\n\t\t\n\t};\n\t\n\t#handleWebSocketError = (error: Error | Event | undefined) => {\n\t\tif (error instanceof Event)\n\t\t\terror = undefined;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(error as Error);\n\t\t\n\t\tthis.emit(\"error\", error);\n\t\t\n\t};\n\t\n\t#reconnectTimeout?: ReturnType<typeof setTimeout>;\n\t\n\t#decideReconnect(code: number) {\n\t\t\n\t\tif (this.#reconnectTimeout)\n\t\t\tclearTimeout(this.#reconnectTimeout);\n\t\t\n\t\tif (this.reconnectAfter && !NON_RECONNECTABLE_CODES.includes(code as typeof NON_RECONNECTABLE_CODES[number])) {\n\t\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet)\n\t\t\t\tconsole.info(`\uD83D\uDD0C WS ${this.name} will try to reconnect in ${Math.round(this.reconnectAfter / 1000)} seconds`);\n\t\t\t\n\t\t\tthis.#reconnectTimeout = setTimeout(() => this.open().catch(noop), this.reconnectAfter);\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.RECONNECTING);\n\t\t} else {\n\t\t\tthis.#reconnectTimeout = undefined;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(code === CODES.REOPEN ? WS.CONNECTION_QUALITY.RECONNECTING : WS.CONNECTION_QUALITY.CLOSED);\n\t\t}\n\t\t\n\t}\n\t\n\t#handleWebSocketClose = (event: CloseEvent) => {\n\t\tconst { code, reason, wasClean } = event;\n\t\t\n\t\tif (this.#heartbeatTimeout) {\n\t\t\tclearTimeout(this.#heartbeatTimeout);\n\t\t\tthis.#heartbeatTimeout = undefined;\n\t\t}\n\t\t\n\t\tif (this.#unresponsiveTimeout) {\n\t\t\tclearTimeout(this.#unresponsiveTimeout);\n\t\t\tthis.#unresponsiveTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isCheckingResponsiveness = false;\n\t\t\n\t\tif (this.#offlineTimeout) {\n\t\t\tclearTimeout(this.#offlineTimeout);\n\t\t\tthis.#offlineTimeout = undefined;\n\t\t}\n\t\t\n\t\tthis.#isUnresponsive = false;\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\tthis.#openPromise.reject(new Error(\"Closed\"));\n\t\t\n\t\tif (process.env.NODE_ENV === \"development\" && !this.#isQuiet) {\n\t\t\tlet message = `\uD83D\uDD0C WS ${this.name} is closed`;\n\t\t\t\n\t\t\tif (code)\n\t\t\t\tmessage += ` with code ${code}`;\n\t\t\t\n\t\t\tif (code && reason)\n\t\t\t\tmessage += \" and\";\n\t\t\t\n\t\t\tif (reason)\n\t\t\t\tmessage += ` reason \"${reason}\"`;\n\t\t\t\n\t\t\tswitch (reason) {\n\t\t\t\tcase \"no-heartbeat\":\n\t\t\t\t\tmessage += \". Going offline\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!wasClean || code === CODES.ABNORMAL) {\n\t\t\t\tmessage += \" [UNEXPECTED]\";\n\t\t\t\tconsole.warn(message);\n\t\t\t} else\n\t\t\t\tconsole.info(message);\n\t\t}\n\t\t\n\t\tconst webSocket = this.webSocket!;\n\t\t\n\t\twebSocket.removeEventListener(\"open\", this.#handleWebSocketOpen);\n\t\twebSocket.removeEventListener(\"message\", this.#handleWebSocketMessage);\n\t\twebSocket.removeEventListener(\"error\", this.#handleWebSocketError);\n\t\t\n\t\tif (this.#wasOpened) {\n\t\t\tthis.emit(\"close\", event);\n\t\t\t\n\t\t\tthis.#wasOpened = false;\n\t\t}\n\t\t\n\t\tthis.webSocket = null;\n\t\t\n\t\tthis.#decideReconnect(code);\n\t\t\n\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\tglobalThis.removeEventListener(\"offline\", this.#handleOffline);\n\t\t\n\t};\n\t\n\t#handleAbortSignalAbort = () =>\n\t\tthis.#openPromise?.isPending &&\n\t\tthis.#openPromise.reject(new DOMException(\"Operation aborted\", \"AbortError\"));\n\t\n\tasync open(options: Pick<Options, \"protocols\" | \"url\"> = {}): Promise<void> {\n\t\t\n\t\tif (this.isDestroyed)\n\t\t\tthrow new Error(\"WS has been destroyed\");\n\t\t\n\t\tif (this.#abortSignal?.aborted)\n\t\t\tthrow new DOMException(\"Operation aborted\", \"AbortError\");\n\t\t\n\t\tif (this.#openPromise?.isPending)\n\t\t\treturn this.#openPromise;\n\t\t\n\t\tif (this.isUsed)\n\t\t\tthis.close(CODES.REOPEN, \"reopen\");\n\t\telse\n\t\t\tthis.isUsed = true;\n\t\t\n\t\tlet prevURL: URL | string | undefined;\n\t\tif (options.url && this.url !== options.url) {\n\t\t\tprevURL = this.url;\n\t\t\tthis.url = options.url;\n\t\t}\n\t\t\n\t\tif (options.protocols)\n\t\t\tthis.protocols = options.protocols;\n\t\t\n\t\tthis.#openPromise = new StatefulPromise((_, reject) => {\n\t\t\t\n\t\t\tif (this.url) {\n\t\t\t\tconst webSocket = new WebSocket(this.url, this.protocols);\n\t\t\t\t\n\t\t\t\twebSocket.addEventListener(\"open\", this.#handleWebSocketOpen, { once: true });\n\t\t\t\twebSocket.addEventListener(\"message\", this.#handleWebSocketMessage);\n\t\t\t\twebSocket.addEventListener(\"error\", this.#handleWebSocketError);\n\t\t\t\twebSocket.addEventListener(\"close\", this.#handleWebSocketClose, { once: true });\n\t\t\t\t\n\t\t\t\tthis.webSocket = webSocket;\n\t\t\t\t\n\t\t\t\tif (prevURL)\n\t\t\t\t\tthis.emit(\"server-change\", this.url, prevURL);\n\t\t\t\t\n\t\t\t\tthis.emit(\"connecting\");\n\t\t\t\t\n\t\t\t\tif (\"navigator\" in globalThis && \"addEventListener\" in globalThis)\n\t\t\t\t\tglobalThis.addEventListener(\"offline\", this.#handleOffline);\n\t\t\t} else {\n\t\t\t\tthis.webSocket = null;\n\t\t\t\t\n\t\t\t\treject(new Error(\"url prop is not set\"));\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\treturn this.#openPromise;\n\t}\n\t\n\t/**\n\t * Alias for `open()`\n\t */\n\tconnect = this.open;\n\t\n\tclose(code: number = CODES.MANUAL, reason = \"manual\", wasClean: boolean = true) {\n\t\t\n\t\tif (this.isClosed)\n\t\t\tthis.#decideReconnect(code);\n\t\telse {\n\t\t\tthis.webSocket!.removeEventListener(\"close\", this.#handleWebSocketClose);\n\t\t\t\n\t\t\tthis.webSocket!.close(code, reason);\n\t\t\t\n\t\t\tthis.#handleWebSocketClose(Object.assign(new Event(\"close\"), {\n\t\t\t\tcode,\n\t\t\t\treason,\n\t\t\t\twasClean\n\t\t\t}));\n\t\t}\n\t\t\n\t}\n\t\n\t/**\n\t * Alias for `close()`\n\t */\n\tdisconnect = this.close;\n\t\n\t#queue: (ArrayBufferLike | ArrayBufferView | Blob | string)[] = [];\n\t\n\t#releaseQueue = () => {\n\t\t\n\t\tfor (const message of this.#queue)\n\t\t\tthis.webSocket!.send(message);\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t};\n\t\n\tsend(data: ArrayBufferLike | ArrayBufferView | Blob | string) {\n\t\t\n\t\tif (this.isOpen)\n\t\t\tthis.webSocket!.send(data);\n\t\telse {\n\t\t\tif (!this.#queue.length)\n\t\t\t\tthis.once(\"open\", this.#releaseQueue);\n\t\t\t\n\t\t\tthis.#queue.push(data);\n\t\t}\n\t\t\n\t}\n\t\n\tsendMessage(...args: unknown[]) {\n\t\treturn this.send(JSON.stringify(args));\n\t}\n\t\n\t#requestCounter = 0;\n\t\n\tsendRequest<T>(...args: [...unknown[], callback: (error: Error | null, result: T) => void]): this;\n\tsendRequest<T>(...args: unknown[]): Promise<T>;\n\tsendRequest<T>(...args: unknown[]) {\n\t\t\n\t\tconst id = this.#requestCounter++;\n\t\t\n\t\tif (this.#requestCounter >= REQUEST_COUNTER_LIMIT)\n\t\t\tthis.#requestCounter = 0;\n\t\t\n\t\tconst eventName = `message:${REQUEST_HEADERS.RESPONSE}-${id}`;\n\t\t\n\t\tconst lastArg = args.at(-1);\n\t\t\n\t\tif (typeof lastArg == \"function\") {\n\t\t\tthis.once(eventName, lastArg as (error: Error, result: T) => void);\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args.slice(0, -1));\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\treturn new Promise<T>((resolve, reject) => {\n\t\t\t\n\t\t\tthis.once(eventName, (error, result: T) => {\n\t\t\t\tif (error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\treject(Object.assign(new Error(message), restProps) as Error);\n\t\t\t\t} else\n\t\t\t\t\tresolve(result);\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tthis.sendMessage(REQUEST_HEADERS.REQUEST, id, ...args);\n\t\t\t\n\t\t});\n\t}\n\t\n\t#requestListeners = new Map<string, RequestListener>();\n\t\n\taddRequestListener(kind: string, listener: RequestListener) {\n\t\tthis.#requestListeners.set(kind, listener);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `addRequestListener()`\n\t */\n\tonRequest = this.addRequestListener;\n\t\n\tremoveRequestListener(kind: string) {\n\t\tthis.#requestListeners.delete(kind);\n\t\t\n\t\treturn this;\n\t}\n\t\n\t/**\n\t * Alias for `removeRequestListener()`\n\t */\n\toffRequest = this.removeRequestListener;\n\t\n\t#handleRequest = async (id: number, kind: string, ...rest: unknown[]) => {\n\t\tconst listener = this.#requestListeners.get(kind);\n\t\t\n\t\tlet result;\n\t\tlet requestError = null;\n\t\t\n\t\tif (listener)\n\t\t\ttry {\n\t\t\t\tresult = await listener.apply(this, rest);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tconst { message, ...restProps } = error;\n\t\t\t\t\trequestError = { message, ...restProps };\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\trequestError = { message: `Unknown request kind \"${kind}\"` };\n\t\t\n\t\tthis.sendMessage(`${REQUEST_HEADERS.RESPONSE}-${id}`, requestError, result);\n\t\t\n\t};\n\t\n\t#handleOffline = () => {\n\t\t\n\t\tif (this.isOpen && !this.#isCheckingResponsiveness) {\n\t\t\tthis.#isCheckingResponsiveness = true;\n\t\t\t\n\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.CHECKING_RESPONSIVENESS);\n\t\t\t\n\t\t\tthis.#unresponsiveTimeout = setTimeout(() => {\n\t\t\t\t\n\t\t\t\tthis.#isCheckingResponsiveness = false;\n\t\t\t\tthis.#isUnresponsive = true;\n\t\t\t\t\n\t\t\t\tthis.#updateConnectionQuality(WS.CONNECTION_QUALITY.UNRESPONSIVE);\n\t\t\t\t\n\t\t\t\tthis.emit(\"unresponsive\");\n\t\t\t\t\n\t\t\t\tthis.#offlineTimeout = setTimeout(() => {\n\t\t\t\t\t\n\t\t\t\t\tthis.#isUnresponsive = false;\n\t\t\t\t\t\n\t\t\t\t\tthis.close(CODES.OFFLINE, \"offline\", false);\n\t\t\t\t\t\n\t\t\t\t}, OFFLINE_TIMEOUT - RESPONSIVENESS_TIMEOUT);\n\t\t\t\t\n\t\t\t}, RESPONSIVENESS_TIMEOUT);\n\t\t\t\n\t\t\tthis.webSocket!.send(\"?\");\n\t\t}\n\t\t\n\t};\n\t\n\tdestroy() {\n\t\t\n\t\tthis.isDestroyed = true;\n\t\t\n\t\tthis.#queue.length = 0;\n\t\t\n\t\tthis.close(CODES.NORMAL, \"destroy\");\n\t\t\n\t\tthis.emit(\"destroy\");\n\t\t\n\t\tthis.removeAllListeners();\n\t\t\n\t\tthis.#abortSignal?.removeEventListener(\"abort\", this.#handleAbortSignalAbort);\n\t\t\n\t}\n\t\n\t\n\tstatic CONNECTION_QUALITY = {\n\t\tCLOSED: 0,\n\t\tRECONNECTING: 1,\n\t\tUNRESPONSIVE: 2,\n\t\tCHECKING_RESPONSIVENESS: 3,\n\t\tOPEN: 4\n\t} as const;\n\t\n}\n", "export const HEARTBEAT_INTERVAL = 5_000;\nexport const HEARTBEAT_GAP = 30_000;\nexport const RESPONSIVENESS_TIMEOUT = 1000;\nexport const OFFLINE_TIMEOUT = 5000;\nexport const REQUEST_COUNTER_LIMIT = Number.MAX_SAFE_INTEGER / 2;\n\nexport const CODES = {\n\tNORMAL: 1000,\n\tPROTOCOL_ERROR: 1002,\n\tABNORMAL: 1006,\n\tNO_HEARTBEAT: 3000,\n\tOFFLINE: 3001,\n\tMANUAL: 3500,\n\tREOPEN: 4000\n} as const;\n\nexport const NON_RECONNECTABLE_CODES = [\n\tCODES.PROTOCOL_ERROR,\n\tCODES.MANUAL,\n\tCODES.REOPEN\n];\n\nexport const REQUEST_HEADERS = {\n\tREQUEST: \"~r-q\",\n\tRESPONSE: \"~r-s\"\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAe,KAOtB,WAAW,UAAYA,ECPvB,OAAOC,MAAkB,gBACzB,OAAS,QAAAC,EAAM,mBAAAC,MAAuB,YCG/B,IAAMC,EAAwB,OAAO,iBAAmB,EAElDC,EAAQ,CACpB,OAAQ,IACR,eAAgB,KAChB,SAAU,KACV,aAAc,IACd,QAAS,KACT,OAAQ,KACR,OAAQ,GACT,EAEaC,EAA0B,CACtCD,EAAM,eACNA,EAAM,OACNA,EAAM,MACP,EAEaE,EAAkB,CAC9B,QAAS,OACT,SAAU,MACX,EDPA,IAAIC,EAAI,EAGKC,EAAN,MAAMC,UAAWC,CAAa,CACpC,YAAYC,EAAmB,CAAC,EAAG,CAClC,MAAM,EAEN,GAAM,CACL,IAAAC,EAAM,WAAW,UAAU,SAAW,IACtC,KAAAC,GAAQN,KAAK,SAAS,EACtB,UAAAO,EACA,YAAAC,EAAc,GACd,eAAAC,EAAiB,IACjB,GAAAC,EACA,KAAAC,EACA,MAAAC,EAAQ,GACR,OAAAC,CACD,EAAIT,EASJ,GAPA,KAAK,IAAMC,EACX,KAAK,KAAOC,EAEZ,KAAK,UAAYC,EAEjB,KAAK,eAAiBE,EAElBC,EACH,QAAWI,KAAaJ,EACnBA,EAAGI,CAAS,GACf,KAAK,GAAGA,EAAWJ,EAAGI,CAAS,CAAC,EAEnC,GAAIH,EACH,QAAWG,KAAaH,EACnBA,EAAKG,CAAS,GACjB,KAAK,KAAKA,EAAWH,EAAKG,CAAS,CAAC,EAEvC,KAAKC,GAAWH,EAEhB,KA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MJ,EAAM,QAAS,UAAW,EAAK,CAE3C,EAAG,GAAwC,CAE5C,EAAG,GAAsB,EAEzB,KAAK,UAAW,KAAK,GAAG,EAG1B,EAEA,SAAU,CAET,KAAK,YAAc,GAEnB,KAAK4B,GAAO,OAAS,EAErB,KAAK,MAAM5B,EAAM,OAAQ,SAAS,EAElC,KAAK,KAAK,SAAS,EAEnB,KAAK,mBAAmB,EAExB,KAAKX,IAAc,oBAAoB,QAAS,KAAKC,EAAuB,CAE7E,CAGA,OAAO,mBAAqB,CAC3B,OAAQ,EACR,aAAc,EACd,aAAc,EACd,wBAAyB,EACzB,KAAM,CACP,CAED",
|
|
6
|
+
"names": ["WebSocket", "EventEmitter", "noop", "StatefulPromise", "REQUEST_COUNTER_LIMIT", "CODES", "NON_RECONNECTABLE_CODES", "REQUEST_HEADERS", "i", "WS", "_WS", "EventEmitter", "options", "url", "name", "protocols", "immediately", "reconnectAfter", "on", "once", "quiet", "signal", "eventName", "#isQuiet", "#abortSignal", "#handleAbortSignalAbort", "noop", "error", "event", "listener", "#updateConnectionQuality", "connectionQuality", "prevConnectionQuality", "#heartbeatTimeout", "#defib", "CODES", "#unresponsiveTimeout", "#isCheckingResponsiveness", "#offlineTimeout", "#isUnresponsive", "#openPromise", "#wasOpened", "#handleWebSocketOpen", "#handleWebSocketMessage", "message", "kind", "rest", "REQUEST_HEADERS", "#handleRequest", "#handleWebSocketError", "#reconnectTimeout", "#decideReconnect", "code", "NON_RECONNECTABLE_CODES", "#handleWebSocketClose", "reason", "wasClean", "webSocket", "#handleOffline", "prevURL", "StatefulPromise", "_", "reject", "#queue", "#releaseQueue", "data", "args", "#requestCounter", "id", "REQUEST_COUNTER_LIMIT", "lastArg", "resolve", "result", "restProps", "#requestListeners", "requestError"]
|
|
7
7
|
}
|
package/dist/client/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA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