@sentry/mcp-server 0.10.0 → 0.12.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 +41 -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 +36 -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-4jq_wVgn.d.ts +522 -0
- package/dist/client-4jq_wVgn.d.ts.map +1 -0
- package/dist/client-B7vZ6JMk.cjs +572 -0
- package/dist/client-B7vZ6JMk.cjs.map +1 -0
- package/dist/client-CAoHZbyK.js +561 -0
- package/dist/client-CAoHZbyK.js.map +1 -0
- package/dist/client-DkY0ifZf.d.cts +522 -0
- package/dist/client-DkY0ifZf.d.cts.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-BaARL2gT.js.map +1 -0
- package/dist/{formatting-B0SJqiqX.cjs → formatting-C2kN0ok6.cjs} +1 -2
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- 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 +5 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +5 -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 +10 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +10 -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-CyoHu5j4.js → issue-helpers-BMVLc3mR.js} +16 -2
- package/dist/issue-helpers-BMVLc3mR.js.map +1 -0
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-D712fGT2.cjs} +16 -3
- package/dist/issue-helpers-D712fGT2.cjs.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/logging-ByvSjT6V.cjs.map +1 -0
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/logging-CXLD0FFB.js.map +1 -0
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +31 -3
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +31 -3
- 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-BTLIBcGt.cjs} +10 -4
- package/dist/promptDefinitions-BTLIBcGt.cjs.map +1 -0
- package/dist/{promptDefinitions-tpKruPny.d.ts → promptDefinitions-CF2VWdQ6.d.cts} +12 -4
- package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +1 -0
- package/dist/{promptDefinitions-BR7PxWcH.d.cts → promptDefinitions-D5FSQckL.d.ts} +11 -3
- package/dist/promptDefinitions-D5FSQckL.d.ts.map +1 -0
- package/dist/{promptDefinitions-DBNOeSg-.js → promptDefinitions-D8yow1m0.js} +9 -2
- package/dist/promptDefinitions-D8yow1m0.js.map +1 -0
- 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-nfFU-zY-.cjs → prompts-CDbQrutV.cjs} +3 -3
- package/dist/prompts-CDbQrutV.cjs.map +1 -0
- package/dist/{prompts-DgWOD2rU.js → prompts-Dt3A8Qfl.js} +4 -2
- package/dist/prompts-Dt3A8Qfl.js.map +1 -0
- package/dist/prompts.cjs +3 -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 +2 -1
- package/dist/{resources-OM3EAnnj.js → resources-Bol20Xuo.js} +13 -1
- package/dist/resources-Bol20Xuo.js.map +1 -0
- package/dist/{resources-BAE7VVZZ.cjs → resources-DNyoutxH.cjs} +13 -2
- package/dist/resources-DNyoutxH.cjs.map +1 -0
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +9 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +9 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/{schema-B7A-FyIi.d.ts → schema-BJv7kREf.d.cts} +215 -68
- package/dist/schema-BJv7kREf.d.cts.map +1 -0
- package/dist/{schema-jk88gqOu.cjs → schema-BTfISwFu.cjs} +30 -4
- package/dist/schema-BTfISwFu.cjs.map +1 -0
- package/dist/{schema-PvgLrC1b.d.cts → schema-BnxGHL_i.d.ts} +215 -68
- package/dist/schema-BnxGHL_i.d.ts.map +1 -0
- package/dist/{schema-3VLYcf4D.cjs → schema-BsvGMALe.cjs} +59 -8
- package/dist/schema-BsvGMALe.cjs.map +1 -0
- package/dist/{schema-Dltbjui7.js → schema-C_hp0BR7.js} +41 -7
- package/dist/schema-C_hp0BR7.js.map +1 -0
- package/dist/schema-Dv6aLZgz.js +32 -0
- package/dist/schema-Dv6aLZgz.js.map +1 -0
- package/dist/schema.cjs +13 -11
- package/dist/schema.d.cts +14 -5
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +14 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-yb4PkNyo.js → server-C7cHq_pc.js} +82 -27
- package/dist/server-C7cHq_pc.js.map +1 -0
- package/dist/{server-VwFSUPQn.cjs → server-DeutbO8v.cjs} +83 -29
- package/dist/server-DeutbO8v.cjs.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +24 -6
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +24 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/stdio-B73CCTly.cjs +47 -0
- package/dist/stdio-B73CCTly.cjs.map +1 -0
- package/dist/stdio-ZQLC-i5Q.js +41 -0
- package/dist/stdio-ZQLC-i5Q.js.map +1 -0
- package/dist/test-setup.cjs +653 -438
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +653 -438
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-B94CNDbt.d.cts → toolDefinitions-BOMF-zIC.d.ts} +148 -18
- package/dist/toolDefinitions-BOMF-zIC.d.ts.map +1 -0
- package/dist/{toolDefinitions-DIhvw3vk.cjs → toolDefinitions-CUegGcWU.cjs} +128 -7
- package/dist/toolDefinitions-CUegGcWU.cjs.map +1 -0
- package/dist/{toolDefinitions-Bb_1ejkl.js → toolDefinitions-DFAxp3nr.js} +127 -5
- package/dist/toolDefinitions-DFAxp3nr.js.map +1 -0
- package/dist/{toolDefinitions-q_1-70fG.d.ts → toolDefinitions-Ipvr4Acw.d.cts} +149 -19
- package/dist/toolDefinitions-Ipvr4Acw.d.cts.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-DpiQwSTY.js} +156 -13
- package/dist/tools-DpiQwSTY.js.map +1 -0
- package/dist/{tools-BdkmyaZo.cjs → tools-DyOqlsCW.cjs} +157 -15
- package/dist/tools-DyOqlsCW.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +121 -8
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +121 -8
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +330 -35
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +311 -15
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +27 -6
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +27 -6
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-jftb-CP9.d.ts → types-D5TPcOfv.d.ts} +4 -4
- package/dist/types-D5TPcOfv.d.ts.map +1 -0
- package/dist/{types-OeoNXRm-.d.cts → types-DRF2IoP_.d.cts} +4 -4
- package/dist/types-DRF2IoP_.d.cts.map +1 -0
- package/dist/{types-B03G337q.d.cts → types-Daq2fm0E.d.ts} +7 -5
- package/dist/types-Daq2fm0E.d.ts.map +1 -0
- package/dist/{types-CN4NEway.d.ts → types-NIQW7KyF.d.cts} +7 -5
- package/dist/types-NIQW7KyF.d.cts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/{version-CDnh7DyW.cjs → version-BNmubeQI.cjs} +2 -3
- package/dist/{version-CDnh7DyW.cjs.map → version-BNmubeQI.cjs.map} +1 -1
- package/dist/version-CRto5Sn_.js +6 -0
- package/dist/{version-TjO7fHpC.js.map → version-CRto5Sn_.js.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 +0 -227
- package/dist/client-B4Ux5Zdg.cjs.map +0 -1
- package/dist/client-Bz_PNC8o.js +0 -215
- package/dist/client-Bz_PNC8o.js.map +0 -1
- package/dist/client-J6VSRmQS.d.ts +0 -177
- package/dist/client-J6VSRmQS.d.ts.map +0 -1
- package/dist/client-tE6FD__9.d.cts +0 -177
- 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/formatting-B0SJqiqX.cjs.map +0 -1
- package/dist/formatting-ggD6YRYR.js.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/logging-BEMgC5SA.cjs.map +0 -1
- package/dist/logging-Cxm8lQvg.js.map +0 -1
- package/dist/promptDefinitions-BR7PxWcH.d.cts.map +0 -1
- package/dist/promptDefinitions-DBNOeSg-.js.map +0 -1
- package/dist/promptDefinitions-pHRpPOpJ.cjs.map +0 -1
- package/dist/promptDefinitions-tpKruPny.d.ts.map +0 -1
- package/dist/prompts-DgWOD2rU.js.map +0 -1
- package/dist/prompts-nfFU-zY-.cjs.map +0 -1
- package/dist/resources-BAE7VVZZ.cjs.map +0 -1
- package/dist/resources-OM3EAnnj.js.map +0 -1
- package/dist/schema-3VLYcf4D.cjs.map +0 -1
- package/dist/schema-B7A-FyIi.d.ts.map +0 -1
- package/dist/schema-BKa41TQ4.js +0 -17
- package/dist/schema-BKa41TQ4.js.map +0 -1
- package/dist/schema-Dltbjui7.js.map +0 -1
- package/dist/schema-PvgLrC1b.d.cts.map +0 -1
- package/dist/schema-jk88gqOu.cjs.map +0 -1
- package/dist/server-VwFSUPQn.cjs.map +0 -1
- package/dist/server-yb4PkNyo.js.map +0 -1
- package/dist/stdio-65sYKLOk.cjs +0 -26
- package/dist/stdio-65sYKLOk.cjs.map +0 -1
- package/dist/stdio-DkU2-spy.js +0 -19
- package/dist/stdio-DkU2-spy.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.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { __commonJS, __require, __toESM } from "./chunk-
|
|
1
|
+
import { __commonJS, __require, __toESM } from "./chunk-BLXvPPr8.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import http2, { Agent, IncomingMessage, STATUS_CODES, ServerResponse, globalAgent } from "http";
|
|
4
|
+
import { Readable } from "stream";
|
|
4
5
|
import https2, { Agent as Agent$1, globalAgent as globalAgent$1 } from "https";
|
|
5
6
|
import net2 from "net";
|
|
6
7
|
import { HTTPParser } from "_http_common";
|
|
7
|
-
import { Readable } from "stream";
|
|
8
8
|
import { URL as URL$1, parse, urlToHttpOptions } from "url";
|
|
9
9
|
import zlib from "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) {
|
|
86
|
+
Reflect.set(request, kRawRequestBodyStream, stream);
|
|
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);
|
|
@@ -313,8 +347,8 @@ function isNodeProcess() {
|
|
|
313
347
|
//#region ../../node_modules/.pnpm/@open-draft+logger@0.3.0/node_modules/@open-draft/logger/lib/index.mjs
|
|
314
348
|
var __defProp$4 = Object.defineProperty;
|
|
315
349
|
var __export = (target, all) => {
|
|
316
|
-
for (var name in all) __defProp$4(target, name, {
|
|
317
|
-
get: all[name],
|
|
350
|
+
for (var name$2 in all) __defProp$4(target, name$2, {
|
|
351
|
+
get: all[name$2],
|
|
318
352
|
enumerable: true
|
|
319
353
|
});
|
|
320
354
|
};
|
|
@@ -343,8 +377,8 @@ function green(text) {
|
|
|
343
377
|
}
|
|
344
378
|
var IS_NODE$1 = isNodeProcess();
|
|
345
379
|
var Logger = class {
|
|
346
|
-
constructor(name) {
|
|
347
|
-
this.name = name;
|
|
380
|
+
constructor(name$2) {
|
|
381
|
+
this.name = name$2;
|
|
348
382
|
this.prefix = `[${this.name}]`;
|
|
349
383
|
const LOGGER_NAME = getVariable("DEBUG");
|
|
350
384
|
const LOGGER_LEVEL = getVariable("LOG_LEVEL");
|
|
@@ -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) {
|
|
883
|
+
try {
|
|
884
|
+
new URL(url);
|
|
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, response) {
|
|
863
|
-
if (!url) return;
|
|
864
|
-
|
|
865
|
-
|
|
913
|
+
if (!url || url === "about:" || !canParseUrl(url)) return;
|
|
914
|
+
const state = getValueBySymbol("state", response);
|
|
915
|
+
if (state) state.urlList.push(new URL(url));
|
|
916
|
+
else Object.defineProperty(response, "url", {
|
|
866
917
|
value: url,
|
|
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.username = "";
|
|
1118
1168
|
url.password = "";
|
|
1119
1169
|
}
|
|
1120
|
-
|
|
1170
|
+
this.requestStream = new 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 ? 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
|
});
|
|
@@ -1226,9 +1284,9 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1226
1284
|
const chunkBeforeRequestHeaders = chunkString.slice(0, chunkString.indexOf("\r\n") + 2);
|
|
1227
1285
|
const chunkAfterRequestHeaders = chunkString.slice(chunk.indexOf("\r\n\r\n"));
|
|
1228
1286
|
const rawRequestHeaders = getRawFetchHeaders(this.request.headers);
|
|
1229
|
-
const requestHeadersString = rawRequestHeaders.filter(([name]) => {
|
|
1230
|
-
return name.toLowerCase() !== INTERNAL_REQUEST_ID_HEADER_NAME;
|
|
1231
|
-
}).map(([name, value]) => `${name}: ${value}`).join("\r\n");
|
|
1287
|
+
const requestHeadersString = rawRequestHeaders.filter(([name$2]) => {
|
|
1288
|
+
return name$2.toLowerCase() !== INTERNAL_REQUEST_ID_HEADER_NAME;
|
|
1289
|
+
}).map(([name$2, value]) => `${name$2}: ${value}`).join("\r\n");
|
|
1232
1290
|
const headersChunk = `${chunkBeforeRequestHeaders}${requestHeadersString}${chunkAfterRequestHeaders}`;
|
|
1233
1291
|
socket.write(headersChunk, encoding, callback);
|
|
1234
1292
|
headersWritten = true;
|
|
@@ -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) {
|
|
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 } = http2;
|
|
1698
|
+
const { ClientRequest: OriginalClientRequest, get: originalGet, request: originalRequest } = http2;
|
|
1644
1699
|
const { get: originalHttpsGet, request: originalHttpsRequest } = https2;
|
|
1645
1700
|
const onRequest = this.onRequest.bind(this);
|
|
1646
1701
|
const onResponse = this.onResponse.bind(this);
|
|
1702
|
+
http2.ClientRequest = new Proxy(http2.ClientRequest, { construct: (target, args) => {
|
|
1703
|
+
const [url, 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,
|
|
1713
|
+
options,
|
|
1714
|
+
callback
|
|
1715
|
+
]);
|
|
1716
|
+
} });
|
|
1647
1717
|
http2.request = new Proxy(http2.request, { apply: (target, thisArg, args) => {
|
|
1648
1718
|
const [url, 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
|
+
http2.ClientRequest = OriginalClientRequest;
|
|
1705
1776
|
http2.get = originalGet;
|
|
1706
1777
|
http2.request = originalRequest;
|
|
1707
1778
|
https2.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);
|
|
@@ -1905,9 +1976,9 @@ function createHeadersFromXMLHttpReqestHeaders(headersString) {
|
|
|
1905
1976
|
const lines = headersString.split(/[\r\n]+/);
|
|
1906
1977
|
for (const line of lines) {
|
|
1907
1978
|
if (line.trim() === "") continue;
|
|
1908
|
-
const [name, ...parts] = line.split(": ");
|
|
1979
|
+
const [name$2, ...parts] = line.split(": ");
|
|
1909
1980
|
const value = parts.join(": ");
|
|
1910
|
-
headers.append(name, value);
|
|
1981
|
+
headers.append(name$2, value);
|
|
1911
1982
|
}
|
|
1912
1983
|
return headers;
|
|
1913
1984
|
}
|
|
@@ -1966,9 +2037,9 @@ var XMLHttpRequestController = class {
|
|
|
1966
2037
|
return invoke();
|
|
1967
2038
|
}
|
|
1968
2039
|
case "setRequestHeader": {
|
|
1969
|
-
const [name, value] = args;
|
|
1970
|
-
this.requestHeaders.set(name, value);
|
|
1971
|
-
this.logger.info("setRequestHeader", name, value);
|
|
2040
|
+
const [name$2, value] = args;
|
|
2041
|
+
this.requestHeaders.set(name$2, value);
|
|
2042
|
+
this.logger.info("setRequestHeader", name$2, value);
|
|
1972
2043
|
return invoke();
|
|
1973
2044
|
}
|
|
1974
2045
|
case "send": {
|
|
@@ -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) {
|
|
2376
|
-
try {
|
|
2377
|
-
new URL(url);
|
|
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, isAbsolute = true) {
|
|
2621
2687
|
return [isAbsolute && url.origin, url.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) {
|
|
2774
2840
|
if (typeof location === "undefined") return url.toString();
|
|
2775
2841
|
const urlInstance = url instanceof URL ? url : new URL(url);
|
|
@@ -2777,7 +2843,7 @@ function toPublicUrl(url) {
|
|
|
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 = new URL(request.url);
|
|
2783
2849
|
if (url.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 = new URL(request.url);
|
|
2794
2860
|
const publicUrl = toPublicUrl(url) + url.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) {
|
|
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),
|
|
@@ -13121,8 +13180,8 @@ var require_memstore = __commonJS$4({ "node_modules/tough-cookie/lib/memstore.js
|
|
|
13121
13180
|
"removeCookies",
|
|
13122
13181
|
"removeAllCookies",
|
|
13123
13182
|
"getAllCookies"
|
|
13124
|
-
].forEach((name) => {
|
|
13125
|
-
MemoryCookieStore$1.prototype[name] = fromCallback(MemoryCookieStore$1.prototype[name]);
|
|
13183
|
+
].forEach((name$2) => {
|
|
13184
|
+
MemoryCookieStore$1.prototype[name$2] = fromCallback(MemoryCookieStore$1.prototype[name$2]);
|
|
13126
13185
|
});
|
|
13127
13186
|
exports$1.MemoryCookieStore = MemoryCookieStore$1;
|
|
13128
13187
|
function inspectFallback(val) {
|
|
@@ -14058,8 +14117,8 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
14058
14117
|
"removeAllCookies",
|
|
14059
14118
|
"serialize",
|
|
14060
14119
|
"setCookie"
|
|
14061
|
-
].forEach((name) => {
|
|
14062
|
-
CookieJar$1.prototype[name] = fromCallback(CookieJar$1.prototype[name]);
|
|
14120
|
+
].forEach((name$2) => {
|
|
14121
|
+
CookieJar$1.prototype[name$2] = fromCallback(CookieJar$1.prototype[name$2]);
|
|
14063
14122
|
});
|
|
14064
14123
|
CookieJar$1.deserialize = fromCallback(CookieJar$1.deserialize);
|
|
14065
14124
|
function syncWrap(method) {
|
|
@@ -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) {
|
|
14455
14507
|
module.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) {
|
|
14623
14668
|
"use strict";
|
|
14624
14669
|
var defaultParseOptions = {
|
|
@@ -14633,7 +14678,7 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14633
14678
|
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
14634
14679
|
var nameValuePairStr = parts.shift();
|
|
14635
14680
|
var parsed = parseNameValuePair(nameValuePairStr);
|
|
14636
|
-
var name = parsed.name;
|
|
14681
|
+
var name$2 = parsed.name;
|
|
14637
14682
|
var value = parsed.value;
|
|
14638
14683
|
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
|
14639
14684
|
try {
|
|
@@ -14642,7 +14687,7 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14642
14687
|
console.error("set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.", e);
|
|
14643
14688
|
}
|
|
14644
14689
|
var cookie = {
|
|
14645
|
-
name,
|
|
14690
|
+
name: name$2,
|
|
14646
14691
|
value
|
|
14647
14692
|
};
|
|
14648
14693
|
parts.forEach(function(part) {
|
|
@@ -14659,15 +14704,15 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14659
14704
|
return cookie;
|
|
14660
14705
|
}
|
|
14661
14706
|
function parseNameValuePair(nameValuePairStr) {
|
|
14662
|
-
var name = "";
|
|
14707
|
+
var name$2 = "";
|
|
14663
14708
|
var value = "";
|
|
14664
14709
|
var nameValueArr = nameValuePairStr.split("=");
|
|
14665
14710
|
if (nameValueArr.length > 1) {
|
|
14666
|
-
name = nameValueArr.shift();
|
|
14711
|
+
name$2 = nameValueArr.shift();
|
|
14667
14712
|
value = nameValueArr.join("=");
|
|
14668
14713
|
} else value = nameValuePairStr;
|
|
14669
14714
|
return {
|
|
14670
|
-
name,
|
|
14715
|
+
name: name$2,
|
|
14671
14716
|
value
|
|
14672
14717
|
};
|
|
14673
14718
|
}
|
|
@@ -14746,9 +14791,9 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14746
14791
|
} });
|
|
14747
14792
|
var import_set_cookie_parser = __toESM$2(require_set_cookie());
|
|
14748
14793
|
var HEADERS_INVALID_CHARACTERS = /[^a-z0-9\-#$%&'*+.^_`|~]/i;
|
|
14749
|
-
function normalizeHeaderName(name) {
|
|
14750
|
-
if (HEADERS_INVALID_CHARACTERS.test(name) || name.trim() === "") throw new TypeError("Invalid character in header field name");
|
|
14751
|
-
return name.trim().toLowerCase();
|
|
14794
|
+
function normalizeHeaderName(name$2) {
|
|
14795
|
+
if (HEADERS_INVALID_CHARACTERS.test(name$2) || name$2.trim() === "") throw new TypeError("Invalid character in header field name");
|
|
14796
|
+
return name$2.trim().toLowerCase();
|
|
14752
14797
|
}
|
|
14753
14798
|
var charCodesToRemove = [
|
|
14754
14799
|
String.fromCharCode(10),
|
|
@@ -14813,72 +14858,72 @@ var Headers$1 = class _Headers {
|
|
|
14813
14858
|
this[_c] = "Headers";
|
|
14814
14859
|
if (["Headers", "HeadersPolyfill"].includes(init?.constructor.name) || init instanceof _Headers || typeof globalThis.Headers !== "undefined" && init instanceof globalThis.Headers) {
|
|
14815
14860
|
const initialHeaders = init;
|
|
14816
|
-
initialHeaders.forEach((value, name) => {
|
|
14817
|
-
this.append(name, value);
|
|
14861
|
+
initialHeaders.forEach((value, name$2) => {
|
|
14862
|
+
this.append(name$2, value);
|
|
14818
14863
|
}, this);
|
|
14819
|
-
} else if (Array.isArray(init)) init.forEach(([name, value]) => {
|
|
14820
|
-
this.append(name, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14864
|
+
} else if (Array.isArray(init)) init.forEach(([name$2, value]) => {
|
|
14865
|
+
this.append(name$2, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14821
14866
|
});
|
|
14822
|
-
else if (init) Object.getOwnPropertyNames(init).forEach((name) => {
|
|
14823
|
-
const value = init[name];
|
|
14824
|
-
this.append(name, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14867
|
+
else if (init) Object.getOwnPropertyNames(init).forEach((name$2) => {
|
|
14868
|
+
const value = init[name$2];
|
|
14869
|
+
this.append(name$2, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14825
14870
|
});
|
|
14826
14871
|
}
|
|
14827
14872
|
[(_a = NORMALIZED_HEADERS, _b = RAW_HEADER_NAMES, _c = Symbol.toStringTag, Symbol.iterator)]() {
|
|
14828
14873
|
return this.entries();
|
|
14829
14874
|
}
|
|
14830
14875
|
*keys() {
|
|
14831
|
-
for (const [name] of this.entries()) yield name;
|
|
14876
|
+
for (const [name$2] of this.entries()) yield name$2;
|
|
14832
14877
|
}
|
|
14833
14878
|
*values() {
|
|
14834
14879
|
for (const [, value] of this.entries()) yield value;
|
|
14835
14880
|
}
|
|
14836
14881
|
*entries() {
|
|
14837
14882
|
let sortedKeys = Object.keys(this[NORMALIZED_HEADERS]).sort((a, b) => a.localeCompare(b));
|
|
14838
|
-
for (const name of sortedKeys) if (name === "set-cookie") for (const value of this.getSetCookie()) yield [name, value];
|
|
14839
|
-
else yield [name, this.get(name)];
|
|
14883
|
+
for (const name$2 of sortedKeys) if (name$2 === "set-cookie") for (const value of this.getSetCookie()) yield [name$2, value];
|
|
14884
|
+
else yield [name$2, this.get(name$2)];
|
|
14840
14885
|
}
|
|
14841
14886
|
/**
|
|
14842
14887
|
* Returns a boolean stating whether a `Headers` object contains a certain header.
|
|
14843
14888
|
*/
|
|
14844
|
-
has(name) {
|
|
14845
|
-
if (!isValidHeaderName(name)) throw new TypeError(`Invalid header name "${name}"`);
|
|
14846
|
-
return this[NORMALIZED_HEADERS].hasOwnProperty(normalizeHeaderName(name));
|
|
14889
|
+
has(name$2) {
|
|
14890
|
+
if (!isValidHeaderName(name$2)) throw new TypeError(`Invalid header name "${name$2}"`);
|
|
14891
|
+
return this[NORMALIZED_HEADERS].hasOwnProperty(normalizeHeaderName(name$2));
|
|
14847
14892
|
}
|
|
14848
14893
|
/**
|
|
14849
14894
|
* Returns a `ByteString` sequence of all the values of a header with a given name.
|
|
14850
14895
|
*/
|
|
14851
|
-
get(name) {
|
|
14852
|
-
if (!isValidHeaderName(name)) throw TypeError(`Invalid header name "${name}"`);
|
|
14853
|
-
return this[NORMALIZED_HEADERS][normalizeHeaderName(name)] ?? null;
|
|
14896
|
+
get(name$2) {
|
|
14897
|
+
if (!isValidHeaderName(name$2)) throw TypeError(`Invalid header name "${name$2}"`);
|
|
14898
|
+
return this[NORMALIZED_HEADERS][normalizeHeaderName(name$2)] ?? null;
|
|
14854
14899
|
}
|
|
14855
14900
|
/**
|
|
14856
14901
|
* Sets a new value for an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
14857
14902
|
*/
|
|
14858
|
-
set(name, value) {
|
|
14859
|
-
if (!isValidHeaderName(name) || !isValidHeaderValue(value)) return;
|
|
14860
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14903
|
+
set(name$2, value) {
|
|
14904
|
+
if (!isValidHeaderName(name$2) || !isValidHeaderValue(value)) return;
|
|
14905
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14861
14906
|
const normalizedValue = normalizeHeaderValue(value);
|
|
14862
14907
|
this[NORMALIZED_HEADERS][normalizedName] = normalizeHeaderValue(normalizedValue);
|
|
14863
|
-
this[RAW_HEADER_NAMES].set(normalizedName, name);
|
|
14908
|
+
this[RAW_HEADER_NAMES].set(normalizedName, name$2);
|
|
14864
14909
|
}
|
|
14865
14910
|
/**
|
|
14866
14911
|
* Appends a new value onto an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
14867
14912
|
*/
|
|
14868
|
-
append(name, value) {
|
|
14869
|
-
if (!isValidHeaderName(name) || !isValidHeaderValue(value)) return;
|
|
14870
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14913
|
+
append(name$2, value) {
|
|
14914
|
+
if (!isValidHeaderName(name$2) || !isValidHeaderValue(value)) return;
|
|
14915
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14871
14916
|
const normalizedValue = normalizeHeaderValue(value);
|
|
14872
14917
|
let resolvedValue = this.has(normalizedName) ? `${this.get(normalizedName)}, ${normalizedValue}` : normalizedValue;
|
|
14873
|
-
this.set(name, resolvedValue);
|
|
14918
|
+
this.set(name$2, resolvedValue);
|
|
14874
14919
|
}
|
|
14875
14920
|
/**
|
|
14876
14921
|
* Deletes a header from the `Headers` object.
|
|
14877
14922
|
*/
|
|
14878
|
-
delete(name) {
|
|
14879
|
-
if (!isValidHeaderName(name)) return;
|
|
14880
|
-
if (!this.has(name)) return;
|
|
14881
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14923
|
+
delete(name$2) {
|
|
14924
|
+
if (!isValidHeaderName(name$2)) return;
|
|
14925
|
+
if (!this.has(name$2)) return;
|
|
14926
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14882
14927
|
delete this[NORMALIZED_HEADERS][normalizedName];
|
|
14883
14928
|
this[RAW_HEADER_NAMES].delete(normalizedName);
|
|
14884
14929
|
}
|
|
@@ -14887,7 +14932,7 @@ var Headers$1 = class _Headers {
|
|
|
14887
14932
|
* calling the given callback for each header.
|
|
14888
14933
|
*/
|
|
14889
14934
|
forEach(callback, thisArg) {
|
|
14890
|
-
for (const [name, value] of this.entries()) callback.call(thisArg, value, name, this);
|
|
14935
|
+
for (const [name$2, value] of this.entries()) callback.call(thisArg, value, name$2, this);
|
|
14891
14936
|
}
|
|
14892
14937
|
/**
|
|
14893
14938
|
* Returns an array containing the values
|
|
@@ -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];
|
|
@@ -15090,21 +15135,21 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15090
15135
|
continue;
|
|
15091
15136
|
}
|
|
15092
15137
|
if (char === ":") {
|
|
15093
|
-
var name = "";
|
|
15138
|
+
var name$2 = "";
|
|
15094
15139
|
var j = i + 1;
|
|
15095
15140
|
while (j < str.length) {
|
|
15096
15141
|
var code = str.charCodeAt(j);
|
|
15097
15142
|
if (code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95) {
|
|
15098
|
-
name += str[j++];
|
|
15143
|
+
name$2 += str[j++];
|
|
15099
15144
|
continue;
|
|
15100
15145
|
}
|
|
15101
15146
|
break;
|
|
15102
15147
|
}
|
|
15103
|
-
if (!name) throw new TypeError("Missing parameter name at ".concat(i));
|
|
15148
|
+
if (!name$2) throw new TypeError("Missing parameter name at ".concat(i));
|
|
15104
15149
|
tokens.push({
|
|
15105
15150
|
type: "NAME",
|
|
15106
15151
|
index: i,
|
|
15107
|
-
value: name
|
|
15152
|
+
value: name$2
|
|
15108
15153
|
});
|
|
15109
15154
|
i = j;
|
|
15110
15155
|
continue;
|
|
@@ -15196,9 +15241,9 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15196
15241
|
};
|
|
15197
15242
|
while (i < tokens.length) {
|
|
15198
15243
|
var char = tryConsume("CHAR");
|
|
15199
|
-
var name = tryConsume("NAME");
|
|
15244
|
+
var name$2 = tryConsume("NAME");
|
|
15200
15245
|
var pattern = tryConsume("PATTERN");
|
|
15201
|
-
if (name || pattern) {
|
|
15246
|
+
if (name$2 || pattern) {
|
|
15202
15247
|
var prefix = char || "";
|
|
15203
15248
|
if (prefixes.indexOf(prefix) === -1) {
|
|
15204
15249
|
path += prefix;
|
|
@@ -15209,7 +15254,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15209
15254
|
path = "";
|
|
15210
15255
|
}
|
|
15211
15256
|
result.push({
|
|
15212
|
-
name: name || key++,
|
|
15257
|
+
name: name$2 || key++,
|
|
15213
15258
|
prefix,
|
|
15214
15259
|
suffix: "",
|
|
15215
15260
|
pattern: pattern || safePattern(prefix),
|
|
@@ -15259,7 +15304,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15259
15304
|
*/
|
|
15260
15305
|
function tokensToFunction(tokens, options) {
|
|
15261
15306
|
if (options === void 0) options = {};
|
|
15262
|
-
var reFlags = flags(options);
|
|
15307
|
+
var reFlags = flags$1(options);
|
|
15263
15308
|
var _a$1 = options.encode, encode = _a$1 === void 0 ? function(x) {
|
|
15264
15309
|
return x;
|
|
15265
15310
|
} : _a$1, _b$1 = options.validate, validate = _b$1 === void 0 ? true : _b$1;
|
|
@@ -15307,12 +15352,12 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
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
|
*/
|
|
@@ -15352,7 +15397,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15352
15397
|
/**
|
|
15353
15398
|
* Get the flags for a regexp from the options.
|
|
15354
15399
|
*/
|
|
15355
|
-
function flags(options) {
|
|
15400
|
+
function flags$1(options) {
|
|
15356
15401
|
return options && options.sensitive ? "" : "i";
|
|
15357
15402
|
}
|
|
15358
15403
|
/**
|
|
@@ -15382,7 +15427,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15382
15427
|
var parts = paths.map(function(path) {
|
|
15383
15428
|
return pathToRegexp(path, keys, options).source;
|
|
15384
15429
|
});
|
|
15385
|
-
return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
|
|
15430
|
+
return new RegExp("(?:".concat(parts.join("|"), ")"), flags$1(options));
|
|
15386
15431
|
}
|
|
15387
15432
|
/**
|
|
15388
15433
|
* Create a path regexp from string input.
|
|
@@ -15429,7 +15474,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15429
15474
|
if (!strict) route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
|
|
15430
15475
|
if (!isEndDelimited) route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
|
|
15431
15476
|
}
|
|
15432
|
-
return new RegExp(route, flags(options));
|
|
15477
|
+
return new RegExp(route, flags$1(options));
|
|
15433
15478
|
}
|
|
15434
15479
|
exports.tokensToRegexp = tokensToRegexp;
|
|
15435
15480
|
/**
|
|
@@ -15446,10 +15491,9 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15446
15491
|
}
|
|
15447
15492
|
exports.pathToRegexp = pathToRegexp;
|
|
15448
15493
|
} });
|
|
15449
|
-
var import_dist = __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) {
|
|
15465
15509
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
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 = __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, 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$2;
|
|
@@ -16692,13 +16723,13 @@ var require_cookie = __commonJS$1({ "node_modules/cookie/index.js"(exports$1) {
|
|
|
16692
16723
|
}
|
|
16693
16724
|
return min;
|
|
16694
16725
|
}
|
|
16695
|
-
function serialize(name, val, opt) {
|
|
16726
|
+
function serialize(name$2, val, opt) {
|
|
16696
16727
|
var enc = opt && opt.encode || encodeURIComponent;
|
|
16697
16728
|
if (typeof enc !== "function") throw new TypeError("option encode is invalid");
|
|
16698
|
-
if (!cookieNameRegExp.test(name)) throw new TypeError("argument name is invalid");
|
|
16729
|
+
if (!cookieNameRegExp.test(name$2)) throw new TypeError("argument name is invalid");
|
|
16699
16730
|
var value = enc(val);
|
|
16700
16731
|
if (!cookieValueRegExp.test(value)) throw new TypeError("argument val is invalid");
|
|
16701
|
-
var str = name + "=" + value;
|
|
16732
|
+
var str = name$2 + "=" + value;
|
|
16702
16733
|
if (!opt) return str;
|
|
16703
16734
|
if (null != opt.maxAge) {
|
|
16704
16735
|
var maxAge = Math.floor(opt.maxAge);
|
|
@@ -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 = {};
|
|
@@ -16809,7 +16840,7 @@ function getAllRequestCookies(request) {
|
|
|
16809
16840
|
const requestCookieHeader = request.headers.get("cookie");
|
|
16810
16841
|
const cookiesFromHeaders = requestCookieHeader ? parseCookies(requestCookieHeader) : {};
|
|
16811
16842
|
const cookiesFromDocument = getDocumentCookies(request);
|
|
16812
|
-
for (const name in cookiesFromDocument) request.headers.append("cookie", source_default.serialize(name, cookiesFromDocument[name]));
|
|
16843
|
+
for (const name$2 in cookiesFromDocument) request.headers.append("cookie", source_default.serialize(name$2, cookiesFromDocument[name$2]));
|
|
16813
16844
|
const cookiesFromStore = cookieStore.getCookiesSync(request.url);
|
|
16814
16845
|
const storedCookiesObject = Object.fromEntries(cookiesFromStore.map((cookie) => [cookie.key, cookie.value]));
|
|
16815
16846
|
for (const cookie of cookiesFromStore) request.headers.append("cookie", cookie.toString());
|
|
@@ -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 = new URL(args.request.url);
|
|
16862
|
-
const match$
|
|
16893
|
+
const match$2 = matchRequestUrl(url, 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 = {
|
|
|
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);
|
|
@@ -17442,7 +17473,7 @@ var autofix_state_default = { autofix };
|
|
|
17442
17473
|
|
|
17443
17474
|
//#endregion
|
|
17444
17475
|
//#region ../mcp-server-mocks/dist/fixtures/issue.json
|
|
17445
|
-
var id$
|
|
17476
|
+
var id$3 = "6507376925";
|
|
17446
17477
|
var shareId = null;
|
|
17447
17478
|
var shortId = "CLOUDFLARE-MCP-41";
|
|
17448
17479
|
var title$1 = "Error: Tool list_organizations is already registered";
|
|
@@ -17454,7 +17485,7 @@ var status = "unresolved";
|
|
|
17454
17485
|
var statusDetails = {};
|
|
17455
17486
|
var substatus = "ongoing";
|
|
17456
17487
|
var isPublic = false;
|
|
17457
|
-
var platform$
|
|
17488
|
+
var platform$2 = "javascript";
|
|
17458
17489
|
var project = {
|
|
17459
17490
|
"id": "4509062593708032",
|
|
17460
17491
|
"name": "CLOUDFLARE-MCP",
|
|
@@ -17479,7 +17510,7 @@ var metadata$1 = {
|
|
|
17479
17510
|
};
|
|
17480
17511
|
var numComments = 0;
|
|
17481
17512
|
var assignedTo = null;
|
|
17482
|
-
var isBookmarked = false;
|
|
17513
|
+
var isBookmarked$1 = false;
|
|
17483
17514
|
var isSubscribed = false;
|
|
17484
17515
|
var subscriptionDetails = null;
|
|
17485
17516
|
var hasSeen = true;
|
|
@@ -17621,7 +17652,7 @@ var stats = {
|
|
|
17621
17652
|
};
|
|
17622
17653
|
var participants = [];
|
|
17623
17654
|
var issue_default = {
|
|
17624
|
-
id: id$
|
|
17655
|
+
id: id$3,
|
|
17625
17656
|
shareId,
|
|
17626
17657
|
shortId,
|
|
17627
17658
|
title: title$1,
|
|
@@ -17633,13 +17664,13 @@ var issue_default = {
|
|
|
17633
17664
|
statusDetails,
|
|
17634
17665
|
substatus,
|
|
17635
17666
|
isPublic,
|
|
17636
|
-
platform: platform$
|
|
17667
|
+
platform: platform$2,
|
|
17637
17668
|
project,
|
|
17638
17669
|
type: type$1,
|
|
17639
17670
|
metadata: metadata$1,
|
|
17640
17671
|
numComments,
|
|
17641
17672
|
assignedTo,
|
|
17642
|
-
isBookmarked,
|
|
17673
|
+
isBookmarked: isBookmarked$1,
|
|
17643
17674
|
isSubscribed,
|
|
17644
17675
|
subscriptionDetails,
|
|
17645
17676
|
hasSeen,
|
|
@@ -17668,7 +17699,7 @@ var issue_default = {
|
|
|
17668
17699
|
|
|
17669
17700
|
//#endregion
|
|
17670
17701
|
//#region ../mcp-server-mocks/dist/fixtures/event.json
|
|
17671
|
-
var id = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17702
|
+
var id$2 = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17672
17703
|
var groupID = "6507376925";
|
|
17673
17704
|
var eventID = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17674
17705
|
var projectID = "4509062593708032";
|
|
@@ -17937,7 +17968,7 @@ var tags = [
|
|
|
17937
17968
|
"value": "https://mcp.sentry.dev/sse"
|
|
17938
17969
|
}
|
|
17939
17970
|
];
|
|
17940
|
-
var platform = "javascript";
|
|
17971
|
+
var platform$1 = "javascript";
|
|
17941
17972
|
var dateReceived = "2025-04-08T21:15:04.700878Z";
|
|
17942
17973
|
var errors = [{
|
|
17943
17974
|
"type": "js_no_source",
|
|
@@ -17984,7 +18015,7 @@ var _meta = {
|
|
|
17984
18015
|
};
|
|
17985
18016
|
var crashFile = null;
|
|
17986
18017
|
var culprit = "Object.fetch(index)";
|
|
17987
|
-
var dateCreated = "2025-04-08T21:15:04Z";
|
|
18018
|
+
var dateCreated$2 = "2025-04-08T21:15:04Z";
|
|
17988
18019
|
var fingerprints = ["60d1c667b173018c004e399b29dc927d"];
|
|
17989
18020
|
var groupingConfig = {
|
|
17990
18021
|
"enhancements": "KLUv_SAYwQAAkwKRs25ld3N0eWxlOjIwMjMtMDEtMTGQ",
|
|
@@ -17997,7 +18028,7 @@ var resolvedWith = [null];
|
|
|
17997
18028
|
var nextEventID = null;
|
|
17998
18029
|
var previousEventID = "b7ed18493f4f4817a217b03839d4c017";
|
|
17999
18030
|
var event_default = {
|
|
18000
|
-
id,
|
|
18031
|
+
id: id$2,
|
|
18001
18032
|
groupID,
|
|
18002
18033
|
eventID,
|
|
18003
18034
|
projectID,
|
|
@@ -18015,14 +18046,14 @@ var event_default = {
|
|
|
18015
18046
|
type,
|
|
18016
18047
|
metadata,
|
|
18017
18048
|
tags,
|
|
18018
|
-
platform,
|
|
18049
|
+
platform: platform$1,
|
|
18019
18050
|
dateReceived,
|
|
18020
18051
|
errors,
|
|
18021
18052
|
occurrence,
|
|
18022
18053
|
_meta,
|
|
18023
18054
|
crashFile,
|
|
18024
18055
|
culprit,
|
|
18025
|
-
dateCreated,
|
|
18056
|
+
dateCreated: dateCreated$2,
|
|
18026
18057
|
fingerprints,
|
|
18027
18058
|
groupingConfig,
|
|
18028
18059
|
release,
|
|
@@ -18133,8 +18164,173 @@ var tags_default = [
|
|
|
18133
18164
|
}
|
|
18134
18165
|
];
|
|
18135
18166
|
|
|
18167
|
+
//#endregion
|
|
18168
|
+
//#region ../mcp-server-mocks/dist/fixtures/project.json
|
|
18169
|
+
var team = {
|
|
18170
|
+
"id": "4509106733776896",
|
|
18171
|
+
"slug": "the-goats",
|
|
18172
|
+
"name": "the-goats"
|
|
18173
|
+
};
|
|
18174
|
+
var teams = [{
|
|
18175
|
+
"id": "4509106733776896",
|
|
18176
|
+
"slug": "the-goats",
|
|
18177
|
+
"name": "the-goats"
|
|
18178
|
+
}];
|
|
18179
|
+
var id$1 = "4509109104082945";
|
|
18180
|
+
var name$1 = "cloudflare-mcp";
|
|
18181
|
+
var slug$1 = "cloudflare-mcp";
|
|
18182
|
+
var isBookmarked = false;
|
|
18183
|
+
var isMember$1 = true;
|
|
18184
|
+
var access$1 = [
|
|
18185
|
+
"event:admin",
|
|
18186
|
+
"alerts:read",
|
|
18187
|
+
"project:write",
|
|
18188
|
+
"org:integrations",
|
|
18189
|
+
"alerts:write",
|
|
18190
|
+
"member:read",
|
|
18191
|
+
"team:write",
|
|
18192
|
+
"project:read",
|
|
18193
|
+
"event:read",
|
|
18194
|
+
"event:write",
|
|
18195
|
+
"project:admin",
|
|
18196
|
+
"org:read",
|
|
18197
|
+
"team:admin",
|
|
18198
|
+
"project:releases",
|
|
18199
|
+
"team:read"
|
|
18200
|
+
];
|
|
18201
|
+
var hasAccess$1 = true;
|
|
18202
|
+
var dateCreated$1 = "2025-04-06T14:13:37.825970Z";
|
|
18203
|
+
var environments = [];
|
|
18204
|
+
var eventProcessing = { "symbolicationDegraded": false };
|
|
18205
|
+
var features = [
|
|
18206
|
+
"discard-groups",
|
|
18207
|
+
"alert-filters",
|
|
18208
|
+
"similarity-embeddings",
|
|
18209
|
+
"similarity-indexing",
|
|
18210
|
+
"similarity-view"
|
|
18211
|
+
];
|
|
18212
|
+
var firstEvent = null;
|
|
18213
|
+
var firstTransactionEvent = false;
|
|
18214
|
+
var hasSessions = false;
|
|
18215
|
+
var hasProfiles = false;
|
|
18216
|
+
var hasReplays = false;
|
|
18217
|
+
var hasFeedbacks = false;
|
|
18218
|
+
var hasNewFeedbacks = false;
|
|
18219
|
+
var hasMonitors = false;
|
|
18220
|
+
var hasMinifiedStackTrace = false;
|
|
18221
|
+
var hasInsightsHttp = false;
|
|
18222
|
+
var hasInsightsDb = false;
|
|
18223
|
+
var hasInsightsAssets = false;
|
|
18224
|
+
var hasInsightsAppStart = false;
|
|
18225
|
+
var hasInsightsScreenLoad = false;
|
|
18226
|
+
var hasInsightsVitals = false;
|
|
18227
|
+
var hasInsightsCaches = false;
|
|
18228
|
+
var hasInsightsQueues = false;
|
|
18229
|
+
var hasInsightsLlmMonitoring = false;
|
|
18230
|
+
var platform = "node";
|
|
18231
|
+
var platforms = [];
|
|
18232
|
+
var latestRelease = null;
|
|
18233
|
+
var hasUserReports = false;
|
|
18234
|
+
var hasFlags = false;
|
|
18235
|
+
var latestDeploys = null;
|
|
18236
|
+
var project_default = {
|
|
18237
|
+
team,
|
|
18238
|
+
teams,
|
|
18239
|
+
id: id$1,
|
|
18240
|
+
name: name$1,
|
|
18241
|
+
slug: slug$1,
|
|
18242
|
+
isBookmarked,
|
|
18243
|
+
isMember: isMember$1,
|
|
18244
|
+
access: access$1,
|
|
18245
|
+
hasAccess: hasAccess$1,
|
|
18246
|
+
dateCreated: dateCreated$1,
|
|
18247
|
+
environments,
|
|
18248
|
+
eventProcessing,
|
|
18249
|
+
features,
|
|
18250
|
+
firstEvent,
|
|
18251
|
+
firstTransactionEvent,
|
|
18252
|
+
hasSessions,
|
|
18253
|
+
hasProfiles,
|
|
18254
|
+
hasReplays,
|
|
18255
|
+
hasFeedbacks,
|
|
18256
|
+
hasNewFeedbacks,
|
|
18257
|
+
hasMonitors,
|
|
18258
|
+
hasMinifiedStackTrace,
|
|
18259
|
+
hasInsightsHttp,
|
|
18260
|
+
hasInsightsDb,
|
|
18261
|
+
hasInsightsAssets,
|
|
18262
|
+
hasInsightsAppStart,
|
|
18263
|
+
hasInsightsScreenLoad,
|
|
18264
|
+
hasInsightsVitals,
|
|
18265
|
+
hasInsightsCaches,
|
|
18266
|
+
hasInsightsQueues,
|
|
18267
|
+
hasInsightsLlmMonitoring,
|
|
18268
|
+
platform,
|
|
18269
|
+
platforms,
|
|
18270
|
+
latestRelease,
|
|
18271
|
+
hasUserReports,
|
|
18272
|
+
hasFlags,
|
|
18273
|
+
latestDeploys
|
|
18274
|
+
};
|
|
18275
|
+
|
|
18276
|
+
//#endregion
|
|
18277
|
+
//#region ../mcp-server-mocks/dist/fixtures/team.json
|
|
18278
|
+
var id = "4509106740854784";
|
|
18279
|
+
var slug = "the-goats";
|
|
18280
|
+
var name = "the-goats";
|
|
18281
|
+
var dateCreated = "2025-04-06T14:11:23.961739Z";
|
|
18282
|
+
var isMember = true;
|
|
18283
|
+
var teamRole = "admin";
|
|
18284
|
+
var flags = { "idp:provisioned": false };
|
|
18285
|
+
var access = [
|
|
18286
|
+
"team:read",
|
|
18287
|
+
"alerts:read",
|
|
18288
|
+
"event:write",
|
|
18289
|
+
"team:write",
|
|
18290
|
+
"team:admin",
|
|
18291
|
+
"event:read",
|
|
18292
|
+
"org:read",
|
|
18293
|
+
"member:read",
|
|
18294
|
+
"project:admin",
|
|
18295
|
+
"project:write",
|
|
18296
|
+
"org:integrations",
|
|
18297
|
+
"project:releases",
|
|
18298
|
+
"alerts:write",
|
|
18299
|
+
"event:admin",
|
|
18300
|
+
"project:read"
|
|
18301
|
+
];
|
|
18302
|
+
var hasAccess = true;
|
|
18303
|
+
var isPending = false;
|
|
18304
|
+
var memberCount = 1;
|
|
18305
|
+
var avatar = {
|
|
18306
|
+
"avatarType": "letter_avatar",
|
|
18307
|
+
"avatarUuid": null
|
|
18308
|
+
};
|
|
18309
|
+
var externalTeams = [];
|
|
18310
|
+
var projects = [];
|
|
18311
|
+
var team_default = {
|
|
18312
|
+
id,
|
|
18313
|
+
slug,
|
|
18314
|
+
name,
|
|
18315
|
+
dateCreated,
|
|
18316
|
+
isMember,
|
|
18317
|
+
teamRole,
|
|
18318
|
+
flags,
|
|
18319
|
+
access,
|
|
18320
|
+
hasAccess,
|
|
18321
|
+
isPending,
|
|
18322
|
+
memberCount,
|
|
18323
|
+
avatar,
|
|
18324
|
+
externalTeams,
|
|
18325
|
+
projects
|
|
18326
|
+
};
|
|
18327
|
+
|
|
18136
18328
|
//#endregion
|
|
18137
18329
|
//#region ../mcp-server-mocks/dist/index.js
|
|
18330
|
+
/**
|
|
18331
|
+
* Standard organization payload for mock responses.
|
|
18332
|
+
* Used across multiple endpoints for consistency.
|
|
18333
|
+
*/
|
|
18138
18334
|
const OrganizationPayload = {
|
|
18139
18335
|
id: "4509106740723712",
|
|
18140
18336
|
slug: "sentry-mcp-evals",
|
|
@@ -18144,6 +18340,10 @@ const OrganizationPayload = {
|
|
|
18144
18340
|
organizationUrl: "https://sentry.io/sentry-mcp-evals"
|
|
18145
18341
|
}
|
|
18146
18342
|
};
|
|
18343
|
+
/**
|
|
18344
|
+
* Standard release payload for mock responses.
|
|
18345
|
+
* Includes typical metadata and project associations.
|
|
18346
|
+
*/
|
|
18147
18347
|
const ReleasePayload = {
|
|
18148
18348
|
id: 1402755016,
|
|
18149
18349
|
version: "8ce89484-0fec-4913-a2cd-e8e2d41dee36",
|
|
@@ -18384,10 +18584,72 @@ const EventsSpansPayload = {
|
|
|
18384
18584
|
{}
|
|
18385
18585
|
]
|
|
18386
18586
|
};
|
|
18587
|
+
/**
|
|
18588
|
+
* Builds MSW handlers for both SaaS and self-hosted Sentry instances.
|
|
18589
|
+
*
|
|
18590
|
+
* Creates handlers based on the controlOnly flag:
|
|
18591
|
+
* - controlOnly: false (default) - Creates handlers for both sentry.io and us.sentry.io
|
|
18592
|
+
* - controlOnly: true - Creates handlers only for sentry.io (main host)
|
|
18593
|
+
*
|
|
18594
|
+
* @param handlers - Array of handler definitions with method, path, fetch function, and optional controlOnly flag
|
|
18595
|
+
* @returns Array of MSW http handlers
|
|
18596
|
+
*
|
|
18597
|
+
* @example Handler Definitions
|
|
18598
|
+
* ```typescript
|
|
18599
|
+
* buildHandlers([
|
|
18600
|
+
* {
|
|
18601
|
+
* method: "get",
|
|
18602
|
+
* path: "/api/0/auth/",
|
|
18603
|
+
* fetch: () => HttpResponse.json({ user: "data" }),
|
|
18604
|
+
* controlOnly: true // Only available on sentry.io
|
|
18605
|
+
* },
|
|
18606
|
+
* {
|
|
18607
|
+
* method: "get",
|
|
18608
|
+
* path: "/api/0/organizations/",
|
|
18609
|
+
* fetch: () => HttpResponse.json([OrganizationPayload]),
|
|
18610
|
+
* controlOnly: false // Available on both sentry.io and us.sentry.io
|
|
18611
|
+
* }
|
|
18612
|
+
* ]);
|
|
18613
|
+
* ```
|
|
18614
|
+
*/
|
|
18387
18615
|
function buildHandlers(handlers) {
|
|
18388
|
-
|
|
18616
|
+
const result = [];
|
|
18617
|
+
for (const handler of handlers) {
|
|
18618
|
+
result.push(http[handler.method](`https://sentry.io${handler.path}`, handler.fetch));
|
|
18619
|
+
if (!handler.controlOnly) result.push(http[handler.method](`https://us.sentry.io${handler.path}`, handler.fetch));
|
|
18620
|
+
}
|
|
18621
|
+
return result;
|
|
18389
18622
|
}
|
|
18623
|
+
/**
|
|
18624
|
+
* Complete set of Sentry API mock handlers.
|
|
18625
|
+
*
|
|
18626
|
+
* Covers all endpoints used by the MCP server with realistic responses,
|
|
18627
|
+
* parameter validation, and error scenarios.
|
|
18628
|
+
*/
|
|
18390
18629
|
const restHandlers = buildHandlers([
|
|
18630
|
+
{
|
|
18631
|
+
method: "get",
|
|
18632
|
+
path: "/api/0/auth/",
|
|
18633
|
+
controlOnly: true,
|
|
18634
|
+
fetch: () => {
|
|
18635
|
+
return HttpResponse.json({
|
|
18636
|
+
id: "1",
|
|
18637
|
+
name: "John Doe",
|
|
18638
|
+
email: "john.doe@example.com"
|
|
18639
|
+
});
|
|
18640
|
+
}
|
|
18641
|
+
},
|
|
18642
|
+
{
|
|
18643
|
+
method: "get",
|
|
18644
|
+
path: "/api/0/users/me/regions/",
|
|
18645
|
+
controlOnly: true,
|
|
18646
|
+
fetch: () => {
|
|
18647
|
+
return HttpResponse.json({ regions: [{
|
|
18648
|
+
name: "us",
|
|
18649
|
+
url: "https://us.sentry.io"
|
|
18650
|
+
}] });
|
|
18651
|
+
}
|
|
18652
|
+
},
|
|
18391
18653
|
{
|
|
18392
18654
|
method: "get",
|
|
18393
18655
|
path: "/api/0/organizations/",
|
|
@@ -18406,41 +18668,7 @@ const restHandlers = buildHandlers([
|
|
|
18406
18668
|
method: "get",
|
|
18407
18669
|
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18408
18670
|
fetch: () => {
|
|
18409
|
-
return HttpResponse.json([
|
|
18410
|
-
id: "4509106740854784",
|
|
18411
|
-
slug: "the-goats",
|
|
18412
|
-
name: "the-goats",
|
|
18413
|
-
dateCreated: "2025-04-06T14:11:23.961739Z",
|
|
18414
|
-
isMember: true,
|
|
18415
|
-
teamRole: "admin",
|
|
18416
|
-
flags: { "idp:provisioned": false },
|
|
18417
|
-
access: [
|
|
18418
|
-
"team:read",
|
|
18419
|
-
"alerts:read",
|
|
18420
|
-
"event:write",
|
|
18421
|
-
"team:write",
|
|
18422
|
-
"team:admin",
|
|
18423
|
-
"event:read",
|
|
18424
|
-
"org:read",
|
|
18425
|
-
"member:read",
|
|
18426
|
-
"project:admin",
|
|
18427
|
-
"project:write",
|
|
18428
|
-
"org:integrations",
|
|
18429
|
-
"project:releases",
|
|
18430
|
-
"alerts:write",
|
|
18431
|
-
"event:admin",
|
|
18432
|
-
"project:read"
|
|
18433
|
-
],
|
|
18434
|
-
hasAccess: true,
|
|
18435
|
-
isPending: false,
|
|
18436
|
-
memberCount: 1,
|
|
18437
|
-
avatar: {
|
|
18438
|
-
avatarType: "letter_avatar",
|
|
18439
|
-
avatarUuid: null
|
|
18440
|
-
},
|
|
18441
|
-
externalTeams: [],
|
|
18442
|
-
projects: []
|
|
18443
|
-
}]);
|
|
18671
|
+
return HttpResponse.json([team_default]);
|
|
18444
18672
|
}
|
|
18445
18673
|
},
|
|
18446
18674
|
{
|
|
@@ -18448,73 +18676,8 @@ const restHandlers = buildHandlers([
|
|
|
18448
18676
|
path: "/api/0/organizations/sentry-mcp-evals/projects/",
|
|
18449
18677
|
fetch: () => {
|
|
18450
18678
|
return HttpResponse.json([{
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
slug: "the-goats",
|
|
18454
|
-
name: "the-goats"
|
|
18455
|
-
},
|
|
18456
|
-
teams: [{
|
|
18457
|
-
id: "4509106733776896",
|
|
18458
|
-
slug: "the-goats",
|
|
18459
|
-
name: "the-goats"
|
|
18460
|
-
}],
|
|
18461
|
-
id: "4509106749636608",
|
|
18462
|
-
name: "cloudflare-mcp",
|
|
18463
|
-
slug: "cloudflare-mcp",
|
|
18464
|
-
isBookmarked: false,
|
|
18465
|
-
isMember: true,
|
|
18466
|
-
access: [
|
|
18467
|
-
"event:admin",
|
|
18468
|
-
"alerts:read",
|
|
18469
|
-
"project:write",
|
|
18470
|
-
"org:integrations",
|
|
18471
|
-
"alerts:write",
|
|
18472
|
-
"member:read",
|
|
18473
|
-
"team:write",
|
|
18474
|
-
"project:read",
|
|
18475
|
-
"event:read",
|
|
18476
|
-
"event:write",
|
|
18477
|
-
"project:admin",
|
|
18478
|
-
"org:read",
|
|
18479
|
-
"team:admin",
|
|
18480
|
-
"project:releases",
|
|
18481
|
-
"team:read"
|
|
18482
|
-
],
|
|
18483
|
-
hasAccess: true,
|
|
18484
|
-
dateCreated: "2025-04-06T14:13:37.825970Z",
|
|
18485
|
-
environments: [],
|
|
18486
|
-
eventProcessing: { symbolicationDegraded: false },
|
|
18487
|
-
features: [
|
|
18488
|
-
"discard-groups",
|
|
18489
|
-
"alert-filters",
|
|
18490
|
-
"similarity-embeddings",
|
|
18491
|
-
"similarity-indexing",
|
|
18492
|
-
"similarity-view"
|
|
18493
|
-
],
|
|
18494
|
-
firstEvent: null,
|
|
18495
|
-
firstTransactionEvent: false,
|
|
18496
|
-
hasSessions: false,
|
|
18497
|
-
hasProfiles: false,
|
|
18498
|
-
hasReplays: false,
|
|
18499
|
-
hasFeedbacks: false,
|
|
18500
|
-
hasNewFeedbacks: false,
|
|
18501
|
-
hasMonitors: false,
|
|
18502
|
-
hasMinifiedStackTrace: false,
|
|
18503
|
-
hasInsightsHttp: false,
|
|
18504
|
-
hasInsightsDb: false,
|
|
18505
|
-
hasInsightsAssets: false,
|
|
18506
|
-
hasInsightsAppStart: false,
|
|
18507
|
-
hasInsightsScreenLoad: false,
|
|
18508
|
-
hasInsightsVitals: false,
|
|
18509
|
-
hasInsightsCaches: false,
|
|
18510
|
-
hasInsightsQueues: false,
|
|
18511
|
-
hasInsightsLlmMonitoring: false,
|
|
18512
|
-
platform: "node",
|
|
18513
|
-
platforms: [],
|
|
18514
|
-
latestRelease: null,
|
|
18515
|
-
hasUserReports: false,
|
|
18516
|
-
hasFlags: false,
|
|
18517
|
-
latestDeploys: null
|
|
18679
|
+
...project_default,
|
|
18680
|
+
id: "4509106749636608"
|
|
18518
18681
|
}]);
|
|
18519
18682
|
}
|
|
18520
18683
|
},
|
|
@@ -18523,13 +18686,9 @@ const restHandlers = buildHandlers([
|
|
|
18523
18686
|
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18524
18687
|
fetch: () => {
|
|
18525
18688
|
return HttpResponse.json({
|
|
18689
|
+
...team_default,
|
|
18526
18690
|
id: "4509109078196224",
|
|
18527
|
-
slug: "the-goats",
|
|
18528
|
-
name: "the-goats",
|
|
18529
18691
|
dateCreated: "2025-04-07T00:05:48.196710Z",
|
|
18530
|
-
isMember: true,
|
|
18531
|
-
teamRole: "admin",
|
|
18532
|
-
flags: { "idp:provisioned": false },
|
|
18533
18692
|
access: [
|
|
18534
18693
|
"event:read",
|
|
18535
18694
|
"org:integrations",
|
|
@@ -18546,81 +18705,33 @@ const restHandlers = buildHandlers([
|
|
|
18546
18705
|
"project:read",
|
|
18547
18706
|
"project:admin",
|
|
18548
18707
|
"alerts:read"
|
|
18549
|
-
]
|
|
18550
|
-
|
|
18551
|
-
isPending: false,
|
|
18552
|
-
memberCount: 1,
|
|
18553
|
-
avatar: {
|
|
18554
|
-
avatarType: "letter_avatar",
|
|
18555
|
-
avatarUuid: null
|
|
18556
|
-
}
|
|
18557
|
-
});
|
|
18708
|
+
]
|
|
18709
|
+
}, { status: 201 });
|
|
18558
18710
|
}
|
|
18559
18711
|
},
|
|
18560
18712
|
{
|
|
18561
18713
|
method: "post",
|
|
18562
18714
|
path: "/api/0/teams/sentry-mcp-evals/the-goats/projects/",
|
|
18563
|
-
fetch: () => {
|
|
18715
|
+
fetch: async ({ request }) => {
|
|
18716
|
+
const body = await request.json();
|
|
18564
18717
|
return HttpResponse.json({
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
platform: "
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
"team:write",
|
|
18583
|
-
"alerts:write",
|
|
18584
|
-
"event:write",
|
|
18585
|
-
"org:read",
|
|
18586
|
-
"alerts:read",
|
|
18587
|
-
"event:admin",
|
|
18588
|
-
"project:admin",
|
|
18589
|
-
"event:read",
|
|
18590
|
-
"org:integrations",
|
|
18591
|
-
"project:read",
|
|
18592
|
-
"project:releases",
|
|
18593
|
-
"project:write",
|
|
18594
|
-
"member:read",
|
|
18595
|
-
"team:read",
|
|
18596
|
-
"team:admin"
|
|
18597
|
-
],
|
|
18598
|
-
hasAccess: true,
|
|
18599
|
-
hasMinifiedStackTrace: false,
|
|
18600
|
-
hasMonitors: false,
|
|
18601
|
-
hasProfiles: false,
|
|
18602
|
-
hasReplays: false,
|
|
18603
|
-
hasFeedbacks: false,
|
|
18604
|
-
hasFlags: false,
|
|
18605
|
-
hasNewFeedbacks: false,
|
|
18606
|
-
hasSessions: false,
|
|
18607
|
-
hasInsightsHttp: false,
|
|
18608
|
-
hasInsightsDb: false,
|
|
18609
|
-
hasInsightsAssets: false,
|
|
18610
|
-
hasInsightsAppStart: false,
|
|
18611
|
-
hasInsightsScreenLoad: false,
|
|
18612
|
-
hasInsightsVitals: false,
|
|
18613
|
-
hasInsightsCaches: false,
|
|
18614
|
-
hasInsightsQueues: false,
|
|
18615
|
-
hasInsightsLlmMonitoring: false,
|
|
18616
|
-
isInternal: false,
|
|
18617
|
-
isPublic: false,
|
|
18618
|
-
avatar: {
|
|
18619
|
-
avatarType: "letter_avatar",
|
|
18620
|
-
avatarUuid: null
|
|
18621
|
-
},
|
|
18622
|
-
color: "#bf3f55",
|
|
18623
|
-
status: "active"
|
|
18718
|
+
...project_default,
|
|
18719
|
+
name: body?.name || "cloudflare-mcp",
|
|
18720
|
+
slug: body?.slug || "cloudflare-mcp",
|
|
18721
|
+
platform: body?.platform || "node"
|
|
18722
|
+
});
|
|
18723
|
+
}
|
|
18724
|
+
},
|
|
18725
|
+
{
|
|
18726
|
+
method: "put",
|
|
18727
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/",
|
|
18728
|
+
fetch: async ({ request }) => {
|
|
18729
|
+
const body = await request.json();
|
|
18730
|
+
return HttpResponse.json({
|
|
18731
|
+
...project_default,
|
|
18732
|
+
slug: body?.slug || "cloudflare-mcp",
|
|
18733
|
+
name: body?.name || "cloudflare-mcp",
|
|
18734
|
+
platform: body?.platform || "node"
|
|
18624
18735
|
});
|
|
18625
18736
|
}
|
|
18626
18737
|
},
|
|
@@ -18831,8 +18942,112 @@ const restHandlers = buildHandlers([
|
|
|
18831
18942
|
method: "post",
|
|
18832
18943
|
path: "/api/0/organizations/sentry-mcp-evals/issues/PEATED-A8/autofix/",
|
|
18833
18944
|
fetch: () => HttpResponse.json({ run_id: 123 })
|
|
18945
|
+
},
|
|
18946
|
+
{
|
|
18947
|
+
method: "post",
|
|
18948
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/teams/the-goats/",
|
|
18949
|
+
fetch: async ({ request }) => {
|
|
18950
|
+
const body = await request.json();
|
|
18951
|
+
return HttpResponse.json({
|
|
18952
|
+
...team_default,
|
|
18953
|
+
id: "4509109078196224",
|
|
18954
|
+
slug: body?.slug || "the-goats",
|
|
18955
|
+
name: body?.name || "the-goats",
|
|
18956
|
+
dateCreated: "2025-04-07T00:05:48.196710Z"
|
|
18957
|
+
});
|
|
18958
|
+
}
|
|
18959
|
+
},
|
|
18960
|
+
{
|
|
18961
|
+
method: "put",
|
|
18962
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/",
|
|
18963
|
+
fetch: async ({ request }) => {
|
|
18964
|
+
const body = await request.json();
|
|
18965
|
+
const updatedIssue = {
|
|
18966
|
+
...issue_default,
|
|
18967
|
+
status: body?.status || issue_default.status,
|
|
18968
|
+
assignedTo: body?.assignedTo || issue_default.assignedTo
|
|
18969
|
+
};
|
|
18970
|
+
return HttpResponse.json(updatedIssue);
|
|
18971
|
+
}
|
|
18972
|
+
},
|
|
18973
|
+
{
|
|
18974
|
+
method: "put",
|
|
18975
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/",
|
|
18976
|
+
fetch: async ({ request }) => {
|
|
18977
|
+
const body = await request.json();
|
|
18978
|
+
const updatedIssue = {
|
|
18979
|
+
...issue_default,
|
|
18980
|
+
status: body?.status || issue_default.status,
|
|
18981
|
+
assignedTo: body?.assignedTo || issue_default.assignedTo
|
|
18982
|
+
};
|
|
18983
|
+
return HttpResponse.json(updatedIssue);
|
|
18984
|
+
}
|
|
18985
|
+
},
|
|
18986
|
+
{
|
|
18987
|
+
method: "put",
|
|
18988
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-42/",
|
|
18989
|
+
fetch: async ({ request }) => {
|
|
18990
|
+
const body = await request.json();
|
|
18991
|
+
const updatedIssue = {
|
|
18992
|
+
...issueFixture2,
|
|
18993
|
+
status: body?.status || issueFixture2.status,
|
|
18994
|
+
assignedTo: body?.assignedTo || issueFixture2.assignedTo
|
|
18995
|
+
};
|
|
18996
|
+
return HttpResponse.json(updatedIssue);
|
|
18997
|
+
}
|
|
18998
|
+
},
|
|
18999
|
+
{
|
|
19000
|
+
method: "put",
|
|
19001
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376926/",
|
|
19002
|
+
fetch: async ({ request }) => {
|
|
19003
|
+
const body = await request.json();
|
|
19004
|
+
const updatedIssue = {
|
|
19005
|
+
...issueFixture2,
|
|
19006
|
+
status: body?.status || issueFixture2.status,
|
|
19007
|
+
assignedTo: body?.assignedTo || issueFixture2.assignedTo
|
|
19008
|
+
};
|
|
19009
|
+
return HttpResponse.json(updatedIssue);
|
|
19010
|
+
}
|
|
18834
19011
|
}
|
|
18835
19012
|
]);
|
|
19013
|
+
/**
|
|
19014
|
+
* Configured MSW server instance with all Sentry API mock handlers.
|
|
19015
|
+
*
|
|
19016
|
+
* Ready-to-use mock server for testing and development. Includes all endpoints
|
|
19017
|
+
* with realistic data, parameter validation, and error scenarios.
|
|
19018
|
+
*
|
|
19019
|
+
* @example Test Setup
|
|
19020
|
+
* ```typescript
|
|
19021
|
+
* import { mswServer } from "@sentry/mcp-server-mocks";
|
|
19022
|
+
*
|
|
19023
|
+
* beforeAll(() => mswServer.listen({ onUnhandledRequest: 'error' }));
|
|
19024
|
+
* afterEach(() => mswServer.resetHandlers());
|
|
19025
|
+
* afterAll(() => mswServer.close());
|
|
19026
|
+
* ```
|
|
19027
|
+
*
|
|
19028
|
+
* @example Development Usage
|
|
19029
|
+
* ```typescript
|
|
19030
|
+
* import { mswServer } from "@sentry/mcp-server-mocks";
|
|
19031
|
+
*
|
|
19032
|
+
* // Start intercepting requests
|
|
19033
|
+
* mswServer.listen();
|
|
19034
|
+
*
|
|
19035
|
+
* // Your MCP server will now use mock responses
|
|
19036
|
+
* const apiService = new SentryApiService({ host: "sentry.io" });
|
|
19037
|
+
* const orgs = await apiService.listOrganizations();
|
|
19038
|
+
* console.log(orgs); // Returns mock organization data
|
|
19039
|
+
* ```
|
|
19040
|
+
*
|
|
19041
|
+
* @note User Data Endpoint Restrictions
|
|
19042
|
+
* The following endpoints are configured with `controlOnly: true` to work ONLY
|
|
19043
|
+
* with the main host (sentry.io) and will NOT respond to requests from
|
|
19044
|
+
* region-specific hosts (us.sentry.io, de.sentry.io):
|
|
19045
|
+
* - `/api/0/auth/` (whoami endpoint)
|
|
19046
|
+
* - `/api/0/users/me/regions/` (find_organizations endpoint)
|
|
19047
|
+
*
|
|
19048
|
+
* This matches the real Sentry API behavior where user data must always be queried
|
|
19049
|
+
* from the main API server.
|
|
19050
|
+
*/
|
|
18836
19051
|
const mswServer = setupServer(...restHandlers);
|
|
18837
19052
|
|
|
18838
19053
|
//#endregion
|