@sentry/mcp-server 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +40 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +35 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/{client-1dRfG57H.d.ts → client-Bxf4MxOz.d.cts} +10 -6
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-CTm4cvI7.js → client-D5xFZtxK.js} +19 -7
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-BsYOQsEI.d.cts → client-DOhBiaMJ.d.ts} +9 -5
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-DQ837FXP.cjs → client-GKHZSXgV.cjs} +19 -8
- package/dist/client-GKHZSXgV.cjs.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-BQRAzO5v.js → formatting-BaARL2gT.js} +11 -3
- package/dist/formatting-BaARL2gT.js.map +1 -0
- package/dist/{formatting-C-0bHtbh.cjs → formatting-C2kN0ok6.cjs} +11 -4
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +4 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +2 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +2 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +23 -27
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +7 -10
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
- package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
- package/dist/issue-helpers-CSNNO03f.js.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +1 -2
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +1 -2
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-D3ll3qCd.cjs} +6 -7
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +1 -0
- package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-DMucOchd.d.cts} +5 -5
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-H0q1_X-K.d.ts} +6 -6
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-aKmUZWWO.js} +5 -5
- package/dist/promptDefinitions-aKmUZWWO.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-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
- package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
- package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
- package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +6 -7
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +6 -7
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
- package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
- package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
- package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +0 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/schema-B8lT632E.cjs +77 -0
- package/dist/schema-B8lT632E.cjs.map +1 -0
- package/dist/schema-BkHf97d7.js +17 -0
- package/dist/schema-BkHf97d7.js.map +1 -0
- package/dist/{schema-CaJV2aIO.d.cts → schema-C-MLkWMc.d.ts} +385 -272
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-nyYqVk4Y.js → schema-CewAKS9A.js} +19 -3
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-KEMqYaQn.cjs → schema-DkyWSqp_.cjs} +31 -4
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-DwPOkoSP.d.ts → schema-DqxkW9Tx.d.cts} +387 -274
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -9
- package/dist/schema.d.cts +4 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +4 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-BWoJZj5B.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-DtNbD1c-.js → server-qpWdf-ST.js} +32 -25
- package/dist/server-qpWdf-ST.js.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +4 -5
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +4 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/{stdio-D4oW-qT6.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-D4oW-qT6.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-BLzMxGqU.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-BLzMxGqU.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +1568 -1320
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1568 -1319
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-BSC2D_S-.js} +95 -79
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-BtHN8t_d.cjs} +96 -81
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-Dp13BpEu.d.cts} +58 -26
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-fQrpWznJ.d.ts} +57 -25
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-B8ufMRZx.js → tools-4Rtn4WEf.js} +58 -57
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BYt-G6p2.cjs → tools-DHHqAqP9.cjs} +59 -59
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +55 -26
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +55 -26
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +154 -62
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +135 -42
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +4 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +4 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-TaJcaAVg.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-Ds7qzCBB.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-DyM4kaGZ.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-CPuN4Qmi.d.cts → types-DuUmV9zh.d.ts} +5 -5
- package/dist/types-DuUmV9zh.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/version-BT9r_3jm.js +6 -0
- package/dist/{version-dTEKpaGt.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-B0O4KvZ9.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-B0O4KvZ9.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-1dRfG57H.d.ts.map +0 -1
- package/dist/client-BsYOQsEI.d.cts.map +0 -1
- package/dist/client-CTm4cvI7.js.map +0 -1
- package/dist/client-DQ837FXP.cjs.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/formatting-BQRAzO5v.js.map +0 -1
- package/dist/formatting-C-0bHtbh.cjs.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
- package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
- package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
- package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
- package/dist/schema-BCkBPgjj.cjs +0 -64
- package/dist/schema-BCkBPgjj.cjs.map +0 -1
- package/dist/schema-CJrk_GUH.js +0 -15
- package/dist/schema-CJrk_GUH.js.map +0 -1
- package/dist/schema-CaJV2aIO.d.cts.map +0 -1
- package/dist/schema-DwPOkoSP.d.ts.map +0 -1
- package/dist/schema-KEMqYaQn.cjs.map +0 -1
- package/dist/schema-nyYqVk4Y.js.map +0 -1
- package/dist/server-BWoJZj5B.cjs.map +0 -1
- package/dist/server-DtNbD1c-.js.map +0 -1
- package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
- package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
- package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
- package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
- package/dist/tools-B8ufMRZx.js.map +0 -1
- package/dist/tools-BYt-G6p2.cjs.map +0 -1
- package/dist/types-CPuN4Qmi.d.cts.map +0 -1
- package/dist/types-Ds7qzCBB.d.ts.map +0 -1
- package/dist/types-DyM4kaGZ.d.ts.map +0 -1
- package/dist/types-TaJcaAVg.d.cts.map +0 -1
- package/dist/version-dTEKpaGt.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) {
|
|
@@ -24,17 +31,17 @@ function serializePositional(positional, flag) {
|
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
|
-
function format(message$
|
|
28
|
-
if (positionals.length === 0) return message$
|
|
34
|
+
function format(message$3, ...positionals) {
|
|
35
|
+
if (positionals.length === 0) return message$3;
|
|
29
36
|
let positionalIndex = 0;
|
|
30
|
-
let formattedMessage = message$
|
|
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, "%");
|
|
@@ -48,20 +55,20 @@ function cleanErrorStack(error$2) {
|
|
|
48
55
|
error$2.stack = nextStack.join("\n");
|
|
49
56
|
}
|
|
50
57
|
var InvariantError = class extends Error {
|
|
51
|
-
constructor(message$
|
|
52
|
-
super(message$
|
|
53
|
-
this.message = message$
|
|
58
|
+
constructor(message$3, ...positionals) {
|
|
59
|
+
super(message$3);
|
|
60
|
+
this.message = message$3;
|
|
54
61
|
this.name = "Invariant Violation";
|
|
55
|
-
this.message = format(message$
|
|
62
|
+
this.message = format(message$3, ...positionals);
|
|
56
63
|
cleanErrorStack(this);
|
|
57
64
|
}
|
|
58
65
|
};
|
|
59
|
-
var invariant = (predicate, message$
|
|
60
|
-
if (!predicate) throw new InvariantError(message$
|
|
66
|
+
var invariant = (predicate, message$3, ...positionals) => {
|
|
67
|
+
if (!predicate) throw new InvariantError(message$3, ...positionals);
|
|
61
68
|
};
|
|
62
|
-
invariant.as = (ErrorConstructor, predicate, message$
|
|
69
|
+
invariant.as = (ErrorConstructor, predicate, message$3, ...positionals) => {
|
|
63
70
|
if (!predicate) {
|
|
64
|
-
const formatMessage$1 = positionals.length === 0 ? message$
|
|
71
|
+
const formatMessage$1 = positionals.length === 0 ? message$3 : format(message$3, ...positionals);
|
|
65
72
|
let error$2;
|
|
66
73
|
try {
|
|
67
74
|
error$2 = Reflect.construct(ErrorConstructor, [formatMessage$1]);
|
|
@@ -72,6 +79,13 @@ invariant.as = (ErrorConstructor, predicate, message$2, ...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,10 +173,10 @@ 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
|
-
constructor(message$
|
|
165
|
-
super(message$
|
|
178
|
+
constructor(message$3) {
|
|
179
|
+
super(message$3);
|
|
166
180
|
this.name = "InterceptorError";
|
|
167
181
|
Object.setPrototypeOf(this, InterceptorError.prototype);
|
|
168
182
|
}
|
|
@@ -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);
|
|
@@ -302,8 +336,8 @@ async function handleRequest$1(options) {
|
|
|
302
336
|
function isNodeProcess() {
|
|
303
337
|
if (typeof navigator !== "undefined" && navigator.product === "ReactNative") return true;
|
|
304
338
|
if (typeof process !== "undefined") {
|
|
305
|
-
const type = process.type;
|
|
306
|
-
if (type === "renderer" || type === "worker") return false;
|
|
339
|
+
const type$2 = process.type;
|
|
340
|
+
if (type$2 === "renderer" || type$2 === "worker") return false;
|
|
307
341
|
return !!(process.versions && process.versions.node);
|
|
308
342
|
}
|
|
309
343
|
return false;
|
|
@@ -372,10 +406,10 @@ var Logger = class {
|
|
|
372
406
|
* @example
|
|
373
407
|
* logger.debug('no duplicates found, creating a document...')
|
|
374
408
|
*/
|
|
375
|
-
debug(message$
|
|
409
|
+
debug(message$3, ...positionals) {
|
|
376
410
|
this.logEntry({
|
|
377
411
|
level: "debug",
|
|
378
|
-
message: gray(message$
|
|
412
|
+
message: gray(message$3),
|
|
379
413
|
positionals,
|
|
380
414
|
prefix: this.prefix,
|
|
381
415
|
colors: { prefix: "gray" }
|
|
@@ -386,10 +420,10 @@ var Logger = class {
|
|
|
386
420
|
* @example
|
|
387
421
|
* logger.info('start parsing...')
|
|
388
422
|
*/
|
|
389
|
-
info(message$
|
|
423
|
+
info(message$3, ...positionals) {
|
|
390
424
|
this.logEntry({
|
|
391
425
|
level: "info",
|
|
392
|
-
message: message$
|
|
426
|
+
message: message$3,
|
|
393
427
|
positionals,
|
|
394
428
|
prefix: this.prefix,
|
|
395
429
|
colors: { prefix: "blue" }
|
|
@@ -411,10 +445,10 @@ var Logger = class {
|
|
|
411
445
|
* @example
|
|
412
446
|
* logger.success('successfully created document')
|
|
413
447
|
*/
|
|
414
|
-
success(message$
|
|
448
|
+
success(message$3, ...positionals) {
|
|
415
449
|
this.logEntry({
|
|
416
450
|
level: "info",
|
|
417
|
-
message: message$
|
|
451
|
+
message: message$3,
|
|
418
452
|
positionals,
|
|
419
453
|
prefix: `\u2714 ${this.prefix}`,
|
|
420
454
|
colors: {
|
|
@@ -428,10 +462,10 @@ var Logger = class {
|
|
|
428
462
|
* @example
|
|
429
463
|
* logger.warning('found legacy document format')
|
|
430
464
|
*/
|
|
431
|
-
warning(message$
|
|
465
|
+
warning(message$3, ...positionals) {
|
|
432
466
|
this.logEntry({
|
|
433
467
|
level: "warning",
|
|
434
|
-
message: message$
|
|
468
|
+
message: message$3,
|
|
435
469
|
positionals,
|
|
436
470
|
prefix: `\u26A0 ${this.prefix}`,
|
|
437
471
|
colors: {
|
|
@@ -445,10 +479,10 @@ var Logger = class {
|
|
|
445
479
|
* @example
|
|
446
480
|
* logger.error('something went wrong')
|
|
447
481
|
*/
|
|
448
|
-
error(message$
|
|
482
|
+
error(message$3, ...positionals) {
|
|
449
483
|
this.logEntry({
|
|
450
484
|
level: "error",
|
|
451
|
-
message: message$
|
|
485
|
+
message: message$3,
|
|
452
486
|
positionals,
|
|
453
487
|
prefix: `\u2716 ${this.prefix}`,
|
|
454
488
|
colors: {
|
|
@@ -469,30 +503,30 @@ var Logger = class {
|
|
|
469
503
|
only(callback) {
|
|
470
504
|
callback();
|
|
471
505
|
}
|
|
472
|
-
createEntry(level, message$
|
|
506
|
+
createEntry(level$1, message$3) {
|
|
473
507
|
return {
|
|
474
508
|
timestamp: /* @__PURE__ */ new Date(),
|
|
475
|
-
level,
|
|
476
|
-
message: message$
|
|
509
|
+
level: level$1,
|
|
510
|
+
message: message$3
|
|
477
511
|
};
|
|
478
512
|
}
|
|
479
513
|
logEntry(args) {
|
|
480
|
-
const { level, message: message$
|
|
481
|
-
const entry = this.createEntry(level, message$
|
|
514
|
+
const { level: level$1, message: message$3, prefix, colors: customColors, positionals = [] } = args;
|
|
515
|
+
const entry = this.createEntry(level$1, message$3);
|
|
482
516
|
const timestampColor = customColors?.timestamp || "gray";
|
|
483
517
|
const prefixColor = customColors?.prefix || "gray";
|
|
484
518
|
const colorize = {
|
|
485
519
|
timestamp: colors_exports[timestampColor],
|
|
486
520
|
prefix: colors_exports[prefixColor]
|
|
487
521
|
};
|
|
488
|
-
const write = this.getWriter(level);
|
|
489
|
-
write([colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message$
|
|
522
|
+
const write = this.getWriter(level$1);
|
|
523
|
+
write([colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message$3)).join(" "), ...positionals.map(serializeInput));
|
|
490
524
|
}
|
|
491
525
|
formatTimestamp(timestamp) {
|
|
492
526
|
return `${timestamp.toLocaleTimeString("en-GB")}:${timestamp.getMilliseconds()}`;
|
|
493
527
|
}
|
|
494
|
-
getWriter(level) {
|
|
495
|
-
switch (level) {
|
|
528
|
+
getWriter(level$1) {
|
|
529
|
+
switch (level$1) {
|
|
496
530
|
case "debug":
|
|
497
531
|
case "success":
|
|
498
532
|
case "info": return log;
|
|
@@ -515,26 +549,26 @@ var PerformanceEntry = class {
|
|
|
515
549
|
}
|
|
516
550
|
};
|
|
517
551
|
var noop = () => void 0;
|
|
518
|
-
function log(message$
|
|
552
|
+
function log(message$3, ...positionals) {
|
|
519
553
|
if (IS_NODE$1) {
|
|
520
|
-
process.stdout.write(format(message$
|
|
554
|
+
process.stdout.write(format(message$3, ...positionals) + "\n");
|
|
521
555
|
return;
|
|
522
556
|
}
|
|
523
|
-
console.log(message$
|
|
557
|
+
console.log(message$3, ...positionals);
|
|
524
558
|
}
|
|
525
|
-
function warn$1(message$
|
|
559
|
+
function warn$1(message$3, ...positionals) {
|
|
526
560
|
if (IS_NODE$1) {
|
|
527
|
-
process.stderr.write(format(message$
|
|
561
|
+
process.stderr.write(format(message$3, ...positionals) + "\n");
|
|
528
562
|
return;
|
|
529
563
|
}
|
|
530
|
-
console.warn(message$
|
|
564
|
+
console.warn(message$3, ...positionals);
|
|
531
565
|
}
|
|
532
|
-
function error$1(message$
|
|
566
|
+
function error$1(message$3, ...positionals) {
|
|
533
567
|
if (IS_NODE$1) {
|
|
534
|
-
process.stderr.write(format(message$
|
|
568
|
+
process.stderr.write(format(message$3, ...positionals) + "\n");
|
|
535
569
|
return;
|
|
536
570
|
}
|
|
537
|
-
console.error(message$
|
|
571
|
+
console.error(message$3, ...positionals);
|
|
538
572
|
}
|
|
539
573
|
function getVariable(variableName) {
|
|
540
574
|
if (IS_NODE$1) return process.env[variableName];
|
|
@@ -543,22 +577,22 @@ function getVariable(variableName) {
|
|
|
543
577
|
function isDefinedAndNotEquals(value, expected) {
|
|
544
578
|
return value !== void 0 && value !== expected;
|
|
545
579
|
}
|
|
546
|
-
function serializeInput(message$
|
|
547
|
-
if (typeof message$
|
|
548
|
-
if (message$
|
|
549
|
-
if (typeof message$
|
|
550
|
-
if (typeof message$
|
|
551
|
-
return message$
|
|
580
|
+
function serializeInput(message$3) {
|
|
581
|
+
if (typeof message$3 === "undefined") return "undefined";
|
|
582
|
+
if (message$3 === null) return "null";
|
|
583
|
+
if (typeof message$3 === "string") return message$3;
|
|
584
|
+
if (typeof message$3 === "object") return JSON.stringify(message$3);
|
|
585
|
+
return message$3.toString();
|
|
552
586
|
}
|
|
553
587
|
|
|
554
588
|
//#endregion
|
|
555
589
|
//#region ../../node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.mjs
|
|
556
590
|
var MemoryLeakError = class extends Error {
|
|
557
|
-
constructor(emitter, type, count) {
|
|
558
|
-
super(`Possible EventEmitter memory leak detected. ${count} ${type.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`);
|
|
591
|
+
constructor(emitter, type$2, count$1) {
|
|
592
|
+
super(`Possible EventEmitter memory leak detected. ${count$1} ${type$2.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`);
|
|
559
593
|
this.emitter = emitter;
|
|
560
|
-
this.type = type;
|
|
561
|
-
this.count = count;
|
|
594
|
+
this.type = type$2;
|
|
595
|
+
this.count = count$1;
|
|
562
596
|
this.name = "MaxListenersExceededWarning";
|
|
563
597
|
}
|
|
564
598
|
};
|
|
@@ -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;
|
|
@@ -737,34 +771,34 @@ var Interceptor$1 = class {
|
|
|
737
771
|
* Returns an already running interceptor instance if it's present.
|
|
738
772
|
*/
|
|
739
773
|
apply() {
|
|
740
|
-
const logger$
|
|
741
|
-
logger$
|
|
774
|
+
const logger$2 = this.logger.extend("apply");
|
|
775
|
+
logger$2.info("applying the interceptor...");
|
|
742
776
|
if (this.readyState === "APPLIED") {
|
|
743
|
-
logger$
|
|
777
|
+
logger$2.info("intercepted already applied!");
|
|
744
778
|
return;
|
|
745
779
|
}
|
|
746
780
|
const shouldApply = this.checkEnvironment();
|
|
747
781
|
if (!shouldApply) {
|
|
748
|
-
logger$
|
|
782
|
+
logger$2.info("the interceptor cannot be applied in this environment!");
|
|
749
783
|
return;
|
|
750
784
|
}
|
|
751
785
|
this.readyState = "APPLYING";
|
|
752
786
|
const runningInstance = this.getInstance();
|
|
753
787
|
if (runningInstance) {
|
|
754
|
-
logger$
|
|
788
|
+
logger$2.info("found a running instance, reusing...");
|
|
755
789
|
this.on = (event, listener) => {
|
|
756
|
-
logger$
|
|
790
|
+
logger$2.info("proxying the \"%s\" listener", event);
|
|
757
791
|
runningInstance.emitter.addListener(event, listener);
|
|
758
792
|
this.subscriptions.push(() => {
|
|
759
793
|
runningInstance.emitter.removeListener(event, listener);
|
|
760
|
-
logger$
|
|
794
|
+
logger$2.info("removed proxied \"%s\" listener!", event);
|
|
761
795
|
});
|
|
762
796
|
return this;
|
|
763
797
|
};
|
|
764
798
|
this.readyState = "APPLIED";
|
|
765
799
|
return;
|
|
766
800
|
}
|
|
767
|
-
logger$
|
|
801
|
+
logger$2.info("no running instance found, setting up a new instance...");
|
|
768
802
|
this.setup();
|
|
769
803
|
this.setInstance();
|
|
770
804
|
this.readyState = "APPLIED";
|
|
@@ -779,12 +813,12 @@ var Interceptor$1 = class {
|
|
|
779
813
|
* Listen to the interceptor's public events.
|
|
780
814
|
*/
|
|
781
815
|
on(event, listener) {
|
|
782
|
-
const logger$
|
|
816
|
+
const logger$2 = this.logger.extend("on");
|
|
783
817
|
if (this.readyState === "DISPOSING" || this.readyState === "DISPOSED") {
|
|
784
|
-
logger$
|
|
818
|
+
logger$2.info("cannot listen to events, already disposed!");
|
|
785
819
|
return this;
|
|
786
820
|
}
|
|
787
|
-
logger$
|
|
821
|
+
logger$2.info("adding \"%s\" event listener:", event, listener);
|
|
788
822
|
this.emitter.on(event, listener);
|
|
789
823
|
return this;
|
|
790
824
|
}
|
|
@@ -804,27 +838,27 @@ var Interceptor$1 = class {
|
|
|
804
838
|
* Disposes of any side-effects this interceptor has introduced.
|
|
805
839
|
*/
|
|
806
840
|
dispose() {
|
|
807
|
-
const logger$
|
|
841
|
+
const logger$2 = this.logger.extend("dispose");
|
|
808
842
|
if (this.readyState === "DISPOSED") {
|
|
809
|
-
logger$
|
|
843
|
+
logger$2.info("cannot dispose, already disposed!");
|
|
810
844
|
return;
|
|
811
845
|
}
|
|
812
|
-
logger$
|
|
846
|
+
logger$2.info("disposing the interceptor...");
|
|
813
847
|
this.readyState = "DISPOSING";
|
|
814
848
|
if (!this.getInstance()) {
|
|
815
|
-
logger$
|
|
849
|
+
logger$2.info("no interceptors running, skipping dispose...");
|
|
816
850
|
return;
|
|
817
851
|
}
|
|
818
852
|
this.clearInstance();
|
|
819
|
-
logger$
|
|
853
|
+
logger$2.info("global symbol deleted:", getGlobalSymbol$1(this.symbol));
|
|
820
854
|
if (this.subscriptions.length > 0) {
|
|
821
|
-
logger$
|
|
855
|
+
logger$2.info("disposing of %d subscriptions...", this.subscriptions.length);
|
|
822
856
|
for (const dispose of this.subscriptions) dispose();
|
|
823
857
|
this.subscriptions = [];
|
|
824
|
-
logger$
|
|
858
|
+
logger$2.info("disposed of all subscriptions!", this.subscriptions.length);
|
|
825
859
|
}
|
|
826
860
|
this.emitter.removeAllListeners();
|
|
827
|
-
logger$
|
|
861
|
+
logger$2.info("destroyed the listener!");
|
|
828
862
|
this.readyState = "DISPOSED";
|
|
829
863
|
}
|
|
830
864
|
getInstance() {
|
|
@@ -845,24 +879,41 @@ 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
|
-
static isConfigurableStatusCode(status) {
|
|
850
|
-
return status >= 200 && status <= 599;
|
|
899
|
+
static isConfigurableStatusCode(status$1) {
|
|
900
|
+
return status$1 >= 200 && status$1 <= 599;
|
|
851
901
|
}
|
|
852
|
-
static isRedirectResponse(status) {
|
|
853
|
-
return _FetchResponse.STATUS_CODES_WITH_REDIRECT.includes(status);
|
|
902
|
+
static isRedirectResponse(status$1) {
|
|
903
|
+
return _FetchResponse.STATUS_CODES_WITH_REDIRECT.includes(status$1);
|
|
854
904
|
}
|
|
855
905
|
/**
|
|
856
906
|
* Returns a boolean indicating whether the given response status
|
|
857
907
|
* code represents a response that can have a body.
|
|
858
908
|
*/
|
|
859
|
-
static isResponseWithBody(status) {
|
|
860
|
-
return !_FetchResponse.STATUS_CODES_WITHOUT_BODY.includes(status);
|
|
909
|
+
static isResponseWithBody(status$1) {
|
|
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,
|
|
@@ -879,20 +930,19 @@ var _FetchResponse = class extends Response {
|
|
|
879
930
|
}
|
|
880
931
|
constructor(body, init = {}) {
|
|
881
932
|
var _a$1;
|
|
882
|
-
const status = (_a$1 = init.status) != null ? _a$1 : 200;
|
|
883
|
-
const safeStatus = _FetchResponse.isConfigurableStatusCode(status) ? status : 200;
|
|
884
|
-
const finalBody = _FetchResponse.isResponseWithBody(status) ? body : null;
|
|
933
|
+
const status$1 = (_a$1 = init.status) != null ? _a$1 : 200;
|
|
934
|
+
const safeStatus = _FetchResponse.isConfigurableStatusCode(status$1) ? status$1 : 200;
|
|
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
|
-
if (status !== safeStatus) {
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
} else Object.defineProperty(this, "status", {
|
|
895
|
-
value: status,
|
|
941
|
+
if (status$1 !== safeStatus) {
|
|
942
|
+
const state = getValueBySymbol("state", this);
|
|
943
|
+
if (state) state.status = status$1;
|
|
944
|
+
else Object.defineProperty(this, "status", {
|
|
945
|
+
value: status$1,
|
|
896
946
|
enumerable: true,
|
|
897
947
|
configurable: true,
|
|
898
948
|
writable: false
|
|
@@ -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;
|
|
@@ -1139,7 +1191,7 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1139
1191
|
socket: this
|
|
1140
1192
|
});
|
|
1141
1193
|
};
|
|
1142
|
-
this.onResponseStart = (versionMajor, versionMinor, rawHeaders, method, url, status, statusText) => {
|
|
1194
|
+
this.onResponseStart = (versionMajor, versionMinor, rawHeaders, method, url, status$1, statusText) => {
|
|
1143
1195
|
const headers = FetchResponse.parseRawHeaders(rawHeaders);
|
|
1144
1196
|
const response = new FetchResponse(
|
|
1145
1197
|
/**
|
|
@@ -1149,15 +1201,16 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1149
1201
|
* in response listener while the Socket instance delays the emission
|
|
1150
1202
|
* of "end" and other events until those response listeners are finished.
|
|
1151
1203
|
*/
|
|
1152
|
-
FetchResponse.isResponseWithBody(status) ? Readable.toWeb(this.responseStream = new Readable({ read() {} })) : null,
|
|
1204
|
+
FetchResponse.isResponseWithBody(status$1) ? Readable.toWeb(this.responseStream = new Readable({ read() {} })) : null,
|
|
1153
1205
|
{
|
|
1154
1206
|
url,
|
|
1155
|
-
status,
|
|
1207
|
+
status: status$1,
|
|
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
|
});
|
|
@@ -1404,7 +1462,7 @@ var MockHttpsAgent = class extends https2.Agent {
|
|
|
1404
1462
|
return socket;
|
|
1405
1463
|
}
|
|
1406
1464
|
};
|
|
1407
|
-
var logger = new Logger("utils getUrlByRequestOptions");
|
|
1465
|
+
var logger$1 = new Logger("utils getUrlByRequestOptions");
|
|
1408
1466
|
var DEFAULT_PATH = "/";
|
|
1409
1467
|
var DEFAULT_PROTOCOL = "http:";
|
|
1410
1468
|
var DEFAULT_HOSTNAME = "localhost";
|
|
@@ -1450,29 +1508,29 @@ function getHostname(options) {
|
|
|
1450
1508
|
return DEFAULT_HOSTNAME;
|
|
1451
1509
|
}
|
|
1452
1510
|
function getUrlByRequestOptions(options) {
|
|
1453
|
-
logger.info("request options", options);
|
|
1511
|
+
logger$1.info("request options", options);
|
|
1454
1512
|
if (options.uri) {
|
|
1455
|
-
logger.info("constructing url from explicitly provided \"options.uri\": %s", options.uri);
|
|
1513
|
+
logger$1.info("constructing url from explicitly provided \"options.uri\": %s", options.uri);
|
|
1456
1514
|
return new URL(options.uri.href);
|
|
1457
1515
|
}
|
|
1458
|
-
logger.info("figuring out url from request options...");
|
|
1516
|
+
logger$1.info("figuring out url from request options...");
|
|
1459
1517
|
const protocol = getProtocolByRequestOptions(options);
|
|
1460
|
-
logger.info("protocol", protocol);
|
|
1518
|
+
logger$1.info("protocol", protocol);
|
|
1461
1519
|
const port = getPortByRequestOptions(options);
|
|
1462
|
-
logger.info("port", port);
|
|
1520
|
+
logger$1.info("port", port);
|
|
1463
1521
|
const hostname = getHostname(options);
|
|
1464
|
-
logger.info("hostname", hostname);
|
|
1522
|
+
logger$1.info("hostname", hostname);
|
|
1465
1523
|
const path = options.path || DEFAULT_PATH;
|
|
1466
|
-
logger.info("path", path);
|
|
1524
|
+
logger$1.info("path", path);
|
|
1467
1525
|
const credentials = getAuthByRequestOptions(options);
|
|
1468
|
-
logger.info("credentials", credentials);
|
|
1526
|
+
logger$1.info("credentials", credentials);
|
|
1469
1527
|
const authString = credentials ? `${credentials.username}:${credentials.password}@` : "";
|
|
1470
|
-
logger.info("auth string:", authString);
|
|
1528
|
+
logger$1.info("auth string:", authString);
|
|
1471
1529
|
const portString = typeof port !== "undefined" ? `:${port}` : "";
|
|
1472
1530
|
const url = new URL(`${protocol}//${hostname}${portString}${path}`);
|
|
1473
1531
|
url.username = (credentials == null ? void 0 : credentials.username) || "";
|
|
1474
1532
|
url.password = (credentials == null ? void 0 : credentials.password) || "";
|
|
1475
|
-
logger.info("created url:", url);
|
|
1533
|
+
logger$1.info("created url:", url);
|
|
1476
1534
|
return url;
|
|
1477
1535
|
}
|
|
1478
1536
|
var logger2 = new Logger("cloneObject");
|
|
@@ -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);
|
|
@@ -1754,7 +1825,7 @@ function concatArrayBuffer(left, right) {
|
|
|
1754
1825
|
return result;
|
|
1755
1826
|
}
|
|
1756
1827
|
var EventPolyfill = class {
|
|
1757
|
-
constructor(type, options) {
|
|
1828
|
+
constructor(type$2, options) {
|
|
1758
1829
|
this.NONE = 0;
|
|
1759
1830
|
this.CAPTURING_PHASE = 1;
|
|
1760
1831
|
this.AT_TARGET = 2;
|
|
@@ -1773,7 +1844,7 @@ var EventPolyfill = class {
|
|
|
1773
1844
|
this.total = 0;
|
|
1774
1845
|
this.cancelBubble = false;
|
|
1775
1846
|
this.returnValue = true;
|
|
1776
|
-
this.type = type;
|
|
1847
|
+
this.type = type$2;
|
|
1777
1848
|
this.target = (options == null ? void 0 : options.target) || null;
|
|
1778
1849
|
this.currentTarget = (options == null ? void 0 : options.currentTarget) || null;
|
|
1779
1850
|
this.timeStamp = Date.now();
|
|
@@ -1781,8 +1852,8 @@ var EventPolyfill = class {
|
|
|
1781
1852
|
composedPath() {
|
|
1782
1853
|
return [];
|
|
1783
1854
|
}
|
|
1784
|
-
initEvent(type, bubbles, cancelable) {
|
|
1785
|
-
this.type = type;
|
|
1855
|
+
initEvent(type$2, bubbles, cancelable) {
|
|
1856
|
+
this.type = type$2;
|
|
1786
1857
|
this.bubbles = !!bubbles;
|
|
1787
1858
|
this.cancelable = !!cancelable;
|
|
1788
1859
|
}
|
|
@@ -1793,8 +1864,8 @@ var EventPolyfill = class {
|
|
|
1793
1864
|
stopImmediatePropagation() {}
|
|
1794
1865
|
};
|
|
1795
1866
|
var ProgressEventPolyfill = class extends EventPolyfill {
|
|
1796
|
-
constructor(type, init) {
|
|
1797
|
-
super(type);
|
|
1867
|
+
constructor(type$2, init) {
|
|
1868
|
+
super(type$2);
|
|
1798
1869
|
this.lengthComputable = (init == null ? void 0 : init.lengthComputable) || false;
|
|
1799
1870
|
this.composed = (init == null ? void 0 : init.composed) || false;
|
|
1800
1871
|
this.loaded = (init == null ? void 0 : init.loaded) || 0;
|
|
@@ -1802,7 +1873,7 @@ var ProgressEventPolyfill = class extends EventPolyfill {
|
|
|
1802
1873
|
}
|
|
1803
1874
|
};
|
|
1804
1875
|
var SUPPORTS_PROGRESS_EVENT = typeof ProgressEvent !== "undefined";
|
|
1805
|
-
function createEvent(target, type, init) {
|
|
1876
|
+
function createEvent(target, type$2, init) {
|
|
1806
1877
|
const progressEvents = [
|
|
1807
1878
|
"error",
|
|
1808
1879
|
"progress",
|
|
@@ -1813,11 +1884,11 @@ function createEvent(target, type, init) {
|
|
|
1813
1884
|
"abort"
|
|
1814
1885
|
];
|
|
1815
1886
|
const ProgressEventClass = SUPPORTS_PROGRESS_EVENT ? ProgressEvent : ProgressEventPolyfill;
|
|
1816
|
-
const event = progressEvents.includes(type) ? new ProgressEventClass(type, {
|
|
1887
|
+
const event = progressEvents.includes(type$2) ? new ProgressEventClass(type$2, {
|
|
1817
1888
|
lengthComputable: true,
|
|
1818
1889
|
loaded: (init == null ? void 0 : init.loaded) || 0,
|
|
1819
1890
|
total: (init == null ? void 0 : init.total) || 0
|
|
1820
|
-
}) : new EventPolyfill(type, {
|
|
1891
|
+
}) : new EventPolyfill(type$2, {
|
|
1821
1892
|
target,
|
|
1822
1893
|
currentTarget: target
|
|
1823
1894
|
});
|
|
@@ -1871,7 +1942,7 @@ function optionsToProxyHandler(options) {
|
|
|
1871
1942
|
};
|
|
1872
1943
|
return handler;
|
|
1873
1944
|
}
|
|
1874
|
-
function isDomParserSupportedType(type) {
|
|
1945
|
+
function isDomParserSupportedType(type$2) {
|
|
1875
1946
|
const supportedTypes = [
|
|
1876
1947
|
"application/xhtml+xml",
|
|
1877
1948
|
"application/xml",
|
|
@@ -1880,7 +1951,7 @@ function isDomParserSupportedType(type) {
|
|
|
1880
1951
|
"text/xml"
|
|
1881
1952
|
];
|
|
1882
1953
|
return supportedTypes.some((supportedType) => {
|
|
1883
|
-
return type.startsWith(supportedType);
|
|
1954
|
+
return type$2.startsWith(supportedType);
|
|
1884
1955
|
});
|
|
1885
1956
|
}
|
|
1886
1957
|
function parseJson(data) {
|
|
@@ -1921,9 +1992,9 @@ var kIsRequestHandled = Symbol("kIsRequestHandled");
|
|
|
1921
1992
|
var IS_NODE = isNodeProcess();
|
|
1922
1993
|
var kFetchRequest = Symbol("kFetchRequest");
|
|
1923
1994
|
var XMLHttpRequestController = class {
|
|
1924
|
-
constructor(initialRequest, logger$
|
|
1995
|
+
constructor(initialRequest, logger$2) {
|
|
1925
1996
|
this.initialRequest = initialRequest;
|
|
1926
|
-
this.logger = logger$
|
|
1997
|
+
this.logger = logger$2;
|
|
1927
1998
|
this.method = "GET";
|
|
1928
1999
|
this.url = null;
|
|
1929
2000
|
this[kIsRequestHandled] = false;
|
|
@@ -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
|
}
|
|
@@ -2296,13 +2368,13 @@ function define(target, property, value) {
|
|
|
2296
2368
|
value
|
|
2297
2369
|
});
|
|
2298
2370
|
}
|
|
2299
|
-
function createXMLHttpRequestProxy({ emitter, logger: logger$
|
|
2371
|
+
function createXMLHttpRequestProxy({ emitter, logger: logger$2 }) {
|
|
2300
2372
|
const XMLHttpRequestProxy = new Proxy(globalThis.XMLHttpRequest, { construct(target, args, newTarget) {
|
|
2301
|
-
logger$
|
|
2373
|
+
logger$2.info("constructed new XMLHttpRequest");
|
|
2302
2374
|
const originalRequest = Reflect.construct(target, args, newTarget);
|
|
2303
2375
|
const prototypeDescriptors = Object.getOwnPropertyDescriptors(target.prototype);
|
|
2304
2376
|
for (const propertyName in prototypeDescriptors) Reflect.defineProperty(originalRequest, propertyName, prototypeDescriptors[propertyName]);
|
|
2305
|
-
const xhrRequestController = new XMLHttpRequestController(originalRequest, logger$
|
|
2377
|
+
const xhrRequestController = new XMLHttpRequestController(originalRequest, logger$2);
|
|
2306
2378
|
xhrRequestController.onRequest = async function({ request, requestId }) {
|
|
2307
2379
|
const controller = new RequestController(request);
|
|
2308
2380
|
this.logger.info("awaiting mocked response...");
|
|
@@ -2346,15 +2418,15 @@ var _XMLHttpRequestInterceptor = class extends Interceptor$1 {
|
|
|
2346
2418
|
return hasConfigurableGlobal$1("XMLHttpRequest");
|
|
2347
2419
|
}
|
|
2348
2420
|
setup() {
|
|
2349
|
-
const logger$
|
|
2350
|
-
logger$
|
|
2421
|
+
const logger$2 = this.logger.extend("setup");
|
|
2422
|
+
logger$2.info("patching \"XMLHttpRequest\" module...");
|
|
2351
2423
|
const PureXMLHttpRequest = globalThis.XMLHttpRequest;
|
|
2352
2424
|
invariant(!PureXMLHttpRequest[IS_PATCHED_MODULE], "Failed to patch the \"XMLHttpRequest\" module: already patched.");
|
|
2353
2425
|
globalThis.XMLHttpRequest = createXMLHttpRequestProxy({
|
|
2354
2426
|
emitter: this.emitter,
|
|
2355
2427
|
logger: this.logger
|
|
2356
2428
|
});
|
|
2357
|
-
logger$
|
|
2429
|
+
logger$2.info("native \"XMLHttpRequest\" module patched!", globalThis.XMLHttpRequest.name);
|
|
2358
2430
|
Object.defineProperty(globalThis.XMLHttpRequest, IS_PATCHED_MODULE, {
|
|
2359
2431
|
enumerable: true,
|
|
2360
2432
|
configurable: true,
|
|
@@ -2363,7 +2435,7 @@ var _XMLHttpRequestInterceptor = class extends Interceptor$1 {
|
|
|
2363
2435
|
this.subscriptions.push(() => {
|
|
2364
2436
|
Object.defineProperty(globalThis.XMLHttpRequest, IS_PATCHED_MODULE, { value: void 0 });
|
|
2365
2437
|
globalThis.XMLHttpRequest = PureXMLHttpRequest;
|
|
2366
|
-
logger$
|
|
2438
|
+
logger$2.info("native \"XMLHttpRequest\" module restored!", globalThis.XMLHttpRequest.name);
|
|
2367
2439
|
});
|
|
2368
2440
|
}
|
|
2369
2441
|
};
|
|
@@ -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);
|
|
@@ -2588,12 +2654,12 @@ var BatchInterceptor = class extends Interceptor$1 {
|
|
|
2588
2654
|
this.interceptors = options.interceptors;
|
|
2589
2655
|
}
|
|
2590
2656
|
setup() {
|
|
2591
|
-
const logger$
|
|
2592
|
-
logger$
|
|
2657
|
+
const logger$2 = this.logger.extend("setup");
|
|
2658
|
+
logger$2.info("applying all %d interceptors...", this.interceptors.length);
|
|
2593
2659
|
for (const interceptor of this.interceptors) {
|
|
2594
|
-
logger$
|
|
2660
|
+
logger$2.info("applying \"%s\" interceptor...", interceptor.constructor.name);
|
|
2595
2661
|
interceptor.apply();
|
|
2596
|
-
logger$
|
|
2662
|
+
logger$2.info("adding interceptor dispose subscription");
|
|
2597
2663
|
this.subscriptions.push(() => interceptor.dispose());
|
|
2598
2664
|
}
|
|
2599
2665
|
}
|
|
@@ -2616,23 +2682,23 @@ 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
|
-
function formatMessage(message$
|
|
2628
|
-
const interpolatedMessage = format(message$
|
|
2693
|
+
function formatMessage(message$3, ...positionals) {
|
|
2694
|
+
const interpolatedMessage = format(message$3, ...positionals);
|
|
2629
2695
|
return `${LIBRARY_PREFIX} ${interpolatedMessage}`;
|
|
2630
2696
|
}
|
|
2631
|
-
function warn(message$
|
|
2632
|
-
console.warn(formatMessage(message$
|
|
2697
|
+
function warn(message$3, ...positionals) {
|
|
2698
|
+
console.warn(formatMessage(message$3, ...positionals));
|
|
2633
2699
|
}
|
|
2634
|
-
function error(message$
|
|
2635
|
-
console.error(formatMessage(message$
|
|
2700
|
+
function error(message$3, ...positionals) {
|
|
2701
|
+
console.error(formatMessage(message$3, ...positionals));
|
|
2636
2702
|
}
|
|
2637
2703
|
const devUtils = {
|
|
2638
2704
|
formatMessage,
|
|
@@ -2640,14 +2706,14 @@ const devUtils = {
|
|
|
2640
2706
|
error
|
|
2641
2707
|
};
|
|
2642
2708
|
var InternalError = class extends Error {
|
|
2643
|
-
constructor(message$
|
|
2644
|
-
super(message$
|
|
2709
|
+
constructor(message$3) {
|
|
2710
|
+
super(message$3);
|
|
2645
2711
|
this.name = "InternalError";
|
|
2646
2712
|
}
|
|
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;
|
|
@@ -2875,7 +2934,7 @@ var require_punycode = __commonJS$4({ "node_modules/punycode/punycode.js"(export
|
|
|
2875
2934
|
var regexPunycode = /^xn--/;
|
|
2876
2935
|
var regexNonASCII = /[^\0-\x7F]/;
|
|
2877
2936
|
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
2878
|
-
var errors = {
|
|
2937
|
+
var errors$1 = {
|
|
2879
2938
|
"overflow": "Overflow: input needs wider integers to process",
|
|
2880
2939
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2881
2940
|
"invalid-input": "Invalid input"
|
|
@@ -2883,8 +2942,8 @@ var require_punycode = __commonJS$4({ "node_modules/punycode/punycode.js"(export
|
|
|
2883
2942
|
var baseMinusTMin = base - tMin;
|
|
2884
2943
|
var floor = Math.floor;
|
|
2885
2944
|
var stringFromCharCode = String.fromCharCode;
|
|
2886
|
-
function error$2(type) {
|
|
2887
|
-
throw new RangeError(errors[type]);
|
|
2945
|
+
function error$2(type$2) {
|
|
2946
|
+
throw new RangeError(errors$1[type$2]);
|
|
2888
2947
|
}
|
|
2889
2948
|
function map(array, callback) {
|
|
2890
2949
|
const result = [];
|
|
@@ -3155,14 +3214,14 @@ var require_url_parse = __commonJS$4({ "node_modules/url-parse/index.js"(exports
|
|
|
3155
3214
|
else if (typeof global !== "undefined") globalVar = global;
|
|
3156
3215
|
else if (typeof self !== "undefined") globalVar = self;
|
|
3157
3216
|
else globalVar = {};
|
|
3158
|
-
var location$
|
|
3159
|
-
loc = loc || location$
|
|
3160
|
-
var finaldestination = {}, type = typeof loc, key;
|
|
3217
|
+
var location$2 = globalVar.location || {};
|
|
3218
|
+
loc = loc || location$2;
|
|
3219
|
+
var finaldestination = {}, type$2 = typeof loc, key;
|
|
3161
3220
|
if ("blob:" === loc.protocol) finaldestination = new Url(unescape(loc.pathname), {});
|
|
3162
|
-
else if ("string" === type) {
|
|
3221
|
+
else if ("string" === type$2) {
|
|
3163
3222
|
finaldestination = new Url(loc, {});
|
|
3164
3223
|
for (key in ignore) delete finaldestination[key];
|
|
3165
|
-
} else if ("object" === type) {
|
|
3224
|
+
} else if ("object" === type$2) {
|
|
3166
3225
|
for (key in loc) {
|
|
3167
3226
|
if (key in ignore) continue;
|
|
3168
3227
|
finaldestination[key] = loc[key];
|
|
@@ -3174,33 +3233,33 @@ var require_url_parse = __commonJS$4({ "node_modules/url-parse/index.js"(exports
|
|
|
3174
3233
|
function isSpecial(scheme) {
|
|
3175
3234
|
return scheme === "file:" || scheme === "ftp:" || scheme === "http:" || scheme === "https:" || scheme === "ws:" || scheme === "wss:";
|
|
3176
3235
|
}
|
|
3177
|
-
function extractProtocol(address, location$
|
|
3236
|
+
function extractProtocol(address, location$2) {
|
|
3178
3237
|
address = trimLeft(address);
|
|
3179
3238
|
address = address.replace(CRHTLF, "");
|
|
3180
|
-
location$
|
|
3181
|
-
var match$
|
|
3182
|
-
var protocol = match$
|
|
3183
|
-
var forwardSlashes = !!match$
|
|
3184
|
-
var otherSlashes = !!match$
|
|
3239
|
+
location$2 = location$2 || {};
|
|
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$
|
|
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),
|
|
@@ -3224,21 +3283,21 @@ var require_url_parse = __commonJS$4({ "node_modules/url-parse/index.js"(exports
|
|
|
3224
3283
|
if (last === "." || last === "..") path.push("");
|
|
3225
3284
|
return path.join("/");
|
|
3226
3285
|
}
|
|
3227
|
-
function Url(address, location$
|
|
3286
|
+
function Url(address, location$2, parser) {
|
|
3228
3287
|
address = trimLeft(address);
|
|
3229
3288
|
address = address.replace(CRHTLF, "");
|
|
3230
|
-
if (!(this instanceof Url)) return new Url(address, location$
|
|
3231
|
-
var relative, extracted, parse$2, instruction, index, key, instructions = rules.slice(), type = typeof location$
|
|
3232
|
-
if ("object" !== type && "string" !== type) {
|
|
3233
|
-
parser = location$
|
|
3234
|
-
location$
|
|
3289
|
+
if (!(this instanceof Url)) return new Url(address, location$2, parser);
|
|
3290
|
+
var relative, extracted, parse$2, instruction, index, key, instructions = rules.slice(), type$2 = typeof location$2, url = this, i = 0;
|
|
3291
|
+
if ("object" !== type$2 && "string" !== type$2) {
|
|
3292
|
+
parser = location$2;
|
|
3293
|
+
location$2 = null;
|
|
3235
3294
|
}
|
|
3236
3295
|
if (parser && "function" !== typeof parser) parser = qs.parse;
|
|
3237
|
-
location$
|
|
3238
|
-
extracted = extractProtocol(address || "", location$
|
|
3296
|
+
location$2 = lolcation(location$2);
|
|
3297
|
+
extracted = extractProtocol(address || "", location$2);
|
|
3239
3298
|
relative = !extracted.protocol && !extracted.slashes;
|
|
3240
|
-
url.slashes = extracted.slashes || relative && location$
|
|
3241
|
-
url.protocol = extracted.protocol || location$
|
|
3299
|
+
url.slashes = extracted.slashes || relative && location$2.slashes;
|
|
3300
|
+
url.protocol = extracted.protocol || location$2.protocol || "";
|
|
3242
3301
|
address = extracted.rest;
|
|
3243
3302
|
if (extracted.protocol === "file:" && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) instructions[3] = [/(.*)/, "pathname"];
|
|
3244
3303
|
for (; i < instructions.length; i++) {
|
|
@@ -3263,11 +3322,11 @@ var require_url_parse = __commonJS$4({ "node_modules/url-parse/index.js"(exports
|
|
|
3263
3322
|
url[key] = index[1];
|
|
3264
3323
|
address = address.slice(0, index.index);
|
|
3265
3324
|
}
|
|
3266
|
-
url[key] = url[key] || (relative && instruction[3] ? location$
|
|
3325
|
+
url[key] = url[key] || (relative && instruction[3] ? location$2[key] || "" : "");
|
|
3267
3326
|
if (instruction[4]) url[key] = url[key].toLowerCase();
|
|
3268
3327
|
}
|
|
3269
3328
|
if (parser) url.query = parser(url.query);
|
|
3270
|
-
if (relative && location$
|
|
3329
|
+
if (relative && location$2.slashes && url.pathname.charAt(0) !== "/" && (url.pathname !== "" || location$2.pathname !== "")) url.pathname = resolve(url.pathname, location$2.pathname);
|
|
3271
3330
|
if (url.pathname.charAt(0) !== "/" && isSpecial(url.protocol)) url.pathname = "/" + url.pathname;
|
|
3272
3331
|
if (!required(url.port, url.protocol)) {
|
|
3273
3332
|
url.host = url.hostname;
|
|
@@ -13265,8 +13324,8 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13265
13324
|
var SAME_SITE_CONTEXT_VAL_ERR = "Invalid sameSiteContext option for getCookies(); expected one of \"strict\", \"lax\", or \"none\"";
|
|
13266
13325
|
function checkSameSiteContext(value) {
|
|
13267
13326
|
validators.validate(validators.isNonEmptyString(value), value);
|
|
13268
|
-
const context = String(value).toLowerCase();
|
|
13269
|
-
if (context === "none" || context === "lax" || context === "strict") return context;
|
|
13327
|
+
const context$1 = String(value).toLowerCase();
|
|
13328
|
+
if (context$1 === "none" || context$1 === "lax" || context$1 === "strict") return context$1;
|
|
13270
13329
|
else return null;
|
|
13271
13330
|
}
|
|
13272
13331
|
var PrefixSecurityEnum = Object.freeze({
|
|
@@ -13289,15 +13348,15 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13289
13348
|
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
13290
13349
|
var IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}$`);
|
|
13291
13350
|
function parseDigits(token, minDigits, maxDigits, trailingOK) {
|
|
13292
|
-
let count = 0;
|
|
13293
|
-
while (count < token.length) {
|
|
13294
|
-
const c = token.charCodeAt(count);
|
|
13351
|
+
let count$1 = 0;
|
|
13352
|
+
while (count$1 < token.length) {
|
|
13353
|
+
const c = token.charCodeAt(count$1);
|
|
13295
13354
|
if (c <= 47 || c >= 58) break;
|
|
13296
|
-
count++;
|
|
13355
|
+
count$1++;
|
|
13297
13356
|
}
|
|
13298
|
-
if (count < minDigits || count > maxDigits) return null;
|
|
13299
|
-
if (!trailingOK && count != token.length) return null;
|
|
13300
|
-
return parseInt(token.substr(0, count), 10);
|
|
13357
|
+
if (count$1 < minDigits || count$1 > maxDigits) return null;
|
|
13358
|
+
if (!trailingOK && count$1 != token.length) return null;
|
|
13359
|
+
return parseInt(token.substr(0, count$1), 10);
|
|
13301
13360
|
}
|
|
13302
13361
|
function parseTime(token) {
|
|
13303
13362
|
const parts = token.split(":");
|
|
@@ -13764,14 +13823,14 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13764
13823
|
cb = url;
|
|
13765
13824
|
return cb(new Error("No URL was specified"));
|
|
13766
13825
|
}
|
|
13767
|
-
const context = getCookieContext(url);
|
|
13826
|
+
const context$1 = getCookieContext(url);
|
|
13768
13827
|
if (validators.isFunction(options)) {
|
|
13769
13828
|
cb = options;
|
|
13770
13829
|
options = {};
|
|
13771
13830
|
}
|
|
13772
13831
|
validators.validate(validators.isFunction(cb), cb);
|
|
13773
13832
|
if (!validators.isNonEmptyString(cookie) && !validators.isObject(cookie) && cookie instanceof String && cookie.length == 0) return cb(null);
|
|
13774
|
-
const host = canonicalDomain(context.hostname);
|
|
13833
|
+
const host = canonicalDomain(context$1.hostname);
|
|
13775
13834
|
const loose = options.loose || this.enableLooseMode;
|
|
13776
13835
|
let sameSiteContext = null;
|
|
13777
13836
|
if (options.sameSiteContext) {
|
|
@@ -13810,7 +13869,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13810
13869
|
cookie.domain = host;
|
|
13811
13870
|
}
|
|
13812
13871
|
if (!cookie.path || cookie.path[0] !== "/") {
|
|
13813
|
-
cookie.path = defaultPath(context.pathname);
|
|
13872
|
+
cookie.path = defaultPath(context$1.pathname);
|
|
13814
13873
|
cookie.pathIsDefault = true;
|
|
13815
13874
|
}
|
|
13816
13875
|
if (options.http === false && cookie.httpOnly) {
|
|
@@ -13865,17 +13924,17 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13865
13924
|
}
|
|
13866
13925
|
getCookies(url, options, cb) {
|
|
13867
13926
|
validators.validate(validators.isUrlStringOrObject(url), cb, url);
|
|
13868
|
-
const context = getCookieContext(url);
|
|
13927
|
+
const context$1 = getCookieContext(url);
|
|
13869
13928
|
if (validators.isFunction(options)) {
|
|
13870
13929
|
cb = options;
|
|
13871
13930
|
options = {};
|
|
13872
13931
|
}
|
|
13873
13932
|
validators.validate(validators.isObject(options), cb, options);
|
|
13874
13933
|
validators.validate(validators.isFunction(cb), cb);
|
|
13875
|
-
const host = canonicalDomain(context.hostname);
|
|
13876
|
-
const path = context.pathname || "/";
|
|
13934
|
+
const host = canonicalDomain(context$1.hostname);
|
|
13935
|
+
const path = context$1.pathname || "/";
|
|
13877
13936
|
let secure = options.secure;
|
|
13878
|
-
if (secure == null && context.protocol && (context.protocol == "https:" || context.protocol == "wss:")) secure = true;
|
|
13937
|
+
if (secure == null && context$1.protocol && (context$1.protocol == "https:" || context$1.protocol == "wss:")) secure = true;
|
|
13879
13938
|
let sameSiteLevel = 0;
|
|
13880
13939
|
if (options.sameSiteContext) {
|
|
13881
13940
|
const sameSiteContext = checkSameSiteContext(options.sameSiteContext);
|
|
@@ -13938,11 +13997,11 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13938
13997
|
}
|
|
13939
13998
|
serialize(cb) {
|
|
13940
13999
|
validators.validate(validators.isFunction(cb), cb);
|
|
13941
|
-
let type = this.store.constructor.name;
|
|
13942
|
-
if (validators.isObject(type)) type = null;
|
|
14000
|
+
let type$2 = this.store.constructor.name;
|
|
14001
|
+
if (validators.isObject(type$2)) type$2 = null;
|
|
13943
14002
|
const serialized = {
|
|
13944
14003
|
version: `tough-cookie@${VERSION}`,
|
|
13945
|
-
storeType: type,
|
|
14004
|
+
storeType: type$2,
|
|
13946
14005
|
rejectPublicSuffixes: !!this.rejectPublicSuffixes,
|
|
13947
14006
|
enableLooseMode: !!this.enableLooseMode,
|
|
13948
14007
|
allowSpecialUseDomain: !!this.allowSpecialUseDomain,
|
|
@@ -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",
|
|
@@ -14547,9 +14599,9 @@ var require_statuses = __commonJS$3({ "node_modules/statuses/index.js"(exports$1
|
|
|
14547
14599
|
function createMessageToStatusCodeMap(codes2) {
|
|
14548
14600
|
var map = {};
|
|
14549
14601
|
Object.keys(codes2).forEach(function forEachCode(code) {
|
|
14550
|
-
var message$
|
|
14602
|
+
var message$3 = codes2[code];
|
|
14551
14603
|
var status3 = Number(code);
|
|
14552
|
-
map[message$
|
|
14604
|
+
map[message$3.toLowerCase()] = status3;
|
|
14553
14605
|
});
|
|
14554
14606
|
return map;
|
|
14555
14607
|
}
|
|
@@ -14558,9 +14610,9 @@ var require_statuses = __commonJS$3({ "node_modules/statuses/index.js"(exports$1
|
|
|
14558
14610
|
return Number(code);
|
|
14559
14611
|
});
|
|
14560
14612
|
}
|
|
14561
|
-
function getStatusCode(message$
|
|
14562
|
-
var msg = message$
|
|
14563
|
-
if (!Object.prototype.hasOwnProperty.call(status2.code, msg)) throw new Error("invalid status message: \"" + message$
|
|
14613
|
+
function getStatusCode(message$3) {
|
|
14614
|
+
var msg = message$3.toLowerCase();
|
|
14615
|
+
if (!Object.prototype.hasOwnProperty.call(status2.code, msg)) throw new Error("invalid status message: \"" + message$3 + "\"");
|
|
14564
14616
|
return status2.code[msg];
|
|
14565
14617
|
}
|
|
14566
14618
|
function getStatusMessage(code) {
|
|
@@ -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 = {
|
|
@@ -14903,17 +14948,17 @@ var Headers$1 = class _Headers {
|
|
|
14903
14948
|
};
|
|
14904
14949
|
|
|
14905
14950
|
//#endregion
|
|
14906
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14907
|
-
const { message: message$
|
|
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
|
|
14952
|
+
const { message: message$2 } = source_default$1;
|
|
14908
14953
|
const kSetCookie = Symbol("kSetCookie");
|
|
14909
14954
|
function normalizeResponseInit(init = {}) {
|
|
14910
|
-
const status = init?.status || 200;
|
|
14911
|
-
const statusText = init?.statusText || message$
|
|
14955
|
+
const status$1 = init?.status || 200;
|
|
14956
|
+
const statusText = init?.statusText || message$2[status$1] || "";
|
|
14912
14957
|
const headers = new Headers(init?.headers);
|
|
14913
14958
|
return {
|
|
14914
14959
|
...init,
|
|
14915
14960
|
headers,
|
|
14916
|
-
status,
|
|
14961
|
+
status: status$1,
|
|
14917
14962
|
statusText
|
|
14918
14963
|
};
|
|
14919
14964
|
}
|
|
@@ -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];
|
|
@@ -15110,7 +15155,7 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15110
15155
|
continue;
|
|
15111
15156
|
}
|
|
15112
15157
|
if (char === "(") {
|
|
15113
|
-
var count = 1;
|
|
15158
|
+
var count$1 = 1;
|
|
15114
15159
|
var pattern = "";
|
|
15115
15160
|
var j = i + 1;
|
|
15116
15161
|
if (str[j] === "?") throw new TypeError("Pattern cannot start with \"?\" at ".concat(j));
|
|
@@ -15120,18 +15165,18 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15120
15165
|
continue;
|
|
15121
15166
|
}
|
|
15122
15167
|
if (str[j] === ")") {
|
|
15123
|
-
count--;
|
|
15124
|
-
if (count === 0) {
|
|
15168
|
+
count$1--;
|
|
15169
|
+
if (count$1 === 0) {
|
|
15125
15170
|
j++;
|
|
15126
15171
|
break;
|
|
15127
15172
|
}
|
|
15128
15173
|
} else if (str[j] === "(") {
|
|
15129
|
-
count++;
|
|
15174
|
+
count$1++;
|
|
15130
15175
|
if (str[j + 1] !== "?") throw new TypeError("Capturing groups are not allowed at ".concat(j));
|
|
15131
15176
|
}
|
|
15132
15177
|
pattern += str[j++];
|
|
15133
15178
|
}
|
|
15134
|
-
if (count) throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
15179
|
+
if (count$1) throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
15135
15180
|
if (!pattern) throw new TypeError("Missing pattern at ".concat(i));
|
|
15136
15181
|
tokens.push({
|
|
15137
15182
|
type: "PATTERN",
|
|
@@ -15165,14 +15210,14 @@ var require_dist = __commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/n
|
|
|
15165
15210
|
var key = 0;
|
|
15166
15211
|
var i = 0;
|
|
15167
15212
|
var path = "";
|
|
15168
|
-
var tryConsume = function(type) {
|
|
15169
|
-
if (i < tokens.length && tokens[i].type === type) return tokens[i++].value;
|
|
15213
|
+
var tryConsume = function(type$2) {
|
|
15214
|
+
if (i < tokens.length && tokens[i].type === type$2) return tokens[i++].value;
|
|
15170
15215
|
};
|
|
15171
|
-
var mustConsume = function(type) {
|
|
15172
|
-
var value$1 = tryConsume(type);
|
|
15216
|
+
var mustConsume = function(type$2) {
|
|
15217
|
+
var value$1 = tryConsume(type$2);
|
|
15173
15218
|
if (value$1 !== void 0) return value$1;
|
|
15174
15219
|
var _a$2 = tokens[i], nextType = _a$2.type, index = _a$2.index;
|
|
15175
|
-
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type));
|
|
15220
|
+
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type$2));
|
|
15176
15221
|
};
|
|
15177
15222
|
var consumeText = function() {
|
|
15178
15223
|
var result$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
|
*/
|
|
@@ -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
|
}
|
|
@@ -15637,34 +15682,34 @@ var Interceptor = class {
|
|
|
15637
15682
|
* Returns an already running interceptor instance if it's present.
|
|
15638
15683
|
*/
|
|
15639
15684
|
apply() {
|
|
15640
|
-
const logger$
|
|
15641
|
-
logger$
|
|
15685
|
+
const logger$2 = this.logger.extend("apply");
|
|
15686
|
+
logger$2.info("applying the interceptor...");
|
|
15642
15687
|
if (this.readyState === "APPLIED") {
|
|
15643
|
-
logger$
|
|
15688
|
+
logger$2.info("intercepted already applied!");
|
|
15644
15689
|
return;
|
|
15645
15690
|
}
|
|
15646
15691
|
const shouldApply = this.checkEnvironment();
|
|
15647
15692
|
if (!shouldApply) {
|
|
15648
|
-
logger$
|
|
15693
|
+
logger$2.info("the interceptor cannot be applied in this environment!");
|
|
15649
15694
|
return;
|
|
15650
15695
|
}
|
|
15651
15696
|
this.readyState = "APPLYING";
|
|
15652
15697
|
const runningInstance = this.getInstance();
|
|
15653
15698
|
if (runningInstance) {
|
|
15654
|
-
logger$
|
|
15699
|
+
logger$2.info("found a running instance, reusing...");
|
|
15655
15700
|
this.on = (event, listener) => {
|
|
15656
|
-
logger$
|
|
15701
|
+
logger$2.info("proxying the \"%s\" listener", event);
|
|
15657
15702
|
runningInstance.emitter.addListener(event, listener);
|
|
15658
15703
|
this.subscriptions.push(() => {
|
|
15659
15704
|
runningInstance.emitter.removeListener(event, listener);
|
|
15660
|
-
logger$
|
|
15705
|
+
logger$2.info("removed proxied \"%s\" listener!", event);
|
|
15661
15706
|
});
|
|
15662
15707
|
return this;
|
|
15663
15708
|
};
|
|
15664
15709
|
this.readyState = "APPLIED";
|
|
15665
15710
|
return;
|
|
15666
15711
|
}
|
|
15667
|
-
logger$
|
|
15712
|
+
logger$2.info("no running instance found, setting up a new instance...");
|
|
15668
15713
|
this.setup();
|
|
15669
15714
|
this.setInstance();
|
|
15670
15715
|
this.readyState = "APPLIED";
|
|
@@ -15679,12 +15724,12 @@ var Interceptor = class {
|
|
|
15679
15724
|
* Listen to the interceptor's public events.
|
|
15680
15725
|
*/
|
|
15681
15726
|
on(event, listener) {
|
|
15682
|
-
const logger$
|
|
15727
|
+
const logger$2 = this.logger.extend("on");
|
|
15683
15728
|
if (this.readyState === "DISPOSING" || this.readyState === "DISPOSED") {
|
|
15684
|
-
logger$
|
|
15729
|
+
logger$2.info("cannot listen to events, already disposed!");
|
|
15685
15730
|
return this;
|
|
15686
15731
|
}
|
|
15687
|
-
logger$
|
|
15732
|
+
logger$2.info("adding \"%s\" event listener:", event, listener);
|
|
15688
15733
|
this.emitter.on(event, listener);
|
|
15689
15734
|
return this;
|
|
15690
15735
|
}
|
|
@@ -15704,27 +15749,27 @@ var Interceptor = class {
|
|
|
15704
15749
|
* Disposes of any side-effects this interceptor has introduced.
|
|
15705
15750
|
*/
|
|
15706
15751
|
dispose() {
|
|
15707
|
-
const logger$
|
|
15752
|
+
const logger$2 = this.logger.extend("dispose");
|
|
15708
15753
|
if (this.readyState === "DISPOSED") {
|
|
15709
|
-
logger$
|
|
15754
|
+
logger$2.info("cannot dispose, already disposed!");
|
|
15710
15755
|
return;
|
|
15711
15756
|
}
|
|
15712
|
-
logger$
|
|
15757
|
+
logger$2.info("disposing the interceptor...");
|
|
15713
15758
|
this.readyState = "DISPOSING";
|
|
15714
15759
|
if (!this.getInstance()) {
|
|
15715
|
-
logger$
|
|
15760
|
+
logger$2.info("no interceptors running, skipping dispose...");
|
|
15716
15761
|
return;
|
|
15717
15762
|
}
|
|
15718
15763
|
this.clearInstance();
|
|
15719
|
-
logger$
|
|
15764
|
+
logger$2.info("global symbol deleted:", getGlobalSymbol(this.symbol));
|
|
15720
15765
|
if (this.subscriptions.length > 0) {
|
|
15721
|
-
logger$
|
|
15766
|
+
logger$2.info("disposing of %d subscriptions...", this.subscriptions.length);
|
|
15722
15767
|
for (const dispose of this.subscriptions) dispose();
|
|
15723
15768
|
this.subscriptions = [];
|
|
15724
|
-
logger$
|
|
15769
|
+
logger$2.info("disposed of all subscriptions!", this.subscriptions.length);
|
|
15725
15770
|
}
|
|
15726
15771
|
this.emitter.removeAllListeners();
|
|
15727
|
-
logger$
|
|
15772
|
+
logger$2.info("destroyed the listener!");
|
|
15728
15773
|
this.readyState = "DISPOSED";
|
|
15729
15774
|
}
|
|
15730
15775
|
getInstance() {
|
|
@@ -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: {
|
|
@@ -15766,8 +15811,8 @@ function bindEvent(target, event) {
|
|
|
15766
15811
|
var kCancelable = Symbol("kCancelable");
|
|
15767
15812
|
var kDefaultPrevented = Symbol("kDefaultPrevented");
|
|
15768
15813
|
var CancelableMessageEvent = class extends MessageEvent {
|
|
15769
|
-
constructor(type, init) {
|
|
15770
|
-
super(type, init);
|
|
15814
|
+
constructor(type$2, init) {
|
|
15815
|
+
super(type$2, init);
|
|
15771
15816
|
this[kCancelable] = !!init.cancelable;
|
|
15772
15817
|
this[kDefaultPrevented] = false;
|
|
15773
15818
|
}
|
|
@@ -15788,16 +15833,16 @@ var CancelableMessageEvent = class extends MessageEvent {
|
|
|
15788
15833
|
}
|
|
15789
15834
|
};
|
|
15790
15835
|
var CloseEvent = class extends Event {
|
|
15791
|
-
constructor(type, init = {}) {
|
|
15792
|
-
super(type, init);
|
|
15836
|
+
constructor(type$2, init = {}) {
|
|
15837
|
+
super(type$2, init);
|
|
15793
15838
|
this.code = init.code === void 0 ? 0 : init.code;
|
|
15794
15839
|
this.reason = init.reason === void 0 ? "" : init.reason;
|
|
15795
15840
|
this.wasClean = init.wasClean === void 0 ? false : init.wasClean;
|
|
15796
15841
|
}
|
|
15797
15842
|
};
|
|
15798
15843
|
var CancelableCloseEvent = class extends CloseEvent {
|
|
15799
|
-
constructor(type, init = {}) {
|
|
15800
|
-
super(type, init);
|
|
15844
|
+
constructor(type$2, init = {}) {
|
|
15845
|
+
super(type$2, init);
|
|
15801
15846
|
this[kCancelable] = !!init.cancelable;
|
|
15802
15847
|
this[kDefaultPrevented] = false;
|
|
15803
15848
|
}
|
|
@@ -15827,13 +15872,13 @@ var WebSocketClientConnection = class {
|
|
|
15827
15872
|
this.url = new URL(socket.url);
|
|
15828
15873
|
this[kEmitter] = new EventTarget();
|
|
15829
15874
|
this.transport.addEventListener("outgoing", (event) => {
|
|
15830
|
-
const message$
|
|
15875
|
+
const message$3 = bindEvent(this.socket, new CancelableMessageEvent("message", {
|
|
15831
15876
|
data: event.data,
|
|
15832
15877
|
origin: event.origin,
|
|
15833
15878
|
cancelable: true
|
|
15834
15879
|
}));
|
|
15835
|
-
this[kEmitter].dispatchEvent(message$
|
|
15836
|
-
if (message$
|
|
15880
|
+
this[kEmitter].dispatchEvent(message$3);
|
|
15881
|
+
if (message$3.defaultPrevented) event.preventDefault();
|
|
15837
15882
|
});
|
|
15838
15883
|
this.transport.addEventListener("close", (event) => {
|
|
15839
15884
|
this[kEmitter].dispatchEvent(bindEvent(this.socket, new CloseEvent("close", event)));
|
|
@@ -15842,7 +15887,7 @@ var WebSocketClientConnection = class {
|
|
|
15842
15887
|
/**
|
|
15843
15888
|
* Listen for the outgoing events from the connected WebSocket client.
|
|
15844
15889
|
*/
|
|
15845
|
-
addEventListener(type, listener, options) {
|
|
15890
|
+
addEventListener(type$2, listener, options) {
|
|
15846
15891
|
if (!Reflect.has(listener, kBoundListener)) {
|
|
15847
15892
|
const boundListener = listener.bind(this.socket);
|
|
15848
15893
|
Object.defineProperty(listener, kBoundListener, {
|
|
@@ -15851,7 +15896,7 @@ var WebSocketClientConnection = class {
|
|
|
15851
15896
|
configurable: false
|
|
15852
15897
|
});
|
|
15853
15898
|
}
|
|
15854
|
-
this[kEmitter].addEventListener(type, Reflect.get(listener, kBoundListener), options);
|
|
15899
|
+
this[kEmitter].addEventListener(type$2, Reflect.get(listener, kBoundListener), options);
|
|
15855
15900
|
}
|
|
15856
15901
|
/**
|
|
15857
15902
|
* Removes the listener for the given event.
|
|
@@ -15974,11 +16019,11 @@ var WebSocketOverride = class extends EventTarget {
|
|
|
15974
16019
|
this._onclose = null;
|
|
15975
16020
|
});
|
|
15976
16021
|
}
|
|
15977
|
-
addEventListener(type, listener, options) {
|
|
15978
|
-
return super.addEventListener(type, listener, options);
|
|
16022
|
+
addEventListener(type$2, listener, options) {
|
|
16023
|
+
return super.addEventListener(type$2, listener, options);
|
|
15979
16024
|
}
|
|
15980
|
-
removeEventListener(type, callback, options) {
|
|
15981
|
-
return super.removeEventListener(type, callback, options);
|
|
16025
|
+
removeEventListener(type$2, callback, options) {
|
|
16026
|
+
return super.removeEventListener(type$2, callback, options);
|
|
15982
16027
|
}
|
|
15983
16028
|
};
|
|
15984
16029
|
WebSocketOverride.CONNECTING = 0;
|
|
@@ -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,20 +16191,15 @@ 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
|
-
addEventListener(type, callback, options) {
|
|
16164
|
-
return super.addEventListener(type, callback, options);
|
|
16201
|
+
addEventListener(type$2, callback, options) {
|
|
16202
|
+
return super.addEventListener(type$2, callback, options);
|
|
16165
16203
|
}
|
|
16166
16204
|
dispatchEvent(event) {
|
|
16167
16205
|
return super.dispatchEvent(event);
|
|
@@ -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
|
}
|
|
@@ -16377,9 +16415,9 @@ var AsyncHandlersController = class {
|
|
|
16377
16415
|
this.context.handlers.unshift(...runtimeHandlers);
|
|
16378
16416
|
}
|
|
16379
16417
|
reset(nextHandlers) {
|
|
16380
|
-
const context = this.context;
|
|
16381
|
-
context.handlers = [];
|
|
16382
|
-
context.initialHandlers = nextHandlers.length > 0 ? nextHandlers : context.initialHandlers;
|
|
16418
|
+
const context$1 = this.context;
|
|
16419
|
+
context$1.handlers = [];
|
|
16420
|
+
context$1.initialHandlers = nextHandlers.length > 0 ? nextHandlers : context$1.initialHandlers;
|
|
16383
16421
|
}
|
|
16384
16422
|
currentHandlers() {
|
|
16385
16423
|
const { initialHandlers, handlers } = this.context;
|
|
@@ -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,21 +16589,21 @@ 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.
|
|
16561
|
-
function getStatusCodeColor(status) {
|
|
16562
|
-
if (status < 300) return "#69AB32";
|
|
16563
|
-
if (status < 400) return "#F0BB4B";
|
|
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
|
|
16599
|
+
function getStatusCodeColor(status$1) {
|
|
16600
|
+
if (status$1 < 300) return "#69AB32";
|
|
16601
|
+
if (status$1 < 400) return "#F0BB4B";
|
|
16564
16602
|
return "#E95F5D";
|
|
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,13 +16625,13 @@ async function serializeRequest(request) {
|
|
|
16587
16625
|
}
|
|
16588
16626
|
|
|
16589
16627
|
//#endregion
|
|
16590
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16591
|
-
const { message } = source_default$1;
|
|
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
|
|
16629
|
+
const { message: message$1 } = source_default$1;
|
|
16592
16630
|
async function serializeResponse(response) {
|
|
16593
16631
|
const responseClone = response.clone();
|
|
16594
16632
|
const responseText = await responseClone.text();
|
|
16595
16633
|
const responseStatus = responseClone.status || 200;
|
|
16596
|
-
const responseStatusText = responseClone.statusText || message[responseStatus] || "OK";
|
|
16634
|
+
const responseStatusText = responseClone.statusText || message$1[responseStatus] || "OK";
|
|
16597
16635
|
return {
|
|
16598
16636
|
status: responseStatus,
|
|
16599
16637
|
statusText: responseStatusText,
|
|
@@ -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;
|
|
@@ -16722,8 +16753,8 @@ var require_cookie = __commonJS$1({ "node_modules/cookie/index.js"(exports$1) {
|
|
|
16722
16753
|
if (opt.secure) str += "; Secure";
|
|
16723
16754
|
if (opt.partitioned) str += "; Partitioned";
|
|
16724
16755
|
if (opt.priority) {
|
|
16725
|
-
var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
|
|
16726
|
-
switch (priority) {
|
|
16756
|
+
var priority$1 = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
|
|
16757
|
+
switch (priority$1) {
|
|
16727
16758
|
case "low":
|
|
16728
16759
|
str += "; Priority=Low";
|
|
16729
16760
|
break;
|
|
@@ -16784,7 +16815,7 @@ cookie/index.js:
|
|
|
16784
16815
|
*/
|
|
16785
16816
|
|
|
16786
16817
|
//#endregion
|
|
16787
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16818
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
|
16788
16819
|
function parseCookies(input) {
|
|
16789
16820
|
const parsedCookies = source_default.parse(input);
|
|
16790
16821
|
const cookies = {};
|
|
@@ -16821,7 +16852,7 @@ function getAllRequestCookies(request) {
|
|
|
16821
16852
|
}
|
|
16822
16853
|
|
|
16823
16854
|
//#endregion
|
|
16824
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16855
|
+
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/handlers/HttpHandler.mjs
|
|
16825
16856
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
|
16826
16857
|
HttpMethods2["HEAD"] = "HEAD";
|
|
16827
16858
|
HttpMethods2["GET"] = "GET";
|
|
@@ -16855,14 +16886,14 @@ var HttpHandler = class extends RequestHandler {
|
|
|
16855
16886
|
searchParams.forEach((_, paramName) => {
|
|
16856
16887
|
queryParams.push(paramName);
|
|
16857
16888
|
});
|
|
16858
|
-
devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/
|
|
16889
|
+
devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requestsquery-parameters`);
|
|
16859
16890
|
}
|
|
16860
16891
|
async parse(args) {
|
|
16861
16892
|
const url = 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);
|
|
@@ -17441,113 +17472,709 @@ var autofix = {
|
|
|
17441
17472
|
var autofix_state_default = { autofix };
|
|
17442
17473
|
|
|
17443
17474
|
//#endregion
|
|
17444
|
-
//#region ../mcp-server-mocks/dist/
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17450
|
-
|
|
17451
|
-
|
|
17475
|
+
//#region ../mcp-server-mocks/dist/fixtures/issue.json
|
|
17476
|
+
var id$1 = "6507376925";
|
|
17477
|
+
var shareId = null;
|
|
17478
|
+
var shortId = "CLOUDFLARE-MCP-41";
|
|
17479
|
+
var title$1 = "Error: Tool list_organizations is already registered";
|
|
17480
|
+
var culprit$1 = "Object.fetch(index)";
|
|
17481
|
+
var permalink = "https://sentry-mcp-evals.sentry.io/issues/6507376925/";
|
|
17482
|
+
var logger = null;
|
|
17483
|
+
var level = "error";
|
|
17484
|
+
var status = "unresolved";
|
|
17485
|
+
var statusDetails = {};
|
|
17486
|
+
var substatus = "ongoing";
|
|
17487
|
+
var isPublic = false;
|
|
17488
|
+
var platform$1 = "javascript";
|
|
17489
|
+
var project = {
|
|
17490
|
+
"id": "4509062593708032",
|
|
17491
|
+
"name": "CLOUDFLARE-MCP",
|
|
17492
|
+
"slug": "CLOUDFLARE-MCP",
|
|
17493
|
+
"platform": "bun"
|
|
17494
|
+
};
|
|
17495
|
+
var type$1 = "error";
|
|
17496
|
+
var metadata$1 = {
|
|
17497
|
+
"value": "Tool list_organizations is already registered",
|
|
17498
|
+
"type": "Error",
|
|
17499
|
+
"filename": "index.js",
|
|
17500
|
+
"function": "Object.fetch",
|
|
17501
|
+
"in_app_frame_mix": "in-app-only",
|
|
17502
|
+
"sdk": {
|
|
17503
|
+
"name": "sentry.javascript.cloudflare",
|
|
17504
|
+
"name_normalized": "sentry.javascript.cloudflare"
|
|
17505
|
+
},
|
|
17506
|
+
"severity": 0,
|
|
17507
|
+
"severity_reason": "ml",
|
|
17508
|
+
"initial_priority": 50,
|
|
17509
|
+
"title": null
|
|
17510
|
+
};
|
|
17511
|
+
var numComments = 0;
|
|
17512
|
+
var assignedTo = null;
|
|
17513
|
+
var isBookmarked = false;
|
|
17514
|
+
var isSubscribed = false;
|
|
17515
|
+
var subscriptionDetails = null;
|
|
17516
|
+
var hasSeen = true;
|
|
17517
|
+
var annotations = [];
|
|
17518
|
+
var issueType = "error";
|
|
17519
|
+
var issueCategory = "error";
|
|
17520
|
+
var priority = "medium";
|
|
17521
|
+
var priorityLockedAt = null;
|
|
17522
|
+
var isUnhandled = true;
|
|
17523
|
+
var count = "25";
|
|
17524
|
+
var userCount = 1;
|
|
17525
|
+
var firstSeen = "2025-04-03T22:51:19.403000Z";
|
|
17526
|
+
var lastSeen = "2025-04-12T11:34:11Z";
|
|
17527
|
+
var firstRelease = null;
|
|
17528
|
+
var lastRelease = null;
|
|
17529
|
+
var activity = [{
|
|
17530
|
+
"id": "4633815464",
|
|
17531
|
+
"user": null,
|
|
17532
|
+
"type": "auto_set_ongoing",
|
|
17533
|
+
"data": { "after_days": 7 },
|
|
17534
|
+
"dateCreated": "2025-04-10T22:55:22.411699Z"
|
|
17535
|
+
}, {
|
|
17536
|
+
"id": "0",
|
|
17537
|
+
"user": null,
|
|
17538
|
+
"type": "first_seen",
|
|
17539
|
+
"data": { "priority": "medium" },
|
|
17540
|
+
"dateCreated": "2025-04-03T22:51:19.403000Z"
|
|
17541
|
+
}];
|
|
17542
|
+
var openPeriods = [{
|
|
17543
|
+
"start": "2025-04-03T22:51:19.403000Z",
|
|
17544
|
+
"end": null,
|
|
17545
|
+
"duration": null,
|
|
17546
|
+
"isOpen": true,
|
|
17547
|
+
"lastChecked": "2025-04-12T11:34:11.310000Z"
|
|
17548
|
+
}];
|
|
17549
|
+
var seenBy = [{
|
|
17550
|
+
"id": "1",
|
|
17551
|
+
"name": "David Cramer",
|
|
17552
|
+
"username": "david@example.com",
|
|
17553
|
+
"email": "david@example.com",
|
|
17554
|
+
"avatarUrl": null,
|
|
17555
|
+
"isActive": true,
|
|
17556
|
+
"hasPasswordAuth": true,
|
|
17557
|
+
"isManaged": false,
|
|
17558
|
+
"dateJoined": "2012-01-14T22:08:29.270831Z",
|
|
17559
|
+
"lastLogin": "2025-04-13T14:00:11.516852Z",
|
|
17560
|
+
"has2fa": true,
|
|
17561
|
+
"lastActive": "2025-04-13T18:10:49.177605Z",
|
|
17562
|
+
"isSuperuser": true,
|
|
17563
|
+
"isStaff": true,
|
|
17564
|
+
"experiments": {},
|
|
17565
|
+
"emails": [{
|
|
17566
|
+
"id": "87429",
|
|
17567
|
+
"email": "david@example.com",
|
|
17568
|
+
"is_verified": true
|
|
17569
|
+
}],
|
|
17570
|
+
"options": {
|
|
17571
|
+
"theme": "light",
|
|
17572
|
+
"language": "en",
|
|
17573
|
+
"stacktraceOrder": 2,
|
|
17574
|
+
"defaultIssueEvent": "recommended",
|
|
17575
|
+
"timezone": "US/Pacific",
|
|
17576
|
+
"clock24Hours": false
|
|
17577
|
+
},
|
|
17578
|
+
"flags": { "newsletter_consent_prompt": false },
|
|
17579
|
+
"avatar": {
|
|
17580
|
+
"avatarType": "upload",
|
|
17581
|
+
"avatarUuid": "51e63edabf31412aa2a955e9cf2c1ca0",
|
|
17582
|
+
"avatarUrl": "https://sentry.io/avatar/51e63edabf31412aa2a955e9cf2c1ca0/"
|
|
17583
|
+
},
|
|
17584
|
+
"identities": [],
|
|
17585
|
+
"lastSeen": "2025-04-08T23:15:26.569455Z"
|
|
17586
|
+
}];
|
|
17587
|
+
var pluginActions = [];
|
|
17588
|
+
var pluginIssues = [];
|
|
17589
|
+
var pluginContexts = [];
|
|
17590
|
+
var userReportCount = 0;
|
|
17591
|
+
var stats = {
|
|
17592
|
+
"24h": [
|
|
17593
|
+
[1744480800, 0],
|
|
17594
|
+
[1744484400, 0],
|
|
17595
|
+
[1744488e3, 0],
|
|
17596
|
+
[1744491600, 0],
|
|
17597
|
+
[1744495200, 0],
|
|
17598
|
+
[1744498800, 0],
|
|
17599
|
+
[1744502400, 0],
|
|
17600
|
+
[1744506e3, 0],
|
|
17601
|
+
[1744509600, 0],
|
|
17602
|
+
[1744513200, 0],
|
|
17603
|
+
[1744516800, 0],
|
|
17604
|
+
[1744520400, 0],
|
|
17605
|
+
[1744524e3, 0],
|
|
17606
|
+
[1744527600, 0],
|
|
17607
|
+
[1744531200, 0],
|
|
17608
|
+
[1744534800, 0],
|
|
17609
|
+
[1744538400, 0],
|
|
17610
|
+
[1744542e3, 0],
|
|
17611
|
+
[1744545600, 0],
|
|
17612
|
+
[1744549200, 0],
|
|
17613
|
+
[1744552800, 0],
|
|
17614
|
+
[1744556400, 0],
|
|
17615
|
+
[174456e4, 0],
|
|
17616
|
+
[1744563600, 0],
|
|
17617
|
+
[1744567200, 0]
|
|
17618
|
+
],
|
|
17619
|
+
"30d": [
|
|
17620
|
+
[1741910400, 0],
|
|
17621
|
+
[1741996800, 0],
|
|
17622
|
+
[1742083200, 0],
|
|
17623
|
+
[1742169600, 0],
|
|
17624
|
+
[1742256e3, 0],
|
|
17625
|
+
[1742342400, 0],
|
|
17626
|
+
[1742428800, 0],
|
|
17627
|
+
[1742515200, 0],
|
|
17628
|
+
[1742601600, 0],
|
|
17629
|
+
[1742688e3, 0],
|
|
17630
|
+
[1742774400, 0],
|
|
17631
|
+
[1742860800, 0],
|
|
17632
|
+
[1742947200, 0],
|
|
17633
|
+
[1743033600, 0],
|
|
17634
|
+
[174312e4, 0],
|
|
17635
|
+
[1743206400, 0],
|
|
17636
|
+
[1743292800, 0],
|
|
17637
|
+
[1743379200, 0],
|
|
17638
|
+
[1743465600, 0],
|
|
17639
|
+
[1743552e3, 0],
|
|
17640
|
+
[1743638400, 1],
|
|
17641
|
+
[1743724800, 0],
|
|
17642
|
+
[1743811200, 0],
|
|
17643
|
+
[1743897600, 0],
|
|
17644
|
+
[1743984e3, 0],
|
|
17645
|
+
[1744070400, 20],
|
|
17646
|
+
[1744156800, 1],
|
|
17647
|
+
[1744243200, 1],
|
|
17648
|
+
[1744329600, 0],
|
|
17649
|
+
[1744416e3, 2],
|
|
17650
|
+
[1744502400, 0]
|
|
17651
|
+
]
|
|
17652
|
+
};
|
|
17653
|
+
var participants = [];
|
|
17654
|
+
var issue_default = {
|
|
17655
|
+
id: id$1,
|
|
17656
|
+
shareId,
|
|
17657
|
+
shortId,
|
|
17658
|
+
title: title$1,
|
|
17659
|
+
culprit: culprit$1,
|
|
17660
|
+
permalink,
|
|
17661
|
+
logger,
|
|
17662
|
+
level,
|
|
17663
|
+
status,
|
|
17664
|
+
statusDetails,
|
|
17665
|
+
substatus,
|
|
17666
|
+
isPublic,
|
|
17667
|
+
platform: platform$1,
|
|
17668
|
+
project,
|
|
17669
|
+
type: type$1,
|
|
17670
|
+
metadata: metadata$1,
|
|
17671
|
+
numComments,
|
|
17672
|
+
assignedTo,
|
|
17673
|
+
isBookmarked,
|
|
17674
|
+
isSubscribed,
|
|
17675
|
+
subscriptionDetails,
|
|
17676
|
+
hasSeen,
|
|
17677
|
+
annotations,
|
|
17678
|
+
issueType,
|
|
17679
|
+
issueCategory,
|
|
17680
|
+
priority,
|
|
17681
|
+
priorityLockedAt,
|
|
17682
|
+
isUnhandled,
|
|
17683
|
+
count,
|
|
17684
|
+
userCount,
|
|
17685
|
+
firstSeen,
|
|
17686
|
+
lastSeen,
|
|
17687
|
+
firstRelease,
|
|
17688
|
+
lastRelease,
|
|
17689
|
+
activity,
|
|
17690
|
+
openPeriods,
|
|
17691
|
+
seenBy,
|
|
17692
|
+
pluginActions,
|
|
17693
|
+
pluginIssues,
|
|
17694
|
+
pluginContexts,
|
|
17695
|
+
userReportCount,
|
|
17696
|
+
stats,
|
|
17697
|
+
participants
|
|
17698
|
+
};
|
|
17699
|
+
|
|
17700
|
+
//#endregion
|
|
17701
|
+
//#region ../mcp-server-mocks/dist/fixtures/event.json
|
|
17702
|
+
var id = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17703
|
+
var groupID = "6507376925";
|
|
17704
|
+
var eventID = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17705
|
+
var projectID = "4509062593708032";
|
|
17706
|
+
var size = 5891;
|
|
17707
|
+
var entries = [{
|
|
17708
|
+
"data": {
|
|
17709
|
+
"values": [{
|
|
17710
|
+
"type": "Error",
|
|
17711
|
+
"value": "Tool list_organizations is already registered",
|
|
17712
|
+
"mechanism": {
|
|
17713
|
+
"type": "cloudflare",
|
|
17714
|
+
"handled": false
|
|
17715
|
+
},
|
|
17716
|
+
"threadId": null,
|
|
17717
|
+
"module": null,
|
|
17718
|
+
"stacktrace": {
|
|
17719
|
+
"frames": [
|
|
17720
|
+
{
|
|
17721
|
+
"filename": "index.js",
|
|
17722
|
+
"absPath": "/index.js",
|
|
17723
|
+
"module": "index",
|
|
17724
|
+
"package": null,
|
|
17725
|
+
"platform": null,
|
|
17726
|
+
"instructionAddr": null,
|
|
17727
|
+
"symbolAddr": null,
|
|
17728
|
+
"function": null,
|
|
17729
|
+
"rawFunction": null,
|
|
17730
|
+
"symbol": null,
|
|
17731
|
+
"context": [],
|
|
17732
|
+
"lineNo": 7809,
|
|
17733
|
+
"colNo": 27,
|
|
17734
|
+
"inApp": true,
|
|
17735
|
+
"trust": null,
|
|
17736
|
+
"errors": null,
|
|
17737
|
+
"lock": null,
|
|
17738
|
+
"sourceLink": null,
|
|
17739
|
+
"vars": null
|
|
17740
|
+
},
|
|
17741
|
+
{
|
|
17742
|
+
"filename": "index.js",
|
|
17743
|
+
"absPath": "/index.js",
|
|
17744
|
+
"module": "index",
|
|
17745
|
+
"package": null,
|
|
17746
|
+
"platform": null,
|
|
17747
|
+
"instructionAddr": null,
|
|
17748
|
+
"symbolAddr": null,
|
|
17749
|
+
"function": "OAuthProviderImpl.fetch",
|
|
17750
|
+
"rawFunction": null,
|
|
17751
|
+
"symbol": null,
|
|
17752
|
+
"context": [],
|
|
17753
|
+
"lineNo": 8029,
|
|
17754
|
+
"colNo": 24,
|
|
17755
|
+
"inApp": true,
|
|
17756
|
+
"trust": null,
|
|
17757
|
+
"errors": null,
|
|
17758
|
+
"lock": null,
|
|
17759
|
+
"sourceLink": null,
|
|
17760
|
+
"vars": null
|
|
17761
|
+
},
|
|
17762
|
+
{
|
|
17763
|
+
"filename": "index.js",
|
|
17764
|
+
"absPath": "/index.js",
|
|
17765
|
+
"module": "index",
|
|
17766
|
+
"package": null,
|
|
17767
|
+
"platform": null,
|
|
17768
|
+
"instructionAddr": null,
|
|
17769
|
+
"symbolAddr": null,
|
|
17770
|
+
"function": "Object.fetch",
|
|
17771
|
+
"rawFunction": null,
|
|
17772
|
+
"symbol": null,
|
|
17773
|
+
"context": [],
|
|
17774
|
+
"lineNo": 19631,
|
|
17775
|
+
"colNo": 28,
|
|
17776
|
+
"inApp": true,
|
|
17777
|
+
"trust": null,
|
|
17778
|
+
"errors": null,
|
|
17779
|
+
"lock": null,
|
|
17780
|
+
"sourceLink": null,
|
|
17781
|
+
"vars": null
|
|
17782
|
+
}
|
|
17783
|
+
],
|
|
17784
|
+
"framesOmitted": null,
|
|
17785
|
+
"registers": null,
|
|
17786
|
+
"hasSystemFrames": true
|
|
17787
|
+
},
|
|
17788
|
+
"rawStacktrace": {
|
|
17789
|
+
"frames": [
|
|
17790
|
+
{
|
|
17791
|
+
"filename": "index.js",
|
|
17792
|
+
"absPath": "/index.js",
|
|
17793
|
+
"module": "index",
|
|
17794
|
+
"package": null,
|
|
17795
|
+
"platform": null,
|
|
17796
|
+
"instructionAddr": null,
|
|
17797
|
+
"symbolAddr": null,
|
|
17798
|
+
"function": null,
|
|
17799
|
+
"rawFunction": null,
|
|
17800
|
+
"symbol": null,
|
|
17801
|
+
"context": [],
|
|
17802
|
+
"lineNo": 7809,
|
|
17803
|
+
"colNo": 27,
|
|
17804
|
+
"inApp": true,
|
|
17805
|
+
"trust": null,
|
|
17806
|
+
"errors": null,
|
|
17807
|
+
"lock": null,
|
|
17808
|
+
"sourceLink": null,
|
|
17809
|
+
"vars": null
|
|
17810
|
+
},
|
|
17811
|
+
{
|
|
17812
|
+
"filename": "index.js",
|
|
17813
|
+
"absPath": "/index.js",
|
|
17814
|
+
"module": "index",
|
|
17815
|
+
"package": null,
|
|
17816
|
+
"platform": null,
|
|
17817
|
+
"instructionAddr": null,
|
|
17818
|
+
"symbolAddr": null,
|
|
17819
|
+
"function": "OAuthProviderImpl.fetch",
|
|
17820
|
+
"rawFunction": null,
|
|
17821
|
+
"symbol": null,
|
|
17822
|
+
"context": [],
|
|
17823
|
+
"lineNo": 8029,
|
|
17824
|
+
"colNo": 24,
|
|
17825
|
+
"inApp": true,
|
|
17826
|
+
"trust": null,
|
|
17827
|
+
"errors": null,
|
|
17828
|
+
"lock": null,
|
|
17829
|
+
"sourceLink": null,
|
|
17830
|
+
"vars": null
|
|
17831
|
+
},
|
|
17832
|
+
{
|
|
17833
|
+
"filename": "index.js",
|
|
17834
|
+
"absPath": "/index.js",
|
|
17835
|
+
"module": "index",
|
|
17836
|
+
"package": null,
|
|
17837
|
+
"platform": null,
|
|
17838
|
+
"instructionAddr": null,
|
|
17839
|
+
"symbolAddr": null,
|
|
17840
|
+
"function": "Object.fetch",
|
|
17841
|
+
"rawFunction": null,
|
|
17842
|
+
"symbol": null,
|
|
17843
|
+
"context": [],
|
|
17844
|
+
"lineNo": 19631,
|
|
17845
|
+
"colNo": 28,
|
|
17846
|
+
"inApp": true,
|
|
17847
|
+
"trust": null,
|
|
17848
|
+
"errors": null,
|
|
17849
|
+
"lock": null,
|
|
17850
|
+
"sourceLink": null,
|
|
17851
|
+
"vars": null
|
|
17852
|
+
}
|
|
17853
|
+
],
|
|
17854
|
+
"framesOmitted": null,
|
|
17855
|
+
"registers": null,
|
|
17856
|
+
"hasSystemFrames": true
|
|
17857
|
+
}
|
|
17858
|
+
}],
|
|
17859
|
+
"hasSystemFrames": true,
|
|
17860
|
+
"excOmitted": null
|
|
17861
|
+
},
|
|
17862
|
+
"type": "exception"
|
|
17863
|
+
}, {
|
|
17864
|
+
"data": {
|
|
17865
|
+
"apiTarget": null,
|
|
17866
|
+
"method": "GET",
|
|
17867
|
+
"url": "https://mcp.sentry.dev/sse",
|
|
17868
|
+
"query": [],
|
|
17869
|
+
"fragment": null,
|
|
17870
|
+
"data": null,
|
|
17871
|
+
"headers": [
|
|
17872
|
+
["Accept", "text/event-stream"],
|
|
17873
|
+
["Accept-Encoding", "gzip, br"],
|
|
17874
|
+
["Accept-Language", "*"],
|
|
17875
|
+
["Authorization", "[Filtered]"],
|
|
17876
|
+
["Cache-Control", "no-cache"],
|
|
17877
|
+
["Cf-Ipcountry", "GB"],
|
|
17878
|
+
["Cf-Ray", "92d4c7266c8f48c9"],
|
|
17879
|
+
["Cf-Visitor", "{\"scheme\":\"https\"}"],
|
|
17880
|
+
["Connection", "Keep-Alive"],
|
|
17881
|
+
["Host", "mcp.sentry.dev"],
|
|
17882
|
+
["Pragma", "no-cache"],
|
|
17883
|
+
["Sec-Fetch-Mode", "cors"],
|
|
17884
|
+
["User-Agent", "node"],
|
|
17885
|
+
["X-Forwarded-Proto", "https"]
|
|
17886
|
+
],
|
|
17887
|
+
"cookies": [],
|
|
17888
|
+
"env": null,
|
|
17889
|
+
"inferredContentType": null
|
|
17890
|
+
},
|
|
17891
|
+
"type": "request"
|
|
17892
|
+
}];
|
|
17893
|
+
var dist = null;
|
|
17894
|
+
var message = "";
|
|
17895
|
+
var title = "Error: Tool list_organizations is already registered";
|
|
17896
|
+
var location$1 = "index.js";
|
|
17897
|
+
var user = {
|
|
17898
|
+
"id": null,
|
|
17899
|
+
"email": null,
|
|
17900
|
+
"username": null,
|
|
17901
|
+
"ip_address": "2a06:98c0:3600::103",
|
|
17902
|
+
"name": null,
|
|
17903
|
+
"geo": {
|
|
17904
|
+
"country_code": "US",
|
|
17905
|
+
"region": "United States"
|
|
17906
|
+
},
|
|
17907
|
+
"data": null
|
|
17908
|
+
};
|
|
17909
|
+
var contexts = {
|
|
17910
|
+
"cloud_resource": {
|
|
17911
|
+
"cloud.provider": "cloudflare",
|
|
17912
|
+
"type": "default"
|
|
17913
|
+
},
|
|
17914
|
+
"culture": {
|
|
17915
|
+
"timezone": "Europe/London",
|
|
17916
|
+
"type": "default"
|
|
17917
|
+
},
|
|
17918
|
+
"runtime": {
|
|
17919
|
+
"name": "cloudflare",
|
|
17920
|
+
"type": "runtime"
|
|
17921
|
+
},
|
|
17922
|
+
"trace": {
|
|
17923
|
+
"trace_id": "3032af8bcdfe4423b937fc5c041d5d82",
|
|
17924
|
+
"span_id": "953da703d2a6f4c7",
|
|
17925
|
+
"status": "unknown",
|
|
17926
|
+
"client_sample_rate": 1,
|
|
17927
|
+
"sampled": true,
|
|
17928
|
+
"type": "trace"
|
|
17929
|
+
}
|
|
17930
|
+
};
|
|
17931
|
+
var sdk = {
|
|
17932
|
+
"name": "sentry.javascript.cloudflare",
|
|
17933
|
+
"version": "9.12.0"
|
|
17934
|
+
};
|
|
17935
|
+
var context = {};
|
|
17936
|
+
var packages = {};
|
|
17937
|
+
var type = "error";
|
|
17938
|
+
var metadata = {
|
|
17939
|
+
"filename": "index.js",
|
|
17940
|
+
"function": "Object.fetch",
|
|
17941
|
+
"in_app_frame_mix": "in-app-only",
|
|
17942
|
+
"type": "Error",
|
|
17943
|
+
"value": "Tool list_organizations is already registered"
|
|
17944
|
+
};
|
|
17945
|
+
var tags = [
|
|
17946
|
+
{
|
|
17947
|
+
"key": "environment",
|
|
17948
|
+
"value": "development"
|
|
17949
|
+
},
|
|
17950
|
+
{
|
|
17951
|
+
"key": "handled",
|
|
17952
|
+
"value": "no"
|
|
17953
|
+
},
|
|
17954
|
+
{
|
|
17955
|
+
"key": "level",
|
|
17956
|
+
"value": "error"
|
|
17957
|
+
},
|
|
17958
|
+
{
|
|
17959
|
+
"key": "mechanism",
|
|
17960
|
+
"value": "cloudflare"
|
|
17961
|
+
},
|
|
17962
|
+
{
|
|
17963
|
+
"key": "runtime.name",
|
|
17964
|
+
"value": "cloudflare"
|
|
17965
|
+
},
|
|
17966
|
+
{
|
|
17967
|
+
"key": "url",
|
|
17968
|
+
"value": "https://mcp.sentry.dev/sse"
|
|
17452
17969
|
}
|
|
17970
|
+
];
|
|
17971
|
+
var platform = "javascript";
|
|
17972
|
+
var dateReceived = "2025-04-08T21:15:04.700878Z";
|
|
17973
|
+
var errors = [{
|
|
17974
|
+
"type": "js_no_source",
|
|
17975
|
+
"message": "Source code was not found",
|
|
17976
|
+
"data": {
|
|
17977
|
+
"symbolicator_type": "missing_source",
|
|
17978
|
+
"url": "/index.js"
|
|
17979
|
+
}
|
|
17980
|
+
}];
|
|
17981
|
+
var occurrence = null;
|
|
17982
|
+
var _meta = {
|
|
17983
|
+
"entries": { "1": { "data": {
|
|
17984
|
+
"": null,
|
|
17985
|
+
"apiTarget": null,
|
|
17986
|
+
"method": null,
|
|
17987
|
+
"url": null,
|
|
17988
|
+
"query": null,
|
|
17989
|
+
"data": null,
|
|
17990
|
+
"headers": { "3": { "1": { "": {
|
|
17991
|
+
"rem": [[
|
|
17992
|
+
"@password:filter",
|
|
17993
|
+
"s",
|
|
17994
|
+
0,
|
|
17995
|
+
10
|
|
17996
|
+
]],
|
|
17997
|
+
"len": 64,
|
|
17998
|
+
"chunks": [{
|
|
17999
|
+
"type": "redaction",
|
|
18000
|
+
"text": "[Filtered]",
|
|
18001
|
+
"rule_id": "@password:filter",
|
|
18002
|
+
"remark": "s"
|
|
18003
|
+
}]
|
|
18004
|
+
} } } },
|
|
18005
|
+
"cookies": null,
|
|
18006
|
+
"env": null
|
|
18007
|
+
} } },
|
|
18008
|
+
"message": null,
|
|
18009
|
+
"user": null,
|
|
18010
|
+
"contexts": null,
|
|
18011
|
+
"sdk": null,
|
|
18012
|
+
"context": null,
|
|
18013
|
+
"packages": null,
|
|
18014
|
+
"tags": {}
|
|
18015
|
+
};
|
|
18016
|
+
var crashFile = null;
|
|
18017
|
+
var culprit = "Object.fetch(index)";
|
|
18018
|
+
var dateCreated = "2025-04-08T21:15:04Z";
|
|
18019
|
+
var fingerprints = ["60d1c667b173018c004e399b29dc927d"];
|
|
18020
|
+
var groupingConfig = {
|
|
18021
|
+
"enhancements": "KLUv_SAYwQAAkwKRs25ld3N0eWxlOjIwMjMtMDEtMTGQ",
|
|
18022
|
+
"id": "newstyle:2023-01-11"
|
|
17453
18023
|
};
|
|
17454
|
-
|
|
18024
|
+
var release = null;
|
|
18025
|
+
var userReport = null;
|
|
18026
|
+
var sdkUpdates = [];
|
|
18027
|
+
var resolvedWith = [null];
|
|
18028
|
+
var nextEventID = null;
|
|
18029
|
+
var previousEventID = "b7ed18493f4f4817a217b03839d4c017";
|
|
18030
|
+
var event_default = {
|
|
18031
|
+
id,
|
|
18032
|
+
groupID,
|
|
18033
|
+
eventID,
|
|
18034
|
+
projectID,
|
|
18035
|
+
size,
|
|
18036
|
+
entries,
|
|
18037
|
+
dist,
|
|
18038
|
+
message,
|
|
18039
|
+
title,
|
|
18040
|
+
location: location$1,
|
|
18041
|
+
user,
|
|
18042
|
+
contexts,
|
|
18043
|
+
sdk,
|
|
18044
|
+
context,
|
|
18045
|
+
packages,
|
|
18046
|
+
type,
|
|
18047
|
+
metadata,
|
|
18048
|
+
tags,
|
|
18049
|
+
platform,
|
|
18050
|
+
dateReceived,
|
|
18051
|
+
errors,
|
|
18052
|
+
occurrence,
|
|
18053
|
+
_meta,
|
|
18054
|
+
crashFile,
|
|
18055
|
+
culprit,
|
|
18056
|
+
dateCreated,
|
|
18057
|
+
fingerprints,
|
|
18058
|
+
groupingConfig,
|
|
18059
|
+
release,
|
|
18060
|
+
userReport,
|
|
18061
|
+
sdkUpdates,
|
|
18062
|
+
resolvedWith,
|
|
18063
|
+
nextEventID,
|
|
18064
|
+
previousEventID
|
|
18065
|
+
};
|
|
18066
|
+
|
|
18067
|
+
//#endregion
|
|
18068
|
+
//#region ../mcp-server-mocks/dist/fixtures/tags.json
|
|
18069
|
+
var tags_default = [
|
|
17455
18070
|
{
|
|
17456
|
-
key: "transaction",
|
|
17457
|
-
name: "Transaction",
|
|
17458
|
-
totalValues: 1080
|
|
18071
|
+
"key": "transaction",
|
|
18072
|
+
"name": "Transaction",
|
|
18073
|
+
"totalValues": 1080
|
|
17459
18074
|
},
|
|
17460
18075
|
{
|
|
17461
|
-
key: "runtime.name",
|
|
17462
|
-
name: "Runtime.Name",
|
|
17463
|
-
totalValues: 1080
|
|
18076
|
+
"key": "runtime.name",
|
|
18077
|
+
"name": "Runtime.Name",
|
|
18078
|
+
"totalValues": 1080
|
|
17464
18079
|
},
|
|
17465
18080
|
{
|
|
17466
|
-
key: "level",
|
|
17467
|
-
name: "Level",
|
|
17468
|
-
totalValues: 1144
|
|
18081
|
+
"key": "level",
|
|
18082
|
+
"name": "Level",
|
|
18083
|
+
"totalValues": 1144
|
|
17469
18084
|
},
|
|
17470
18085
|
{
|
|
17471
|
-
key: "device",
|
|
17472
|
-
name: "Device",
|
|
17473
|
-
totalValues: 25
|
|
18086
|
+
"key": "device",
|
|
18087
|
+
"name": "Device",
|
|
18088
|
+
"totalValues": 25
|
|
17474
18089
|
},
|
|
17475
18090
|
{
|
|
17476
|
-
key: "os",
|
|
17477
|
-
name: "OS",
|
|
17478
|
-
totalValues: 1133
|
|
18091
|
+
"key": "os",
|
|
18092
|
+
"name": "OS",
|
|
18093
|
+
"totalValues": 1133
|
|
17479
18094
|
},
|
|
17480
18095
|
{
|
|
17481
|
-
key: "user",
|
|
17482
|
-
name: "User",
|
|
17483
|
-
totalValues: 1080
|
|
18096
|
+
"key": "user",
|
|
18097
|
+
"name": "User",
|
|
18098
|
+
"totalValues": 1080
|
|
17484
18099
|
},
|
|
17485
18100
|
{
|
|
17486
|
-
key: "runtime",
|
|
17487
|
-
name: "Runtime",
|
|
17488
|
-
totalValues: 1080
|
|
18101
|
+
"key": "runtime",
|
|
18102
|
+
"name": "Runtime",
|
|
18103
|
+
"totalValues": 1080
|
|
17489
18104
|
},
|
|
17490
18105
|
{
|
|
17491
|
-
key: "release",
|
|
17492
|
-
name: "Release",
|
|
17493
|
-
totalValues: 1135
|
|
18106
|
+
"key": "release",
|
|
18107
|
+
"name": "Release",
|
|
18108
|
+
"totalValues": 1135
|
|
17494
18109
|
},
|
|
17495
18110
|
{
|
|
17496
|
-
key: "url",
|
|
17497
|
-
name: "URL",
|
|
17498
|
-
totalValues: 1080
|
|
18111
|
+
"key": "url",
|
|
18112
|
+
"name": "URL",
|
|
18113
|
+
"totalValues": 1080
|
|
17499
18114
|
},
|
|
17500
18115
|
{
|
|
17501
|
-
key: "uptime_rule",
|
|
17502
|
-
name: "Uptime Rule",
|
|
17503
|
-
totalValues: 9
|
|
18116
|
+
"key": "uptime_rule",
|
|
18117
|
+
"name": "Uptime Rule",
|
|
18118
|
+
"totalValues": 9
|
|
17504
18119
|
},
|
|
17505
18120
|
{
|
|
17506
|
-
key: "server_name",
|
|
17507
|
-
name: "Server",
|
|
17508
|
-
totalValues: 1080
|
|
18121
|
+
"key": "server_name",
|
|
18122
|
+
"name": "Server",
|
|
18123
|
+
"totalValues": 1080
|
|
17509
18124
|
},
|
|
17510
18125
|
{
|
|
17511
|
-
key: "browser",
|
|
17512
|
-
name: "Browser",
|
|
17513
|
-
totalValues: 56
|
|
18126
|
+
"key": "browser",
|
|
18127
|
+
"name": "Browser",
|
|
18128
|
+
"totalValues": 56
|
|
17514
18129
|
},
|
|
17515
18130
|
{
|
|
17516
|
-
key: "os.name",
|
|
17517
|
-
name: "Os.Name",
|
|
17518
|
-
totalValues: 1135
|
|
18131
|
+
"key": "os.name",
|
|
18132
|
+
"name": "Os.Name",
|
|
18133
|
+
"totalValues": 1135
|
|
17519
18134
|
},
|
|
17520
18135
|
{
|
|
17521
|
-
key: "device.family",
|
|
17522
|
-
name: "Device.Family",
|
|
17523
|
-
totalValues: 25
|
|
18136
|
+
"key": "device.family",
|
|
18137
|
+
"name": "Device.Family",
|
|
18138
|
+
"totalValues": 25
|
|
17524
18139
|
},
|
|
17525
18140
|
{
|
|
17526
|
-
key: "replayId",
|
|
17527
|
-
name: "Replayid",
|
|
17528
|
-
totalValues: 55
|
|
18141
|
+
"key": "replayId",
|
|
18142
|
+
"name": "Replayid",
|
|
18143
|
+
"totalValues": 55
|
|
17529
18144
|
},
|
|
17530
18145
|
{
|
|
17531
|
-
key: "client_os.name",
|
|
17532
|
-
name: "Client Os.Name",
|
|
17533
|
-
totalValues: 1
|
|
18146
|
+
"key": "client_os.name",
|
|
18147
|
+
"name": "Client Os.Name",
|
|
18148
|
+
"totalValues": 1
|
|
17534
18149
|
},
|
|
17535
18150
|
{
|
|
17536
|
-
key: "environment",
|
|
17537
|
-
name: "Environment",
|
|
17538
|
-
totalValues: 1144
|
|
18151
|
+
"key": "environment",
|
|
18152
|
+
"name": "Environment",
|
|
18153
|
+
"totalValues": 1144
|
|
17539
18154
|
},
|
|
17540
18155
|
{
|
|
17541
|
-
key: "service",
|
|
17542
|
-
name: "Service",
|
|
17543
|
-
totalValues: 1135
|
|
18156
|
+
"key": "service",
|
|
18157
|
+
"name": "Service",
|
|
18158
|
+
"totalValues": 1135
|
|
17544
18159
|
},
|
|
17545
18160
|
{
|
|
17546
|
-
key: "browser.name",
|
|
17547
|
-
name: "Browser.Name",
|
|
17548
|
-
totalValues: 56
|
|
18161
|
+
"key": "browser.name",
|
|
18162
|
+
"name": "Browser.Name",
|
|
18163
|
+
"totalValues": 56
|
|
17549
18164
|
}
|
|
17550
18165
|
];
|
|
18166
|
+
|
|
18167
|
+
//#endregion
|
|
18168
|
+
//#region ../mcp-server-mocks/dist/index.js
|
|
18169
|
+
const OrganizationPayload = {
|
|
18170
|
+
id: "4509106740723712",
|
|
18171
|
+
slug: "sentry-mcp-evals",
|
|
18172
|
+
name: "sentry-mcp-evals",
|
|
18173
|
+
links: {
|
|
18174
|
+
regionUrl: "https://us.sentry.io",
|
|
18175
|
+
organizationUrl: "https://sentry.io/sentry-mcp-evals"
|
|
18176
|
+
}
|
|
18177
|
+
};
|
|
17551
18178
|
const ReleasePayload = {
|
|
17552
18179
|
id: 1402755016,
|
|
17553
18180
|
version: "8ce89484-0fec-4913-a2cd-e8e2d41dee36",
|
|
@@ -17618,188 +18245,8 @@ const ClientKeyPayload = {
|
|
|
17618
18245
|
hasDebug: false
|
|
17619
18246
|
}
|
|
17620
18247
|
};
|
|
17621
|
-
const
|
|
17622
|
-
|
|
17623
|
-
shareId: null,
|
|
17624
|
-
shortId: "CLOUDFLARE-MCP-41",
|
|
17625
|
-
title: "Error: Tool list_organizations is already registered",
|
|
17626
|
-
culprit: "Object.fetch(index)",
|
|
17627
|
-
permalink: "https://sentry-mcp-evals.sentry.io/issues/6507376925/",
|
|
17628
|
-
logger: null,
|
|
17629
|
-
level: "error",
|
|
17630
|
-
status: "unresolved",
|
|
17631
|
-
statusDetails: {},
|
|
17632
|
-
substatus: "ongoing",
|
|
17633
|
-
isPublic: false,
|
|
17634
|
-
platform: "javascript",
|
|
17635
|
-
project: {
|
|
17636
|
-
id: "4509062593708032",
|
|
17637
|
-
name: "CLOUDFLARE-MCP",
|
|
17638
|
-
slug: "CLOUDFLARE-MCP",
|
|
17639
|
-
platform: "bun"
|
|
17640
|
-
},
|
|
17641
|
-
type: "error",
|
|
17642
|
-
metadata: {
|
|
17643
|
-
value: "Tool list_organizations is already registered",
|
|
17644
|
-
type: "Error",
|
|
17645
|
-
filename: "index.js",
|
|
17646
|
-
function: "Object.fetch",
|
|
17647
|
-
in_app_frame_mix: "in-app-only",
|
|
17648
|
-
sdk: {
|
|
17649
|
-
name: "sentry.javascript.cloudflare",
|
|
17650
|
-
name_normalized: "sentry.javascript.cloudflare"
|
|
17651
|
-
},
|
|
17652
|
-
severity: 0,
|
|
17653
|
-
severity_reason: "ml",
|
|
17654
|
-
initial_priority: 50,
|
|
17655
|
-
title: null
|
|
17656
|
-
},
|
|
17657
|
-
numComments: 0,
|
|
17658
|
-
assignedTo: null,
|
|
17659
|
-
isBookmarked: false,
|
|
17660
|
-
isSubscribed: false,
|
|
17661
|
-
subscriptionDetails: null,
|
|
17662
|
-
hasSeen: true,
|
|
17663
|
-
annotations: [],
|
|
17664
|
-
issueType: "error",
|
|
17665
|
-
issueCategory: "error",
|
|
17666
|
-
priority: "medium",
|
|
17667
|
-
priorityLockedAt: null,
|
|
17668
|
-
isUnhandled: true,
|
|
17669
|
-
count: "25",
|
|
17670
|
-
userCount: 1,
|
|
17671
|
-
firstSeen: "2025-04-03T22:51:19.403000Z",
|
|
17672
|
-
lastSeen: "2025-04-12T11:34:11Z",
|
|
17673
|
-
firstRelease: null,
|
|
17674
|
-
lastRelease: null,
|
|
17675
|
-
activity: [{
|
|
17676
|
-
id: "4633815464",
|
|
17677
|
-
user: null,
|
|
17678
|
-
type: "auto_set_ongoing",
|
|
17679
|
-
data: { after_days: 7 },
|
|
17680
|
-
dateCreated: "2025-04-10T22:55:22.411699Z"
|
|
17681
|
-
}, {
|
|
17682
|
-
id: "0",
|
|
17683
|
-
user: null,
|
|
17684
|
-
type: "first_seen",
|
|
17685
|
-
data: { priority: "medium" },
|
|
17686
|
-
dateCreated: "2025-04-03T22:51:19.403000Z"
|
|
17687
|
-
}],
|
|
17688
|
-
openPeriods: [{
|
|
17689
|
-
start: "2025-04-03T22:51:19.403000Z",
|
|
17690
|
-
end: null,
|
|
17691
|
-
duration: null,
|
|
17692
|
-
isOpen: true,
|
|
17693
|
-
lastChecked: "2025-04-12T11:34:11.310000Z"
|
|
17694
|
-
}],
|
|
17695
|
-
seenBy: [{
|
|
17696
|
-
id: "1",
|
|
17697
|
-
name: "David Cramer",
|
|
17698
|
-
username: "david@example.com",
|
|
17699
|
-
email: "david@example.com",
|
|
17700
|
-
avatarUrl: null,
|
|
17701
|
-
isActive: true,
|
|
17702
|
-
hasPasswordAuth: true,
|
|
17703
|
-
isManaged: false,
|
|
17704
|
-
dateJoined: "2012-01-14T22:08:29.270831Z",
|
|
17705
|
-
lastLogin: "2025-04-13T14:00:11.516852Z",
|
|
17706
|
-
has2fa: true,
|
|
17707
|
-
lastActive: "2025-04-13T18:10:49.177605Z",
|
|
17708
|
-
isSuperuser: true,
|
|
17709
|
-
isStaff: true,
|
|
17710
|
-
experiments: {},
|
|
17711
|
-
emails: [{
|
|
17712
|
-
id: "87429",
|
|
17713
|
-
email: "david@example.com",
|
|
17714
|
-
is_verified: true
|
|
17715
|
-
}],
|
|
17716
|
-
options: {
|
|
17717
|
-
theme: "light",
|
|
17718
|
-
language: "en",
|
|
17719
|
-
stacktraceOrder: 2,
|
|
17720
|
-
defaultIssueEvent: "recommended",
|
|
17721
|
-
timezone: "US/Pacific",
|
|
17722
|
-
clock24Hours: false
|
|
17723
|
-
},
|
|
17724
|
-
flags: { newsletter_consent_prompt: false },
|
|
17725
|
-
avatar: {
|
|
17726
|
-
avatarType: "upload",
|
|
17727
|
-
avatarUuid: "51e63edabf31412aa2a955e9cf2c1ca0",
|
|
17728
|
-
avatarUrl: "https://sentry.io/avatar/51e63edabf31412aa2a955e9cf2c1ca0/"
|
|
17729
|
-
},
|
|
17730
|
-
identities: [],
|
|
17731
|
-
lastSeen: "2025-04-08T23:15:26.569455Z"
|
|
17732
|
-
}],
|
|
17733
|
-
pluginActions: [],
|
|
17734
|
-
pluginIssues: [],
|
|
17735
|
-
pluginContexts: [],
|
|
17736
|
-
userReportCount: 0,
|
|
17737
|
-
stats: {
|
|
17738
|
-
"24h": [
|
|
17739
|
-
[1744480800, 0],
|
|
17740
|
-
[1744484400, 0],
|
|
17741
|
-
[1744488e3, 0],
|
|
17742
|
-
[1744491600, 0],
|
|
17743
|
-
[1744495200, 0],
|
|
17744
|
-
[1744498800, 0],
|
|
17745
|
-
[1744502400, 0],
|
|
17746
|
-
[1744506e3, 0],
|
|
17747
|
-
[1744509600, 0],
|
|
17748
|
-
[1744513200, 0],
|
|
17749
|
-
[1744516800, 0],
|
|
17750
|
-
[1744520400, 0],
|
|
17751
|
-
[1744524e3, 0],
|
|
17752
|
-
[1744527600, 0],
|
|
17753
|
-
[1744531200, 0],
|
|
17754
|
-
[1744534800, 0],
|
|
17755
|
-
[1744538400, 0],
|
|
17756
|
-
[1744542e3, 0],
|
|
17757
|
-
[1744545600, 0],
|
|
17758
|
-
[1744549200, 0],
|
|
17759
|
-
[1744552800, 0],
|
|
17760
|
-
[1744556400, 0],
|
|
17761
|
-
[174456e4, 0],
|
|
17762
|
-
[1744563600, 0],
|
|
17763
|
-
[1744567200, 0]
|
|
17764
|
-
],
|
|
17765
|
-
"30d": [
|
|
17766
|
-
[1741910400, 0],
|
|
17767
|
-
[1741996800, 0],
|
|
17768
|
-
[1742083200, 0],
|
|
17769
|
-
[1742169600, 0],
|
|
17770
|
-
[1742256e3, 0],
|
|
17771
|
-
[1742342400, 0],
|
|
17772
|
-
[1742428800, 0],
|
|
17773
|
-
[1742515200, 0],
|
|
17774
|
-
[1742601600, 0],
|
|
17775
|
-
[1742688e3, 0],
|
|
17776
|
-
[1742774400, 0],
|
|
17777
|
-
[1742860800, 0],
|
|
17778
|
-
[1742947200, 0],
|
|
17779
|
-
[1743033600, 0],
|
|
17780
|
-
[174312e4, 0],
|
|
17781
|
-
[1743206400, 0],
|
|
17782
|
-
[1743292800, 0],
|
|
17783
|
-
[1743379200, 0],
|
|
17784
|
-
[1743465600, 0],
|
|
17785
|
-
[1743552e3, 0],
|
|
17786
|
-
[1743638400, 1],
|
|
17787
|
-
[1743724800, 0],
|
|
17788
|
-
[1743811200, 0],
|
|
17789
|
-
[1743897600, 0],
|
|
17790
|
-
[1743984e3, 0],
|
|
17791
|
-
[1744070400, 20],
|
|
17792
|
-
[1744156800, 1],
|
|
17793
|
-
[1744243200, 1],
|
|
17794
|
-
[1744329600, 0],
|
|
17795
|
-
[1744416e3, 2],
|
|
17796
|
-
[1744502400, 0]
|
|
17797
|
-
]
|
|
17798
|
-
},
|
|
17799
|
-
participants: []
|
|
17800
|
-
};
|
|
17801
|
-
const IssuePayload2 = {
|
|
17802
|
-
...IssuePayload,
|
|
18248
|
+
const issueFixture2 = {
|
|
18249
|
+
...issue_default,
|
|
17803
18250
|
id: 6507376926,
|
|
17804
18251
|
shortId: "CLOUDFLARE-MCP-42",
|
|
17805
18252
|
count: 1,
|
|
@@ -17807,336 +18254,6 @@ const IssuePayload2 = {
|
|
|
17807
18254
|
firstSeen: "2025-04-11T22:51:19.403000Z",
|
|
17808
18255
|
lastSeen: "2025-04-12T11:34:11Z"
|
|
17809
18256
|
};
|
|
17810
|
-
const EventPayload = {
|
|
17811
|
-
id: "7ca573c0f4814912aaa9bdc77d1a7d51",
|
|
17812
|
-
groupID: "6507376925",
|
|
17813
|
-
eventID: "7ca573c0f4814912aaa9bdc77d1a7d51",
|
|
17814
|
-
projectID: "4509062593708032",
|
|
17815
|
-
size: 5891,
|
|
17816
|
-
entries: [{
|
|
17817
|
-
data: {
|
|
17818
|
-
values: [{
|
|
17819
|
-
type: "Error",
|
|
17820
|
-
value: "Tool list_organizations is already registered",
|
|
17821
|
-
mechanism: {
|
|
17822
|
-
type: "cloudflare",
|
|
17823
|
-
handled: false
|
|
17824
|
-
},
|
|
17825
|
-
threadId: null,
|
|
17826
|
-
module: null,
|
|
17827
|
-
stacktrace: {
|
|
17828
|
-
frames: [
|
|
17829
|
-
{
|
|
17830
|
-
filename: "index.js",
|
|
17831
|
-
absPath: "/index.js",
|
|
17832
|
-
module: "index",
|
|
17833
|
-
package: null,
|
|
17834
|
-
platform: null,
|
|
17835
|
-
instructionAddr: null,
|
|
17836
|
-
symbolAddr: null,
|
|
17837
|
-
function: null,
|
|
17838
|
-
rawFunction: null,
|
|
17839
|
-
symbol: null,
|
|
17840
|
-
context: [],
|
|
17841
|
-
lineNo: 7809,
|
|
17842
|
-
colNo: 27,
|
|
17843
|
-
inApp: true,
|
|
17844
|
-
trust: null,
|
|
17845
|
-
errors: null,
|
|
17846
|
-
lock: null,
|
|
17847
|
-
sourceLink: null,
|
|
17848
|
-
vars: null
|
|
17849
|
-
},
|
|
17850
|
-
{
|
|
17851
|
-
filename: "index.js",
|
|
17852
|
-
absPath: "/index.js",
|
|
17853
|
-
module: "index",
|
|
17854
|
-
package: null,
|
|
17855
|
-
platform: null,
|
|
17856
|
-
instructionAddr: null,
|
|
17857
|
-
symbolAddr: null,
|
|
17858
|
-
function: "OAuthProviderImpl.fetch",
|
|
17859
|
-
rawFunction: null,
|
|
17860
|
-
symbol: null,
|
|
17861
|
-
context: [],
|
|
17862
|
-
lineNo: 8029,
|
|
17863
|
-
colNo: 24,
|
|
17864
|
-
inApp: true,
|
|
17865
|
-
trust: null,
|
|
17866
|
-
errors: null,
|
|
17867
|
-
lock: null,
|
|
17868
|
-
sourceLink: null,
|
|
17869
|
-
vars: null
|
|
17870
|
-
},
|
|
17871
|
-
{
|
|
17872
|
-
filename: "index.js",
|
|
17873
|
-
absPath: "/index.js",
|
|
17874
|
-
module: "index",
|
|
17875
|
-
package: null,
|
|
17876
|
-
platform: null,
|
|
17877
|
-
instructionAddr: null,
|
|
17878
|
-
symbolAddr: null,
|
|
17879
|
-
function: "Object.fetch",
|
|
17880
|
-
rawFunction: null,
|
|
17881
|
-
symbol: null,
|
|
17882
|
-
context: [],
|
|
17883
|
-
lineNo: 19631,
|
|
17884
|
-
colNo: 28,
|
|
17885
|
-
inApp: true,
|
|
17886
|
-
trust: null,
|
|
17887
|
-
errors: null,
|
|
17888
|
-
lock: null,
|
|
17889
|
-
sourceLink: null,
|
|
17890
|
-
vars: null
|
|
17891
|
-
}
|
|
17892
|
-
],
|
|
17893
|
-
framesOmitted: null,
|
|
17894
|
-
registers: null,
|
|
17895
|
-
hasSystemFrames: true
|
|
17896
|
-
},
|
|
17897
|
-
rawStacktrace: {
|
|
17898
|
-
frames: [
|
|
17899
|
-
{
|
|
17900
|
-
filename: "index.js",
|
|
17901
|
-
absPath: "/index.js",
|
|
17902
|
-
module: "index",
|
|
17903
|
-
package: null,
|
|
17904
|
-
platform: null,
|
|
17905
|
-
instructionAddr: null,
|
|
17906
|
-
symbolAddr: null,
|
|
17907
|
-
function: null,
|
|
17908
|
-
rawFunction: null,
|
|
17909
|
-
symbol: null,
|
|
17910
|
-
context: [],
|
|
17911
|
-
lineNo: 7809,
|
|
17912
|
-
colNo: 27,
|
|
17913
|
-
inApp: true,
|
|
17914
|
-
trust: null,
|
|
17915
|
-
errors: null,
|
|
17916
|
-
lock: null,
|
|
17917
|
-
sourceLink: null,
|
|
17918
|
-
vars: null
|
|
17919
|
-
},
|
|
17920
|
-
{
|
|
17921
|
-
filename: "index.js",
|
|
17922
|
-
absPath: "/index.js",
|
|
17923
|
-
module: "index",
|
|
17924
|
-
package: null,
|
|
17925
|
-
platform: null,
|
|
17926
|
-
instructionAddr: null,
|
|
17927
|
-
symbolAddr: null,
|
|
17928
|
-
function: "OAuthProviderImpl.fetch",
|
|
17929
|
-
rawFunction: null,
|
|
17930
|
-
symbol: null,
|
|
17931
|
-
context: [],
|
|
17932
|
-
lineNo: 8029,
|
|
17933
|
-
colNo: 24,
|
|
17934
|
-
inApp: true,
|
|
17935
|
-
trust: null,
|
|
17936
|
-
errors: null,
|
|
17937
|
-
lock: null,
|
|
17938
|
-
sourceLink: null,
|
|
17939
|
-
vars: null
|
|
17940
|
-
},
|
|
17941
|
-
{
|
|
17942
|
-
filename: "index.js",
|
|
17943
|
-
absPath: "/index.js",
|
|
17944
|
-
module: "index",
|
|
17945
|
-
package: null,
|
|
17946
|
-
platform: null,
|
|
17947
|
-
instructionAddr: null,
|
|
17948
|
-
symbolAddr: null,
|
|
17949
|
-
function: "Object.fetch",
|
|
17950
|
-
rawFunction: null,
|
|
17951
|
-
symbol: null,
|
|
17952
|
-
context: [],
|
|
17953
|
-
lineNo: 19631,
|
|
17954
|
-
colNo: 28,
|
|
17955
|
-
inApp: true,
|
|
17956
|
-
trust: null,
|
|
17957
|
-
errors: null,
|
|
17958
|
-
lock: null,
|
|
17959
|
-
sourceLink: null,
|
|
17960
|
-
vars: null
|
|
17961
|
-
}
|
|
17962
|
-
],
|
|
17963
|
-
framesOmitted: null,
|
|
17964
|
-
registers: null,
|
|
17965
|
-
hasSystemFrames: true
|
|
17966
|
-
}
|
|
17967
|
-
}],
|
|
17968
|
-
hasSystemFrames: true,
|
|
17969
|
-
excOmitted: null
|
|
17970
|
-
},
|
|
17971
|
-
type: "exception"
|
|
17972
|
-
}, {
|
|
17973
|
-
data: {
|
|
17974
|
-
apiTarget: null,
|
|
17975
|
-
method: "GET",
|
|
17976
|
-
url: "https://mcp.sentry.dev/sse",
|
|
17977
|
-
query: [],
|
|
17978
|
-
fragment: null,
|
|
17979
|
-
data: null,
|
|
17980
|
-
headers: [
|
|
17981
|
-
["Accept", "text/event-stream"],
|
|
17982
|
-
["Accept-Encoding", "gzip, br"],
|
|
17983
|
-
["Accept-Language", "*"],
|
|
17984
|
-
["Authorization", "[Filtered]"],
|
|
17985
|
-
["Cache-Control", "no-cache"],
|
|
17986
|
-
["Cf-Ipcountry", "GB"],
|
|
17987
|
-
["Cf-Ray", "92d4c7266c8f48c9"],
|
|
17988
|
-
["Cf-Visitor", "{\"scheme\":\"https\"}"],
|
|
17989
|
-
["Connection", "Keep-Alive"],
|
|
17990
|
-
["Host", "mcp.sentry.dev"],
|
|
17991
|
-
["Pragma", "no-cache"],
|
|
17992
|
-
["Sec-Fetch-Mode", "cors"],
|
|
17993
|
-
["User-Agent", "node"],
|
|
17994
|
-
["X-Forwarded-Proto", "https"]
|
|
17995
|
-
],
|
|
17996
|
-
cookies: [],
|
|
17997
|
-
env: null,
|
|
17998
|
-
inferredContentType: null
|
|
17999
|
-
},
|
|
18000
|
-
type: "request"
|
|
18001
|
-
}],
|
|
18002
|
-
dist: null,
|
|
18003
|
-
message: "",
|
|
18004
|
-
title: "Error: Tool list_organizations is already registered",
|
|
18005
|
-
location: "index.js",
|
|
18006
|
-
user: {
|
|
18007
|
-
id: null,
|
|
18008
|
-
email: null,
|
|
18009
|
-
username: null,
|
|
18010
|
-
ip_address: "2a06:98c0:3600::103",
|
|
18011
|
-
name: null,
|
|
18012
|
-
geo: {
|
|
18013
|
-
country_code: "US",
|
|
18014
|
-
region: "United States"
|
|
18015
|
-
},
|
|
18016
|
-
data: null
|
|
18017
|
-
},
|
|
18018
|
-
contexts: {
|
|
18019
|
-
cloud_resource: {
|
|
18020
|
-
"cloud.provider": "cloudflare",
|
|
18021
|
-
type: "default"
|
|
18022
|
-
},
|
|
18023
|
-
culture: {
|
|
18024
|
-
timezone: "Europe/London",
|
|
18025
|
-
type: "default"
|
|
18026
|
-
},
|
|
18027
|
-
runtime: {
|
|
18028
|
-
name: "cloudflare",
|
|
18029
|
-
type: "runtime"
|
|
18030
|
-
},
|
|
18031
|
-
trace: {
|
|
18032
|
-
trace_id: "3032af8bcdfe4423b937fc5c041d5d82",
|
|
18033
|
-
span_id: "953da703d2a6f4c7",
|
|
18034
|
-
status: "unknown",
|
|
18035
|
-
client_sample_rate: 1,
|
|
18036
|
-
sampled: true,
|
|
18037
|
-
type: "trace"
|
|
18038
|
-
}
|
|
18039
|
-
},
|
|
18040
|
-
sdk: {
|
|
18041
|
-
name: "sentry.javascript.cloudflare",
|
|
18042
|
-
version: "9.12.0"
|
|
18043
|
-
},
|
|
18044
|
-
context: {},
|
|
18045
|
-
packages: {},
|
|
18046
|
-
type: "error",
|
|
18047
|
-
metadata: {
|
|
18048
|
-
filename: "index.js",
|
|
18049
|
-
function: "Object.fetch",
|
|
18050
|
-
in_app_frame_mix: "in-app-only",
|
|
18051
|
-
type: "Error",
|
|
18052
|
-
value: "Tool list_organizations is already registered"
|
|
18053
|
-
},
|
|
18054
|
-
tags: [
|
|
18055
|
-
{
|
|
18056
|
-
key: "environment",
|
|
18057
|
-
value: "development"
|
|
18058
|
-
},
|
|
18059
|
-
{
|
|
18060
|
-
key: "handled",
|
|
18061
|
-
value: "no"
|
|
18062
|
-
},
|
|
18063
|
-
{
|
|
18064
|
-
key: "level",
|
|
18065
|
-
value: "error"
|
|
18066
|
-
},
|
|
18067
|
-
{
|
|
18068
|
-
key: "mechanism",
|
|
18069
|
-
value: "cloudflare"
|
|
18070
|
-
},
|
|
18071
|
-
{
|
|
18072
|
-
key: "runtime.name",
|
|
18073
|
-
value: "cloudflare"
|
|
18074
|
-
},
|
|
18075
|
-
{
|
|
18076
|
-
key: "url",
|
|
18077
|
-
value: "https://mcp.sentry.dev/sse"
|
|
18078
|
-
}
|
|
18079
|
-
],
|
|
18080
|
-
platform: "javascript",
|
|
18081
|
-
dateReceived: "2025-04-08T21:15:04.700878Z",
|
|
18082
|
-
errors: [{
|
|
18083
|
-
type: "js_no_source",
|
|
18084
|
-
message: "Source code was not found",
|
|
18085
|
-
data: {
|
|
18086
|
-
symbolicator_type: "missing_source",
|
|
18087
|
-
url: "/index.js"
|
|
18088
|
-
}
|
|
18089
|
-
}],
|
|
18090
|
-
occurrence: null,
|
|
18091
|
-
_meta: {
|
|
18092
|
-
entries: { "1": { data: {
|
|
18093
|
-
"": null,
|
|
18094
|
-
apiTarget: null,
|
|
18095
|
-
method: null,
|
|
18096
|
-
url: null,
|
|
18097
|
-
query: null,
|
|
18098
|
-
data: null,
|
|
18099
|
-
headers: { "3": { "1": { "": {
|
|
18100
|
-
rem: [[
|
|
18101
|
-
"@password:filter",
|
|
18102
|
-
"s",
|
|
18103
|
-
0,
|
|
18104
|
-
10
|
|
18105
|
-
]],
|
|
18106
|
-
len: 64,
|
|
18107
|
-
chunks: [{
|
|
18108
|
-
type: "redaction",
|
|
18109
|
-
text: "[Filtered]",
|
|
18110
|
-
rule_id: "@password:filter",
|
|
18111
|
-
remark: "s"
|
|
18112
|
-
}]
|
|
18113
|
-
} } } },
|
|
18114
|
-
cookies: null,
|
|
18115
|
-
env: null
|
|
18116
|
-
} } },
|
|
18117
|
-
message: null,
|
|
18118
|
-
user: null,
|
|
18119
|
-
contexts: null,
|
|
18120
|
-
sdk: null,
|
|
18121
|
-
context: null,
|
|
18122
|
-
packages: null,
|
|
18123
|
-
tags: {}
|
|
18124
|
-
},
|
|
18125
|
-
crashFile: null,
|
|
18126
|
-
culprit: "Object.fetch(index)",
|
|
18127
|
-
dateCreated: "2025-04-08T21:15:04Z",
|
|
18128
|
-
fingerprints: ["60d1c667b173018c004e399b29dc927d"],
|
|
18129
|
-
groupingConfig: {
|
|
18130
|
-
enhancements: "KLUv_SAYwQAAkwKRs25ld3N0eWxlOjIwMjMtMDEtMTGQ",
|
|
18131
|
-
id: "newstyle:2023-01-11"
|
|
18132
|
-
},
|
|
18133
|
-
release: null,
|
|
18134
|
-
userReport: null,
|
|
18135
|
-
sdkUpdates: [],
|
|
18136
|
-
resolvedWith: [null],
|
|
18137
|
-
nextEventID: null,
|
|
18138
|
-
previousEventID: "b7ed18493f4f4817a217b03839d4c017"
|
|
18139
|
-
};
|
|
18140
18257
|
const EventsErrorsMeta = {
|
|
18141
18258
|
fields: {
|
|
18142
18259
|
"issue.id": "integer",
|
|
@@ -18298,344 +18415,476 @@ const EventsSpansPayload = {
|
|
|
18298
18415
|
{}
|
|
18299
18416
|
]
|
|
18300
18417
|
};
|
|
18301
|
-
|
|
18302
|
-
http.
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
|
|
18308
|
-
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18314
|
-
|
|
18315
|
-
|
|
18316
|
-
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
|
|
18323
|
-
|
|
18324
|
-
|
|
18325
|
-
|
|
18326
|
-
|
|
18327
|
-
|
|
18328
|
-
|
|
18329
|
-
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
return HttpResponse.json([{
|
|
18347
|
-
team: {
|
|
18348
|
-
id: "4509106733776896",
|
|
18418
|
+
function buildHandlers(handlers) {
|
|
18419
|
+
return [...handlers.map((handler) => http[handler.method](`https://us.sentry.io${handler.path}`, handler.fetch)), ...handlers.map((handler) => http[handler.method](`https://sentry.io${handler.path}`, handler.fetch))];
|
|
18420
|
+
}
|
|
18421
|
+
const restHandlers = buildHandlers([
|
|
18422
|
+
{
|
|
18423
|
+
method: "get",
|
|
18424
|
+
path: "/api/0/auth/",
|
|
18425
|
+
fetch: () => {
|
|
18426
|
+
return HttpResponse.json({
|
|
18427
|
+
id: "1",
|
|
18428
|
+
name: "John Doe",
|
|
18429
|
+
email: "john.doe@example.com"
|
|
18430
|
+
});
|
|
18431
|
+
}
|
|
18432
|
+
},
|
|
18433
|
+
{
|
|
18434
|
+
method: "get",
|
|
18435
|
+
path: "/api/0/users/me/regions/",
|
|
18436
|
+
fetch: () => {
|
|
18437
|
+
return HttpResponse.json({ regions: [{
|
|
18438
|
+
name: "us",
|
|
18439
|
+
url: "https://us.sentry.io"
|
|
18440
|
+
}] });
|
|
18441
|
+
}
|
|
18442
|
+
},
|
|
18443
|
+
{
|
|
18444
|
+
method: "get",
|
|
18445
|
+
path: "/api/0/organizations/",
|
|
18446
|
+
fetch: () => {
|
|
18447
|
+
return HttpResponse.json([OrganizationPayload]);
|
|
18448
|
+
}
|
|
18449
|
+
},
|
|
18450
|
+
{
|
|
18451
|
+
method: "get",
|
|
18452
|
+
path: "/api/0/organizations/sentry-mcp-evals/",
|
|
18453
|
+
fetch: () => {
|
|
18454
|
+
return HttpResponse.json(OrganizationPayload);
|
|
18455
|
+
}
|
|
18456
|
+
},
|
|
18457
|
+
{
|
|
18458
|
+
method: "get",
|
|
18459
|
+
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18460
|
+
fetch: () => {
|
|
18461
|
+
return HttpResponse.json([{
|
|
18462
|
+
id: "4509106740854784",
|
|
18349
18463
|
slug: "the-goats",
|
|
18350
|
-
name: "the-goats"
|
|
18351
|
-
|
|
18352
|
-
|
|
18353
|
-
|
|
18464
|
+
name: "the-goats",
|
|
18465
|
+
dateCreated: "2025-04-06T14:11:23.961739Z",
|
|
18466
|
+
isMember: true,
|
|
18467
|
+
teamRole: "admin",
|
|
18468
|
+
flags: { "idp:provisioned": false },
|
|
18469
|
+
access: [
|
|
18470
|
+
"team:read",
|
|
18471
|
+
"alerts:read",
|
|
18472
|
+
"event:write",
|
|
18473
|
+
"team:write",
|
|
18474
|
+
"team:admin",
|
|
18475
|
+
"event:read",
|
|
18476
|
+
"org:read",
|
|
18477
|
+
"member:read",
|
|
18478
|
+
"project:admin",
|
|
18479
|
+
"project:write",
|
|
18480
|
+
"org:integrations",
|
|
18481
|
+
"project:releases",
|
|
18482
|
+
"alerts:write",
|
|
18483
|
+
"event:admin",
|
|
18484
|
+
"project:read"
|
|
18485
|
+
],
|
|
18486
|
+
hasAccess: true,
|
|
18487
|
+
isPending: false,
|
|
18488
|
+
memberCount: 1,
|
|
18489
|
+
avatar: {
|
|
18490
|
+
avatarType: "letter_avatar",
|
|
18491
|
+
avatarUuid: null
|
|
18492
|
+
},
|
|
18493
|
+
externalTeams: [],
|
|
18494
|
+
projects: []
|
|
18495
|
+
}]);
|
|
18496
|
+
}
|
|
18497
|
+
},
|
|
18498
|
+
{
|
|
18499
|
+
method: "get",
|
|
18500
|
+
path: "/api/0/organizations/sentry-mcp-evals/projects/",
|
|
18501
|
+
fetch: () => {
|
|
18502
|
+
return HttpResponse.json([{
|
|
18503
|
+
team: {
|
|
18504
|
+
id: "4509106733776896",
|
|
18505
|
+
slug: "the-goats",
|
|
18506
|
+
name: "the-goats"
|
|
18507
|
+
},
|
|
18508
|
+
teams: [{
|
|
18509
|
+
id: "4509106733776896",
|
|
18510
|
+
slug: "the-goats",
|
|
18511
|
+
name: "the-goats"
|
|
18512
|
+
}],
|
|
18513
|
+
id: "4509106749636608",
|
|
18514
|
+
name: "cloudflare-mcp",
|
|
18515
|
+
slug: "cloudflare-mcp",
|
|
18516
|
+
isBookmarked: false,
|
|
18517
|
+
isMember: true,
|
|
18518
|
+
access: [
|
|
18519
|
+
"event:admin",
|
|
18520
|
+
"alerts:read",
|
|
18521
|
+
"project:write",
|
|
18522
|
+
"org:integrations",
|
|
18523
|
+
"alerts:write",
|
|
18524
|
+
"member:read",
|
|
18525
|
+
"team:write",
|
|
18526
|
+
"project:read",
|
|
18527
|
+
"event:read",
|
|
18528
|
+
"event:write",
|
|
18529
|
+
"project:admin",
|
|
18530
|
+
"org:read",
|
|
18531
|
+
"team:admin",
|
|
18532
|
+
"project:releases",
|
|
18533
|
+
"team:read"
|
|
18534
|
+
],
|
|
18535
|
+
hasAccess: true,
|
|
18536
|
+
dateCreated: "2025-04-06T14:13:37.825970Z",
|
|
18537
|
+
environments: [],
|
|
18538
|
+
eventProcessing: { symbolicationDegraded: false },
|
|
18539
|
+
features: [
|
|
18540
|
+
"discard-groups",
|
|
18541
|
+
"alert-filters",
|
|
18542
|
+
"similarity-embeddings",
|
|
18543
|
+
"similarity-indexing",
|
|
18544
|
+
"similarity-view"
|
|
18545
|
+
],
|
|
18546
|
+
firstEvent: null,
|
|
18547
|
+
firstTransactionEvent: false,
|
|
18548
|
+
hasSessions: false,
|
|
18549
|
+
hasProfiles: false,
|
|
18550
|
+
hasReplays: false,
|
|
18551
|
+
hasFeedbacks: false,
|
|
18552
|
+
hasNewFeedbacks: false,
|
|
18553
|
+
hasMonitors: false,
|
|
18554
|
+
hasMinifiedStackTrace: false,
|
|
18555
|
+
hasInsightsHttp: false,
|
|
18556
|
+
hasInsightsDb: false,
|
|
18557
|
+
hasInsightsAssets: false,
|
|
18558
|
+
hasInsightsAppStart: false,
|
|
18559
|
+
hasInsightsScreenLoad: false,
|
|
18560
|
+
hasInsightsVitals: false,
|
|
18561
|
+
hasInsightsCaches: false,
|
|
18562
|
+
hasInsightsQueues: false,
|
|
18563
|
+
hasInsightsLlmMonitoring: false,
|
|
18564
|
+
platform: "node",
|
|
18565
|
+
platforms: [],
|
|
18566
|
+
latestRelease: null,
|
|
18567
|
+
hasUserReports: false,
|
|
18568
|
+
hasFlags: false,
|
|
18569
|
+
latestDeploys: null
|
|
18570
|
+
}]);
|
|
18571
|
+
}
|
|
18572
|
+
},
|
|
18573
|
+
{
|
|
18574
|
+
method: "post",
|
|
18575
|
+
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18576
|
+
fetch: () => {
|
|
18577
|
+
return HttpResponse.json({
|
|
18578
|
+
id: "4509109078196224",
|
|
18354
18579
|
slug: "the-goats",
|
|
18355
|
-
name: "the-goats"
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18580
|
+
name: "the-goats",
|
|
18581
|
+
dateCreated: "2025-04-07T00:05:48.196710Z",
|
|
18582
|
+
isMember: true,
|
|
18583
|
+
teamRole: "admin",
|
|
18584
|
+
flags: { "idp:provisioned": false },
|
|
18585
|
+
access: [
|
|
18586
|
+
"event:read",
|
|
18587
|
+
"org:integrations",
|
|
18588
|
+
"org:read",
|
|
18589
|
+
"member:read",
|
|
18590
|
+
"alerts:write",
|
|
18591
|
+
"event:admin",
|
|
18592
|
+
"team:admin",
|
|
18593
|
+
"project:releases",
|
|
18594
|
+
"team:read",
|
|
18595
|
+
"project:write",
|
|
18596
|
+
"event:write",
|
|
18597
|
+
"team:write",
|
|
18598
|
+
"project:read",
|
|
18599
|
+
"project:admin",
|
|
18600
|
+
"alerts:read"
|
|
18601
|
+
],
|
|
18602
|
+
hasAccess: true,
|
|
18603
|
+
isPending: false,
|
|
18604
|
+
memberCount: 1,
|
|
18605
|
+
avatar: {
|
|
18606
|
+
avatarType: "letter_avatar",
|
|
18607
|
+
avatarUuid: null
|
|
18608
|
+
}
|
|
18609
|
+
});
|
|
18610
|
+
}
|
|
18611
|
+
},
|
|
18612
|
+
{
|
|
18613
|
+
method: "post",
|
|
18614
|
+
path: "/api/0/teams/sentry-mcp-evals/the-goats/projects/",
|
|
18615
|
+
fetch: () => {
|
|
18616
|
+
return HttpResponse.json({
|
|
18617
|
+
id: "4509109104082945",
|
|
18618
|
+
slug: "cloudflare-mcp",
|
|
18619
|
+
name: "cloudflare-mcp",
|
|
18620
|
+
platform: "javascript",
|
|
18621
|
+
dateCreated: "2025-04-07T00:12:23.143074Z",
|
|
18622
|
+
isBookmarked: false,
|
|
18623
|
+
isMember: true,
|
|
18624
|
+
features: [
|
|
18625
|
+
"discard-groups",
|
|
18626
|
+
"alert-filters",
|
|
18627
|
+
"similarity-embeddings",
|
|
18628
|
+
"similarity-indexing",
|
|
18629
|
+
"similarity-view"
|
|
18630
|
+
],
|
|
18631
|
+
firstEvent: null,
|
|
18632
|
+
firstTransactionEvent: false,
|
|
18633
|
+
access: [
|
|
18634
|
+
"team:write",
|
|
18635
|
+
"alerts:write",
|
|
18636
|
+
"event:write",
|
|
18637
|
+
"org:read",
|
|
18638
|
+
"alerts:read",
|
|
18639
|
+
"event:admin",
|
|
18640
|
+
"project:admin",
|
|
18641
|
+
"event:read",
|
|
18642
|
+
"org:integrations",
|
|
18643
|
+
"project:read",
|
|
18644
|
+
"project:releases",
|
|
18645
|
+
"project:write",
|
|
18646
|
+
"member:read",
|
|
18647
|
+
"team:read",
|
|
18648
|
+
"team:admin"
|
|
18649
|
+
],
|
|
18650
|
+
hasAccess: true,
|
|
18651
|
+
hasMinifiedStackTrace: false,
|
|
18652
|
+
hasMonitors: false,
|
|
18653
|
+
hasProfiles: false,
|
|
18654
|
+
hasReplays: false,
|
|
18655
|
+
hasFeedbacks: false,
|
|
18656
|
+
hasFlags: false,
|
|
18657
|
+
hasNewFeedbacks: false,
|
|
18658
|
+
hasSessions: false,
|
|
18659
|
+
hasInsightsHttp: false,
|
|
18660
|
+
hasInsightsDb: false,
|
|
18661
|
+
hasInsightsAssets: false,
|
|
18662
|
+
hasInsightsAppStart: false,
|
|
18663
|
+
hasInsightsScreenLoad: false,
|
|
18664
|
+
hasInsightsVitals: false,
|
|
18665
|
+
hasInsightsCaches: false,
|
|
18666
|
+
hasInsightsQueues: false,
|
|
18667
|
+
hasInsightsLlmMonitoring: false,
|
|
18668
|
+
isInternal: false,
|
|
18669
|
+
isPublic: false,
|
|
18670
|
+
avatar: {
|
|
18671
|
+
avatarType: "letter_avatar",
|
|
18672
|
+
avatarUuid: null
|
|
18673
|
+
},
|
|
18674
|
+
color: "#bf3f55",
|
|
18675
|
+
status: "active"
|
|
18676
|
+
});
|
|
18677
|
+
}
|
|
18678
|
+
},
|
|
18679
|
+
{
|
|
18680
|
+
method: "post",
|
|
18681
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/keys/",
|
|
18682
|
+
fetch: () => {
|
|
18683
|
+
return HttpResponse.json(ClientKeyPayload);
|
|
18684
|
+
}
|
|
18685
|
+
},
|
|
18686
|
+
{
|
|
18687
|
+
method: "get",
|
|
18688
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/keys/",
|
|
18689
|
+
fetch: () => {
|
|
18690
|
+
return HttpResponse.json([ClientKeyPayload]);
|
|
18691
|
+
}
|
|
18692
|
+
},
|
|
18693
|
+
{
|
|
18694
|
+
method: "get",
|
|
18695
|
+
path: "/api/0/organizations/sentry-mcp-evals/events/",
|
|
18696
|
+
fetch: async ({ request }) => {
|
|
18697
|
+
const url = new URL(request.url);
|
|
18698
|
+
const dataset = url.searchParams.get("dataset");
|
|
18699
|
+
const query = url.searchParams.get("query");
|
|
18700
|
+
const fields = url.searchParams.getAll("field");
|
|
18701
|
+
if (dataset === "spans") {
|
|
18702
|
+
if (query !== "is_transaction:true") return HttpResponse.json(EmptyEventsSpansPayload);
|
|
18703
|
+
if (url.searchParams.get("useRpc") !== "1") return HttpResponse.json("Invalid useRpc", { status: 400 });
|
|
18704
|
+
if (!fields.includes("id") || !fields.includes("trace") || !fields.includes("span.op") || !fields.includes("span.description") || !fields.includes("span.duration")) return HttpResponse.json("Invalid fields", { status: 400 });
|
|
18705
|
+
return HttpResponse.json(EventsSpansPayload);
|
|
18448
18706
|
}
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
|
|
18467
|
-
firstEvent: null,
|
|
18468
|
-
firstTransactionEvent: false,
|
|
18469
|
-
access: [
|
|
18470
|
-
"team:write",
|
|
18471
|
-
"alerts:write",
|
|
18472
|
-
"event:write",
|
|
18473
|
-
"org:read",
|
|
18474
|
-
"alerts:read",
|
|
18475
|
-
"event:admin",
|
|
18476
|
-
"project:admin",
|
|
18477
|
-
"event:read",
|
|
18478
|
-
"org:integrations",
|
|
18479
|
-
"project:read",
|
|
18480
|
-
"project:releases",
|
|
18481
|
-
"project:write",
|
|
18482
|
-
"member:read",
|
|
18483
|
-
"team:read",
|
|
18484
|
-
"team:admin"
|
|
18485
|
-
],
|
|
18486
|
-
hasAccess: true,
|
|
18487
|
-
hasMinifiedStackTrace: false,
|
|
18488
|
-
hasMonitors: false,
|
|
18489
|
-
hasProfiles: false,
|
|
18490
|
-
hasReplays: false,
|
|
18491
|
-
hasFeedbacks: false,
|
|
18492
|
-
hasFlags: false,
|
|
18493
|
-
hasNewFeedbacks: false,
|
|
18494
|
-
hasSessions: false,
|
|
18495
|
-
hasInsightsHttp: false,
|
|
18496
|
-
hasInsightsDb: false,
|
|
18497
|
-
hasInsightsAssets: false,
|
|
18498
|
-
hasInsightsAppStart: false,
|
|
18499
|
-
hasInsightsScreenLoad: false,
|
|
18500
|
-
hasInsightsVitals: false,
|
|
18501
|
-
hasInsightsCaches: false,
|
|
18502
|
-
hasInsightsQueues: false,
|
|
18503
|
-
hasInsightsLlmMonitoring: false,
|
|
18504
|
-
isInternal: false,
|
|
18505
|
-
isPublic: false,
|
|
18506
|
-
avatar: {
|
|
18507
|
-
avatarType: "letter_avatar",
|
|
18508
|
-
avatarUuid: null
|
|
18509
|
-
},
|
|
18510
|
-
color: "#bf3f55",
|
|
18511
|
-
status: "active"
|
|
18512
|
-
});
|
|
18513
|
-
}),
|
|
18514
|
-
http.post("https://sentry.io/api/0/projects/sentry-mcp-evals/cloudflare-mcp/keys/", () => {
|
|
18515
|
-
return HttpResponse.json(ClientKeyPayload);
|
|
18516
|
-
}),
|
|
18517
|
-
http.get("https://sentry.io/api/0/projects/sentry-mcp-evals/cloudflare-mcp/keys/", () => {
|
|
18518
|
-
return HttpResponse.json([ClientKeyPayload]);
|
|
18519
|
-
}),
|
|
18520
|
-
http.get("https://sentry.io/api/0/organizations/sentry-mcp-evals/events/", async ({ request }) => {
|
|
18521
|
-
const url = new URL(request.url);
|
|
18522
|
-
const dataset = url.searchParams.get("dataset");
|
|
18523
|
-
const query = url.searchParams.get("query");
|
|
18524
|
-
const fields = url.searchParams.getAll("field");
|
|
18525
|
-
if (dataset === "spans") {
|
|
18526
|
-
if (query !== "is_transaction:true") return HttpResponse.json(EmptyEventsSpansPayload);
|
|
18527
|
-
if (url.searchParams.get("useRpc") !== "1") return HttpResponse.json("Invalid useRpc", { status: 400 });
|
|
18528
|
-
if (!fields.includes("id") || !fields.includes("trace") || !fields.includes("span.op") || !fields.includes("span.description") || !fields.includes("span.duration")) return HttpResponse.json("Invalid fields", { status: 400 });
|
|
18529
|
-
return HttpResponse.json(EventsSpansPayload);
|
|
18707
|
+
if (dataset === "errors") {
|
|
18708
|
+
if (!fields.includes("issue") || !fields.includes("title") || !fields.includes("project") || !fields.includes("last_seen()") || !fields.includes("count()")) return HttpResponse.json("Invalid fields", { status: 400 });
|
|
18709
|
+
if (!["-count", "-last_seen"].includes(url.searchParams.get("sort"))) return HttpResponse.json("Invalid sort", { status: 400 });
|
|
18710
|
+
const sortedQuery = query ? query?.split(" ").sort().join(" ") : null;
|
|
18711
|
+
if (![
|
|
18712
|
+
null,
|
|
18713
|
+
"",
|
|
18714
|
+
"error.handled:false",
|
|
18715
|
+
"error.unhandled:true",
|
|
18716
|
+
"error.handled:false is:unresolved",
|
|
18717
|
+
"error.unhandled:true is:unresolved",
|
|
18718
|
+
"is:unresolved project:cloudflare-mcp",
|
|
18719
|
+
"project:cloudflare-mcp",
|
|
18720
|
+
"user.email:david@sentry.io"
|
|
18721
|
+
].includes(sortedQuery)) return HttpResponse.json(EmptyEventsErrorsPayload);
|
|
18722
|
+
return HttpResponse.json(EventsErrorsPayload);
|
|
18723
|
+
}
|
|
18724
|
+
return HttpResponse.json("Invalid dataset", { status: 400 });
|
|
18530
18725
|
}
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18726
|
+
},
|
|
18727
|
+
{
|
|
18728
|
+
method: "get",
|
|
18729
|
+
path: "/api/0/projects/sentry-mcp-evals/foobar/issues/",
|
|
18730
|
+
fetch: () => HttpResponse.json([])
|
|
18731
|
+
},
|
|
18732
|
+
{
|
|
18733
|
+
method: "get",
|
|
18734
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/issues/",
|
|
18735
|
+
fetch: ({ request }) => {
|
|
18736
|
+
const url = new URL(request.url);
|
|
18737
|
+
const sort = url.searchParams.get("sort");
|
|
18738
|
+
if (![
|
|
18739
|
+
null,
|
|
18740
|
+
"user",
|
|
18741
|
+
"freq",
|
|
18742
|
+
"date",
|
|
18743
|
+
"new",
|
|
18744
|
+
null
|
|
18745
|
+
].includes(sort)) return HttpResponse.json(`Invalid sort: ${url.searchParams.get("sort")}`, { status: 400 });
|
|
18746
|
+
const collapse = url.searchParams.getAll("collapse");
|
|
18747
|
+
if (collapse.includes("stats")) return HttpResponse.json(`Invalid collapse: ${collapse.join(",")}`, { status: 400 });
|
|
18748
|
+
const query = url.searchParams.get("query");
|
|
18749
|
+
const queryTokens = query?.split(" ").sort() ?? [];
|
|
18750
|
+
const sortedQuery = queryTokens ? queryTokens.join(" ") : null;
|
|
18535
18751
|
if (![
|
|
18536
18752
|
null,
|
|
18537
18753
|
"",
|
|
18538
|
-
"
|
|
18539
|
-
"error.unhandled:true",
|
|
18754
|
+
"is:unresolved",
|
|
18540
18755
|
"error.handled:false is:unresolved",
|
|
18541
18756
|
"error.unhandled:true is:unresolved",
|
|
18542
|
-
"is:unresolved project:cloudflare-mcp",
|
|
18543
|
-
"project:cloudflare-mcp",
|
|
18544
18757
|
"user.email:david@sentry.io"
|
|
18545
|
-
].includes(sortedQuery)) return HttpResponse.json(
|
|
18546
|
-
return HttpResponse.json(
|
|
18758
|
+
].includes(sortedQuery)) return HttpResponse.json([]);
|
|
18759
|
+
if (queryTokens.includes("user.email:david@sentry.io")) return HttpResponse.json([issue_default]);
|
|
18760
|
+
if (sort === "date") return HttpResponse.json([issue_default, issueFixture2]);
|
|
18761
|
+
return HttpResponse.json([issueFixture2, issue_default]);
|
|
18547
18762
|
}
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
"freq",
|
|
18586
|
-
"date",
|
|
18587
|
-
"new",
|
|
18588
|
-
null
|
|
18589
|
-
].includes(sort)) return HttpResponse.json(`Invalid sort: ${url.searchParams.get("sort")}`, { status: 400 });
|
|
18590
|
-
const collapse = url.searchParams.getAll("collapse");
|
|
18591
|
-
if (collapse.includes("stats")) return HttpResponse.json(`Invalid collapse: ${collapse.join(",")}`, { status: 400 });
|
|
18592
|
-
const query = url.searchParams.get("query");
|
|
18593
|
-
const queryTokens = query?.split(" ").sort() ?? [];
|
|
18594
|
-
const sortedQuery = queryTokens ? queryTokens.join(" ") : null;
|
|
18595
|
-
if (query === "7ca573c0f4814912aaa9bdc77d1a7d51") return HttpResponse.json([IssuePayload]);
|
|
18596
|
-
if (![
|
|
18597
|
-
null,
|
|
18598
|
-
"",
|
|
18599
|
-
"is:unresolved",
|
|
18600
|
-
"error.handled:false is:unresolved",
|
|
18601
|
-
"error.unhandled:true is:unresolved",
|
|
18602
|
-
"project:cloudflare-mcp",
|
|
18603
|
-
"is:unresolved project:cloudflare-mcp",
|
|
18604
|
-
"user.email:david@sentry.io"
|
|
18605
|
-
].includes(sortedQuery)) {
|
|
18606
|
-
if (queryTokens.includes("project:remote-mcp")) return HttpResponse.json({ detail: "Invalid query. Project(s) remote-mcp do not exist or are not actively selected." }, { status: 400 });
|
|
18607
|
-
return HttpResponse.json([]);
|
|
18763
|
+
},
|
|
18764
|
+
{
|
|
18765
|
+
method: "get",
|
|
18766
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/",
|
|
18767
|
+
fetch: ({ request }) => {
|
|
18768
|
+
const url = new URL(request.url);
|
|
18769
|
+
const sort = url.searchParams.get("sort");
|
|
18770
|
+
if (![
|
|
18771
|
+
null,
|
|
18772
|
+
"user",
|
|
18773
|
+
"freq",
|
|
18774
|
+
"date",
|
|
18775
|
+
"new",
|
|
18776
|
+
null
|
|
18777
|
+
].includes(sort)) return HttpResponse.json(`Invalid sort: ${url.searchParams.get("sort")}`, { status: 400 });
|
|
18778
|
+
const collapse = url.searchParams.getAll("collapse");
|
|
18779
|
+
if (collapse.includes("stats")) return HttpResponse.json(`Invalid collapse: ${collapse.join(",")}`, { status: 400 });
|
|
18780
|
+
const query = url.searchParams.get("query");
|
|
18781
|
+
const queryTokens = query?.split(" ").sort() ?? [];
|
|
18782
|
+
const sortedQuery = queryTokens ? queryTokens.join(" ") : null;
|
|
18783
|
+
if (query === "7ca573c0f4814912aaa9bdc77d1a7d51") return HttpResponse.json([issue_default]);
|
|
18784
|
+
if (![
|
|
18785
|
+
null,
|
|
18786
|
+
"",
|
|
18787
|
+
"is:unresolved",
|
|
18788
|
+
"error.handled:false is:unresolved",
|
|
18789
|
+
"error.unhandled:true is:unresolved",
|
|
18790
|
+
"project:cloudflare-mcp",
|
|
18791
|
+
"is:unresolved project:cloudflare-mcp",
|
|
18792
|
+
"user.email:david@sentry.io"
|
|
18793
|
+
].includes(sortedQuery)) {
|
|
18794
|
+
if (queryTokens.includes("project:remote-mcp")) return HttpResponse.json({ detail: "Invalid query. Project(s) remote-mcp do not exist or are not actively selected." }, { status: 400 });
|
|
18795
|
+
return HttpResponse.json([]);
|
|
18796
|
+
}
|
|
18797
|
+
if (queryTokens.includes("user.email:david@sentry.io")) return HttpResponse.json([issue_default]);
|
|
18798
|
+
if (sort === "date") return HttpResponse.json([issue_default, issueFixture2]);
|
|
18799
|
+
return HttpResponse.json([issueFixture2, issue_default]);
|
|
18608
18800
|
}
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
}
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18801
|
+
},
|
|
18802
|
+
{
|
|
18803
|
+
method: "get",
|
|
18804
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/",
|
|
18805
|
+
fetch: () => HttpResponse.json(issue_default)
|
|
18806
|
+
},
|
|
18807
|
+
{
|
|
18808
|
+
method: "get",
|
|
18809
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/",
|
|
18810
|
+
fetch: () => HttpResponse.json(issue_default)
|
|
18811
|
+
},
|
|
18812
|
+
{
|
|
18813
|
+
method: "get",
|
|
18814
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-42/",
|
|
18815
|
+
fetch: () => HttpResponse.json(issueFixture2)
|
|
18816
|
+
},
|
|
18817
|
+
{
|
|
18818
|
+
method: "get",
|
|
18819
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376926/",
|
|
18820
|
+
fetch: () => HttpResponse.json(issueFixture2)
|
|
18821
|
+
},
|
|
18822
|
+
{
|
|
18823
|
+
method: "get",
|
|
18824
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/events/7ca573c0f4814912aaa9bdc77d1a7d51/",
|
|
18825
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18826
|
+
},
|
|
18827
|
+
{
|
|
18828
|
+
method: "get",
|
|
18829
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/events/latest/",
|
|
18830
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18831
|
+
},
|
|
18832
|
+
{
|
|
18833
|
+
method: "get",
|
|
18834
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/events/7ca573c0f4814912aaa9bdc77d1a7d51/",
|
|
18835
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18836
|
+
},
|
|
18837
|
+
{
|
|
18838
|
+
method: "get",
|
|
18839
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/events/latest/",
|
|
18840
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18841
|
+
},
|
|
18842
|
+
{
|
|
18843
|
+
method: "get",
|
|
18844
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-42/events/latest/",
|
|
18845
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18846
|
+
},
|
|
18847
|
+
{
|
|
18848
|
+
method: "get",
|
|
18849
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376926/events/latest/",
|
|
18850
|
+
fetch: () => HttpResponse.json(event_default)
|
|
18851
|
+
},
|
|
18852
|
+
{
|
|
18853
|
+
method: "get",
|
|
18854
|
+
path: "/api/0/organizations/sentry-mcp-evals/releases/",
|
|
18855
|
+
fetch: () => HttpResponse.json([ReleasePayload])
|
|
18856
|
+
},
|
|
18857
|
+
{
|
|
18858
|
+
method: "get",
|
|
18859
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/releases/",
|
|
18860
|
+
fetch: () => HttpResponse.json([ReleasePayload])
|
|
18861
|
+
},
|
|
18862
|
+
{
|
|
18863
|
+
method: "get",
|
|
18864
|
+
path: "/api/0/organizations/sentry-mcp-evals/tags/",
|
|
18865
|
+
fetch: () => HttpResponse.json(tags_default)
|
|
18866
|
+
},
|
|
18867
|
+
{
|
|
18868
|
+
method: "get",
|
|
18869
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/autofix/",
|
|
18870
|
+
fetch: () => HttpResponse.json(autofix_state_default)
|
|
18871
|
+
},
|
|
18872
|
+
{
|
|
18873
|
+
method: "get",
|
|
18874
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/PEATED-A8/autofix/",
|
|
18875
|
+
fetch: () => HttpResponse.json(autofix_state_default)
|
|
18876
|
+
},
|
|
18877
|
+
{
|
|
18878
|
+
method: "post",
|
|
18879
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/autofix/",
|
|
18880
|
+
fetch: () => HttpResponse.json({ run_id: 123 })
|
|
18881
|
+
},
|
|
18882
|
+
{
|
|
18883
|
+
method: "post",
|
|
18884
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/PEATED-A8/autofix/",
|
|
18885
|
+
fetch: () => HttpResponse.json({ run_id: 123 })
|
|
18886
|
+
}
|
|
18887
|
+
]);
|
|
18639
18888
|
const mswServer = setupServer(...restHandlers);
|
|
18640
18889
|
|
|
18641
18890
|
//#endregion
|