@sentry/mcp-server 0.11.0 → 0.13.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 +4 -2
- package/dist/analyze-issue-with-seer-Bq3kefOr.cjs +169 -0
- package/dist/analyze-issue-with-seer-Bq3kefOr.cjs.map +1 -0
- package/dist/analyze-issue-with-seer-Dk0ZFwN8.js +163 -0
- package/dist/analyze-issue-with-seer-Dk0ZFwN8.js.map +1 -0
- package/dist/api-client/client.cjs +2 -2
- 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/index.cjs +10 -2
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +5 -5
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +9 -1
- 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.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/api-utils-BJS0CChW.cjs +36 -0
- package/dist/api-utils-BJS0CChW.cjs.map +1 -0
- package/dist/api-utils-BcB1cMXS.js +31 -0
- package/dist/api-utils-BcB1cMXS.js.map +1 -0
- package/dist/client-BNTsOycD.cjs +620 -0
- package/dist/client-BNTsOycD.cjs.map +1 -0
- package/dist/client-BbamPqV4.js +609 -0
- package/dist/client-BbamPqV4.js.map +1 -0
- package/dist/client-Dae1ZwWb.d.cts +556 -0
- package/dist/client-Dae1ZwWb.d.cts.map +1 -0
- package/dist/client-qyEu8fvj.d.ts +556 -0
- package/dist/client-qyEu8fvj.d.ts.map +1 -0
- package/dist/constants-ClkMK29-.cjs +182 -0
- package/dist/constants-ClkMK29-.cjs.map +1 -0
- package/dist/constants-S7AU45oQ.js +164 -0
- package/dist/constants-S7AU45oQ.js.map +1 -0
- package/dist/constants.cjs +5 -0
- package/dist/constants.d.cts +23 -0
- package/dist/constants.d.cts.map +1 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +3 -0
- package/dist/create-dsn-B3L8iWno.js +59 -0
- package/dist/create-dsn-B3L8iWno.js.map +1 -0
- package/dist/create-dsn-CVPtt_Es.cjs +65 -0
- package/dist/create-dsn-CVPtt_Es.cjs.map +1 -0
- package/dist/create-project-B_6a6okf.cjs +82 -0
- package/dist/create-project-B_6a6okf.cjs.map +1 -0
- package/dist/create-project-DdIXMvWI.js +76 -0
- package/dist/create-project-DdIXMvWI.js.map +1 -0
- package/dist/create-team-BarRdaZK.js +47 -0
- package/dist/create-team-BarRdaZK.js.map +1 -0
- package/dist/create-team-C1DP5Z1r.cjs +53 -0
- package/dist/create-team-C1DP5Z1r.cjs.map +1 -0
- package/dist/defineTool-77H4nSna.js +8 -0
- package/dist/defineTool-77H4nSna.js.map +1 -0
- package/dist/defineTool-lWNTzWl_.cjs +14 -0
- package/dist/defineTool-lWNTzWl_.cjs.map +1 -0
- package/dist/{errors-BJSrT6Ou.js → errors-CIoxzIug.js} +1 -1
- package/dist/{errors-BJSrT6Ou.js.map → errors-CIoxzIug.js.map} +1 -1
- package/dist/{errors-B9fwS-aP.cjs → errors-YmiXLOyx.cjs} +1 -1
- package/dist/{errors-B9fwS-aP.cjs.map → errors-YmiXLOyx.cjs.map} +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.js +1 -1
- package/dist/fetch-utils-B-a92ObC.d.ts +14 -0
- package/dist/fetch-utils-B-a92ObC.d.ts.map +1 -0
- package/dist/fetch-utils-BMKjO-cc.js +29 -0
- package/dist/fetch-utils-BMKjO-cc.js.map +1 -0
- package/dist/fetch-utils-DlPjrSk2.js +0 -0
- package/dist/fetch-utils-DzdRW4Yd.d.cts +14 -0
- package/dist/fetch-utils-DzdRW4Yd.d.cts.map +1 -0
- package/dist/fetch-utils-oab6uNp3.cjs +35 -0
- package/dist/fetch-utils-oab6uNp3.cjs.map +1 -0
- package/dist/find-dsns-BDJWY6nZ.cjs +58 -0
- package/dist/find-dsns-BDJWY6nZ.cjs.map +1 -0
- package/dist/find-dsns-BPbblgrn.js +52 -0
- package/dist/find-dsns-BPbblgrn.js.map +1 -0
- package/dist/find-errors-B9wLxXA0.js +91 -0
- package/dist/find-errors-B9wLxXA0.js.map +1 -0
- package/dist/find-errors-DnFs3PaH.cjs +97 -0
- package/dist/find-errors-DnFs3PaH.cjs.map +1 -0
- package/dist/find-issues-BI1tI3cJ.js +92 -0
- package/dist/find-issues-BI1tI3cJ.js.map +1 -0
- package/dist/find-issues-CwPbwRXK.cjs +98 -0
- package/dist/find-issues-CwPbwRXK.cjs.map +1 -0
- package/dist/find-organizations-CdiouW48.js +45 -0
- package/dist/find-organizations-CdiouW48.js.map +1 -0
- package/dist/find-organizations-DqS6zoTK.cjs +50 -0
- package/dist/find-organizations-DqS6zoTK.cjs.map +1 -0
- package/dist/find-projects-Ba6cdX7n.cjs +45 -0
- package/dist/find-projects-Ba6cdX7n.cjs.map +1 -0
- package/dist/find-projects-Ccfxv47h.js +39 -0
- package/dist/find-projects-Ccfxv47h.js.map +1 -0
- package/dist/find-releases-CFl86XMT.cjs +99 -0
- package/dist/find-releases-CFl86XMT.cjs.map +1 -0
- package/dist/find-releases-CFoGytN-.js +93 -0
- package/dist/find-releases-CFoGytN-.js.map +1 -0
- package/dist/find-tags-ORtYLH5b.js +39 -0
- package/dist/find-tags-ORtYLH5b.js.map +1 -0
- package/dist/find-tags-h2o0BKWO.cjs +45 -0
- package/dist/find-tags-h2o0BKWO.cjs.map +1 -0
- package/dist/find-teams-DUcDfSOl.cjs +45 -0
- package/dist/find-teams-DUcDfSOl.cjs.map +1 -0
- package/dist/find-teams-hreVp1nw.js +39 -0
- package/dist/find-teams-hreVp1nw.js.map +1 -0
- package/dist/find-transactions-BehUqQYs.js +83 -0
- package/dist/find-transactions-BehUqQYs.js.map +1 -0
- package/dist/find-transactions-BkPscam3.cjs +89 -0
- package/dist/find-transactions-BkPscam3.cjs.map +1 -0
- package/dist/formatting-B-u5CbYn.d.ts +47 -0
- package/dist/formatting-B-u5CbYn.d.ts.map +1 -0
- package/dist/formatting-BlMiQa9i.cjs +388 -0
- package/dist/formatting-BlMiQa9i.cjs.map +1 -0
- package/dist/formatting-Di1X9Jn3.d.cts +47 -0
- package/dist/formatting-Di1X9Jn3.d.cts.map +1 -0
- package/dist/formatting-pUm38KOj.js +370 -0
- package/dist/formatting-pUm38KOj.js.map +1 -0
- package/dist/formatting-utils-C3sej5ER.js +14 -0
- package/dist/formatting-utils-C3sej5ER.js.map +1 -0
- package/dist/formatting-utils-DDz14xeB.cjs +20 -0
- package/dist/formatting-utils-DDz14xeB.cjs.map +1 -0
- package/dist/get-doc-AuAW_qr9.cjs +86 -0
- package/dist/get-doc-AuAW_qr9.cjs.map +1 -0
- package/dist/get-doc-BtxZOy7y.js +80 -0
- package/dist/get-doc-BtxZOy7y.js.map +1 -0
- package/dist/get-event-attachment-Bq5lkaKV.cjs +144 -0
- package/dist/get-event-attachment-Bq5lkaKV.cjs.map +1 -0
- package/dist/get-event-attachment-DwAl54zv.js +138 -0
- package/dist/get-event-attachment-DwAl54zv.js.map +1 -0
- package/dist/get-issue-details-DrpD5LlK.js +104 -0
- package/dist/get-issue-details-DrpD5LlK.js.map +1 -0
- package/dist/get-issue-details-qGwu18JX.cjs +110 -0
- package/dist/get-issue-details-qGwu18JX.cjs.map +1 -0
- package/dist/index.cjs +60 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +62 -23
- package/dist/index.js.map +1 -1
- package/dist/internal/fetch-utils.cjs +3 -0
- package/dist/internal/fetch-utils.d.cts +2 -0
- package/dist/internal/fetch-utils.d.ts +2 -0
- package/dist/internal/fetch-utils.js +3 -0
- package/dist/internal/formatting.cjs +1 -1
- package/dist/internal/formatting.d.cts +5 -24
- package/dist/internal/formatting.d.ts +6 -25
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +1 -1
- package/dist/internal/issue-helpers.d.cts +2 -44
- package/dist/internal/issue-helpers.d.ts +2 -44
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/test-fixtures.cjs +214 -0
- package/dist/internal/test-fixtures.cjs.map +1 -0
- package/dist/internal/test-fixtures.d.cts +2138 -0
- package/dist/internal/test-fixtures.d.cts.map +1 -0
- package/dist/internal/test-fixtures.d.ts +2138 -0
- package/dist/internal/test-fixtures.d.ts.map +1 -0
- package/dist/internal/test-fixtures.js +205 -0
- package/dist/internal/test-fixtures.js.map +1 -0
- package/dist/issue-helpers-BOn4g7rx.d.ts +52 -0
- package/dist/issue-helpers-BOn4g7rx.d.ts.map +1 -0
- package/dist/{issue-helpers-CSNNO03f.js → issue-helpers-CqqYnwYE.js} +9 -1
- package/dist/issue-helpers-CqqYnwYE.js.map +1 -0
- package/dist/issue-helpers-Cz01Ipvl.d.cts +52 -0
- package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -0
- package/dist/{issue-helpers-71XgJVXC.cjs → issue-helpers-DyAIO0w6.cjs} +9 -1
- package/dist/issue-helpers-DyAIO0w6.cjs.map +1 -0
- package/dist/issue-utils-BVAB6I-Z.js +0 -0
- package/dist/issue-utils-pdbo-5LW.cjs +0 -0
- package/dist/{logging-CXLD0FFB.js → logging-LnQMFw-_.js} +1 -1
- package/dist/logging-LnQMFw-_.js.map +1 -0
- package/dist/{logging-ByvSjT6V.cjs → logging-oIouXrcb.cjs} +1 -1
- package/dist/logging-oIouXrcb.cjs.map +1 -0
- package/dist/logging.cjs +1 -1
- package/dist/logging.d.cts +30 -1
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +30 -1
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{promptDefinitions-H0q1_X-K.d.ts → promptDefinitions-6xelipaz.d.ts} +11 -3
- package/dist/promptDefinitions-6xelipaz.d.ts.map +1 -0
- package/dist/{promptDefinitions-D3ll3qCd.cjs → promptDefinitions-C29BWGYg.cjs} +11 -4
- package/dist/promptDefinitions-C29BWGYg.cjs.map +1 -0
- package/dist/{promptDefinitions-aKmUZWWO.js → promptDefinitions-CSKE8T0a.js} +11 -4
- package/dist/promptDefinitions-CSKE8T0a.js.map +1 -0
- package/dist/{promptDefinitions-DMucOchd.d.cts → promptDefinitions-CVHtYaj8.d.cts} +11 -3
- package/dist/promptDefinitions-CVHtYaj8.d.cts.map +1 -0
- package/dist/promptDefinitions.cjs +3 -2
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +3 -2
- package/dist/{prompts-CzD0yl7Z.js → prompts-C8Y9w5c4.js} +9 -7
- package/dist/prompts-C8Y9w5c4.js.map +1 -0
- package/dist/{prompts-DMwoay8l.cjs → prompts-Df3i1XSB.cjs} +8 -7
- package/dist/prompts-Df3i1XSB.cjs.map +1 -0
- package/dist/prompts.cjs +2 -1
- package/dist/prompts.d.cts +4 -5
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +4 -5
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -1
- package/dist/resources-BHF8a1ZB.js +92 -0
- package/dist/resources-BHF8a1ZB.js.map +1 -0
- package/dist/resources-BM_YQGcb.cjs +104 -0
- package/dist/resources-BM_YQGcb.cjs.map +1 -0
- package/dist/resources.cjs +5 -2
- package/dist/resources.d.cts +30 -7
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +30 -7
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +4 -2
- package/dist/{schema-DqxkW9Tx.d.cts → schema-B5BpplNK.d.ts} +3746 -575
- package/dist/schema-B5BpplNK.d.ts.map +1 -0
- package/dist/{schema-DkyWSqp_.cjs → schema-B_cMyyJJ.cjs} +130 -13
- package/dist/schema-B_cMyyJJ.cjs.map +1 -0
- package/dist/{schema-B8lT632E.cjs → schema-BpJVmev8.cjs} +51 -2
- package/dist/schema-BpJVmev8.cjs.map +1 -0
- package/dist/{schema-C-MLkWMc.d.ts → schema-Dt-HKnd_.d.cts} +3674 -503
- package/dist/schema-Dt-HKnd_.d.cts.map +1 -0
- package/dist/schema-DtsnsxMl.js +36 -0
- package/dist/schema-DtsnsxMl.js.map +1 -0
- package/dist/{schema-CewAKS9A.js → schema-WDk5Yqww.js} +83 -14
- package/dist/schema-WDk5Yqww.js.map +1 -0
- package/dist/schema.cjs +7 -1
- package/dist/schema.d.cts +16 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +16 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +3 -2
- package/dist/search-docs-CrMdRDJy.js +102 -0
- package/dist/search-docs-CrMdRDJy.js.map +1 -0
- package/dist/search-docs-VhefTOOH.cjs +108 -0
- package/dist/search-docs-VhefTOOH.cjs.map +1 -0
- package/dist/seer-utils-Ckr8nYlz.js +87 -0
- package/dist/seer-utils-Ckr8nYlz.js.map +1 -0
- package/dist/seer-utils-CzYEEZb2.cjs +129 -0
- package/dist/seer-utils-CzYEEZb2.cjs.map +1 -0
- package/dist/server-CHG27fcn.cjs +243 -0
- package/dist/server-CHG27fcn.cjs.map +1 -0
- package/dist/server-DeuBftc5.js +237 -0
- package/dist/server-DeuBftc5.js.map +1 -0
- package/dist/server.cjs +40 -13
- package/dist/server.d.cts +22 -4
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +22 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +42 -15
- package/dist/stdio-BtVdTwx-.cjs +57 -0
- package/dist/stdio-BtVdTwx-.cjs.map +1 -0
- package/dist/stdio-DIuLW5EE.js +51 -0
- package/dist/stdio-DIuLW5EE.js.map +1 -0
- package/dist/test-setup.cjs +1763 -1410
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1581 -1201
- package/dist/test-setup.js.map +1 -1
- package/dist/toolDefinitions.d.ts +25 -2
- package/dist/toolDefinitions.js +1059 -4
- package/dist/tools/analyze-issue-with-seer.cjs +16 -0
- package/dist/tools/analyze-issue-with-seer.d.cts +16 -0
- package/dist/tools/analyze-issue-with-seer.d.cts.map +1 -0
- package/dist/tools/analyze-issue-with-seer.d.ts +16 -0
- package/dist/tools/analyze-issue-with-seer.d.ts.map +1 -0
- package/dist/tools/analyze-issue-with-seer.js +16 -0
- package/dist/tools/create-dsn.cjs +12 -0
- package/dist/tools/create-dsn.d.cts +15 -0
- package/dist/tools/create-dsn.d.cts.map +1 -0
- package/dist/tools/create-dsn.d.ts +15 -0
- package/dist/tools/create-dsn.d.ts.map +1 -0
- package/dist/tools/create-dsn.js +12 -0
- package/dist/tools/create-project.cjs +13 -0
- package/dist/tools/create-project.d.cts +16 -0
- package/dist/tools/create-project.d.cts.map +1 -0
- package/dist/tools/create-project.d.ts +16 -0
- package/dist/tools/create-project.d.ts.map +1 -0
- package/dist/tools/create-project.js +13 -0
- package/dist/tools/create-team.cjs +12 -0
- package/dist/tools/create-team.d.cts +14 -0
- package/dist/tools/create-team.d.cts.map +1 -0
- package/dist/tools/create-team.d.ts +14 -0
- package/dist/tools/create-team.d.ts.map +1 -0
- package/dist/tools/create-team.js +12 -0
- package/dist/tools/find-dsns.cjs +12 -0
- package/dist/tools/find-dsns.d.cts +14 -0
- package/dist/tools/find-dsns.d.cts.map +1 -0
- package/dist/tools/find-dsns.d.ts +14 -0
- package/dist/tools/find-dsns.d.ts.map +1 -0
- package/dist/tools/find-dsns.js +12 -0
- package/dist/tools/find-errors.cjs +12 -0
- package/dist/tools/find-errors.d.cts +18 -0
- package/dist/tools/find-errors.d.cts.map +1 -0
- package/dist/tools/find-errors.d.ts +18 -0
- package/dist/tools/find-errors.d.ts.map +1 -0
- package/dist/tools/find-errors.js +12 -0
- package/dist/tools/find-issues.cjs +12 -0
- package/dist/tools/find-issues.d.cts +16 -0
- package/dist/tools/find-issues.d.cts.map +1 -0
- package/dist/tools/find-issues.d.ts +16 -0
- package/dist/tools/find-issues.d.ts.map +1 -0
- package/dist/tools/find-issues.js +12 -0
- package/dist/tools/find-organizations.cjs +10 -0
- package/dist/tools/find-organizations.d.cts +9 -0
- package/dist/tools/find-organizations.d.cts.map +1 -0
- package/dist/tools/find-organizations.d.ts +9 -0
- package/dist/tools/find-organizations.d.ts.map +1 -0
- package/dist/tools/find-organizations.js +10 -0
- package/dist/tools/find-projects.cjs +12 -0
- package/dist/tools/find-projects.d.cts +13 -0
- package/dist/tools/find-projects.d.cts.map +1 -0
- package/dist/tools/find-projects.d.ts +13 -0
- package/dist/tools/find-projects.d.ts.map +1 -0
- package/dist/tools/find-projects.js +12 -0
- package/dist/tools/find-releases.cjs +12 -0
- package/dist/tools/find-releases.d.cts +15 -0
- package/dist/tools/find-releases.d.cts.map +1 -0
- package/dist/tools/find-releases.d.ts +15 -0
- package/dist/tools/find-releases.d.ts.map +1 -0
- package/dist/tools/find-releases.js +12 -0
- package/dist/tools/find-tags.cjs +12 -0
- package/dist/tools/find-tags.d.cts +13 -0
- package/dist/tools/find-tags.d.cts.map +1 -0
- package/dist/tools/find-tags.d.ts +13 -0
- package/dist/tools/find-tags.d.ts.map +1 -0
- package/dist/tools/find-tags.js +12 -0
- package/dist/tools/find-teams.cjs +12 -0
- package/dist/tools/find-teams.d.cts +13 -0
- package/dist/tools/find-teams.d.cts.map +1 -0
- package/dist/tools/find-teams.d.ts +13 -0
- package/dist/tools/find-teams.d.ts.map +1 -0
- package/dist/tools/find-teams.js +12 -0
- package/dist/tools/find-transactions.cjs +12 -0
- package/dist/tools/find-transactions.d.cts +17 -0
- package/dist/tools/find-transactions.d.cts.map +1 -0
- package/dist/tools/find-transactions.d.ts +17 -0
- package/dist/tools/find-transactions.d.ts.map +1 -0
- package/dist/tools/find-transactions.js +12 -0
- package/dist/tools/get-doc.cjs +11 -0
- package/dist/tools/get-doc.d.cts +12 -0
- package/dist/tools/get-doc.d.cts.map +1 -0
- package/dist/tools/get-doc.d.ts +12 -0
- package/dist/tools/get-doc.d.ts.map +1 -0
- package/dist/tools/get-doc.js +11 -0
- package/dist/tools/get-event-attachment.cjs +12 -0
- package/dist/tools/get-event-attachment.d.cts +16 -0
- package/dist/tools/get-event-attachment.d.cts.map +1 -0
- package/dist/tools/get-event-attachment.d.ts +16 -0
- package/dist/tools/get-event-attachment.d.ts.map +1 -0
- package/dist/tools/get-event-attachment.js +12 -0
- package/dist/tools/get-issue-details.cjs +15 -0
- package/dist/tools/get-issue-details.d.cts +16 -0
- package/dist/tools/get-issue-details.d.cts.map +1 -0
- package/dist/tools/get-issue-details.d.ts +16 -0
- package/dist/tools/get-issue-details.d.ts.map +1 -0
- package/dist/tools/get-issue-details.js +15 -0
- package/dist/tools/index.cjs +40 -0
- package/dist/tools/index.d.cts +127 -0
- package/dist/tools/index.d.cts.map +1 -0
- package/dist/tools/index.d.ts +127 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +40 -0
- package/dist/tools/search-docs.cjs +12 -0
- package/dist/tools/search-docs.d.cts +14 -0
- package/dist/tools/search-docs.d.cts.map +1 -0
- package/dist/tools/search-docs.d.ts +14 -0
- package/dist/tools/search-docs.d.ts.map +1 -0
- package/dist/tools/search-docs.js +12 -0
- package/dist/tools/types.cjs +0 -0
- package/dist/tools/types.d.cts +4 -0
- package/dist/tools/types.d.ts +4 -0
- package/dist/tools/types.js +0 -0
- package/dist/tools/update-issue.cjs +16 -0
- package/dist/tools/update-issue.d.cts +17 -0
- package/dist/tools/update-issue.d.cts.map +1 -0
- package/dist/tools/update-issue.d.ts +17 -0
- package/dist/tools/update-issue.d.ts.map +1 -0
- package/dist/tools/update-issue.js +16 -0
- package/dist/tools/update-project.cjs +13 -0
- package/dist/tools/update-project.d.cts +18 -0
- package/dist/tools/update-project.d.cts.map +1 -0
- package/dist/tools/update-project.d.ts +18 -0
- package/dist/tools/update-project.d.ts.map +1 -0
- package/dist/tools/update-project.js +13 -0
- package/dist/tools/utils/api-utils.cjs +8 -0
- package/dist/tools/utils/api-utils.d.cts +24 -0
- package/dist/tools/utils/api-utils.d.cts.map +1 -0
- package/dist/tools/utils/api-utils.d.ts +24 -0
- package/dist/tools/utils/api-utils.d.ts.map +1 -0
- package/dist/tools/utils/api-utils.js +8 -0
- package/dist/tools/utils/defineTool.cjs +3 -0
- package/dist/tools/utils/defineTool.d.cts +12 -0
- package/dist/tools/utils/defineTool.d.cts.map +1 -0
- package/dist/tools/utils/defineTool.d.ts +12 -0
- package/dist/tools/utils/defineTool.d.ts.map +1 -0
- package/dist/tools/utils/defineTool.js +3 -0
- package/dist/tools/utils/fetch-utils.cjs +4 -0
- package/dist/tools/utils/fetch-utils.d.cts +2 -0
- package/dist/tools/utils/fetch-utils.d.ts +2 -0
- package/dist/tools/utils/fetch-utils.js +4 -0
- package/dist/tools/utils/formatting-utils.cjs +3 -0
- package/dist/tools/utils/formatting-utils.d.cts +15 -0
- package/dist/tools/utils/formatting-utils.d.cts.map +1 -0
- package/dist/tools/utils/formatting-utils.d.ts +15 -0
- package/dist/tools/utils/formatting-utils.d.ts.map +1 -0
- package/dist/tools/utils/formatting-utils.js +3 -0
- package/dist/tools/utils/issue-utils.cjs +6 -0
- package/dist/tools/utils/issue-utils.d.cts +7 -0
- package/dist/tools/utils/issue-utils.d.ts +7 -0
- package/dist/tools/utils/issue-utils.js +5 -0
- package/dist/tools/utils/seer-utils.cjs +9 -0
- package/dist/tools/utils/seer-utils.d.cts +28 -0
- package/dist/tools/utils/seer-utils.d.cts.map +1 -0
- package/dist/tools/utils/seer-utils.d.ts +28 -0
- package/dist/tools/utils/seer-utils.d.ts.map +1 -0
- package/dist/tools/utils/seer-utils.js +3 -0
- package/dist/tools/whoami.cjs +10 -0
- package/dist/tools/whoami.d.cts +9 -0
- package/dist/tools/whoami.d.cts.map +1 -0
- package/dist/tools/whoami.d.ts +9 -0
- package/dist/tools/whoami.d.ts.map +1 -0
- package/dist/tools/whoami.js +10 -0
- package/dist/tools-BiZ7ZDKf.cjs +53 -0
- package/dist/tools-BiZ7ZDKf.cjs.map +1 -0
- package/dist/tools-DGF9GhbP.js +48 -0
- package/dist/tools-DGF9GhbP.js.map +1 -0
- package/dist/transports/stdio.cjs +42 -14
- package/dist/transports/stdio.d.cts +25 -4
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +25 -4
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +44 -16
- package/dist/types-B2qOfefC.d.ts +29 -0
- package/dist/types-B2qOfefC.d.ts.map +1 -0
- package/dist/{types-DuUmV9zh.d.ts → types-Br0saqtE.d.ts} +7 -3
- package/dist/types-Br0saqtE.d.ts.map +1 -0
- package/dist/{types-CcffrLXB.d.cts → types-C3pRFQyA.d.cts} +7 -3
- package/dist/types-C3pRFQyA.d.cts.map +1 -0
- package/dist/types-CCHsZshF.js +0 -0
- package/dist/types-CYjev2Ep.d.cts +29 -0
- package/dist/types-CYjev2Ep.d.cts.map +1 -0
- package/dist/types-CZaMk5Yg.d.cts +29 -0
- package/dist/types-CZaMk5Yg.d.cts.map +1 -0
- package/dist/types-D5KkaSjc.d.ts +29 -0
- package/dist/types-D5KkaSjc.d.ts.map +1 -0
- package/dist/types.d.cts +3 -4
- package/dist/types.d.ts +3 -4
- package/dist/update-issue-Bz-u_Yaa.cjs +115 -0
- package/dist/update-issue-Bz-u_Yaa.cjs.map +1 -0
- package/dist/update-issue-DN80uuKU.js +109 -0
- package/dist/update-issue-DN80uuKU.js.map +1 -0
- package/dist/update-project-5j-SOHWU.js +120 -0
- package/dist/update-project-5j-SOHWU.js.map +1 -0
- package/dist/update-project-C7Xbmhqg.cjs +126 -0
- package/dist/update-project-C7Xbmhqg.cjs.map +1 -0
- package/dist/version-DvMKCu-i.js +6 -0
- package/dist/version-DvMKCu-i.js.map +1 -0
- package/dist/{version-CRzAHHGZ.cjs → version-Dyz6_b54.cjs} +2 -2
- package/dist/version-Dyz6_b54.cjs.map +1 -0
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/whoami-qIbcECMA.cjs +28 -0
- package/dist/whoami-qIbcECMA.cjs.map +1 -0
- package/dist/whoami-raA70UBD.js +23 -0
- package/dist/whoami-raA70UBD.js.map +1 -0
- package/package.json +24 -14
- package/dist/api-client/client.test.cjs +0 -33
- package/dist/api-client/client.test.cjs.map +0 -1
- package/dist/api-client/client.test.d.ts +0 -1
- package/dist/api-client/client.test.js +0 -33
- package/dist/api-client/client.test.js.map +0 -1
- package/dist/chunk-BLXvPPr8.js +0 -30
- package/dist/client-Bxf4MxOz.d.cts +0 -179
- package/dist/client-Bxf4MxOz.d.cts.map +0 -1
- package/dist/client-D5xFZtxK.js +0 -224
- package/dist/client-D5xFZtxK.js.map +0 -1
- package/dist/client-DOhBiaMJ.d.ts +0 -179
- package/dist/client-DOhBiaMJ.d.ts.map +0 -1
- package/dist/client-GKHZSXgV.cjs +0 -235
- package/dist/client-GKHZSXgV.cjs.map +0 -1
- package/dist/dist-BlIWGSIM.cjs +0 -8197
- package/dist/dist-BlIWGSIM.cjs.map +0 -1
- package/dist/dist-DDpQABxe.js +0 -8054
- package/dist/dist-DDpQABxe.js.map +0 -1
- package/dist/errors.test.cjs +0 -24
- package/dist/errors.test.cjs.map +0 -1
- package/dist/errors.test.d.cts +0 -1
- package/dist/errors.test.d.ts +0 -1
- package/dist/errors.test.js +0 -24
- package/dist/errors.test.js.map +0 -1
- package/dist/formatting-BaARL2gT.js +0 -68
- package/dist/formatting-BaARL2gT.js.map +0 -1
- package/dist/formatting-C2kN0ok6.cjs +0 -86
- package/dist/formatting-C2kN0ok6.cjs.map +0 -1
- package/dist/index-h64gcVNJ.d.ts +0 -1
- package/dist/internal/formatting.d.cts.map +0 -1
- package/dist/internal/formatting.d.ts.map +0 -1
- package/dist/internal/issue-helpers.d.cts.map +0 -1
- package/dist/internal/issue-helpers.d.ts.map +0 -1
- package/dist/internal/issue-helpers.test.cjs +0 -110
- package/dist/internal/issue-helpers.test.cjs.map +0 -1
- package/dist/internal/issue-helpers.test.d.cts +0 -1
- package/dist/internal/issue-helpers.test.d.ts +0 -1
- package/dist/internal/issue-helpers.test.js +0 -110
- package/dist/internal/issue-helpers.test.js.map +0 -1
- package/dist/issue-helpers-71XgJVXC.cjs.map +0 -1
- package/dist/issue-helpers-CSNNO03f.js.map +0 -1
- package/dist/logging-ByvSjT6V.cjs.map +0 -1
- package/dist/logging-CXLD0FFB.js.map +0 -1
- package/dist/magic-string.es-CybcVAw7.cjs +0 -1016
- package/dist/magic-string.es-CybcVAw7.cjs.map +0 -1
- package/dist/magic-string.es-DY8GVHw9.js +0 -1015
- package/dist/magic-string.es-DY8GVHw9.js.map +0 -1
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +0 -1
- package/dist/promptDefinitions-DMucOchd.d.cts.map +0 -1
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +0 -1
- package/dist/promptDefinitions-aKmUZWWO.js.map +0 -1
- package/dist/prompts-CzD0yl7Z.js.map +0 -1
- package/dist/prompts-DMwoay8l.cjs.map +0 -1
- package/dist/resources-D6TW2ER0.cjs +0 -32
- package/dist/resources-D6TW2ER0.cjs.map +0 -1
- package/dist/resources-x-GaokG8.js +0 -26
- package/dist/resources-x-GaokG8.js.map +0 -1
- package/dist/schema-B8lT632E.cjs.map +0 -1
- package/dist/schema-BkHf97d7.js +0 -17
- package/dist/schema-BkHf97d7.js.map +0 -1
- package/dist/schema-C-MLkWMc.d.ts.map +0 -1
- package/dist/schema-CewAKS9A.js.map +0 -1
- package/dist/schema-DkyWSqp_.cjs.map +0 -1
- package/dist/schema-DqxkW9Tx.d.cts.map +0 -1
- package/dist/server-pGtEIwE3.cjs +0 -148
- package/dist/server-pGtEIwE3.cjs.map +0 -1
- package/dist/server-qpWdf-ST.js +0 -142
- package/dist/server-qpWdf-ST.js.map +0 -1
- package/dist/stdio-D8u2W847.js +0 -19
- package/dist/stdio-D8u2W847.js.map +0 -1
- package/dist/stdio-DydB2Pxu.cjs +0 -25
- package/dist/stdio-DydB2Pxu.cjs.map +0 -1
- package/dist/toolDefinitions-BSC2D_S-.js +0 -430
- package/dist/toolDefinitions-BSC2D_S-.js.map +0 -1
- package/dist/toolDefinitions-BtHN8t_d.cjs +0 -436
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +0 -1
- package/dist/toolDefinitions-Dp13BpEu.d.cts +0 -296
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +0 -1
- package/dist/toolDefinitions-fQrpWznJ.d.ts +0 -296
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +0 -1
- package/dist/toolDefinitions.cjs +0 -4
- package/dist/toolDefinitions.d.cts +0 -2
- package/dist/toolDefinitions.test.cjs +0 -15
- package/dist/toolDefinitions.test.cjs.map +0 -1
- package/dist/toolDefinitions.test.d.cts +0 -1
- package/dist/toolDefinitions.test.d.ts +0 -1
- package/dist/toolDefinitions.test.js +0 -15
- package/dist/toolDefinitions.test.js.map +0 -1
- package/dist/tools-4Rtn4WEf.js +0 -470
- package/dist/tools-4Rtn4WEf.js.map +0 -1
- package/dist/tools-DHHqAqP9.cjs +0 -476
- package/dist/tools-DHHqAqP9.cjs.map +0 -1
- package/dist/tools.cjs +0 -11
- package/dist/tools.d.cts +0 -251
- package/dist/tools.d.cts.map +0 -1
- package/dist/tools.d.ts +0 -251
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -11
- package/dist/tools.test.cjs +0 -1018
- package/dist/tools.test.cjs.map +0 -1
- package/dist/tools.test.d.cts +0 -1
- package/dist/tools.test.d.ts +0 -1
- package/dist/tools.test.js +0 -1018
- package/dist/tools.test.js.map +0 -1
- package/dist/types-CbLyQvVe.d.cts +0 -38
- package/dist/types-CbLyQvVe.d.cts.map +0 -1
- package/dist/types-CcffrLXB.d.cts.map +0 -1
- package/dist/types-CfJ51LyL.d.ts +0 -38
- package/dist/types-CfJ51LyL.d.ts.map +0 -1
- package/dist/types-DuUmV9zh.d.ts.map +0 -1
- package/dist/version-BT9r_3jm.js +0 -6
- package/dist/version-BT9r_3jm.js.map +0 -1
- package/dist/version-CRzAHHGZ.cjs.map +0 -1
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js +0 -6349
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +0 -1
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs +0 -6355
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +0 -1
- /package/dist/{api-client-CNv_hbPO.js → api-client-ChL_0F2u.js} +0 -0
- /package/dist/{types-6zHoEWAx.js → fetch-utils-C0F4eH6S.cjs} +0 -0
- /package/dist/{api-client/client.test.d.cts → index-BrojxuhJ.d.ts} +0 -0
package/dist/test-setup.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const _http_common = require_chunk.__toESM(require("_http_common"));
|
|
|
8
8
|
const url = require_chunk.__toESM(require("url"));
|
|
9
9
|
const zlib = require_chunk.__toESM(require("zlib"));
|
|
10
10
|
|
|
11
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
11
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-3GJB4JDF.mjs
|
|
12
12
|
var kRawRequest = Symbol("kRawRequest");
|
|
13
13
|
function setRawRequest(request, rawRequest) {
|
|
14
14
|
Reflect.set(request, kRawRequest, rawRequest);
|
|
@@ -80,7 +80,7 @@ invariant.as = (ErrorConstructor, predicate, message$3, ...positionals) => {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
//#endregion
|
|
83
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
83
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-TJDMZZXE.mjs
|
|
84
84
|
var kRawRequestBodyStream = Symbol("kRawRequestBodyStream");
|
|
85
85
|
function setRawRequestBodyStream(request, stream$1) {
|
|
86
86
|
Reflect.set(request, kRawRequestBodyStream, stream$1);
|
|
@@ -173,7 +173,7 @@ var until = async (promise) => {
|
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
176
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-LGXJ3UUF.mjs
|
|
177
177
|
var InterceptorError = class extends Error {
|
|
178
178
|
constructor(message$3) {
|
|
179
179
|
super(message$3);
|
|
@@ -347,8 +347,8 @@ function isNodeProcess() {
|
|
|
347
347
|
//#region ../../node_modules/.pnpm/@open-draft+logger@0.3.0/node_modules/@open-draft/logger/lib/index.mjs
|
|
348
348
|
var __defProp$4 = Object.defineProperty;
|
|
349
349
|
var __export = (target, all) => {
|
|
350
|
-
for (var name in all) __defProp$4(target, name, {
|
|
351
|
-
get: all[name],
|
|
350
|
+
for (var name$2 in all) __defProp$4(target, name$2, {
|
|
351
|
+
get: all[name$2],
|
|
352
352
|
enumerable: true
|
|
353
353
|
});
|
|
354
354
|
};
|
|
@@ -377,8 +377,8 @@ function green(text) {
|
|
|
377
377
|
}
|
|
378
378
|
var IS_NODE$1 = isNodeProcess();
|
|
379
379
|
var Logger = class {
|
|
380
|
-
constructor(name) {
|
|
381
|
-
this.name = name;
|
|
380
|
+
constructor(name$2) {
|
|
381
|
+
this.name = name$2;
|
|
382
382
|
this.prefix = `[${this.name}]`;
|
|
383
383
|
const LOGGER_NAME = getVariable("DEBUG");
|
|
384
384
|
const LOGGER_LEVEL = getVariable("LOG_LEVEL");
|
|
@@ -730,7 +730,7 @@ var Emitter = _Emitter;
|
|
|
730
730
|
Emitter.defaultMaxListeners = 10;
|
|
731
731
|
|
|
732
732
|
//#endregion
|
|
733
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
733
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-IHJSPMYM.mjs
|
|
734
734
|
var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
|
|
735
735
|
function getGlobalSymbol$1(symbol) {
|
|
736
736
|
return globalThis[symbol] || void 0;
|
|
@@ -972,7 +972,7 @@ FetchResponse.STATUS_CODES_WITH_REDIRECT = [
|
|
|
972
972
|
];
|
|
973
973
|
|
|
974
974
|
//#endregion
|
|
975
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
975
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-GLGFOTGJ.mjs
|
|
976
976
|
function normalizeSocketWriteArgs(args) {
|
|
977
977
|
const normalized = [
|
|
978
978
|
args[0],
|
|
@@ -1284,9 +1284,9 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1284
1284
|
const chunkBeforeRequestHeaders = chunkString.slice(0, chunkString.indexOf("\r\n") + 2);
|
|
1285
1285
|
const chunkAfterRequestHeaders = chunkString.slice(chunk.indexOf("\r\n\r\n"));
|
|
1286
1286
|
const rawRequestHeaders = getRawFetchHeaders(this.request.headers);
|
|
1287
|
-
const requestHeadersString = rawRequestHeaders.filter(([name]) => {
|
|
1288
|
-
return name.toLowerCase() !== INTERNAL_REQUEST_ID_HEADER_NAME;
|
|
1289
|
-
}).map(([name, value]) => `${name}: ${value}`).join("\r\n");
|
|
1287
|
+
const requestHeadersString = rawRequestHeaders.filter(([name$2]) => {
|
|
1288
|
+
return name$2.toLowerCase() !== INTERNAL_REQUEST_ID_HEADER_NAME;
|
|
1289
|
+
}).map(([name$2, value]) => `${name$2}: ${value}`).join("\r\n");
|
|
1290
1290
|
const headersChunk = `${chunkBeforeRequestHeaders}${requestHeadersString}${chunkAfterRequestHeaders}`;
|
|
1291
1291
|
socket.write(headersChunk, encoding, callback);
|
|
1292
1292
|
headersWritten = true;
|
|
@@ -1330,7 +1330,7 @@ var MockHttpSocket = class extends MockSocket {
|
|
|
1330
1330
|
var _a$1;
|
|
1331
1331
|
if (this.destroyed) return;
|
|
1332
1332
|
if (isPropertyAccessible(response, "type") && response.type === "error") {
|
|
1333
|
-
this.errorWith(new TypeError("Network error"));
|
|
1333
|
+
this.errorWith(/* @__PURE__ */ new TypeError("Network error"));
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
1336
|
this.mockConnect();
|
|
@@ -1785,7 +1785,7 @@ var ClientRequestInterceptor = _ClientRequestInterceptor;
|
|
|
1785
1785
|
ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
|
1786
1786
|
|
|
1787
1787
|
//#endregion
|
|
1788
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1788
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.mjs
|
|
1789
1789
|
var encoder = new TextEncoder();
|
|
1790
1790
|
function encodeBuffer(text) {
|
|
1791
1791
|
return encoder.encode(text);
|
|
@@ -1799,7 +1799,7 @@ function toArrayBuffer(array) {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
|
|
1801
1801
|
//#endregion
|
|
1802
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1802
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.mjs
|
|
1803
1803
|
function hasConfigurableGlobal$1(propertyName) {
|
|
1804
1804
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
|
|
1805
1805
|
if (typeof descriptor === "undefined") return false;
|
|
@@ -1813,11 +1813,11 @@ function hasConfigurableGlobal$1(propertyName) {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
|
|
1815
1815
|
//#endregion
|
|
1816
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1816
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.mjs
|
|
1817
1817
|
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
|
1818
1818
|
|
|
1819
1819
|
//#endregion
|
|
1820
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
1820
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-EADPZWWI.mjs
|
|
1821
1821
|
function concatArrayBuffer(left, right) {
|
|
1822
1822
|
const result = new Uint8Array(left.byteLength + right.byteLength);
|
|
1823
1823
|
result.set(left, 0);
|
|
@@ -1976,9 +1976,9 @@ function createHeadersFromXMLHttpReqestHeaders(headersString) {
|
|
|
1976
1976
|
const lines = headersString.split(/[\r\n]+/);
|
|
1977
1977
|
for (const line of lines) {
|
|
1978
1978
|
if (line.trim() === "") continue;
|
|
1979
|
-
const [name, ...parts] = line.split(": ");
|
|
1979
|
+
const [name$2, ...parts] = line.split(": ");
|
|
1980
1980
|
const value = parts.join(": ");
|
|
1981
|
-
headers.append(name, value);
|
|
1981
|
+
headers.append(name$2, value);
|
|
1982
1982
|
}
|
|
1983
1983
|
return headers;
|
|
1984
1984
|
}
|
|
@@ -2037,9 +2037,9 @@ var XMLHttpRequestController = class {
|
|
|
2037
2037
|
return invoke();
|
|
2038
2038
|
}
|
|
2039
2039
|
case "setRequestHeader": {
|
|
2040
|
-
const [name, value] = args;
|
|
2041
|
-
this.requestHeaders.set(name, value);
|
|
2042
|
-
this.logger.info("setRequestHeader", name, value);
|
|
2040
|
+
const [name$2, value] = args;
|
|
2041
|
+
this.requestHeaders.set(name$2, value);
|
|
2042
|
+
this.logger.info("setRequestHeader", name$2, value);
|
|
2043
2043
|
return invoke();
|
|
2044
2044
|
}
|
|
2045
2045
|
case "send": {
|
|
@@ -2388,7 +2388,7 @@ function createXMLHttpRequestProxy({ emitter, logger: logger$2 }) {
|
|
|
2388
2388
|
await this.respondWith(response);
|
|
2389
2389
|
},
|
|
2390
2390
|
onRequestError: () => {
|
|
2391
|
-
this.errorWith(new TypeError("Network error"));
|
|
2391
|
+
this.errorWith(/* @__PURE__ */ new TypeError("Network error"));
|
|
2392
2392
|
},
|
|
2393
2393
|
onError: (error$2) => {
|
|
2394
2394
|
this.logger.info("request errored!", { error: error$2 });
|
|
@@ -2443,9 +2443,9 @@ var XMLHttpRequestInterceptor = _XMLHttpRequestInterceptor;
|
|
|
2443
2443
|
XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
|
2444
2444
|
|
|
2445
2445
|
//#endregion
|
|
2446
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2446
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-GL6JCI7E.mjs
|
|
2447
2447
|
function createNetworkError(cause) {
|
|
2448
|
-
return Object.assign(new TypeError("Failed to fetch"), { cause });
|
|
2448
|
+
return Object.assign(/* @__PURE__ */ new TypeError("Failed to fetch"), { cause });
|
|
2449
2449
|
}
|
|
2450
2450
|
var REQUEST_BODY_HEADERS = [
|
|
2451
2451
|
"content-encoding",
|
|
@@ -2646,7 +2646,7 @@ var FetchInterceptor = _FetchInterceptor;
|
|
|
2646
2646
|
FetchInterceptor.symbol = Symbol("fetch");
|
|
2647
2647
|
|
|
2648
2648
|
//#endregion
|
|
2649
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2649
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/chunk-RC2XPCC4.mjs
|
|
2650
2650
|
var BatchInterceptor = class extends Interceptor$1 {
|
|
2651
2651
|
constructor(options) {
|
|
2652
2652
|
BatchInterceptor.symbol = Symbol(options.name);
|
|
@@ -2682,13 +2682,13 @@ var BatchInterceptor = class extends Interceptor$1 {
|
|
|
2682
2682
|
};
|
|
2683
2683
|
|
|
2684
2684
|
//#endregion
|
|
2685
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
2685
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/node/index.mjs
|
|
2686
2686
|
function getCleanUrl(url$1, isAbsolute = true) {
|
|
2687
2687
|
return [isAbsolute && url$1.origin, url$1.pathname].filter(Boolean).join("");
|
|
2688
2688
|
}
|
|
2689
2689
|
|
|
2690
2690
|
//#endregion
|
|
2691
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2691
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/devUtils.mjs
|
|
2692
2692
|
const LIBRARY_PREFIX = "[MSW]";
|
|
2693
2693
|
function formatMessage(message$3, ...positionals) {
|
|
2694
2694
|
const interpolatedMessage = format(message$3, ...positionals);
|
|
@@ -2713,7 +2713,7 @@ var InternalError = class extends Error {
|
|
|
2713
2713
|
};
|
|
2714
2714
|
|
|
2715
2715
|
//#endregion
|
|
2716
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2716
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/pipeEvents.mjs
|
|
2717
2717
|
function pipeEvents(source, destination) {
|
|
2718
2718
|
const rawEmit = source.emit;
|
|
2719
2719
|
if (rawEmit._isPiped) return;
|
|
@@ -2726,7 +2726,7 @@ function pipeEvents(source, destination) {
|
|
|
2726
2726
|
}
|
|
2727
2727
|
|
|
2728
2728
|
//#endregion
|
|
2729
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2729
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/toReadonlyArray.mjs
|
|
2730
2730
|
function toReadonlyArray(source) {
|
|
2731
2731
|
const clone = [...source];
|
|
2732
2732
|
Object.freeze(clone);
|
|
@@ -2734,7 +2734,7 @@ function toReadonlyArray(source) {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
|
|
2736
2736
|
//#endregion
|
|
2737
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2737
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/Disposable.mjs
|
|
2738
2738
|
var Disposable = class {
|
|
2739
2739
|
subscriptions = [];
|
|
2740
2740
|
dispose() {
|
|
@@ -2744,7 +2744,7 @@ var Disposable = class {
|
|
|
2744
2744
|
};
|
|
2745
2745
|
|
|
2746
2746
|
//#endregion
|
|
2747
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2747
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/SetupApi.mjs
|
|
2748
2748
|
var InMemoryHandlersController = class {
|
|
2749
2749
|
constructor(initialHandlers) {
|
|
2750
2750
|
this.initialHandlers = initialHandlers;
|
|
@@ -2813,7 +2813,7 @@ var SetupApi = class extends Disposable {
|
|
|
2813
2813
|
};
|
|
2814
2814
|
|
|
2815
2815
|
//#endregion
|
|
2816
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2816
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/executeHandlers.mjs
|
|
2817
2817
|
const executeHandlers = async ({ request, requestId, handlers, resolutionContext }) => {
|
|
2818
2818
|
let matchingHandler = null;
|
|
2819
2819
|
let result = null;
|
|
@@ -2835,7 +2835,7 @@ const executeHandlers = async ({ request, requestId, handlers, resolutionContext
|
|
|
2835
2835
|
};
|
|
2836
2836
|
|
|
2837
2837
|
//#endregion
|
|
2838
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2838
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/request/toPublicUrl.mjs
|
|
2839
2839
|
function toPublicUrl(url$1) {
|
|
2840
2840
|
if (typeof location === "undefined") return url$1.toString();
|
|
2841
2841
|
const urlInstance = url$1 instanceof URL ? url$1 : new URL(url$1);
|
|
@@ -2843,7 +2843,7 @@ function toPublicUrl(url$1) {
|
|
|
2843
2843
|
}
|
|
2844
2844
|
|
|
2845
2845
|
//#endregion
|
|
2846
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2846
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/isCommonAssetRequest.mjs
|
|
2847
2847
|
function isCommonAssetRequest(request) {
|
|
2848
2848
|
const url$1 = new URL(request.url);
|
|
2849
2849
|
if (url$1.protocol === "file:") return true;
|
|
@@ -2854,7 +2854,7 @@ function isCommonAssetRequest(request) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
|
|
2856
2856
|
//#endregion
|
|
2857
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
2857
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/request/onUnhandledRequest.mjs
|
|
2858
2858
|
async function onUnhandledRequest(request, strategy = "warn") {
|
|
2859
2859
|
const url$1 = new URL(request.url);
|
|
2860
2860
|
const publicUrl = toPublicUrl(url$1) + url$1.search;
|
|
@@ -13180,8 +13180,8 @@ var require_memstore = __commonJS$4({ "node_modules/tough-cookie/lib/memstore.js
|
|
|
13180
13180
|
"removeCookies",
|
|
13181
13181
|
"removeAllCookies",
|
|
13182
13182
|
"getAllCookies"
|
|
13183
|
-
].forEach((name) => {
|
|
13184
|
-
MemoryCookieStore$1.prototype[name] = fromCallback(MemoryCookieStore$1.prototype[name]);
|
|
13183
|
+
].forEach((name$2) => {
|
|
13184
|
+
MemoryCookieStore$1.prototype[name$2] = fromCallback(MemoryCookieStore$1.prototype[name$2]);
|
|
13185
13185
|
});
|
|
13186
13186
|
exports$1.MemoryCookieStore = MemoryCookieStore$1;
|
|
13187
13187
|
function inspectFallback(val) {
|
|
@@ -13346,7 +13346,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13346
13346
|
(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))
|
|
13347
13347
|
)(?:%[0-9a-zA-Z]{1,})?\\]?
|
|
13348
13348
|
`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
13349
|
-
var IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}$`);
|
|
13349
|
+
var IP_V6_REGEX_OBJECT = /* @__PURE__ */ new RegExp(`^${IP_V6_REGEX}$`);
|
|
13350
13350
|
function parseDigits(token, minDigits, maxDigits, trailingOK) {
|
|
13351
13351
|
let count$1 = 0;
|
|
13352
13352
|
while (count$1 < token.length) {
|
|
@@ -13821,7 +13821,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13821
13821
|
let err;
|
|
13822
13822
|
if (validators.isFunction(url$1)) {
|
|
13823
13823
|
cb = url$1;
|
|
13824
|
-
return cb(new Error("No URL was specified"));
|
|
13824
|
+
return cb(/* @__PURE__ */ new Error("No URL was specified"));
|
|
13825
13825
|
}
|
|
13826
13826
|
const context$1 = getCookieContext(url$1);
|
|
13827
13827
|
if (validators.isFunction(options)) {
|
|
@@ -13840,11 +13840,11 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13840
13840
|
if (typeof cookie === "string" || cookie instanceof String) {
|
|
13841
13841
|
cookie = Cookie$1.parse(cookie, { loose });
|
|
13842
13842
|
if (!cookie) {
|
|
13843
|
-
err = new Error("Cookie failed to parse");
|
|
13843
|
+
err = /* @__PURE__ */ new Error("Cookie failed to parse");
|
|
13844
13844
|
return cb(options.ignoreError ? null : err);
|
|
13845
13845
|
}
|
|
13846
13846
|
} else if (!(cookie instanceof Cookie$1)) {
|
|
13847
|
-
err = new Error("First argument to setCookie must be a Cookie object or string");
|
|
13847
|
+
err = /* @__PURE__ */ new Error("First argument to setCookie must be a Cookie object or string");
|
|
13848
13848
|
return cb(options.ignoreError ? null : err);
|
|
13849
13849
|
}
|
|
13850
13850
|
const now = options.now || /* @__PURE__ */ new Date();
|
|
@@ -13854,13 +13854,13 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13854
13854
|
ignoreError: options.ignoreError
|
|
13855
13855
|
});
|
|
13856
13856
|
if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie.domain)) {
|
|
13857
|
-
err = new Error("Cookie has domain set to a public suffix");
|
|
13857
|
+
err = /* @__PURE__ */ new Error("Cookie has domain set to a public suffix");
|
|
13858
13858
|
return cb(options.ignoreError ? null : err);
|
|
13859
13859
|
}
|
|
13860
13860
|
}
|
|
13861
13861
|
if (cookie.domain) {
|
|
13862
13862
|
if (!domainMatch$1(host, cookie.cdomain(), false)) {
|
|
13863
|
-
err = new Error(`Cookie not in this host's domain. Cookie:${cookie.cdomain()} Request:${host}`);
|
|
13863
|
+
err = /* @__PURE__ */ new Error(`Cookie not in this host's domain. Cookie:${cookie.cdomain()} Request:${host}`);
|
|
13864
13864
|
return cb(options.ignoreError ? null : err);
|
|
13865
13865
|
}
|
|
13866
13866
|
if (cookie.hostOnly == null) cookie.hostOnly = false;
|
|
@@ -13873,12 +13873,12 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13873
13873
|
cookie.pathIsDefault = true;
|
|
13874
13874
|
}
|
|
13875
13875
|
if (options.http === false && cookie.httpOnly) {
|
|
13876
|
-
err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
|
|
13876
|
+
err = /* @__PURE__ */ new Error("Cookie is HttpOnly and this isn't an HTTP API");
|
|
13877
13877
|
return cb(options.ignoreError ? null : err);
|
|
13878
13878
|
}
|
|
13879
13879
|
if (cookie.sameSite !== "none" && cookie.sameSite !== void 0 && sameSiteContext) {
|
|
13880
13880
|
if (sameSiteContext === "none") {
|
|
13881
|
-
err = new Error("Cookie is SameSite but this is a cross-origin request");
|
|
13881
|
+
err = /* @__PURE__ */ new Error("Cookie is SameSite but this is a cross-origin request");
|
|
13882
13882
|
return cb(options.ignoreError ? null : err);
|
|
13883
13883
|
}
|
|
13884
13884
|
}
|
|
@@ -13908,7 +13908,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
13908
13908
|
};
|
|
13909
13909
|
if (oldCookie) {
|
|
13910
13910
|
if (options.http === false && oldCookie.httpOnly) {
|
|
13911
|
-
err2 = new Error("old Cookie is HttpOnly and this isn't an HTTP API");
|
|
13911
|
+
err2 = /* @__PURE__ */ new Error("old Cookie is HttpOnly and this isn't an HTTP API");
|
|
13912
13912
|
return cb(options.ignoreError ? null : err2);
|
|
13913
13913
|
}
|
|
13914
13914
|
cookie.creation = oldCookie.creation;
|
|
@@ -14008,7 +14008,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
14008
14008
|
prefixSecurity: getNormalizedPrefixSecurity(this.prefixSecurity),
|
|
14009
14009
|
cookies: []
|
|
14010
14010
|
};
|
|
14011
|
-
if (!(this.store.getAllCookies && typeof this.store.getAllCookies === "function")) return cb(new Error("store does not support getAllCookies and cannot be serialized"));
|
|
14011
|
+
if (!(this.store.getAllCookies && typeof this.store.getAllCookies === "function")) return cb(/* @__PURE__ */ new Error("store does not support getAllCookies and cannot be serialized"));
|
|
14012
14012
|
this.store.getAllCookies((err, cookies) => {
|
|
14013
14013
|
if (err) return cb(err);
|
|
14014
14014
|
serialized.cookies = cookies.map((cookie) => {
|
|
@@ -14024,7 +14024,7 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
14024
14024
|
}
|
|
14025
14025
|
_importCookies(serialized, cb) {
|
|
14026
14026
|
let cookies = serialized.cookies;
|
|
14027
|
-
if (!cookies || !Array.isArray(cookies)) return cb(new Error("serialized jar has no cookies array"));
|
|
14027
|
+
if (!cookies || !Array.isArray(cookies)) return cb(/* @__PURE__ */ new Error("serialized jar has no cookies array"));
|
|
14028
14028
|
cookies = cookies.slice();
|
|
14029
14029
|
const putNext = (err) => {
|
|
14030
14030
|
if (err) return cb(err);
|
|
@@ -14117,8 +14117,8 @@ var require_cookie$1 = __commonJS$4({ "node_modules/tough-cookie/lib/cookie.js"(
|
|
|
14117
14117
|
"removeAllCookies",
|
|
14118
14118
|
"serialize",
|
|
14119
14119
|
"setCookie"
|
|
14120
|
-
].forEach((name) => {
|
|
14121
|
-
CookieJar$1.prototype[name] = fromCallback(CookieJar$1.prototype[name]);
|
|
14120
|
+
].forEach((name$2) => {
|
|
14121
|
+
CookieJar$1.prototype[name$2] = fromCallback(CookieJar$1.prototype[name$2]);
|
|
14122
14122
|
});
|
|
14123
14123
|
CookieJar$1.deserialize = fromCallback(CookieJar$1.deserialize);
|
|
14124
14124
|
function syncWrap(method) {
|
|
@@ -14351,7 +14351,7 @@ tough-cookie/lib/cookie.js:
|
|
|
14351
14351
|
*/
|
|
14352
14352
|
|
|
14353
14353
|
//#endregion
|
|
14354
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14354
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/cookieStore.mjs
|
|
14355
14355
|
const { Cookie, CookieJar, Store, MemoryCookieStore, domainMatch, pathMatch } = source_default$2;
|
|
14356
14356
|
var WebStorageCookieStore = class extends Store {
|
|
14357
14357
|
storage;
|
|
@@ -14678,7 +14678,7 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14678
14678
|
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
14679
14679
|
var nameValuePairStr = parts.shift();
|
|
14680
14680
|
var parsed = parseNameValuePair(nameValuePairStr);
|
|
14681
|
-
var name = parsed.name;
|
|
14681
|
+
var name$2 = parsed.name;
|
|
14682
14682
|
var value = parsed.value;
|
|
14683
14683
|
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
|
14684
14684
|
try {
|
|
@@ -14687,7 +14687,7 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14687
14687
|
console.error("set-cookie-parser encountered an error while decoding a cookie with value '" + value + "'. Set options.decodeValues to false to disable this feature.", e);
|
|
14688
14688
|
}
|
|
14689
14689
|
var cookie = {
|
|
14690
|
-
name,
|
|
14690
|
+
name: name$2,
|
|
14691
14691
|
value
|
|
14692
14692
|
};
|
|
14693
14693
|
parts.forEach(function(part) {
|
|
@@ -14704,15 +14704,15 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14704
14704
|
return cookie;
|
|
14705
14705
|
}
|
|
14706
14706
|
function parseNameValuePair(nameValuePairStr) {
|
|
14707
|
-
var name = "";
|
|
14707
|
+
var name$2 = "";
|
|
14708
14708
|
var value = "";
|
|
14709
14709
|
var nameValueArr = nameValuePairStr.split("=");
|
|
14710
14710
|
if (nameValueArr.length > 1) {
|
|
14711
|
-
name = nameValueArr.shift();
|
|
14711
|
+
name$2 = nameValueArr.shift();
|
|
14712
14712
|
value = nameValueArr.join("=");
|
|
14713
14713
|
} else value = nameValuePairStr;
|
|
14714
14714
|
return {
|
|
14715
|
-
name,
|
|
14715
|
+
name: name$2,
|
|
14716
14716
|
value
|
|
14717
14717
|
};
|
|
14718
14718
|
}
|
|
@@ -14791,9 +14791,9 @@ var require_set_cookie = __commonJS$2({ "node_modules/set-cookie-parser/lib/set-
|
|
|
14791
14791
|
} });
|
|
14792
14792
|
var import_set_cookie_parser = __toESM$2(require_set_cookie());
|
|
14793
14793
|
var HEADERS_INVALID_CHARACTERS = /[^a-z0-9\-#$%&'*+.^_`|~]/i;
|
|
14794
|
-
function normalizeHeaderName(name) {
|
|
14795
|
-
if (HEADERS_INVALID_CHARACTERS.test(name) || name.trim() === "") throw new TypeError("Invalid character in header field name");
|
|
14796
|
-
return name.trim().toLowerCase();
|
|
14794
|
+
function normalizeHeaderName(name$2) {
|
|
14795
|
+
if (HEADERS_INVALID_CHARACTERS.test(name$2) || name$2.trim() === "") throw new TypeError("Invalid character in header field name");
|
|
14796
|
+
return name$2.trim().toLowerCase();
|
|
14797
14797
|
}
|
|
14798
14798
|
var charCodesToRemove = [
|
|
14799
14799
|
String.fromCharCode(10),
|
|
@@ -14858,72 +14858,72 @@ var Headers$1 = class _Headers {
|
|
|
14858
14858
|
this[_c] = "Headers";
|
|
14859
14859
|
if (["Headers", "HeadersPolyfill"].includes(init?.constructor.name) || init instanceof _Headers || typeof globalThis.Headers !== "undefined" && init instanceof globalThis.Headers) {
|
|
14860
14860
|
const initialHeaders = init;
|
|
14861
|
-
initialHeaders.forEach((value, name) => {
|
|
14862
|
-
this.append(name, value);
|
|
14861
|
+
initialHeaders.forEach((value, name$2) => {
|
|
14862
|
+
this.append(name$2, value);
|
|
14863
14863
|
}, this);
|
|
14864
|
-
} else if (Array.isArray(init)) init.forEach(([name, value]) => {
|
|
14865
|
-
this.append(name, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14864
|
+
} else if (Array.isArray(init)) init.forEach(([name$2, value]) => {
|
|
14865
|
+
this.append(name$2, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14866
14866
|
});
|
|
14867
|
-
else if (init) Object.getOwnPropertyNames(init).forEach((name) => {
|
|
14868
|
-
const value = init[name];
|
|
14869
|
-
this.append(name, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14867
|
+
else if (init) Object.getOwnPropertyNames(init).forEach((name$2) => {
|
|
14868
|
+
const value = init[name$2];
|
|
14869
|
+
this.append(name$2, Array.isArray(value) ? value.join(HEADER_VALUE_DELIMITER) : value);
|
|
14870
14870
|
});
|
|
14871
14871
|
}
|
|
14872
14872
|
[(_a = NORMALIZED_HEADERS, _b = RAW_HEADER_NAMES, _c = Symbol.toStringTag, Symbol.iterator)]() {
|
|
14873
14873
|
return this.entries();
|
|
14874
14874
|
}
|
|
14875
14875
|
*keys() {
|
|
14876
|
-
for (const [name] of this.entries()) yield name;
|
|
14876
|
+
for (const [name$2] of this.entries()) yield name$2;
|
|
14877
14877
|
}
|
|
14878
14878
|
*values() {
|
|
14879
14879
|
for (const [, value] of this.entries()) yield value;
|
|
14880
14880
|
}
|
|
14881
14881
|
*entries() {
|
|
14882
14882
|
let sortedKeys = Object.keys(this[NORMALIZED_HEADERS]).sort((a, b) => a.localeCompare(b));
|
|
14883
|
-
for (const name of sortedKeys) if (name === "set-cookie") for (const value of this.getSetCookie()) yield [name, value];
|
|
14884
|
-
else yield [name, this.get(name)];
|
|
14883
|
+
for (const name$2 of sortedKeys) if (name$2 === "set-cookie") for (const value of this.getSetCookie()) yield [name$2, value];
|
|
14884
|
+
else yield [name$2, this.get(name$2)];
|
|
14885
14885
|
}
|
|
14886
14886
|
/**
|
|
14887
14887
|
* Returns a boolean stating whether a `Headers` object contains a certain header.
|
|
14888
14888
|
*/
|
|
14889
|
-
has(name) {
|
|
14890
|
-
if (!isValidHeaderName(name)) throw new TypeError(`Invalid header name "${name}"`);
|
|
14891
|
-
return this[NORMALIZED_HEADERS].hasOwnProperty(normalizeHeaderName(name));
|
|
14889
|
+
has(name$2) {
|
|
14890
|
+
if (!isValidHeaderName(name$2)) throw new TypeError(`Invalid header name "${name$2}"`);
|
|
14891
|
+
return this[NORMALIZED_HEADERS].hasOwnProperty(normalizeHeaderName(name$2));
|
|
14892
14892
|
}
|
|
14893
14893
|
/**
|
|
14894
14894
|
* Returns a `ByteString` sequence of all the values of a header with a given name.
|
|
14895
14895
|
*/
|
|
14896
|
-
get(name) {
|
|
14897
|
-
if (!isValidHeaderName(name)) throw TypeError(`Invalid header name "${name}"`);
|
|
14898
|
-
return this[NORMALIZED_HEADERS][normalizeHeaderName(name)] ?? null;
|
|
14896
|
+
get(name$2) {
|
|
14897
|
+
if (!isValidHeaderName(name$2)) throw TypeError(`Invalid header name "${name$2}"`);
|
|
14898
|
+
return this[NORMALIZED_HEADERS][normalizeHeaderName(name$2)] ?? null;
|
|
14899
14899
|
}
|
|
14900
14900
|
/**
|
|
14901
14901
|
* Sets a new value for an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
14902
14902
|
*/
|
|
14903
|
-
set(name, value) {
|
|
14904
|
-
if (!isValidHeaderName(name) || !isValidHeaderValue(value)) return;
|
|
14905
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14903
|
+
set(name$2, value) {
|
|
14904
|
+
if (!isValidHeaderName(name$2) || !isValidHeaderValue(value)) return;
|
|
14905
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14906
14906
|
const normalizedValue = normalizeHeaderValue(value);
|
|
14907
14907
|
this[NORMALIZED_HEADERS][normalizedName] = normalizeHeaderValue(normalizedValue);
|
|
14908
|
-
this[RAW_HEADER_NAMES].set(normalizedName, name);
|
|
14908
|
+
this[RAW_HEADER_NAMES].set(normalizedName, name$2);
|
|
14909
14909
|
}
|
|
14910
14910
|
/**
|
|
14911
14911
|
* Appends a new value onto an existing header inside a `Headers` object, or adds the header if it does not already exist.
|
|
14912
14912
|
*/
|
|
14913
|
-
append(name, value) {
|
|
14914
|
-
if (!isValidHeaderName(name) || !isValidHeaderValue(value)) return;
|
|
14915
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14913
|
+
append(name$2, value) {
|
|
14914
|
+
if (!isValidHeaderName(name$2) || !isValidHeaderValue(value)) return;
|
|
14915
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14916
14916
|
const normalizedValue = normalizeHeaderValue(value);
|
|
14917
14917
|
let resolvedValue = this.has(normalizedName) ? `${this.get(normalizedName)}, ${normalizedValue}` : normalizedValue;
|
|
14918
|
-
this.set(name, resolvedValue);
|
|
14918
|
+
this.set(name$2, resolvedValue);
|
|
14919
14919
|
}
|
|
14920
14920
|
/**
|
|
14921
14921
|
* Deletes a header from the `Headers` object.
|
|
14922
14922
|
*/
|
|
14923
|
-
delete(name) {
|
|
14924
|
-
if (!isValidHeaderName(name)) return;
|
|
14925
|
-
if (!this.has(name)) return;
|
|
14926
|
-
const normalizedName = normalizeHeaderName(name);
|
|
14923
|
+
delete(name$2) {
|
|
14924
|
+
if (!isValidHeaderName(name$2)) return;
|
|
14925
|
+
if (!this.has(name$2)) return;
|
|
14926
|
+
const normalizedName = normalizeHeaderName(name$2);
|
|
14927
14927
|
delete this[NORMALIZED_HEADERS][normalizedName];
|
|
14928
14928
|
this[RAW_HEADER_NAMES].delete(normalizedName);
|
|
14929
14929
|
}
|
|
@@ -14932,7 +14932,7 @@ var Headers$1 = class _Headers {
|
|
|
14932
14932
|
* calling the given callback for each header.
|
|
14933
14933
|
*/
|
|
14934
14934
|
forEach(callback, thisArg) {
|
|
14935
|
-
for (const [name, value] of this.entries()) callback.call(thisArg, value, name, this);
|
|
14935
|
+
for (const [name$2, value] of this.entries()) callback.call(thisArg, value, name$2, this);
|
|
14936
14936
|
}
|
|
14937
14937
|
/**
|
|
14938
14938
|
* Returns an array containing the values
|
|
@@ -14948,7 +14948,7 @@ var Headers$1 = class _Headers {
|
|
|
14948
14948
|
};
|
|
14949
14949
|
|
|
14950
14950
|
//#endregion
|
|
14951
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14951
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/HttpResponse/decorators.mjs
|
|
14952
14952
|
const { message: message$2 } = source_default$1;
|
|
14953
14953
|
const kSetCookie = Symbol("kSetCookie");
|
|
14954
14954
|
function normalizeResponseInit(init = {}) {
|
|
@@ -14984,14 +14984,14 @@ function decorateResponse(response, init) {
|
|
|
14984
14984
|
}
|
|
14985
14985
|
|
|
14986
14986
|
//#endregion
|
|
14987
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14987
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/request/storeResponseCookies.mjs
|
|
14988
14988
|
function storeResponseCookies(request, response) {
|
|
14989
14989
|
const responseCookies = Reflect.get(response, kSetCookie);
|
|
14990
14990
|
if (responseCookies) cookieStore.setCookie(responseCookies, request.url);
|
|
14991
14991
|
}
|
|
14992
14992
|
|
|
14993
14993
|
//#endregion
|
|
14994
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
14994
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/handleRequest.mjs
|
|
14995
14995
|
async function handleRequest(request, requestId, handlers, options, emitter, handleRequestOptions) {
|
|
14996
14996
|
emitter.emit("request:start", {
|
|
14997
14997
|
request,
|
|
@@ -15066,13 +15066,13 @@ async function handleRequest(request, requestId, handlers, options, emitter, han
|
|
|
15066
15066
|
}
|
|
15067
15067
|
|
|
15068
15068
|
//#endregion
|
|
15069
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15069
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isObject.mjs
|
|
15070
15070
|
function isObject(value) {
|
|
15071
15071
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
15072
15072
|
}
|
|
15073
15073
|
|
|
15074
15074
|
//#endregion
|
|
15075
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
15075
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/mergeRight.mjs
|
|
15076
15076
|
function mergeRight(left, right) {
|
|
15077
15077
|
return Object.entries(right).reduce((result, [key, rightValue]) => {
|
|
15078
15078
|
const leftValue = result[key];
|
|
@@ -15090,553 +15090,7 @@ function mergeRight(left, right) {
|
|
|
15090
15090
|
}
|
|
15091
15091
|
|
|
15092
15092
|
//#endregion
|
|
15093
|
-
//#region ../../node_modules/.pnpm
|
|
15094
|
-
var require_dist = require_chunk.__commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports) {
|
|
15095
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15096
|
-
exports.pathToRegexp = exports.tokensToRegexp = exports.regexpToFunction = exports.match = exports.tokensToFunction = exports.compile = exports.parse = void 0;
|
|
15097
|
-
/**
|
|
15098
|
-
* Tokenize input string.
|
|
15099
|
-
*/
|
|
15100
|
-
function lexer(str) {
|
|
15101
|
-
var tokens = [];
|
|
15102
|
-
var i = 0;
|
|
15103
|
-
while (i < str.length) {
|
|
15104
|
-
var char = str[i];
|
|
15105
|
-
if (char === "*" || char === "+" || char === "?") {
|
|
15106
|
-
tokens.push({
|
|
15107
|
-
type: "MODIFIER",
|
|
15108
|
-
index: i,
|
|
15109
|
-
value: str[i++]
|
|
15110
|
-
});
|
|
15111
|
-
continue;
|
|
15112
|
-
}
|
|
15113
|
-
if (char === "\\") {
|
|
15114
|
-
tokens.push({
|
|
15115
|
-
type: "ESCAPED_CHAR",
|
|
15116
|
-
index: i++,
|
|
15117
|
-
value: str[i++]
|
|
15118
|
-
});
|
|
15119
|
-
continue;
|
|
15120
|
-
}
|
|
15121
|
-
if (char === "{") {
|
|
15122
|
-
tokens.push({
|
|
15123
|
-
type: "OPEN",
|
|
15124
|
-
index: i,
|
|
15125
|
-
value: str[i++]
|
|
15126
|
-
});
|
|
15127
|
-
continue;
|
|
15128
|
-
}
|
|
15129
|
-
if (char === "}") {
|
|
15130
|
-
tokens.push({
|
|
15131
|
-
type: "CLOSE",
|
|
15132
|
-
index: i,
|
|
15133
|
-
value: str[i++]
|
|
15134
|
-
});
|
|
15135
|
-
continue;
|
|
15136
|
-
}
|
|
15137
|
-
if (char === ":") {
|
|
15138
|
-
var name = "";
|
|
15139
|
-
var j = i + 1;
|
|
15140
|
-
while (j < str.length) {
|
|
15141
|
-
var code = str.charCodeAt(j);
|
|
15142
|
-
if (code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95) {
|
|
15143
|
-
name += str[j++];
|
|
15144
|
-
continue;
|
|
15145
|
-
}
|
|
15146
|
-
break;
|
|
15147
|
-
}
|
|
15148
|
-
if (!name) throw new TypeError("Missing parameter name at ".concat(i));
|
|
15149
|
-
tokens.push({
|
|
15150
|
-
type: "NAME",
|
|
15151
|
-
index: i,
|
|
15152
|
-
value: name
|
|
15153
|
-
});
|
|
15154
|
-
i = j;
|
|
15155
|
-
continue;
|
|
15156
|
-
}
|
|
15157
|
-
if (char === "(") {
|
|
15158
|
-
var count$1 = 1;
|
|
15159
|
-
var pattern = "";
|
|
15160
|
-
var j = i + 1;
|
|
15161
|
-
if (str[j] === "?") throw new TypeError("Pattern cannot start with \"?\" at ".concat(j));
|
|
15162
|
-
while (j < str.length) {
|
|
15163
|
-
if (str[j] === "\\") {
|
|
15164
|
-
pattern += str[j++] + str[j++];
|
|
15165
|
-
continue;
|
|
15166
|
-
}
|
|
15167
|
-
if (str[j] === ")") {
|
|
15168
|
-
count$1--;
|
|
15169
|
-
if (count$1 === 0) {
|
|
15170
|
-
j++;
|
|
15171
|
-
break;
|
|
15172
|
-
}
|
|
15173
|
-
} else if (str[j] === "(") {
|
|
15174
|
-
count$1++;
|
|
15175
|
-
if (str[j + 1] !== "?") throw new TypeError("Capturing groups are not allowed at ".concat(j));
|
|
15176
|
-
}
|
|
15177
|
-
pattern += str[j++];
|
|
15178
|
-
}
|
|
15179
|
-
if (count$1) throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
15180
|
-
if (!pattern) throw new TypeError("Missing pattern at ".concat(i));
|
|
15181
|
-
tokens.push({
|
|
15182
|
-
type: "PATTERN",
|
|
15183
|
-
index: i,
|
|
15184
|
-
value: pattern
|
|
15185
|
-
});
|
|
15186
|
-
i = j;
|
|
15187
|
-
continue;
|
|
15188
|
-
}
|
|
15189
|
-
tokens.push({
|
|
15190
|
-
type: "CHAR",
|
|
15191
|
-
index: i,
|
|
15192
|
-
value: str[i++]
|
|
15193
|
-
});
|
|
15194
|
-
}
|
|
15195
|
-
tokens.push({
|
|
15196
|
-
type: "END",
|
|
15197
|
-
index: i,
|
|
15198
|
-
value: ""
|
|
15199
|
-
});
|
|
15200
|
-
return tokens;
|
|
15201
|
-
}
|
|
15202
|
-
/**
|
|
15203
|
-
* Parse a string for the raw tokens.
|
|
15204
|
-
*/
|
|
15205
|
-
function parse(str, options) {
|
|
15206
|
-
if (options === void 0) options = {};
|
|
15207
|
-
var tokens = lexer(str);
|
|
15208
|
-
var _a$1 = options.prefixes, prefixes = _a$1 === void 0 ? "./" : _a$1, _b$1 = options.delimiter, delimiter = _b$1 === void 0 ? "/#?" : _b$1;
|
|
15209
|
-
var result = [];
|
|
15210
|
-
var key = 0;
|
|
15211
|
-
var i = 0;
|
|
15212
|
-
var path = "";
|
|
15213
|
-
var tryConsume = function(type$2) {
|
|
15214
|
-
if (i < tokens.length && tokens[i].type === type$2) return tokens[i++].value;
|
|
15215
|
-
};
|
|
15216
|
-
var mustConsume = function(type$2) {
|
|
15217
|
-
var value$1 = tryConsume(type$2);
|
|
15218
|
-
if (value$1 !== void 0) return value$1;
|
|
15219
|
-
var _a$2 = tokens[i], nextType = _a$2.type, index = _a$2.index;
|
|
15220
|
-
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type$2));
|
|
15221
|
-
};
|
|
15222
|
-
var consumeText = function() {
|
|
15223
|
-
var result$1 = "";
|
|
15224
|
-
var value$1;
|
|
15225
|
-
while (value$1 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) result$1 += value$1;
|
|
15226
|
-
return result$1;
|
|
15227
|
-
};
|
|
15228
|
-
var isSafe = function(value$1) {
|
|
15229
|
-
for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
|
|
15230
|
-
var char$1 = delimiter_1[_i];
|
|
15231
|
-
if (value$1.indexOf(char$1) > -1) return true;
|
|
15232
|
-
}
|
|
15233
|
-
return false;
|
|
15234
|
-
};
|
|
15235
|
-
var safePattern = function(prefix$1) {
|
|
15236
|
-
var prev = result[result.length - 1];
|
|
15237
|
-
var prevText = prefix$1 || (prev && typeof prev === "string" ? prev : "");
|
|
15238
|
-
if (prev && !prevText) throw new TypeError("Must have text between two parameters, missing text after \"".concat(prev.name, "\""));
|
|
15239
|
-
if (!prevText || isSafe(prevText)) return "[^".concat(escapeString(delimiter), "]+?");
|
|
15240
|
-
return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
|
|
15241
|
-
};
|
|
15242
|
-
while (i < tokens.length) {
|
|
15243
|
-
var char = tryConsume("CHAR");
|
|
15244
|
-
var name = tryConsume("NAME");
|
|
15245
|
-
var pattern = tryConsume("PATTERN");
|
|
15246
|
-
if (name || pattern) {
|
|
15247
|
-
var prefix = char || "";
|
|
15248
|
-
if (prefixes.indexOf(prefix) === -1) {
|
|
15249
|
-
path += prefix;
|
|
15250
|
-
prefix = "";
|
|
15251
|
-
}
|
|
15252
|
-
if (path) {
|
|
15253
|
-
result.push(path);
|
|
15254
|
-
path = "";
|
|
15255
|
-
}
|
|
15256
|
-
result.push({
|
|
15257
|
-
name: name || key++,
|
|
15258
|
-
prefix,
|
|
15259
|
-
suffix: "",
|
|
15260
|
-
pattern: pattern || safePattern(prefix),
|
|
15261
|
-
modifier: tryConsume("MODIFIER") || ""
|
|
15262
|
-
});
|
|
15263
|
-
continue;
|
|
15264
|
-
}
|
|
15265
|
-
var value = char || tryConsume("ESCAPED_CHAR");
|
|
15266
|
-
if (value) {
|
|
15267
|
-
path += value;
|
|
15268
|
-
continue;
|
|
15269
|
-
}
|
|
15270
|
-
if (path) {
|
|
15271
|
-
result.push(path);
|
|
15272
|
-
path = "";
|
|
15273
|
-
}
|
|
15274
|
-
var open = tryConsume("OPEN");
|
|
15275
|
-
if (open) {
|
|
15276
|
-
var prefix = consumeText();
|
|
15277
|
-
var name_1 = tryConsume("NAME") || "";
|
|
15278
|
-
var pattern_1 = tryConsume("PATTERN") || "";
|
|
15279
|
-
var suffix = consumeText();
|
|
15280
|
-
mustConsume("CLOSE");
|
|
15281
|
-
result.push({
|
|
15282
|
-
name: name_1 || (pattern_1 ? key++ : ""),
|
|
15283
|
-
pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
|
|
15284
|
-
prefix,
|
|
15285
|
-
suffix,
|
|
15286
|
-
modifier: tryConsume("MODIFIER") || ""
|
|
15287
|
-
});
|
|
15288
|
-
continue;
|
|
15289
|
-
}
|
|
15290
|
-
mustConsume("END");
|
|
15291
|
-
}
|
|
15292
|
-
return result;
|
|
15293
|
-
}
|
|
15294
|
-
exports.parse = parse;
|
|
15295
|
-
/**
|
|
15296
|
-
* Compile a string to a template function for the path.
|
|
15297
|
-
*/
|
|
15298
|
-
function compile(str, options) {
|
|
15299
|
-
return tokensToFunction(parse(str, options), options);
|
|
15300
|
-
}
|
|
15301
|
-
exports.compile = compile;
|
|
15302
|
-
/**
|
|
15303
|
-
* Expose a method for transforming tokens into the path function.
|
|
15304
|
-
*/
|
|
15305
|
-
function tokensToFunction(tokens, options) {
|
|
15306
|
-
if (options === void 0) options = {};
|
|
15307
|
-
var reFlags = flags(options);
|
|
15308
|
-
var _a$1 = options.encode, encode = _a$1 === void 0 ? function(x) {
|
|
15309
|
-
return x;
|
|
15310
|
-
} : _a$1, _b$1 = options.validate, validate = _b$1 === void 0 ? true : _b$1;
|
|
15311
|
-
var matches = tokens.map(function(token) {
|
|
15312
|
-
if (typeof token === "object") return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
|
|
15313
|
-
});
|
|
15314
|
-
return function(data) {
|
|
15315
|
-
var path = "";
|
|
15316
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
15317
|
-
var token = tokens[i];
|
|
15318
|
-
if (typeof token === "string") {
|
|
15319
|
-
path += token;
|
|
15320
|
-
continue;
|
|
15321
|
-
}
|
|
15322
|
-
var value = data ? data[token.name] : void 0;
|
|
15323
|
-
var optional = token.modifier === "?" || token.modifier === "*";
|
|
15324
|
-
var repeat = token.modifier === "*" || token.modifier === "+";
|
|
15325
|
-
if (Array.isArray(value)) {
|
|
15326
|
-
if (!repeat) throw new TypeError("Expected \"".concat(token.name, "\" to not repeat, but got an array"));
|
|
15327
|
-
if (value.length === 0) {
|
|
15328
|
-
if (optional) continue;
|
|
15329
|
-
throw new TypeError("Expected \"".concat(token.name, "\" to not be empty"));
|
|
15330
|
-
}
|
|
15331
|
-
for (var j = 0; j < value.length; j++) {
|
|
15332
|
-
var segment = encode(value[j], token);
|
|
15333
|
-
if (validate && !matches[i].test(segment)) throw new TypeError("Expected all \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
15334
|
-
path += token.prefix + segment + token.suffix;
|
|
15335
|
-
}
|
|
15336
|
-
continue;
|
|
15337
|
-
}
|
|
15338
|
-
if (typeof value === "string" || typeof value === "number") {
|
|
15339
|
-
var segment = encode(String(value), token);
|
|
15340
|
-
if (validate && !matches[i].test(segment)) throw new TypeError("Expected \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
15341
|
-
path += token.prefix + segment + token.suffix;
|
|
15342
|
-
continue;
|
|
15343
|
-
}
|
|
15344
|
-
if (optional) continue;
|
|
15345
|
-
var typeOfMessage = repeat ? "an array" : "a string";
|
|
15346
|
-
throw new TypeError("Expected \"".concat(token.name, "\" to be ").concat(typeOfMessage));
|
|
15347
|
-
}
|
|
15348
|
-
return path;
|
|
15349
|
-
};
|
|
15350
|
-
}
|
|
15351
|
-
exports.tokensToFunction = tokensToFunction;
|
|
15352
|
-
/**
|
|
15353
|
-
* Create path match function from `path-to-regexp` spec.
|
|
15354
|
-
*/
|
|
15355
|
-
function match$1(str, options) {
|
|
15356
|
-
var keys = [];
|
|
15357
|
-
var re = pathToRegexp(str, keys, options);
|
|
15358
|
-
return regexpToFunction(re, keys, options);
|
|
15359
|
-
}
|
|
15360
|
-
exports.match = match$1;
|
|
15361
|
-
/**
|
|
15362
|
-
* Create a path match function from `path-to-regexp` output.
|
|
15363
|
-
*/
|
|
15364
|
-
function regexpToFunction(re, keys, options) {
|
|
15365
|
-
if (options === void 0) options = {};
|
|
15366
|
-
var _a$1 = options.decode, decode = _a$1 === void 0 ? function(x) {
|
|
15367
|
-
return x;
|
|
15368
|
-
} : _a$1;
|
|
15369
|
-
return function(pathname) {
|
|
15370
|
-
var m = re.exec(pathname);
|
|
15371
|
-
if (!m) return false;
|
|
15372
|
-
var path = m[0], index = m.index;
|
|
15373
|
-
var params = Object.create(null);
|
|
15374
|
-
var _loop_1 = function(i$1) {
|
|
15375
|
-
if (m[i$1] === void 0) return "continue";
|
|
15376
|
-
var key = keys[i$1 - 1];
|
|
15377
|
-
if (key.modifier === "*" || key.modifier === "+") params[key.name] = m[i$1].split(key.prefix + key.suffix).map(function(value) {
|
|
15378
|
-
return decode(value, key);
|
|
15379
|
-
});
|
|
15380
|
-
else params[key.name] = decode(m[i$1], key);
|
|
15381
|
-
};
|
|
15382
|
-
for (var i = 1; i < m.length; i++) _loop_1(i);
|
|
15383
|
-
return {
|
|
15384
|
-
path,
|
|
15385
|
-
index,
|
|
15386
|
-
params
|
|
15387
|
-
};
|
|
15388
|
-
};
|
|
15389
|
-
}
|
|
15390
|
-
exports.regexpToFunction = regexpToFunction;
|
|
15391
|
-
/**
|
|
15392
|
-
* Escape a regular expression string.
|
|
15393
|
-
*/
|
|
15394
|
-
function escapeString(str) {
|
|
15395
|
-
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
15396
|
-
}
|
|
15397
|
-
/**
|
|
15398
|
-
* Get the flags for a regexp from the options.
|
|
15399
|
-
*/
|
|
15400
|
-
function flags(options) {
|
|
15401
|
-
return options && options.sensitive ? "" : "i";
|
|
15402
|
-
}
|
|
15403
|
-
/**
|
|
15404
|
-
* Pull out keys from a regexp.
|
|
15405
|
-
*/
|
|
15406
|
-
function regexpToRegexp(path, keys) {
|
|
15407
|
-
if (!keys) return path;
|
|
15408
|
-
var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
15409
|
-
var index = 0;
|
|
15410
|
-
var execResult = groupsRegex.exec(path.source);
|
|
15411
|
-
while (execResult) {
|
|
15412
|
-
keys.push({
|
|
15413
|
-
name: execResult[1] || index++,
|
|
15414
|
-
prefix: "",
|
|
15415
|
-
suffix: "",
|
|
15416
|
-
modifier: "",
|
|
15417
|
-
pattern: ""
|
|
15418
|
-
});
|
|
15419
|
-
execResult = groupsRegex.exec(path.source);
|
|
15420
|
-
}
|
|
15421
|
-
return path;
|
|
15422
|
-
}
|
|
15423
|
-
/**
|
|
15424
|
-
* Transform an array into a regexp.
|
|
15425
|
-
*/
|
|
15426
|
-
function arrayToRegexp(paths, keys, options) {
|
|
15427
|
-
var parts = paths.map(function(path) {
|
|
15428
|
-
return pathToRegexp(path, keys, options).source;
|
|
15429
|
-
});
|
|
15430
|
-
return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
|
|
15431
|
-
}
|
|
15432
|
-
/**
|
|
15433
|
-
* Create a path regexp from string input.
|
|
15434
|
-
*/
|
|
15435
|
-
function stringToRegexp(path, keys, options) {
|
|
15436
|
-
return tokensToRegexp(parse(path, options), keys, options);
|
|
15437
|
-
}
|
|
15438
|
-
/**
|
|
15439
|
-
* Expose a function for taking tokens and returning a RegExp.
|
|
15440
|
-
*/
|
|
15441
|
-
function tokensToRegexp(tokens, keys, options) {
|
|
15442
|
-
if (options === void 0) options = {};
|
|
15443
|
-
var _a$1 = options.strict, strict = _a$1 === void 0 ? false : _a$1, _b$1 = options.start, start = _b$1 === void 0 ? true : _b$1, _c$1 = options.end, end = _c$1 === void 0 ? true : _c$1, _d = options.encode, encode = _d === void 0 ? function(x) {
|
|
15444
|
-
return x;
|
|
15445
|
-
} : _d, _e = options.delimiter, delimiter = _e === void 0 ? "/#?" : _e, _f = options.endsWith, endsWith = _f === void 0 ? "" : _f;
|
|
15446
|
-
var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
|
|
15447
|
-
var delimiterRe = "[".concat(escapeString(delimiter), "]");
|
|
15448
|
-
var route = start ? "^" : "";
|
|
15449
|
-
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
15450
|
-
var token = tokens_1[_i];
|
|
15451
|
-
if (typeof token === "string") route += escapeString(encode(token));
|
|
15452
|
-
else {
|
|
15453
|
-
var prefix = escapeString(encode(token.prefix));
|
|
15454
|
-
var suffix = escapeString(encode(token.suffix));
|
|
15455
|
-
if (token.pattern) {
|
|
15456
|
-
if (keys) keys.push(token);
|
|
15457
|
-
if (prefix || suffix) if (token.modifier === "+" || token.modifier === "*") {
|
|
15458
|
-
var mod = token.modifier === "*" ? "?" : "";
|
|
15459
|
-
route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
|
|
15460
|
-
} else route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
|
|
15461
|
-
else {
|
|
15462
|
-
if (token.modifier === "+" || token.modifier === "*") throw new TypeError("Can not repeat \"".concat(token.name, "\" without a prefix and suffix"));
|
|
15463
|
-
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
15464
|
-
}
|
|
15465
|
-
} else route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
|
|
15466
|
-
}
|
|
15467
|
-
}
|
|
15468
|
-
if (end) {
|
|
15469
|
-
if (!strict) route += "".concat(delimiterRe, "?");
|
|
15470
|
-
route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
|
|
15471
|
-
} else {
|
|
15472
|
-
var endToken = tokens[tokens.length - 1];
|
|
15473
|
-
var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
|
|
15474
|
-
if (!strict) route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
|
|
15475
|
-
if (!isEndDelimited) route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
|
|
15476
|
-
}
|
|
15477
|
-
return new RegExp(route, flags(options));
|
|
15478
|
-
}
|
|
15479
|
-
exports.tokensToRegexp = tokensToRegexp;
|
|
15480
|
-
/**
|
|
15481
|
-
* Normalize the given path string, returning a regular expression.
|
|
15482
|
-
*
|
|
15483
|
-
* An empty array can be passed in for the keys, which will hold the
|
|
15484
|
-
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
|
15485
|
-
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
|
15486
|
-
*/
|
|
15487
|
-
function pathToRegexp(path, keys, options) {
|
|
15488
|
-
if (path instanceof RegExp) return regexpToRegexp(path, keys);
|
|
15489
|
-
if (Array.isArray(path)) return arrayToRegexp(path, keys, options);
|
|
15490
|
-
return stringToRegexp(path, keys, options);
|
|
15491
|
-
}
|
|
15492
|
-
exports.pathToRegexp = pathToRegexp;
|
|
15493
|
-
} });
|
|
15494
|
-
|
|
15495
|
-
//#endregion
|
|
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
|
|
15497
|
-
const REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
|
15498
|
-
function getSearchParams(path) {
|
|
15499
|
-
return new URL(`/${path}`, "http://localhost").searchParams;
|
|
15500
|
-
}
|
|
15501
|
-
function cleanUrl(path) {
|
|
15502
|
-
if (path.endsWith("?")) return path;
|
|
15503
|
-
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
|
15504
|
-
}
|
|
15505
|
-
|
|
15506
|
-
//#endregion
|
|
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
|
|
15508
|
-
function isAbsoluteUrl(url$1) {
|
|
15509
|
-
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url$1);
|
|
15510
|
-
}
|
|
15511
|
-
|
|
15512
|
-
//#endregion
|
|
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
|
|
15514
|
-
function getAbsoluteUrl(path, baseUrl) {
|
|
15515
|
-
if (isAbsoluteUrl(path)) return path;
|
|
15516
|
-
if (path.startsWith("*")) return path;
|
|
15517
|
-
const origin = baseUrl || typeof location !== "undefined" && location.href;
|
|
15518
|
-
return origin ? decodeURI(new URL(encodeURI(path), origin).href) : path;
|
|
15519
|
-
}
|
|
15520
|
-
|
|
15521
|
-
//#endregion
|
|
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
|
|
15523
|
-
function normalizePath(path, baseUrl) {
|
|
15524
|
-
if (path instanceof RegExp) return path;
|
|
15525
|
-
const maybeAbsoluteUrl = getAbsoluteUrl(path, baseUrl);
|
|
15526
|
-
return cleanUrl(maybeAbsoluteUrl);
|
|
15527
|
-
}
|
|
15528
|
-
|
|
15529
|
-
//#endregion
|
|
15530
|
-
//#region ../../node_modules/.pnpm/msw@2.8.7_@types+node@22.15.29_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
|
15531
|
-
var import_dist = require_chunk.__toESM(require_dist(), 1);
|
|
15532
|
-
function coercePath(path) {
|
|
15533
|
-
return path.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
|
|
15534
|
-
const expression = "(.*)";
|
|
15535
|
-
if (!parameterName) return expression;
|
|
15536
|
-
return parameterName.startsWith(":") ? `${parameterName}${wildcard}` : `${parameterName}${expression}`;
|
|
15537
|
-
}).replace(/([^\/])(:)(?=\d+)/, "$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/, "$1\\$2");
|
|
15538
|
-
}
|
|
15539
|
-
function matchRequestUrl(url$1, path, baseUrl) {
|
|
15540
|
-
const normalizedPath = normalizePath(path, baseUrl);
|
|
15541
|
-
const cleanPath = typeof normalizedPath === "string" ? coercePath(normalizedPath) : normalizedPath;
|
|
15542
|
-
const cleanUrl$1 = getCleanUrl(url$1);
|
|
15543
|
-
const result = (0, import_dist.match)(cleanPath, { decode: decodeURIComponent })(cleanUrl$1);
|
|
15544
|
-
const params = result && result.params || {};
|
|
15545
|
-
return {
|
|
15546
|
-
matches: result !== false,
|
|
15547
|
-
params
|
|
15548
|
-
};
|
|
15549
|
-
}
|
|
15550
|
-
|
|
15551
|
-
//#endregion
|
|
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
|
|
15553
|
-
const SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
|
15554
|
-
const BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
|
15555
|
-
function getCallFrame(error$2) {
|
|
15556
|
-
const stack = error$2.stack;
|
|
15557
|
-
if (!stack) return;
|
|
15558
|
-
const frames = stack.split("\n").slice(1);
|
|
15559
|
-
const declarationFrame = frames.find((frame) => {
|
|
15560
|
-
return !(SOURCE_FRAME.test(frame) || BUILD_FRAME.test(frame));
|
|
15561
|
-
});
|
|
15562
|
-
if (!declarationFrame) return;
|
|
15563
|
-
const declarationPath = declarationFrame.replace(/\s*at [^()]*\(([^)]+)\)/, "$1").replace(/^@/, "");
|
|
15564
|
-
return declarationPath;
|
|
15565
|
-
}
|
|
15566
|
-
|
|
15567
|
-
//#endregion
|
|
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
|
|
15569
|
-
const kEmitter$1 = Symbol("kEmitter");
|
|
15570
|
-
const kDispatchEvent = Symbol("kDispatchEvent");
|
|
15571
|
-
const kSender = Symbol("kSender");
|
|
15572
|
-
const kStopPropagationPatched = Symbol("kStopPropagationPatched");
|
|
15573
|
-
const KOnStopPropagation = Symbol("KOnStopPropagation");
|
|
15574
|
-
var WebSocketHandler = class {
|
|
15575
|
-
constructor(url$1) {
|
|
15576
|
-
this.url = url$1;
|
|
15577
|
-
this.id = createRequestId$1();
|
|
15578
|
-
this[kEmitter$1] = new Emitter();
|
|
15579
|
-
this.callFrame = getCallFrame(new Error());
|
|
15580
|
-
this.__kind = "EventHandler";
|
|
15581
|
-
}
|
|
15582
|
-
__kind;
|
|
15583
|
-
id;
|
|
15584
|
-
callFrame;
|
|
15585
|
-
[kEmitter$1];
|
|
15586
|
-
parse(args) {
|
|
15587
|
-
const { data: connection } = args.event;
|
|
15588
|
-
const { url: clientUrl } = connection.client;
|
|
15589
|
-
clientUrl.pathname = clientUrl.pathname.replace(/^\/socket.io\//, "/");
|
|
15590
|
-
const match$2 = matchRequestUrl(clientUrl, this.url);
|
|
15591
|
-
return { match: match$2 };
|
|
15592
|
-
}
|
|
15593
|
-
predicate(args) {
|
|
15594
|
-
return args.parsedResult.match.matches;
|
|
15595
|
-
}
|
|
15596
|
-
async [kDispatchEvent](event) {
|
|
15597
|
-
const parsedResult = this.parse({ event });
|
|
15598
|
-
const connection = event.data;
|
|
15599
|
-
const resolvedConnection = {
|
|
15600
|
-
...connection,
|
|
15601
|
-
params: parsedResult.match.params || {}
|
|
15602
|
-
};
|
|
15603
|
-
connection.client.addEventListener("message", createStopPropagationListener(this));
|
|
15604
|
-
connection.client.addEventListener("close", createStopPropagationListener(this));
|
|
15605
|
-
connection.server.addEventListener("open", createStopPropagationListener(this));
|
|
15606
|
-
connection.server.addEventListener("message", createStopPropagationListener(this));
|
|
15607
|
-
connection.server.addEventListener("error", createStopPropagationListener(this));
|
|
15608
|
-
connection.server.addEventListener("close", createStopPropagationListener(this));
|
|
15609
|
-
this[kEmitter$1].emit("connection", resolvedConnection);
|
|
15610
|
-
}
|
|
15611
|
-
};
|
|
15612
|
-
function createStopPropagationListener(handler) {
|
|
15613
|
-
return function stopPropagationListener(event) {
|
|
15614
|
-
const propagationStoppedAt = Reflect.get(event, "kPropagationStoppedAt");
|
|
15615
|
-
if (propagationStoppedAt && handler.id !== propagationStoppedAt) {
|
|
15616
|
-
event.stopImmediatePropagation();
|
|
15617
|
-
return;
|
|
15618
|
-
}
|
|
15619
|
-
Object.defineProperty(event, KOnStopPropagation, {
|
|
15620
|
-
value() {
|
|
15621
|
-
Object.defineProperty(event, "kPropagationStoppedAt", { value: handler.id });
|
|
15622
|
-
},
|
|
15623
|
-
configurable: true
|
|
15624
|
-
});
|
|
15625
|
-
if (!Reflect.get(event, kStopPropagationPatched)) {
|
|
15626
|
-
event.stopPropagation = new Proxy(event.stopPropagation, { apply: (target, thisArg, args) => {
|
|
15627
|
-
Reflect.get(event, KOnStopPropagation)?.call(handler);
|
|
15628
|
-
return Reflect.apply(target, thisArg, args);
|
|
15629
|
-
} });
|
|
15630
|
-
Object.defineProperty(event, kStopPropagationPatched, {
|
|
15631
|
-
value: true,
|
|
15632
|
-
configurable: false
|
|
15633
|
-
});
|
|
15634
|
-
}
|
|
15635
|
-
};
|
|
15636
|
-
}
|
|
15637
|
-
|
|
15638
|
-
//#endregion
|
|
15639
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.38.7/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
|
|
15093
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
|
|
15640
15094
|
function hasConfigurableGlobal(propertyName) {
|
|
15641
15095
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
|
|
15642
15096
|
if (typeof descriptor === "undefined") return false;
|
|
@@ -15650,7 +15104,7 @@ function hasConfigurableGlobal(propertyName) {
|
|
|
15650
15104
|
}
|
|
15651
15105
|
|
|
15652
15106
|
//#endregion
|
|
15653
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
15107
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
|
|
15654
15108
|
function getGlobalSymbol(symbol) {
|
|
15655
15109
|
return globalThis[symbol] || void 0;
|
|
15656
15110
|
}
|
|
@@ -15792,7 +15246,7 @@ function createRequestId() {
|
|
|
15792
15246
|
}
|
|
15793
15247
|
|
|
15794
15248
|
//#endregion
|
|
15795
|
-
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.
|
|
15249
|
+
//#region ../../node_modules/.pnpm/@mswjs+interceptors@0.39.2/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.mjs
|
|
15796
15250
|
function bindEvent(target, event) {
|
|
15797
15251
|
Object.defineProperties(event, {
|
|
15798
15252
|
target: {
|
|
@@ -15979,664 +15433,1135 @@ var WebSocketOverride = class extends EventTarget {
|
|
|
15979
15433
|
this._onclose = listener;
|
|
15980
15434
|
if (listener !== null) this.addEventListener("close", listener);
|
|
15981
15435
|
}
|
|
15982
|
-
get onclose() {
|
|
15983
|
-
return this._onclose;
|
|
15436
|
+
get onclose() {
|
|
15437
|
+
return this._onclose;
|
|
15438
|
+
}
|
|
15439
|
+
/**
|
|
15440
|
+
* @see https://websockets.spec.whatwg.org/#ref-for-dom-websocket-send%E2%91%A0
|
|
15441
|
+
*/
|
|
15442
|
+
send(data) {
|
|
15443
|
+
if (this.readyState === this.CONNECTING) {
|
|
15444
|
+
this.close();
|
|
15445
|
+
throw new DOMException("InvalidStateError");
|
|
15446
|
+
}
|
|
15447
|
+
if (this.readyState === this.CLOSING || this.readyState === this.CLOSED) return;
|
|
15448
|
+
this.bufferedAmount += getDataSize(data);
|
|
15449
|
+
queueMicrotask(() => {
|
|
15450
|
+
var _a$1;
|
|
15451
|
+
this.bufferedAmount = 0;
|
|
15452
|
+
(_a$1 = this[kOnSend]) == null || _a$1.call(this, data);
|
|
15453
|
+
});
|
|
15454
|
+
}
|
|
15455
|
+
close(code = 1e3, reason) {
|
|
15456
|
+
invariant(code, WEBSOCKET_CLOSE_CODE_RANGE_ERROR);
|
|
15457
|
+
invariant(code === 1e3 || code >= 3e3 && code <= 4999, WEBSOCKET_CLOSE_CODE_RANGE_ERROR);
|
|
15458
|
+
this[kClose](code, reason);
|
|
15459
|
+
}
|
|
15460
|
+
[kClose](code = 1e3, reason, wasClean = true) {
|
|
15461
|
+
if (this.readyState === this.CLOSING || this.readyState === this.CLOSED) return;
|
|
15462
|
+
this.readyState = this.CLOSING;
|
|
15463
|
+
queueMicrotask(() => {
|
|
15464
|
+
this.readyState = this.CLOSED;
|
|
15465
|
+
this.dispatchEvent(bindEvent(this, new CloseEvent("close", {
|
|
15466
|
+
code,
|
|
15467
|
+
reason,
|
|
15468
|
+
wasClean
|
|
15469
|
+
})));
|
|
15470
|
+
this._onopen = null;
|
|
15471
|
+
this._onmessage = null;
|
|
15472
|
+
this._onerror = null;
|
|
15473
|
+
this._onclose = null;
|
|
15474
|
+
});
|
|
15475
|
+
}
|
|
15476
|
+
addEventListener(type$2, listener, options) {
|
|
15477
|
+
return super.addEventListener(type$2, listener, options);
|
|
15478
|
+
}
|
|
15479
|
+
removeEventListener(type$2, callback, options) {
|
|
15480
|
+
return super.removeEventListener(type$2, callback, options);
|
|
15481
|
+
}
|
|
15482
|
+
};
|
|
15483
|
+
WebSocketOverride.CONNECTING = 0;
|
|
15484
|
+
WebSocketOverride.OPEN = 1;
|
|
15485
|
+
WebSocketOverride.CLOSING = 2;
|
|
15486
|
+
WebSocketOverride.CLOSED = 3;
|
|
15487
|
+
function getDataSize(data) {
|
|
15488
|
+
if (typeof data === "string") return data.length;
|
|
15489
|
+
if (data instanceof Blob) return data.size;
|
|
15490
|
+
return data.byteLength;
|
|
15491
|
+
}
|
|
15492
|
+
var kEmitter2 = Symbol("kEmitter");
|
|
15493
|
+
var kBoundListener2 = Symbol("kBoundListener");
|
|
15494
|
+
var kSend = Symbol("kSend");
|
|
15495
|
+
var WebSocketServerConnection = class {
|
|
15496
|
+
constructor(client, transport, createConnection) {
|
|
15497
|
+
this.client = client;
|
|
15498
|
+
this.transport = transport;
|
|
15499
|
+
this.createConnection = createConnection;
|
|
15500
|
+
this[kEmitter2] = new EventTarget();
|
|
15501
|
+
this.mockCloseController = new AbortController();
|
|
15502
|
+
this.realCloseController = new AbortController();
|
|
15503
|
+
this.transport.addEventListener("outgoing", (event) => {
|
|
15504
|
+
if (typeof this.realWebSocket === "undefined") return;
|
|
15505
|
+
queueMicrotask(() => {
|
|
15506
|
+
if (!event.defaultPrevented) this[kSend](event.data);
|
|
15507
|
+
});
|
|
15508
|
+
});
|
|
15509
|
+
this.transport.addEventListener("incoming", this.handleIncomingMessage.bind(this));
|
|
15510
|
+
}
|
|
15511
|
+
/**
|
|
15512
|
+
* The `WebSocket` instance connected to the original server.
|
|
15513
|
+
* Accessing this before calling `server.connect()` will throw.
|
|
15514
|
+
*/
|
|
15515
|
+
get socket() {
|
|
15516
|
+
invariant(this.realWebSocket, "Cannot access \"socket\" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?");
|
|
15517
|
+
return this.realWebSocket;
|
|
15518
|
+
}
|
|
15519
|
+
/**
|
|
15520
|
+
* Open connection to the original WebSocket server.
|
|
15521
|
+
*/
|
|
15522
|
+
connect() {
|
|
15523
|
+
invariant(!this.realWebSocket || this.realWebSocket.readyState !== WebSocket.OPEN, "Failed to call \"connect()\" on the original WebSocket instance: the connection already open");
|
|
15524
|
+
const realWebSocket = this.createConnection();
|
|
15525
|
+
realWebSocket.binaryType = this.client.binaryType;
|
|
15526
|
+
realWebSocket.addEventListener("open", (event) => {
|
|
15527
|
+
this[kEmitter2].dispatchEvent(bindEvent(this.realWebSocket, new Event("open", event)));
|
|
15528
|
+
}, { once: true });
|
|
15529
|
+
realWebSocket.addEventListener("message", (event) => {
|
|
15530
|
+
this.transport.dispatchEvent(bindEvent(this.realWebSocket, new MessageEvent("incoming", {
|
|
15531
|
+
data: event.data,
|
|
15532
|
+
origin: event.origin
|
|
15533
|
+
})));
|
|
15534
|
+
});
|
|
15535
|
+
this.client.addEventListener("close", (event) => {
|
|
15536
|
+
this.handleMockClose(event);
|
|
15537
|
+
}, { signal: this.mockCloseController.signal });
|
|
15538
|
+
realWebSocket.addEventListener("close", (event) => {
|
|
15539
|
+
this.handleRealClose(event);
|
|
15540
|
+
}, { signal: this.realCloseController.signal });
|
|
15541
|
+
realWebSocket.addEventListener("error", () => {
|
|
15542
|
+
const errorEvent = bindEvent(realWebSocket, new Event("error", { cancelable: true }));
|
|
15543
|
+
this[kEmitter2].dispatchEvent(errorEvent);
|
|
15544
|
+
if (!errorEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(this.client, new Event("error")));
|
|
15545
|
+
});
|
|
15546
|
+
this.realWebSocket = realWebSocket;
|
|
15547
|
+
}
|
|
15548
|
+
/**
|
|
15549
|
+
* Listen for the incoming events from the original WebSocket server.
|
|
15550
|
+
*/
|
|
15551
|
+
addEventListener(event, listener, options) {
|
|
15552
|
+
if (!Reflect.has(listener, kBoundListener2)) {
|
|
15553
|
+
const boundListener = listener.bind(this.client);
|
|
15554
|
+
Object.defineProperty(listener, kBoundListener2, {
|
|
15555
|
+
value: boundListener,
|
|
15556
|
+
enumerable: false
|
|
15557
|
+
});
|
|
15558
|
+
}
|
|
15559
|
+
this[kEmitter2].addEventListener(event, Reflect.get(listener, kBoundListener2), options);
|
|
15560
|
+
}
|
|
15561
|
+
/**
|
|
15562
|
+
* Remove the listener for the given event.
|
|
15563
|
+
*/
|
|
15564
|
+
removeEventListener(event, listener, options) {
|
|
15565
|
+
this[kEmitter2].removeEventListener(event, Reflect.get(listener, kBoundListener2), options);
|
|
15566
|
+
}
|
|
15567
|
+
/**
|
|
15568
|
+
* Send data to the original WebSocket server.
|
|
15569
|
+
* @example
|
|
15570
|
+
* server.send('hello')
|
|
15571
|
+
* server.send(new Blob(['hello']))
|
|
15572
|
+
* server.send(new TextEncoder().encode('hello'))
|
|
15573
|
+
*/
|
|
15574
|
+
send(data) {
|
|
15575
|
+
this[kSend](data);
|
|
15576
|
+
}
|
|
15577
|
+
[kSend](data) {
|
|
15578
|
+
const { realWebSocket } = this;
|
|
15579
|
+
invariant(realWebSocket, "Failed to call \"server.send()\" for \"%s\": the connection is not open. Did you forget to call \"server.connect()\"?", this.client.url);
|
|
15580
|
+
if (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;
|
|
15581
|
+
if (realWebSocket.readyState === WebSocket.CONNECTING) {
|
|
15582
|
+
realWebSocket.addEventListener("open", () => {
|
|
15583
|
+
realWebSocket.send(data);
|
|
15584
|
+
}, { once: true });
|
|
15585
|
+
return;
|
|
15586
|
+
}
|
|
15587
|
+
realWebSocket.send(data);
|
|
15588
|
+
}
|
|
15589
|
+
/**
|
|
15590
|
+
* Close the actual server connection.
|
|
15591
|
+
*/
|
|
15592
|
+
close() {
|
|
15593
|
+
const { realWebSocket } = this;
|
|
15594
|
+
invariant(realWebSocket, "Failed to close server connection for \"%s\": the connection is not open. Did you forget to call \"server.connect()\"?", this.client.url);
|
|
15595
|
+
this.realCloseController.abort();
|
|
15596
|
+
if (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;
|
|
15597
|
+
realWebSocket.close();
|
|
15598
|
+
queueMicrotask(() => {
|
|
15599
|
+
this[kEmitter2].dispatchEvent(bindEvent(this.realWebSocket, new CancelableCloseEvent("close", {
|
|
15600
|
+
code: 1e3,
|
|
15601
|
+
cancelable: true
|
|
15602
|
+
})));
|
|
15603
|
+
});
|
|
15604
|
+
}
|
|
15605
|
+
handleIncomingMessage(event) {
|
|
15606
|
+
const messageEvent = bindEvent(event.target, new CancelableMessageEvent("message", {
|
|
15607
|
+
data: event.data,
|
|
15608
|
+
origin: event.origin,
|
|
15609
|
+
cancelable: true
|
|
15610
|
+
}));
|
|
15611
|
+
this[kEmitter2].dispatchEvent(messageEvent);
|
|
15612
|
+
if (!messageEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(
|
|
15613
|
+
/**
|
|
15614
|
+
* @note Bind the forwarded original server events
|
|
15615
|
+
* to the mock WebSocket instance so it would
|
|
15616
|
+
* dispatch them straight away.
|
|
15617
|
+
*/
|
|
15618
|
+
this.client,
|
|
15619
|
+
new MessageEvent("message", {
|
|
15620
|
+
data: event.data,
|
|
15621
|
+
origin: event.origin
|
|
15622
|
+
})
|
|
15623
|
+
));
|
|
15624
|
+
}
|
|
15625
|
+
handleMockClose(_event) {
|
|
15626
|
+
if (this.realWebSocket) this.realWebSocket.close();
|
|
15627
|
+
}
|
|
15628
|
+
handleRealClose(event) {
|
|
15629
|
+
this.mockCloseController.abort();
|
|
15630
|
+
const closeEvent = bindEvent(this.realWebSocket, new CancelableCloseEvent("close", {
|
|
15631
|
+
code: event.code,
|
|
15632
|
+
reason: event.reason,
|
|
15633
|
+
wasClean: event.wasClean,
|
|
15634
|
+
cancelable: true
|
|
15635
|
+
}));
|
|
15636
|
+
this[kEmitter2].dispatchEvent(closeEvent);
|
|
15637
|
+
if (!closeEvent.defaultPrevented) this.client[kClose](event.code, event.reason);
|
|
15638
|
+
}
|
|
15639
|
+
};
|
|
15640
|
+
var WebSocketClassTransport = class extends EventTarget {
|
|
15641
|
+
constructor(socket) {
|
|
15642
|
+
super();
|
|
15643
|
+
this.socket = socket;
|
|
15644
|
+
this.socket.addEventListener("close", (event) => {
|
|
15645
|
+
this.dispatchEvent(bindEvent(this.socket, new CloseEvent("close", event)));
|
|
15646
|
+
});
|
|
15647
|
+
this.socket[kOnSend] = (data) => {
|
|
15648
|
+
this.dispatchEvent(bindEvent(this.socket, new CancelableMessageEvent("outgoing", {
|
|
15649
|
+
data,
|
|
15650
|
+
origin: this.socket.url,
|
|
15651
|
+
cancelable: true
|
|
15652
|
+
})));
|
|
15653
|
+
};
|
|
15654
|
+
}
|
|
15655
|
+
addEventListener(type$2, callback, options) {
|
|
15656
|
+
return super.addEventListener(type$2, callback, options);
|
|
15657
|
+
}
|
|
15658
|
+
dispatchEvent(event) {
|
|
15659
|
+
return super.dispatchEvent(event);
|
|
15984
15660
|
}
|
|
15985
|
-
/**
|
|
15986
|
-
* @see https://websockets.spec.whatwg.org/#ref-for-dom-websocket-send%E2%91%A0
|
|
15987
|
-
*/
|
|
15988
15661
|
send(data) {
|
|
15989
|
-
if (this.readyState === this.CONNECTING) {
|
|
15990
|
-
this.close();
|
|
15991
|
-
throw new DOMException("InvalidStateError");
|
|
15992
|
-
}
|
|
15993
|
-
if (this.readyState === this.CLOSING || this.readyState === this.CLOSED) return;
|
|
15994
|
-
this.bufferedAmount += getDataSize(data);
|
|
15995
15662
|
queueMicrotask(() => {
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15663
|
+
if (this.socket.readyState === this.socket.CLOSING || this.socket.readyState === this.socket.CLOSED) return;
|
|
15664
|
+
const dispatchEvent = () => {
|
|
15665
|
+
this.socket.dispatchEvent(bindEvent(
|
|
15666
|
+
/**
|
|
15667
|
+
* @note Setting this event's "target" to the
|
|
15668
|
+
* WebSocket override instance is important.
|
|
15669
|
+
* This way it can tell apart original incoming events
|
|
15670
|
+
* (must be forwarded to the transport) from the
|
|
15671
|
+
* mocked message events like the one below
|
|
15672
|
+
* (must be dispatched on the client instance).
|
|
15673
|
+
*/
|
|
15674
|
+
this.socket,
|
|
15675
|
+
new MessageEvent("message", {
|
|
15676
|
+
data,
|
|
15677
|
+
origin: this.socket.url
|
|
15678
|
+
})
|
|
15679
|
+
));
|
|
15680
|
+
};
|
|
15681
|
+
if (this.socket.readyState === this.socket.CONNECTING) this.socket.addEventListener("open", () => {
|
|
15682
|
+
dispatchEvent();
|
|
15683
|
+
}, { once: true });
|
|
15684
|
+
else dispatchEvent();
|
|
15999
15685
|
});
|
|
16000
15686
|
}
|
|
16001
|
-
close(code
|
|
16002
|
-
|
|
16003
|
-
invariant(code === 1e3 || code >= 3e3 && code <= 4999, WEBSOCKET_CLOSE_CODE_RANGE_ERROR);
|
|
16004
|
-
this[kClose](code, reason);
|
|
15687
|
+
close(code, reason) {
|
|
15688
|
+
this.socket[kClose](code, reason);
|
|
16005
15689
|
}
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
this.readyState = this.CLOSED;
|
|
16011
|
-
this.dispatchEvent(bindEvent(this, new CloseEvent("close", {
|
|
16012
|
-
code,
|
|
16013
|
-
reason,
|
|
16014
|
-
wasClean
|
|
16015
|
-
})));
|
|
16016
|
-
this._onopen = null;
|
|
16017
|
-
this._onmessage = null;
|
|
16018
|
-
this._onerror = null;
|
|
16019
|
-
this._onclose = null;
|
|
16020
|
-
});
|
|
15690
|
+
};
|
|
15691
|
+
var _WebSocketInterceptor = class extends Interceptor {
|
|
15692
|
+
constructor() {
|
|
15693
|
+
super(_WebSocketInterceptor.symbol);
|
|
16021
15694
|
}
|
|
16022
|
-
|
|
16023
|
-
return
|
|
15695
|
+
checkEnvironment() {
|
|
15696
|
+
return hasConfigurableGlobal("WebSocket");
|
|
16024
15697
|
}
|
|
16025
|
-
|
|
16026
|
-
|
|
15698
|
+
setup() {
|
|
15699
|
+
const originalWebSocketDescriptor = Object.getOwnPropertyDescriptor(globalThis, "WebSocket");
|
|
15700
|
+
const WebSocketProxy = new Proxy(globalThis.WebSocket, { construct: (target, args, newTarget) => {
|
|
15701
|
+
const [url$1, protocols] = args;
|
|
15702
|
+
const createConnection = () => {
|
|
15703
|
+
return Reflect.construct(target, args, newTarget);
|
|
15704
|
+
};
|
|
15705
|
+
const socket = new WebSocketOverride(url$1, protocols);
|
|
15706
|
+
const transport = new WebSocketClassTransport(socket);
|
|
15707
|
+
queueMicrotask(() => {
|
|
15708
|
+
try {
|
|
15709
|
+
const server = new WebSocketServerConnection(socket, transport, createConnection);
|
|
15710
|
+
const hasConnectionListeners = this.emitter.emit("connection", {
|
|
15711
|
+
client: new WebSocketClientConnection(socket, transport),
|
|
15712
|
+
server,
|
|
15713
|
+
info: { protocols }
|
|
15714
|
+
});
|
|
15715
|
+
if (hasConnectionListeners) socket[kPassthroughPromise].resolve(false);
|
|
15716
|
+
else {
|
|
15717
|
+
socket[kPassthroughPromise].resolve(true);
|
|
15718
|
+
server.connect();
|
|
15719
|
+
server.addEventListener("open", () => {
|
|
15720
|
+
socket.dispatchEvent(bindEvent(socket, new Event("open")));
|
|
15721
|
+
if (server["realWebSocket"]) socket.protocol = server["realWebSocket"].protocol;
|
|
15722
|
+
});
|
|
15723
|
+
}
|
|
15724
|
+
} catch (error$2) {
|
|
15725
|
+
if (error$2 instanceof Error) {
|
|
15726
|
+
socket.dispatchEvent(new Event("error"));
|
|
15727
|
+
if (socket.readyState !== WebSocket.CLOSING && socket.readyState !== WebSocket.CLOSED) socket[kClose](1011, error$2.message, false);
|
|
15728
|
+
console.error(error$2);
|
|
15729
|
+
}
|
|
15730
|
+
}
|
|
15731
|
+
});
|
|
15732
|
+
return socket;
|
|
15733
|
+
} });
|
|
15734
|
+
Object.defineProperty(globalThis, "WebSocket", {
|
|
15735
|
+
value: WebSocketProxy,
|
|
15736
|
+
configurable: true
|
|
15737
|
+
});
|
|
15738
|
+
this.subscriptions.push(() => {
|
|
15739
|
+
Object.defineProperty(globalThis, "WebSocket", originalWebSocketDescriptor);
|
|
15740
|
+
});
|
|
16027
15741
|
}
|
|
16028
15742
|
};
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
15743
|
+
var WebSocketInterceptor = _WebSocketInterceptor;
|
|
15744
|
+
WebSocketInterceptor.symbol = Symbol("websocket");
|
|
15745
|
+
|
|
15746
|
+
//#endregion
|
|
15747
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/ws/webSocketInterceptor.mjs
|
|
15748
|
+
const webSocketInterceptor = new WebSocketInterceptor();
|
|
15749
|
+
|
|
15750
|
+
//#endregion
|
|
15751
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isHandlerKind.mjs
|
|
15752
|
+
function isHandlerKind(kind) {
|
|
15753
|
+
return (input) => {
|
|
15754
|
+
return input != null && typeof input === "object" && "__kind" in input && input.__kind === kind;
|
|
15755
|
+
};
|
|
16037
15756
|
}
|
|
16038
|
-
|
|
16039
|
-
|
|
16040
|
-
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16045
|
-
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
15757
|
+
|
|
15758
|
+
//#endregion
|
|
15759
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/ws/handleWebSocketEvent.mjs
|
|
15760
|
+
function handleWebSocketEvent(options) {
|
|
15761
|
+
webSocketInterceptor.on("connection", async (connection) => {
|
|
15762
|
+
const handlers = options.getHandlers().filter(isHandlerKind("EventHandler"));
|
|
15763
|
+
if (handlers.length > 0) {
|
|
15764
|
+
options?.onMockedConnection(connection);
|
|
15765
|
+
await Promise.all(handlers.map((handler) => {
|
|
15766
|
+
return handler.run(connection);
|
|
15767
|
+
}));
|
|
15768
|
+
return;
|
|
15769
|
+
}
|
|
15770
|
+
const request = new Request(connection.client.url, { headers: {
|
|
15771
|
+
upgrade: "websocket",
|
|
15772
|
+
connection: "upgrade"
|
|
15773
|
+
} });
|
|
15774
|
+
await onUnhandledRequest(request, options.getUnhandledRequestStrategy()).catch((error$2) => {
|
|
15775
|
+
const errorEvent = new Event("error");
|
|
15776
|
+
Object.defineProperty(errorEvent, "cause", {
|
|
15777
|
+
enumerable: true,
|
|
15778
|
+
configurable: false,
|
|
15779
|
+
value: error$2
|
|
16053
15780
|
});
|
|
15781
|
+
connection.client.socket.dispatchEvent(errorEvent);
|
|
16054
15782
|
});
|
|
16055
|
-
|
|
15783
|
+
options?.onPassthroughConnection(connection);
|
|
15784
|
+
connection.server.connect();
|
|
15785
|
+
});
|
|
15786
|
+
}
|
|
15787
|
+
|
|
15788
|
+
//#endregion
|
|
15789
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/node/index.mjs
|
|
15790
|
+
var DEFAULT_LISTEN_OPTIONS = { onUnhandledRequest: "warn" };
|
|
15791
|
+
var SetupServerCommonApi = class extends SetupApi {
|
|
15792
|
+
interceptor;
|
|
15793
|
+
resolvedOptions;
|
|
15794
|
+
constructor(interceptors, handlers) {
|
|
15795
|
+
super(...handlers);
|
|
15796
|
+
this.interceptor = new BatchInterceptor({
|
|
15797
|
+
name: "setup-server",
|
|
15798
|
+
interceptors
|
|
15799
|
+
});
|
|
15800
|
+
this.resolvedOptions = {};
|
|
16056
15801
|
}
|
|
16057
15802
|
/**
|
|
16058
|
-
*
|
|
16059
|
-
* Accessing this before calling `server.connect()` will throw.
|
|
15803
|
+
* Subscribe to all requests that are using the interceptor object
|
|
16060
15804
|
*/
|
|
16061
|
-
|
|
16062
|
-
|
|
16063
|
-
|
|
15805
|
+
init() {
|
|
15806
|
+
this.interceptor.on("request", async ({ request, requestId, controller }) => {
|
|
15807
|
+
const response = await handleRequest(request, requestId, this.handlersController.currentHandlers().filter(isHandlerKind("RequestHandler")), this.resolvedOptions, this.emitter, { onPassthroughResponse(request2) {
|
|
15808
|
+
const acceptHeader = request2.headers.get("accept");
|
|
15809
|
+
if (acceptHeader) {
|
|
15810
|
+
const nextAcceptHeader = acceptHeader.replace(/(,\s+)?msw\/passthrough/, "");
|
|
15811
|
+
if (nextAcceptHeader) request2.headers.set("accept", nextAcceptHeader);
|
|
15812
|
+
else request2.headers.delete("accept");
|
|
15813
|
+
}
|
|
15814
|
+
} });
|
|
15815
|
+
if (response) controller.respondWith(response);
|
|
15816
|
+
return;
|
|
15817
|
+
});
|
|
15818
|
+
this.interceptor.on("unhandledException", ({ error: error$2 }) => {
|
|
15819
|
+
if (error$2 instanceof InternalError) throw error$2;
|
|
15820
|
+
});
|
|
15821
|
+
this.interceptor.on("response", ({ response, isMockedResponse, request, requestId }) => {
|
|
15822
|
+
this.emitter.emit(isMockedResponse ? "response:mocked" : "response:bypass", {
|
|
15823
|
+
response,
|
|
15824
|
+
request,
|
|
15825
|
+
requestId
|
|
15826
|
+
});
|
|
15827
|
+
});
|
|
15828
|
+
handleWebSocketEvent({
|
|
15829
|
+
getUnhandledRequestStrategy: () => {
|
|
15830
|
+
return this.resolvedOptions.onUnhandledRequest;
|
|
15831
|
+
},
|
|
15832
|
+
getHandlers: () => {
|
|
15833
|
+
return this.handlersController.currentHandlers();
|
|
15834
|
+
},
|
|
15835
|
+
onMockedConnection: () => {},
|
|
15836
|
+
onPassthroughConnection: () => {}
|
|
15837
|
+
});
|
|
15838
|
+
}
|
|
15839
|
+
listen(options = {}) {
|
|
15840
|
+
this.resolvedOptions = mergeRight(DEFAULT_LISTEN_OPTIONS, options);
|
|
15841
|
+
this.interceptor.apply();
|
|
15842
|
+
this.init();
|
|
15843
|
+
this.subscriptions.push(() => this.interceptor.dispose());
|
|
15844
|
+
webSocketInterceptor.apply();
|
|
15845
|
+
this.subscriptions.push(() => webSocketInterceptor.dispose());
|
|
15846
|
+
invariant([InterceptorReadyState.APPLYING, InterceptorReadyState.APPLIED].includes(this.interceptor.readyState), devUtils.formatMessage("Failed to start \"setupServer\": the interceptor failed to apply. This is likely an issue with the library and you should report it at \"%s\"."), "https://github.com/mswjs/msw/issues/new/choose");
|
|
15847
|
+
}
|
|
15848
|
+
close() {
|
|
15849
|
+
this.dispose();
|
|
15850
|
+
}
|
|
15851
|
+
};
|
|
15852
|
+
var store = new node_async_hooks.AsyncLocalStorage();
|
|
15853
|
+
var AsyncHandlersController = class {
|
|
15854
|
+
rootContext;
|
|
15855
|
+
constructor(initialHandlers) {
|
|
15856
|
+
this.rootContext = {
|
|
15857
|
+
initialHandlers,
|
|
15858
|
+
handlers: []
|
|
15859
|
+
};
|
|
15860
|
+
}
|
|
15861
|
+
get context() {
|
|
15862
|
+
return store.getStore() || this.rootContext;
|
|
15863
|
+
}
|
|
15864
|
+
prepend(runtimeHandlers) {
|
|
15865
|
+
this.context.handlers.unshift(...runtimeHandlers);
|
|
15866
|
+
}
|
|
15867
|
+
reset(nextHandlers) {
|
|
15868
|
+
const context$1 = this.context;
|
|
15869
|
+
context$1.handlers = [];
|
|
15870
|
+
context$1.initialHandlers = nextHandlers.length > 0 ? nextHandlers : context$1.initialHandlers;
|
|
15871
|
+
}
|
|
15872
|
+
currentHandlers() {
|
|
15873
|
+
const { initialHandlers, handlers } = this.context;
|
|
15874
|
+
return handlers.concat(initialHandlers);
|
|
15875
|
+
}
|
|
15876
|
+
};
|
|
15877
|
+
var SetupServerApi = class extends SetupServerCommonApi {
|
|
15878
|
+
constructor(handlers, interceptors = [
|
|
15879
|
+
new ClientRequestInterceptor(),
|
|
15880
|
+
new XMLHttpRequestInterceptor(),
|
|
15881
|
+
new FetchInterceptor()
|
|
15882
|
+
]) {
|
|
15883
|
+
super(interceptors, handlers);
|
|
15884
|
+
this.handlersController = new AsyncHandlersController(handlers);
|
|
16064
15885
|
}
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
|
|
16072
|
-
realWebSocket.addEventListener("open", (event) => {
|
|
16073
|
-
this[kEmitter2].dispatchEvent(bindEvent(this.realWebSocket, new Event("open", event)));
|
|
16074
|
-
}, { once: true });
|
|
16075
|
-
realWebSocket.addEventListener("message", (event) => {
|
|
16076
|
-
this.transport.dispatchEvent(bindEvent(this.realWebSocket, new MessageEvent("incoming", {
|
|
16077
|
-
data: event.data,
|
|
16078
|
-
origin: event.origin
|
|
16079
|
-
})));
|
|
16080
|
-
});
|
|
16081
|
-
this.client.addEventListener("close", (event) => {
|
|
16082
|
-
this.handleMockClose(event);
|
|
16083
|
-
}, { signal: this.mockCloseController.signal });
|
|
16084
|
-
realWebSocket.addEventListener("close", (event) => {
|
|
16085
|
-
this.handleRealClose(event);
|
|
16086
|
-
}, { signal: this.realCloseController.signal });
|
|
16087
|
-
realWebSocket.addEventListener("error", () => {
|
|
16088
|
-
const errorEvent = bindEvent(realWebSocket, new Event("error", { cancelable: true }));
|
|
16089
|
-
this[kEmitter2].dispatchEvent(errorEvent);
|
|
16090
|
-
if (!errorEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(this.client, new Event("error")));
|
|
16091
|
-
});
|
|
16092
|
-
this.realWebSocket = realWebSocket;
|
|
15886
|
+
boundary(callback) {
|
|
15887
|
+
return (...args) => {
|
|
15888
|
+
return store.run({
|
|
15889
|
+
initialHandlers: this.handlersController.currentHandlers(),
|
|
15890
|
+
handlers: []
|
|
15891
|
+
}, callback, ...args);
|
|
15892
|
+
};
|
|
16093
15893
|
}
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
addEventListener(event, listener, options) {
|
|
16098
|
-
if (!Reflect.has(listener, kBoundListener2)) {
|
|
16099
|
-
const boundListener = listener.bind(this.client);
|
|
16100
|
-
Object.defineProperty(listener, kBoundListener2, {
|
|
16101
|
-
value: boundListener,
|
|
16102
|
-
enumerable: false
|
|
16103
|
-
});
|
|
16104
|
-
}
|
|
16105
|
-
this[kEmitter2].addEventListener(event, Reflect.get(listener, kBoundListener2), options);
|
|
15894
|
+
close() {
|
|
15895
|
+
super.close();
|
|
15896
|
+
store.disable();
|
|
16106
15897
|
}
|
|
15898
|
+
};
|
|
15899
|
+
var setupServer = (...handlers) => {
|
|
15900
|
+
return new SetupServerApi(handlers);
|
|
15901
|
+
};
|
|
15902
|
+
|
|
15903
|
+
//#endregion
|
|
15904
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/getCallFrame.mjs
|
|
15905
|
+
const SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
|
15906
|
+
const BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
|
15907
|
+
function getCallFrame(error$2) {
|
|
15908
|
+
const stack = error$2.stack;
|
|
15909
|
+
if (!stack) return;
|
|
15910
|
+
const frames = stack.split("\n").slice(1);
|
|
15911
|
+
const declarationFrame = frames.find((frame) => {
|
|
15912
|
+
return !(SOURCE_FRAME.test(frame) || BUILD_FRAME.test(frame));
|
|
15913
|
+
});
|
|
15914
|
+
if (!declarationFrame) return;
|
|
15915
|
+
const declarationPath = declarationFrame.replace(/\s*at [^()]*\(([^)]+)\)/, "$1").replace(/^@/, "");
|
|
15916
|
+
return declarationPath;
|
|
15917
|
+
}
|
|
15918
|
+
|
|
15919
|
+
//#endregion
|
|
15920
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isIterable.mjs
|
|
15921
|
+
function isIterable(fn) {
|
|
15922
|
+
if (!fn) return false;
|
|
15923
|
+
return Reflect.has(fn, Symbol.iterator) || Reflect.has(fn, Symbol.asyncIterator);
|
|
15924
|
+
}
|
|
15925
|
+
|
|
15926
|
+
//#endregion
|
|
15927
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/handlers/RequestHandler.mjs
|
|
15928
|
+
var RequestHandler = class RequestHandler {
|
|
15929
|
+
static cache = /* @__PURE__ */ new WeakMap();
|
|
15930
|
+
__kind;
|
|
15931
|
+
info;
|
|
16107
15932
|
/**
|
|
16108
|
-
*
|
|
15933
|
+
* Indicates whether this request handler has been used
|
|
15934
|
+
* (its resolver has successfully executed).
|
|
16109
15935
|
*/
|
|
16110
|
-
|
|
16111
|
-
|
|
15936
|
+
isUsed;
|
|
15937
|
+
resolver;
|
|
15938
|
+
resolverIterator;
|
|
15939
|
+
resolverIteratorResult;
|
|
15940
|
+
options;
|
|
15941
|
+
constructor(args) {
|
|
15942
|
+
this.resolver = args.resolver;
|
|
15943
|
+
this.options = args.options;
|
|
15944
|
+
const callFrame = getCallFrame(/* @__PURE__ */ new Error());
|
|
15945
|
+
this.info = {
|
|
15946
|
+
...args.info,
|
|
15947
|
+
callFrame
|
|
15948
|
+
};
|
|
15949
|
+
this.isUsed = false;
|
|
15950
|
+
this.__kind = "RequestHandler";
|
|
16112
15951
|
}
|
|
16113
15952
|
/**
|
|
16114
|
-
*
|
|
16115
|
-
*
|
|
16116
|
-
* server.send('hello')
|
|
16117
|
-
* server.send(new Blob(['hello']))
|
|
16118
|
-
* server.send(new TextEncoder().encode('hello'))
|
|
15953
|
+
* Parse the intercepted request to extract additional information from it.
|
|
15954
|
+
* Parsed result is then exposed to other methods of this request handler.
|
|
16119
15955
|
*/
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
}
|
|
16123
|
-
[kSend](data) {
|
|
16124
|
-
const { realWebSocket } = this;
|
|
16125
|
-
invariant(realWebSocket, "Failed to call \"server.send()\" for \"%s\": the connection is not open. Did you forget to call \"server.connect()\"?", this.client.url);
|
|
16126
|
-
if (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;
|
|
16127
|
-
if (realWebSocket.readyState === WebSocket.CONNECTING) {
|
|
16128
|
-
realWebSocket.addEventListener("open", () => {
|
|
16129
|
-
realWebSocket.send(data);
|
|
16130
|
-
}, { once: true });
|
|
16131
|
-
return;
|
|
16132
|
-
}
|
|
16133
|
-
realWebSocket.send(data);
|
|
15956
|
+
async parse(_args) {
|
|
15957
|
+
return {};
|
|
16134
15958
|
}
|
|
16135
15959
|
/**
|
|
16136
|
-
*
|
|
15960
|
+
* Test if this handler matches the given request.
|
|
15961
|
+
*
|
|
15962
|
+
* This method is not used internally but is exposed
|
|
15963
|
+
* as a convenience method for consumers writing custom
|
|
15964
|
+
* handlers.
|
|
16137
15965
|
*/
|
|
16138
|
-
|
|
16139
|
-
const
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
if (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;
|
|
16143
|
-
realWebSocket.close();
|
|
16144
|
-
queueMicrotask(() => {
|
|
16145
|
-
this[kEmitter2].dispatchEvent(bindEvent(this.realWebSocket, new CancelableCloseEvent("close", {
|
|
16146
|
-
code: 1e3,
|
|
16147
|
-
cancelable: true
|
|
16148
|
-
})));
|
|
15966
|
+
async test(args) {
|
|
15967
|
+
const parsedResult = await this.parse({
|
|
15968
|
+
request: args.request,
|
|
15969
|
+
resolutionContext: args.resolutionContext
|
|
16149
15970
|
});
|
|
16150
|
-
|
|
16151
|
-
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
origin: event.origin,
|
|
16155
|
-
cancelable: true
|
|
16156
|
-
}));
|
|
16157
|
-
this[kEmitter2].dispatchEvent(messageEvent);
|
|
16158
|
-
if (!messageEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(
|
|
16159
|
-
/**
|
|
16160
|
-
* @note Bind the forwarded original server events
|
|
16161
|
-
* to the mock WebSocket instance so it would
|
|
16162
|
-
* dispatch them straight away.
|
|
16163
|
-
*/
|
|
16164
|
-
this.client,
|
|
16165
|
-
new MessageEvent("message", {
|
|
16166
|
-
data: event.data,
|
|
16167
|
-
origin: event.origin
|
|
16168
|
-
})
|
|
16169
|
-
));
|
|
16170
|
-
}
|
|
16171
|
-
handleMockClose(_event) {
|
|
16172
|
-
if (this.realWebSocket) this.realWebSocket.close();
|
|
16173
|
-
}
|
|
16174
|
-
handleRealClose(event) {
|
|
16175
|
-
this.mockCloseController.abort();
|
|
16176
|
-
const closeEvent = bindEvent(this.realWebSocket, new CancelableCloseEvent("close", {
|
|
16177
|
-
code: event.code,
|
|
16178
|
-
reason: event.reason,
|
|
16179
|
-
wasClean: event.wasClean,
|
|
16180
|
-
cancelable: true
|
|
16181
|
-
}));
|
|
16182
|
-
this[kEmitter2].dispatchEvent(closeEvent);
|
|
16183
|
-
if (!closeEvent.defaultPrevented) this.client[kClose](event.code, event.reason);
|
|
16184
|
-
}
|
|
16185
|
-
};
|
|
16186
|
-
var WebSocketClassTransport = class extends EventTarget {
|
|
16187
|
-
constructor(socket) {
|
|
16188
|
-
super();
|
|
16189
|
-
this.socket = socket;
|
|
16190
|
-
this.socket.addEventListener("close", (event) => {
|
|
16191
|
-
this.dispatchEvent(bindEvent(this.socket, new CloseEvent("close", event)));
|
|
15971
|
+
return this.predicate({
|
|
15972
|
+
request: args.request,
|
|
15973
|
+
parsedResult,
|
|
15974
|
+
resolutionContext: args.resolutionContext
|
|
16192
15975
|
});
|
|
16193
|
-
this.socket[kOnSend] = (data) => {
|
|
16194
|
-
this.dispatchEvent(bindEvent(this.socket, new CancelableMessageEvent("outgoing", {
|
|
16195
|
-
data,
|
|
16196
|
-
origin: this.socket.url,
|
|
16197
|
-
cancelable: true
|
|
16198
|
-
})));
|
|
16199
|
-
};
|
|
16200
15976
|
}
|
|
16201
|
-
|
|
16202
|
-
return
|
|
15977
|
+
extendResolverArgs(_args) {
|
|
15978
|
+
return {};
|
|
16203
15979
|
}
|
|
16204
|
-
|
|
16205
|
-
|
|
15980
|
+
cloneRequestOrGetFromCache(request) {
|
|
15981
|
+
const existingClone = RequestHandler.cache.get(request);
|
|
15982
|
+
if (typeof existingClone !== "undefined") return existingClone;
|
|
15983
|
+
const clonedRequest = request.clone();
|
|
15984
|
+
RequestHandler.cache.set(request, clonedRequest);
|
|
15985
|
+
return clonedRequest;
|
|
16206
15986
|
}
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
data,
|
|
16223
|
-
origin: this.socket.url
|
|
16224
|
-
})
|
|
16225
|
-
));
|
|
16226
|
-
};
|
|
16227
|
-
if (this.socket.readyState === this.socket.CONNECTING) this.socket.addEventListener("open", () => {
|
|
16228
|
-
dispatchEvent();
|
|
16229
|
-
}, { once: true });
|
|
16230
|
-
else dispatchEvent();
|
|
15987
|
+
/**
|
|
15988
|
+
* Execute this request handler and produce a mocked response
|
|
15989
|
+
* using the given resolver function.
|
|
15990
|
+
*/
|
|
15991
|
+
async run(args) {
|
|
15992
|
+
if (this.isUsed && this.options?.once) return null;
|
|
15993
|
+
const requestClone = this.cloneRequestOrGetFromCache(args.request);
|
|
15994
|
+
const parsedResult = await this.parse({
|
|
15995
|
+
request: args.request,
|
|
15996
|
+
resolutionContext: args.resolutionContext
|
|
15997
|
+
});
|
|
15998
|
+
const shouldInterceptRequest = this.predicate({
|
|
15999
|
+
request: args.request,
|
|
16000
|
+
parsedResult,
|
|
16001
|
+
resolutionContext: args.resolutionContext
|
|
16231
16002
|
});
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
this.
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
super(_WebSocketInterceptor.symbol);
|
|
16240
|
-
}
|
|
16241
|
-
checkEnvironment() {
|
|
16242
|
-
return hasConfigurableGlobal("WebSocket");
|
|
16243
|
-
}
|
|
16244
|
-
setup() {
|
|
16245
|
-
const originalWebSocketDescriptor = Object.getOwnPropertyDescriptor(globalThis, "WebSocket");
|
|
16246
|
-
const WebSocketProxy = new Proxy(globalThis.WebSocket, { construct: (target, args, newTarget) => {
|
|
16247
|
-
const [url$1, protocols] = args;
|
|
16248
|
-
const createConnection = () => {
|
|
16249
|
-
return Reflect.construct(target, args, newTarget);
|
|
16250
|
-
};
|
|
16251
|
-
const socket = new WebSocketOverride(url$1, protocols);
|
|
16252
|
-
const transport = new WebSocketClassTransport(socket);
|
|
16253
|
-
queueMicrotask(() => {
|
|
16254
|
-
try {
|
|
16255
|
-
const server = new WebSocketServerConnection(socket, transport, createConnection);
|
|
16256
|
-
const hasConnectionListeners = this.emitter.emit("connection", {
|
|
16257
|
-
client: new WebSocketClientConnection(socket, transport),
|
|
16258
|
-
server,
|
|
16259
|
-
info: { protocols }
|
|
16260
|
-
});
|
|
16261
|
-
if (hasConnectionListeners) socket[kPassthroughPromise].resolve(false);
|
|
16262
|
-
else {
|
|
16263
|
-
socket[kPassthroughPromise].resolve(true);
|
|
16264
|
-
server.connect();
|
|
16265
|
-
server.addEventListener("open", () => {
|
|
16266
|
-
socket.dispatchEvent(bindEvent(socket, new Event("open")));
|
|
16267
|
-
if (server["realWebSocket"]) socket.protocol = server["realWebSocket"].protocol;
|
|
16268
|
-
});
|
|
16269
|
-
}
|
|
16270
|
-
} catch (error$2) {
|
|
16271
|
-
if (error$2 instanceof Error) {
|
|
16272
|
-
socket.dispatchEvent(new Event("error"));
|
|
16273
|
-
if (socket.readyState !== WebSocket.CLOSING && socket.readyState !== WebSocket.CLOSED) socket[kClose](1011, error$2.message, false);
|
|
16274
|
-
console.error(error$2);
|
|
16275
|
-
}
|
|
16276
|
-
}
|
|
16277
|
-
});
|
|
16278
|
-
return socket;
|
|
16279
|
-
} });
|
|
16280
|
-
Object.defineProperty(globalThis, "WebSocket", {
|
|
16281
|
-
value: WebSocketProxy,
|
|
16282
|
-
configurable: true
|
|
16003
|
+
if (!shouldInterceptRequest) return null;
|
|
16004
|
+
if (this.isUsed && this.options?.once) return null;
|
|
16005
|
+
this.isUsed = true;
|
|
16006
|
+
const executeResolver = this.wrapResolver(this.resolver);
|
|
16007
|
+
const resolverExtras = this.extendResolverArgs({
|
|
16008
|
+
request: args.request,
|
|
16009
|
+
parsedResult
|
|
16283
16010
|
});
|
|
16284
|
-
|
|
16285
|
-
|
|
16011
|
+
const mockedResponsePromise = executeResolver({
|
|
16012
|
+
...resolverExtras,
|
|
16013
|
+
requestId: args.requestId,
|
|
16014
|
+
request: args.request
|
|
16015
|
+
}).catch((errorOrResponse) => {
|
|
16016
|
+
if (errorOrResponse instanceof Response) return errorOrResponse;
|
|
16017
|
+
throw errorOrResponse;
|
|
16018
|
+
});
|
|
16019
|
+
const mockedResponse = await mockedResponsePromise;
|
|
16020
|
+
const executionResult = this.createExecutionResult({
|
|
16021
|
+
request: requestClone,
|
|
16022
|
+
requestId: args.requestId,
|
|
16023
|
+
response: mockedResponse,
|
|
16024
|
+
parsedResult
|
|
16286
16025
|
});
|
|
16026
|
+
return executionResult;
|
|
16027
|
+
}
|
|
16028
|
+
wrapResolver(resolver) {
|
|
16029
|
+
return async (info) => {
|
|
16030
|
+
if (!this.resolverIterator) {
|
|
16031
|
+
const result = await resolver(info);
|
|
16032
|
+
if (!isIterable(result)) return result;
|
|
16033
|
+
this.resolverIterator = Symbol.iterator in result ? result[Symbol.iterator]() : result[Symbol.asyncIterator]();
|
|
16034
|
+
}
|
|
16035
|
+
this.isUsed = false;
|
|
16036
|
+
const { done, value } = await this.resolverIterator.next();
|
|
16037
|
+
const nextResponse = await value;
|
|
16038
|
+
if (nextResponse) this.resolverIteratorResult = nextResponse.clone();
|
|
16039
|
+
if (done) {
|
|
16040
|
+
this.isUsed = true;
|
|
16041
|
+
return this.resolverIteratorResult?.clone();
|
|
16042
|
+
}
|
|
16043
|
+
return nextResponse;
|
|
16044
|
+
};
|
|
16045
|
+
}
|
|
16046
|
+
createExecutionResult(args) {
|
|
16047
|
+
return {
|
|
16048
|
+
handler: this,
|
|
16049
|
+
request: args.request,
|
|
16050
|
+
requestId: args.requestId,
|
|
16051
|
+
response: args.response,
|
|
16052
|
+
parsedResult: args.parsedResult
|
|
16053
|
+
};
|
|
16287
16054
|
}
|
|
16288
16055
|
};
|
|
16289
|
-
var WebSocketInterceptor = _WebSocketInterceptor;
|
|
16290
|
-
WebSocketInterceptor.symbol = Symbol("websocket");
|
|
16291
16056
|
|
|
16292
16057
|
//#endregion
|
|
16293
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16294
|
-
|
|
16058
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isStringEqual.mjs
|
|
16059
|
+
function isStringEqual(actual, expected) {
|
|
16060
|
+
return actual.toLowerCase() === expected.toLowerCase();
|
|
16061
|
+
}
|
|
16295
16062
|
|
|
16296
16063
|
//#endregion
|
|
16297
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16298
|
-
function
|
|
16299
|
-
|
|
16300
|
-
|
|
16064
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.mjs
|
|
16065
|
+
function getStatusCodeColor(status$1) {
|
|
16066
|
+
if (status$1 < 300) return "#69AB32";
|
|
16067
|
+
if (status$1 < 400) return "#F0BB4B";
|
|
16068
|
+
return "#E95F5D";
|
|
16069
|
+
}
|
|
16070
|
+
|
|
16071
|
+
//#endregion
|
|
16072
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getTimestamp.mjs
|
|
16073
|
+
function getTimestamp(options) {
|
|
16074
|
+
const now = /* @__PURE__ */ new Date();
|
|
16075
|
+
const timestamp = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`;
|
|
16076
|
+
if (options?.milliseconds) return `${timestamp}.${now.getMilliseconds().toString().padStart(3, "0")}`;
|
|
16077
|
+
return timestamp;
|
|
16078
|
+
}
|
|
16079
|
+
|
|
16080
|
+
//#endregion
|
|
16081
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeRequest.mjs
|
|
16082
|
+
async function serializeRequest(request) {
|
|
16083
|
+
const requestClone = request.clone();
|
|
16084
|
+
const requestText = await requestClone.text();
|
|
16085
|
+
return {
|
|
16086
|
+
url: new URL(request.url),
|
|
16087
|
+
method: request.method,
|
|
16088
|
+
headers: Object.fromEntries(request.headers.entries()),
|
|
16089
|
+
body: requestText
|
|
16301
16090
|
};
|
|
16302
16091
|
}
|
|
16303
16092
|
|
|
16304
16093
|
//#endregion
|
|
16305
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
} else {
|
|
16319
|
-
const request = new Request(connection.client.url, { headers: {
|
|
16320
|
-
upgrade: "websocket",
|
|
16321
|
-
connection: "upgrade"
|
|
16322
|
-
} });
|
|
16323
|
-
await onUnhandledRequest(request, options.getUnhandledRequestStrategy()).catch((error$2) => {
|
|
16324
|
-
const errorEvent = new Event("error");
|
|
16325
|
-
Object.defineProperty(errorEvent, "cause", {
|
|
16326
|
-
enumerable: true,
|
|
16327
|
-
configurable: false,
|
|
16328
|
-
value: error$2
|
|
16329
|
-
});
|
|
16330
|
-
connection.client.socket.dispatchEvent(errorEvent);
|
|
16331
|
-
});
|
|
16332
|
-
options?.onPassthroughConnection(connection);
|
|
16333
|
-
connection.server.connect();
|
|
16334
|
-
}
|
|
16335
|
-
});
|
|
16094
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeResponse.mjs
|
|
16095
|
+
const { message: message$1 } = source_default$1;
|
|
16096
|
+
async function serializeResponse(response) {
|
|
16097
|
+
const responseClone = response.clone();
|
|
16098
|
+
const responseText = await responseClone.text();
|
|
16099
|
+
const responseStatus = responseClone.status || 200;
|
|
16100
|
+
const responseStatusText = responseClone.statusText || message$1[responseStatus] || "OK";
|
|
16101
|
+
return {
|
|
16102
|
+
status: responseStatus,
|
|
16103
|
+
statusText: responseStatusText,
|
|
16104
|
+
headers: Object.fromEntries(responseClone.headers.entries()),
|
|
16105
|
+
body: responseText
|
|
16106
|
+
};
|
|
16336
16107
|
}
|
|
16337
16108
|
|
|
16338
16109
|
//#endregion
|
|
16339
|
-
//#region ../../node_modules/.pnpm/
|
|
16340
|
-
var
|
|
16341
|
-
|
|
16342
|
-
|
|
16343
|
-
|
|
16344
|
-
|
|
16345
|
-
|
|
16346
|
-
|
|
16347
|
-
|
|
16348
|
-
|
|
16110
|
+
//#region ../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js
|
|
16111
|
+
var require_dist = require_chunk.__commonJS({ "../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports) {
|
|
16112
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16113
|
+
exports.pathToRegexp = exports.tokensToRegexp = exports.regexpToFunction = exports.match = exports.tokensToFunction = exports.compile = exports.parse = void 0;
|
|
16114
|
+
/**
|
|
16115
|
+
* Tokenize input string.
|
|
16116
|
+
*/
|
|
16117
|
+
function lexer(str) {
|
|
16118
|
+
var tokens = [];
|
|
16119
|
+
var i = 0;
|
|
16120
|
+
while (i < str.length) {
|
|
16121
|
+
var char = str[i];
|
|
16122
|
+
if (char === "*" || char === "+" || char === "?") {
|
|
16123
|
+
tokens.push({
|
|
16124
|
+
type: "MODIFIER",
|
|
16125
|
+
index: i,
|
|
16126
|
+
value: str[i++]
|
|
16127
|
+
});
|
|
16128
|
+
continue;
|
|
16129
|
+
}
|
|
16130
|
+
if (char === "\\") {
|
|
16131
|
+
tokens.push({
|
|
16132
|
+
type: "ESCAPED_CHAR",
|
|
16133
|
+
index: i++,
|
|
16134
|
+
value: str[i++]
|
|
16135
|
+
});
|
|
16136
|
+
continue;
|
|
16137
|
+
}
|
|
16138
|
+
if (char === "{") {
|
|
16139
|
+
tokens.push({
|
|
16140
|
+
type: "OPEN",
|
|
16141
|
+
index: i,
|
|
16142
|
+
value: str[i++]
|
|
16143
|
+
});
|
|
16144
|
+
continue;
|
|
16145
|
+
}
|
|
16146
|
+
if (char === "}") {
|
|
16147
|
+
tokens.push({
|
|
16148
|
+
type: "CLOSE",
|
|
16149
|
+
index: i,
|
|
16150
|
+
value: str[i++]
|
|
16151
|
+
});
|
|
16152
|
+
continue;
|
|
16153
|
+
}
|
|
16154
|
+
if (char === ":") {
|
|
16155
|
+
var name$2 = "";
|
|
16156
|
+
var j = i + 1;
|
|
16157
|
+
while (j < str.length) {
|
|
16158
|
+
var code = str.charCodeAt(j);
|
|
16159
|
+
if (code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95) {
|
|
16160
|
+
name$2 += str[j++];
|
|
16161
|
+
continue;
|
|
16162
|
+
}
|
|
16163
|
+
break;
|
|
16164
|
+
}
|
|
16165
|
+
if (!name$2) throw new TypeError("Missing parameter name at ".concat(i));
|
|
16166
|
+
tokens.push({
|
|
16167
|
+
type: "NAME",
|
|
16168
|
+
index: i,
|
|
16169
|
+
value: name$2
|
|
16170
|
+
});
|
|
16171
|
+
i = j;
|
|
16172
|
+
continue;
|
|
16173
|
+
}
|
|
16174
|
+
if (char === "(") {
|
|
16175
|
+
var count$1 = 1;
|
|
16176
|
+
var pattern = "";
|
|
16177
|
+
var j = i + 1;
|
|
16178
|
+
if (str[j] === "?") throw new TypeError("Pattern cannot start with \"?\" at ".concat(j));
|
|
16179
|
+
while (j < str.length) {
|
|
16180
|
+
if (str[j] === "\\") {
|
|
16181
|
+
pattern += str[j++] + str[j++];
|
|
16182
|
+
continue;
|
|
16183
|
+
}
|
|
16184
|
+
if (str[j] === ")") {
|
|
16185
|
+
count$1--;
|
|
16186
|
+
if (count$1 === 0) {
|
|
16187
|
+
j++;
|
|
16188
|
+
break;
|
|
16189
|
+
}
|
|
16190
|
+
} else if (str[j] === "(") {
|
|
16191
|
+
count$1++;
|
|
16192
|
+
if (str[j + 1] !== "?") throw new TypeError("Capturing groups are not allowed at ".concat(j));
|
|
16193
|
+
}
|
|
16194
|
+
pattern += str[j++];
|
|
16195
|
+
}
|
|
16196
|
+
if (count$1) throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
16197
|
+
if (!pattern) throw new TypeError("Missing pattern at ".concat(i));
|
|
16198
|
+
tokens.push({
|
|
16199
|
+
type: "PATTERN",
|
|
16200
|
+
index: i,
|
|
16201
|
+
value: pattern
|
|
16202
|
+
});
|
|
16203
|
+
i = j;
|
|
16204
|
+
continue;
|
|
16205
|
+
}
|
|
16206
|
+
tokens.push({
|
|
16207
|
+
type: "CHAR",
|
|
16208
|
+
index: i,
|
|
16209
|
+
value: str[i++]
|
|
16210
|
+
});
|
|
16211
|
+
}
|
|
16212
|
+
tokens.push({
|
|
16213
|
+
type: "END",
|
|
16214
|
+
index: i,
|
|
16215
|
+
value: ""
|
|
16349
16216
|
});
|
|
16350
|
-
|
|
16217
|
+
return tokens;
|
|
16351
16218
|
}
|
|
16352
16219
|
/**
|
|
16353
|
-
*
|
|
16220
|
+
* Parse a string for the raw tokens.
|
|
16354
16221
|
*/
|
|
16355
|
-
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
|
|
16222
|
+
function parse(str, options) {
|
|
16223
|
+
if (options === void 0) options = {};
|
|
16224
|
+
var tokens = lexer(str);
|
|
16225
|
+
var _a$1 = options.prefixes, prefixes = _a$1 === void 0 ? "./" : _a$1, _b$1 = options.delimiter, delimiter = _b$1 === void 0 ? "/#?" : _b$1;
|
|
16226
|
+
var result = [];
|
|
16227
|
+
var key = 0;
|
|
16228
|
+
var i = 0;
|
|
16229
|
+
var path = "";
|
|
16230
|
+
var tryConsume = function(type$2) {
|
|
16231
|
+
if (i < tokens.length && tokens[i].type === type$2) return tokens[i++].value;
|
|
16232
|
+
};
|
|
16233
|
+
var mustConsume = function(type$2) {
|
|
16234
|
+
var value$1 = tryConsume(type$2);
|
|
16235
|
+
if (value$1 !== void 0) return value$1;
|
|
16236
|
+
var _a$2 = tokens[i], nextType = _a$2.type, index = _a$2.index;
|
|
16237
|
+
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type$2));
|
|
16238
|
+
};
|
|
16239
|
+
var consumeText = function() {
|
|
16240
|
+
var result$1 = "";
|
|
16241
|
+
var value$1;
|
|
16242
|
+
while (value$1 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) result$1 += value$1;
|
|
16243
|
+
return result$1;
|
|
16244
|
+
};
|
|
16245
|
+
var isSafe = function(value$1) {
|
|
16246
|
+
for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
|
|
16247
|
+
var char$1 = delimiter_1[_i];
|
|
16248
|
+
if (value$1.indexOf(char$1) > -1) return true;
|
|
16249
|
+
}
|
|
16250
|
+
return false;
|
|
16251
|
+
};
|
|
16252
|
+
var safePattern = function(prefix$1) {
|
|
16253
|
+
var prev = result[result.length - 1];
|
|
16254
|
+
var prevText = prefix$1 || (prev && typeof prev === "string" ? prev : "");
|
|
16255
|
+
if (prev && !prevText) throw new TypeError("Must have text between two parameters, missing text after \"".concat(prev.name, "\""));
|
|
16256
|
+
if (!prevText || isSafe(prevText)) return "[^".concat(escapeString(delimiter), "]+?");
|
|
16257
|
+
return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
|
|
16258
|
+
};
|
|
16259
|
+
while (i < tokens.length) {
|
|
16260
|
+
var char = tryConsume("CHAR");
|
|
16261
|
+
var name$2 = tryConsume("NAME");
|
|
16262
|
+
var pattern = tryConsume("PATTERN");
|
|
16263
|
+
if (name$2 || pattern) {
|
|
16264
|
+
var prefix = char || "";
|
|
16265
|
+
if (prefixes.indexOf(prefix) === -1) {
|
|
16266
|
+
path += prefix;
|
|
16267
|
+
prefix = "";
|
|
16363
16268
|
}
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
|
|
16371
|
-
|
|
16372
|
-
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
|
|
16376
|
-
}
|
|
16377
|
-
|
|
16378
|
-
|
|
16379
|
-
|
|
16380
|
-
|
|
16381
|
-
}
|
|
16382
|
-
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
|
|
16388
|
-
|
|
16389
|
-
|
|
16390
|
-
|
|
16391
|
-
|
|
16392
|
-
|
|
16393
|
-
|
|
16394
|
-
|
|
16395
|
-
|
|
16396
|
-
|
|
16269
|
+
if (path) {
|
|
16270
|
+
result.push(path);
|
|
16271
|
+
path = "";
|
|
16272
|
+
}
|
|
16273
|
+
result.push({
|
|
16274
|
+
name: name$2 || key++,
|
|
16275
|
+
prefix,
|
|
16276
|
+
suffix: "",
|
|
16277
|
+
pattern: pattern || safePattern(prefix),
|
|
16278
|
+
modifier: tryConsume("MODIFIER") || ""
|
|
16279
|
+
});
|
|
16280
|
+
continue;
|
|
16281
|
+
}
|
|
16282
|
+
var value = char || tryConsume("ESCAPED_CHAR");
|
|
16283
|
+
if (value) {
|
|
16284
|
+
path += value;
|
|
16285
|
+
continue;
|
|
16286
|
+
}
|
|
16287
|
+
if (path) {
|
|
16288
|
+
result.push(path);
|
|
16289
|
+
path = "";
|
|
16290
|
+
}
|
|
16291
|
+
var open = tryConsume("OPEN");
|
|
16292
|
+
if (open) {
|
|
16293
|
+
var prefix = consumeText();
|
|
16294
|
+
var name_1 = tryConsume("NAME") || "";
|
|
16295
|
+
var pattern_1 = tryConsume("PATTERN") || "";
|
|
16296
|
+
var suffix = consumeText();
|
|
16297
|
+
mustConsume("CLOSE");
|
|
16298
|
+
result.push({
|
|
16299
|
+
name: name_1 || (pattern_1 ? key++ : ""),
|
|
16300
|
+
pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
|
|
16301
|
+
prefix,
|
|
16302
|
+
suffix,
|
|
16303
|
+
modifier: tryConsume("MODIFIER") || ""
|
|
16304
|
+
});
|
|
16305
|
+
continue;
|
|
16306
|
+
}
|
|
16307
|
+
mustConsume("END");
|
|
16308
|
+
}
|
|
16309
|
+
return result;
|
|
16397
16310
|
}
|
|
16398
|
-
|
|
16399
|
-
|
|
16311
|
+
exports.parse = parse;
|
|
16312
|
+
/**
|
|
16313
|
+
* Compile a string to a template function for the path.
|
|
16314
|
+
*/
|
|
16315
|
+
function compile(str, options) {
|
|
16316
|
+
return tokensToFunction(parse(str, options), options);
|
|
16400
16317
|
}
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16318
|
+
exports.compile = compile;
|
|
16319
|
+
/**
|
|
16320
|
+
* Expose a method for transforming tokens into the path function.
|
|
16321
|
+
*/
|
|
16322
|
+
function tokensToFunction(tokens, options) {
|
|
16323
|
+
if (options === void 0) options = {};
|
|
16324
|
+
var reFlags = flags$1(options);
|
|
16325
|
+
var _a$1 = options.encode, encode = _a$1 === void 0 ? function(x) {
|
|
16326
|
+
return x;
|
|
16327
|
+
} : _a$1, _b$1 = options.validate, validate = _b$1 === void 0 ? true : _b$1;
|
|
16328
|
+
var matches = tokens.map(function(token) {
|
|
16329
|
+
if (typeof token === "object") return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
|
|
16330
|
+
});
|
|
16331
|
+
return function(data) {
|
|
16332
|
+
var path = "";
|
|
16333
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
16334
|
+
var token = tokens[i];
|
|
16335
|
+
if (typeof token === "string") {
|
|
16336
|
+
path += token;
|
|
16337
|
+
continue;
|
|
16338
|
+
}
|
|
16339
|
+
var value = data ? data[token.name] : void 0;
|
|
16340
|
+
var optional = token.modifier === "?" || token.modifier === "*";
|
|
16341
|
+
var repeat = token.modifier === "*" || token.modifier === "+";
|
|
16342
|
+
if (Array.isArray(value)) {
|
|
16343
|
+
if (!repeat) throw new TypeError("Expected \"".concat(token.name, "\" to not repeat, but got an array"));
|
|
16344
|
+
if (value.length === 0) {
|
|
16345
|
+
if (optional) continue;
|
|
16346
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to not be empty"));
|
|
16347
|
+
}
|
|
16348
|
+
for (var j = 0; j < value.length; j++) {
|
|
16349
|
+
var segment = encode(value[j], token);
|
|
16350
|
+
if (validate && !matches[i].test(segment)) throw new TypeError("Expected all \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
16351
|
+
path += token.prefix + segment + token.suffix;
|
|
16352
|
+
}
|
|
16353
|
+
continue;
|
|
16354
|
+
}
|
|
16355
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
16356
|
+
var segment = encode(String(value), token);
|
|
16357
|
+
if (validate && !matches[i].test(segment)) throw new TypeError("Expected \"".concat(token.name, "\" to match \"").concat(token.pattern, "\", but got \"").concat(segment, "\""));
|
|
16358
|
+
path += token.prefix + segment + token.suffix;
|
|
16359
|
+
continue;
|
|
16360
|
+
}
|
|
16361
|
+
if (optional) continue;
|
|
16362
|
+
var typeOfMessage = repeat ? "an array" : "a string";
|
|
16363
|
+
throw new TypeError("Expected \"".concat(token.name, "\" to be ").concat(typeOfMessage));
|
|
16364
|
+
}
|
|
16365
|
+
return path;
|
|
16409
16366
|
};
|
|
16410
16367
|
}
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
context$1.handlers = [];
|
|
16420
|
-
context$1.initialHandlers = nextHandlers.length > 0 ? nextHandlers : context$1.initialHandlers;
|
|
16421
|
-
}
|
|
16422
|
-
currentHandlers() {
|
|
16423
|
-
const { initialHandlers, handlers } = this.context;
|
|
16424
|
-
return handlers.concat(initialHandlers);
|
|
16425
|
-
}
|
|
16426
|
-
};
|
|
16427
|
-
var SetupServerApi = class extends SetupServerCommonApi {
|
|
16428
|
-
constructor(handlers, interceptors = [
|
|
16429
|
-
new ClientRequestInterceptor(),
|
|
16430
|
-
new XMLHttpRequestInterceptor(),
|
|
16431
|
-
new FetchInterceptor()
|
|
16432
|
-
]) {
|
|
16433
|
-
super(interceptors, handlers);
|
|
16434
|
-
this.handlersController = new AsyncHandlersController(handlers);
|
|
16368
|
+
exports.tokensToFunction = tokensToFunction;
|
|
16369
|
+
/**
|
|
16370
|
+
* Create path match function from `path-to-regexp` spec.
|
|
16371
|
+
*/
|
|
16372
|
+
function match$1(str, options) {
|
|
16373
|
+
var keys = [];
|
|
16374
|
+
var re = pathToRegexp(str, keys, options);
|
|
16375
|
+
return regexpToFunction(re, keys, options);
|
|
16435
16376
|
}
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16377
|
+
exports.match = match$1;
|
|
16378
|
+
/**
|
|
16379
|
+
* Create a path match function from `path-to-regexp` output.
|
|
16380
|
+
*/
|
|
16381
|
+
function regexpToFunction(re, keys, options) {
|
|
16382
|
+
if (options === void 0) options = {};
|
|
16383
|
+
var _a$1 = options.decode, decode = _a$1 === void 0 ? function(x) {
|
|
16384
|
+
return x;
|
|
16385
|
+
} : _a$1;
|
|
16386
|
+
return function(pathname) {
|
|
16387
|
+
var m = re.exec(pathname);
|
|
16388
|
+
if (!m) return false;
|
|
16389
|
+
var path = m[0], index = m.index;
|
|
16390
|
+
var params = Object.create(null);
|
|
16391
|
+
var _loop_1 = function(i$1) {
|
|
16392
|
+
if (m[i$1] === void 0) return "continue";
|
|
16393
|
+
var key = keys[i$1 - 1];
|
|
16394
|
+
if (key.modifier === "*" || key.modifier === "+") params[key.name] = m[i$1].split(key.prefix + key.suffix).map(function(value) {
|
|
16395
|
+
return decode(value, key);
|
|
16396
|
+
});
|
|
16397
|
+
else params[key.name] = decode(m[i$1], key);
|
|
16398
|
+
};
|
|
16399
|
+
for (var i = 1; i < m.length; i++) _loop_1(i);
|
|
16400
|
+
return {
|
|
16401
|
+
path,
|
|
16402
|
+
index,
|
|
16403
|
+
params
|
|
16404
|
+
};
|
|
16442
16405
|
};
|
|
16443
16406
|
}
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16407
|
+
exports.regexpToFunction = regexpToFunction;
|
|
16408
|
+
/**
|
|
16409
|
+
* Escape a regular expression string.
|
|
16410
|
+
*/
|
|
16411
|
+
function escapeString(str) {
|
|
16412
|
+
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
16447
16413
|
}
|
|
16448
|
-
};
|
|
16449
|
-
var setupServer = (...handlers) => {
|
|
16450
|
-
return new SetupServerApi(handlers);
|
|
16451
|
-
};
|
|
16452
|
-
|
|
16453
|
-
//#endregion
|
|
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
|
|
16455
|
-
function isIterable(fn) {
|
|
16456
|
-
if (!fn) return false;
|
|
16457
|
-
return Reflect.has(fn, Symbol.iterator) || Reflect.has(fn, Symbol.asyncIterator);
|
|
16458
|
-
}
|
|
16459
|
-
|
|
16460
|
-
//#endregion
|
|
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
|
|
16462
|
-
var RequestHandler = class RequestHandler {
|
|
16463
|
-
static cache = /* @__PURE__ */ new WeakMap();
|
|
16464
|
-
__kind;
|
|
16465
|
-
info;
|
|
16466
16414
|
/**
|
|
16467
|
-
*
|
|
16468
|
-
* (its resolver has successfully executed).
|
|
16415
|
+
* Get the flags for a regexp from the options.
|
|
16469
16416
|
*/
|
|
16470
|
-
|
|
16471
|
-
|
|
16472
|
-
resolverIterator;
|
|
16473
|
-
resolverIteratorResult;
|
|
16474
|
-
options;
|
|
16475
|
-
constructor(args) {
|
|
16476
|
-
this.resolver = args.resolver;
|
|
16477
|
-
this.options = args.options;
|
|
16478
|
-
const callFrame = getCallFrame(new Error());
|
|
16479
|
-
this.info = {
|
|
16480
|
-
...args.info,
|
|
16481
|
-
callFrame
|
|
16482
|
-
};
|
|
16483
|
-
this.isUsed = false;
|
|
16484
|
-
this.__kind = "RequestHandler";
|
|
16417
|
+
function flags$1(options) {
|
|
16418
|
+
return options && options.sensitive ? "" : "i";
|
|
16485
16419
|
}
|
|
16486
16420
|
/**
|
|
16487
|
-
*
|
|
16488
|
-
* Parsed result is then exposed to other methods of this request handler.
|
|
16421
|
+
* Pull out keys from a regexp.
|
|
16489
16422
|
*/
|
|
16490
|
-
|
|
16491
|
-
return
|
|
16423
|
+
function regexpToRegexp(path, keys) {
|
|
16424
|
+
if (!keys) return path;
|
|
16425
|
+
var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
16426
|
+
var index = 0;
|
|
16427
|
+
var execResult = groupsRegex.exec(path.source);
|
|
16428
|
+
while (execResult) {
|
|
16429
|
+
keys.push({
|
|
16430
|
+
name: execResult[1] || index++,
|
|
16431
|
+
prefix: "",
|
|
16432
|
+
suffix: "",
|
|
16433
|
+
modifier: "",
|
|
16434
|
+
pattern: ""
|
|
16435
|
+
});
|
|
16436
|
+
execResult = groupsRegex.exec(path.source);
|
|
16437
|
+
}
|
|
16438
|
+
return path;
|
|
16492
16439
|
}
|
|
16493
16440
|
/**
|
|
16494
|
-
*
|
|
16495
|
-
*
|
|
16496
|
-
* This method is not used internally but is exposed
|
|
16497
|
-
* as a convenience method for consumers writing custom
|
|
16498
|
-
* handlers.
|
|
16441
|
+
* Transform an array into a regexp.
|
|
16499
16442
|
*/
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
resolutionContext: args.resolutionContext
|
|
16504
|
-
});
|
|
16505
|
-
return this.predicate({
|
|
16506
|
-
request: args.request,
|
|
16507
|
-
parsedResult,
|
|
16508
|
-
resolutionContext: args.resolutionContext
|
|
16443
|
+
function arrayToRegexp(paths, keys, options) {
|
|
16444
|
+
var parts = paths.map(function(path) {
|
|
16445
|
+
return pathToRegexp(path, keys, options).source;
|
|
16509
16446
|
});
|
|
16510
|
-
|
|
16511
|
-
extendResolverArgs(_args) {
|
|
16512
|
-
return {};
|
|
16513
|
-
}
|
|
16514
|
-
cloneRequestOrGetFromCache(request) {
|
|
16515
|
-
const existingClone = RequestHandler.cache.get(request);
|
|
16516
|
-
if (typeof existingClone !== "undefined") return existingClone;
|
|
16517
|
-
const clonedRequest = request.clone();
|
|
16518
|
-
RequestHandler.cache.set(request, clonedRequest);
|
|
16519
|
-
return clonedRequest;
|
|
16447
|
+
return new RegExp("(?:".concat(parts.join("|"), ")"), flags$1(options));
|
|
16520
16448
|
}
|
|
16521
16449
|
/**
|
|
16522
|
-
*
|
|
16523
|
-
* using the given resolver function.
|
|
16450
|
+
* Create a path regexp from string input.
|
|
16524
16451
|
*/
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
const requestClone = this.cloneRequestOrGetFromCache(args.request);
|
|
16528
|
-
const parsedResult = await this.parse({
|
|
16529
|
-
request: args.request,
|
|
16530
|
-
resolutionContext: args.resolutionContext
|
|
16531
|
-
});
|
|
16532
|
-
const shouldInterceptRequest = this.predicate({
|
|
16533
|
-
request: args.request,
|
|
16534
|
-
parsedResult,
|
|
16535
|
-
resolutionContext: args.resolutionContext
|
|
16536
|
-
});
|
|
16537
|
-
if (!shouldInterceptRequest) return null;
|
|
16538
|
-
if (this.isUsed && this.options?.once) return null;
|
|
16539
|
-
this.isUsed = true;
|
|
16540
|
-
const executeResolver = this.wrapResolver(this.resolver);
|
|
16541
|
-
const resolverExtras = this.extendResolverArgs({
|
|
16542
|
-
request: args.request,
|
|
16543
|
-
parsedResult
|
|
16544
|
-
});
|
|
16545
|
-
const mockedResponsePromise = executeResolver({
|
|
16546
|
-
...resolverExtras,
|
|
16547
|
-
requestId: args.requestId,
|
|
16548
|
-
request: args.request
|
|
16549
|
-
}).catch((errorOrResponse) => {
|
|
16550
|
-
if (errorOrResponse instanceof Response) return errorOrResponse;
|
|
16551
|
-
throw errorOrResponse;
|
|
16552
|
-
});
|
|
16553
|
-
const mockedResponse = await mockedResponsePromise;
|
|
16554
|
-
const executionResult = this.createExecutionResult({
|
|
16555
|
-
request: requestClone,
|
|
16556
|
-
requestId: args.requestId,
|
|
16557
|
-
response: mockedResponse,
|
|
16558
|
-
parsedResult
|
|
16559
|
-
});
|
|
16560
|
-
return executionResult;
|
|
16452
|
+
function stringToRegexp(path, keys, options) {
|
|
16453
|
+
return tokensToRegexp(parse(path, options), keys, options);
|
|
16561
16454
|
}
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16455
|
+
/**
|
|
16456
|
+
* Expose a function for taking tokens and returning a RegExp.
|
|
16457
|
+
*/
|
|
16458
|
+
function tokensToRegexp(tokens, keys, options) {
|
|
16459
|
+
if (options === void 0) options = {};
|
|
16460
|
+
var _a$1 = options.strict, strict = _a$1 === void 0 ? false : _a$1, _b$1 = options.start, start = _b$1 === void 0 ? true : _b$1, _c$1 = options.end, end = _c$1 === void 0 ? true : _c$1, _d = options.encode, encode = _d === void 0 ? function(x) {
|
|
16461
|
+
return x;
|
|
16462
|
+
} : _d, _e = options.delimiter, delimiter = _e === void 0 ? "/#?" : _e, _f = options.endsWith, endsWith = _f === void 0 ? "" : _f;
|
|
16463
|
+
var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
|
|
16464
|
+
var delimiterRe = "[".concat(escapeString(delimiter), "]");
|
|
16465
|
+
var route = start ? "^" : "";
|
|
16466
|
+
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
16467
|
+
var token = tokens_1[_i];
|
|
16468
|
+
if (typeof token === "string") route += escapeString(encode(token));
|
|
16469
|
+
else {
|
|
16470
|
+
var prefix = escapeString(encode(token.prefix));
|
|
16471
|
+
var suffix = escapeString(encode(token.suffix));
|
|
16472
|
+
if (token.pattern) {
|
|
16473
|
+
if (keys) keys.push(token);
|
|
16474
|
+
if (prefix || suffix) if (token.modifier === "+" || token.modifier === "*") {
|
|
16475
|
+
var mod = token.modifier === "*" ? "?" : "";
|
|
16476
|
+
route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
|
|
16477
|
+
} else route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
|
|
16478
|
+
else {
|
|
16479
|
+
if (token.modifier === "+" || token.modifier === "*") throw new TypeError("Can not repeat \"".concat(token.name, "\" without a prefix and suffix"));
|
|
16480
|
+
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
16481
|
+
}
|
|
16482
|
+
} else route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
|
|
16576
16483
|
}
|
|
16577
|
-
|
|
16578
|
-
|
|
16484
|
+
}
|
|
16485
|
+
if (end) {
|
|
16486
|
+
if (!strict) route += "".concat(delimiterRe, "?");
|
|
16487
|
+
route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
|
|
16488
|
+
} else {
|
|
16489
|
+
var endToken = tokens[tokens.length - 1];
|
|
16490
|
+
var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
|
|
16491
|
+
if (!strict) route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
|
|
16492
|
+
if (!isEndDelimited) route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
|
|
16493
|
+
}
|
|
16494
|
+
return new RegExp(route, flags$1(options));
|
|
16579
16495
|
}
|
|
16580
|
-
|
|
16581
|
-
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16587
|
-
|
|
16496
|
+
exports.tokensToRegexp = tokensToRegexp;
|
|
16497
|
+
/**
|
|
16498
|
+
* Normalize the given path string, returning a regular expression.
|
|
16499
|
+
*
|
|
16500
|
+
* An empty array can be passed in for the keys, which will hold the
|
|
16501
|
+
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
|
16502
|
+
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
|
16503
|
+
*/
|
|
16504
|
+
function pathToRegexp(path, keys, options) {
|
|
16505
|
+
if (path instanceof RegExp) return regexpToRegexp(path, keys);
|
|
16506
|
+
if (Array.isArray(path)) return arrayToRegexp(path, keys, options);
|
|
16507
|
+
return stringToRegexp(path, keys, options);
|
|
16588
16508
|
}
|
|
16589
|
-
|
|
16509
|
+
exports.pathToRegexp = pathToRegexp;
|
|
16510
|
+
} });
|
|
16590
16511
|
|
|
16591
16512
|
//#endregion
|
|
16592
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16593
|
-
|
|
16594
|
-
|
|
16513
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/url/cleanUrl.mjs
|
|
16514
|
+
const REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
|
16515
|
+
function getSearchParams(path) {
|
|
16516
|
+
return new URL(`/${path}`, "http://localhost").searchParams;
|
|
16595
16517
|
}
|
|
16596
|
-
|
|
16597
|
-
|
|
16598
|
-
|
|
16599
|
-
function getStatusCodeColor(status$1) {
|
|
16600
|
-
if (status$1 < 300) return "#69AB32";
|
|
16601
|
-
if (status$1 < 400) return "#F0BB4B";
|
|
16602
|
-
return "#E95F5D";
|
|
16518
|
+
function cleanUrl(path) {
|
|
16519
|
+
if (path.endsWith("?")) return path;
|
|
16520
|
+
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
|
16603
16521
|
}
|
|
16604
16522
|
|
|
16605
16523
|
//#endregion
|
|
16606
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16607
|
-
function
|
|
16608
|
-
|
|
16609
|
-
const timestamp = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`;
|
|
16610
|
-
if (options?.milliseconds) return `${timestamp}.${now.getMilliseconds().toString().padStart(3, "0")}`;
|
|
16611
|
-
return timestamp;
|
|
16524
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.mjs
|
|
16525
|
+
function isAbsoluteUrl(url$1) {
|
|
16526
|
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url$1);
|
|
16612
16527
|
}
|
|
16613
16528
|
|
|
16614
16529
|
//#endregion
|
|
16615
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
method: request.method,
|
|
16622
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
16623
|
-
body: requestText
|
|
16624
|
-
};
|
|
16530
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.mjs
|
|
16531
|
+
function getAbsoluteUrl(path, baseUrl) {
|
|
16532
|
+
if (isAbsoluteUrl(path)) return path;
|
|
16533
|
+
if (path.startsWith("*")) return path;
|
|
16534
|
+
const origin = baseUrl || typeof location !== "undefined" && location.href;
|
|
16535
|
+
return origin ? decodeURI(new URL(encodeURI(path), origin).href) : path;
|
|
16625
16536
|
}
|
|
16626
16537
|
|
|
16627
16538
|
//#endregion
|
|
16628
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
const
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16539
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/normalizePath.mjs
|
|
16540
|
+
function normalizePath(path, baseUrl) {
|
|
16541
|
+
if (path instanceof RegExp) return path;
|
|
16542
|
+
const maybeAbsoluteUrl = getAbsoluteUrl(path, baseUrl);
|
|
16543
|
+
return cleanUrl(maybeAbsoluteUrl);
|
|
16544
|
+
}
|
|
16545
|
+
|
|
16546
|
+
//#endregion
|
|
16547
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
|
16548
|
+
var import_dist = require_chunk.__toESM(require_dist(), 1);
|
|
16549
|
+
function coercePath(path) {
|
|
16550
|
+
return path.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
|
|
16551
|
+
const expression = "(.*)";
|
|
16552
|
+
if (!parameterName) return expression;
|
|
16553
|
+
return parameterName.startsWith(":") ? `${parameterName}${wildcard}` : `${parameterName}${expression}`;
|
|
16554
|
+
}).replace(/([^\/])(:)(?=\d+)/, "$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/, "$1\\$2");
|
|
16555
|
+
}
|
|
16556
|
+
function matchRequestUrl(url$1, path, baseUrl) {
|
|
16557
|
+
const normalizedPath = normalizePath(path, baseUrl);
|
|
16558
|
+
const cleanPath = typeof normalizedPath === "string" ? coercePath(normalizedPath) : normalizedPath;
|
|
16559
|
+
const cleanUrl$1 = getCleanUrl(url$1);
|
|
16560
|
+
const result = (0, import_dist.match)(cleanPath, { decode: decodeURIComponent })(cleanUrl$1);
|
|
16561
|
+
const params = result && result.params || {};
|
|
16635
16562
|
return {
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
headers: Object.fromEntries(responseClone.headers.entries()),
|
|
16639
|
-
body: responseText
|
|
16563
|
+
matches: result !== false,
|
|
16564
|
+
params
|
|
16640
16565
|
};
|
|
16641
16566
|
}
|
|
16642
16567
|
|
|
@@ -16723,13 +16648,13 @@ var require_cookie = __commonJS$1({ "node_modules/cookie/index.js"(exports$1) {
|
|
|
16723
16648
|
}
|
|
16724
16649
|
return min;
|
|
16725
16650
|
}
|
|
16726
|
-
function serialize(name, val, opt) {
|
|
16651
|
+
function serialize(name$2, val, opt) {
|
|
16727
16652
|
var enc = opt && opt.encode || encodeURIComponent;
|
|
16728
16653
|
if (typeof enc !== "function") throw new TypeError("option encode is invalid");
|
|
16729
|
-
if (!cookieNameRegExp.test(name)) throw new TypeError("argument name is invalid");
|
|
16654
|
+
if (!cookieNameRegExp.test(name$2)) throw new TypeError("argument name is invalid");
|
|
16730
16655
|
var value = enc(val);
|
|
16731
16656
|
if (!cookieValueRegExp.test(value)) throw new TypeError("argument val is invalid");
|
|
16732
|
-
var str = name + "=" + value;
|
|
16657
|
+
var str = name$2 + "=" + value;
|
|
16733
16658
|
if (!opt) return str;
|
|
16734
16659
|
if (null != opt.maxAge) {
|
|
16735
16660
|
var maxAge = Math.floor(opt.maxAge);
|
|
@@ -16815,7 +16740,7 @@ cookie/index.js:
|
|
|
16815
16740
|
*/
|
|
16816
16741
|
|
|
16817
16742
|
//#endregion
|
|
16818
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16743
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
|
16819
16744
|
function parseCookies(input) {
|
|
16820
16745
|
const parsedCookies = source_default.parse(input);
|
|
16821
16746
|
const cookies = {};
|
|
@@ -16840,7 +16765,7 @@ function getAllRequestCookies(request) {
|
|
|
16840
16765
|
const requestCookieHeader = request.headers.get("cookie");
|
|
16841
16766
|
const cookiesFromHeaders = requestCookieHeader ? parseCookies(requestCookieHeader) : {};
|
|
16842
16767
|
const cookiesFromDocument = getDocumentCookies(request);
|
|
16843
|
-
for (const name in cookiesFromDocument) request.headers.append("cookie", source_default.serialize(name, cookiesFromDocument[name]));
|
|
16768
|
+
for (const name$2 in cookiesFromDocument) request.headers.append("cookie", source_default.serialize(name$2, cookiesFromDocument[name$2]));
|
|
16844
16769
|
const cookiesFromStore = cookieStore.getCookiesSync(request.url);
|
|
16845
16770
|
const storedCookiesObject = Object.fromEntries(cookiesFromStore.map((cookie) => [cookie.key, cookie.value]));
|
|
16846
16771
|
for (const cookie of cookiesFromStore) request.headers.append("cookie", cookie.toString());
|
|
@@ -16852,7 +16777,7 @@ function getAllRequestCookies(request) {
|
|
|
16852
16777
|
}
|
|
16853
16778
|
|
|
16854
16779
|
//#endregion
|
|
16855
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16780
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/handlers/HttpHandler.mjs
|
|
16856
16781
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
|
16857
16782
|
HttpMethods2["HEAD"] = "HEAD";
|
|
16858
16783
|
HttpMethods2["GET"] = "GET";
|
|
@@ -16925,7 +16850,7 @@ var HttpHandler = class extends RequestHandler {
|
|
|
16925
16850
|
};
|
|
16926
16851
|
|
|
16927
16852
|
//#endregion
|
|
16928
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16853
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/http.mjs
|
|
16929
16854
|
function createHttpHandler(method) {
|
|
16930
16855
|
return (path, resolver, options = {}) => {
|
|
16931
16856
|
return new HttpHandler(method, path, resolver, options);
|
|
@@ -16943,7 +16868,7 @@ const http$1 = {
|
|
|
16943
16868
|
};
|
|
16944
16869
|
|
|
16945
16870
|
//#endregion
|
|
16946
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16871
|
+
//#region ../../node_modules/.pnpm/msw@2.10.2_@types+node@24.0.10_typescript@5.8.3/node_modules/msw/lib/core/HttpResponse.mjs
|
|
16947
16872
|
const bodyType = Symbol("bodyType");
|
|
16948
16873
|
var HttpResponse = class HttpResponse extends FetchResponse {
|
|
16949
16874
|
[bodyType] = null;
|
|
@@ -16952,6 +16877,9 @@ var HttpResponse = class HttpResponse extends FetchResponse {
|
|
|
16952
16877
|
super(body, responseInit);
|
|
16953
16878
|
decorateResponse(this, responseInit);
|
|
16954
16879
|
}
|
|
16880
|
+
static error() {
|
|
16881
|
+
return super.error();
|
|
16882
|
+
}
|
|
16955
16883
|
/**
|
|
16956
16884
|
* Create a `Response` with a `Content-Type: "text/plain"` body.
|
|
16957
16885
|
* @example
|
|
@@ -17032,7 +16960,7 @@ var HttpResponse = class HttpResponse extends FetchResponse {
|
|
|
17032
16960
|
var autofix = {
|
|
17033
16961
|
"run_id": 21831,
|
|
17034
16962
|
"request": { "project_id": 4505138086019073 },
|
|
17035
|
-
"status": "
|
|
16963
|
+
"status": "COMPLETED",
|
|
17036
16964
|
"updated_at": "2025-04-09T22:39:50.778146",
|
|
17037
16965
|
"steps": [
|
|
17038
16966
|
{
|
|
@@ -17473,7 +17401,7 @@ var autofix_state_default = { autofix };
|
|
|
17473
17401
|
|
|
17474
17402
|
//#endregion
|
|
17475
17403
|
//#region ../mcp-server-mocks/dist/fixtures/issue.json
|
|
17476
|
-
var id$
|
|
17404
|
+
var id$3 = "6507376925";
|
|
17477
17405
|
var shareId = null;
|
|
17478
17406
|
var shortId = "CLOUDFLARE-MCP-41";
|
|
17479
17407
|
var title$1 = "Error: Tool list_organizations is already registered";
|
|
@@ -17485,7 +17413,7 @@ var status = "unresolved";
|
|
|
17485
17413
|
var statusDetails = {};
|
|
17486
17414
|
var substatus = "ongoing";
|
|
17487
17415
|
var isPublic = false;
|
|
17488
|
-
var platform$
|
|
17416
|
+
var platform$2 = "javascript";
|
|
17489
17417
|
var project = {
|
|
17490
17418
|
"id": "4509062593708032",
|
|
17491
17419
|
"name": "CLOUDFLARE-MCP",
|
|
@@ -17510,7 +17438,7 @@ var metadata$1 = {
|
|
|
17510
17438
|
};
|
|
17511
17439
|
var numComments = 0;
|
|
17512
17440
|
var assignedTo = null;
|
|
17513
|
-
var isBookmarked = false;
|
|
17441
|
+
var isBookmarked$1 = false;
|
|
17514
17442
|
var isSubscribed = false;
|
|
17515
17443
|
var subscriptionDetails = null;
|
|
17516
17444
|
var hasSeen = true;
|
|
@@ -17652,7 +17580,7 @@ var stats = {
|
|
|
17652
17580
|
};
|
|
17653
17581
|
var participants = [];
|
|
17654
17582
|
var issue_default = {
|
|
17655
|
-
id: id$
|
|
17583
|
+
id: id$3,
|
|
17656
17584
|
shareId,
|
|
17657
17585
|
shortId,
|
|
17658
17586
|
title: title$1,
|
|
@@ -17664,13 +17592,13 @@ var issue_default = {
|
|
|
17664
17592
|
statusDetails,
|
|
17665
17593
|
substatus,
|
|
17666
17594
|
isPublic,
|
|
17667
|
-
platform: platform$
|
|
17595
|
+
platform: platform$2,
|
|
17668
17596
|
project,
|
|
17669
17597
|
type: type$1,
|
|
17670
17598
|
metadata: metadata$1,
|
|
17671
17599
|
numComments,
|
|
17672
17600
|
assignedTo,
|
|
17673
|
-
isBookmarked,
|
|
17601
|
+
isBookmarked: isBookmarked$1,
|
|
17674
17602
|
isSubscribed,
|
|
17675
17603
|
subscriptionDetails,
|
|
17676
17604
|
hasSeen,
|
|
@@ -17699,7 +17627,7 @@ var issue_default = {
|
|
|
17699
17627
|
|
|
17700
17628
|
//#endregion
|
|
17701
17629
|
//#region ../mcp-server-mocks/dist/fixtures/event.json
|
|
17702
|
-
var id = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17630
|
+
var id$2 = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17703
17631
|
var groupID = "6507376925";
|
|
17704
17632
|
var eventID = "7ca573c0f4814912aaa9bdc77d1a7d51";
|
|
17705
17633
|
var projectID = "4509062593708032";
|
|
@@ -17968,7 +17896,7 @@ var tags = [
|
|
|
17968
17896
|
"value": "https://mcp.sentry.dev/sse"
|
|
17969
17897
|
}
|
|
17970
17898
|
];
|
|
17971
|
-
var platform = "javascript";
|
|
17899
|
+
var platform$1 = "javascript";
|
|
17972
17900
|
var dateReceived = "2025-04-08T21:15:04.700878Z";
|
|
17973
17901
|
var errors = [{
|
|
17974
17902
|
"type": "js_no_source",
|
|
@@ -18015,7 +17943,7 @@ var _meta = {
|
|
|
18015
17943
|
};
|
|
18016
17944
|
var crashFile = null;
|
|
18017
17945
|
var culprit = "Object.fetch(index)";
|
|
18018
|
-
var dateCreated = "2025-04-08T21:15:04Z";
|
|
17946
|
+
var dateCreated$2 = "2025-04-08T21:15:04Z";
|
|
18019
17947
|
var fingerprints = ["60d1c667b173018c004e399b29dc927d"];
|
|
18020
17948
|
var groupingConfig = {
|
|
18021
17949
|
"enhancements": "KLUv_SAYwQAAkwKRs25ld3N0eWxlOjIwMjMtMDEtMTGQ",
|
|
@@ -18028,7 +17956,7 @@ var resolvedWith = [null];
|
|
|
18028
17956
|
var nextEventID = null;
|
|
18029
17957
|
var previousEventID = "b7ed18493f4f4817a217b03839d4c017";
|
|
18030
17958
|
var event_default = {
|
|
18031
|
-
id,
|
|
17959
|
+
id: id$2,
|
|
18032
17960
|
groupID,
|
|
18033
17961
|
eventID,
|
|
18034
17962
|
projectID,
|
|
@@ -18046,14 +17974,14 @@ var event_default = {
|
|
|
18046
17974
|
type,
|
|
18047
17975
|
metadata,
|
|
18048
17976
|
tags,
|
|
18049
|
-
platform,
|
|
17977
|
+
platform: platform$1,
|
|
18050
17978
|
dateReceived,
|
|
18051
17979
|
errors,
|
|
18052
17980
|
occurrence,
|
|
18053
17981
|
_meta,
|
|
18054
17982
|
crashFile,
|
|
18055
17983
|
culprit,
|
|
18056
|
-
dateCreated,
|
|
17984
|
+
dateCreated: dateCreated$2,
|
|
18057
17985
|
fingerprints,
|
|
18058
17986
|
groupingConfig,
|
|
18059
17987
|
release,
|
|
@@ -18064,6 +17992,19 @@ var event_default = {
|
|
|
18064
17992
|
previousEventID
|
|
18065
17993
|
};
|
|
18066
17994
|
|
|
17995
|
+
//#endregion
|
|
17996
|
+
//#region ../mcp-server-mocks/dist/fixtures/event-attachments.json
|
|
17997
|
+
var event_attachments_default = [{
|
|
17998
|
+
"id": "123",
|
|
17999
|
+
"name": "screenshot.png",
|
|
18000
|
+
"type": "event.attachment",
|
|
18001
|
+
"size": 1024,
|
|
18002
|
+
"mimetype": "image/png",
|
|
18003
|
+
"dateCreated": "2025-04-08T21:15:04.000Z",
|
|
18004
|
+
"sha1": "abc123def456",
|
|
18005
|
+
"headers": { "Content-Type": "image/png" }
|
|
18006
|
+
}];
|
|
18007
|
+
|
|
18067
18008
|
//#endregion
|
|
18068
18009
|
//#region ../mcp-server-mocks/dist/fixtures/tags.json
|
|
18069
18010
|
var tags_default = [
|
|
@@ -18164,8 +18105,173 @@ var tags_default = [
|
|
|
18164
18105
|
}
|
|
18165
18106
|
];
|
|
18166
18107
|
|
|
18108
|
+
//#endregion
|
|
18109
|
+
//#region ../mcp-server-mocks/dist/fixtures/project.json
|
|
18110
|
+
var team = {
|
|
18111
|
+
"id": "4509106733776896",
|
|
18112
|
+
"slug": "the-goats",
|
|
18113
|
+
"name": "the-goats"
|
|
18114
|
+
};
|
|
18115
|
+
var teams = [{
|
|
18116
|
+
"id": "4509106733776896",
|
|
18117
|
+
"slug": "the-goats",
|
|
18118
|
+
"name": "the-goats"
|
|
18119
|
+
}];
|
|
18120
|
+
var id$1 = "4509109104082945";
|
|
18121
|
+
var name$1 = "cloudflare-mcp";
|
|
18122
|
+
var slug$1 = "cloudflare-mcp";
|
|
18123
|
+
var isBookmarked = false;
|
|
18124
|
+
var isMember$1 = true;
|
|
18125
|
+
var access$1 = [
|
|
18126
|
+
"event:admin",
|
|
18127
|
+
"alerts:read",
|
|
18128
|
+
"project:write",
|
|
18129
|
+
"org:integrations",
|
|
18130
|
+
"alerts:write",
|
|
18131
|
+
"member:read",
|
|
18132
|
+
"team:write",
|
|
18133
|
+
"project:read",
|
|
18134
|
+
"event:read",
|
|
18135
|
+
"event:write",
|
|
18136
|
+
"project:admin",
|
|
18137
|
+
"org:read",
|
|
18138
|
+
"team:admin",
|
|
18139
|
+
"project:releases",
|
|
18140
|
+
"team:read"
|
|
18141
|
+
];
|
|
18142
|
+
var hasAccess$1 = true;
|
|
18143
|
+
var dateCreated$1 = "2025-04-06T14:13:37.825970Z";
|
|
18144
|
+
var environments = [];
|
|
18145
|
+
var eventProcessing = { "symbolicationDegraded": false };
|
|
18146
|
+
var features = [
|
|
18147
|
+
"discard-groups",
|
|
18148
|
+
"alert-filters",
|
|
18149
|
+
"similarity-embeddings",
|
|
18150
|
+
"similarity-indexing",
|
|
18151
|
+
"similarity-view"
|
|
18152
|
+
];
|
|
18153
|
+
var firstEvent = null;
|
|
18154
|
+
var firstTransactionEvent = false;
|
|
18155
|
+
var hasSessions = false;
|
|
18156
|
+
var hasProfiles = false;
|
|
18157
|
+
var hasReplays = false;
|
|
18158
|
+
var hasFeedbacks = false;
|
|
18159
|
+
var hasNewFeedbacks = false;
|
|
18160
|
+
var hasMonitors = false;
|
|
18161
|
+
var hasMinifiedStackTrace = false;
|
|
18162
|
+
var hasInsightsHttp = false;
|
|
18163
|
+
var hasInsightsDb = false;
|
|
18164
|
+
var hasInsightsAssets = false;
|
|
18165
|
+
var hasInsightsAppStart = false;
|
|
18166
|
+
var hasInsightsScreenLoad = false;
|
|
18167
|
+
var hasInsightsVitals = false;
|
|
18168
|
+
var hasInsightsCaches = false;
|
|
18169
|
+
var hasInsightsQueues = false;
|
|
18170
|
+
var hasInsightsLlmMonitoring = false;
|
|
18171
|
+
var platform = "node";
|
|
18172
|
+
var platforms = [];
|
|
18173
|
+
var latestRelease = null;
|
|
18174
|
+
var hasUserReports = false;
|
|
18175
|
+
var hasFlags = false;
|
|
18176
|
+
var latestDeploys = null;
|
|
18177
|
+
var project_default = {
|
|
18178
|
+
team,
|
|
18179
|
+
teams,
|
|
18180
|
+
id: id$1,
|
|
18181
|
+
name: name$1,
|
|
18182
|
+
slug: slug$1,
|
|
18183
|
+
isBookmarked,
|
|
18184
|
+
isMember: isMember$1,
|
|
18185
|
+
access: access$1,
|
|
18186
|
+
hasAccess: hasAccess$1,
|
|
18187
|
+
dateCreated: dateCreated$1,
|
|
18188
|
+
environments,
|
|
18189
|
+
eventProcessing,
|
|
18190
|
+
features,
|
|
18191
|
+
firstEvent,
|
|
18192
|
+
firstTransactionEvent,
|
|
18193
|
+
hasSessions,
|
|
18194
|
+
hasProfiles,
|
|
18195
|
+
hasReplays,
|
|
18196
|
+
hasFeedbacks,
|
|
18197
|
+
hasNewFeedbacks,
|
|
18198
|
+
hasMonitors,
|
|
18199
|
+
hasMinifiedStackTrace,
|
|
18200
|
+
hasInsightsHttp,
|
|
18201
|
+
hasInsightsDb,
|
|
18202
|
+
hasInsightsAssets,
|
|
18203
|
+
hasInsightsAppStart,
|
|
18204
|
+
hasInsightsScreenLoad,
|
|
18205
|
+
hasInsightsVitals,
|
|
18206
|
+
hasInsightsCaches,
|
|
18207
|
+
hasInsightsQueues,
|
|
18208
|
+
hasInsightsLlmMonitoring,
|
|
18209
|
+
platform,
|
|
18210
|
+
platforms,
|
|
18211
|
+
latestRelease,
|
|
18212
|
+
hasUserReports,
|
|
18213
|
+
hasFlags,
|
|
18214
|
+
latestDeploys
|
|
18215
|
+
};
|
|
18216
|
+
|
|
18217
|
+
//#endregion
|
|
18218
|
+
//#region ../mcp-server-mocks/dist/fixtures/team.json
|
|
18219
|
+
var id = "4509106740854784";
|
|
18220
|
+
var slug = "the-goats";
|
|
18221
|
+
var name = "the-goats";
|
|
18222
|
+
var dateCreated = "2025-04-06T14:11:23.961739Z";
|
|
18223
|
+
var isMember = true;
|
|
18224
|
+
var teamRole = "admin";
|
|
18225
|
+
var flags = { "idp:provisioned": false };
|
|
18226
|
+
var access = [
|
|
18227
|
+
"team:read",
|
|
18228
|
+
"alerts:read",
|
|
18229
|
+
"event:write",
|
|
18230
|
+
"team:write",
|
|
18231
|
+
"team:admin",
|
|
18232
|
+
"event:read",
|
|
18233
|
+
"org:read",
|
|
18234
|
+
"member:read",
|
|
18235
|
+
"project:admin",
|
|
18236
|
+
"project:write",
|
|
18237
|
+
"org:integrations",
|
|
18238
|
+
"project:releases",
|
|
18239
|
+
"alerts:write",
|
|
18240
|
+
"event:admin",
|
|
18241
|
+
"project:read"
|
|
18242
|
+
];
|
|
18243
|
+
var hasAccess = true;
|
|
18244
|
+
var isPending = false;
|
|
18245
|
+
var memberCount = 1;
|
|
18246
|
+
var avatar = {
|
|
18247
|
+
"avatarType": "letter_avatar",
|
|
18248
|
+
"avatarUuid": null
|
|
18249
|
+
};
|
|
18250
|
+
var externalTeams = [];
|
|
18251
|
+
var projects = [];
|
|
18252
|
+
var team_default = {
|
|
18253
|
+
id,
|
|
18254
|
+
slug,
|
|
18255
|
+
name,
|
|
18256
|
+
dateCreated,
|
|
18257
|
+
isMember,
|
|
18258
|
+
teamRole,
|
|
18259
|
+
flags,
|
|
18260
|
+
access,
|
|
18261
|
+
hasAccess,
|
|
18262
|
+
isPending,
|
|
18263
|
+
memberCount,
|
|
18264
|
+
avatar,
|
|
18265
|
+
externalTeams,
|
|
18266
|
+
projects
|
|
18267
|
+
};
|
|
18268
|
+
|
|
18167
18269
|
//#endregion
|
|
18168
18270
|
//#region ../mcp-server-mocks/dist/index.js
|
|
18271
|
+
/**
|
|
18272
|
+
* Standard organization payload for mock responses.
|
|
18273
|
+
* Used across multiple endpoints for consistency.
|
|
18274
|
+
*/
|
|
18169
18275
|
const OrganizationPayload = {
|
|
18170
18276
|
id: "4509106740723712",
|
|
18171
18277
|
slug: "sentry-mcp-evals",
|
|
@@ -18175,6 +18281,10 @@ const OrganizationPayload = {
|
|
|
18175
18281
|
organizationUrl: "https://sentry.io/sentry-mcp-evals"
|
|
18176
18282
|
}
|
|
18177
18283
|
};
|
|
18284
|
+
/**
|
|
18285
|
+
* Standard release payload for mock responses.
|
|
18286
|
+
* Includes typical metadata and project associations.
|
|
18287
|
+
*/
|
|
18178
18288
|
const ReleasePayload = {
|
|
18179
18289
|
id: 1402755016,
|
|
18180
18290
|
version: "8ce89484-0fec-4913-a2cd-e8e2d41dee36",
|
|
@@ -18415,13 +18525,53 @@ const EventsSpansPayload = {
|
|
|
18415
18525
|
{}
|
|
18416
18526
|
]
|
|
18417
18527
|
};
|
|
18528
|
+
/**
|
|
18529
|
+
* Builds MSW handlers for both SaaS and self-hosted Sentry instances.
|
|
18530
|
+
*
|
|
18531
|
+
* Creates handlers based on the controlOnly flag:
|
|
18532
|
+
* - controlOnly: false (default) - Creates handlers for both sentry.io and us.sentry.io
|
|
18533
|
+
* - controlOnly: true - Creates handlers only for sentry.io (main host)
|
|
18534
|
+
*
|
|
18535
|
+
* @param handlers - Array of handler definitions with method, path, fetch function, and optional controlOnly flag
|
|
18536
|
+
* @returns Array of MSW http handlers
|
|
18537
|
+
*
|
|
18538
|
+
* @example Handler Definitions
|
|
18539
|
+
* ```typescript
|
|
18540
|
+
* buildHandlers([
|
|
18541
|
+
* {
|
|
18542
|
+
* method: "get",
|
|
18543
|
+
* path: "/api/0/auth/",
|
|
18544
|
+
* fetch: () => HttpResponse.json({ user: "data" }),
|
|
18545
|
+
* controlOnly: true // Only available on sentry.io
|
|
18546
|
+
* },
|
|
18547
|
+
* {
|
|
18548
|
+
* method: "get",
|
|
18549
|
+
* path: "/api/0/organizations/",
|
|
18550
|
+
* fetch: () => HttpResponse.json([OrganizationPayload]),
|
|
18551
|
+
* controlOnly: false // Available on both sentry.io and us.sentry.io
|
|
18552
|
+
* }
|
|
18553
|
+
* ]);
|
|
18554
|
+
* ```
|
|
18555
|
+
*/
|
|
18418
18556
|
function buildHandlers(handlers) {
|
|
18419
|
-
|
|
18557
|
+
const result = [];
|
|
18558
|
+
for (const handler of handlers) {
|
|
18559
|
+
result.push(http$1[handler.method](`https://sentry.io${handler.path}`, handler.fetch));
|
|
18560
|
+
if (!handler.controlOnly) result.push(http$1[handler.method](`https://us.sentry.io${handler.path}`, handler.fetch));
|
|
18561
|
+
}
|
|
18562
|
+
return result;
|
|
18420
18563
|
}
|
|
18564
|
+
/**
|
|
18565
|
+
* Complete set of Sentry API mock handlers.
|
|
18566
|
+
*
|
|
18567
|
+
* Covers all endpoints used by the MCP server with realistic responses,
|
|
18568
|
+
* parameter validation, and error scenarios.
|
|
18569
|
+
*/
|
|
18421
18570
|
const restHandlers = buildHandlers([
|
|
18422
18571
|
{
|
|
18423
18572
|
method: "get",
|
|
18424
18573
|
path: "/api/0/auth/",
|
|
18574
|
+
controlOnly: true,
|
|
18425
18575
|
fetch: () => {
|
|
18426
18576
|
return HttpResponse.json({
|
|
18427
18577
|
id: "1",
|
|
@@ -18433,6 +18583,7 @@ const restHandlers = buildHandlers([
|
|
|
18433
18583
|
{
|
|
18434
18584
|
method: "get",
|
|
18435
18585
|
path: "/api/0/users/me/regions/",
|
|
18586
|
+
controlOnly: true,
|
|
18436
18587
|
fetch: () => {
|
|
18437
18588
|
return HttpResponse.json({ regions: [{
|
|
18438
18589
|
name: "us",
|
|
@@ -18458,41 +18609,7 @@ const restHandlers = buildHandlers([
|
|
|
18458
18609
|
method: "get",
|
|
18459
18610
|
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18460
18611
|
fetch: () => {
|
|
18461
|
-
return HttpResponse.json([
|
|
18462
|
-
id: "4509106740854784",
|
|
18463
|
-
slug: "the-goats",
|
|
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
|
-
}]);
|
|
18612
|
+
return HttpResponse.json([team_default]);
|
|
18496
18613
|
}
|
|
18497
18614
|
},
|
|
18498
18615
|
{
|
|
@@ -18500,73 +18617,8 @@ const restHandlers = buildHandlers([
|
|
|
18500
18617
|
path: "/api/0/organizations/sentry-mcp-evals/projects/",
|
|
18501
18618
|
fetch: () => {
|
|
18502
18619
|
return HttpResponse.json([{
|
|
18503
|
-
|
|
18504
|
-
|
|
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
|
|
18620
|
+
...project_default,
|
|
18621
|
+
id: "4509106749636608"
|
|
18570
18622
|
}]);
|
|
18571
18623
|
}
|
|
18572
18624
|
},
|
|
@@ -18575,13 +18627,9 @@ const restHandlers = buildHandlers([
|
|
|
18575
18627
|
path: "/api/0/organizations/sentry-mcp-evals/teams/",
|
|
18576
18628
|
fetch: () => {
|
|
18577
18629
|
return HttpResponse.json({
|
|
18630
|
+
...team_default,
|
|
18578
18631
|
id: "4509109078196224",
|
|
18579
|
-
slug: "the-goats",
|
|
18580
|
-
name: "the-goats",
|
|
18581
18632
|
dateCreated: "2025-04-07T00:05:48.196710Z",
|
|
18582
|
-
isMember: true,
|
|
18583
|
-
teamRole: "admin",
|
|
18584
|
-
flags: { "idp:provisioned": false },
|
|
18585
18633
|
access: [
|
|
18586
18634
|
"event:read",
|
|
18587
18635
|
"org:integrations",
|
|
@@ -18598,81 +18646,33 @@ const restHandlers = buildHandlers([
|
|
|
18598
18646
|
"project:read",
|
|
18599
18647
|
"project:admin",
|
|
18600
18648
|
"alerts:read"
|
|
18601
|
-
]
|
|
18602
|
-
|
|
18603
|
-
isPending: false,
|
|
18604
|
-
memberCount: 1,
|
|
18605
|
-
avatar: {
|
|
18606
|
-
avatarType: "letter_avatar",
|
|
18607
|
-
avatarUuid: null
|
|
18608
|
-
}
|
|
18609
|
-
});
|
|
18649
|
+
]
|
|
18650
|
+
}, { status: 201 });
|
|
18610
18651
|
}
|
|
18611
18652
|
},
|
|
18612
18653
|
{
|
|
18613
18654
|
method: "post",
|
|
18614
18655
|
path: "/api/0/teams/sentry-mcp-evals/the-goats/projects/",
|
|
18615
|
-
fetch: () => {
|
|
18656
|
+
fetch: async ({ request }) => {
|
|
18657
|
+
const body = await request.json();
|
|
18616
18658
|
return HttpResponse.json({
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
platform: "
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
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"
|
|
18659
|
+
...project_default,
|
|
18660
|
+
name: body?.name || "cloudflare-mcp",
|
|
18661
|
+
slug: body?.slug || "cloudflare-mcp",
|
|
18662
|
+
platform: body?.platform || "node"
|
|
18663
|
+
});
|
|
18664
|
+
}
|
|
18665
|
+
},
|
|
18666
|
+
{
|
|
18667
|
+
method: "put",
|
|
18668
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/",
|
|
18669
|
+
fetch: async ({ request }) => {
|
|
18670
|
+
const body = await request.json();
|
|
18671
|
+
return HttpResponse.json({
|
|
18672
|
+
...project_default,
|
|
18673
|
+
slug: body?.slug || "cloudflare-mcp",
|
|
18674
|
+
name: body?.name || "cloudflare-mcp",
|
|
18675
|
+
platform: body?.platform || "node"
|
|
18676
18676
|
});
|
|
18677
18677
|
}
|
|
18678
18678
|
},
|
|
@@ -18883,9 +18883,362 @@ const restHandlers = buildHandlers([
|
|
|
18883
18883
|
method: "post",
|
|
18884
18884
|
path: "/api/0/organizations/sentry-mcp-evals/issues/PEATED-A8/autofix/",
|
|
18885
18885
|
fetch: () => HttpResponse.json({ run_id: 123 })
|
|
18886
|
+
},
|
|
18887
|
+
{
|
|
18888
|
+
method: "get",
|
|
18889
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/autofix/",
|
|
18890
|
+
fetch: () => HttpResponse.json({ autofix: null })
|
|
18891
|
+
},
|
|
18892
|
+
{
|
|
18893
|
+
method: "post",
|
|
18894
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/autofix/",
|
|
18895
|
+
fetch: () => HttpResponse.json({ run_id: 12 })
|
|
18896
|
+
},
|
|
18897
|
+
{
|
|
18898
|
+
method: "get",
|
|
18899
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-45/autofix/",
|
|
18900
|
+
fetch: () => HttpResponse.json({ autofix: {
|
|
18901
|
+
run_id: 13,
|
|
18902
|
+
request: { project_id: 4505138086019073 },
|
|
18903
|
+
status: "COMPLETED",
|
|
18904
|
+
updated_at: "2025-04-09T22:39:50.778146",
|
|
18905
|
+
steps: [{
|
|
18906
|
+
type: "root_cause_analysis",
|
|
18907
|
+
key: "root_cause_analysis",
|
|
18908
|
+
index: 0,
|
|
18909
|
+
status: "COMPLETED",
|
|
18910
|
+
title: "1. **Root Cause Analysis**",
|
|
18911
|
+
output_stream: null,
|
|
18912
|
+
progress: [],
|
|
18913
|
+
description: "The analysis has completed successfully.",
|
|
18914
|
+
causes: [{
|
|
18915
|
+
description: "The analysis has completed successfully.",
|
|
18916
|
+
id: 1,
|
|
18917
|
+
root_cause_reproduction: []
|
|
18918
|
+
}]
|
|
18919
|
+
}]
|
|
18920
|
+
} })
|
|
18921
|
+
},
|
|
18922
|
+
{
|
|
18923
|
+
method: "post",
|
|
18924
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/teams/:teamSlug/",
|
|
18925
|
+
fetch: async ({ request, params }) => {
|
|
18926
|
+
const body = await request.json();
|
|
18927
|
+
const teamSlug = params.teamSlug;
|
|
18928
|
+
return HttpResponse.json({
|
|
18929
|
+
...team_default,
|
|
18930
|
+
id: "4509109078196224",
|
|
18931
|
+
slug: teamSlug,
|
|
18932
|
+
name: teamSlug,
|
|
18933
|
+
dateCreated: "2025-04-07T00:05:48.196710Z"
|
|
18934
|
+
});
|
|
18935
|
+
}
|
|
18936
|
+
},
|
|
18937
|
+
{
|
|
18938
|
+
method: "put",
|
|
18939
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-41/",
|
|
18940
|
+
fetch: async ({ request }) => {
|
|
18941
|
+
const body = await request.json();
|
|
18942
|
+
const updatedIssue = {
|
|
18943
|
+
...issue_default,
|
|
18944
|
+
status: body?.status || issue_default.status,
|
|
18945
|
+
assignedTo: body?.assignedTo || issue_default.assignedTo
|
|
18946
|
+
};
|
|
18947
|
+
return HttpResponse.json(updatedIssue);
|
|
18948
|
+
}
|
|
18949
|
+
},
|
|
18950
|
+
{
|
|
18951
|
+
method: "put",
|
|
18952
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376925/",
|
|
18953
|
+
fetch: async ({ request }) => {
|
|
18954
|
+
const body = await request.json();
|
|
18955
|
+
const updatedIssue = {
|
|
18956
|
+
...issue_default,
|
|
18957
|
+
status: body?.status || issue_default.status,
|
|
18958
|
+
assignedTo: body?.assignedTo || issue_default.assignedTo
|
|
18959
|
+
};
|
|
18960
|
+
return HttpResponse.json(updatedIssue);
|
|
18961
|
+
}
|
|
18962
|
+
},
|
|
18963
|
+
{
|
|
18964
|
+
method: "put",
|
|
18965
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/CLOUDFLARE-MCP-42/",
|
|
18966
|
+
fetch: async ({ request }) => {
|
|
18967
|
+
const body = await request.json();
|
|
18968
|
+
const updatedIssue = {
|
|
18969
|
+
...issueFixture2,
|
|
18970
|
+
status: body?.status || issueFixture2.status,
|
|
18971
|
+
assignedTo: body?.assignedTo || issueFixture2.assignedTo
|
|
18972
|
+
};
|
|
18973
|
+
return HttpResponse.json(updatedIssue);
|
|
18974
|
+
}
|
|
18975
|
+
},
|
|
18976
|
+
{
|
|
18977
|
+
method: "put",
|
|
18978
|
+
path: "/api/0/organizations/sentry-mcp-evals/issues/6507376926/",
|
|
18979
|
+
fetch: async ({ request }) => {
|
|
18980
|
+
const body = await request.json();
|
|
18981
|
+
const updatedIssue = {
|
|
18982
|
+
...issueFixture2,
|
|
18983
|
+
status: body?.status || issueFixture2.status,
|
|
18984
|
+
assignedTo: body?.assignedTo || issueFixture2.assignedTo
|
|
18985
|
+
};
|
|
18986
|
+
return HttpResponse.json(updatedIssue);
|
|
18987
|
+
}
|
|
18988
|
+
},
|
|
18989
|
+
{
|
|
18990
|
+
method: "get",
|
|
18991
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/events/7ca573c0f4814912aaa9bdc77d1a7d51/attachments/",
|
|
18992
|
+
fetch: () => HttpResponse.json(event_attachments_default)
|
|
18993
|
+
},
|
|
18994
|
+
{
|
|
18995
|
+
method: "get",
|
|
18996
|
+
path: "/api/0/projects/sentry-mcp-evals/cloudflare-mcp/events/7ca573c0f4814912aaa9bdc77d1a7d51/attachments/123/",
|
|
18997
|
+
fetch: () => {
|
|
18998
|
+
const mockBlob = new Blob(["fake image data"], { type: "image/png" });
|
|
18999
|
+
return new HttpResponse(mockBlob, { headers: { "Content-Type": "image/png" } });
|
|
19000
|
+
}
|
|
18886
19001
|
}
|
|
18887
19002
|
]);
|
|
18888
|
-
const
|
|
19003
|
+
const searchHandlers = [http$1.post("https://mcp.sentry.dev/api/search", async ({ request }) => {
|
|
19004
|
+
const body = await request.json();
|
|
19005
|
+
let results = [{
|
|
19006
|
+
id: "product/rate-limiting.md",
|
|
19007
|
+
url: "https://docs.sentry.io/product/rate-limiting",
|
|
19008
|
+
snippet: "Learn how to configure rate limiting in Sentry to prevent quota exhaustion and control event ingestion.",
|
|
19009
|
+
relevance: .95
|
|
19010
|
+
}, {
|
|
19011
|
+
id: "product/accounts/quotas/spike-protection.md",
|
|
19012
|
+
url: "https://docs.sentry.io/product/accounts/quotas/spike-protection",
|
|
19013
|
+
snippet: "Spike protection helps prevent unexpected spikes in event volume from consuming your quota.",
|
|
19014
|
+
relevance: .87
|
|
19015
|
+
}];
|
|
19016
|
+
if (body?.guide) {
|
|
19017
|
+
const guide = body.guide;
|
|
19018
|
+
if (guide.includes("/")) {
|
|
19019
|
+
const [platformName, guideName] = guide.split("/");
|
|
19020
|
+
results = [{
|
|
19021
|
+
id: `platforms/${platformName}/guides/${guideName}.md`,
|
|
19022
|
+
url: `https://docs.sentry.io/platforms/${platformName}/guides/${guideName}`,
|
|
19023
|
+
snippet: `Setup guide for ${guideName} on ${platformName}`,
|
|
19024
|
+
relevance: .95
|
|
19025
|
+
}];
|
|
19026
|
+
} else results = [{
|
|
19027
|
+
id: `platforms/${guide}/index.md`,
|
|
19028
|
+
url: `https://docs.sentry.io/platforms/${guide}`,
|
|
19029
|
+
snippet: `Documentation for ${guide} platform`,
|
|
19030
|
+
relevance: .95
|
|
19031
|
+
}];
|
|
19032
|
+
}
|
|
19033
|
+
return HttpResponse.json({
|
|
19034
|
+
query: body?.query || "",
|
|
19035
|
+
results
|
|
19036
|
+
});
|
|
19037
|
+
})];
|
|
19038
|
+
const docsHandlers = [
|
|
19039
|
+
http$1.get("https://docs.sentry.io/product/rate-limiting.md", () => {
|
|
19040
|
+
return new HttpResponse(`# Project Rate Limits and Quotas
|
|
19041
|
+
|
|
19042
|
+
Rate limiting allows you to control the volume of events that Sentry accepts from your applications. This helps you manage costs and ensures that a sudden spike in errors doesn't consume your entire quota.
|
|
19043
|
+
|
|
19044
|
+
## Why Use Rate Limiting?
|
|
19045
|
+
|
|
19046
|
+
- **Cost Control**: Prevent unexpected charges from error spikes
|
|
19047
|
+
- **Noise Reduction**: Filter out repetitive or low-value events
|
|
19048
|
+
- **Resource Management**: Ensure critical projects have quota available
|
|
19049
|
+
- **Performance**: Reduce load on your Sentry organization
|
|
19050
|
+
|
|
19051
|
+
## Types of Rate Limits
|
|
19052
|
+
|
|
19053
|
+
### 1. Organization Rate Limits
|
|
19054
|
+
|
|
19055
|
+
Set a maximum number of events per hour across your entire organization:
|
|
19056
|
+
|
|
19057
|
+
\`\`\`python
|
|
19058
|
+
# In your organization settings
|
|
19059
|
+
rate_limit = 1000 # events per hour
|
|
19060
|
+
\`\`\`
|
|
19061
|
+
|
|
19062
|
+
### 2. Project Rate Limits
|
|
19063
|
+
|
|
19064
|
+
Configure limits for specific projects:
|
|
19065
|
+
|
|
19066
|
+
\`\`\`javascript
|
|
19067
|
+
// Project settings
|
|
19068
|
+
{
|
|
19069
|
+
"rateLimit": {
|
|
19070
|
+
"window": 3600, // 1 hour in seconds
|
|
19071
|
+
"limit": 500 // max events
|
|
19072
|
+
}
|
|
19073
|
+
}
|
|
19074
|
+
\`\`\`
|
|
19075
|
+
|
|
19076
|
+
### 3. Key-Based Rate Limiting
|
|
19077
|
+
|
|
19078
|
+
Rate limit by specific attributes:
|
|
19079
|
+
|
|
19080
|
+
- **By Release**: Limit events from specific releases
|
|
19081
|
+
- **By User**: Prevent single users from consuming quota
|
|
19082
|
+
- **By Transaction**: Control high-volume transactions
|
|
19083
|
+
|
|
19084
|
+
## Configuration Examples
|
|
19085
|
+
|
|
19086
|
+
### SDK Configuration
|
|
19087
|
+
|
|
19088
|
+
Configure client-side sampling to reduce events before they're sent:
|
|
19089
|
+
|
|
19090
|
+
\`\`\`javascript
|
|
19091
|
+
Sentry.init({
|
|
19092
|
+
dsn: "your-dsn",
|
|
19093
|
+
tracesSampleRate: 0.1, // Sample 10% of transactions
|
|
19094
|
+
beforeSend(event) {
|
|
19095
|
+
// Custom filtering logic
|
|
19096
|
+
if (event.exception?.values?.[0]?.value?.includes("NetworkError")) {
|
|
19097
|
+
return null; // Drop network errors
|
|
19098
|
+
}
|
|
19099
|
+
return event;
|
|
19100
|
+
}
|
|
19101
|
+
});
|
|
19102
|
+
\`\`\`
|
|
19103
|
+
|
|
19104
|
+
### Inbound Filters
|
|
19105
|
+
|
|
19106
|
+
Use Sentry's inbound filters to drop events server-side:
|
|
19107
|
+
|
|
19108
|
+
1. Go to **Project Settings** → **Inbound Filters**
|
|
19109
|
+
2. Enable filters for:
|
|
19110
|
+
- Legacy browsers
|
|
19111
|
+
- Web crawlers
|
|
19112
|
+
- Specific error messages
|
|
19113
|
+
- IP addresses
|
|
19114
|
+
|
|
19115
|
+
### Spike Protection
|
|
19116
|
+
|
|
19117
|
+
Enable spike protection to automatically limit events during traffic spikes:
|
|
19118
|
+
|
|
19119
|
+
\`\`\`python
|
|
19120
|
+
# Project settings
|
|
19121
|
+
spike_protection = {
|
|
19122
|
+
"enabled": True,
|
|
19123
|
+
"max_events_per_hour": 10000,
|
|
19124
|
+
"detection_window": 300 # 5 minutes
|
|
19125
|
+
}
|
|
19126
|
+
\`\`\`
|
|
19127
|
+
|
|
19128
|
+
## Best Practices
|
|
19129
|
+
|
|
19130
|
+
1. **Start Conservative**: Begin with lower limits and increase as needed
|
|
19131
|
+
2. **Monitor Usage**: Regularly review your quota consumption
|
|
19132
|
+
3. **Use Sampling**: Implement transaction sampling for high-volume apps
|
|
19133
|
+
4. **Filter Noise**: Drop known low-value events at the SDK level
|
|
19134
|
+
5. **Set Alerts**: Configure notifications for quota thresholds
|
|
19135
|
+
|
|
19136
|
+
## Rate Limit Headers
|
|
19137
|
+
|
|
19138
|
+
Sentry returns rate limit information in response headers:
|
|
19139
|
+
|
|
19140
|
+
\`\`\`
|
|
19141
|
+
X-Sentry-Rate-Limit: 60
|
|
19142
|
+
X-Sentry-Rate-Limit-Remaining: 42
|
|
19143
|
+
X-Sentry-Rate-Limit-Reset: 1634567890
|
|
19144
|
+
\`\`\`
|
|
19145
|
+
|
|
19146
|
+
## Quota Management
|
|
19147
|
+
|
|
19148
|
+
### Viewing Quota Usage
|
|
19149
|
+
|
|
19150
|
+
1. Navigate to **Settings** → **Subscription**
|
|
19151
|
+
2. View usage by:
|
|
19152
|
+
- Project
|
|
19153
|
+
- Event type
|
|
19154
|
+
- Time period
|
|
19155
|
+
|
|
19156
|
+
### On-Demand Budgets
|
|
19157
|
+
|
|
19158
|
+
Purchase additional events when approaching limits:
|
|
19159
|
+
|
|
19160
|
+
\`\`\`bash
|
|
19161
|
+
# Via API
|
|
19162
|
+
curl -X POST https://sentry.io/api/0/organizations/{org}/quotas/ \\
|
|
19163
|
+
-H 'Authorization: Bearer <token>' \\
|
|
19164
|
+
-d '{"events": 100000}'
|
|
19165
|
+
\`\`\`
|
|
19166
|
+
|
|
19167
|
+
## Troubleshooting
|
|
19168
|
+
|
|
19169
|
+
### Events Being Dropped?
|
|
19170
|
+
|
|
19171
|
+
Check:
|
|
19172
|
+
1. Organization and project rate limits
|
|
19173
|
+
2. Spike protection status
|
|
19174
|
+
3. SDK sampling configuration
|
|
19175
|
+
4. Inbound filter settings
|
|
19176
|
+
|
|
19177
|
+
### Rate Limit Errors
|
|
19178
|
+
|
|
19179
|
+
If you see 429 errors:
|
|
19180
|
+
- Review your rate limit configuration
|
|
19181
|
+
- Implement exponential backoff
|
|
19182
|
+
- Consider event buffering
|
|
19183
|
+
|
|
19184
|
+
## Related Documentation
|
|
19185
|
+
|
|
19186
|
+
- [SDK Configuration Guide](/platforms/javascript/configuration)
|
|
19187
|
+
- [Quotas and Billing](/product/quotas)
|
|
19188
|
+
- [Filtering Events](/product/data-management/filtering)`, { headers: { "Content-Type": "text/markdown" } });
|
|
19189
|
+
}),
|
|
19190
|
+
http$1.get("https://docs.sentry.io/product/accounts/quotas/spike-protection.md", () => {
|
|
19191
|
+
return new HttpResponse(`# Spike Protection
|
|
19192
|
+
|
|
19193
|
+
Spike protection prevents sudden spikes in event volume from consuming your entire quota.
|
|
19194
|
+
|
|
19195
|
+
## How it works
|
|
19196
|
+
|
|
19197
|
+
When Sentry detects an abnormal spike in events, it automatically activates spike protection...`, { headers: { "Content-Type": "text/markdown" } });
|
|
19198
|
+
}),
|
|
19199
|
+
http$1.get("https://docs.sentry.io/*.md", () => {
|
|
19200
|
+
return new HttpResponse(null, { status: 404 });
|
|
19201
|
+
})
|
|
19202
|
+
];
|
|
19203
|
+
/**
|
|
19204
|
+
* Configured MSW server instance with all Sentry API mock handlers.
|
|
19205
|
+
*
|
|
19206
|
+
* Ready-to-use mock server for testing and development. Includes all endpoints
|
|
19207
|
+
* with realistic data, parameter validation, and error scenarios.
|
|
19208
|
+
*
|
|
19209
|
+
* @example Test Setup
|
|
19210
|
+
* ```typescript
|
|
19211
|
+
* import { mswServer } from "@sentry/mcp-server-mocks";
|
|
19212
|
+
*
|
|
19213
|
+
* beforeAll(() => mswServer.listen({ onUnhandledRequest: 'error' }));
|
|
19214
|
+
* afterEach(() => mswServer.resetHandlers());
|
|
19215
|
+
* afterAll(() => mswServer.close());
|
|
19216
|
+
* ```
|
|
19217
|
+
*
|
|
19218
|
+
* @example Development Usage
|
|
19219
|
+
* ```typescript
|
|
19220
|
+
* import { mswServer } from "@sentry/mcp-server-mocks";
|
|
19221
|
+
*
|
|
19222
|
+
* // Start intercepting requests
|
|
19223
|
+
* mswServer.listen();
|
|
19224
|
+
*
|
|
19225
|
+
* // Your MCP server will now use mock responses
|
|
19226
|
+
* const apiService = new SentryApiService({ host: "sentry.io" });
|
|
19227
|
+
* const orgs = await apiService.listOrganizations();
|
|
19228
|
+
* console.log(orgs); // Returns mock organization data
|
|
19229
|
+
* ```
|
|
19230
|
+
*
|
|
19231
|
+
* @note User Data Endpoint Restrictions
|
|
19232
|
+
* The following endpoints are configured with `controlOnly: true` to work ONLY
|
|
19233
|
+
* with the main host (sentry.io) and will NOT respond to requests from
|
|
19234
|
+
* region-specific hosts (us.sentry.io, de.sentry.io):
|
|
19235
|
+
* - `/api/0/auth/` (whoami endpoint)
|
|
19236
|
+
* - `/api/0/users/me/regions/` (find_organizations endpoint)
|
|
19237
|
+
*
|
|
19238
|
+
* This matches the real Sentry API behavior where user data must always be queried
|
|
19239
|
+
* from the main API server.
|
|
19240
|
+
*/
|
|
19241
|
+
const mswServer = setupServer(...restHandlers, ...searchHandlers, ...docsHandlers);
|
|
18889
19242
|
|
|
18890
19243
|
//#endregion
|
|
18891
19244
|
//#region src/test-setup.ts
|