@zoralabs/protocol-deployments 0.6.3 → 0.6.4-PRE.0
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 +53 -50
- package/CHANGELOG.md +6 -3
- package/dist/{_esm-AN6HMJZC.js → _esm-OJM6GREZ.js} +138 -131
- package/dist/_esm-OJM6GREZ.js.map +1 -0
- package/dist/{ccip-C5WONSSK.js → ccip-4Y6T462U.js} +3 -2
- package/dist/chunk-BYTNVMX7.js +408 -0
- package/dist/chunk-BYTNVMX7.js.map +1 -0
- package/dist/{chunk-NPNNGXR4.js → chunk-KMBLRPCX.js} +980 -578
- package/dist/chunk-KMBLRPCX.js.map +1 -0
- package/dist/encoding.d.ts +0 -55
- package/dist/encoding.d.ts.map +1 -1
- package/dist/generated/wagmi.d.ts +5635 -6845
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +696 -1281
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +576 -1073
- package/dist/index.js.map +1 -1
- package/dist/{secp256k1-QZA5SALG.js → secp256k1-XP7IUONI.js} +438 -746
- package/dist/secp256k1-XP7IUONI.js.map +1 -0
- package/package.json +12 -12
- package/src/encoding.ts +1 -124
- package/src/generated/wagmi.ts +390 -852
- package/LICENSE +0 -21
- package/dist/_esm-AN6HMJZC.js.map +0 -1
- package/dist/chunk-NPNNGXR4.js.map +0 -1
- package/dist/secp256k1-QZA5SALG.js.map +0 -1
- /package/dist/{ccip-C5WONSSK.js.map → ccip-4Y6T462U.js.map} +0 -0
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
> prettier
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
src/
|
|
19
|
-
src/
|
|
20
|
-
src/
|
|
21
|
-
|
|
22
|
-
scripts/bundle-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
[34mCLI[39m
|
|
29
|
-
[34mCLI[39m
|
|
30
|
-
[34mCLI[39m
|
|
31
|
-
[34mCLI[39m
|
|
32
|
-
[34mCLI[39m
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[32mCJS[39m [1mdist/index.cjs
|
|
37
|
-
[32mCJS[39m
|
|
38
|
-
[
|
|
39
|
-
[32mESM[39m [1mdist/
|
|
40
|
-
[32mESM[39m [1mdist/
|
|
41
|
-
[32mESM[39m [1mdist/
|
|
42
|
-
[32mESM[39m [1mdist/
|
|
43
|
-
[32mESM[39m [1mdist/
|
|
44
|
-
[32mESM[39m [1mdist/
|
|
45
|
-
[32mESM[39m [1mdist/chunk-
|
|
46
|
-
[32mESM[39m [1mdist/
|
|
47
|
-
[32mESM[39m [1mdist/
|
|
48
|
-
[32mESM[39m [1mdist/
|
|
49
|
-
[32mESM[39m [1mdist/
|
|
50
|
-
[32mESM[39m
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @zoralabs/protocol-deployments@0.6.4-PRE.0 build:js /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments
|
|
4
|
+
> pnpm run build
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
> @zoralabs/protocol-deployments@0.6.4-PRE.0 build /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments
|
|
8
|
+
> pnpm bundle-configs && pnpm copy-generated && tsup
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
> @zoralabs/protocol-deployments@0.6.4-PRE.0 bundle-configs /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments
|
|
12
|
+
> tsx scripts/bundle-configs.ts && pnpm prettier:write
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
> @zoralabs/protocol-deployments@0.6.4-PRE.0 prettier:write /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments
|
|
16
|
+
> prettier --write 'src/**/*.ts' 'scripts/*'
|
|
17
|
+
|
|
18
|
+
src/encoding.ts[2K[1G[90msrc/encoding.ts[39m 28ms (unchanged)
|
|
19
|
+
src/index.ts[2K[1G[90msrc/index.ts[39m 2ms (unchanged)
|
|
20
|
+
src/typedData.ts[2K[1G[90msrc/typedData.ts[39m 30ms (unchanged)
|
|
21
|
+
src/types.ts[2K[1G[90msrc/types.ts[39m 8ms (unchanged)
|
|
22
|
+
scripts/bundle-chainConfigs.ts[2K[1G[90mscripts/bundle-chainConfigs.ts[39m 4ms (unchanged)
|
|
23
|
+
scripts/bundle-configs.ts[2K[1G[90mscripts/bundle-configs.ts[39m 7ms (unchanged)
|
|
24
|
+
|
|
25
|
+
> @zoralabs/protocol-deployments@0.6.4-PRE.0 copy-generated /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments
|
|
26
|
+
> cp ../protocol-deployments-gen/generated/wagmi.ts src/generated/wagmi.ts
|
|
27
|
+
|
|
28
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
29
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
30
|
+
[34mCLI[39m tsup v8.5.0
|
|
31
|
+
[34mCLI[39m Using tsup config: /Users/danovedzora/source/zora/protocol/dan-soc-45-update-buy-initial-supply-hook-to-support-buying-supply-with/packages/protocol-deployments/tsup.config.ts
|
|
32
|
+
[34mCLI[39m Target: es2021
|
|
33
|
+
[34mCLI[39m Cleaning output folder
|
|
34
|
+
[34mCJS[39m Build start
|
|
35
|
+
[34mESM[39m Build start
|
|
36
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m628.02 KB[39m
|
|
37
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.28 MB[39m
|
|
38
|
+
[32mCJS[39m ⚡️ Build success in 239ms
|
|
39
|
+
[32mESM[39m [1mdist/secp256k1-XP7IUONI.js [22m[32m69.15 KB[39m
|
|
40
|
+
[32mESM[39m [1mdist/chunk-PR4QN5HX.js [22m[32m1.87 KB[39m
|
|
41
|
+
[32mESM[39m [1mdist/index.js [22m[32m547.17 KB[39m
|
|
42
|
+
[32mESM[39m [1mdist/chunk-BYTNVMX7.js [22m[32m11.89 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/_esm-OJM6GREZ.js [22m[32m133.14 KB[39m
|
|
44
|
+
[32mESM[39m [1mdist/ccip-4Y6T462U.js [22m[32m320.00 B[39m
|
|
45
|
+
[32mESM[39m [1mdist/chunk-KMBLRPCX.js [22m[32m158.75 KB[39m
|
|
46
|
+
[32mESM[39m [1mdist/chunk-PR4QN5HX.js.map [22m[32m71.00 B[39m
|
|
47
|
+
[32mESM[39m [1mdist/secp256k1-XP7IUONI.js.map [22m[32m194.07 KB[39m
|
|
48
|
+
[32mESM[39m [1mdist/chunk-BYTNVMX7.js.map [22m[32m42.64 KB[39m
|
|
49
|
+
[32mESM[39m [1mdist/_esm-OJM6GREZ.js.map [22m[32m213.16 KB[39m
|
|
50
|
+
[32mESM[39m [1mdist/ccip-4Y6T462U.js.map [22m[32m71.00 B[39m
|
|
51
|
+
[32mESM[39m [1mdist/chunk-KMBLRPCX.js.map [22m[32m458.01 KB[39m
|
|
52
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m1.03 MB[39m
|
|
53
|
+
[32mESM[39m ⚡️ Build success in 258ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# @zoralabs/protocol-deployments
|
|
2
2
|
|
|
3
|
+
## 0.6.4-PRE.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 52a2e6f5: Created a buy supply with v4 hook, for buying initial supply of a creator coin, supporting doing a v3 and v4 swap to buy the creator coin. updated the encoding function for buying initial supply to work with the v3 to v4 swap
|
|
8
|
+
|
|
3
9
|
## 0.6.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
6
12
|
|
|
7
13
|
- 131c719a: Deployed v2.2.0 of coins to Base
|
|
8
14
|
- cdaa9d25: Fix critical security vulnerabilities with pnpm overrides
|
|
9
|
-
|
|
10
15
|
- Added pnpm overrides to eliminate critical vulnerabilities
|
|
11
16
|
- Fixed vitest RCE vulnerability (^2.1.9)
|
|
12
17
|
- Fixed elliptic private key extraction vulnerability (^6.6.1)
|
|
@@ -240,7 +245,6 @@
|
|
|
240
245
|
### Patch Changes
|
|
241
246
|
|
|
242
247
|
- 9cdd81ac: Deployed latest version of 1155 contracts, 1155 factory, preminter, and mints manager to:
|
|
243
|
-
|
|
244
248
|
- blast
|
|
245
249
|
- Optimism mainnet
|
|
246
250
|
- Base
|
|
@@ -432,7 +436,6 @@
|
|
|
432
436
|
|
|
433
437
|
- 4d79b49: Deployed to zora sepolia
|
|
434
438
|
- b62e471: created new package `protocol-deployments` that includes the deployed contract addresses.
|
|
435
|
-
|
|
436
439
|
- 1155-contracts js no longer exports deployed addresses, just the abis
|
|
437
440
|
- premint-sdk imports deployed addresses from `protocol-deployments
|
|
438
441
|
|
|
@@ -5,106 +5,9 @@ import {
|
|
|
5
5
|
__toESM
|
|
6
6
|
} from "./chunk-PR4QN5HX.js";
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
9
|
-
var require_stream = __commonJS({
|
|
10
|
-
"../../node_modules/.pnpm/ws@8.18.0_bufferutil@4.0.9_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.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/constants.js
|
|
8
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/constants.js
|
|
106
9
|
var require_constants = __commonJS({
|
|
107
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
10
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_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";
|
|
@@ -338,9 +241,9 @@ var require_bufferutil = __commonJS({
|
|
|
338
241
|
}
|
|
339
242
|
});
|
|
340
243
|
|
|
341
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
244
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/buffer-util.js
|
|
342
245
|
var require_buffer_util = __commonJS({
|
|
343
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
246
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
344
247
|
"use strict";
|
|
345
248
|
var { EMPTY_BUFFER } = require_constants();
|
|
346
249
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -413,9 +316,9 @@ var require_buffer_util = __commonJS({
|
|
|
413
316
|
}
|
|
414
317
|
});
|
|
415
318
|
|
|
416
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
319
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/limiter.js
|
|
417
320
|
var require_limiter = __commonJS({
|
|
418
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
321
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/limiter.js"(exports, module) {
|
|
419
322
|
"use strict";
|
|
420
323
|
var kDone = Symbol("kDone");
|
|
421
324
|
var kRun = Symbol("kRun");
|
|
@@ -463,9 +366,9 @@ var require_limiter = __commonJS({
|
|
|
463
366
|
}
|
|
464
367
|
});
|
|
465
368
|
|
|
466
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
369
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/permessage-deflate.js
|
|
467
370
|
var require_permessage_deflate = __commonJS({
|
|
468
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
371
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
469
372
|
"use strict";
|
|
470
373
|
var zlib = __require("zlib");
|
|
471
374
|
var bufferUtil = require_buffer_util();
|
|
@@ -836,6 +739,10 @@ var require_permessage_deflate = __commonJS({
|
|
|
836
739
|
}
|
|
837
740
|
function inflateOnError(err) {
|
|
838
741
|
this[kPerMessageDeflate]._inflate = null;
|
|
742
|
+
if (this[kError]) {
|
|
743
|
+
this[kCallback](this[kError]);
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
839
746
|
err[kStatusCode] = 1007;
|
|
840
747
|
this[kCallback](err);
|
|
841
748
|
}
|
|
@@ -891,9 +798,9 @@ var require_utf_8_validate = __commonJS({
|
|
|
891
798
|
}
|
|
892
799
|
});
|
|
893
800
|
|
|
894
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
801
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/validation.js
|
|
895
802
|
var require_validation = __commonJS({
|
|
896
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
803
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/validation.js"(exports, module) {
|
|
897
804
|
"use strict";
|
|
898
805
|
var { isUtf8 } = __require("buffer");
|
|
899
806
|
var { hasBlob } = require_constants();
|
|
@@ -1092,9 +999,9 @@ var require_validation = __commonJS({
|
|
|
1092
999
|
}
|
|
1093
1000
|
});
|
|
1094
1001
|
|
|
1095
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
1002
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/receiver.js
|
|
1096
1003
|
var require_receiver = __commonJS({
|
|
1097
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
1004
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/receiver.js"(exports, module) {
|
|
1098
1005
|
"use strict";
|
|
1099
1006
|
var { Writable } = __require("stream");
|
|
1100
1007
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -1684,9 +1591,9 @@ var require_receiver = __commonJS({
|
|
|
1684
1591
|
}
|
|
1685
1592
|
});
|
|
1686
1593
|
|
|
1687
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
1594
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/sender.js
|
|
1688
1595
|
var require_sender = __commonJS({
|
|
1689
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
1596
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/sender.js"(exports, module) {
|
|
1690
1597
|
"use strict";
|
|
1691
1598
|
var { Duplex } = __require("stream");
|
|
1692
1599
|
var { randomFillSync } = __require("crypto");
|
|
@@ -2141,7 +2048,7 @@ var require_sender = __commonJS({
|
|
|
2141
2048
|
/**
|
|
2142
2049
|
* Sends a frame.
|
|
2143
2050
|
*
|
|
2144
|
-
* @param {Buffer[]} list The frame to send
|
|
2051
|
+
* @param {(Buffer | String)[]} list The frame to send
|
|
2145
2052
|
* @param {Function} [cb] Callback
|
|
2146
2053
|
* @private
|
|
2147
2054
|
*/
|
|
@@ -2172,9 +2079,9 @@ var require_sender = __commonJS({
|
|
|
2172
2079
|
}
|
|
2173
2080
|
});
|
|
2174
2081
|
|
|
2175
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
2082
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/event-target.js
|
|
2176
2083
|
var require_event_target = __commonJS({
|
|
2177
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
2084
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/event-target.js"(exports, module) {
|
|
2178
2085
|
"use strict";
|
|
2179
2086
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
2180
2087
|
var kCode = Symbol("kCode");
|
|
@@ -2401,9 +2308,9 @@ var require_event_target = __commonJS({
|
|
|
2401
2308
|
}
|
|
2402
2309
|
});
|
|
2403
2310
|
|
|
2404
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
2311
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/extension.js
|
|
2405
2312
|
var require_extension = __commonJS({
|
|
2406
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
2313
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/extension.js"(exports, module) {
|
|
2407
2314
|
"use strict";
|
|
2408
2315
|
var { tokenChars } = require_validation();
|
|
2409
2316
|
function push(dest, name, elem) {
|
|
@@ -2554,9 +2461,9 @@ var require_extension = __commonJS({
|
|
|
2554
2461
|
}
|
|
2555
2462
|
});
|
|
2556
2463
|
|
|
2557
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
2464
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/websocket.js
|
|
2558
2465
|
var require_websocket = __commonJS({
|
|
2559
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
2466
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/websocket.js"(exports, module) {
|
|
2560
2467
|
"use strict";
|
|
2561
2468
|
var EventEmitter = __require("events");
|
|
2562
2469
|
var https = __require("https");
|
|
@@ -3074,7 +2981,7 @@ var require_websocket = __commonJS({
|
|
|
3074
2981
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
3075
2982
|
let invalidUrlMessage;
|
|
3076
2983
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
3077
|
-
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`;
|
|
2984
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;
|
|
3078
2985
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
3079
2986
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
3080
2987
|
} else if (parsedUrl.hash) {
|
|
@@ -3437,9 +3344,107 @@ var require_websocket = __commonJS({
|
|
|
3437
3344
|
}
|
|
3438
3345
|
});
|
|
3439
3346
|
|
|
3440
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
3347
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js
|
|
3348
|
+
var require_stream = __commonJS({
|
|
3349
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/stream.js"(exports, module) {
|
|
3350
|
+
"use strict";
|
|
3351
|
+
var WebSocket4 = require_websocket();
|
|
3352
|
+
var { Duplex } = __require("stream");
|
|
3353
|
+
function emitClose(stream) {
|
|
3354
|
+
stream.emit("close");
|
|
3355
|
+
}
|
|
3356
|
+
function duplexOnEnd() {
|
|
3357
|
+
if (!this.destroyed && this._writableState.finished) {
|
|
3358
|
+
this.destroy();
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
function duplexOnError(err) {
|
|
3362
|
+
this.removeListener("error", duplexOnError);
|
|
3363
|
+
this.destroy();
|
|
3364
|
+
if (this.listenerCount("error") === 0) {
|
|
3365
|
+
this.emit("error", err);
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
function createWebSocketStream2(ws, options) {
|
|
3369
|
+
let terminateOnDestroy = true;
|
|
3370
|
+
const duplex = new Duplex({
|
|
3371
|
+
...options,
|
|
3372
|
+
autoDestroy: false,
|
|
3373
|
+
emitClose: false,
|
|
3374
|
+
objectMode: false,
|
|
3375
|
+
writableObjectMode: false
|
|
3376
|
+
});
|
|
3377
|
+
ws.on("message", function message(msg, isBinary) {
|
|
3378
|
+
const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
|
|
3379
|
+
if (!duplex.push(data)) ws.pause();
|
|
3380
|
+
});
|
|
3381
|
+
ws.once("error", function error(err) {
|
|
3382
|
+
if (duplex.destroyed) return;
|
|
3383
|
+
terminateOnDestroy = false;
|
|
3384
|
+
duplex.destroy(err);
|
|
3385
|
+
});
|
|
3386
|
+
ws.once("close", function close() {
|
|
3387
|
+
if (duplex.destroyed) return;
|
|
3388
|
+
duplex.push(null);
|
|
3389
|
+
});
|
|
3390
|
+
duplex._destroy = function(err, callback) {
|
|
3391
|
+
if (ws.readyState === ws.CLOSED) {
|
|
3392
|
+
callback(err);
|
|
3393
|
+
process.nextTick(emitClose, duplex);
|
|
3394
|
+
return;
|
|
3395
|
+
}
|
|
3396
|
+
let called = false;
|
|
3397
|
+
ws.once("error", function error(err2) {
|
|
3398
|
+
called = true;
|
|
3399
|
+
callback(err2);
|
|
3400
|
+
});
|
|
3401
|
+
ws.once("close", function close() {
|
|
3402
|
+
if (!called) callback(err);
|
|
3403
|
+
process.nextTick(emitClose, duplex);
|
|
3404
|
+
});
|
|
3405
|
+
if (terminateOnDestroy) ws.terminate();
|
|
3406
|
+
};
|
|
3407
|
+
duplex._final = function(callback) {
|
|
3408
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3409
|
+
ws.once("open", function open() {
|
|
3410
|
+
duplex._final(callback);
|
|
3411
|
+
});
|
|
3412
|
+
return;
|
|
3413
|
+
}
|
|
3414
|
+
if (ws._socket === null) return;
|
|
3415
|
+
if (ws._socket._writableState.finished) {
|
|
3416
|
+
callback();
|
|
3417
|
+
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
3418
|
+
} else {
|
|
3419
|
+
ws._socket.once("finish", function finish() {
|
|
3420
|
+
callback();
|
|
3421
|
+
});
|
|
3422
|
+
ws.close();
|
|
3423
|
+
}
|
|
3424
|
+
};
|
|
3425
|
+
duplex._read = function() {
|
|
3426
|
+
if (ws.isPaused) ws.resume();
|
|
3427
|
+
};
|
|
3428
|
+
duplex._write = function(chunk, encoding, callback) {
|
|
3429
|
+
if (ws.readyState === ws.CONNECTING) {
|
|
3430
|
+
ws.once("open", function open() {
|
|
3431
|
+
duplex._write(chunk, encoding, callback);
|
|
3432
|
+
});
|
|
3433
|
+
return;
|
|
3434
|
+
}
|
|
3435
|
+
ws.send(chunk, callback);
|
|
3436
|
+
};
|
|
3437
|
+
duplex.on("end", duplexOnEnd);
|
|
3438
|
+
duplex.on("error", duplexOnError);
|
|
3439
|
+
return duplex;
|
|
3440
|
+
}
|
|
3441
|
+
module.exports = createWebSocketStream2;
|
|
3442
|
+
}
|
|
3443
|
+
});
|
|
3444
|
+
|
|
3445
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/subprotocol.js
|
|
3441
3446
|
var require_subprotocol = __commonJS({
|
|
3442
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
3447
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
3443
3448
|
"use strict";
|
|
3444
3449
|
var { tokenChars } = require_validation();
|
|
3445
3450
|
function parse(header) {
|
|
@@ -3482,9 +3487,9 @@ var require_subprotocol = __commonJS({
|
|
|
3482
3487
|
}
|
|
3483
3488
|
});
|
|
3484
3489
|
|
|
3485
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
3490
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/websocket-server.js
|
|
3486
3491
|
var require_websocket_server = __commonJS({
|
|
3487
|
-
"../../node_modules/.pnpm/ws@8.18.
|
|
3492
|
+
"../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
3488
3493
|
"use strict";
|
|
3489
3494
|
var EventEmitter = __require("events");
|
|
3490
3495
|
var http = __require("http");
|
|
@@ -3696,9 +3701,11 @@ var require_websocket_server = __commonJS({
|
|
|
3696
3701
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
3697
3702
|
return;
|
|
3698
3703
|
}
|
|
3699
|
-
if (version !==
|
|
3704
|
+
if (version !== 13 && version !== 8) {
|
|
3700
3705
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
|
3701
|
-
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message
|
|
3706
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
|
|
3707
|
+
"Sec-WebSocket-Version": "13, 8"
|
|
3708
|
+
});
|
|
3702
3709
|
return;
|
|
3703
3710
|
}
|
|
3704
3711
|
if (!this.shouldHandle(req)) {
|
|
@@ -3857,19 +3864,19 @@ var require_websocket_server = __commonJS({
|
|
|
3857
3864
|
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message
|
|
3858
3865
|
);
|
|
3859
3866
|
}
|
|
3860
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
3867
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
3861
3868
|
if (server.listenerCount("wsClientError")) {
|
|
3862
3869
|
const err = new Error(message);
|
|
3863
3870
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
3864
3871
|
server.emit("wsClientError", err, socket, req);
|
|
3865
3872
|
} else {
|
|
3866
|
-
abortHandshake(socket, code, message);
|
|
3873
|
+
abortHandshake(socket, code, message, headers);
|
|
3867
3874
|
}
|
|
3868
3875
|
}
|
|
3869
3876
|
}
|
|
3870
3877
|
});
|
|
3871
3878
|
|
|
3872
|
-
// ../../node_modules/.pnpm/ws@8.18.
|
|
3879
|
+
// ../../node_modules/.pnpm/ws@8.18.3_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ws/wrapper.mjs
|
|
3873
3880
|
var wrapper_exports = {};
|
|
3874
3881
|
__export(wrapper_exports, {
|
|
3875
3882
|
Receiver: () => import_receiver.default,
|
|
@@ -3886,7 +3893,7 @@ var import_websocket = __toESM(require_websocket(), 1);
|
|
|
3886
3893
|
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
3887
3894
|
var wrapper_default = import_websocket.default;
|
|
3888
3895
|
|
|
3889
|
-
// ../../node_modules/.pnpm/isows@1.0.
|
|
3896
|
+
// ../../node_modules/.pnpm/isows@1.0.7_ws@8.18.3/node_modules/isows/_esm/utils.js
|
|
3890
3897
|
function getNativeWebSocket() {
|
|
3891
3898
|
if (typeof WebSocket !== "undefined")
|
|
3892
3899
|
return WebSocket;
|
|
@@ -3899,7 +3906,7 @@ function getNativeWebSocket() {
|
|
|
3899
3906
|
throw new Error("`WebSocket` is not supported in this environment");
|
|
3900
3907
|
}
|
|
3901
3908
|
|
|
3902
|
-
// ../../node_modules/.pnpm/isows@1.0.
|
|
3909
|
+
// ../../node_modules/.pnpm/isows@1.0.7_ws@8.18.3/node_modules/isows/_esm/index.js
|
|
3903
3910
|
var WebSocket3 = (() => {
|
|
3904
3911
|
try {
|
|
3905
3912
|
return getNativeWebSocket();
|
|
@@ -3912,4 +3919,4 @@ var WebSocket3 = (() => {
|
|
|
3912
3919
|
export {
|
|
3913
3920
|
WebSocket3 as WebSocket
|
|
3914
3921
|
};
|
|
3915
|
-
//# sourceMappingURL=_esm-
|
|
3922
|
+
//# sourceMappingURL=_esm-OJM6GREZ.js.map
|