@shopify/create-app 3.60.0 → 3.61.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/dist/{chunk-2EVDXDJS.js → chunk-5NBS5LAW.js} +1 -1
- package/dist/{chunk-P6YJ2CQU.js → chunk-7F4FS2WD.js} +7 -7
- package/dist/{chunk-P3DMHVBI.js → chunk-GQNJWQKC.js} +22 -17
- package/dist/{chunk-P6N3DVYZ.js → chunk-H3UBEY47.js} +3 -3
- package/dist/{chunk-ZDU6ZNVH.js → chunk-H4N7DG5X.js} +23 -19
- package/dist/{chunk-TMGCRPEZ.js → chunk-HTYJDJRZ.js} +685 -215
- package/dist/{chunk-3L6KY7Q3.js → chunk-I3IYXB26.js} +23 -6
- package/dist/{chunk-OYLUVGUB.js → chunk-J3QAMMY2.js} +1 -1
- package/dist/{chunk-ZPB26OWQ.js → chunk-K5EEGEVV.js} +34 -14
- package/dist/{chunk-BMMDEPWI.js → chunk-LLFZPH5K.js} +12 -9
- package/dist/{chunk-GKVC3752.js → chunk-LR725A3N.js} +3 -3
- package/dist/{chunk-P4TVG45N.js → chunk-LUP5VDI4.js} +10 -3
- package/dist/{chunk-L5LPMIFP.js → chunk-PGYGWMK7.js} +5 -5
- package/dist/{chunk-2YPXES4K.js → chunk-PKFDUXG6.js} +1 -1
- package/dist/{chunk-JOQ4LR3M.js → chunk-R5KQZMEG.js} +1 -1
- package/dist/{chunk-YLEF4RUH.js → chunk-RAFFEFML.js} +4 -0
- package/dist/{chunk-3JNB3A7C.js → chunk-U4YACXEW.js} +567 -357
- package/dist/{chunk-Q737A7ZQ.js → chunk-X2I3FAVD.js} +3 -3
- package/dist/{chunk-JA2XDFAC.js → chunk-XKDB3ST7.js} +3603 -4080
- package/dist/{chunk-ZWN4YW5O.js → chunk-YI3MHBSD.js} +1 -1
- package/dist/commands/init.js +19 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +20 -20
- package/dist/{constants-K3R4N3N3.js → constants-NNLQHFRJ.js} +3 -1
- package/dist/{custom-oclif-loader-3GZ6YYAB.js → custom-oclif-loader-KLTAWG4B.js} +7 -6
- package/dist/{del-A5YM6R3Y.js → del-ICEHOC6W.js} +2 -2
- package/dist/{devtools-KQM4GF6J.js → devtools-6HZ2IPFU.js} +154 -252
- package/dist/{error-handler-SPIUKOES.js → error-handler-ND7WBMC3.js} +13 -13
- package/dist/hooks/postrun.js +12 -12
- package/dist/hooks/prerun.js +8 -8
- package/dist/index.js +4 -4
- package/dist/{lib-TQDGEQFC.js → lib-76RCE6WZ.js} +3 -3
- package/dist/{local-7KWUTHJN.js → local-3LWDOA7J.js} +5 -5
- package/dist/{magic-string.es-6WMSFIAX.js → magic-string.es-6DE547FE.js} +79 -18
- package/dist/{multipart-parser-O2BQODS2.js → multipart-parser-ENLY4BKU.js} +1 -1
- package/dist/{node-package-manager-MI2KGR6B.js → node-package-manager-TFY2ROCP.js} +6 -6
- package/dist/{out-JZ52TJE3.js → out-M5MRQZP5.js} +1 -1
- package/dist/prompts/init.js +6 -6
- package/dist/prompts/init.test.js +7 -7
- package/dist/services/init.d.ts +3 -0
- package/dist/services/init.js +13 -13
- package/dist/services/init.js.map +1 -1
- package/dist/services/init.test.js +1 -1
- package/dist/{system-KQGQETIF.js → system-FTT76GKS.js} +5 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-HO5KGT27.js → ui-MUGCNPLG.js} +5 -5
- package/dist/utils/template/cleanup.js +6 -6
- package/dist/utils/template/cleanup.test.js +7 -7
- package/dist/utils/template/npm.js +8 -8
- package/dist/utils/template/npm.test.js +9 -9
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
init_cjs_shims
|
|
6
6
|
} from "./chunk-M63RTPGR.js";
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
8
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/stream.js
|
|
9
9
|
var require_stream = __commonJS({
|
|
10
|
-
"../../node_modules/.pnpm/ws@8.
|
|
10
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/stream.js"(exports, module) {
|
|
11
11
|
"use strict";
|
|
12
12
|
init_cjs_shims();
|
|
13
13
|
var { Duplex } = __require("stream");
|
|
@@ -111,9 +111,9 @@ var require_stream = __commonJS({
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
114
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/constants.js
|
|
115
115
|
var require_constants = __commonJS({
|
|
116
|
-
"../../node_modules/.pnpm/ws@8.
|
|
116
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/constants.js"(exports, module) {
|
|
117
117
|
"use strict";
|
|
118
118
|
init_cjs_shims();
|
|
119
119
|
module.exports = {
|
|
@@ -130,9 +130,9 @@ var require_constants = __commonJS({
|
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
133
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/buffer-util.js
|
|
134
134
|
var require_buffer_util = __commonJS({
|
|
135
|
-
"../../node_modules/.pnpm/ws@8.
|
|
135
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
136
136
|
"use strict";
|
|
137
137
|
init_cjs_shims();
|
|
138
138
|
var { EMPTY_BUFFER } = require_constants();
|
|
@@ -213,9 +213,9 @@ var require_buffer_util = __commonJS({
|
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
216
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/limiter.js
|
|
217
217
|
var require_limiter = __commonJS({
|
|
218
|
-
"../../node_modules/.pnpm/ws@8.
|
|
218
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/limiter.js"(exports, module) {
|
|
219
219
|
"use strict";
|
|
220
220
|
init_cjs_shims();
|
|
221
221
|
var kDone = Symbol("kDone");
|
|
@@ -265,9 +265,9 @@ var require_limiter = __commonJS({
|
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
268
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/permessage-deflate.js
|
|
269
269
|
var require_permessage_deflate = __commonJS({
|
|
270
|
-
"../../node_modules/.pnpm/ws@8.
|
|
270
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
|
|
271
271
|
"use strict";
|
|
272
272
|
init_cjs_shims();
|
|
273
273
|
var zlib = __require("zlib");
|
|
@@ -646,9 +646,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
648
|
|
|
649
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
649
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/validation.js
|
|
650
650
|
var require_validation = __commonJS({
|
|
651
|
-
"../../node_modules/.pnpm/ws@8.
|
|
651
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/validation.js"(exports, module) {
|
|
652
652
|
"use strict";
|
|
653
653
|
init_cjs_shims();
|
|
654
654
|
var { isUtf8 } = __require("buffer");
|
|
@@ -843,9 +843,9 @@ var require_validation = __commonJS({
|
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
|
|
846
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
846
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/receiver.js
|
|
847
847
|
var require_receiver = __commonJS({
|
|
848
|
-
"../../node_modules/.pnpm/ws@8.
|
|
848
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/receiver.js"(exports, module) {
|
|
849
849
|
"use strict";
|
|
850
850
|
init_cjs_shims();
|
|
851
851
|
var { Writable } = __require("stream");
|
|
@@ -859,23 +859,17 @@ var require_receiver = __commonJS({
|
|
|
859
859
|
var { concat, toArrayBuffer, unmask } = require_buffer_util();
|
|
860
860
|
var { isValidStatusCode, isValidUTF8 } = require_validation();
|
|
861
861
|
var FastBuffer = Buffer[Symbol.species];
|
|
862
|
-
var promise = Promise.resolve();
|
|
863
|
-
var queueTask = typeof queueMicrotask === "function" ? queueMicrotask : queueMicrotaskShim;
|
|
864
862
|
var GET_INFO = 0;
|
|
865
863
|
var GET_PAYLOAD_LENGTH_16 = 1;
|
|
866
864
|
var GET_PAYLOAD_LENGTH_64 = 2;
|
|
867
865
|
var GET_MASK = 3;
|
|
868
866
|
var GET_DATA = 4;
|
|
869
867
|
var INFLATING = 5;
|
|
870
|
-
var DEFER_EVENT = 6;
|
|
871
868
|
var Receiver2 = class extends Writable {
|
|
872
869
|
/**
|
|
873
870
|
* Creates a Receiver instance.
|
|
874
871
|
*
|
|
875
872
|
* @param {Object} [options] Options object
|
|
876
|
-
* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
|
|
877
|
-
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
878
|
-
* multiple times in the same tick
|
|
879
873
|
* @param {String} [options.binaryType=nodebuffer] The type for binary data
|
|
880
874
|
* @param {Object} [options.extensions] An object containing the negotiated
|
|
881
875
|
* extensions
|
|
@@ -887,7 +881,6 @@ var require_receiver = __commonJS({
|
|
|
887
881
|
*/
|
|
888
882
|
constructor(options = {}) {
|
|
889
883
|
super();
|
|
890
|
-
this._allowSynchronousEvents = !!options.allowSynchronousEvents;
|
|
891
884
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
892
885
|
this._extensions = options.extensions || {};
|
|
893
886
|
this._isServer = !!options.isServer;
|
|
@@ -906,9 +899,8 @@ var require_receiver = __commonJS({
|
|
|
906
899
|
this._totalPayloadLength = 0;
|
|
907
900
|
this._messageLength = 0;
|
|
908
901
|
this._fragments = [];
|
|
909
|
-
this._errored = false;
|
|
910
|
-
this._loop = false;
|
|
911
902
|
this._state = GET_INFO;
|
|
903
|
+
this._loop = false;
|
|
912
904
|
}
|
|
913
905
|
/**
|
|
914
906
|
* Implements `Writable.prototype._write()`.
|
|
@@ -970,207 +962,195 @@ var require_receiver = __commonJS({
|
|
|
970
962
|
* @private
|
|
971
963
|
*/
|
|
972
964
|
startLoop(cb) {
|
|
965
|
+
let err;
|
|
973
966
|
this._loop = true;
|
|
974
967
|
do {
|
|
975
968
|
switch (this._state) {
|
|
976
969
|
case GET_INFO:
|
|
977
|
-
this.getInfo(
|
|
970
|
+
err = this.getInfo();
|
|
978
971
|
break;
|
|
979
972
|
case GET_PAYLOAD_LENGTH_16:
|
|
980
|
-
this.getPayloadLength16(
|
|
973
|
+
err = this.getPayloadLength16();
|
|
981
974
|
break;
|
|
982
975
|
case GET_PAYLOAD_LENGTH_64:
|
|
983
|
-
this.getPayloadLength64(
|
|
976
|
+
err = this.getPayloadLength64();
|
|
984
977
|
break;
|
|
985
978
|
case GET_MASK:
|
|
986
979
|
this.getMask();
|
|
987
980
|
break;
|
|
988
981
|
case GET_DATA:
|
|
989
|
-
this.getData(cb);
|
|
982
|
+
err = this.getData(cb);
|
|
990
983
|
break;
|
|
991
|
-
|
|
992
|
-
case DEFER_EVENT:
|
|
984
|
+
default:
|
|
993
985
|
this._loop = false;
|
|
994
986
|
return;
|
|
995
987
|
}
|
|
996
988
|
} while (this._loop);
|
|
997
|
-
|
|
998
|
-
cb();
|
|
989
|
+
cb(err);
|
|
999
990
|
}
|
|
1000
991
|
/**
|
|
1001
992
|
* Reads the first two bytes of a frame.
|
|
1002
993
|
*
|
|
1003
|
-
* @
|
|
994
|
+
* @return {(RangeError|undefined)} A possible error
|
|
1004
995
|
* @private
|
|
1005
996
|
*/
|
|
1006
|
-
getInfo(
|
|
997
|
+
getInfo() {
|
|
1007
998
|
if (this._bufferedBytes < 2) {
|
|
1008
999
|
this._loop = false;
|
|
1009
1000
|
return;
|
|
1010
1001
|
}
|
|
1011
1002
|
const buf = this.consume(2);
|
|
1012
1003
|
if ((buf[0] & 48) !== 0) {
|
|
1013
|
-
|
|
1004
|
+
this._loop = false;
|
|
1005
|
+
return error(
|
|
1014
1006
|
RangeError,
|
|
1015
1007
|
"RSV2 and RSV3 must be clear",
|
|
1016
1008
|
true,
|
|
1017
1009
|
1002,
|
|
1018
1010
|
"WS_ERR_UNEXPECTED_RSV_2_3"
|
|
1019
1011
|
);
|
|
1020
|
-
cb(error);
|
|
1021
|
-
return;
|
|
1022
1012
|
}
|
|
1023
1013
|
const compressed = (buf[0] & 64) === 64;
|
|
1024
1014
|
if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
|
|
1025
|
-
|
|
1015
|
+
this._loop = false;
|
|
1016
|
+
return error(
|
|
1026
1017
|
RangeError,
|
|
1027
1018
|
"RSV1 must be clear",
|
|
1028
1019
|
true,
|
|
1029
1020
|
1002,
|
|
1030
1021
|
"WS_ERR_UNEXPECTED_RSV_1"
|
|
1031
1022
|
);
|
|
1032
|
-
cb(error);
|
|
1033
|
-
return;
|
|
1034
1023
|
}
|
|
1035
1024
|
this._fin = (buf[0] & 128) === 128;
|
|
1036
1025
|
this._opcode = buf[0] & 15;
|
|
1037
1026
|
this._payloadLength = buf[1] & 127;
|
|
1038
1027
|
if (this._opcode === 0) {
|
|
1039
1028
|
if (compressed) {
|
|
1040
|
-
|
|
1029
|
+
this._loop = false;
|
|
1030
|
+
return error(
|
|
1041
1031
|
RangeError,
|
|
1042
1032
|
"RSV1 must be clear",
|
|
1043
1033
|
true,
|
|
1044
1034
|
1002,
|
|
1045
1035
|
"WS_ERR_UNEXPECTED_RSV_1"
|
|
1046
1036
|
);
|
|
1047
|
-
cb(error);
|
|
1048
|
-
return;
|
|
1049
1037
|
}
|
|
1050
1038
|
if (!this._fragmented) {
|
|
1051
|
-
|
|
1039
|
+
this._loop = false;
|
|
1040
|
+
return error(
|
|
1052
1041
|
RangeError,
|
|
1053
1042
|
"invalid opcode 0",
|
|
1054
1043
|
true,
|
|
1055
1044
|
1002,
|
|
1056
1045
|
"WS_ERR_INVALID_OPCODE"
|
|
1057
1046
|
);
|
|
1058
|
-
cb(error);
|
|
1059
|
-
return;
|
|
1060
1047
|
}
|
|
1061
1048
|
this._opcode = this._fragmented;
|
|
1062
1049
|
} else if (this._opcode === 1 || this._opcode === 2) {
|
|
1063
1050
|
if (this._fragmented) {
|
|
1064
|
-
|
|
1051
|
+
this._loop = false;
|
|
1052
|
+
return error(
|
|
1065
1053
|
RangeError,
|
|
1066
1054
|
`invalid opcode ${this._opcode}`,
|
|
1067
1055
|
true,
|
|
1068
1056
|
1002,
|
|
1069
1057
|
"WS_ERR_INVALID_OPCODE"
|
|
1070
1058
|
);
|
|
1071
|
-
cb(error);
|
|
1072
|
-
return;
|
|
1073
1059
|
}
|
|
1074
1060
|
this._compressed = compressed;
|
|
1075
1061
|
} else if (this._opcode > 7 && this._opcode < 11) {
|
|
1076
1062
|
if (!this._fin) {
|
|
1077
|
-
|
|
1063
|
+
this._loop = false;
|
|
1064
|
+
return error(
|
|
1078
1065
|
RangeError,
|
|
1079
1066
|
"FIN must be set",
|
|
1080
1067
|
true,
|
|
1081
1068
|
1002,
|
|
1082
1069
|
"WS_ERR_EXPECTED_FIN"
|
|
1083
1070
|
);
|
|
1084
|
-
cb(error);
|
|
1085
|
-
return;
|
|
1086
1071
|
}
|
|
1087
1072
|
if (compressed) {
|
|
1088
|
-
|
|
1073
|
+
this._loop = false;
|
|
1074
|
+
return error(
|
|
1089
1075
|
RangeError,
|
|
1090
1076
|
"RSV1 must be clear",
|
|
1091
1077
|
true,
|
|
1092
1078
|
1002,
|
|
1093
1079
|
"WS_ERR_UNEXPECTED_RSV_1"
|
|
1094
1080
|
);
|
|
1095
|
-
cb(error);
|
|
1096
|
-
return;
|
|
1097
1081
|
}
|
|
1098
1082
|
if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
|
|
1099
|
-
|
|
1083
|
+
this._loop = false;
|
|
1084
|
+
return error(
|
|
1100
1085
|
RangeError,
|
|
1101
1086
|
`invalid payload length ${this._payloadLength}`,
|
|
1102
1087
|
true,
|
|
1103
1088
|
1002,
|
|
1104
1089
|
"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
|
|
1105
1090
|
);
|
|
1106
|
-
cb(error);
|
|
1107
|
-
return;
|
|
1108
1091
|
}
|
|
1109
1092
|
} else {
|
|
1110
|
-
|
|
1093
|
+
this._loop = false;
|
|
1094
|
+
return error(
|
|
1111
1095
|
RangeError,
|
|
1112
1096
|
`invalid opcode ${this._opcode}`,
|
|
1113
1097
|
true,
|
|
1114
1098
|
1002,
|
|
1115
1099
|
"WS_ERR_INVALID_OPCODE"
|
|
1116
1100
|
);
|
|
1117
|
-
cb(error);
|
|
1118
|
-
return;
|
|
1119
1101
|
}
|
|
1120
1102
|
if (!this._fin && !this._fragmented)
|
|
1121
1103
|
this._fragmented = this._opcode;
|
|
1122
1104
|
this._masked = (buf[1] & 128) === 128;
|
|
1123
1105
|
if (this._isServer) {
|
|
1124
1106
|
if (!this._masked) {
|
|
1125
|
-
|
|
1107
|
+
this._loop = false;
|
|
1108
|
+
return error(
|
|
1126
1109
|
RangeError,
|
|
1127
1110
|
"MASK must be set",
|
|
1128
1111
|
true,
|
|
1129
1112
|
1002,
|
|
1130
1113
|
"WS_ERR_EXPECTED_MASK"
|
|
1131
1114
|
);
|
|
1132
|
-
cb(error);
|
|
1133
|
-
return;
|
|
1134
1115
|
}
|
|
1135
1116
|
} else if (this._masked) {
|
|
1136
|
-
|
|
1117
|
+
this._loop = false;
|
|
1118
|
+
return error(
|
|
1137
1119
|
RangeError,
|
|
1138
1120
|
"MASK must be clear",
|
|
1139
1121
|
true,
|
|
1140
1122
|
1002,
|
|
1141
1123
|
"WS_ERR_UNEXPECTED_MASK"
|
|
1142
1124
|
);
|
|
1143
|
-
cb(error);
|
|
1144
|
-
return;
|
|
1145
1125
|
}
|
|
1146
1126
|
if (this._payloadLength === 126)
|
|
1147
1127
|
this._state = GET_PAYLOAD_LENGTH_16;
|
|
1148
1128
|
else if (this._payloadLength === 127)
|
|
1149
1129
|
this._state = GET_PAYLOAD_LENGTH_64;
|
|
1150
1130
|
else
|
|
1151
|
-
this.haveLength(
|
|
1131
|
+
return this.haveLength();
|
|
1152
1132
|
}
|
|
1153
1133
|
/**
|
|
1154
1134
|
* Gets extended payload length (7+16).
|
|
1155
1135
|
*
|
|
1156
|
-
* @
|
|
1136
|
+
* @return {(RangeError|undefined)} A possible error
|
|
1157
1137
|
* @private
|
|
1158
1138
|
*/
|
|
1159
|
-
getPayloadLength16(
|
|
1139
|
+
getPayloadLength16() {
|
|
1160
1140
|
if (this._bufferedBytes < 2) {
|
|
1161
1141
|
this._loop = false;
|
|
1162
1142
|
return;
|
|
1163
1143
|
}
|
|
1164
1144
|
this._payloadLength = this.consume(2).readUInt16BE(0);
|
|
1165
|
-
this.haveLength(
|
|
1145
|
+
return this.haveLength();
|
|
1166
1146
|
}
|
|
1167
1147
|
/**
|
|
1168
1148
|
* Gets extended payload length (7+64).
|
|
1169
1149
|
*
|
|
1170
|
-
* @
|
|
1150
|
+
* @return {(RangeError|undefined)} A possible error
|
|
1171
1151
|
* @private
|
|
1172
1152
|
*/
|
|
1173
|
-
getPayloadLength64(
|
|
1153
|
+
getPayloadLength64() {
|
|
1174
1154
|
if (this._bufferedBytes < 8) {
|
|
1175
1155
|
this._loop = false;
|
|
1176
1156
|
return;
|
|
@@ -1178,38 +1158,36 @@ var require_receiver = __commonJS({
|
|
|
1178
1158
|
const buf = this.consume(8);
|
|
1179
1159
|
const num = buf.readUInt32BE(0);
|
|
1180
1160
|
if (num > Math.pow(2, 53 - 32) - 1) {
|
|
1181
|
-
|
|
1161
|
+
this._loop = false;
|
|
1162
|
+
return error(
|
|
1182
1163
|
RangeError,
|
|
1183
1164
|
"Unsupported WebSocket frame: payload length > 2^53 - 1",
|
|
1184
1165
|
false,
|
|
1185
1166
|
1009,
|
|
1186
1167
|
"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"
|
|
1187
1168
|
);
|
|
1188
|
-
cb(error);
|
|
1189
|
-
return;
|
|
1190
1169
|
}
|
|
1191
1170
|
this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
|
|
1192
|
-
this.haveLength(
|
|
1171
|
+
return this.haveLength();
|
|
1193
1172
|
}
|
|
1194
1173
|
/**
|
|
1195
1174
|
* Payload length has been read.
|
|
1196
1175
|
*
|
|
1197
|
-
* @
|
|
1176
|
+
* @return {(RangeError|undefined)} A possible error
|
|
1198
1177
|
* @private
|
|
1199
1178
|
*/
|
|
1200
|
-
haveLength(
|
|
1179
|
+
haveLength() {
|
|
1201
1180
|
if (this._payloadLength && this._opcode < 8) {
|
|
1202
1181
|
this._totalPayloadLength += this._payloadLength;
|
|
1203
1182
|
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
|
|
1204
|
-
|
|
1183
|
+
this._loop = false;
|
|
1184
|
+
return error(
|
|
1205
1185
|
RangeError,
|
|
1206
1186
|
"Max payload size exceeded",
|
|
1207
1187
|
false,
|
|
1208
1188
|
1009,
|
|
1209
1189
|
"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
|
|
1210
1190
|
);
|
|
1211
|
-
cb(error);
|
|
1212
|
-
return;
|
|
1213
1191
|
}
|
|
1214
1192
|
}
|
|
1215
1193
|
if (this._masked)
|
|
@@ -1234,6 +1212,7 @@ var require_receiver = __commonJS({
|
|
|
1234
1212
|
* Reads data bytes.
|
|
1235
1213
|
*
|
|
1236
1214
|
* @param {Function} cb Callback
|
|
1215
|
+
* @return {(Error|RangeError|undefined)} A possible error
|
|
1237
1216
|
* @private
|
|
1238
1217
|
*/
|
|
1239
1218
|
getData(cb) {
|
|
@@ -1248,10 +1227,8 @@ var require_receiver = __commonJS({
|
|
|
1248
1227
|
unmask(data, this._mask);
|
|
1249
1228
|
}
|
|
1250
1229
|
}
|
|
1251
|
-
if (this._opcode > 7)
|
|
1252
|
-
this.controlMessage(data
|
|
1253
|
-
return;
|
|
1254
|
-
}
|
|
1230
|
+
if (this._opcode > 7)
|
|
1231
|
+
return this.controlMessage(data);
|
|
1255
1232
|
if (this._compressed) {
|
|
1256
1233
|
this._state = INFLATING;
|
|
1257
1234
|
this.decompress(data, cb);
|
|
@@ -1261,7 +1238,7 @@ var require_receiver = __commonJS({
|
|
|
1261
1238
|
this._messageLength = this._totalPayloadLength;
|
|
1262
1239
|
this._fragments.push(data);
|
|
1263
1240
|
}
|
|
1264
|
-
this.dataMessage(
|
|
1241
|
+
return this.dataMessage();
|
|
1265
1242
|
}
|
|
1266
1243
|
/**
|
|
1267
1244
|
* Decompresses data.
|
|
@@ -1278,85 +1255,64 @@ var require_receiver = __commonJS({
|
|
|
1278
1255
|
if (buf.length) {
|
|
1279
1256
|
this._messageLength += buf.length;
|
|
1280
1257
|
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1258
|
+
return cb(
|
|
1259
|
+
error(
|
|
1260
|
+
RangeError,
|
|
1261
|
+
"Max payload size exceeded",
|
|
1262
|
+
false,
|
|
1263
|
+
1009,
|
|
1264
|
+
"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
|
|
1265
|
+
)
|
|
1287
1266
|
);
|
|
1288
|
-
cb(error);
|
|
1289
|
-
return;
|
|
1290
1267
|
}
|
|
1291
1268
|
this._fragments.push(buf);
|
|
1292
1269
|
}
|
|
1293
|
-
this.dataMessage(
|
|
1294
|
-
if (
|
|
1295
|
-
|
|
1270
|
+
const er = this.dataMessage();
|
|
1271
|
+
if (er)
|
|
1272
|
+
return cb(er);
|
|
1273
|
+
this.startLoop(cb);
|
|
1296
1274
|
});
|
|
1297
1275
|
}
|
|
1298
1276
|
/**
|
|
1299
1277
|
* Handles a data message.
|
|
1300
1278
|
*
|
|
1301
|
-
* @
|
|
1279
|
+
* @return {(Error|undefined)} A possible error
|
|
1302
1280
|
* @private
|
|
1303
1281
|
*/
|
|
1304
|
-
dataMessage(
|
|
1305
|
-
if (
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
} else {
|
|
1322
|
-
data = fragments;
|
|
1323
|
-
}
|
|
1324
|
-
if (this._state === INFLATING || this._allowSynchronousEvents) {
|
|
1282
|
+
dataMessage() {
|
|
1283
|
+
if (this._fin) {
|
|
1284
|
+
const messageLength = this._messageLength;
|
|
1285
|
+
const fragments = this._fragments;
|
|
1286
|
+
this._totalPayloadLength = 0;
|
|
1287
|
+
this._messageLength = 0;
|
|
1288
|
+
this._fragmented = 0;
|
|
1289
|
+
this._fragments = [];
|
|
1290
|
+
if (this._opcode === 2) {
|
|
1291
|
+
let data;
|
|
1292
|
+
if (this._binaryType === "nodebuffer") {
|
|
1293
|
+
data = concat(fragments, messageLength);
|
|
1294
|
+
} else if (this._binaryType === "arraybuffer") {
|
|
1295
|
+
data = toArrayBuffer(concat(fragments, messageLength));
|
|
1296
|
+
} else {
|
|
1297
|
+
data = fragments;
|
|
1298
|
+
}
|
|
1325
1299
|
this.emit("message", data, true);
|
|
1326
|
-
this._state = GET_INFO;
|
|
1327
1300
|
} else {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
this.
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
Error,
|
|
1340
|
-
"invalid UTF-8 sequence",
|
|
1341
|
-
true,
|
|
1342
|
-
1007,
|
|
1343
|
-
"WS_ERR_INVALID_UTF8"
|
|
1344
|
-
);
|
|
1345
|
-
cb(error);
|
|
1346
|
-
return;
|
|
1347
|
-
}
|
|
1348
|
-
if (this._state === INFLATING || this._allowSynchronousEvents) {
|
|
1301
|
+
const buf = concat(fragments, messageLength);
|
|
1302
|
+
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
1303
|
+
this._loop = false;
|
|
1304
|
+
return error(
|
|
1305
|
+
Error,
|
|
1306
|
+
"invalid UTF-8 sequence",
|
|
1307
|
+
true,
|
|
1308
|
+
1007,
|
|
1309
|
+
"WS_ERR_INVALID_UTF8"
|
|
1310
|
+
);
|
|
1311
|
+
}
|
|
1349
1312
|
this.emit("message", buf, false);
|
|
1350
|
-
this._state = GET_INFO;
|
|
1351
|
-
} else {
|
|
1352
|
-
this._state = DEFER_EVENT;
|
|
1353
|
-
queueTask(() => {
|
|
1354
|
-
this.emit("message", buf, false);
|
|
1355
|
-
this._state = GET_INFO;
|
|
1356
|
-
this.startLoop(cb);
|
|
1357
|
-
});
|
|
1358
1313
|
}
|
|
1359
1314
|
}
|
|
1315
|
+
this._state = GET_INFO;
|
|
1360
1316
|
}
|
|
1361
1317
|
/**
|
|
1362
1318
|
* Handles a control message.
|
|
@@ -1365,24 +1321,22 @@ var require_receiver = __commonJS({
|
|
|
1365
1321
|
* @return {(Error|RangeError|undefined)} A possible error
|
|
1366
1322
|
* @private
|
|
1367
1323
|
*/
|
|
1368
|
-
controlMessage(data
|
|
1324
|
+
controlMessage(data) {
|
|
1369
1325
|
if (this._opcode === 8) {
|
|
1326
|
+
this._loop = false;
|
|
1370
1327
|
if (data.length === 0) {
|
|
1371
|
-
this._loop = false;
|
|
1372
1328
|
this.emit("conclude", 1005, EMPTY_BUFFER);
|
|
1373
1329
|
this.end();
|
|
1374
1330
|
} else {
|
|
1375
1331
|
const code = data.readUInt16BE(0);
|
|
1376
1332
|
if (!isValidStatusCode(code)) {
|
|
1377
|
-
|
|
1333
|
+
return error(
|
|
1378
1334
|
RangeError,
|
|
1379
1335
|
`invalid status code ${code}`,
|
|
1380
1336
|
true,
|
|
1381
1337
|
1002,
|
|
1382
1338
|
"WS_ERR_INVALID_CLOSE_CODE"
|
|
1383
1339
|
);
|
|
1384
|
-
cb(error);
|
|
1385
|
-
return;
|
|
1386
1340
|
}
|
|
1387
1341
|
const buf = new FastBuffer(
|
|
1388
1342
|
data.buffer,
|
|
@@ -1390,78 +1344,45 @@ var require_receiver = __commonJS({
|
|
|
1390
1344
|
data.length - 2
|
|
1391
1345
|
);
|
|
1392
1346
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
1393
|
-
|
|
1347
|
+
return error(
|
|
1394
1348
|
Error,
|
|
1395
1349
|
"invalid UTF-8 sequence",
|
|
1396
1350
|
true,
|
|
1397
1351
|
1007,
|
|
1398
1352
|
"WS_ERR_INVALID_UTF8"
|
|
1399
1353
|
);
|
|
1400
|
-
cb(error);
|
|
1401
|
-
return;
|
|
1402
1354
|
}
|
|
1403
|
-
this._loop = false;
|
|
1404
1355
|
this.emit("conclude", code, buf);
|
|
1405
1356
|
this.end();
|
|
1406
1357
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
}
|
|
1410
|
-
if (this._allowSynchronousEvents) {
|
|
1411
|
-
this.emit(this._opcode === 9 ? "ping" : "pong", data);
|
|
1412
|
-
this._state = GET_INFO;
|
|
1358
|
+
} else if (this._opcode === 9) {
|
|
1359
|
+
this.emit("ping", data);
|
|
1413
1360
|
} else {
|
|
1414
|
-
this.
|
|
1415
|
-
queueTask(() => {
|
|
1416
|
-
this.emit(this._opcode === 9 ? "ping" : "pong", data);
|
|
1417
|
-
this._state = GET_INFO;
|
|
1418
|
-
this.startLoop(cb);
|
|
1419
|
-
});
|
|
1361
|
+
this.emit("pong", data);
|
|
1420
1362
|
}
|
|
1421
|
-
|
|
1422
|
-
/**
|
|
1423
|
-
* Builds an error object.
|
|
1424
|
-
*
|
|
1425
|
-
* @param {function(new:Error|RangeError)} ErrorCtor The error constructor
|
|
1426
|
-
* @param {String} message The error message
|
|
1427
|
-
* @param {Boolean} prefix Specifies whether or not to add a default prefix to
|
|
1428
|
-
* `message`
|
|
1429
|
-
* @param {Number} statusCode The status code
|
|
1430
|
-
* @param {String} errorCode The exposed error code
|
|
1431
|
-
* @return {(Error|RangeError)} The error
|
|
1432
|
-
* @private
|
|
1433
|
-
*/
|
|
1434
|
-
createError(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
1435
|
-
this._loop = false;
|
|
1436
|
-
this._errored = true;
|
|
1437
|
-
const err = new ErrorCtor(
|
|
1438
|
-
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
1439
|
-
);
|
|
1440
|
-
Error.captureStackTrace(err, this.createError);
|
|
1441
|
-
err.code = errorCode;
|
|
1442
|
-
err[kStatusCode] = statusCode;
|
|
1443
|
-
return err;
|
|
1363
|
+
this._state = GET_INFO;
|
|
1444
1364
|
}
|
|
1445
1365
|
};
|
|
1446
1366
|
module.exports = Receiver2;
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1367
|
+
function error(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
1368
|
+
const err = new ErrorCtor(
|
|
1369
|
+
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
1370
|
+
);
|
|
1371
|
+
Error.captureStackTrace(err, error);
|
|
1372
|
+
err.code = errorCode;
|
|
1373
|
+
err[kStatusCode] = statusCode;
|
|
1374
|
+
return err;
|
|
1455
1375
|
}
|
|
1456
1376
|
}
|
|
1457
1377
|
});
|
|
1458
1378
|
|
|
1459
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
1379
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/sender.js
|
|
1460
1380
|
var require_sender = __commonJS({
|
|
1461
|
-
"../../node_modules/.pnpm/ws@8.
|
|
1381
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/sender.js"(exports, module) {
|
|
1462
1382
|
"use strict";
|
|
1463
1383
|
init_cjs_shims();
|
|
1464
|
-
var
|
|
1384
|
+
var net = __require("net");
|
|
1385
|
+
var tls = __require("tls");
|
|
1465
1386
|
var { randomFillSync } = __require("crypto");
|
|
1466
1387
|
var PerMessageDeflate = require_permessage_deflate();
|
|
1467
1388
|
var { EMPTY_BUFFER } = require_constants();
|
|
@@ -1473,7 +1394,7 @@ var require_sender = __commonJS({
|
|
|
1473
1394
|
/**
|
|
1474
1395
|
* Creates a Sender instance.
|
|
1475
1396
|
*
|
|
1476
|
-
* @param {
|
|
1397
|
+
* @param {(net.Socket|tls.Socket)} socket The connection socket
|
|
1477
1398
|
* @param {Object} [extensions] An object containing the negotiated extensions
|
|
1478
1399
|
* @param {Function} [generateMask] The function used to generate the masking
|
|
1479
1400
|
* key
|
|
@@ -1868,9 +1789,9 @@ var require_sender = __commonJS({
|
|
|
1868
1789
|
}
|
|
1869
1790
|
});
|
|
1870
1791
|
|
|
1871
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
1792
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/event-target.js
|
|
1872
1793
|
var require_event_target = __commonJS({
|
|
1873
|
-
"../../node_modules/.pnpm/ws@8.
|
|
1794
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/event-target.js"(exports, module) {
|
|
1874
1795
|
"use strict";
|
|
1875
1796
|
init_cjs_shims();
|
|
1876
1797
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
@@ -2098,9 +2019,9 @@ var require_event_target = __commonJS({
|
|
|
2098
2019
|
}
|
|
2099
2020
|
});
|
|
2100
2021
|
|
|
2101
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
2022
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/extension.js
|
|
2102
2023
|
var require_extension = __commonJS({
|
|
2103
|
-
"../../node_modules/.pnpm/ws@8.
|
|
2024
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/extension.js"(exports, module) {
|
|
2104
2025
|
"use strict";
|
|
2105
2026
|
init_cjs_shims();
|
|
2106
2027
|
var { tokenChars } = require_validation();
|
|
@@ -2269,9 +2190,9 @@ var require_extension = __commonJS({
|
|
|
2269
2190
|
}
|
|
2270
2191
|
});
|
|
2271
2192
|
|
|
2272
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
2193
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket.js
|
|
2273
2194
|
var require_websocket = __commonJS({
|
|
2274
|
-
"../../node_modules/.pnpm/ws@8.
|
|
2195
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket.js"(exports, module) {
|
|
2275
2196
|
"use strict";
|
|
2276
2197
|
init_cjs_shims();
|
|
2277
2198
|
var EventEmitter = __require("events");
|
|
@@ -2280,7 +2201,7 @@ var require_websocket = __commonJS({
|
|
|
2280
2201
|
var net = __require("net");
|
|
2281
2202
|
var tls = __require("tls");
|
|
2282
2203
|
var { randomBytes, createHash } = __require("crypto");
|
|
2283
|
-
var {
|
|
2204
|
+
var { Readable } = __require("stream");
|
|
2284
2205
|
var { URL } = __require("url");
|
|
2285
2206
|
var PerMessageDeflate = require_permessage_deflate();
|
|
2286
2207
|
var Receiver2 = require_receiver();
|
|
@@ -2344,7 +2265,6 @@ var require_websocket = __commonJS({
|
|
|
2344
2265
|
}
|
|
2345
2266
|
initAsClient(this, address, protocols, options);
|
|
2346
2267
|
} else {
|
|
2347
|
-
this._autoPong = options.autoPong;
|
|
2348
2268
|
this._isServer = true;
|
|
2349
2269
|
}
|
|
2350
2270
|
}
|
|
@@ -2434,12 +2354,10 @@ var require_websocket = __commonJS({
|
|
|
2434
2354
|
/**
|
|
2435
2355
|
* Set up the socket and the internal resources.
|
|
2436
2356
|
*
|
|
2437
|
-
* @param {
|
|
2357
|
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
|
2358
|
+
* server and client
|
|
2438
2359
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
2439
2360
|
* @param {Object} options Options object
|
|
2440
|
-
* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
|
|
2441
|
-
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
2442
|
-
* multiple times in the same tick
|
|
2443
2361
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
2444
2362
|
* masking key
|
|
2445
2363
|
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
@@ -2449,7 +2367,6 @@ var require_websocket = __commonJS({
|
|
|
2449
2367
|
*/
|
|
2450
2368
|
setSocket(socket, head, options) {
|
|
2451
2369
|
const receiver = new Receiver2({
|
|
2452
|
-
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
2453
2370
|
binaryType: this.binaryType,
|
|
2454
2371
|
extensions: this._extensions,
|
|
2455
2372
|
isServer: this._isServer,
|
|
@@ -2467,10 +2384,8 @@ var require_websocket = __commonJS({
|
|
|
2467
2384
|
receiver.on("message", receiverOnMessage);
|
|
2468
2385
|
receiver.on("ping", receiverOnPing);
|
|
2469
2386
|
receiver.on("pong", receiverOnPong);
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
if (socket.setNoDelay)
|
|
2473
|
-
socket.setNoDelay();
|
|
2387
|
+
socket.setTimeout(0);
|
|
2388
|
+
socket.setNoDelay();
|
|
2474
2389
|
if (head.length > 0)
|
|
2475
2390
|
socket.unshift(head);
|
|
2476
2391
|
socket.on("close", socketOnClose);
|
|
@@ -2762,8 +2677,6 @@ var require_websocket = __commonJS({
|
|
|
2762
2677
|
module.exports = WebSocket2;
|
|
2763
2678
|
function initAsClient(websocket, address, protocols, options) {
|
|
2764
2679
|
const opts = {
|
|
2765
|
-
allowSynchronousEvents: false,
|
|
2766
|
-
autoPong: true,
|
|
2767
2680
|
protocolVersion: protocolVersions[1],
|
|
2768
2681
|
maxPayload: 100 * 1024 * 1024,
|
|
2769
2682
|
skipUTF8Validation: false,
|
|
@@ -2781,7 +2694,6 @@ var require_websocket = __commonJS({
|
|
|
2781
2694
|
path: void 0,
|
|
2782
2695
|
port: void 0
|
|
2783
2696
|
};
|
|
2784
|
-
websocket._autoPong = opts.autoPong;
|
|
2785
2697
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
2786
2698
|
throw new RangeError(
|
|
2787
2699
|
`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
|
|
@@ -2790,24 +2702,20 @@ var require_websocket = __commonJS({
|
|
|
2790
2702
|
let parsedUrl;
|
|
2791
2703
|
if (address instanceof URL) {
|
|
2792
2704
|
parsedUrl = address;
|
|
2705
|
+
websocket._url = address.href;
|
|
2793
2706
|
} else {
|
|
2794
2707
|
try {
|
|
2795
2708
|
parsedUrl = new URL(address);
|
|
2796
2709
|
} catch (e) {
|
|
2797
2710
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
2798
2711
|
}
|
|
2712
|
+
websocket._url = address;
|
|
2799
2713
|
}
|
|
2800
|
-
if (parsedUrl.protocol === "http:") {
|
|
2801
|
-
parsedUrl.protocol = "ws:";
|
|
2802
|
-
} else if (parsedUrl.protocol === "https:") {
|
|
2803
|
-
parsedUrl.protocol = "wss:";
|
|
2804
|
-
}
|
|
2805
|
-
websocket._url = parsedUrl.href;
|
|
2806
2714
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
2807
2715
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
2808
2716
|
let invalidUrlMessage;
|
|
2809
2717
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
2810
|
-
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:",
|
|
2718
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`;
|
|
2811
2719
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
2812
2720
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
2813
2721
|
} else if (parsedUrl.hash) {
|
|
@@ -3008,7 +2916,6 @@ var require_websocket = __commonJS({
|
|
|
3008
2916
|
websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
|
|
3009
2917
|
}
|
|
3010
2918
|
websocket.setSocket(socket, head, {
|
|
3011
|
-
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
3012
2919
|
generateMask: opts.generateMask,
|
|
3013
2920
|
maxPayload: opts.maxPayload,
|
|
3014
2921
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
@@ -3104,8 +3011,7 @@ var require_websocket = __commonJS({
|
|
|
3104
3011
|
}
|
|
3105
3012
|
function receiverOnPing(data) {
|
|
3106
3013
|
const websocket = this[kWebSocket];
|
|
3107
|
-
|
|
3108
|
-
websocket.pong(data, !this._isServer, NOOP);
|
|
3014
|
+
websocket.pong(data, !websocket._isServer, NOOP);
|
|
3109
3015
|
websocket.emit("ping", data);
|
|
3110
3016
|
}
|
|
3111
3017
|
function receiverOnPong(data) {
|
|
@@ -3157,9 +3063,9 @@ var require_websocket = __commonJS({
|
|
|
3157
3063
|
}
|
|
3158
3064
|
});
|
|
3159
3065
|
|
|
3160
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3066
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/subprotocol.js
|
|
3161
3067
|
var require_subprotocol = __commonJS({
|
|
3162
|
-
"../../node_modules/.pnpm/ws@8.
|
|
3068
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/subprotocol.js"(exports, module) {
|
|
3163
3069
|
"use strict";
|
|
3164
3070
|
init_cjs_shims();
|
|
3165
3071
|
var { tokenChars } = require_validation();
|
|
@@ -3206,14 +3112,16 @@ var require_subprotocol = __commonJS({
|
|
|
3206
3112
|
}
|
|
3207
3113
|
});
|
|
3208
3114
|
|
|
3209
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3115
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket-server.js
|
|
3210
3116
|
var require_websocket_server = __commonJS({
|
|
3211
|
-
"../../node_modules/.pnpm/ws@8.
|
|
3117
|
+
"../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket-server.js"(exports, module) {
|
|
3212
3118
|
"use strict";
|
|
3213
3119
|
init_cjs_shims();
|
|
3214
3120
|
var EventEmitter = __require("events");
|
|
3215
3121
|
var http = __require("http");
|
|
3216
|
-
var
|
|
3122
|
+
var https = __require("https");
|
|
3123
|
+
var net = __require("net");
|
|
3124
|
+
var tls = __require("tls");
|
|
3217
3125
|
var { createHash } = __require("crypto");
|
|
3218
3126
|
var extension = require_extension();
|
|
3219
3127
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3229,11 +3137,6 @@ var require_websocket_server = __commonJS({
|
|
|
3229
3137
|
* Create a `WebSocketServer` instance.
|
|
3230
3138
|
*
|
|
3231
3139
|
* @param {Object} options Configuration options
|
|
3232
|
-
* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
|
|
3233
|
-
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
3234
|
-
* multiple times in the same tick
|
|
3235
|
-
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
3236
|
-
* automatically send a pong in response to a ping
|
|
3237
3140
|
* @param {Number} [options.backlog=511] The maximum length of the queue of
|
|
3238
3141
|
* pending connections
|
|
3239
3142
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
@@ -3259,8 +3162,6 @@ var require_websocket_server = __commonJS({
|
|
|
3259
3162
|
constructor(options, callback) {
|
|
3260
3163
|
super();
|
|
3261
3164
|
options = {
|
|
3262
|
-
allowSynchronousEvents: false,
|
|
3263
|
-
autoPong: true,
|
|
3264
3165
|
maxPayload: 100 * 1024 * 1024,
|
|
3265
3166
|
skipUTF8Validation: false,
|
|
3266
3167
|
perMessageDeflate: false,
|
|
@@ -3401,7 +3302,8 @@ var require_websocket_server = __commonJS({
|
|
|
3401
3302
|
* Handle a HTTP Upgrade request.
|
|
3402
3303
|
*
|
|
3403
3304
|
* @param {http.IncomingMessage} req The request object
|
|
3404
|
-
* @param {
|
|
3305
|
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
|
3306
|
+
* server and client
|
|
3405
3307
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
3406
3308
|
* @param {Function} cb Callback
|
|
3407
3309
|
* @public
|
|
@@ -3500,7 +3402,8 @@ var require_websocket_server = __commonJS({
|
|
|
3500
3402
|
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
|
3501
3403
|
* @param {Set} protocols The subprotocols
|
|
3502
3404
|
* @param {http.IncomingMessage} req The request object
|
|
3503
|
-
* @param {
|
|
3405
|
+
* @param {(net.Socket|tls.Socket)} socket The network socket between the
|
|
3406
|
+
* server and client
|
|
3504
3407
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
3505
3408
|
* @param {Function} cb Callback
|
|
3506
3409
|
* @throws {Error} If called more than once with the same socket
|
|
@@ -3523,7 +3426,7 @@ var require_websocket_server = __commonJS({
|
|
|
3523
3426
|
"Connection: Upgrade",
|
|
3524
3427
|
`Sec-WebSocket-Accept: ${digest}`
|
|
3525
3428
|
];
|
|
3526
|
-
const ws = new this.options.WebSocket(null
|
|
3429
|
+
const ws = new this.options.WebSocket(null);
|
|
3527
3430
|
if (protocols.size) {
|
|
3528
3431
|
const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
|
|
3529
3432
|
if (protocol) {
|
|
@@ -3543,7 +3446,6 @@ var require_websocket_server = __commonJS({
|
|
|
3543
3446
|
socket.write(headers.concat("\r\n").join("\r\n"));
|
|
3544
3447
|
socket.removeListener("error", socketOnError);
|
|
3545
3448
|
ws.setSocket(socket, head, {
|
|
3546
|
-
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
3547
3449
|
maxPayload: this.options.maxPayload,
|
|
3548
3450
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
3549
3451
|
});
|
|
@@ -3608,7 +3510,7 @@ init_cjs_shims();
|
|
|
3608
3510
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/devtools-window-polyfill.js
|
|
3609
3511
|
init_cjs_shims();
|
|
3610
3512
|
|
|
3611
|
-
// ../../node_modules/.pnpm/ws@8.
|
|
3513
|
+
// ../../node_modules/.pnpm/ws@8.13.0/node_modules/ws/wrapper.mjs
|
|
3612
3514
|
init_cjs_shims();
|
|
3613
3515
|
var import_stream = __toESM(require_stream(), 1);
|
|
3614
3516
|
var import_receiver = __toESM(require_receiver(), 1);
|