@sentry/mcp-server 0.10.0 → 0.11.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/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +40 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +35 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/{client-J6VSRmQS.d.ts → client-Bxf4MxOz.d.cts} +7 -5
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-Bz_PNC8o.js → client-D5xFZtxK.js} +14 -5
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-tE6FD__9.d.cts → client-DOhBiaMJ.d.ts} +6 -4
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-B4Ux5Zdg.cjs → client-GKHZSXgV.cjs} +14 -6
- package/dist/client-GKHZSXgV.cjs.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-ggD6YRYR.js → formatting-BaARL2gT.js} +1 -1
- package/dist/{formatting-ggD6YRYR.js.map → formatting-BaARL2gT.js.map} +1 -1
- package/dist/{formatting-B0SJqiqX.cjs → formatting-C2kN0ok6.cjs} +1 -2
- package/dist/{formatting-B0SJqiqX.cjs.map → formatting-C2kN0ok6.cjs.map} +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +4 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +2 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +2 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +21 -25
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +5 -8
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
- package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
- package/dist/issue-helpers-CSNNO03f.js.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +1 -2
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +1 -2
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-pHRpPOpJ.cjs → promptDefinitions-D3ll3qCd.cjs} +3 -4
- package/dist/{promptDefinitions-pHRpPOpJ.cjs.map → promptDefinitions-D3ll3qCd.cjs.map} +1 -1
- package/dist/{promptDefinitions-BR7PxWcH.d.cts → promptDefinitions-DMucOchd.d.cts} +3 -3
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-tpKruPny.d.ts → promptDefinitions-H0q1_X-K.d.ts} +4 -4
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-DBNOeSg-.js → promptDefinitions-aKmUZWWO.js} +2 -2
- package/dist/{promptDefinitions-DBNOeSg-.js.map → promptDefinitions-aKmUZWWO.js.map} +1 -1
- package/dist/promptDefinitions.cjs +3 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
- package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
- package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
- package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +4 -5
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +4 -5
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
- package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
- package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
- package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +0 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/{schema-jk88gqOu.cjs → schema-B8lT632E.cjs} +2 -3
- package/dist/{schema-jk88gqOu.cjs.map → schema-B8lT632E.cjs.map} +1 -1
- package/dist/{schema-BKa41TQ4.js → schema-BkHf97d7.js} +1 -1
- package/dist/{schema-BKa41TQ4.js.map → schema-BkHf97d7.js.map} +1 -1
- package/dist/{schema-PvgLrC1b.d.cts → schema-C-MLkWMc.d.ts} +59 -24
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-Dltbjui7.js → schema-CewAKS9A.js} +11 -2
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-3VLYcf4D.cjs → schema-DkyWSqp_.cjs} +23 -3
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-B7A-FyIi.d.ts → schema-DqxkW9Tx.d.cts} +59 -24
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -11
- package/dist/schema.d.cts +1 -2
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +1 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/{server-VwFSUPQn.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-yb4PkNyo.js → server-qpWdf-ST.js} +32 -25
- package/dist/server-qpWdf-ST.js.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +4 -5
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +4 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/{stdio-DkU2-spy.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-DkU2-spy.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-65sYKLOk.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-65sYKLOk.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +233 -181
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +233 -181
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-Bb_1ejkl.js → toolDefinitions-BSC2D_S-.js} +14 -3
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-DIhvw3vk.cjs → toolDefinitions-BtHN8t_d.cjs} +15 -5
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-q_1-70fG.d.ts → toolDefinitions-Dp13BpEu.d.cts} +37 -5
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-B94CNDbt.d.cts → toolDefinitions-fQrpWznJ.d.ts} +36 -4
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-CMFpMPpD.js → tools-4Rtn4WEf.js} +27 -10
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BdkmyaZo.cjs → tools-DHHqAqP9.cjs} +28 -12
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +35 -6
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +35 -6
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +47 -32
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +28 -12
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +4 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +4 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-OeoNXRm-.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-CN4NEway.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-jftb-CP9.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-B03G337q.d.cts → types-DuUmV9zh.d.ts} +5 -5
- package/dist/types-DuUmV9zh.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/version-BT9r_3jm.js +6 -0
- package/dist/{version-TjO7fHpC.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-CDnh7DyW.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-CDnh7DyW.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-B4Ux5Zdg.cjs.map +0 -1
- package/dist/client-Bz_PNC8o.js.map +0 -1
- package/dist/client-J6VSRmQS.d.ts.map +0 -1
- package/dist/client-tE6FD__9.d.cts.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/promptDefinitions-BR7PxWcH.d.cts.map +0 -1
- package/dist/promptDefinitions-tpKruPny.d.ts.map +0 -1
- package/dist/schema-3VLYcf4D.cjs.map +0 -1
- package/dist/schema-B7A-FyIi.d.ts.map +0 -1
- package/dist/schema-Dltbjui7.js.map +0 -1
- package/dist/schema-PvgLrC1b.d.cts.map +0 -1
- package/dist/server-VwFSUPQn.cjs.map +0 -1
- package/dist/server-yb4PkNyo.js.map +0 -1
- package/dist/toolDefinitions-B94CNDbt.d.cts.map +0 -1
- package/dist/toolDefinitions-Bb_1ejkl.js.map +0 -1
- package/dist/toolDefinitions-DIhvw3vk.cjs.map +0 -1
- package/dist/toolDefinitions-q_1-70fG.d.ts.map +0 -1
- package/dist/tools-BdkmyaZo.cjs.map +0 -1
- package/dist/tools-CMFpMPpD.js.map +0 -1
- package/dist/types-B03G337q.d.cts.map +0 -1
- package/dist/types-CN4NEway.d.ts.map +0 -1
- package/dist/types-OeoNXRm-.d.cts.map +0 -1
- package/dist/types-jftb-CP9.d.ts.map +0 -1
- package/dist/version-TjO7fHpC.js +0 -6
- package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
- package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
- /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
- /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
- /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
package/dist/test-setup.cjs
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
2
|
const node_async_hooks = require_chunk.__toESM(require("node:async_hooks"));
|
|
3
3
|
const http = require_chunk.__toESM(require("http"));
|
|
4
|
+
const stream = require_chunk.__toESM(require("stream"));
|
|
4
5
|
const https = require_chunk.__toESM(require("https"));
|
|
5
6
|
const net = require_chunk.__toESM(require("net"));
|
|
6
7
|
const _http_common = require_chunk.__toESM(require("_http_common"));
|
|
7
|
-
const stream = require_chunk.__toESM(require("stream"));
|
|
8
8
|
const url = require_chunk.__toESM(require("url"));
|
|
9
9
|
const zlib = require_chunk.__toESM(require("zlib"));
|
|
10
10
|
|
|
11
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-3GJB4JDF.mjs
|
|
12
|
+
var kRawRequest = Symbol("kRawRequest");
|
|
13
|
+
function setRawRequest(request, rawRequest) {
|
|
14
|
+
Reflect.set(request, kRawRequest, rawRequest);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
11
18
|
//#region ../../node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.mjs
|
|
12
19
|
var POSITIONALS_EXP = /(%?)(%([sdijo]))/g;
|
|
13
20
|
function serializePositional(positional, flag) {
|
|
@@ -27,14 +34,14 @@ function serializePositional(positional, flag) {
|
|
|
27
34
|
function format(message$3, ...positionals) {
|
|
28
35
|
if (positionals.length === 0) return message$3;
|
|
29
36
|
let positionalIndex = 0;
|
|
30
|
-
let formattedMessage = message$3.replace(POSITIONALS_EXP, (match$
|
|
37
|
+
let formattedMessage = message$3.replace(POSITIONALS_EXP, (match$2, isEscaped, _, flag) => {
|
|
31
38
|
const positional = positionals[positionalIndex];
|
|
32
39
|
const value = serializePositional(positional, flag);
|
|
33
40
|
if (!isEscaped) {
|
|
34
41
|
positionalIndex++;
|
|
35
42
|
return value;
|
|
36
43
|
}
|
|
37
|
-
return match$
|
|
44
|
+
return match$2;
|
|
38
45
|
});
|
|
39
46
|
if (positionalIndex < positionals.length) formattedMessage += ` ${positionals.slice(positionalIndex).join(" ")}`;
|
|
40
47
|
formattedMessage = formattedMessage.replace(/%{2,2}/g, "%");
|
|
@@ -72,6 +79,13 @@ invariant.as = (ErrorConstructor, predicate, message$3, ...positionals) => {
|
|
|
72
79
|
}
|
|
73
80
|
};
|
|
74
81
|
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-TJDMZZXE.mjs
|
|
84
|
+
var kRawRequestBodyStream = Symbol("kRawRequestBodyStream");
|
|
85
|
+
function setRawRequestBodyStream(request, stream$1) {
|
|
86
|
+
Reflect.set(request, kRawRequestBodyStream, stream$1);
|
|
87
|
+
}
|
|
88
|
+
|
|
75
89
|
//#endregion
|
|
76
90
|
//#region ../../node_modules/.pnpm/@open-draft+deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.mjs
|
|
77
91
|
function createDeferredExecutor() {
|
|
@@ -159,7 +173,7 @@ var until = async (promise) => {
|
|
|
159
173
|
};
|
|
160
174
|
|
|
161
175
|
//#endregion
|
|
162
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
176
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-LGXJ3UUF.mjs
|
|
163
177
|
var InterceptorError = class extends Error {
|
|
164
178
|
constructor(message$3) {
|
|
165
179
|
super(message$3);
|
|
@@ -188,15 +202,17 @@ var RequestController = class {
|
|
|
188
202
|
this[kResponsePromise].resolve(response);
|
|
189
203
|
}
|
|
190
204
|
/**
|
|
191
|
-
* Error this request with the given
|
|
205
|
+
* Error this request with the given reason.
|
|
206
|
+
*
|
|
192
207
|
* @example
|
|
193
208
|
* controller.errorWith()
|
|
194
209
|
* controller.errorWith(new Error('Oops!'))
|
|
210
|
+
* controller.errorWith({ message: 'Oops!'})
|
|
195
211
|
*/
|
|
196
|
-
errorWith(
|
|
212
|
+
errorWith(reason) {
|
|
197
213
|
invariant.as(InterceptorError, !this[kRequestHandled], "Failed to error the \"%s %s\" request: the \"request\" event has already been handled.", this.request.method, this.request.url);
|
|
198
214
|
this[kRequestHandled] = true;
|
|
199
|
-
this[kResponsePromise].resolve(
|
|
215
|
+
this[kResponsePromise].resolve(reason);
|
|
200
216
|
}
|
|
201
217
|
};
|
|
202
218
|
async function emitAsync(emitter, eventName, ...data) {
|
|
@@ -204,6 +220,9 @@ async function emitAsync(emitter, eventName, ...data) {
|
|
|
204
220
|
if (listners.length === 0) return;
|
|
205
221
|
for (const listener of listners) await listener.apply(emitter, data);
|
|
206
222
|
}
|
|
223
|
+
function isObject$1(value, loose = false) {
|
|
224
|
+
return loose ? Object.prototype.toString.call(value).startsWith("[object ") : Object.prototype.toString.call(value) === "[object Object]";
|
|
225
|
+
}
|
|
207
226
|
function isPropertyAccessible(obj, key) {
|
|
208
227
|
try {
|
|
209
228
|
obj[key];
|
|
@@ -224,7 +243,10 @@ function createServerErrorResponse(body) {
|
|
|
224
243
|
});
|
|
225
244
|
}
|
|
226
245
|
function isResponseError(response) {
|
|
227
|
-
return isPropertyAccessible(response, "type") && response.type === "error";
|
|
246
|
+
return response != null && response instanceof Response && isPropertyAccessible(response, "type") && response.type === "error";
|
|
247
|
+
}
|
|
248
|
+
function isResponseLike(value) {
|
|
249
|
+
return isObject$1(value, true) && isPropertyAccessible(value, "status") && isPropertyAccessible(value, "statusText") && isPropertyAccessible(value, "bodyUsed");
|
|
228
250
|
}
|
|
229
251
|
function isNodeLikeError(error$2) {
|
|
230
252
|
if (error$2 == null) return false;
|
|
@@ -233,10 +255,23 @@ function isNodeLikeError(error$2) {
|
|
|
233
255
|
}
|
|
234
256
|
async function handleRequest$1(options) {
|
|
235
257
|
const handleResponse = async (response) => {
|
|
236
|
-
if (response instanceof Error)
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
258
|
+
if (response instanceof Error) {
|
|
259
|
+
options.onError(response);
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
if (isResponseError(response)) {
|
|
263
|
+
options.onRequestError(response);
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
if (isResponseLike(response)) {
|
|
267
|
+
await options.onResponse(response);
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
if (isObject$1(response)) {
|
|
271
|
+
options.onError(response);
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
return false;
|
|
240
275
|
};
|
|
241
276
|
const handleResponseError = async (error$2) => {
|
|
242
277
|
if (error$2 instanceof InterceptorError) throw result.error;
|
|
@@ -257,18 +292,17 @@ async function handleRequest$1(options) {
|
|
|
257
292
|
requestAbortPromise.reject(options.request.signal.reason);
|
|
258
293
|
}, { once: true });
|
|
259
294
|
const result = await until(async () => {
|
|
260
|
-
const
|
|
295
|
+
const requestListenersPromise = emitAsync(options.emitter, "request", {
|
|
261
296
|
requestId: options.requestId,
|
|
262
297
|
request: options.request,
|
|
263
298
|
controller: options.controller
|
|
264
299
|
});
|
|
265
300
|
await Promise.race([
|
|
266
301
|
requestAbortPromise,
|
|
267
|
-
|
|
302
|
+
requestListenersPromise,
|
|
268
303
|
options.controller[kResponsePromise]
|
|
269
304
|
]);
|
|
270
|
-
|
|
271
|
-
return mockedResponse;
|
|
305
|
+
return await options.controller[kResponsePromise];
|
|
272
306
|
});
|
|
273
307
|
if (requestAbortPromise.state === "rejected") {
|
|
274
308
|
options.onError(requestAbortPromise.rejectionReason);
|
|
@@ -696,7 +730,7 @@ var Emitter = _Emitter;
|
|
|
696
730
|
Emitter.defaultMaxListeners = 10;
|
|
697
731
|
|
|
698
732
|
//#endregion
|
|
699
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
733
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-IHJSPMYM.mjs
|
|
700
734
|
var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
|
|
701
735
|
function getGlobalSymbol$1(symbol) {
|
|
702
736
|
return globalThis[symbol] || void 0;
|
|
@@ -845,6 +879,22 @@ var Interceptor$1 = class {
|
|
|
845
879
|
function createRequestId$1() {
|
|
846
880
|
return Math.random().toString(16).slice(2);
|
|
847
881
|
}
|
|
882
|
+
function canParseUrl(url$1) {
|
|
883
|
+
try {
|
|
884
|
+
new URL(url$1);
|
|
885
|
+
return true;
|
|
886
|
+
} catch (_error) {
|
|
887
|
+
return false;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
function getValueBySymbol(symbolName, source) {
|
|
891
|
+
const ownSymbols = Object.getOwnPropertySymbols(source);
|
|
892
|
+
const symbol = ownSymbols.find((symbol2) => {
|
|
893
|
+
return symbol2.description === symbolName;
|
|
894
|
+
});
|
|
895
|
+
if (symbol) return Reflect.get(source, symbol);
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
848
898
|
var _FetchResponse = class extends Response {
|
|
849
899
|
static isConfigurableStatusCode(status$1) {
|
|
850
900
|
return status$1 >= 200 && status$1 <= 599;
|
|
@@ -860,9 +910,10 @@ var _FetchResponse = class extends Response {
|
|
|
860
910
|
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status$1);
|
|
861
911
|
}
|
|
862
912
|
static setUrl(url$1, response) {
|
|
863
|
-
if (!url$1) return;
|
|
864
|
-
|
|
865
|
-
|
|
913
|
+
if (!url$1 || url$1 === "about:" || !canParseUrl(url$1)) return;
|
|
914
|
+
const state = getValueBySymbol("state", response);
|
|
915
|
+
if (state) state.urlList.push(new URL(url$1));
|
|
916
|
+
else Object.defineProperty(response, "url", {
|
|
866
917
|
value: url$1,
|
|
867
918
|
enumerable: true,
|
|
868
919
|
configurable: true,
|
|
@@ -883,15 +934,14 @@ var _FetchResponse = class extends Response {
|
|
|
883
934
|
const safeStatus = _FetchResponse.isConfigurableStatusCode(status$1) ? status$1 : 200;
|
|
884
935
|
const finalBody = _FetchResponse.isResponseWithBody(status$1) ? body : null;
|
|
885
936
|
super(finalBody, {
|
|
886
|
-
|
|
887
|
-
|
|
937
|
+
status: safeStatus,
|
|
938
|
+
statusText: init.statusText,
|
|
939
|
+
headers: init.headers
|
|
888
940
|
});
|
|
889
941
|
if (status$1 !== safeStatus) {
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
|
|
893
|
-
Reflect.set(state, "status", status$1);
|
|
894
|
-
} else Object.defineProperty(this, "status", {
|
|
942
|
+
const state = getValueBySymbol("state", this);
|
|
943
|
+
if (state) state.status = status$1;
|
|
944
|
+
else Object.defineProperty(this, "status", {
|
|
895
945
|
value: status$1,
|
|
896
946
|
enumerable: true,
|
|
897
947
|
configurable: true,
|
|
@@ -922,7 +972,7 @@ FetchResponse.STATUS_CODES_WITH_REDIRECT = [
|
|
|
922
972
|
];
|
|
923
973
|
|
|
924
974
|
//#endregion
|
|
925
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
975
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-GLGFOTGJ.mjs
|
|
926
976
|
function normalizeSocketWriteArgs(args) {
|
|
927
977
|
const normalized = [
|
|
928
978
|
args[0],
|
|
@@ -1117,7 +1167,7 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1117
1167
|
url$1.username = "";
|
|
1118
1168
|
url$1.password = "";
|
|
1119
1169
|
}
|
|
1120
|
-
|
|
1170
|
+
this.requestStream = new stream.Readable({ read: () => {
|
|
1121
1171
|
this.flushWriteBuffer();
|
|
1122
1172
|
} });
|
|
1123
1173
|
const requestId = createRequestId$1();
|
|
@@ -1129,6 +1179,8 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1129
1179
|
body: canHaveBody ? stream.Readable.toWeb(this.requestStream) : null
|
|
1130
1180
|
});
|
|
1131
1181
|
Reflect.set(this.request, kRequestId, requestId);
|
|
1182
|
+
setRawRequest(this.request, Reflect.get(this, "_httpMessage"));
|
|
1183
|
+
setRawRequestBodyStream(this.request, this.requestStream);
|
|
1132
1184
|
if (this.request.headers.has(INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
|
1133
1185
|
this.passthrough();
|
|
1134
1186
|
return;
|
|
@@ -1156,8 +1208,9 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1156
1208
|
statusText,
|
|
1157
1209
|
headers
|
|
1158
1210
|
}
|
|
1159
|
-
);
|
|
1211
|
+
);
|
|
1160
1212
|
invariant(this.request, "Failed to handle a response: request does not exist");
|
|
1213
|
+
FetchResponse.setUrl(this.request.url, response);
|
|
1161
1214
|
if (this.request.headers.has(INTERNAL_REQUEST_ID_HEADER_NAME)) return;
|
|
1162
1215
|
this.responseListenersPromise = this.onResponse({
|
|
1163
1216
|
response,
|
|
@@ -1213,6 +1266,11 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1213
1266
|
if (this.destroyed) return;
|
|
1214
1267
|
const socket = this.createConnection();
|
|
1215
1268
|
this.originalSocket = socket;
|
|
1269
|
+
if ("_handle" in socket) Object.defineProperty(this, "_handle", {
|
|
1270
|
+
value: socket._handle,
|
|
1271
|
+
enumerable: true,
|
|
1272
|
+
writable: true
|
|
1273
|
+
});
|
|
1216
1274
|
this.once("error", (error$2) => {
|
|
1217
1275
|
socket.destroy(error$2);
|
|
1218
1276
|
});
|
|
@@ -1495,9 +1553,6 @@ function cloneObject(obj) {
|
|
|
1495
1553
|
}, {});
|
|
1496
1554
|
return isPlainObject(obj) ? enumerableProperties : Object.assign(Object.getPrototypeOf(obj), enumerableProperties);
|
|
1497
1555
|
}
|
|
1498
|
-
function isObject$1(value, loose = false) {
|
|
1499
|
-
return loose ? Object.prototype.toString.call(value).startsWith("[object ") : Object.prototype.toString.call(value) === "[object Object]";
|
|
1500
|
-
}
|
|
1501
1556
|
var logger3 = new Logger("http normalizeClientRequestArgs");
|
|
1502
1557
|
function resolveRequestOptions(args, url$1) {
|
|
1503
1558
|
if (typeof args[1] === "undefined" || typeof args[1] === "function") {
|
|
@@ -1640,10 +1695,25 @@ var _ClientRequestInterceptor = class extends Interceptor$1 {
|
|
|
1640
1695
|
};
|
|
1641
1696
|
}
|
|
1642
1697
|
setup() {
|
|
1643
|
-
const { get: originalGet, request: originalRequest } = http.default;
|
|
1698
|
+
const { ClientRequest: OriginalClientRequest, get: originalGet, request: originalRequest } = http.default;
|
|
1644
1699
|
const { get: originalHttpsGet, request: originalHttpsRequest } = https.default;
|
|
1645
1700
|
const onRequest = this.onRequest.bind(this);
|
|
1646
1701
|
const onResponse = this.onResponse.bind(this);
|
|
1702
|
+
http.default.ClientRequest = new Proxy(http.default.ClientRequest, { construct: (target, args) => {
|
|
1703
|
+
const [url$1, options, callback] = normalizeClientRequestArgs("http:", args);
|
|
1704
|
+
const Agent2 = options.protocol === "https:" ? MockHttpsAgent : MockAgent;
|
|
1705
|
+
const mockAgent = new Agent2({
|
|
1706
|
+
customAgent: options.agent,
|
|
1707
|
+
onRequest,
|
|
1708
|
+
onResponse
|
|
1709
|
+
});
|
|
1710
|
+
options.agent = mockAgent;
|
|
1711
|
+
return Reflect.construct(target, [
|
|
1712
|
+
url$1,
|
|
1713
|
+
options,
|
|
1714
|
+
callback
|
|
1715
|
+
]);
|
|
1716
|
+
} });
|
|
1647
1717
|
http.default.request = new Proxy(http.default.request, { apply: (target, thisArg, args) => {
|
|
1648
1718
|
const [url$1, options, callback] = normalizeClientRequestArgs("http:", args);
|
|
1649
1719
|
const mockAgent = new MockAgent({
|
|
@@ -1702,6 +1772,7 @@ var _ClientRequestInterceptor = class extends Interceptor$1 {
|
|
|
1702
1772
|
} });
|
|
1703
1773
|
recordRawFetchHeaders();
|
|
1704
1774
|
this.subscriptions.push(() => {
|
|
1775
|
+
http.default.ClientRequest = OriginalClientRequest;
|
|
1705
1776
|
http.default.get = originalGet;
|
|
1706
1777
|
http.default.request = originalRequest;
|
|
1707
1778
|
https.default.get = originalHttpsGet;
|
|
@@ -1714,7 +1785,7 @@ var ClientRequestInterceptor = _ClientRequestInterceptor;
|
|
|
1714
1785
|
ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
|
1715
1786
|
|
|
1716
1787
|
//#endregion
|
|
1717
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1788
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.mjs
|
|
1718
1789
|
var encoder = new TextEncoder();
|
|
1719
1790
|
function encodeBuffer(text) {
|
|
1720
1791
|
return encoder.encode(text);
|
|
@@ -1728,7 +1799,7 @@ function toArrayBuffer(array) {
|
|
|
1728
1799
|
}
|
|
1729
1800
|
|
|
1730
1801
|
//#endregion
|
|
1731
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1802
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.mjs
|
|
1732
1803
|
function hasConfigurableGlobal$1(propertyName) {
|
|
1733
1804
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
|
|
1734
1805
|
if (typeof descriptor === "undefined") return false;
|
|
@@ -1742,11 +1813,11 @@ function hasConfigurableGlobal$1(propertyName) {
|
|
|
1742
1813
|
}
|
|
1743
1814
|
|
|
1744
1815
|
//#endregion
|
|
1745
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1816
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.mjs
|
|
1746
1817
|
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
|
1747
1818
|
|
|
1748
1819
|
//#endregion
|
|
1749
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1820
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-EADPZWWI.mjs
|
|
1750
1821
|
function concatArrayBuffer(left, right) {
|
|
1751
1822
|
const result = new Uint8Array(left.byteLength + right.byteLength);
|
|
1752
1823
|
result.set(left, 0);
|
|
@@ -1983,7 +2054,7 @@ var XMLHttpRequestController = class {
|
|
|
1983
2054
|
* @see https://xhr.spec.whatwg.org/#the-response-attribute
|
|
1984
2055
|
*/
|
|
1985
2056
|
this.request.response
|
|
1986
|
-
);
|
|
2057
|
+
);
|
|
1987
2058
|
this.onResponse.call(this, {
|
|
1988
2059
|
response: fetchResponse,
|
|
1989
2060
|
isMockedResponse: this[kIsRequestHandled],
|
|
@@ -2281,6 +2352,7 @@ var XMLHttpRequestController = class {
|
|
|
2281
2352
|
return invoke();
|
|
2282
2353
|
} });
|
|
2283
2354
|
define(fetchRequest, "headers", proxyHeaders);
|
|
2355
|
+
setRawRequest(fetchRequest, this.request);
|
|
2284
2356
|
this.logger.info("converted request to a Fetch API Request!", fetchRequest);
|
|
2285
2357
|
return fetchRequest;
|
|
2286
2358
|
}
|
|
@@ -2371,15 +2443,7 @@ var XMLHttpRequestInterceptor = _XMLHttpRequestInterceptor;
|
|
|
2371
2443
|
XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
|
2372
2444
|
|
|
2373
2445
|
//#endregion
|
|
2374
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2375
|
-
function canParseUrl(url$1) {
|
|
2376
|
-
try {
|
|
2377
|
-
new URL(url$1);
|
|
2378
|
-
return true;
|
|
2379
|
-
} catch (_error) {
|
|
2380
|
-
return false;
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2446
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-GL6JCI7E.mjs
|
|
2383
2447
|
function createNetworkError(cause) {
|
|
2384
2448
|
return Object.assign(new TypeError("Failed to fetch"), { cause });
|
|
2385
2449
|
}
|
|
@@ -2493,8 +2557,9 @@ var _FetchInterceptor = class extends Interceptor$1 {
|
|
|
2493
2557
|
invariant(!pureFetch[IS_PATCHED_MODULE], "Failed to patch the \"fetch\" module: already patched.");
|
|
2494
2558
|
globalThis.fetch = async (input, init) => {
|
|
2495
2559
|
const requestId = createRequestId$1();
|
|
2496
|
-
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !canParseUrl(input) ? new URL(input, location.
|
|
2560
|
+
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !canParseUrl(input) ? new URL(input, location.href) : input;
|
|
2497
2561
|
const request = new Request(resolvedInput, init);
|
|
2562
|
+
if (input instanceof Request) setRawRequest(request, input);
|
|
2498
2563
|
const responsePromise = new DeferredPromise();
|
|
2499
2564
|
const controller = new RequestController(request);
|
|
2500
2565
|
this.logger.info("[%s] %s", request.method, request.url);
|
|
@@ -2549,6 +2614,7 @@ var _FetchInterceptor = class extends Interceptor$1 {
|
|
|
2549
2614
|
return responsePromise;
|
|
2550
2615
|
}
|
|
2551
2616
|
this.logger.info("no mocked response received, performing request as-is...");
|
|
2617
|
+
const requestCloneForResponseEvent = request.clone();
|
|
2552
2618
|
return pureFetch(request).then(async (response) => {
|
|
2553
2619
|
this.logger.info("original fetch performed", response);
|
|
2554
2620
|
if (this.emitter.listenerCount("response") > 0) {
|
|
@@ -2557,7 +2623,7 @@ var _FetchInterceptor = class extends Interceptor$1 {
|
|
|
2557
2623
|
await emitAsync(this.emitter, "response", {
|
|
2558
2624
|
response: responseClone,
|
|
2559
2625
|
isMockedResponse: false,
|
|
2560
|
-
request,
|
|
2626
|
+
request: requestCloneForResponseEvent,
|
|
2561
2627
|
requestId
|
|
2562
2628
|
});
|
|
2563
2629
|
}
|
|
@@ -2580,7 +2646,7 @@ var FetchInterceptor = _FetchInterceptor;
|
|
|
2580
2646
|
FetchInterceptor.symbol = Symbol("fetch");
|
|
2581
2647
|
|
|
2582
2648
|
//#endregion
|
|
2583
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2649
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/chunk-RC2XPCC4.mjs
|
|
2584
2650
|
var BatchInterceptor = class extends Interceptor$1 {
|
|
2585
2651
|
constructor(options) {
|
|
2586
2652
|
BatchInterceptor.symbol = Symbol(options.name);
|
|
@@ -2616,13 +2682,13 @@ var BatchInterceptor = class extends Interceptor$1 {
|
|
|
2616
2682
|
};
|
|
2617
2683
|
|
|
2618
2684
|
//#endregion
|
|
2619
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2685
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/node/index.mjs
|
|
2620
2686
|
function getCleanUrl(url$1, isAbsolute = true) {
|
|
2621
2687
|
return [isAbsolute && url$1.origin, url$1.pathname].filter(Boolean).join("");
|
|
2622
2688
|
}
|
|
2623
2689
|
|
|
2624
2690
|
//#endregion
|
|
2625
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2691
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/devUtils.mjs
|
|
2626
2692
|
const LIBRARY_PREFIX = "[MSW]";
|
|
2627
2693
|
function formatMessage(message$3, ...positionals) {
|
|
2628
2694
|
const interpolatedMessage = format(message$3, ...positionals);
|
|
@@ -2647,7 +2713,7 @@ var InternalError = class extends Error {
|
|
|
2647
2713
|
};
|
|
2648
2714
|
|
|
2649
2715
|
//#endregion
|
|
2650
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2716
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/pipeEvents.mjs
|
|
2651
2717
|
function pipeEvents(source, destination) {
|
|
2652
2718
|
const rawEmit = source.emit;
|
|
2653
2719
|
if (rawEmit._isPiped) return;
|
|
@@ -2660,7 +2726,7 @@ function pipeEvents(source, destination) {
|
|
|
2660
2726
|
}
|
|
2661
2727
|
|
|
2662
2728
|
//#endregion
|
|
2663
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2729
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/toReadonlyArray.mjs
|
|
2664
2730
|
function toReadonlyArray(source) {
|
|
2665
2731
|
const clone = [...source];
|
|
2666
2732
|
Object.freeze(clone);
|
|
@@ -2668,7 +2734,7 @@ function toReadonlyArray(source) {
|
|
|
2668
2734
|
}
|
|
2669
2735
|
|
|
2670
2736
|
//#endregion
|
|
2671
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2737
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/Disposable.mjs
|
|
2672
2738
|
var Disposable = class {
|
|
2673
2739
|
subscriptions = [];
|
|
2674
2740
|
dispose() {
|
|
@@ -2678,7 +2744,7 @@ var Disposable = class {
|
|
|
2678
2744
|
};
|
|
2679
2745
|
|
|
2680
2746
|
//#endregion
|
|
2681
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2747
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/SetupApi.mjs
|
|
2682
2748
|
var InMemoryHandlersController = class {
|
|
2683
2749
|
constructor(initialHandlers) {
|
|
2684
2750
|
this.initialHandlers = initialHandlers;
|
|
@@ -2747,7 +2813,7 @@ var SetupApi = class extends Disposable {
|
|
|
2747
2813
|
};
|
|
2748
2814
|
|
|
2749
2815
|
//#endregion
|
|
2750
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2816
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/executeHandlers.mjs
|
|
2751
2817
|
const executeHandlers = async ({ request, requestId, handlers, resolutionContext }) => {
|
|
2752
2818
|
let matchingHandler = null;
|
|
2753
2819
|
let result = null;
|
|
@@ -2769,7 +2835,7 @@ const executeHandlers = async ({ request, requestId, handlers, resolutionContext
|
|
|
2769
2835
|
};
|
|
2770
2836
|
|
|
2771
2837
|
//#endregion
|
|
2772
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2838
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/request/toPublicUrl.mjs
|
|
2773
2839
|
function toPublicUrl(url$1) {
|
|
2774
2840
|
if (typeof location === "undefined") return url$1.toString();
|
|
2775
2841
|
const urlInstance = url$1 instanceof URL ? url$1 : new URL(url$1);
|
|
@@ -2777,7 +2843,7 @@ function toPublicUrl(url$1) {
|
|
|
2777
2843
|
}
|
|
2778
2844
|
|
|
2779
2845
|
//#endregion
|
|
2780
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2846
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/isCommonAssetRequest.mjs
|
|
2781
2847
|
function isCommonAssetRequest(request) {
|
|
2782
2848
|
const url$1 = new URL(request.url);
|
|
2783
2849
|
if (url$1.protocol === "file:") return true;
|
|
@@ -2788,7 +2854,7 @@ function isCommonAssetRequest(request) {
|
|
|
2788
2854
|
}
|
|
2789
2855
|
|
|
2790
2856
|
//#endregion
|
|
2791
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2857
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/request/onUnhandledRequest.mjs
|
|
2792
2858
|
async function onUnhandledRequest(request, strategy = "warn") {
|
|
2793
2859
|
const url$1 = new URL(request.url);
|
|
2794
2860
|
const publicUrl = toPublicUrl(url$1) + url$1.search;
|
|
@@ -2801,7 +2867,7 @@ ${requestBody ? ` \u2022 Request body: ${requestBody}
|
|
|
2801
2867
|
|
|
2802
2868
|
` : ""}`;
|
|
2803
2869
|
const unhandledRequestMessage = `intercepted a request without a matching request handler:${messageDetails}If you still wish to intercept this unhandled request, please create a request handler for it.
|
|
2804
|
-
Read more: https://mswjs.io/docs/
|
|
2870
|
+
Read more: https://mswjs.io/docs/http/intercepting-requests`;
|
|
2805
2871
|
function applyStrategy(strategy2) {
|
|
2806
2872
|
switch (strategy2) {
|
|
2807
2873
|
case "error": {
|
|
@@ -2850,17 +2916,10 @@ var __copyProps$3 = (to, from, except, desc) => {
|
|
|
2850
2916
|
}
|
|
2851
2917
|
return to;
|
|
2852
2918
|
};
|
|
2853
|
-
var __toESM$4 = (mod, isNodeMode, target) => (target = mod != null ? __create$3(__getProtoOf$3(mod)) : {}, __copyProps$3(
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
2858
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
|
|
2859
|
-
value: mod,
|
|
2860
|
-
enumerable: true
|
|
2861
|
-
}) : target,
|
|
2862
|
-
mod
|
|
2863
|
-
));
|
|
2919
|
+
var __toESM$4 = (mod, isNodeMode, target) => (target = mod != null ? __create$3(__getProtoOf$3(mod)) : {}, __copyProps$3(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
|
|
2920
|
+
value: mod,
|
|
2921
|
+
enumerable: true
|
|
2922
|
+
}) : target, mod));
|
|
2864
2923
|
var require_punycode = __commonJS$4({ "node_modules/punycode/punycode.js"(exports$1, module$1) {
|
|
2865
2924
|
"use strict";
|
|
2866
2925
|
var maxInt = 2147483647;
|
|
@@ -3178,29 +3237,29 @@ var require_url_parse = __commonJS$4({ "node_modules/url-parse/index.js"(exports
|
|
|
3178
3237
|
address = trimLeft(address);
|
|
3179
3238
|
address = address.replace(CRHTLF, "");
|
|
3180
3239
|
location$2 = location$2 || {};
|
|
3181
|
-
var match$
|
|
3182
|
-
var protocol = match$
|
|
3183
|
-
var forwardSlashes = !!match$
|
|
3184
|
-
var otherSlashes = !!match$
|
|
3240
|
+
var match$2 = protocolre.exec(address);
|
|
3241
|
+
var protocol = match$2[1] ? match$2[1].toLowerCase() : "";
|
|
3242
|
+
var forwardSlashes = !!match$2[2];
|
|
3243
|
+
var otherSlashes = !!match$2[3];
|
|
3185
3244
|
var slashesCount = 0;
|
|
3186
3245
|
var rest;
|
|
3187
3246
|
if (forwardSlashes) if (otherSlashes) {
|
|
3188
|
-
rest = match$
|
|
3189
|
-
slashesCount = match$
|
|
3247
|
+
rest = match$2[2] + match$2[3] + match$2[4];
|
|
3248
|
+
slashesCount = match$2[2].length + match$2[3].length;
|
|
3190
3249
|
} else {
|
|
3191
|
-
rest = match$
|
|
3192
|
-
slashesCount = match$
|
|
3250
|
+
rest = match$2[2] + match$2[4];
|
|
3251
|
+
slashesCount = match$2[2].length;
|
|
3193
3252
|
}
|
|
3194
3253
|
else if (otherSlashes) {
|
|
3195
|
-
rest = match$
|
|
3196
|
-
slashesCount = match$
|
|
3197
|
-
} else rest = match$
|
|
3254
|
+
rest = match$2[3] + match$2[4];
|
|
3255
|
+
slashesCount = match$2[3].length;
|
|
3256
|
+
} else rest = match$2[4];
|
|
3198
3257
|
if (protocol === "file:") {
|
|
3199
3258
|
if (slashesCount >= 2) rest = rest.slice(2);
|
|
3200
|
-
} else if (isSpecial(protocol)) rest = match$
|
|
3259
|
+
} else if (isSpecial(protocol)) rest = match$2[4];
|
|
3201
3260
|
else if (protocol) {
|
|
3202
3261
|
if (forwardSlashes) rest = rest.slice(2);
|
|
3203
|
-
} else if (slashesCount >= 2 && isSpecial(location$2.protocol)) rest = match$
|
|
3262
|
+
} else if (slashesCount >= 2 && isSpecial(location$2.protocol)) rest = match$2[4];
|
|
3204
3263
|
return {
|
|
3205
3264
|
protocol,
|
|
3206
3265
|
slashes: forwardSlashes || isSpecial(protocol),
|
|
@@ -14292,7 +14351,7 @@ tough-cookie/lib/cookie.js:
|
|
|
14292
14351
|
*/
|
|
14293
14352
|
|
|
14294
14353
|
//#endregion
|
|
14295
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14354
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/cookieStore.mjs
|
|
14296
14355
|
const { Cookie, CookieJar, Store, MemoryCookieStore, domainMatch, pathMatch } = source_default$2;
|
|
14297
14356
|
var WebStorageCookieStore = class extends Store {
|
|
14298
14357
|
storage;
|
|
@@ -14440,17 +14499,10 @@ var __copyProps$2 = (to, from, except, desc) => {
|
|
|
14440
14499
|
}
|
|
14441
14500
|
return to;
|
|
14442
14501
|
};
|
|
14443
|
-
var __toESM$3 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$2(
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
14448
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
|
|
14449
|
-
value: mod,
|
|
14450
|
-
enumerable: true
|
|
14451
|
-
}) : target,
|
|
14452
|
-
mod
|
|
14453
|
-
));
|
|
14502
|
+
var __toESM$3 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$2(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
|
|
14503
|
+
value: mod,
|
|
14504
|
+
enumerable: true
|
|
14505
|
+
}) : target, mod));
|
|
14454
14506
|
var require_codes = __commonJS$3({ "node_modules/statuses/codes.json"(exports$1, module$1) {
|
|
14455
14507
|
module$1.exports = {
|
|
14456
14508
|
"100": "Continue",
|
|
@@ -14608,17 +14660,10 @@ var __copyProps$1 = (to, from, except, desc) => {
|
|
|
14608
14660
|
}
|
|
14609
14661
|
return to;
|
|
14610
14662
|
};
|
|
14611
|
-
var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
14616
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
|
|
14617
|
-
value: mod,
|
|
14618
|
-
enumerable: true
|
|
14619
|
-
}) : target,
|
|
14620
|
-
mod
|
|
14621
|
-
));
|
|
14663
|
+
var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
|
|
14664
|
+
value: mod,
|
|
14665
|
+
enumerable: true
|
|
14666
|
+
}) : target, mod));
|
|
14622
14667
|
var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-cookie.js"(exports$1, module$1) {
|
|
14623
14668
|
"use strict";
|
|
14624
14669
|
var defaultParseOptions = {
|
|
@@ -14903,7 +14948,7 @@ var Headers$1 = class _Headers {
|
|
|
14903
14948
|
};
|
|
14904
14949
|
|
|
14905
14950
|
//#endregion
|
|
14906
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14951
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/HttpResponse/decorators.mjs
|
|
14907
14952
|
const { message: message$2 } = source_default$1;
|
|
14908
14953
|
const kSetCookie = Symbol("kSetCookie");
|
|
14909
14954
|
function normalizeResponseInit(init = {}) {
|
|
@@ -14939,14 +14984,14 @@ function decorateResponse(response, init) {
|
|
|
14939
14984
|
}
|
|
14940
14985
|
|
|
14941
14986
|
//#endregion
|
|
14942
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14987
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/request/storeResponseCookies.mjs
|
|
14943
14988
|
function storeResponseCookies(request, response) {
|
|
14944
14989
|
const responseCookies = Reflect.get(response, kSetCookie);
|
|
14945
14990
|
if (responseCookies) cookieStore.setCookie(responseCookies, request.url);
|
|
14946
14991
|
}
|
|
14947
14992
|
|
|
14948
14993
|
//#endregion
|
|
14949
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14994
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/handleRequest.mjs
|
|
14950
14995
|
async function handleRequest(request, requestId, handlers, options, emitter, handleRequestOptions) {
|
|
14951
14996
|
emitter.emit("request:start", {
|
|
14952
14997
|
request,
|
|
@@ -15021,13 +15066,13 @@ async function handleRequest(request, requestId, handlers, options, emitter, han
|
|
|
15021
15066
|
}
|
|
15022
15067
|
|
|
15023
15068
|
//#endregion
|
|
15024
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15069
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isObject.mjs
|
|
15025
15070
|
function isObject(value) {
|
|
15026
15071
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
15027
15072
|
}
|
|
15028
15073
|
|
|
15029
15074
|
//#endregion
|
|
15030
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15075
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/mergeRight.mjs
|
|
15031
15076
|
function mergeRight(left, right) {
|
|
15032
15077
|
return Object.entries(right).reduce((result, [key, rightValue]) => {
|
|
15033
15078
|
const leftValue = result[key];
|
|
@@ -15307,12 +15352,12 @@ var require_dist = require_chunk.__commonJS({ "../../node_modules/.pnpm/path-to-
|
|
|
15307
15352
|
/**
|
|
15308
15353
|
* Create path match function from `path-to-regexp` spec.
|
|
15309
15354
|
*/
|
|
15310
|
-
function match(str, options) {
|
|
15355
|
+
function match$1(str, options) {
|
|
15311
15356
|
var keys = [];
|
|
15312
15357
|
var re = pathToRegexp(str, keys, options);
|
|
15313
15358
|
return regexpToFunction(re, keys, options);
|
|
15314
15359
|
}
|
|
15315
|
-
exports.match = match;
|
|
15360
|
+
exports.match = match$1;
|
|
15316
15361
|
/**
|
|
15317
15362
|
* Create a path match function from `path-to-regexp` output.
|
|
15318
15363
|
*/
|
|
@@ -15446,10 +15491,9 @@ var require_dist = require_chunk.__commonJS({ "../../node_modules/.pnpm/path-to-
|
|
|
15446
15491
|
}
|
|
15447
15492
|
exports.pathToRegexp = pathToRegexp;
|
|
15448
15493
|
} });
|
|
15449
|
-
var import_dist = require_chunk.__toESM(require_dist(), 1);
|
|
15450
15494
|
|
|
15451
15495
|
//#endregion
|
|
15452
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15496
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/url/cleanUrl.mjs
|
|
15453
15497
|
const REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
|
15454
15498
|
function getSearchParams(path) {
|
|
15455
15499
|
return new URL(`/${path}`, "http://localhost").searchParams;
|
|
@@ -15460,13 +15504,13 @@ function cleanUrl(path) {
|
|
|
15460
15504
|
}
|
|
15461
15505
|
|
|
15462
15506
|
//#endregion
|
|
15463
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15507
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.mjs
|
|
15464
15508
|
function isAbsoluteUrl(url$1) {
|
|
15465
15509
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url$1);
|
|
15466
15510
|
}
|
|
15467
15511
|
|
|
15468
15512
|
//#endregion
|
|
15469
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15513
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.mjs
|
|
15470
15514
|
function getAbsoluteUrl(path, baseUrl) {
|
|
15471
15515
|
if (isAbsoluteUrl(path)) return path;
|
|
15472
15516
|
if (path.startsWith("*")) return path;
|
|
@@ -15475,7 +15519,7 @@ function getAbsoluteUrl(path, baseUrl) {
|
|
|
15475
15519
|
}
|
|
15476
15520
|
|
|
15477
15521
|
//#endregion
|
|
15478
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15522
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/normalizePath.mjs
|
|
15479
15523
|
function normalizePath(path, baseUrl) {
|
|
15480
15524
|
if (path instanceof RegExp) return path;
|
|
15481
15525
|
const maybeAbsoluteUrl = getAbsoluteUrl(path, baseUrl);
|
|
@@ -15483,7 +15527,8 @@ function normalizePath(path, baseUrl) {
|
|
|
15483
15527
|
}
|
|
15484
15528
|
|
|
15485
15529
|
//#endregion
|
|
15486
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15530
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
|
15531
|
+
var import_dist = require_chunk.__toESM(require_dist(), 1);
|
|
15487
15532
|
function coercePath(path) {
|
|
15488
15533
|
return path.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
|
|
15489
15534
|
const expression = "(.*)";
|
|
@@ -15504,7 +15549,7 @@ function matchRequestUrl(url$1, path, baseUrl) {
|
|
|
15504
15549
|
}
|
|
15505
15550
|
|
|
15506
15551
|
//#endregion
|
|
15507
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15552
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/getCallFrame.mjs
|
|
15508
15553
|
const SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
|
15509
15554
|
const BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
|
15510
15555
|
function getCallFrame(error$2) {
|
|
@@ -15520,7 +15565,7 @@ function getCallFrame(error$2) {
|
|
|
15520
15565
|
}
|
|
15521
15566
|
|
|
15522
15567
|
//#endregion
|
|
15523
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15568
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/handlers/WebSocketHandler.mjs
|
|
15524
15569
|
const kEmitter$1 = Symbol("kEmitter");
|
|
15525
15570
|
const kDispatchEvent = Symbol("kDispatchEvent");
|
|
15526
15571
|
const kSender = Symbol("kSender");
|
|
@@ -15542,8 +15587,8 @@ var WebSocketHandler = class {
|
|
|
15542
15587
|
const { data: connection } = args.event;
|
|
15543
15588
|
const { url: clientUrl } = connection.client;
|
|
15544
15589
|
clientUrl.pathname = clientUrl.pathname.replace(/^\/socket.io\//, "/");
|
|
15545
|
-
const match$
|
|
15546
|
-
return { match: match$
|
|
15590
|
+
const match$2 = matchRequestUrl(clientUrl, this.url);
|
|
15591
|
+
return { match: match$2 };
|
|
15547
15592
|
}
|
|
15548
15593
|
predicate(args) {
|
|
15549
15594
|
return args.parsedResult.match.matches;
|
|
@@ -15591,7 +15636,7 @@ function createStopPropagationListener(handler) {
|
|
|
15591
15636
|
}
|
|
15592
15637
|
|
|
15593
15638
|
//#endregion
|
|
15594
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
15639
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
|
|
15595
15640
|
function hasConfigurableGlobal(propertyName) {
|
|
15596
15641
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
|
|
15597
15642
|
if (typeof descriptor === "undefined") return false;
|
|
@@ -15605,7 +15650,7 @@ function hasConfigurableGlobal(propertyName) {
|
|
|
15605
15650
|
}
|
|
15606
15651
|
|
|
15607
15652
|
//#endregion
|
|
15608
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
15653
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
|
|
15609
15654
|
function getGlobalSymbol(symbol) {
|
|
15610
15655
|
return globalThis[symbol] || void 0;
|
|
15611
15656
|
}
|
|
@@ -15747,7 +15792,7 @@ function createRequestId() {
|
|
|
15747
15792
|
}
|
|
15748
15793
|
|
|
15749
15794
|
//#endregion
|
|
15750
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
15795
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.mjs
|
|
15751
15796
|
function bindEvent(target, event) {
|
|
15752
15797
|
Object.defineProperties(event, {
|
|
15753
15798
|
target: {
|
|
@@ -16117,13 +16162,11 @@ var WebSocketServerConnection = class {
|
|
|
16117
16162
|
* dispatch them straight away.
|
|
16118
16163
|
*/
|
|
16119
16164
|
this.client,
|
|
16120
|
-
// Clone the message event again to prevent
|
|
16121
|
-
// the "already being dispatched" exception.
|
|
16122
16165
|
new MessageEvent("message", {
|
|
16123
16166
|
data: event.data,
|
|
16124
16167
|
origin: event.origin
|
|
16125
16168
|
})
|
|
16126
|
-
));
|
|
16169
|
+
));
|
|
16127
16170
|
}
|
|
16128
16171
|
handleMockClose(_event) {
|
|
16129
16172
|
if (this.realWebSocket) this.realWebSocket.close();
|
|
@@ -16148,16 +16191,11 @@ var WebSocketClassTransport = class extends EventTarget {
|
|
|
16148
16191
|
this.dispatchEvent(bindEvent(this.socket, new CloseEvent("close", event)));
|
|
16149
16192
|
});
|
|
16150
16193
|
this.socket[kOnSend] = (data) => {
|
|
16151
|
-
this.dispatchEvent(bindEvent(
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
|
|
16155
|
-
|
|
16156
|
-
data,
|
|
16157
|
-
origin: this.socket.url,
|
|
16158
|
-
cancelable: true
|
|
16159
|
-
})
|
|
16160
|
-
));
|
|
16194
|
+
this.dispatchEvent(bindEvent(this.socket, new CancelableMessageEvent("outgoing", {
|
|
16195
|
+
data,
|
|
16196
|
+
origin: this.socket.url,
|
|
16197
|
+
cancelable: true
|
|
16198
|
+
})));
|
|
16161
16199
|
};
|
|
16162
16200
|
}
|
|
16163
16201
|
addEventListener(type$2, callback, options) {
|
|
@@ -16184,7 +16222,7 @@ var WebSocketClassTransport = class extends EventTarget {
|
|
|
16184
16222
|
data,
|
|
16185
16223
|
origin: this.socket.url
|
|
16186
16224
|
})
|
|
16187
|
-
));
|
|
16225
|
+
));
|
|
16188
16226
|
};
|
|
16189
16227
|
if (this.socket.readyState === this.socket.CONNECTING) this.socket.addEventListener("open", () => {
|
|
16190
16228
|
dispatchEvent();
|
|
@@ -16252,11 +16290,11 @@ var WebSocketInterceptor = _WebSocketInterceptor;
|
|
|
16252
16290
|
WebSocketInterceptor.symbol = Symbol("websocket");
|
|
16253
16291
|
|
|
16254
16292
|
//#endregion
|
|
16255
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16293
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/ws/webSocketInterceptor.mjs
|
|
16256
16294
|
const webSocketInterceptor = new WebSocketInterceptor();
|
|
16257
16295
|
|
|
16258
16296
|
//#endregion
|
|
16259
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16297
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isHandlerKind.mjs
|
|
16260
16298
|
function isHandlerKind(kind) {
|
|
16261
16299
|
return (input) => {
|
|
16262
16300
|
return input != null && typeof input === "object" && "__kind" in input && input.__kind === kind;
|
|
@@ -16264,7 +16302,7 @@ function isHandlerKind(kind) {
|
|
|
16264
16302
|
}
|
|
16265
16303
|
|
|
16266
16304
|
//#endregion
|
|
16267
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16305
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/ws/handleWebSocketEvent.mjs
|
|
16268
16306
|
function handleWebSocketEvent(options) {
|
|
16269
16307
|
webSocketInterceptor.on("connection", async (connection) => {
|
|
16270
16308
|
const handlers = options.getHandlers();
|
|
@@ -16298,7 +16336,7 @@ function handleWebSocketEvent(options) {
|
|
|
16298
16336
|
}
|
|
16299
16337
|
|
|
16300
16338
|
//#endregion
|
|
16301
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16339
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/node/index.mjs
|
|
16302
16340
|
var DEFAULT_LISTEN_OPTIONS = { onUnhandledRequest: "warn" };
|
|
16303
16341
|
var SetupServerCommonApi = class extends SetupApi {
|
|
16304
16342
|
interceptor;
|
|
@@ -16307,7 +16345,7 @@ var SetupServerCommonApi = class extends SetupApi {
|
|
|
16307
16345
|
super(...handlers);
|
|
16308
16346
|
this.interceptor = new BatchInterceptor({
|
|
16309
16347
|
name: "setup-server",
|
|
16310
|
-
interceptors
|
|
16348
|
+
interceptors
|
|
16311
16349
|
});
|
|
16312
16350
|
this.resolvedOptions = {};
|
|
16313
16351
|
}
|
|
@@ -16387,12 +16425,12 @@ var AsyncHandlersController = class {
|
|
|
16387
16425
|
}
|
|
16388
16426
|
};
|
|
16389
16427
|
var SetupServerApi = class extends SetupServerCommonApi {
|
|
16390
|
-
constructor(handlers
|
|
16391
|
-
|
|
16392
|
-
|
|
16393
|
-
|
|
16394
|
-
|
|
16395
|
-
|
|
16428
|
+
constructor(handlers, interceptors = [
|
|
16429
|
+
new ClientRequestInterceptor(),
|
|
16430
|
+
new XMLHttpRequestInterceptor(),
|
|
16431
|
+
new FetchInterceptor()
|
|
16432
|
+
]) {
|
|
16433
|
+
super(interceptors, handlers);
|
|
16396
16434
|
this.handlersController = new AsyncHandlersController(handlers);
|
|
16397
16435
|
}
|
|
16398
16436
|
boundary(callback) {
|
|
@@ -16413,14 +16451,14 @@ var setupServer = (...handlers) => {
|
|
|
16413
16451
|
};
|
|
16414
16452
|
|
|
16415
16453
|
//#endregion
|
|
16416
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16454
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isIterable.mjs
|
|
16417
16455
|
function isIterable(fn) {
|
|
16418
16456
|
if (!fn) return false;
|
|
16419
16457
|
return Reflect.has(fn, Symbol.iterator) || Reflect.has(fn, Symbol.asyncIterator);
|
|
16420
16458
|
}
|
|
16421
16459
|
|
|
16422
16460
|
//#endregion
|
|
16423
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16461
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/handlers/RequestHandler.mjs
|
|
16424
16462
|
var RequestHandler = class RequestHandler {
|
|
16425
16463
|
static cache = /* @__PURE__ */ new WeakMap();
|
|
16426
16464
|
__kind;
|
|
@@ -16551,13 +16589,13 @@ var RequestHandler = class RequestHandler {
|
|
|
16551
16589
|
};
|
|
16552
16590
|
|
|
16553
16591
|
//#endregion
|
|
16554
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16592
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isStringEqual.mjs
|
|
16555
16593
|
function isStringEqual(actual, expected) {
|
|
16556
16594
|
return actual.toLowerCase() === expected.toLowerCase();
|
|
16557
16595
|
}
|
|
16558
16596
|
|
|
16559
16597
|
//#endregion
|
|
16560
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16598
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.mjs
|
|
16561
16599
|
function getStatusCodeColor(status$1) {
|
|
16562
16600
|
if (status$1 < 300) return "#69AB32";
|
|
16563
16601
|
if (status$1 < 400) return "#F0BB4B";
|
|
@@ -16565,7 +16603,7 @@ function getStatusCodeColor(status$1) {
|
|
|
16565
16603
|
}
|
|
16566
16604
|
|
|
16567
16605
|
//#endregion
|
|
16568
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16606
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getTimestamp.mjs
|
|
16569
16607
|
function getTimestamp(options) {
|
|
16570
16608
|
const now = /* @__PURE__ */ new Date();
|
|
16571
16609
|
const timestamp = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`;
|
|
@@ -16574,7 +16612,7 @@ function getTimestamp(options) {
|
|
|
16574
16612
|
}
|
|
16575
16613
|
|
|
16576
16614
|
//#endregion
|
|
16577
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16615
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeRequest.mjs
|
|
16578
16616
|
async function serializeRequest(request) {
|
|
16579
16617
|
const requestClone = request.clone();
|
|
16580
16618
|
const requestText = await requestClone.text();
|
|
@@ -16587,7 +16625,7 @@ async function serializeRequest(request) {
|
|
|
16587
16625
|
}
|
|
16588
16626
|
|
|
16589
16627
|
//#endregion
|
|
16590
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16628
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeResponse.mjs
|
|
16591
16629
|
const { message: message$1 } = source_default$1;
|
|
16592
16630
|
async function serializeResponse(response) {
|
|
16593
16631
|
const responseClone = response.clone();
|
|
@@ -16622,17 +16660,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16622
16660
|
}
|
|
16623
16661
|
return to;
|
|
16624
16662
|
};
|
|
16625
|
-
var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16630
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
16631
|
-
value: mod,
|
|
16632
|
-
enumerable: true
|
|
16633
|
-
}) : target,
|
|
16634
|
-
mod
|
|
16635
|
-
));
|
|
16663
|
+
var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
16664
|
+
value: mod,
|
|
16665
|
+
enumerable: true
|
|
16666
|
+
}) : target, mod));
|
|
16636
16667
|
var require_cookie = __commonJS$1({ "node_modules/cookie/index.js"(exports$1) {
|
|
16637
16668
|
"use strict";
|
|
16638
16669
|
exports$1.parse = parse$1;
|
|
@@ -16784,7 +16815,7 @@ cookie/index.js:
|
|
|
16784
16815
|
*/
|
|
16785
16816
|
|
|
16786
16817
|
//#endregion
|
|
16787
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16818
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
|
16788
16819
|
function parseCookies(input) {
|
|
16789
16820
|
const parsedCookies = source_default.parse(input);
|
|
16790
16821
|
const cookies = {};
|
|
@@ -16821,7 +16852,7 @@ function getAllRequestCookies(request) {
|
|
|
16821
16852
|
}
|
|
16822
16853
|
|
|
16823
16854
|
//#endregion
|
|
16824
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16855
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/handlers/HttpHandler.mjs
|
|
16825
16856
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
|
16826
16857
|
HttpMethods2["HEAD"] = "HEAD";
|
|
16827
16858
|
HttpMethods2["GET"] = "GET";
|
|
@@ -16855,14 +16886,14 @@ var HttpHandler = class extends RequestHandler {
|
|
|
16855
16886
|
searchParams.forEach((_, paramName) => {
|
|
16856
16887
|
queryParams.push(paramName);
|
|
16857
16888
|
});
|
|
16858
|
-
devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/
|
|
16889
|
+
devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requestsquery-parameters`);
|
|
16859
16890
|
}
|
|
16860
16891
|
async parse(args) {
|
|
16861
16892
|
const url$1 = new URL(args.request.url);
|
|
16862
|
-
const match$
|
|
16893
|
+
const match$2 = matchRequestUrl(url$1, this.info.path, args.resolutionContext?.baseUrl);
|
|
16863
16894
|
const cookies = getAllRequestCookies(args.request);
|
|
16864
16895
|
return {
|
|
16865
|
-
match: match$
|
|
16896
|
+
match: match$2,
|
|
16866
16897
|
cookies
|
|
16867
16898
|
};
|
|
16868
16899
|
}
|
|
@@ -16894,7 +16925,7 @@ var HttpHandler = class extends RequestHandler {
|
|
|
16894
16925
|
};
|
|
16895
16926
|
|
|
16896
16927
|
//#endregion
|
|
16897
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16928
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/http.mjs
|
|
16898
16929
|
function createHttpHandler(method) {
|
|
16899
16930
|
return (path, resolver, options = {}) => {
|
|
16900
16931
|
return new HttpHandler(method, path, resolver, options);
|
|
@@ -16912,10 +16943,10 @@ const http$1 = {
|
|
|
16912
16943
|
};
|
|
16913
16944
|
|
|
16914
16945
|
//#endregion
|
|
16915
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16946
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/HttpResponse.mjs
|
|
16916
16947
|
const bodyType = Symbol("bodyType");
|
|
16917
16948
|
var HttpResponse = class HttpResponse extends FetchResponse {
|
|
16918
|
-
[bodyType];
|
|
16949
|
+
[bodyType] = null;
|
|
16919
16950
|
constructor(body, init) {
|
|
16920
16951
|
const responseInit = normalizeResponseInit(init);
|
|
16921
16952
|
super(body, responseInit);
|
|
@@ -18388,6 +18419,27 @@ function buildHandlers(handlers) {
|
|
|
18388
18419
|
return [...handlers.map((handler) => http$1[handler.method](`https://us.sentry.io${handler.path}`, handler.fetch)), ...handlers.map((handler) => http$1[handler.method](`https://sentry.io${handler.path}`, handler.fetch))];
|
|
18389
18420
|
}
|
|
18390
18421
|
const restHandlers = buildHandlers([
|
|
18422
|
+
{
|
|
18423
|
+
method: "get",
|
|
18424
|
+
path: "/api/0/auth/",
|
|
18425
|
+
fetch: () => {
|
|
18426
|
+
return HttpResponse.json({
|
|
18427
|
+
id: "1",
|
|
18428
|
+
name: "John Doe",
|
|
18429
|
+
email: "john.doe@example.com"
|
|
18430
|
+
});
|
|
18431
|
+
}
|
|
18432
|
+
},
|
|
18433
|
+
{
|
|
18434
|
+
method: "get",
|
|
18435
|
+
path: "/api/0/users/me/regions/",
|
|
18436
|
+
fetch: () => {
|
|
18437
|
+
return HttpResponse.json({ regions: [{
|
|
18438
|
+
name: "us",
|
|
18439
|
+
url: "https://us.sentry.io"
|
|
18440
|
+
}] });
|
|
18441
|
+
}
|
|
18442
|
+
},
|
|
18391
18443
|
{
|
|
18392
18444
|
method: "get",
|
|
18393
18445
|
path: "/api/0/organizations/",
|