@zoralabs/protocol-deployments 0.7.5 → 0.7.6
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/.turbo/turbo-build$colon$js.log +25 -23
- package/CHANGELOG.md +8 -0
- package/dist/{_esm-7WTTA2BK.js → _esm-IDF567EZ.js} +214 -188
- package/dist/_esm-IDF567EZ.js.map +1 -0
- package/dist/{ccip-Y2GC34UW.js → ccip-TMLJ3HRN.js} +3 -2
- package/dist/chunk-BYTNVMX7.js +408 -0
- package/dist/chunk-BYTNVMX7.js.map +1 -0
- package/dist/{chunk-TP53IMLY.js → chunk-G6JVDOS5.js} +1187 -633
- package/dist/chunk-G6JVDOS5.js.map +1 -0
- package/dist/generated/wagmi.d.ts +48 -16
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +198 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/{secp256k1-VMQNAPXV.js → secp256k1-XP7IUONI.js} +438 -736
- package/dist/secp256k1-XP7IUONI.js.map +1 -0
- package/package.json +2 -2
- package/src/generated/wagmi.ts +6 -2
- package/dist/_esm-7WTTA2BK.js.map +0 -1
- package/dist/chunk-TP53IMLY.js.map +0 -1
- package/dist/secp256k1-VMQNAPXV.js.map +0 -1
- /package/dist/{ccip-Y2GC34UW.js.map → ccip-TMLJ3HRN.js.map} +0 -0
|
@@ -5,112 +5,16 @@ import {
|
|
|
5
5
|
__toESM
|
|
6
6
|
} from "./chunk-PR4QN5HX.js";
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
9
|
-
var require_stream = __commonJS({
|
|
10
|
-
"../../node_modules/.pnpm/ws@8.18.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js"(exports, module) {
|
|
11
|
-
"use strict";
|
|
12
|
-
var { Duplex } = __require("stream");
|
|
13
|
-
function emitClose(stream) {
|
|
14
|
-
stream.emit("close");
|
|
15
|
-
}
|
|
16
|
-
function duplexOnEnd() {
|
|
17
|
-
if (!this.destroyed && this._writableState.finished) {
|
|
18
|
-
this.destroy();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function duplexOnError(err) {
|
|
22
|
-
this.removeListener("error", duplexOnError);
|
|
23
|
-
this.destroy();
|
|
24
|
-
if (this.listenerCount("error") === 0) {
|
|
25
|
-
this.emit("error", err);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function createWebSocketStream2(ws, options) {
|
|
29
|
-
let terminateOnDestroy = true;
|
|
30
|
-
const duplex = new Duplex({
|
|
31
|
-
...options,
|
|
32
|
-
autoDestroy: false,
|
|
33
|
-
emitClose: false,
|
|
34
|
-
objectMode: false,
|
|
35
|
-
writableObjectMode: false
|
|
36
|
-
});
|
|
37
|
-
ws.on("message", function message(msg, isBinary) {
|
|
38
|
-
const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
39
|
-
if (!duplex.push(data)) ws.pause();
|
|
40
|
-
});
|
|
41
|
-
ws.once("error", function error(err) {
|
|
42
|
-
if (duplex.destroyed) return;
|
|
43
|
-
terminateOnDestroy = false;
|
|
44
|
-
duplex.destroy(err);
|
|
45
|
-
});
|
|
46
|
-
ws.once("close", function close() {
|
|
47
|
-
if (duplex.destroyed) return;
|
|
48
|
-
duplex.push(null);
|
|
49
|
-
});
|
|
50
|
-
duplex._destroy = function(err, callback) {
|
|
51
|
-
if (ws.readyState === ws.CLOSED) {
|
|
52
|
-
callback(err);
|
|
53
|
-
process.nextTick(emitClose, duplex);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
let called = false;
|
|
57
|
-
ws.once("error", function error(err2) {
|
|
58
|
-
called = true;
|
|
59
|
-
callback(err2);
|
|
60
|
-
});
|
|
61
|
-
ws.once("close", function close() {
|
|
62
|
-
if (!called) callback(err);
|
|
63
|
-
process.nextTick(emitClose, duplex);
|
|
64
|
-
});
|
|
65
|
-
if (terminateOnDestroy) ws.terminate();
|
|
66
|
-
};
|
|
67
|
-
duplex._final = function(callback) {
|
|
68
|
-
if (ws.readyState === ws.CONNECTING) {
|
|
69
|
-
ws.once("open", function open() {
|
|
70
|
-
duplex._final(callback);
|
|
71
|
-
});
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (ws._socket === null) return;
|
|
75
|
-
if (ws._socket._writableState.finished) {
|
|
76
|
-
callback();
|
|
77
|
-
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
78
|
-
} else {
|
|
79
|
-
ws._socket.once("finish", function finish() {
|
|
80
|
-
callback();
|
|
81
|
-
});
|
|
82
|
-
ws.close();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
duplex._read = function() {
|
|
86
|
-
if (ws.isPaused) ws.resume();
|
|
87
|
-
};
|
|
88
|
-
duplex._write = function(chunk, encoding, callback) {
|
|
89
|
-
if (ws.readyState === ws.CONNECTING) {
|
|
90
|
-
ws.once("open", function open() {
|
|
91
|
-
duplex._write(chunk, encoding, callback);
|
|
92
|
-
});
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
ws.send(chunk, callback);
|
|
96
|
-
};
|
|
97
|
-
duplex.on("end", duplexOnEnd);
|
|
98
|
-
duplex.on("error", duplexOnError);
|
|
99
|
-
return duplex;
|
|
100
|
-
}
|
|
101
|
-
module.exports = createWebSocketStream2;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// ../../node_modules/.pnpm/ws@8.18.0_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/constants.js
|
|
8
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/constants.js
|
|
106
9
|
var require_constants = __commonJS({
|
|
107
|
-
"../../node_modules/.pnpm/ws@8.
|
|
10
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/constants.js"(exports, module) {
|
|
108
11
|
"use strict";
|
|
109
12
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
110
13
|
var hasBlob = typeof Blob !== "undefined";
|
|
111
14
|
if (hasBlob) BINARY_TYPES.push("blob");
|
|
112
15
|
module.exports = {
|
|
113
16
|
BINARY_TYPES,
|
|
17
|
+
CLOSE_TIMEOUT: 3e4,
|
|
114
18
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
115
19
|
GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
|
|
116
20
|
hasBlob,
|
|
@@ -223,9 +127,9 @@ var require_node_gyp_build = __commonJS({
|
|
|
223
127
|
}
|
|
224
128
|
function parseTags(file) {
|
|
225
129
|
var arr = file.split(".");
|
|
226
|
-
var
|
|
130
|
+
var extension2 = arr.pop();
|
|
227
131
|
var tags = { file, specificity: 0 };
|
|
228
|
-
if (
|
|
132
|
+
if (extension2 !== "node") return;
|
|
229
133
|
for (var i = 0; i < arr.length; i++) {
|
|
230
134
|
var tag = arr[i];
|
|
231
135
|
if (tag === "node" || tag === "electron" || tag === "node-webkit") {
|
|
@@ -338,9 +242,9 @@ var require_bufferutil = __commonJS({
|
|
|
338
242
|
}
|
|
339
243
|
});
|
|
340
244
|
|
|
341
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
245
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/buffer-util.js
|
|
342
246
|
var require_buffer_util = __commonJS({
|
|
343
|
-
"../../node_modules/.pnpm/ws@8.
|
|
247
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
344
248
|
"use strict";
|
|
345
249
|
var { EMPTY_BUFFER } = require_constants();
|
|
346
250
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -413,9 +317,9 @@ var require_buffer_util = __commonJS({
|
|
|
413
317
|
}
|
|
414
318
|
});
|
|
415
319
|
|
|
416
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
320
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/limiter.js
|
|
417
321
|
var require_limiter = __commonJS({
|
|
418
|
-
"../../node_modules/.pnpm/ws@8.
|
|
322
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/limiter.js"(exports, module) {
|
|
419
323
|
"use strict";
|
|
420
324
|
var kDone = /* @__PURE__ */ Symbol("kDone");
|
|
421
325
|
var kRun = /* @__PURE__ */ Symbol("kRun");
|
|
@@ -463,9 +367,9 @@ var require_limiter = __commonJS({
|
|
|
463
367
|
}
|
|
464
368
|
});
|
|
465
369
|
|
|
466
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
370
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/permessage-deflate.js
|
|
467
371
|
var require_permessage_deflate = __commonJS({
|
|
468
|
-
"../../node_modules/.pnpm/ws@8.
|
|
372
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
469
373
|
"use strict";
|
|
470
374
|
var zlib = __require("zlib");
|
|
471
375
|
var bufferUtil = require_buffer_util();
|
|
@@ -479,7 +383,7 @@ var require_permessage_deflate = __commonJS({
|
|
|
479
383
|
var kBuffers = /* @__PURE__ */ Symbol("buffers");
|
|
480
384
|
var kError = /* @__PURE__ */ Symbol("error");
|
|
481
385
|
var zlibLimiter;
|
|
482
|
-
var
|
|
386
|
+
var PerMessageDeflate2 = class {
|
|
483
387
|
/**
|
|
484
388
|
* Creates a PerMessageDeflate instance.
|
|
485
389
|
*
|
|
@@ -490,6 +394,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
490
394
|
* acknowledge disabling of client context takeover
|
|
491
395
|
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
|
|
492
396
|
* calls to zlib
|
|
397
|
+
* @param {Boolean} [options.isServer=false] Create the instance in either
|
|
398
|
+
* server or client mode
|
|
399
|
+
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
493
400
|
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
|
|
494
401
|
* use of a custom server window size
|
|
495
402
|
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
|
|
@@ -500,15 +407,12 @@ var require_permessage_deflate = __commonJS({
|
|
|
500
407
|
* deflate
|
|
501
408
|
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
|
502
409
|
* inflate
|
|
503
|
-
* @param {Boolean} [isServer=false] Create the instance in either server or
|
|
504
|
-
* client mode
|
|
505
|
-
* @param {Number} [maxPayload=0] The maximum allowed message length
|
|
506
410
|
*/
|
|
507
|
-
constructor(options
|
|
508
|
-
this._maxPayload = maxPayload | 0;
|
|
411
|
+
constructor(options) {
|
|
509
412
|
this._options = options || {};
|
|
510
413
|
this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
|
|
511
|
-
this.
|
|
414
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
415
|
+
this._isServer = !!this._options.isServer;
|
|
512
416
|
this._deflate = null;
|
|
513
417
|
this._inflate = null;
|
|
514
418
|
this.params = null;
|
|
@@ -817,7 +721,7 @@ var require_permessage_deflate = __commonJS({
|
|
|
817
721
|
});
|
|
818
722
|
}
|
|
819
723
|
};
|
|
820
|
-
module.exports =
|
|
724
|
+
module.exports = PerMessageDeflate2;
|
|
821
725
|
function deflateOnData(chunk) {
|
|
822
726
|
this[kBuffers].push(chunk);
|
|
823
727
|
this[kTotalLength] += chunk.length;
|
|
@@ -836,6 +740,10 @@ var require_permessage_deflate = __commonJS({
|
|
|
836
740
|
}
|
|
837
741
|
function inflateOnError(err) {
|
|
838
742
|
this[kPerMessageDeflate]._inflate = null;
|
|
743
|
+
if (this[kError]) {
|
|
744
|
+
this[kCallback](this[kError]);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
839
747
|
err[kStatusCode] = 1007;
|
|
840
748
|
this[kCallback](err);
|
|
841
749
|
}
|
|
@@ -891,9 +799,9 @@ var require_utf_8_validate = __commonJS({
|
|
|
891
799
|
}
|
|
892
800
|
});
|
|
893
801
|
|
|
894
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
802
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/validation.js
|
|
895
803
|
var require_validation = __commonJS({
|
|
896
|
-
"../../node_modules/.pnpm/ws@8.
|
|
804
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/validation.js"(exports, module) {
|
|
897
805
|
"use strict";
|
|
898
806
|
var { isUtf8 } = __require("buffer");
|
|
899
807
|
var { hasBlob } = require_constants();
|
|
@@ -1092,12 +1000,12 @@ var require_validation = __commonJS({
|
|
|
1092
1000
|
}
|
|
1093
1001
|
});
|
|
1094
1002
|
|
|
1095
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
1003
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/receiver.js
|
|
1096
1004
|
var require_receiver = __commonJS({
|
|
1097
|
-
"../../node_modules/.pnpm/ws@8.
|
|
1005
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/receiver.js"(exports, module) {
|
|
1098
1006
|
"use strict";
|
|
1099
1007
|
var { Writable } = __require("stream");
|
|
1100
|
-
var
|
|
1008
|
+
var PerMessageDeflate2 = require_permessage_deflate();
|
|
1101
1009
|
var {
|
|
1102
1010
|
BINARY_TYPES,
|
|
1103
1011
|
EMPTY_BUFFER,
|
|
@@ -1264,7 +1172,7 @@ var require_receiver = __commonJS({
|
|
|
1264
1172
|
return;
|
|
1265
1173
|
}
|
|
1266
1174
|
const compressed = (buf[0] & 64) === 64;
|
|
1267
|
-
if (compressed && !this._extensions[
|
|
1175
|
+
if (compressed && !this._extensions[PerMessageDeflate2.extensionName]) {
|
|
1268
1176
|
const error = this.createError(
|
|
1269
1177
|
RangeError,
|
|
1270
1178
|
"RSV1 must be clear",
|
|
@@ -1508,7 +1416,7 @@ var require_receiver = __commonJS({
|
|
|
1508
1416
|
* @private
|
|
1509
1417
|
*/
|
|
1510
1418
|
decompress(data, cb) {
|
|
1511
|
-
const perMessageDeflate = this._extensions[
|
|
1419
|
+
const perMessageDeflate = this._extensions[PerMessageDeflate2.extensionName];
|
|
1512
1420
|
perMessageDeflate.decompress(data, this._fin, (err, buf) => {
|
|
1513
1421
|
if (err) return cb(err);
|
|
1514
1422
|
if (buf.length) {
|
|
@@ -1684,13 +1592,16 @@ var require_receiver = __commonJS({
|
|
|
1684
1592
|
}
|
|
1685
1593
|
});
|
|
1686
1594
|
|
|
1687
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
1595
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/sender.js
|
|
1688
1596
|
var require_sender = __commonJS({
|
|
1689
|
-
"../../node_modules/.pnpm/ws@8.
|
|
1597
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/sender.js"(exports, module) {
|
|
1690
1598
|
"use strict";
|
|
1691
1599
|
var { Duplex } = __require("stream");
|
|
1692
1600
|
var { randomFillSync } = __require("crypto");
|
|
1693
|
-
var
|
|
1601
|
+
var {
|
|
1602
|
+
types: { isUint8Array }
|
|
1603
|
+
} = __require("util");
|
|
1604
|
+
var PerMessageDeflate2 = require_permessage_deflate();
|
|
1694
1605
|
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();
|
|
1695
1606
|
var { isBlob, isValidStatusCode } = require_validation();
|
|
1696
1607
|
var { mask: applyMask, toBuffer } = require_buffer_util();
|
|
@@ -1843,8 +1754,10 @@ var require_sender = __commonJS({
|
|
|
1843
1754
|
buf.writeUInt16BE(code, 0);
|
|
1844
1755
|
if (typeof data === "string") {
|
|
1845
1756
|
buf.write(data, 2);
|
|
1846
|
-
} else {
|
|
1757
|
+
} else if (isUint8Array(data)) {
|
|
1847
1758
|
buf.set(data, 2);
|
|
1759
|
+
} else {
|
|
1760
|
+
throw new TypeError("Second argument must be a string or a Uint8Array");
|
|
1848
1761
|
}
|
|
1849
1762
|
}
|
|
1850
1763
|
const options = {
|
|
@@ -1974,7 +1887,7 @@ var require_sender = __commonJS({
|
|
|
1974
1887
|
* @public
|
|
1975
1888
|
*/
|
|
1976
1889
|
send(data, options, cb) {
|
|
1977
|
-
const perMessageDeflate = this._extensions[
|
|
1890
|
+
const perMessageDeflate = this._extensions[PerMessageDeflate2.extensionName];
|
|
1978
1891
|
let opcode = options.binary ? 2 : 1;
|
|
1979
1892
|
let rsv1 = options.compress;
|
|
1980
1893
|
let byteLength;
|
|
@@ -2098,7 +2011,7 @@ var require_sender = __commonJS({
|
|
|
2098
2011
|
this.sendFrame(_Sender.frame(data, options), cb);
|
|
2099
2012
|
return;
|
|
2100
2013
|
}
|
|
2101
|
-
const perMessageDeflate = this._extensions[
|
|
2014
|
+
const perMessageDeflate = this._extensions[PerMessageDeflate2.extensionName];
|
|
2102
2015
|
this._bufferedBytes += options[kByteLength];
|
|
2103
2016
|
this._state = DEFLATING;
|
|
2104
2017
|
perMessageDeflate.compress(data, options.fin, (_, buf) => {
|
|
@@ -2141,7 +2054,7 @@ var require_sender = __commonJS({
|
|
|
2141
2054
|
/**
|
|
2142
2055
|
* Sends a frame.
|
|
2143
2056
|
*
|
|
2144
|
-
* @param {Buffer[]} list The frame to send
|
|
2057
|
+
* @param {(Buffer | String)[]} list The frame to send
|
|
2145
2058
|
* @param {Function} [cb] Callback
|
|
2146
2059
|
* @private
|
|
2147
2060
|
*/
|
|
@@ -2172,9 +2085,9 @@ var require_sender = __commonJS({
|
|
|
2172
2085
|
}
|
|
2173
2086
|
});
|
|
2174
2087
|
|
|
2175
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
2088
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/event-target.js
|
|
2176
2089
|
var require_event_target = __commonJS({
|
|
2177
|
-
"../../node_modules/.pnpm/ws@8.
|
|
2090
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/event-target.js"(exports, module) {
|
|
2178
2091
|
"use strict";
|
|
2179
2092
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
2180
2093
|
var kCode = /* @__PURE__ */ Symbol("kCode");
|
|
@@ -2401,9 +2314,9 @@ var require_event_target = __commonJS({
|
|
|
2401
2314
|
}
|
|
2402
2315
|
});
|
|
2403
2316
|
|
|
2404
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
2317
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/extension.js
|
|
2405
2318
|
var require_extension = __commonJS({
|
|
2406
|
-
"../../node_modules/.pnpm/ws@8.
|
|
2319
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/extension.js"(exports, module) {
|
|
2407
2320
|
"use strict";
|
|
2408
2321
|
var { tokenChars } = require_validation();
|
|
2409
2322
|
function push(dest, name, elem) {
|
|
@@ -2536,11 +2449,11 @@ var require_extension = __commonJS({
|
|
|
2536
2449
|
return offers;
|
|
2537
2450
|
}
|
|
2538
2451
|
function format(extensions) {
|
|
2539
|
-
return Object.keys(extensions).map((
|
|
2540
|
-
let configurations = extensions[
|
|
2452
|
+
return Object.keys(extensions).map((extension2) => {
|
|
2453
|
+
let configurations = extensions[extension2];
|
|
2541
2454
|
if (!Array.isArray(configurations)) configurations = [configurations];
|
|
2542
2455
|
return configurations.map((params) => {
|
|
2543
|
-
return [
|
|
2456
|
+
return [extension2].concat(
|
|
2544
2457
|
Object.keys(params).map((k) => {
|
|
2545
2458
|
let values = params[k];
|
|
2546
2459
|
if (!Array.isArray(values)) values = [values];
|
|
@@ -2554,9 +2467,9 @@ var require_extension = __commonJS({
|
|
|
2554
2467
|
}
|
|
2555
2468
|
});
|
|
2556
2469
|
|
|
2557
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
2470
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket.js
|
|
2558
2471
|
var require_websocket = __commonJS({
|
|
2559
|
-
"../../node_modules/.pnpm/ws@8.
|
|
2472
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket.js"(exports, module) {
|
|
2560
2473
|
"use strict";
|
|
2561
2474
|
var EventEmitter = __require("events");
|
|
2562
2475
|
var https = __require("https");
|
|
@@ -2566,12 +2479,13 @@ var require_websocket = __commonJS({
|
|
|
2566
2479
|
var { randomBytes, createHash } = __require("crypto");
|
|
2567
2480
|
var { Duplex, Readable } = __require("stream");
|
|
2568
2481
|
var { URL } = __require("url");
|
|
2569
|
-
var
|
|
2482
|
+
var PerMessageDeflate2 = require_permessage_deflate();
|
|
2570
2483
|
var Receiver2 = require_receiver();
|
|
2571
2484
|
var Sender2 = require_sender();
|
|
2572
2485
|
var { isBlob } = require_validation();
|
|
2573
2486
|
var {
|
|
2574
2487
|
BINARY_TYPES,
|
|
2488
|
+
CLOSE_TIMEOUT,
|
|
2575
2489
|
EMPTY_BUFFER,
|
|
2576
2490
|
GUID,
|
|
2577
2491
|
kForOnEventAttribute,
|
|
@@ -2585,7 +2499,6 @@ var require_websocket = __commonJS({
|
|
|
2585
2499
|
} = require_event_target();
|
|
2586
2500
|
var { format, parse } = require_extension();
|
|
2587
2501
|
var { toBuffer } = require_buffer_util();
|
|
2588
|
-
var closeTimeout = 30 * 1e3;
|
|
2589
2502
|
var kAborted = /* @__PURE__ */ Symbol("kAborted");
|
|
2590
2503
|
var protocolVersions = [8, 13];
|
|
2591
2504
|
var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
|
|
@@ -2631,6 +2544,7 @@ var require_websocket = __commonJS({
|
|
|
2631
2544
|
initAsClient(this, address, protocols, options);
|
|
2632
2545
|
} else {
|
|
2633
2546
|
this._autoPong = options.autoPong;
|
|
2547
|
+
this._closeTimeout = options.closeTimeout;
|
|
2634
2548
|
this._isServer = true;
|
|
2635
2549
|
}
|
|
2636
2550
|
}
|
|
@@ -2773,8 +2687,8 @@ var require_websocket = __commonJS({
|
|
|
2773
2687
|
this.emit("close", this._closeCode, this._closeMessage);
|
|
2774
2688
|
return;
|
|
2775
2689
|
}
|
|
2776
|
-
if (this._extensions[
|
|
2777
|
-
this._extensions[
|
|
2690
|
+
if (this._extensions[PerMessageDeflate2.extensionName]) {
|
|
2691
|
+
this._extensions[PerMessageDeflate2.extensionName].cleanup();
|
|
2778
2692
|
}
|
|
2779
2693
|
this._receiver.removeAllListeners();
|
|
2780
2694
|
this._readyState = _WebSocket.CLOSED;
|
|
@@ -2936,7 +2850,7 @@ var require_websocket = __commonJS({
|
|
|
2936
2850
|
fin: true,
|
|
2937
2851
|
...options
|
|
2938
2852
|
};
|
|
2939
|
-
if (!this._extensions[
|
|
2853
|
+
if (!this._extensions[PerMessageDeflate2.extensionName]) {
|
|
2940
2854
|
opts.compress = false;
|
|
2941
2855
|
}
|
|
2942
2856
|
this._sender.send(data || EMPTY_BUFFER, opts, cb);
|
|
@@ -3032,6 +2946,7 @@ var require_websocket = __commonJS({
|
|
|
3032
2946
|
const opts = {
|
|
3033
2947
|
allowSynchronousEvents: true,
|
|
3034
2948
|
autoPong: true,
|
|
2949
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
3035
2950
|
protocolVersion: protocolVersions[1],
|
|
3036
2951
|
maxPayload: 100 * 1024 * 1024,
|
|
3037
2952
|
skipUTF8Validation: false,
|
|
@@ -3049,6 +2964,7 @@ var require_websocket = __commonJS({
|
|
|
3049
2964
|
port: void 0
|
|
3050
2965
|
};
|
|
3051
2966
|
websocket._autoPong = opts.autoPong;
|
|
2967
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
3052
2968
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
3053
2969
|
throw new RangeError(
|
|
3054
2970
|
`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
|
|
@@ -3060,7 +2976,7 @@ var require_websocket = __commonJS({
|
|
|
3060
2976
|
} else {
|
|
3061
2977
|
try {
|
|
3062
2978
|
parsedUrl = new URL(address);
|
|
3063
|
-
} catch
|
|
2979
|
+
} catch {
|
|
3064
2980
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
3065
2981
|
}
|
|
3066
2982
|
}
|
|
@@ -3074,7 +2990,7 @@ var require_websocket = __commonJS({
|
|
|
3074
2990
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
3075
2991
|
let invalidUrlMessage;
|
|
3076
2992
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
3077
|
-
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`;
|
|
2993
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;
|
|
3078
2994
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
3079
2995
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
3080
2996
|
} else if (parsedUrl.hash) {
|
|
@@ -3108,13 +3024,13 @@ var require_websocket = __commonJS({
|
|
|
3108
3024
|
opts.path = parsedUrl.pathname + parsedUrl.search;
|
|
3109
3025
|
opts.timeout = opts.handshakeTimeout;
|
|
3110
3026
|
if (opts.perMessageDeflate) {
|
|
3111
|
-
perMessageDeflate = new
|
|
3112
|
-
opts.perMessageDeflate
|
|
3113
|
-
false,
|
|
3114
|
-
opts.maxPayload
|
|
3115
|
-
);
|
|
3027
|
+
perMessageDeflate = new PerMessageDeflate2({
|
|
3028
|
+
...opts.perMessageDeflate,
|
|
3029
|
+
isServer: false,
|
|
3030
|
+
maxPayload: opts.maxPayload
|
|
3031
|
+
});
|
|
3116
3032
|
opts.headers["Sec-WebSocket-Extensions"] = format({
|
|
3117
|
-
[
|
|
3033
|
+
[PerMessageDeflate2.extensionName]: perMessageDeflate.offer()
|
|
3118
3034
|
});
|
|
3119
3035
|
}
|
|
3120
3036
|
if (protocols.length) {
|
|
@@ -3257,19 +3173,19 @@ var require_websocket = __commonJS({
|
|
|
3257
3173
|
return;
|
|
3258
3174
|
}
|
|
3259
3175
|
const extensionNames = Object.keys(extensions);
|
|
3260
|
-
if (extensionNames.length !== 1 || extensionNames[0] !==
|
|
3176
|
+
if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate2.extensionName) {
|
|
3261
3177
|
const message = "Server indicated an extension that was not requested";
|
|
3262
3178
|
abortHandshake(websocket, socket, message);
|
|
3263
3179
|
return;
|
|
3264
3180
|
}
|
|
3265
3181
|
try {
|
|
3266
|
-
perMessageDeflate.accept(extensions[
|
|
3182
|
+
perMessageDeflate.accept(extensions[PerMessageDeflate2.extensionName]);
|
|
3267
3183
|
} catch (err) {
|
|
3268
3184
|
const message = "Invalid Sec-WebSocket-Extensions header";
|
|
3269
3185
|
abortHandshake(websocket, socket, message);
|
|
3270
3186
|
return;
|
|
3271
3187
|
}
|
|
3272
|
-
websocket._extensions[
|
|
3188
|
+
websocket._extensions[PerMessageDeflate2.extensionName] = perMessageDeflate;
|
|
3273
3189
|
}
|
|
3274
3190
|
websocket.setSocket(socket, head, {
|
|
3275
3191
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
@@ -3391,7 +3307,7 @@ var require_websocket = __commonJS({
|
|
|
3391
3307
|
function setCloseTimer(websocket) {
|
|
3392
3308
|
websocket._closeTimer = setTimeout(
|
|
3393
3309
|
websocket._socket.destroy.bind(websocket._socket),
|
|
3394
|
-
|
|
3310
|
+
websocket._closeTimeout
|
|
3395
3311
|
);
|
|
3396
3312
|
}
|
|
3397
3313
|
function socketOnClose() {
|
|
@@ -3400,8 +3316,8 @@ var require_websocket = __commonJS({
|
|
|
3400
3316
|
this.removeListener("data", socketOnData);
|
|
3401
3317
|
this.removeListener("end", socketOnEnd);
|
|
3402
3318
|
websocket._readyState = WebSocket4.CLOSING;
|
|
3403
|
-
|
|
3404
|
-
|
|
3319
|
+
if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
|
|
3320
|
+
const chunk = this.read(this._readableState.length);
|
|
3405
3321
|
websocket._receiver.write(chunk);
|
|
3406
3322
|
}
|
|
3407
3323
|
websocket._receiver.end();
|
|
@@ -3437,9 +3353,107 @@ var require_websocket = __commonJS({
|
|
|
3437
3353
|
}
|
|
3438
3354
|
});
|
|
3439
3355
|
|
|
3440
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3356
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js
|
|
3357
|
+
var require_stream = __commonJS({
|
|
3358
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js"(exports, module) {
|
|
3359
|
+
"use strict";
|
|
3360
|
+
var WebSocket4 = require_websocket();
|
|
3361
|
+
var { Duplex } = __require("stream");
|
|
3362
|
+
function emitClose(stream) {
|
|
3363
|
+
stream.emit("close");
|
|
3364
|
+
}
|
|
3365
|
+
function duplexOnEnd() {
|
|
3366
|
+
if (!this.destroyed && this._writableState.finished) {
|
|
3367
|
+
this.destroy();
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
function duplexOnError(err) {
|
|
3371
|
+
this.removeListener("error", duplexOnError);
|
|
3372
|
+
this.destroy();
|
|
3373
|
+
if (this.listenerCount("error") === 0) {
|
|
3374
|
+
this.emit("error", err);
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
function createWebSocketStream2(ws, options) {
|
|
3378
|
+
let terminateOnDestroy = true;
|
|
3379
|
+
const duplex = new Duplex({
|
|
3380
|
+
...options,
|
|
3381
|
+
autoDestroy: false,
|
|
3382
|
+
emitClose: false,
|
|
3383
|
+
objectMode: false,
|
|
3384
|
+
writableObjectMode: false
|
|
3385
|
+
});
|
|
3386
|
+
ws.on("message", function message(msg, isBinary) {
|
|
3387
|
+
const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
3388
|
+
if (!duplex.push(data)) ws.pause();
|
|
3389
|
+
});
|
|
3390
|
+
ws.once("error", function error(err) {
|
|
3391
|
+
if (duplex.destroyed) return;
|
|
3392
|
+
terminateOnDestroy = false;
|
|
3393
|
+
duplex.destroy(err);
|
|
3394
|
+
});
|
|
3395
|
+
ws.once("close", function close() {
|
|
3396
|
+
if (duplex.destroyed) return;
|
|
3397
|
+
duplex.push(null);
|
|
3398
|
+
});
|
|
3399
|
+
duplex._destroy = function(err, callback) {
|
|
3400
|
+
if (ws.readyState === ws.CLOSED) {
|
|
3401
|
+
callback(err);
|
|
3402
|
+
process.nextTick(emitClose, duplex);
|
|
3403
|
+
return;
|
|
3404
|
+
}
|
|
3405
|
+
let called = false;
|
|
3406
|
+
ws.once("error", function error(err2) {
|
|
3407
|
+
called = true;
|
|
3408
|
+
callback(err2);
|
|
3409
|
+
});
|
|
3410
|
+
ws.once("close", function close() {
|
|
3411
|
+
if (!called) callback(err);
|
|
3412
|
+
process.nextTick(emitClose, duplex);
|
|
3413
|
+
});
|
|
3414
|
+
if (terminateOnDestroy) ws.terminate();
|
|
3415
|
+
};
|
|
3416
|
+
duplex._final = function(callback) {
|
|
3417
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3418
|
+
ws.once("open", function open() {
|
|
3419
|
+
duplex._final(callback);
|
|
3420
|
+
});
|
|
3421
|
+
return;
|
|
3422
|
+
}
|
|
3423
|
+
if (ws._socket === null) return;
|
|
3424
|
+
if (ws._socket._writableState.finished) {
|
|
3425
|
+
callback();
|
|
3426
|
+
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
3427
|
+
} else {
|
|
3428
|
+
ws._socket.once("finish", function finish() {
|
|
3429
|
+
callback();
|
|
3430
|
+
});
|
|
3431
|
+
ws.close();
|
|
3432
|
+
}
|
|
3433
|
+
};
|
|
3434
|
+
duplex._read = function() {
|
|
3435
|
+
if (ws.isPaused) ws.resume();
|
|
3436
|
+
};
|
|
3437
|
+
duplex._write = function(chunk, encoding, callback) {
|
|
3438
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3439
|
+
ws.once("open", function open() {
|
|
3440
|
+
duplex._write(chunk, encoding, callback);
|
|
3441
|
+
});
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
ws.send(chunk, callback);
|
|
3445
|
+
};
|
|
3446
|
+
duplex.on("end", duplexOnEnd);
|
|
3447
|
+
duplex.on("error", duplexOnError);
|
|
3448
|
+
return duplex;
|
|
3449
|
+
}
|
|
3450
|
+
module.exports = createWebSocketStream2;
|
|
3451
|
+
}
|
|
3452
|
+
});
|
|
3453
|
+
|
|
3454
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/subprotocol.js
|
|
3441
3455
|
var require_subprotocol = __commonJS({
|
|
3442
|
-
"../../node_modules/.pnpm/ws@8.
|
|
3456
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
3443
3457
|
"use strict";
|
|
3444
3458
|
var { tokenChars } = require_validation();
|
|
3445
3459
|
function parse(header) {
|
|
@@ -3482,19 +3496,19 @@ var require_subprotocol = __commonJS({
|
|
|
3482
3496
|
}
|
|
3483
3497
|
});
|
|
3484
3498
|
|
|
3485
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3499
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket-server.js
|
|
3486
3500
|
var require_websocket_server = __commonJS({
|
|
3487
|
-
"../../node_modules/.pnpm/ws@8.
|
|
3501
|
+
"../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
3488
3502
|
"use strict";
|
|
3489
3503
|
var EventEmitter = __require("events");
|
|
3490
3504
|
var http = __require("http");
|
|
3491
3505
|
var { Duplex } = __require("stream");
|
|
3492
3506
|
var { createHash } = __require("crypto");
|
|
3493
|
-
var
|
|
3494
|
-
var
|
|
3495
|
-
var
|
|
3507
|
+
var extension2 = require_extension();
|
|
3508
|
+
var PerMessageDeflate2 = require_permessage_deflate();
|
|
3509
|
+
var subprotocol2 = require_subprotocol();
|
|
3496
3510
|
var WebSocket4 = require_websocket();
|
|
3497
|
-
var { GUID, kWebSocket } = require_constants();
|
|
3511
|
+
var { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants();
|
|
3498
3512
|
var keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
3499
3513
|
var RUNNING = 0;
|
|
3500
3514
|
var CLOSING = 1;
|
|
@@ -3513,6 +3527,9 @@ var require_websocket_server = __commonJS({
|
|
|
3513
3527
|
* pending connections
|
|
3514
3528
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
3515
3529
|
* track clients
|
|
3530
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
|
3531
|
+
* wait for the closing handshake to finish after `websocket.close()` is
|
|
3532
|
+
* called
|
|
3516
3533
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
3517
3534
|
* @param {String} [options.host] The hostname where to bind the server
|
|
3518
3535
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
@@ -3541,6 +3558,7 @@ var require_websocket_server = __commonJS({
|
|
|
3541
3558
|
perMessageDeflate: false,
|
|
3542
3559
|
handleProtocols: null,
|
|
3543
3560
|
clientTracking: true,
|
|
3561
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
3544
3562
|
verifyClient: null,
|
|
3545
3563
|
noServer: false,
|
|
3546
3564
|
backlog: null,
|
|
@@ -3696,9 +3714,11 @@ var require_websocket_server = __commonJS({
|
|
|
3696
3714
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
3697
3715
|
return;
|
|
3698
3716
|
}
|
|
3699
|
-
if (version !==
|
|
3717
|
+
if (version !== 13 && version !== 8) {
|
|
3700
3718
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
|
3701
|
-
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message
|
|
3719
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
|
|
3720
|
+
"Sec-WebSocket-Version": "13, 8"
|
|
3721
|
+
});
|
|
3702
3722
|
return;
|
|
3703
3723
|
}
|
|
3704
3724
|
if (!this.shouldHandle(req)) {
|
|
@@ -3709,7 +3729,7 @@ var require_websocket_server = __commonJS({
|
|
|
3709
3729
|
let protocols = /* @__PURE__ */ new Set();
|
|
3710
3730
|
if (secWebSocketProtocol !== void 0) {
|
|
3711
3731
|
try {
|
|
3712
|
-
protocols =
|
|
3732
|
+
protocols = subprotocol2.parse(secWebSocketProtocol);
|
|
3713
3733
|
} catch (err) {
|
|
3714
3734
|
const message = "Invalid Sec-WebSocket-Protocol header";
|
|
3715
3735
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
@@ -3719,16 +3739,16 @@ var require_websocket_server = __commonJS({
|
|
|
3719
3739
|
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
|
|
3720
3740
|
const extensions = {};
|
|
3721
3741
|
if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
|
|
3722
|
-
const perMessageDeflate = new
|
|
3723
|
-
this.options.perMessageDeflate,
|
|
3724
|
-
true,
|
|
3725
|
-
this.options.maxPayload
|
|
3726
|
-
);
|
|
3742
|
+
const perMessageDeflate = new PerMessageDeflate2({
|
|
3743
|
+
...this.options.perMessageDeflate,
|
|
3744
|
+
isServer: true,
|
|
3745
|
+
maxPayload: this.options.maxPayload
|
|
3746
|
+
});
|
|
3727
3747
|
try {
|
|
3728
|
-
const offers =
|
|
3729
|
-
if (offers[
|
|
3730
|
-
perMessageDeflate.accept(offers[
|
|
3731
|
-
extensions[
|
|
3748
|
+
const offers = extension2.parse(secWebSocketExtensions);
|
|
3749
|
+
if (offers[PerMessageDeflate2.extensionName]) {
|
|
3750
|
+
perMessageDeflate.accept(offers[PerMessageDeflate2.extensionName]);
|
|
3751
|
+
extensions[PerMessageDeflate2.extensionName] = perMessageDeflate;
|
|
3732
3752
|
}
|
|
3733
3753
|
} catch (err) {
|
|
3734
3754
|
const message = "Invalid or unacceptable Sec-WebSocket-Extensions header";
|
|
@@ -3799,10 +3819,10 @@ var require_websocket_server = __commonJS({
|
|
|
3799
3819
|
ws._protocol = protocol;
|
|
3800
3820
|
}
|
|
3801
3821
|
}
|
|
3802
|
-
if (extensions[
|
|
3803
|
-
const params = extensions[
|
|
3804
|
-
const value =
|
|
3805
|
-
[
|
|
3822
|
+
if (extensions[PerMessageDeflate2.extensionName]) {
|
|
3823
|
+
const params = extensions[PerMessageDeflate2.extensionName].params;
|
|
3824
|
+
const value = extension2.format({
|
|
3825
|
+
[PerMessageDeflate2.extensionName]: [params]
|
|
3806
3826
|
});
|
|
3807
3827
|
headers.push(`Sec-WebSocket-Extensions: ${value}`);
|
|
3808
3828
|
ws._extensions = extensions;
|
|
@@ -3857,36 +3877,42 @@ var require_websocket_server = __commonJS({
|
|
|
3857
3877
|
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message
|
|
3858
3878
|
);
|
|
3859
3879
|
}
|
|
3860
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
3880
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
3861
3881
|
if (server.listenerCount("wsClientError")) {
|
|
3862
3882
|
const err = new Error(message);
|
|
3863
3883
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
3864
3884
|
server.emit("wsClientError", err, socket, req);
|
|
3865
3885
|
} else {
|
|
3866
|
-
abortHandshake(socket, code, message);
|
|
3886
|
+
abortHandshake(socket, code, message, headers);
|
|
3867
3887
|
}
|
|
3868
3888
|
}
|
|
3869
3889
|
}
|
|
3870
3890
|
});
|
|
3871
3891
|
|
|
3872
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3892
|
+
// ../../node_modules/.pnpm/ws@8.20.1_bufferutil@4.1.0_utf-8-validate@5.0.10/node_modules/ws/wrapper.mjs
|
|
3873
3893
|
var wrapper_exports = {};
|
|
3874
3894
|
__export(wrapper_exports, {
|
|
3895
|
+
PerMessageDeflate: () => import_permessage_deflate.default,
|
|
3875
3896
|
Receiver: () => import_receiver.default,
|
|
3876
3897
|
Sender: () => import_sender.default,
|
|
3877
3898
|
WebSocket: () => import_websocket.default,
|
|
3878
3899
|
WebSocketServer: () => import_websocket_server.default,
|
|
3879
3900
|
createWebSocketStream: () => import_stream.default,
|
|
3880
|
-
default: () => wrapper_default
|
|
3901
|
+
default: () => wrapper_default,
|
|
3902
|
+
extension: () => import_extension.default,
|
|
3903
|
+
subprotocol: () => import_subprotocol.default
|
|
3881
3904
|
});
|
|
3882
3905
|
var import_stream = __toESM(require_stream(), 1);
|
|
3906
|
+
var import_extension = __toESM(require_extension(), 1);
|
|
3907
|
+
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
3883
3908
|
var import_receiver = __toESM(require_receiver(), 1);
|
|
3884
3909
|
var import_sender = __toESM(require_sender(), 1);
|
|
3910
|
+
var import_subprotocol = __toESM(require_subprotocol(), 1);
|
|
3885
3911
|
var import_websocket = __toESM(require_websocket(), 1);
|
|
3886
3912
|
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
3887
3913
|
var wrapper_default = import_websocket.default;
|
|
3888
3914
|
|
|
3889
|
-
// ../../node_modules/.pnpm/isows@1.0.
|
|
3915
|
+
// ../../node_modules/.pnpm/isows@1.0.7_ws@8.20.1/node_modules/isows/_esm/utils.js
|
|
3890
3916
|
function getNativeWebSocket() {
|
|
3891
3917
|
if (typeof WebSocket !== "undefined")
|
|
3892
3918
|
return WebSocket;
|
|
@@ -3899,7 +3925,7 @@ function getNativeWebSocket() {
|
|
|
3899
3925
|
throw new Error("`WebSocket` is not supported in this environment");
|
|
3900
3926
|
}
|
|
3901
3927
|
|
|
3902
|
-
// ../../node_modules/.pnpm/isows@1.0.
|
|
3928
|
+
// ../../node_modules/.pnpm/isows@1.0.7_ws@8.20.1/node_modules/isows/_esm/index.js
|
|
3903
3929
|
var WebSocket3 = (() => {
|
|
3904
3930
|
try {
|
|
3905
3931
|
return getNativeWebSocket();
|
|
@@ -3912,4 +3938,4 @@ var WebSocket3 = (() => {
|
|
|
3912
3938
|
export {
|
|
3913
3939
|
WebSocket3 as WebSocket
|
|
3914
3940
|
};
|
|
3915
|
-
//# sourceMappingURL=_esm-
|
|
3941
|
+
//# sourceMappingURL=_esm-IDF567EZ.js.map
|