@humanode-hyperlane/cli 30.0.0 → 1045.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundle/154.index.js +462 -0
- package/bundle/230.index.js +572 -0
- package/bundle/25.index.js +9569 -0
- package/bundle/{214.index.js → 308.index.js} +192 -88
- package/bundle/367.index.js +4 -0
- package/bundle/461.index.js +49 -0
- package/bundle/505.index.js +126369 -0
- package/bundle/529.index.js +3603 -0
- package/bundle/576.index.js +36 -0
- package/bundle/610.index.js +86 -0
- package/bundle/628.index.js +152 -0
- package/bundle/633.index.js +86 -0
- package/bundle/697.index.js +410 -0
- package/bundle/{30fb121a258f7502fa97.js → 7183ea1c1bf0a5da980d.js} +1 -1
- package/bundle/748.index.js +674 -0
- package/bundle/78.index.js +372 -0
- package/bundle/787.index.js +175 -0
- package/bundle/841.index.js +2093 -0
- package/bundle/{172.index.js → 848.index.js} +779 -915
- package/bundle/868.index.js +460 -0
- package/bundle/902.index.js +173 -0
- package/bundle/956.index.js +9901 -0
- package/bundle/aleo_wasm.wasm +0 -0
- package/bundle/aleo_wasm1.wasm +0 -0
- package/bundle/build/Release/bigint_buffer.node +0 -0
- package/bundle/index.js +2 -2
- package/bundle/worker2.js +9123 -3469
- package/bundle/worker3.js +9109 -3455
- package/examples/layerzero/layerzero-warp-route.yaml +91 -0
- package/examples/sealevel/core-config-composite-ism.yaml +21 -0
- package/examples/sealevel/igp-hook-config.yaml +13 -0
- package/examples/sealevel/warp-config-routing-message-id-multisig-ism.yaml +21 -0
- package/examples/warp-base.yaml +24 -0
- package/examples/warp-config-predicate-mainnet.yaml +14 -0
- package/examples/warp-deployed-predicate-mainnet.yaml +19 -0
- package/examples/warp-ethereum.yaml +19 -0
- package/examples/wormhole/wormhole-warp-route.yaml +46 -0
- package/package.json +35 -28
- package/bundle/100.index.js +0 -1453
- package/bundle/12.index.js +0 -91
- package/bundle/213.index.js +0 -901
- package/bundle/306.index.js +0 -1037
- package/bundle/467.index.js +0 -222
- package/bundle/485.index.js +0 -85430
- package/bundle/515.index.js +0 -5191
- package/bundle/544.index.js +0 -792
- package/bundle/617.index.js +0 -1612
- package/bundle/660.index.js +0 -223
- package/bundle/688.index.js +0 -232
- package/bundle/756.index.js +0 -8595
- package/bundle/824.index.js +0 -385
- package/bundle/95.index.js +0 -264
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const id =
|
|
2
|
-
export const ids = [
|
|
1
|
+
export const id = 308;
|
|
2
|
+
export const ids = [308];
|
|
3
3
|
export const modules = {
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 16729:
|
|
6
6
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
const { EMPTY_BUFFER } = __webpack_require__(
|
|
10
|
+
const { EMPTY_BUFFER } = __webpack_require__(39557);
|
|
11
11
|
|
|
12
12
|
const FastBuffer = Buffer[Symbol.species];
|
|
13
13
|
|
|
@@ -121,7 +121,7 @@ module.exports = {
|
|
|
121
121
|
/* istanbul ignore else */
|
|
122
122
|
if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
123
123
|
try {
|
|
124
|
-
const bufferUtil = __webpack_require__(
|
|
124
|
+
const bufferUtil = __webpack_require__(19004);
|
|
125
125
|
|
|
126
126
|
module.exports.mask = function (source, mask, output, offset, length) {
|
|
127
127
|
if (length < 48) _mask(source, mask, output, offset, length);
|
|
@@ -140,7 +140,7 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
|
140
140
|
|
|
141
141
|
/***/ }),
|
|
142
142
|
|
|
143
|
-
/***/
|
|
143
|
+
/***/ 39557:
|
|
144
144
|
/***/ ((module) => {
|
|
145
145
|
|
|
146
146
|
|
|
@@ -152,6 +152,7 @@ if (hasBlob) BINARY_TYPES.push('blob');
|
|
|
152
152
|
|
|
153
153
|
module.exports = {
|
|
154
154
|
BINARY_TYPES,
|
|
155
|
+
CLOSE_TIMEOUT: 30000,
|
|
155
156
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
156
157
|
GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
|
|
157
158
|
hasBlob,
|
|
@@ -165,12 +166,12 @@ module.exports = {
|
|
|
165
166
|
|
|
166
167
|
/***/ }),
|
|
167
168
|
|
|
168
|
-
/***/
|
|
169
|
+
/***/ 13172:
|
|
169
170
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
170
171
|
|
|
171
172
|
|
|
172
173
|
|
|
173
|
-
const { kForOnEventAttribute, kListener } = __webpack_require__(
|
|
174
|
+
const { kForOnEventAttribute, kListener } = __webpack_require__(39557);
|
|
174
175
|
|
|
175
176
|
const kCode = Symbol('kCode');
|
|
176
177
|
const kData = Symbol('kData');
|
|
@@ -464,12 +465,12 @@ function callListener(listener, thisArg, event) {
|
|
|
464
465
|
|
|
465
466
|
/***/ }),
|
|
466
467
|
|
|
467
|
-
/***/
|
|
468
|
+
/***/ 33173:
|
|
468
469
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
469
470
|
|
|
470
471
|
|
|
471
472
|
|
|
472
|
-
const { tokenChars } = __webpack_require__(
|
|
473
|
+
const { tokenChars } = __webpack_require__(90909);
|
|
473
474
|
|
|
474
475
|
/**
|
|
475
476
|
* Adds an offer to the map of extension offers or a parameter to the map of
|
|
@@ -674,7 +675,7 @@ module.exports = { format, parse };
|
|
|
674
675
|
|
|
675
676
|
/***/ }),
|
|
676
677
|
|
|
677
|
-
/***/
|
|
678
|
+
/***/ 82051:
|
|
678
679
|
/***/ ((module) => {
|
|
679
680
|
|
|
680
681
|
|
|
@@ -736,16 +737,16 @@ module.exports = Limiter;
|
|
|
736
737
|
|
|
737
738
|
/***/ }),
|
|
738
739
|
|
|
739
|
-
/***/
|
|
740
|
+
/***/ 12918:
|
|
740
741
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
741
742
|
|
|
742
743
|
|
|
743
744
|
|
|
744
745
|
const zlib = __webpack_require__(43106);
|
|
745
746
|
|
|
746
|
-
const bufferUtil = __webpack_require__(
|
|
747
|
-
const Limiter = __webpack_require__(
|
|
748
|
-
const { kStatusCode } = __webpack_require__(
|
|
747
|
+
const bufferUtil = __webpack_require__(16729);
|
|
748
|
+
const Limiter = __webpack_require__(82051);
|
|
749
|
+
const { kStatusCode } = __webpack_require__(39557);
|
|
749
750
|
|
|
750
751
|
const FastBuffer = Buffer[Symbol.species];
|
|
751
752
|
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
|
|
@@ -778,6 +779,9 @@ class PerMessageDeflate {
|
|
|
778
779
|
* acknowledge disabling of client context takeover
|
|
779
780
|
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
|
|
780
781
|
* calls to zlib
|
|
782
|
+
* @param {Boolean} [options.isServer=false] Create the instance in either
|
|
783
|
+
* server or client mode
|
|
784
|
+
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
781
785
|
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
|
|
782
786
|
* use of a custom server window size
|
|
783
787
|
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
|
|
@@ -788,16 +792,13 @@ class PerMessageDeflate {
|
|
|
788
792
|
* deflate
|
|
789
793
|
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
|
790
794
|
* inflate
|
|
791
|
-
* @param {Boolean} [isServer=false] Create the instance in either server or
|
|
792
|
-
* client mode
|
|
793
|
-
* @param {Number} [maxPayload=0] The maximum allowed message length
|
|
794
795
|
*/
|
|
795
|
-
constructor(options
|
|
796
|
-
this._maxPayload = maxPayload | 0;
|
|
796
|
+
constructor(options) {
|
|
797
797
|
this._options = options || {};
|
|
798
798
|
this._threshold =
|
|
799
799
|
this._options.threshold !== undefined ? this._options.threshold : 1024;
|
|
800
|
-
this.
|
|
800
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
801
|
+
this._isServer = !!this._options.isServer;
|
|
801
802
|
this._deflate = null;
|
|
802
803
|
this._inflate = null;
|
|
803
804
|
|
|
@@ -1271,22 +1272,22 @@ function inflateOnError(err) {
|
|
|
1271
1272
|
|
|
1272
1273
|
/***/ }),
|
|
1273
1274
|
|
|
1274
|
-
/***/
|
|
1275
|
+
/***/ 56479:
|
|
1275
1276
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1276
1277
|
|
|
1277
1278
|
|
|
1278
1279
|
|
|
1279
1280
|
const { Writable } = __webpack_require__(2203);
|
|
1280
1281
|
|
|
1281
|
-
const PerMessageDeflate = __webpack_require__(
|
|
1282
|
+
const PerMessageDeflate = __webpack_require__(12918);
|
|
1282
1283
|
const {
|
|
1283
1284
|
BINARY_TYPES,
|
|
1284
1285
|
EMPTY_BUFFER,
|
|
1285
1286
|
kStatusCode,
|
|
1286
1287
|
kWebSocket
|
|
1287
|
-
} = __webpack_require__(
|
|
1288
|
-
const { concat, toArrayBuffer, unmask } = __webpack_require__(
|
|
1289
|
-
const { isValidStatusCode, isValidUTF8 } = __webpack_require__(
|
|
1288
|
+
} = __webpack_require__(39557);
|
|
1289
|
+
const { concat, toArrayBuffer, unmask } = __webpack_require__(16729);
|
|
1290
|
+
const { isValidStatusCode, isValidUTF8 } = __webpack_require__(90909);
|
|
1290
1291
|
|
|
1291
1292
|
const FastBuffer = Buffer[Symbol.species];
|
|
1292
1293
|
|
|
@@ -1316,6 +1317,10 @@ class Receiver extends Writable {
|
|
|
1316
1317
|
* extensions
|
|
1317
1318
|
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
|
|
1318
1319
|
* client or server mode
|
|
1320
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
1321
|
+
* buffered data chunks
|
|
1322
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
1323
|
+
* fragments
|
|
1319
1324
|
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
1320
1325
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
1321
1326
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -1330,6 +1335,8 @@ class Receiver extends Writable {
|
|
|
1330
1335
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
1331
1336
|
this._extensions = options.extensions || {};
|
|
1332
1337
|
this._isServer = !!options.isServer;
|
|
1338
|
+
this._maxBufferedChunks = options.maxBufferedChunks | 0;
|
|
1339
|
+
this._maxFragments = options.maxFragments | 0;
|
|
1333
1340
|
this._maxPayload = options.maxPayload | 0;
|
|
1334
1341
|
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
1335
1342
|
this[kWebSocket] = undefined;
|
|
@@ -1365,6 +1372,22 @@ class Receiver extends Writable {
|
|
|
1365
1372
|
_write(chunk, encoding, cb) {
|
|
1366
1373
|
if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
|
|
1367
1374
|
|
|
1375
|
+
if (
|
|
1376
|
+
this._maxBufferedChunks > 0 &&
|
|
1377
|
+
this._buffers.length >= this._maxBufferedChunks
|
|
1378
|
+
) {
|
|
1379
|
+
cb(
|
|
1380
|
+
this.createError(
|
|
1381
|
+
RangeError,
|
|
1382
|
+
'Too many buffered chunks',
|
|
1383
|
+
false,
|
|
1384
|
+
1008,
|
|
1385
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
1386
|
+
)
|
|
1387
|
+
);
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1368
1391
|
this._bufferedBytes += chunk.length;
|
|
1369
1392
|
this._buffers.push(chunk);
|
|
1370
1393
|
this.startLoop(cb);
|
|
@@ -1761,6 +1784,22 @@ class Receiver extends Writable {
|
|
|
1761
1784
|
}
|
|
1762
1785
|
|
|
1763
1786
|
if (data.length) {
|
|
1787
|
+
if (
|
|
1788
|
+
this._maxFragments > 0 &&
|
|
1789
|
+
this._fragments.length >= this._maxFragments
|
|
1790
|
+
) {
|
|
1791
|
+
const error = this.createError(
|
|
1792
|
+
RangeError,
|
|
1793
|
+
'Too many message fragments',
|
|
1794
|
+
false,
|
|
1795
|
+
1008,
|
|
1796
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
1797
|
+
);
|
|
1798
|
+
|
|
1799
|
+
cb(error);
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1764
1803
|
//
|
|
1765
1804
|
// This message is not compressed so its length is the sum of the payload
|
|
1766
1805
|
// length of all fragments.
|
|
@@ -1800,6 +1839,22 @@ class Receiver extends Writable {
|
|
|
1800
1839
|
return;
|
|
1801
1840
|
}
|
|
1802
1841
|
|
|
1842
|
+
if (
|
|
1843
|
+
this._maxFragments > 0 &&
|
|
1844
|
+
this._fragments.length >= this._maxFragments
|
|
1845
|
+
) {
|
|
1846
|
+
const error = this.createError(
|
|
1847
|
+
RangeError,
|
|
1848
|
+
'Too many message fragments',
|
|
1849
|
+
false,
|
|
1850
|
+
1008,
|
|
1851
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
1852
|
+
);
|
|
1853
|
+
|
|
1854
|
+
cb(error);
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1803
1858
|
this._fragments.push(buf);
|
|
1804
1859
|
}
|
|
1805
1860
|
|
|
@@ -1984,7 +2039,7 @@ module.exports = Receiver;
|
|
|
1984
2039
|
|
|
1985
2040
|
/***/ }),
|
|
1986
2041
|
|
|
1987
|
-
/***/
|
|
2042
|
+
/***/ 55291:
|
|
1988
2043
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1989
2044
|
|
|
1990
2045
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */
|
|
@@ -1993,11 +2048,14 @@ module.exports = Receiver;
|
|
|
1993
2048
|
|
|
1994
2049
|
const { Duplex } = __webpack_require__(2203);
|
|
1995
2050
|
const { randomFillSync } = __webpack_require__(76982);
|
|
2051
|
+
const {
|
|
2052
|
+
types: { isUint8Array }
|
|
2053
|
+
} = __webpack_require__(39023);
|
|
1996
2054
|
|
|
1997
|
-
const PerMessageDeflate = __webpack_require__(
|
|
1998
|
-
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__(
|
|
1999
|
-
const { isBlob, isValidStatusCode } = __webpack_require__(
|
|
2000
|
-
const { mask: applyMask, toBuffer } = __webpack_require__(
|
|
2055
|
+
const PerMessageDeflate = __webpack_require__(12918);
|
|
2056
|
+
const { EMPTY_BUFFER, kWebSocket, NOOP } = __webpack_require__(39557);
|
|
2057
|
+
const { isBlob, isValidStatusCode } = __webpack_require__(90909);
|
|
2058
|
+
const { mask: applyMask, toBuffer } = __webpack_require__(16729);
|
|
2001
2059
|
|
|
2002
2060
|
const kByteLength = Symbol('kByteLength');
|
|
2003
2061
|
const maskBuffer = Buffer.alloc(4);
|
|
@@ -2189,8 +2247,10 @@ class Sender {
|
|
|
2189
2247
|
|
|
2190
2248
|
if (typeof data === 'string') {
|
|
2191
2249
|
buf.write(data, 2);
|
|
2192
|
-
} else {
|
|
2250
|
+
} else if (isUint8Array(data)) {
|
|
2193
2251
|
buf.set(data, 2);
|
|
2252
|
+
} else {
|
|
2253
|
+
throw new TypeError('Second argument must be a string or a Uint8Array');
|
|
2194
2254
|
}
|
|
2195
2255
|
}
|
|
2196
2256
|
|
|
@@ -2593,13 +2653,13 @@ function onError(sender, err, cb) {
|
|
|
2593
2653
|
|
|
2594
2654
|
/***/ }),
|
|
2595
2655
|
|
|
2596
|
-
/***/
|
|
2656
|
+
/***/ 17678:
|
|
2597
2657
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2598
2658
|
|
|
2599
2659
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^WebSocket$" }] */
|
|
2600
2660
|
|
|
2601
2661
|
|
|
2602
|
-
const WebSocket = __webpack_require__(
|
|
2662
|
+
const WebSocket = __webpack_require__(68175);
|
|
2603
2663
|
const { Duplex } = __webpack_require__(2203);
|
|
2604
2664
|
|
|
2605
2665
|
/**
|
|
@@ -2761,12 +2821,12 @@ module.exports = createWebSocketStream;
|
|
|
2761
2821
|
|
|
2762
2822
|
/***/ }),
|
|
2763
2823
|
|
|
2764
|
-
/***/
|
|
2824
|
+
/***/ 84926:
|
|
2765
2825
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2766
2826
|
|
|
2767
2827
|
|
|
2768
2828
|
|
|
2769
|
-
const { tokenChars } = __webpack_require__(
|
|
2829
|
+
const { tokenChars } = __webpack_require__(90909);
|
|
2770
2830
|
|
|
2771
2831
|
/**
|
|
2772
2832
|
* Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
|
|
@@ -2830,14 +2890,14 @@ module.exports = { parse };
|
|
|
2830
2890
|
|
|
2831
2891
|
/***/ }),
|
|
2832
2892
|
|
|
2833
|
-
/***/
|
|
2893
|
+
/***/ 90909:
|
|
2834
2894
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2835
2895
|
|
|
2836
2896
|
|
|
2837
2897
|
|
|
2838
2898
|
const { isUtf8 } = __webpack_require__(20181);
|
|
2839
2899
|
|
|
2840
|
-
const { hasBlob } = __webpack_require__(
|
|
2900
|
+
const { hasBlob } = __webpack_require__(39557);
|
|
2841
2901
|
|
|
2842
2902
|
//
|
|
2843
2903
|
// Allowed token characters:
|
|
@@ -2989,7 +3049,7 @@ if (isUtf8) {
|
|
|
2989
3049
|
|
|
2990
3050
|
/***/ }),
|
|
2991
3051
|
|
|
2992
|
-
/***/
|
|
3052
|
+
/***/ 33947:
|
|
2993
3053
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2994
3054
|
|
|
2995
3055
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
|
|
@@ -3001,11 +3061,11 @@ const http = __webpack_require__(58611);
|
|
|
3001
3061
|
const { Duplex } = __webpack_require__(2203);
|
|
3002
3062
|
const { createHash } = __webpack_require__(76982);
|
|
3003
3063
|
|
|
3004
|
-
const extension = __webpack_require__(
|
|
3005
|
-
const PerMessageDeflate = __webpack_require__(
|
|
3006
|
-
const subprotocol = __webpack_require__(
|
|
3007
|
-
const WebSocket = __webpack_require__(
|
|
3008
|
-
const { GUID, kWebSocket } = __webpack_require__(
|
|
3064
|
+
const extension = __webpack_require__(33173);
|
|
3065
|
+
const PerMessageDeflate = __webpack_require__(12918);
|
|
3066
|
+
const subprotocol = __webpack_require__(84926);
|
|
3067
|
+
const WebSocket = __webpack_require__(68175);
|
|
3068
|
+
const { CLOSE_TIMEOUT, GUID, kWebSocket } = __webpack_require__(39557);
|
|
3009
3069
|
|
|
3010
3070
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
3011
3071
|
|
|
@@ -3032,8 +3092,15 @@ class WebSocketServer extends EventEmitter {
|
|
|
3032
3092
|
* pending connections
|
|
3033
3093
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
3034
3094
|
* track clients
|
|
3095
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
|
3096
|
+
* wait for the closing handshake to finish after `websocket.close()` is
|
|
3097
|
+
* called
|
|
3035
3098
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
3036
3099
|
* @param {String} [options.host] The hostname where to bind the server
|
|
3100
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
3101
|
+
* buffered data chunks
|
|
3102
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
3103
|
+
* fragments
|
|
3037
3104
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
3038
3105
|
* size
|
|
3039
3106
|
* @param {Boolean} [options.noServer=false] Enable no server mode
|
|
@@ -3056,11 +3123,14 @@ class WebSocketServer extends EventEmitter {
|
|
|
3056
3123
|
options = {
|
|
3057
3124
|
allowSynchronousEvents: true,
|
|
3058
3125
|
autoPong: true,
|
|
3126
|
+
maxBufferedChunks: 1024 * 1024,
|
|
3127
|
+
maxFragments: 128 * 1024,
|
|
3059
3128
|
maxPayload: 100 * 1024 * 1024,
|
|
3060
3129
|
skipUTF8Validation: false,
|
|
3061
3130
|
perMessageDeflate: false,
|
|
3062
3131
|
handleProtocols: null,
|
|
3063
3132
|
clientTracking: true,
|
|
3133
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
3064
3134
|
verifyClient: null,
|
|
3065
3135
|
noServer: false,
|
|
3066
3136
|
backlog: null, // use default (511 as implemented in net.js)
|
|
@@ -3283,11 +3353,11 @@ class WebSocketServer extends EventEmitter {
|
|
|
3283
3353
|
this.options.perMessageDeflate &&
|
|
3284
3354
|
secWebSocketExtensions !== undefined
|
|
3285
3355
|
) {
|
|
3286
|
-
const perMessageDeflate = new PerMessageDeflate(
|
|
3287
|
-
this.options.perMessageDeflate,
|
|
3288
|
-
true,
|
|
3289
|
-
this.options.maxPayload
|
|
3290
|
-
);
|
|
3356
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
3357
|
+
...this.options.perMessageDeflate,
|
|
3358
|
+
isServer: true,
|
|
3359
|
+
maxPayload: this.options.maxPayload
|
|
3360
|
+
});
|
|
3291
3361
|
|
|
3292
3362
|
try {
|
|
3293
3363
|
const offers = extension.parse(secWebSocketExtensions);
|
|
@@ -3414,6 +3484,8 @@ class WebSocketServer extends EventEmitter {
|
|
|
3414
3484
|
|
|
3415
3485
|
ws.setSocket(socket, head, {
|
|
3416
3486
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
3487
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
3488
|
+
maxFragments: this.options.maxFragments,
|
|
3417
3489
|
maxPayload: this.options.maxPayload,
|
|
3418
3490
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
3419
3491
|
});
|
|
@@ -3546,7 +3618,7 @@ function abortHandshakeOrEmitwsClientError(
|
|
|
3546
3618
|
|
|
3547
3619
|
/***/ }),
|
|
3548
3620
|
|
|
3549
|
-
/***/
|
|
3621
|
+
/***/ 68175:
|
|
3550
3622
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3551
3623
|
|
|
3552
3624
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
|
|
@@ -3562,13 +3634,14 @@ const { randomBytes, createHash } = __webpack_require__(76982);
|
|
|
3562
3634
|
const { Duplex, Readable } = __webpack_require__(2203);
|
|
3563
3635
|
const { URL } = __webpack_require__(87016);
|
|
3564
3636
|
|
|
3565
|
-
const PerMessageDeflate = __webpack_require__(
|
|
3566
|
-
const Receiver = __webpack_require__(
|
|
3567
|
-
const Sender = __webpack_require__(
|
|
3568
|
-
const { isBlob } = __webpack_require__(
|
|
3637
|
+
const PerMessageDeflate = __webpack_require__(12918);
|
|
3638
|
+
const Receiver = __webpack_require__(56479);
|
|
3639
|
+
const Sender = __webpack_require__(55291);
|
|
3640
|
+
const { isBlob } = __webpack_require__(90909);
|
|
3569
3641
|
|
|
3570
3642
|
const {
|
|
3571
3643
|
BINARY_TYPES,
|
|
3644
|
+
CLOSE_TIMEOUT,
|
|
3572
3645
|
EMPTY_BUFFER,
|
|
3573
3646
|
GUID,
|
|
3574
3647
|
kForOnEventAttribute,
|
|
@@ -3576,14 +3649,13 @@ const {
|
|
|
3576
3649
|
kStatusCode,
|
|
3577
3650
|
kWebSocket,
|
|
3578
3651
|
NOOP
|
|
3579
|
-
} = __webpack_require__(
|
|
3652
|
+
} = __webpack_require__(39557);
|
|
3580
3653
|
const {
|
|
3581
3654
|
EventTarget: { addEventListener, removeEventListener }
|
|
3582
|
-
} = __webpack_require__(
|
|
3583
|
-
const { format, parse } = __webpack_require__(
|
|
3584
|
-
const { toBuffer } = __webpack_require__(
|
|
3655
|
+
} = __webpack_require__(13172);
|
|
3656
|
+
const { format, parse } = __webpack_require__(33173);
|
|
3657
|
+
const { toBuffer } = __webpack_require__(16729);
|
|
3585
3658
|
|
|
3586
|
-
const closeTimeout = 30 * 1000;
|
|
3587
3659
|
const kAborted = Symbol('kAborted');
|
|
3588
3660
|
const protocolVersions = [8, 13];
|
|
3589
3661
|
const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
|
|
@@ -3639,6 +3711,7 @@ class WebSocket extends EventEmitter {
|
|
|
3639
3711
|
initAsClient(this, address, protocols, options);
|
|
3640
3712
|
} else {
|
|
3641
3713
|
this._autoPong = options.autoPong;
|
|
3714
|
+
this._closeTimeout = options.closeTimeout;
|
|
3642
3715
|
this._isServer = true;
|
|
3643
3716
|
}
|
|
3644
3717
|
}
|
|
@@ -3751,6 +3824,10 @@ class WebSocket extends EventEmitter {
|
|
|
3751
3824
|
* multiple times in the same tick
|
|
3752
3825
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
3753
3826
|
* masking key
|
|
3827
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
3828
|
+
* buffered data chunks
|
|
3829
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
3830
|
+
* fragments
|
|
3754
3831
|
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
3755
3832
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
3756
3833
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -3762,6 +3839,8 @@ class WebSocket extends EventEmitter {
|
|
|
3762
3839
|
binaryType: this.binaryType,
|
|
3763
3840
|
extensions: this._extensions,
|
|
3764
3841
|
isServer: this._isServer,
|
|
3842
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
3843
|
+
maxFragments: options.maxFragments,
|
|
3765
3844
|
maxPayload: options.maxPayload,
|
|
3766
3845
|
skipUTF8Validation: options.skipUTF8Validation
|
|
3767
3846
|
});
|
|
@@ -4180,6 +4259,8 @@ module.exports = WebSocket;
|
|
|
4180
4259
|
* times in the same tick
|
|
4181
4260
|
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
4182
4261
|
* automatically send a pong in response to a ping
|
|
4262
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
|
|
4263
|
+
* for the closing handshake to finish after `websocket.close()` is called
|
|
4183
4264
|
* @param {Function} [options.finishRequest] A function which can be used to
|
|
4184
4265
|
* customize the headers of each http request before it is sent
|
|
4185
4266
|
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
|
@@ -4188,6 +4269,10 @@ module.exports = WebSocket;
|
|
|
4188
4269
|
* masking key
|
|
4189
4270
|
* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
|
|
4190
4271
|
* handshake request
|
|
4272
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
4273
|
+
* buffered data chunks
|
|
4274
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
4275
|
+
* fragments
|
|
4191
4276
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
4192
4277
|
* size
|
|
4193
4278
|
* @param {Number} [options.maxRedirects=10] The maximum number of redirects
|
|
@@ -4206,7 +4291,10 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4206
4291
|
const opts = {
|
|
4207
4292
|
allowSynchronousEvents: true,
|
|
4208
4293
|
autoPong: true,
|
|
4294
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
4209
4295
|
protocolVersion: protocolVersions[1],
|
|
4296
|
+
maxBufferedChunks: 1024 * 1024,
|
|
4297
|
+
maxFragments: 128 * 1024,
|
|
4210
4298
|
maxPayload: 100 * 1024 * 1024,
|
|
4211
4299
|
skipUTF8Validation: false,
|
|
4212
4300
|
perMessageDeflate: true,
|
|
@@ -4224,6 +4312,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4224
4312
|
};
|
|
4225
4313
|
|
|
4226
4314
|
websocket._autoPong = opts.autoPong;
|
|
4315
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
4227
4316
|
|
|
4228
4317
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
4229
4318
|
throw new RangeError(
|
|
@@ -4239,7 +4328,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4239
4328
|
} else {
|
|
4240
4329
|
try {
|
|
4241
4330
|
parsedUrl = new URL(address);
|
|
4242
|
-
} catch
|
|
4331
|
+
} catch {
|
|
4243
4332
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
4244
4333
|
}
|
|
4245
4334
|
}
|
|
@@ -4301,11 +4390,11 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4301
4390
|
opts.timeout = opts.handshakeTimeout;
|
|
4302
4391
|
|
|
4303
4392
|
if (opts.perMessageDeflate) {
|
|
4304
|
-
perMessageDeflate = new PerMessageDeflate(
|
|
4305
|
-
opts.perMessageDeflate
|
|
4306
|
-
false,
|
|
4307
|
-
opts.maxPayload
|
|
4308
|
-
);
|
|
4393
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
4394
|
+
...opts.perMessageDeflate,
|
|
4395
|
+
isServer: false,
|
|
4396
|
+
maxPayload: opts.maxPayload
|
|
4397
|
+
});
|
|
4309
4398
|
opts.headers['Sec-WebSocket-Extensions'] = format({
|
|
4310
4399
|
[PerMessageDeflate.extensionName]: perMessageDeflate.offer()
|
|
4311
4400
|
});
|
|
@@ -4563,6 +4652,8 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
4563
4652
|
websocket.setSocket(socket, head, {
|
|
4564
4653
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
4565
4654
|
generateMask: opts.generateMask,
|
|
4655
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
4656
|
+
maxFragments: opts.maxFragments,
|
|
4566
4657
|
maxPayload: opts.maxPayload,
|
|
4567
4658
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
4568
4659
|
});
|
|
@@ -4841,7 +4932,7 @@ function senderOnError(err) {
|
|
|
4841
4932
|
function setCloseTimer(websocket) {
|
|
4842
4933
|
websocket._closeTimer = setTimeout(
|
|
4843
4934
|
websocket._socket.destroy.bind(websocket._socket),
|
|
4844
|
-
|
|
4935
|
+
websocket._closeTimeout
|
|
4845
4936
|
);
|
|
4846
4937
|
}
|
|
4847
4938
|
|
|
@@ -4859,23 +4950,23 @@ function socketOnClose() {
|
|
|
4859
4950
|
|
|
4860
4951
|
websocket._readyState = WebSocket.CLOSING;
|
|
4861
4952
|
|
|
4862
|
-
let chunk;
|
|
4863
|
-
|
|
4864
4953
|
//
|
|
4865
4954
|
// The close frame might not have been received or the `'end'` event emitted,
|
|
4866
4955
|
// for example, if the socket was destroyed due to an error. Ensure that the
|
|
4867
4956
|
// `receiver` stream is closed after writing any remaining buffered data to
|
|
4868
4957
|
// it. If the readable side of the socket is in flowing mode then there is no
|
|
4869
|
-
// buffered data as everything has been already written
|
|
4870
|
-
//
|
|
4871
|
-
//
|
|
4958
|
+
// buffered data as everything has been already written. If instead, the
|
|
4959
|
+
// socket is paused, any possible buffered data will be read as a single
|
|
4960
|
+
// chunk.
|
|
4872
4961
|
//
|
|
4873
4962
|
if (
|
|
4874
4963
|
!this._readableState.endEmitted &&
|
|
4875
4964
|
!websocket._closeFrameReceived &&
|
|
4876
4965
|
!websocket._receiver._writableState.errorEmitted &&
|
|
4877
|
-
|
|
4966
|
+
this._readableState.length !== 0
|
|
4878
4967
|
) {
|
|
4968
|
+
const chunk = this.read(this._readableState.length);
|
|
4969
|
+
|
|
4879
4970
|
websocket._receiver.write(chunk);
|
|
4880
4971
|
}
|
|
4881
4972
|
|
|
@@ -4941,7 +5032,7 @@ function socketOnError() {
|
|
|
4941
5032
|
|
|
4942
5033
|
/***/ }),
|
|
4943
5034
|
|
|
4944
|
-
/***/
|
|
5035
|
+
/***/ 32308:
|
|
4945
5036
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
4946
5037
|
|
|
4947
5038
|
// ESM COMPAT FLAG
|
|
@@ -4952,29 +5043,42 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4952
5043
|
WebSocket: () => (/* binding */ _esm_WebSocket)
|
|
4953
5044
|
});
|
|
4954
5045
|
|
|
4955
|
-
// NAMESPACE OBJECT: ../../node_modules/.pnpm/ws@8.
|
|
5046
|
+
// NAMESPACE OBJECT: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/wrapper.mjs
|
|
4956
5047
|
var wrapper_namespaceObject = {};
|
|
4957
5048
|
__webpack_require__.r(wrapper_namespaceObject);
|
|
4958
5049
|
__webpack_require__.d(wrapper_namespaceObject, {
|
|
5050
|
+
PerMessageDeflate: () => (permessage_deflate),
|
|
4959
5051
|
Receiver: () => (receiver),
|
|
4960
5052
|
Sender: () => (sender),
|
|
4961
5053
|
WebSocket: () => (websocket),
|
|
4962
5054
|
WebSocketServer: () => (websocket_server),
|
|
4963
5055
|
createWebSocketStream: () => (stream),
|
|
4964
|
-
"default": () => (wrapper)
|
|
5056
|
+
"default": () => (wrapper),
|
|
5057
|
+
extension: () => (extension),
|
|
5058
|
+
subprotocol: () => (subprotocol)
|
|
4965
5059
|
});
|
|
4966
5060
|
|
|
4967
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.
|
|
4968
|
-
var stream = __webpack_require__(
|
|
4969
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.
|
|
4970
|
-
var
|
|
4971
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.
|
|
4972
|
-
var
|
|
4973
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.
|
|
4974
|
-
var
|
|
4975
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.
|
|
4976
|
-
var
|
|
4977
|
-
|
|
5061
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js
|
|
5062
|
+
var stream = __webpack_require__(17678);
|
|
5063
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/extension.js
|
|
5064
|
+
var extension = __webpack_require__(33173);
|
|
5065
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/permessage-deflate.js
|
|
5066
|
+
var permessage_deflate = __webpack_require__(12918);
|
|
5067
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/receiver.js
|
|
5068
|
+
var receiver = __webpack_require__(56479);
|
|
5069
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/sender.js
|
|
5070
|
+
var sender = __webpack_require__(55291);
|
|
5071
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/subprotocol.js
|
|
5072
|
+
var subprotocol = __webpack_require__(84926);
|
|
5073
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket.js
|
|
5074
|
+
var websocket = __webpack_require__(68175);
|
|
5075
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket-server.js
|
|
5076
|
+
var websocket_server = __webpack_require__(33947);
|
|
5077
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/wrapper.mjs
|
|
5078
|
+
|
|
5079
|
+
|
|
5080
|
+
|
|
5081
|
+
|
|
4978
5082
|
|
|
4979
5083
|
|
|
4980
5084
|
|
|
@@ -4984,7 +5088,7 @@ var websocket_server = __webpack_require__(8062);
|
|
|
4984
5088
|
|
|
4985
5089
|
/* harmony default export */ const wrapper = (websocket);
|
|
4986
5090
|
|
|
4987
|
-
;// CONCATENATED MODULE: ../../node_modules/.pnpm/isows@1.0.7_ws@8.
|
|
5091
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/isows@1.0.7_ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10_/node_modules/isows/_esm/utils.js
|
|
4988
5092
|
function getNativeWebSocket() {
|
|
4989
5093
|
if (typeof WebSocket !== "undefined")
|
|
4990
5094
|
return WebSocket;
|
|
@@ -4997,7 +5101,7 @@ function getNativeWebSocket() {
|
|
|
4997
5101
|
throw new Error("`WebSocket` is not supported in this environment");
|
|
4998
5102
|
}
|
|
4999
5103
|
//# sourceMappingURL=utils.js.map
|
|
5000
|
-
;// CONCATENATED MODULE: ../../node_modules/.pnpm/isows@1.0.7_ws@8.
|
|
5104
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/isows@1.0.7_ws@8.21.0_bufferutil@4.1.0_utf-8-validate@5.0.10_/node_modules/isows/_esm/index.js
|
|
5001
5105
|
|
|
5002
5106
|
|
|
5003
5107
|
const _esm_WebSocket = (() => {
|