@sentry/mcp-server 0.12.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 +9 -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 +8 -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-B7vZ6JMk.cjs → client-BNTsOycD.cjs} +55 -7
- package/dist/client-BNTsOycD.cjs.map +1 -0
- package/dist/{client-CAoHZbyK.js → client-BbamPqV4.js} +55 -7
- package/dist/client-BbamPqV4.js.map +1 -0
- package/dist/{client-DkY0ifZf.d.cts → client-Dae1ZwWb.d.cts} +38 -4
- package/dist/client-Dae1ZwWb.d.cts.map +1 -0
- package/dist/{client-4jq_wVgn.d.ts → client-qyEu8fvj.d.ts} +40 -6
- 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 -25
- package/dist/internal/formatting.d.ts +6 -26
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +1 -1
- package/dist/internal/issue-helpers.d.cts +2 -52
- package/dist/internal/issue-helpers.d.ts +2 -52
- 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-BMVLc3mR.js → issue-helpers-CqqYnwYE.js} +1 -1
- package/dist/{issue-helpers-BMVLc3mR.js.map → issue-helpers-CqqYnwYE.js.map} +1 -1
- package/dist/issue-helpers-Cz01Ipvl.d.cts +52 -0
- package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -0
- package/dist/{issue-helpers-D712fGT2.cjs → issue-helpers-DyAIO0w6.cjs} +1 -1
- package/dist/{issue-helpers-D712fGT2.cjs.map → issue-helpers-DyAIO0w6.cjs.map} +1 -1
- 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-CXLD0FFB.js.map → logging-LnQMFw-_.js.map} +1 -1
- package/dist/{logging-ByvSjT6V.cjs → logging-oIouXrcb.cjs} +1 -1
- package/dist/{logging-ByvSjT6V.cjs.map → logging-oIouXrcb.cjs.map} +1 -1
- package/dist/logging.cjs +1 -1
- package/dist/logging.js +1 -1
- package/dist/{promptDefinitions-D5FSQckL.d.ts → promptDefinitions-6xelipaz.d.ts} +3 -3
- package/dist/promptDefinitions-6xelipaz.d.ts.map +1 -0
- package/dist/{promptDefinitions-BTLIBcGt.cjs → promptDefinitions-C29BWGYg.cjs} +4 -4
- package/dist/promptDefinitions-C29BWGYg.cjs.map +1 -0
- package/dist/{promptDefinitions-D8yow1m0.js → promptDefinitions-CSKE8T0a.js} +4 -4
- package/dist/{promptDefinitions-D8yow1m0.js.map → promptDefinitions-CSKE8T0a.js.map} +1 -1
- package/dist/{promptDefinitions-CF2VWdQ6.d.cts → promptDefinitions-CVHtYaj8.d.cts} +3 -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-Dt3A8Qfl.js → prompts-C8Y9w5c4.js} +7 -7
- package/dist/{prompts-Dt3A8Qfl.js.map → prompts-C8Y9w5c4.js.map} +1 -1
- package/dist/{prompts-CDbQrutV.cjs → prompts-Df3i1XSB.cjs} +7 -7
- package/dist/{prompts-CDbQrutV.cjs.map → prompts-Df3i1XSB.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +4 -5
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +4 -5
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -2
- 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 +26 -12
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +26 -12
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +4 -2
- package/dist/{schema-BnxGHL_i.d.ts → schema-B5BpplNK.d.ts} +3632 -573
- package/dist/schema-B5BpplNK.d.ts.map +1 -0
- package/dist/{schema-BsvGMALe.cjs → schema-B_cMyyJJ.cjs} +94 -8
- package/dist/schema-B_cMyyJJ.cjs.map +1 -0
- package/dist/{schema-BTfISwFu.cjs → schema-BpJVmev8.cjs} +23 -1
- package/dist/{schema-Dv6aLZgz.js.map → schema-BpJVmev8.cjs.map} +1 -1
- package/dist/{schema-BJv7kREf.d.cts → schema-Dt-HKnd_.d.cts} +3567 -508
- package/dist/schema-Dt-HKnd_.d.cts.map +1 -0
- package/dist/{schema-Dv6aLZgz.js → schema-DtsnsxMl.js} +6 -2
- package/dist/schema-DtsnsxMl.js.map +1 -0
- package/dist/{schema-C_hp0BR7.js → schema-WDk5Yqww.js} +53 -9
- package/dist/schema-WDk5Yqww.js.map +1 -0
- package/dist/schema.cjs +5 -1
- package/dist/schema.d.cts +4 -1
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +4 -1
- 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-DeutbO8v.cjs → server-CHG27fcn.cjs} +104 -57
- package/dist/server-CHG27fcn.cjs.map +1 -0
- package/dist/{server-C7cHq_pc.js → server-DeuBftc5.js} +104 -57
- package/dist/server-DeuBftc5.js.map +1 -0
- package/dist/server.cjs +40 -13
- package/dist/server.d.cts +2 -3
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +2 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +42 -15
- package/dist/{stdio-B73CCTly.cjs → stdio-BtVdTwx-.cjs} +17 -7
- package/dist/stdio-BtVdTwx-.cjs.map +1 -0
- package/dist/{stdio-ZQLC-i5Q.js → stdio-DIuLW5EE.js} +17 -7
- package/dist/stdio-DIuLW5EE.js.map +1 -0
- package/dist/test-setup.cjs +1420 -1230
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1262 -1045
- 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 +2 -3
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +2 -3
- 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-Daq2fm0E.d.ts → types-Br0saqtE.d.ts} +5 -3
- package/dist/types-Br0saqtE.d.ts.map +1 -0
- package/dist/{types-NIQW7KyF.d.cts → types-C3pRFQyA.d.cts} +5 -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-BNmubeQI.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-4jq_wVgn.d.ts.map +0 -1
- package/dist/client-B7vZ6JMk.cjs.map +0 -1
- package/dist/client-CAoHZbyK.js.map +0 -1
- package/dist/client-DkY0ifZf.d.cts.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/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-BTLIBcGt.cjs.map +0 -1
- package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +0 -1
- package/dist/promptDefinitions-D5FSQckL.d.ts.map +0 -1
- package/dist/resources-Bol20Xuo.js +0 -38
- package/dist/resources-Bol20Xuo.js.map +0 -1
- package/dist/resources-DNyoutxH.cjs +0 -44
- package/dist/resources-DNyoutxH.cjs.map +0 -1
- package/dist/schema-BJv7kREf.d.cts.map +0 -1
- package/dist/schema-BTfISwFu.cjs.map +0 -1
- package/dist/schema-BnxGHL_i.d.ts.map +0 -1
- package/dist/schema-BsvGMALe.cjs.map +0 -1
- package/dist/schema-C_hp0BR7.js.map +0 -1
- package/dist/server-C7cHq_pc.js.map +0 -1
- package/dist/server-DeutbO8v.cjs.map +0 -1
- package/dist/stdio-B73CCTly.cjs.map +0 -1
- package/dist/stdio-ZQLC-i5Q.js.map +0 -1
- package/dist/toolDefinitions-BOMF-zIC.d.ts +0 -394
- package/dist/toolDefinitions-BOMF-zIC.d.ts.map +0 -1
- package/dist/toolDefinitions-CUegGcWU.cjs +0 -547
- package/dist/toolDefinitions-CUegGcWU.cjs.map +0 -1
- package/dist/toolDefinitions-DFAxp3nr.js +0 -541
- package/dist/toolDefinitions-DFAxp3nr.js.map +0 -1
- package/dist/toolDefinitions-Ipvr4Acw.d.cts +0 -394
- package/dist/toolDefinitions-Ipvr4Acw.d.cts.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-DpiQwSTY.js +0 -596
- package/dist/tools-DpiQwSTY.js.map +0 -1
- package/dist/tools-DyOqlsCW.cjs +0 -602
- package/dist/tools-DyOqlsCW.cjs.map +0 -1
- package/dist/tools.cjs +0 -11
- package/dist/tools.d.cts +0 -335
- package/dist/tools.d.cts.map +0 -1
- package/dist/tools.d.ts +0 -335
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -11
- package/dist/tools.test.cjs +0 -1298
- 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 -1298
- package/dist/tools.test.js.map +0 -1
- package/dist/types-D5TPcOfv.d.ts +0 -39
- package/dist/types-D5TPcOfv.d.ts.map +0 -1
- package/dist/types-DRF2IoP_.d.cts +0 -39
- package/dist/types-DRF2IoP_.d.cts.map +0 -1
- package/dist/types-Daq2fm0E.d.ts.map +0 -1
- package/dist/types-NIQW7KyF.d.cts.map +0 -1
- package/dist/version-BNmubeQI.cjs.map +0 -1
- package/dist/version-CRto5Sn_.js +0 -6
- package/dist/version-CRto5Sn_.js.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);
|
|
@@ -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],
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -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$2 = "";
|
|
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$2 += str[j++];
|
|
15144
|
-
continue;
|
|
15145
|
-
}
|
|
15146
|
-
break;
|
|
15147
|
-
}
|
|
15148
|
-
if (!name$2) throw new TypeError("Missing parameter name at ".concat(i));
|
|
15149
|
-
tokens.push({
|
|
15150
|
-
type: "NAME",
|
|
15151
|
-
index: i,
|
|
15152
|
-
value: name$2
|
|
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$2 = tryConsume("NAME");
|
|
15245
|
-
var pattern = tryConsume("PATTERN");
|
|
15246
|
-
if (name$2 || 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$2 || 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$1(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$1(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$1(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$1(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: {
|
|
@@ -15902,741 +15356,1212 @@ var WebSocketClientConnection = class {
|
|
|
15902
15356
|
* Removes the listener for the given event.
|
|
15903
15357
|
*/
|
|
15904
15358
|
removeEventListener(event, listener, options) {
|
|
15905
|
-
this[kEmitter].removeEventListener(event, Reflect.get(listener, kBoundListener), options);
|
|
15359
|
+
this[kEmitter].removeEventListener(event, Reflect.get(listener, kBoundListener), options);
|
|
15360
|
+
}
|
|
15361
|
+
/**
|
|
15362
|
+
* Send data to the connected client.
|
|
15363
|
+
*/
|
|
15364
|
+
send(data) {
|
|
15365
|
+
this.transport.send(data);
|
|
15366
|
+
}
|
|
15367
|
+
/**
|
|
15368
|
+
* Close the WebSocket connection.
|
|
15369
|
+
* @param {number} code A status code (see https://www.rfc-editor.org/rfc/rfc6455#section-7.4.1).
|
|
15370
|
+
* @param {string} reason A custom connection close reason.
|
|
15371
|
+
*/
|
|
15372
|
+
close(code, reason) {
|
|
15373
|
+
this.transport.close(code, reason);
|
|
15374
|
+
}
|
|
15375
|
+
};
|
|
15376
|
+
var WEBSOCKET_CLOSE_CODE_RANGE_ERROR = "InvalidAccessError: close code out of user configurable range";
|
|
15377
|
+
var kPassthroughPromise = Symbol("kPassthroughPromise");
|
|
15378
|
+
var kOnSend = Symbol("kOnSend");
|
|
15379
|
+
var kClose = Symbol("kClose");
|
|
15380
|
+
var WebSocketOverride = class extends EventTarget {
|
|
15381
|
+
constructor(url$1, protocols) {
|
|
15382
|
+
super();
|
|
15383
|
+
this.CONNECTING = 0;
|
|
15384
|
+
this.OPEN = 1;
|
|
15385
|
+
this.CLOSING = 2;
|
|
15386
|
+
this.CLOSED = 3;
|
|
15387
|
+
this._onopen = null;
|
|
15388
|
+
this._onmessage = null;
|
|
15389
|
+
this._onerror = null;
|
|
15390
|
+
this._onclose = null;
|
|
15391
|
+
this.url = url$1.toString();
|
|
15392
|
+
this.protocol = "";
|
|
15393
|
+
this.extensions = "";
|
|
15394
|
+
this.binaryType = "blob";
|
|
15395
|
+
this.readyState = this.CONNECTING;
|
|
15396
|
+
this.bufferedAmount = 0;
|
|
15397
|
+
this[kPassthroughPromise] = new DeferredPromise();
|
|
15398
|
+
queueMicrotask(async () => {
|
|
15399
|
+
if (await this[kPassthroughPromise]) return;
|
|
15400
|
+
this.protocol = typeof protocols === "string" ? protocols : Array.isArray(protocols) && protocols.length > 0 ? protocols[0] : "";
|
|
15401
|
+
if (this.readyState === this.CONNECTING) {
|
|
15402
|
+
this.readyState = this.OPEN;
|
|
15403
|
+
this.dispatchEvent(bindEvent(this, new Event("open")));
|
|
15404
|
+
}
|
|
15405
|
+
});
|
|
15406
|
+
}
|
|
15407
|
+
set onopen(listener) {
|
|
15408
|
+
this.removeEventListener("open", this._onopen);
|
|
15409
|
+
this._onopen = listener;
|
|
15410
|
+
if (listener !== null) this.addEventListener("open", listener);
|
|
15411
|
+
}
|
|
15412
|
+
get onopen() {
|
|
15413
|
+
return this._onopen;
|
|
15414
|
+
}
|
|
15415
|
+
set onmessage(listener) {
|
|
15416
|
+
this.removeEventListener("message", this._onmessage);
|
|
15417
|
+
this._onmessage = listener;
|
|
15418
|
+
if (listener !== null) this.addEventListener("message", listener);
|
|
15419
|
+
}
|
|
15420
|
+
get onmessage() {
|
|
15421
|
+
return this._onmessage;
|
|
15422
|
+
}
|
|
15423
|
+
set onerror(listener) {
|
|
15424
|
+
this.removeEventListener("error", this._onerror);
|
|
15425
|
+
this._onerror = listener;
|
|
15426
|
+
if (listener !== null) this.addEventListener("error", listener);
|
|
15427
|
+
}
|
|
15428
|
+
get onerror() {
|
|
15429
|
+
return this._onerror;
|
|
15430
|
+
}
|
|
15431
|
+
set onclose(listener) {
|
|
15432
|
+
this.removeEventListener("close", this._onclose);
|
|
15433
|
+
this._onclose = listener;
|
|
15434
|
+
if (listener !== null) this.addEventListener("close", listener);
|
|
15435
|
+
}
|
|
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);
|
|
15906
15566
|
}
|
|
15907
15567
|
/**
|
|
15908
|
-
* Send data to the
|
|
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'))
|
|
15909
15573
|
*/
|
|
15910
15574
|
send(data) {
|
|
15911
|
-
this
|
|
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);
|
|
15912
15588
|
}
|
|
15913
15589
|
/**
|
|
15914
|
-
* Close the
|
|
15915
|
-
* @param {number} code A status code (see https://www.rfc-editor.org/rfc/rfc6455#section-7.4.1).
|
|
15916
|
-
* @param {string} reason A custom connection close reason.
|
|
15590
|
+
* Close the actual server connection.
|
|
15917
15591
|
*/
|
|
15918
|
-
close(
|
|
15919
|
-
this
|
|
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);
|
|
15920
15638
|
}
|
|
15921
15639
|
};
|
|
15922
|
-
var
|
|
15923
|
-
|
|
15924
|
-
var kOnSend = Symbol("kOnSend");
|
|
15925
|
-
var kClose = Symbol("kClose");
|
|
15926
|
-
var WebSocketOverride = class extends EventTarget {
|
|
15927
|
-
constructor(url$1, protocols) {
|
|
15640
|
+
var WebSocketClassTransport = class extends EventTarget {
|
|
15641
|
+
constructor(socket) {
|
|
15928
15642
|
super();
|
|
15929
|
-
this.
|
|
15930
|
-
this.
|
|
15931
|
-
|
|
15932
|
-
this.CLOSED = 3;
|
|
15933
|
-
this._onopen = null;
|
|
15934
|
-
this._onmessage = null;
|
|
15935
|
-
this._onerror = null;
|
|
15936
|
-
this._onclose = null;
|
|
15937
|
-
this.url = url$1.toString();
|
|
15938
|
-
this.protocol = "";
|
|
15939
|
-
this.extensions = "";
|
|
15940
|
-
this.binaryType = "blob";
|
|
15941
|
-
this.readyState = this.CONNECTING;
|
|
15942
|
-
this.bufferedAmount = 0;
|
|
15943
|
-
this[kPassthroughPromise] = new DeferredPromise();
|
|
15944
|
-
queueMicrotask(async () => {
|
|
15945
|
-
if (await this[kPassthroughPromise]) return;
|
|
15946
|
-
this.protocol = typeof protocols === "string" ? protocols : Array.isArray(protocols) && protocols.length > 0 ? protocols[0] : "";
|
|
15947
|
-
if (this.readyState === this.CONNECTING) {
|
|
15948
|
-
this.readyState = this.OPEN;
|
|
15949
|
-
this.dispatchEvent(bindEvent(this, new Event("open")));
|
|
15950
|
-
}
|
|
15643
|
+
this.socket = socket;
|
|
15644
|
+
this.socket.addEventListener("close", (event) => {
|
|
15645
|
+
this.dispatchEvent(bindEvent(this.socket, new CloseEvent("close", event)));
|
|
15951
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
|
+
};
|
|
15952
15654
|
}
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
this._onopen = listener;
|
|
15956
|
-
if (listener !== null) this.addEventListener("open", listener);
|
|
15655
|
+
addEventListener(type$2, callback, options) {
|
|
15656
|
+
return super.addEventListener(type$2, callback, options);
|
|
15957
15657
|
}
|
|
15958
|
-
|
|
15959
|
-
return
|
|
15658
|
+
dispatchEvent(event) {
|
|
15659
|
+
return super.dispatchEvent(event);
|
|
15960
15660
|
}
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15661
|
+
send(data) {
|
|
15662
|
+
queueMicrotask(() => {
|
|
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();
|
|
15685
|
+
});
|
|
15965
15686
|
}
|
|
15966
|
-
|
|
15967
|
-
|
|
15687
|
+
close(code, reason) {
|
|
15688
|
+
this.socket[kClose](code, reason);
|
|
15968
15689
|
}
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15972
|
-
|
|
15690
|
+
};
|
|
15691
|
+
var _WebSocketInterceptor = class extends Interceptor {
|
|
15692
|
+
constructor() {
|
|
15693
|
+
super(_WebSocketInterceptor.symbol);
|
|
15973
15694
|
}
|
|
15974
|
-
|
|
15975
|
-
return
|
|
15695
|
+
checkEnvironment() {
|
|
15696
|
+
return hasConfigurableGlobal("WebSocket");
|
|
15976
15697
|
}
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
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
|
+
});
|
|
15981
15741
|
}
|
|
15982
|
-
|
|
15983
|
-
|
|
15742
|
+
};
|
|
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
|
+
};
|
|
15756
|
+
}
|
|
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
|
|
15780
|
+
});
|
|
15781
|
+
connection.client.socket.dispatchEvent(errorEvent);
|
|
15782
|
+
});
|
|
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 = {};
|
|
15984
15801
|
}
|
|
15985
15802
|
/**
|
|
15986
|
-
*
|
|
15803
|
+
* Subscribe to all requests that are using the interceptor object
|
|
15987
15804
|
*/
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
this.
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
(
|
|
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;
|
|
15999
15817
|
});
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
this._onclose = null;
|
|
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: () => {}
|
|
16020
15837
|
});
|
|
16021
15838
|
}
|
|
16022
|
-
|
|
16023
|
-
|
|
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");
|
|
16024
15847
|
}
|
|
16025
|
-
|
|
16026
|
-
|
|
15848
|
+
close() {
|
|
15849
|
+
this.dispose();
|
|
16027
15850
|
}
|
|
16028
15851
|
};
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
}
|
|
16038
|
-
var kEmitter2 = Symbol("kEmitter");
|
|
16039
|
-
var kBoundListener2 = Symbol("kBoundListener");
|
|
16040
|
-
var kSend = Symbol("kSend");
|
|
16041
|
-
var WebSocketServerConnection = class {
|
|
16042
|
-
constructor(client, transport, createConnection) {
|
|
16043
|
-
this.client = client;
|
|
16044
|
-
this.transport = transport;
|
|
16045
|
-
this.createConnection = createConnection;
|
|
16046
|
-
this[kEmitter2] = new EventTarget();
|
|
16047
|
-
this.mockCloseController = new AbortController();
|
|
16048
|
-
this.realCloseController = new AbortController();
|
|
16049
|
-
this.transport.addEventListener("outgoing", (event) => {
|
|
16050
|
-
if (typeof this.realWebSocket === "undefined") return;
|
|
16051
|
-
queueMicrotask(() => {
|
|
16052
|
-
if (!event.defaultPrevented) this[kSend](event.data);
|
|
16053
|
-
});
|
|
16054
|
-
});
|
|
16055
|
-
this.transport.addEventListener("incoming", this.handleIncomingMessage.bind(this));
|
|
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
|
+
};
|
|
16056
15860
|
}
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
* Accessing this before calling `server.connect()` will throw.
|
|
16060
|
-
*/
|
|
16061
|
-
get socket() {
|
|
16062
|
-
invariant(this.realWebSocket, "Cannot access \"socket\" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?");
|
|
16063
|
-
return this.realWebSocket;
|
|
15861
|
+
get context() {
|
|
15862
|
+
return store.getStore() || this.rootContext;
|
|
16064
15863
|
}
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
*/
|
|
16068
|
-
connect() {
|
|
16069
|
-
invariant(!this.realWebSocket || this.realWebSocket.readyState !== WebSocket.OPEN, "Failed to call \"connect()\" on the original WebSocket instance: the connection already open");
|
|
16070
|
-
const realWebSocket = this.createConnection();
|
|
16071
|
-
realWebSocket.binaryType = this.client.binaryType;
|
|
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;
|
|
15864
|
+
prepend(runtimeHandlers) {
|
|
15865
|
+
this.context.handlers.unshift(...runtimeHandlers);
|
|
16093
15866
|
}
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
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);
|
|
15867
|
+
reset(nextHandlers) {
|
|
15868
|
+
const context$1 = this.context;
|
|
15869
|
+
context$1.handlers = [];
|
|
15870
|
+
context$1.initialHandlers = nextHandlers.length > 0 ? nextHandlers : context$1.initialHandlers;
|
|
16106
15871
|
}
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
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);
|
|
15885
|
+
}
|
|
15886
|
+
boundary(callback) {
|
|
15887
|
+
return (...args) => {
|
|
15888
|
+
return store.run({
|
|
15889
|
+
initialHandlers: this.handlersController.currentHandlers(),
|
|
15890
|
+
handlers: []
|
|
15891
|
+
}, callback, ...args);
|
|
15892
|
+
};
|
|
15893
|
+
}
|
|
15894
|
+
close() {
|
|
15895
|
+
super.close();
|
|
15896
|
+
store.disable();
|
|
16112
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;
|
|
16113
15932
|
/**
|
|
16114
|
-
*
|
|
16115
|
-
*
|
|
16116
|
-
* server.send('hello')
|
|
16117
|
-
* server.send(new Blob(['hello']))
|
|
16118
|
-
* server.send(new TextEncoder().encode('hello'))
|
|
15933
|
+
* Indicates whether this request handler has been used
|
|
15934
|
+
* (its resolver has successfully executed).
|
|
16119
15935
|
*/
|
|
16120
|
-
|
|
16121
|
-
|
|
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";
|
|
16122
15951
|
}
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
realWebSocket.send(data);
|
|
16130
|
-
}, { once: true });
|
|
16131
|
-
return;
|
|
16132
|
-
}
|
|
16133
|
-
realWebSocket.send(data);
|
|
15952
|
+
/**
|
|
15953
|
+
* Parse the intercepted request to extract additional information from it.
|
|
15954
|
+
* Parsed result is then exposed to other methods of this request handler.
|
|
15955
|
+
*/
|
|
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
|
-
* mocked message events like the one below
|
|
16218
|
-
* (must be dispatched on the client instance).
|
|
16219
|
-
*/
|
|
16220
|
-
this.socket,
|
|
16221
|
-
new MessageEvent("message", {
|
|
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
|
|
16231
15997
|
});
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
};
|
|
16237
|
-
var _WebSocketInterceptor = class extends Interceptor {
|
|
16238
|
-
constructor() {
|
|
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
|
|
15998
|
+
const shouldInterceptRequest = this.predicate({
|
|
15999
|
+
request: args.request,
|
|
16000
|
+
parsedResult,
|
|
16001
|
+
resolutionContext: args.resolutionContext
|
|
16283
16002
|
});
|
|
16284
|
-
|
|
16285
|
-
|
|
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
|
|
16010
|
+
});
|
|
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
|
+
}
|
|
16062
|
+
|
|
16063
|
+
//#endregion
|
|
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
|
+
}
|
|
16295
16079
|
|
|
16296
16080
|
//#endregion
|
|
16297
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16298
|
-
function
|
|
16299
|
-
|
|
16300
|
-
|
|
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
|
-
resolvedOptions;
|
|
16344
|
-
constructor(interceptors, handlers) {
|
|
16345
|
-
super(...handlers);
|
|
16346
|
-
this.interceptor = new BatchInterceptor({
|
|
16347
|
-
name: "setup-server",
|
|
16348
|
-
interceptors
|
|
16349
|
-
});
|
|
16350
|
-
this.resolvedOptions = {};
|
|
16351
|
-
}
|
|
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;
|
|
16352
16114
|
/**
|
|
16353
|
-
*
|
|
16115
|
+
* Tokenize input string.
|
|
16354
16116
|
*/
|
|
16355
|
-
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
|
|
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;
|
|
16363
16164
|
}
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
|
|
16371
|
-
|
|
16372
|
-
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
|
|
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++]
|
|
16376
16210
|
});
|
|
16211
|
+
}
|
|
16212
|
+
tokens.push({
|
|
16213
|
+
type: "END",
|
|
16214
|
+
index: i,
|
|
16215
|
+
value: ""
|
|
16377
16216
|
});
|
|
16378
|
-
|
|
16379
|
-
getUnhandledRequestStrategy: () => {
|
|
16380
|
-
return this.resolvedOptions.onUnhandledRequest;
|
|
16381
|
-
},
|
|
16382
|
-
getHandlers: () => {
|
|
16383
|
-
return this.handlersController.currentHandlers();
|
|
16384
|
-
},
|
|
16385
|
-
onMockedConnection: () => {},
|
|
16386
|
-
onPassthroughConnection: () => {}
|
|
16387
|
-
});
|
|
16217
|
+
return tokens;
|
|
16388
16218
|
}
|
|
16389
|
-
|
|
16390
|
-
|
|
16391
|
-
|
|
16392
|
-
|
|
16393
|
-
|
|
16394
|
-
|
|
16395
|
-
|
|
16396
|
-
|
|
16219
|
+
/**
|
|
16220
|
+
* Parse a string for the raw tokens.
|
|
16221
|
+
*/
|
|
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 = "";
|
|
16268
|
+
}
|
|
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
|
});
|
|
16447
|
+
return new RegExp("(?:".concat(parts.join("|"), ")"), flags$1(options));
|
|
16510
16448
|
}
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
if (typeof existingClone !== "undefined") return existingClone;
|
|
16517
|
-
const clonedRequest = request.clone();
|
|
16518
|
-
RequestHandler.cache.set(request, clonedRequest);
|
|
16519
|
-
return clonedRequest;
|
|
16449
|
+
/**
|
|
16450
|
+
* Create a path regexp from string input.
|
|
16451
|
+
*/
|
|
16452
|
+
function stringToRegexp(path, keys, options) {
|
|
16453
|
+
return tokensToRegexp(parse(path, options), keys, options);
|
|
16520
16454
|
}
|
|
16521
16455
|
/**
|
|
16522
|
-
*
|
|
16523
|
-
* using the given resolver function.
|
|
16456
|
+
* Expose a function for taking tokens and returning a RegExp.
|
|
16524
16457
|
*/
|
|
16525
|
-
|
|
16526
|
-
if (
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
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;
|
|
16561
|
-
}
|
|
16562
|
-
wrapResolver(resolver) {
|
|
16563
|
-
return async (info) => {
|
|
16564
|
-
if (!this.resolverIterator) {
|
|
16565
|
-
const result = await resolver(info);
|
|
16566
|
-
if (!isIterable(result)) return result;
|
|
16567
|
-
this.resolverIterator = Symbol.iterator in result ? result[Symbol.iterator]() : result[Symbol.asyncIterator]();
|
|
16568
|
-
}
|
|
16569
|
-
this.isUsed = false;
|
|
16570
|
-
const { done, value } = await this.resolverIterator.next();
|
|
16571
|
-
const nextResponse = await value;
|
|
16572
|
-
if (nextResponse) this.resolverIteratorResult = nextResponse.clone();
|
|
16573
|
-
if (done) {
|
|
16574
|
-
this.isUsed = true;
|
|
16575
|
-
return this.resolverIteratorResult?.clone();
|
|
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;
|
|
16517
|
+
}
|
|
16518
|
+
function cleanUrl(path) {
|
|
16519
|
+
if (path.endsWith("?")) return path;
|
|
16520
|
+
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
|
16595
16521
|
}
|
|
16596
16522
|
|
|
16597
16523
|
//#endregion
|
|
16598
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16599
|
-
function
|
|
16600
|
-
|
|
16601
|
-
if (status$1 < 400) return "#F0BB4B";
|
|
16602
|
-
return "#E95F5D";
|
|
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);
|
|
16603
16527
|
}
|
|
16604
16528
|
|
|
16605
16529
|
//#endregion
|
|
16606
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16607
|
-
function
|
|
16608
|
-
|
|
16609
|
-
|
|
16610
|
-
|
|
16611
|
-
return
|
|
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;
|
|
16612
16536
|
}
|
|
16613
16537
|
|
|
16614
16538
|
//#endregion
|
|
16615
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
const
|
|
16619
|
-
return
|
|
16620
|
-
url: new URL(request.url),
|
|
16621
|
-
method: request.method,
|
|
16622
|
-
headers: Object.fromEntries(request.headers.entries()),
|
|
16623
|
-
body: requestText
|
|
16624
|
-
};
|
|
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);
|
|
16625
16544
|
}
|
|
16626
16545
|
|
|
16627
16546
|
//#endregion
|
|
16628
|
-
//#region ../../node_modules/.pnpm/msw@2.
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
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
|
|
|
@@ -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 = {};
|
|
@@ -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
|
{
|
|
@@ -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 = [
|
|
@@ -18943,16 +18884,52 @@ const restHandlers = buildHandlers([
|
|
|
18943
18884
|
path: "/api/0/organizations/sentry-mcp-evals/issues/PEATED-A8/autofix/",
|
|
18944
18885
|
fetch: () => HttpResponse.json({ run_id: 123 })
|
|
18945
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
|
+
},
|
|
18946
18892
|
{
|
|
18947
18893
|
method: "post",
|
|
18948
|
-
path: "/api/0/
|
|
18949
|
-
fetch:
|
|
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 }) => {
|
|
18950
18926
|
const body = await request.json();
|
|
18927
|
+
const teamSlug = params.teamSlug;
|
|
18951
18928
|
return HttpResponse.json({
|
|
18952
18929
|
...team_default,
|
|
18953
18930
|
id: "4509109078196224",
|
|
18954
|
-
slug:
|
|
18955
|
-
name:
|
|
18931
|
+
slug: teamSlug,
|
|
18932
|
+
name: teamSlug,
|
|
18956
18933
|
dateCreated: "2025-04-07T00:05:48.196710Z"
|
|
18957
18934
|
});
|
|
18958
18935
|
}
|
|
@@ -19008,8 +18985,221 @@ const restHandlers = buildHandlers([
|
|
|
19008
18985
|
};
|
|
19009
18986
|
return HttpResponse.json(updatedIssue);
|
|
19010
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
|
+
}
|
|
19011
19001
|
}
|
|
19012
19002
|
]);
|
|
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
|
+
];
|
|
19013
19203
|
/**
|
|
19014
19204
|
* Configured MSW server instance with all Sentry API mock handlers.
|
|
19015
19205
|
*
|
|
@@ -19048,7 +19238,7 @@ const restHandlers = buildHandlers([
|
|
|
19048
19238
|
* This matches the real Sentry API behavior where user data must always be queried
|
|
19049
19239
|
* from the main API server.
|
|
19050
19240
|
*/
|
|
19051
|
-
const mswServer = setupServer(...restHandlers);
|
|
19241
|
+
const mswServer = setupServer(...restHandlers, ...searchHandlers, ...docsHandlers);
|
|
19052
19242
|
|
|
19053
19243
|
//#endregion
|
|
19054
19244
|
//#region src/test-setup.ts
|