@sentry/mcp-server 0.12.0 → 0.14.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 +19 -4
- package/dist/analyze-issue-with-seer-BsNarzJN.js +163 -0
- package/dist/analyze-issue-with-seer-BsNarzJN.js.map +1 -0
- package/dist/analyze-issue-with-seer-DbAWpyTC.cjs +169 -0
- package/dist/analyze-issue-with-seer-DbAWpyTC.cjs.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-C6QJAzFL.js +31 -0
- package/dist/api-utils-C6QJAzFL.js.map +1 -0
- package/dist/api-utils-d36iteNO.cjs +36 -0
- package/dist/api-utils-d36iteNO.cjs.map +1 -0
- package/dist/{client-4jq_wVgn.d.ts → client-BCN17Wbp.d.ts} +43 -11
- package/dist/client-BCN17Wbp.d.ts.map +1 -0
- package/dist/{client-DkY0ifZf.d.cts → client-CILwfx6G.d.cts} +43 -11
- package/dist/client-CILwfx6G.d.cts.map +1 -0
- package/dist/{client-CAoHZbyK.js → client-DOYWNvVM.js} +75 -18
- package/dist/client-DOYWNvVM.js.map +1 -0
- package/dist/{client-B7vZ6JMk.cjs → client-Dkw5iYu3.cjs} +75 -18
- package/dist/client-Dkw5iYu3.cjs.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-CDcL2DLD.js +59 -0
- package/dist/create-dsn-CDcL2DLD.js.map +1 -0
- package/dist/create-dsn-fESUtX3R.cjs +65 -0
- package/dist/create-dsn-fESUtX3R.cjs.map +1 -0
- package/dist/create-project-Bg5uDkc4.cjs +82 -0
- package/dist/create-project-Bg5uDkc4.cjs.map +1 -0
- package/dist/create-project-DY5mFznV.js +76 -0
- package/dist/create-project-DY5mFznV.js.map +1 -0
- package/dist/create-team-5purh64V.cjs +53 -0
- package/dist/create-team-5purh64V.cjs.map +1 -0
- package/dist/create-team-C2R7EUC3.js +47 -0
- package/dist/create-team-C2R7EUC3.js.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-BMKjO-cc.js +29 -0
- package/dist/fetch-utils-BMKjO-cc.js.map +1 -0
- package/dist/fetch-utils-Bv9WjUp0.d.ts +14 -0
- package/dist/fetch-utils-Bv9WjUp0.d.ts.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-CvfcLB9Z.js +52 -0
- package/dist/find-dsns-CvfcLB9Z.js.map +1 -0
- package/dist/find-dsns-ZZ-thiNk.cjs +58 -0
- package/dist/find-dsns-ZZ-thiNk.cjs.map +1 -0
- package/dist/find-errors-CuRm4PzL.js +91 -0
- package/dist/find-errors-CuRm4PzL.js.map +1 -0
- package/dist/find-errors-Drzv7hzM.cjs +97 -0
- package/dist/find-errors-Drzv7hzM.cjs.map +1 -0
- package/dist/find-issues-C3uk59rn.cjs +98 -0
- package/dist/find-issues-C3uk59rn.cjs.map +1 -0
- package/dist/find-issues-CAtNGBly.js +92 -0
- package/dist/find-issues-CAtNGBly.js.map +1 -0
- package/dist/find-organizations-BrdMfZRO.cjs +50 -0
- package/dist/find-organizations-BrdMfZRO.cjs.map +1 -0
- package/dist/find-organizations-ojXwWWzk.js +45 -0
- package/dist/find-organizations-ojXwWWzk.js.map +1 -0
- package/dist/find-projects-BZWhlYJh.cjs +45 -0
- package/dist/find-projects-BZWhlYJh.cjs.map +1 -0
- package/dist/find-projects-fcLG4KpT.js +39 -0
- package/dist/find-projects-fcLG4KpT.js.map +1 -0
- package/dist/find-releases-BUozr0Z-.js +93 -0
- package/dist/find-releases-BUozr0Z-.js.map +1 -0
- package/dist/find-releases-CZCVEOHZ.cjs +99 -0
- package/dist/find-releases-CZCVEOHZ.cjs.map +1 -0
- package/dist/find-tags-Byk4d3oZ.cjs +45 -0
- package/dist/find-tags-Byk4d3oZ.cjs.map +1 -0
- package/dist/find-tags-d-wF1Se8.js +39 -0
- package/dist/find-tags-d-wF1Se8.js.map +1 -0
- package/dist/find-teams-BZ118EIK.js +39 -0
- package/dist/find-teams-BZ118EIK.js.map +1 -0
- package/dist/find-teams-CnU5x9rQ.cjs +45 -0
- package/dist/find-teams-CnU5x9rQ.cjs.map +1 -0
- package/dist/find-transactions-DIJ80wkd.cjs +89 -0
- package/dist/find-transactions-DIJ80wkd.cjs.map +1 -0
- package/dist/find-transactions-DZCj81jP.js +83 -0
- package/dist/find-transactions-DZCj81jP.js.map +1 -0
- package/dist/formatting-BlMiQa9i.cjs +388 -0
- package/dist/formatting-BlMiQa9i.cjs.map +1 -0
- package/dist/formatting-CHh9Q_OW.d.cts +47 -0
- package/dist/formatting-CHh9Q_OW.d.cts.map +1 -0
- package/dist/formatting-kdIeURER.d.ts +47 -0
- package/dist/formatting-kdIeURER.d.ts.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-DaTCenOE.cjs +86 -0
- package/dist/get-doc-DaTCenOE.cjs.map +1 -0
- package/dist/get-doc-YTiQznr1.js +80 -0
- package/dist/get-doc-YTiQznr1.js.map +1 -0
- package/dist/get-event-attachment-ChRw3jlQ.cjs +144 -0
- package/dist/get-event-attachment-ChRw3jlQ.cjs.map +1 -0
- package/dist/get-event-attachment-CuU-_5T6.js +138 -0
- package/dist/get-event-attachment-CuU-_5T6.js.map +1 -0
- package/dist/get-issue-details-CxChU4U9.js +104 -0
- package/dist/get-issue-details-CxChU4U9.js.map +1 -0
- package/dist/get-issue-details-DFwZRbmU.cjs +110 -0
- package/dist/get-issue-details-DFwZRbmU.cjs.map +1 -0
- package/dist/index.cjs +73 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -25
- 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-BJffpNoO.d.ts +52 -0
- package/dist/issue-helpers-BJffpNoO.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-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-D5FSQckL.d.ts → promptDefinitions-D3GTBGLr.d.ts} +3 -3
- package/dist/promptDefinitions-D3GTBGLr.d.ts.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--5m4KI84.d.ts} +3678 -619
- package/dist/schema--5m4KI84.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-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-BJv7kREf.d.cts → schema-ya35hkEL.d.cts} +3614 -555
- package/dist/schema-ya35hkEL.d.cts.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-BLbB_GV2.js +102 -0
- package/dist/search-docs-BLbB_GV2.js.map +1 -0
- package/dist/search-docs-D5Foht_0.cjs +108 -0
- package/dist/search-docs-D5Foht_0.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-BpEIZVaZ.cjs} +104 -57
- package/dist/server-BpEIZVaZ.cjs.map +1 -0
- package/dist/{server-C7cHq_pc.js → server-DOy-M9Ko.js} +104 -57
- package/dist/server-DOy-M9Ko.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-ZQLC-i5Q.js → stdio-B2NDq7Ax.js} +17 -7
- package/dist/stdio-B2NDq7Ax.js.map +1 -0
- package/dist/{stdio-B73CCTly.cjs → stdio-DMEgJ_fG.cjs} +17 -7
- package/dist/stdio-DMEgJ_fG.cjs.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-19Ms1kck.cjs +53 -0
- package/dist/tools-19Ms1kck.cjs.map +1 -0
- package/dist/tools-mThAUo_3.js +48 -0
- package/dist/tools-mThAUo_3.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-NIQW7KyF.d.cts → types-Bg17IGWJ.d.cts} +5 -3
- package/dist/types-Bg17IGWJ.d.cts.map +1 -0
- package/dist/types-CCHsZshF.js +0 -0
- package/dist/types-CUN-2OSS.d.cts +29 -0
- package/dist/types-CUN-2OSS.d.cts.map +1 -0
- package/dist/{types-Daq2fm0E.d.ts → types-CtTBwGbw.d.ts} +5 -3
- package/dist/types-CtTBwGbw.d.ts.map +1 -0
- package/dist/types-D_mx318Q.d.cts +29 -0
- package/dist/types-D_mx318Q.d.cts.map +1 -0
- package/dist/types-DkJtNDXU.d.ts +29 -0
- package/dist/types-DkJtNDXU.d.ts.map +1 -0
- package/dist/types-qB8a4WQT.d.ts +29 -0
- package/dist/types-qB8a4WQT.d.ts.map +1 -0
- package/dist/types.d.cts +3 -4
- package/dist/types.d.ts +3 -4
- package/dist/update-issue-B6eZhAPJ.cjs +115 -0
- package/dist/update-issue-B6eZhAPJ.cjs.map +1 -0
- package/dist/update-issue-DmLElHPS.js +109 -0
- package/dist/update-issue-DmLElHPS.js.map +1 -0
- package/dist/update-project-BNPev7W8.js +120 -0
- package/dist/update-project-BNPev7W8.js.map +1 -0
- package/dist/update-project-CijYCtG1.cjs +126 -0
- package/dist/update-project-CijYCtG1.cjs.map +1 -0
- package/dist/url-utils-C9hykWmk.cjs +106 -0
- package/dist/url-utils-C9hykWmk.cjs.map +1 -0
- package/dist/url-utils-DvZYfzPM.js +82 -0
- package/dist/url-utils-DvZYfzPM.js.map +1 -0
- package/dist/utils/url-utils.cjs +6 -0
- package/dist/utils/url-utils.d.cts +37 -0
- package/dist/utils/url-utils.d.cts.map +1 -0
- package/dist/utils/url-utils.d.ts +37 -0
- package/dist/utils/url-utils.d.ts.map +1 -0
- package/dist/utils/url-utils.js +3 -0
- package/dist/version-C4uvMmw0.js +6 -0
- package/dist/version-C4uvMmw0.js.map +1 -0
- package/dist/{version-BNmubeQI.cjs → version-Ddz4xg_q.cjs} +2 -2
- package/dist/version-Ddz4xg_q.cjs.map +1 -0
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/whoami-CEgbTUqt.cjs +28 -0
- package/dist/whoami-CEgbTUqt.cjs.map +1 -0
- package/dist/whoami-DesNZnaQ.js +23 -0
- package/dist/whoami-DesNZnaQ.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-DVGDAddE.d.ts} +0 -0
package/dist/errors.test.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const require_dist = require('./dist-BlIWGSIM.cjs');
|
|
2
|
-
const require_vi_bdSIJ99Y = require('./vi.bdSIJ99Y-Dft_B_Ta.cjs');
|
|
3
|
-
const require_errors = require('./errors-B9fwS-aP.cjs');
|
|
4
|
-
|
|
5
|
-
//#region src/errors.test.ts
|
|
6
|
-
require_dist.describe("UserInputError", () => {
|
|
7
|
-
require_dist.it("should create a UserInputError with the correct message and name", () => {
|
|
8
|
-
const message = "Invalid input provided";
|
|
9
|
-
const error = new require_errors.UserInputError(message);
|
|
10
|
-
require_vi_bdSIJ99Y.globalExpect(error.message).toBe(message);
|
|
11
|
-
require_vi_bdSIJ99Y.globalExpect(error.name).toBe("UserInputError");
|
|
12
|
-
require_vi_bdSIJ99Y.globalExpect(error instanceof Error).toBe(true);
|
|
13
|
-
require_vi_bdSIJ99Y.globalExpect(error instanceof require_errors.UserInputError).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
require_dist.it("should be distinguishable from regular Error", () => {
|
|
16
|
-
const userInputError = new require_errors.UserInputError("User input error");
|
|
17
|
-
const regularError = new Error("Regular error");
|
|
18
|
-
require_vi_bdSIJ99Y.globalExpect(userInputError instanceof require_errors.UserInputError).toBe(true);
|
|
19
|
-
require_vi_bdSIJ99Y.globalExpect(regularError instanceof require_errors.UserInputError).toBe(false);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
//# sourceMappingURL=errors.test.cjs.map
|
package/dist/errors.test.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.cjs","names":["UserInputError"],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAIA,8BAAe;AAEjC,mCAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,mCAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,mCAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,mCAAO,iBAAiBA,8BAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,iBAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAIA,8BAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,mCAAO,0BAA0BA,8BAAe,CAAC,KAAK,KAAK;AAC3D,mCAAO,wBAAwBA,8BAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
|
package/dist/errors.test.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/errors.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/errors.test.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { describe, it } from "./dist-DDpQABxe.js";
|
|
2
|
-
import { globalExpect } from "./vi.bdSIJ99Y-BfJr7I2s.js";
|
|
3
|
-
import { UserInputError } from "./errors-BJSrT6Ou.js";
|
|
4
|
-
|
|
5
|
-
//#region src/errors.test.ts
|
|
6
|
-
describe("UserInputError", () => {
|
|
7
|
-
it("should create a UserInputError with the correct message and name", () => {
|
|
8
|
-
const message = "Invalid input provided";
|
|
9
|
-
const error = new UserInputError(message);
|
|
10
|
-
globalExpect(error.message).toBe(message);
|
|
11
|
-
globalExpect(error.name).toBe("UserInputError");
|
|
12
|
-
globalExpect(error instanceof Error).toBe(true);
|
|
13
|
-
globalExpect(error instanceof UserInputError).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
it("should be distinguishable from regular Error", () => {
|
|
16
|
-
const userInputError = new UserInputError("User input error");
|
|
17
|
-
const regularError = new Error("Regular error");
|
|
18
|
-
globalExpect(userInputError instanceof UserInputError).toBe(true);
|
|
19
|
-
globalExpect(regularError instanceof UserInputError).toBe(false);
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
//# sourceMappingURL=errors.test.js.map
|
package/dist/errors.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.js","names":[],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAI,eAAe;AAEjC,eAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,eAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,eAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,eAAO,iBAAiB,eAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,IAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAI,eAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,eAAO,0BAA0B,eAAe,CAAC,KAAK,KAAK;AAC3D,eAAO,wBAAwB,eAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
//#region src/internal/formatting.ts
|
|
2
|
-
function formatFrameHeader(frame, platform) {
|
|
3
|
-
if (platform?.startsWith("javascript")) return `${[
|
|
4
|
-
frame.filename,
|
|
5
|
-
frame.lineNo,
|
|
6
|
-
frame.colNo
|
|
7
|
-
].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
|
|
8
|
-
return `${frame.function ? `"${frame.function}"` : "unknown function"} in "${frame.filename || frame.module}"${frame.lineNo ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : ""}` : ""}`;
|
|
9
|
-
}
|
|
10
|
-
function formatEventOutput(event) {
|
|
11
|
-
let output = "";
|
|
12
|
-
for (const entry of event.entries) {
|
|
13
|
-
if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
|
|
14
|
-
if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
|
|
15
|
-
}
|
|
16
|
-
output += formatContexts(event.contexts);
|
|
17
|
-
return output;
|
|
18
|
-
}
|
|
19
|
-
function formatExceptionInterfaceOutput(event, data) {
|
|
20
|
-
let output = "";
|
|
21
|
-
const firstError = data.value ?? data.values[0];
|
|
22
|
-
if (!firstError) return "";
|
|
23
|
-
output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
|
|
24
|
-
if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
|
|
25
|
-
output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
|
|
26
|
-
const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
|
|
27
|
-
return `${formatFrameHeader(frame, event.platform)}${context}`;
|
|
28
|
-
}).join("\n")}\n\`\`\`\n\n`;
|
|
29
|
-
return output;
|
|
30
|
-
}
|
|
31
|
-
function formatRequestInterfaceOutput(event, data) {
|
|
32
|
-
if (!data.method || !data.url) return "";
|
|
33
|
-
return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
|
|
34
|
-
}
|
|
35
|
-
function formatContexts(contexts) {
|
|
36
|
-
if (!contexts) return "";
|
|
37
|
-
return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
|
|
38
|
-
return `${key}: ${JSON.stringify(value, void 0, 2)}`;
|
|
39
|
-
}).join("\n")}`).join("\n\n")}\n\n`;
|
|
40
|
-
}
|
|
41
|
-
function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
|
|
42
|
-
let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
|
|
43
|
-
output += `**Description**: ${issue.title}\n`;
|
|
44
|
-
output += `**Culprit**: ${issue.culprit}\n`;
|
|
45
|
-
output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
|
|
46
|
-
output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
|
|
47
|
-
output += `**Occurrences**: ${issue.count}\n`;
|
|
48
|
-
output += `**Users Impacted**: ${issue.userCount}\n`;
|
|
49
|
-
output += `**Status**: ${issue.status}\n`;
|
|
50
|
-
output += `**Platform**: ${issue.platform}\n`;
|
|
51
|
-
output += `**Project**: ${issue.project.name}\n`;
|
|
52
|
-
output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
|
|
53
|
-
output += "\n";
|
|
54
|
-
output += "## Event Details\n\n";
|
|
55
|
-
output += `**Event ID**: ${event.id}\n`;
|
|
56
|
-
if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
|
|
57
|
-
if (event.message) output += `**Message**:\n${event.message}\n`;
|
|
58
|
-
output += "\n";
|
|
59
|
-
output += formatEventOutput(event);
|
|
60
|
-
output += "# Using this information\n\n";
|
|
61
|
-
output += `- You can reference the IssueID in commit messages (e.g. \`Fixes ${issue.shortId}\`) to automatically close the issue when the commit is merged.\n`;
|
|
62
|
-
output += "- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n";
|
|
63
|
-
return output;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
export { formatEventOutput, formatFrameHeader, formatIssueOutput };
|
|
68
|
-
//# sourceMappingURL=formatting-BaARL2gT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting-BaARL2gT.js","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":"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"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/internal/formatting.ts
|
|
3
|
-
function formatFrameHeader(frame, platform) {
|
|
4
|
-
if (platform?.startsWith("javascript")) return `${[
|
|
5
|
-
frame.filename,
|
|
6
|
-
frame.lineNo,
|
|
7
|
-
frame.colNo
|
|
8
|
-
].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
|
|
9
|
-
return `${frame.function ? `"${frame.function}"` : "unknown function"} in "${frame.filename || frame.module}"${frame.lineNo ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : ""}` : ""}`;
|
|
10
|
-
}
|
|
11
|
-
function formatEventOutput(event) {
|
|
12
|
-
let output = "";
|
|
13
|
-
for (const entry of event.entries) {
|
|
14
|
-
if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
|
|
15
|
-
if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
|
|
16
|
-
}
|
|
17
|
-
output += formatContexts(event.contexts);
|
|
18
|
-
return output;
|
|
19
|
-
}
|
|
20
|
-
function formatExceptionInterfaceOutput(event, data) {
|
|
21
|
-
let output = "";
|
|
22
|
-
const firstError = data.value ?? data.values[0];
|
|
23
|
-
if (!firstError) return "";
|
|
24
|
-
output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
|
|
25
|
-
if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
|
|
26
|
-
output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
|
|
27
|
-
const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
|
|
28
|
-
return `${formatFrameHeader(frame, event.platform)}${context}`;
|
|
29
|
-
}).join("\n")}\n\`\`\`\n\n`;
|
|
30
|
-
return output;
|
|
31
|
-
}
|
|
32
|
-
function formatRequestInterfaceOutput(event, data) {
|
|
33
|
-
if (!data.method || !data.url) return "";
|
|
34
|
-
return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
|
|
35
|
-
}
|
|
36
|
-
function formatContexts(contexts) {
|
|
37
|
-
if (!contexts) return "";
|
|
38
|
-
return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
|
|
39
|
-
return `${key}: ${JSON.stringify(value, void 0, 2)}`;
|
|
40
|
-
}).join("\n")}`).join("\n\n")}\n\n`;
|
|
41
|
-
}
|
|
42
|
-
function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
|
|
43
|
-
let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
|
|
44
|
-
output += `**Description**: ${issue.title}\n`;
|
|
45
|
-
output += `**Culprit**: ${issue.culprit}\n`;
|
|
46
|
-
output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
|
|
47
|
-
output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
|
|
48
|
-
output += `**Occurrences**: ${issue.count}\n`;
|
|
49
|
-
output += `**Users Impacted**: ${issue.userCount}\n`;
|
|
50
|
-
output += `**Status**: ${issue.status}\n`;
|
|
51
|
-
output += `**Platform**: ${issue.platform}\n`;
|
|
52
|
-
output += `**Project**: ${issue.project.name}\n`;
|
|
53
|
-
output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
|
|
54
|
-
output += "\n";
|
|
55
|
-
output += "## Event Details\n\n";
|
|
56
|
-
output += `**Event ID**: ${event.id}\n`;
|
|
57
|
-
if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
|
|
58
|
-
if (event.message) output += `**Message**:\n${event.message}\n`;
|
|
59
|
-
output += "\n";
|
|
60
|
-
output += formatEventOutput(event);
|
|
61
|
-
output += "# Using this information\n\n";
|
|
62
|
-
output += `- You can reference the IssueID in commit messages (e.g. \`Fixes ${issue.shortId}\`) to automatically close the issue when the commit is merged.\n`;
|
|
63
|
-
output += "- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n";
|
|
64
|
-
return output;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
Object.defineProperty(exports, 'formatEventOutput', {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return formatEventOutput;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(exports, 'formatFrameHeader', {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () {
|
|
77
|
-
return formatFrameHeader;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(exports, 'formatIssueOutput', {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return formatIssueOutput;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
//# sourceMappingURL=formatting-C2kN0ok6.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting-C2kN0ok6.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":";;AAkBA,SAAgB,kBACdA,OACAC,UACA;AACA,KAAI,UAAU,WAAW,aAAa,CACpC,SAAQ,EAAE;EAAC,MAAM;EAAU,MAAM;EAAQ,MAAM;CAAM,EAClD,OAAO,CAAC,QAAQ,EAAE,CAClB,KAAK,IAAI,CAAC,EAAE,MAAM,YAAY,IAAI,MAAM,SAAS,KAAK,GAAG;AAE9D,SAAQ,EAAE,MAAM,YAAY,GAAG,MAAM,SAAS,KAAK,mBAAmB,OAAO,MAAM,YAAY,MAAM,OAAO,GAC1G,MAAM,UACD,WAAW,MAAM,OAAO,EAAE,MAAM,UAAU,QAAQ,GAAG,MAAM,MAAM,IAAI,GAAG,IACzE,GACL;AACF;AAED,SAAgB,kBAAkBC,OAAc;CAC9C,IAAI,SAAS;AACb,MAAK,MAAM,SAAS,MAAM,SAAS;AACjC,MAAI,MAAM,SAAS,YACjB,WAAU,+BACR,OACA,MAAM,KACP;AAEH,MAAI,MAAM,SAAS,UACjB,WAAU,6BACR,OACA,MAAM,KACP;CAEJ;AACD,WAAU,eAAe,MAAM,SAAS;AACxC,QAAO;AACR;AAED,SAAS,+BACPA,OACAC,MACA;CACA,IAAI,SAAS;CAEb,MAAM,aAAa,KAAK,SAAS,KAAK,OAAO;AAC7C,MAAK,WACH,QAAO;AAET,YAAW,uBAAyB,WAAW,KAAK,IAClD,WAAW,MACZ;AACD,MAAK,WAAW,eAAe,WAAW,WAAW,OACnD,QAAO;AAET,YAAW,2BAA6B,WAAW,WAAW,OAC3D,IAAI,CAAC,UAAU;EACd,MAAM,UAAU,MAAM,SAAS,UAC1B,EAAE,MAAM,QACN,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,WAAW,MAAM,OAAO,CAChD,IAAI,CAAC,CAAC,GAAG,KAAK,MAAM,IAAI,KAAK,EAAE,CAC/B,KAAK,GAAG,CAAC,IACZ;AAEJ,UAAQ,EAAE,kBAAkB,OAAO,MAAM,SAAS,CAAC,EAAE,QAAQ;CAC9D,EAAC,CACD,KAAK,KAAK,CAAC;AACd,QAAO;AACR;AAED,SAAS,6BACPD,OACAE,MACA;AACA,MAAK,KAAK,WAAW,KAAK,IACxB,QAAO;AAET,SAAQ,kCAAkC,KAAK,OAAO,aAAa,KAAK,IAAI;AAC7E;AAED,SAAS,eAAeC,UAAmD;AACzE,MAAK,SACH,QAAO;AAET,SAAQ,+HAA+H,OAAO,QAC5I,SACD,CACE,IACC,CAAC,CAAC,MAAM,KAAK,MACV,IAAI,KAAK,MAAM,OAAO,QAAQ,KAAK,CACjC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,QAAQ,OAAO,CACpC,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK;AACrB,UAAQ,EAAE,IAAI,IAAI,KAAK,UAAU,eAAkB,EAAE,CAAC;CACvD,EAAC,CACD,KAAK,KAAK,CAAC,EACjB,CACA,KAAK,OAAO,CAAC;AACjB;AAED,SAAgB,kBAAkB,EAChC,kBACA,OACA,OACA,YAMD,EAAE;CACD,IAAI,UAAU,UAAU,MAAM,QAAQ,QAAQ,iBAAiB;AAC/D,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,eAAe,MAAM,QAAQ;AACxC,YAAW,kBAAkB,IAAI,KAAK,MAAM,WAAW,aAAa,CAAC;AACrE,YAAW,iBAAiB,IAAI,KAAK,MAAM,UAAU,aAAa,CAAC;AACnE,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,sBAAsB,MAAM,UAAU;AACjD,YAAW,cAAc,MAAM,OAAO;AACtC,YAAW,gBAAgB,MAAM,SAAS;AAC1C,YAAW,eAAe,MAAM,QAAQ,KAAK;AAC7C,YAAW,WAAW,WAAW,YAAY,kBAAkB,MAAM,QAAQ,CAAC;AAC9E,WAAU;AACV,WAAU;AACV,YAAW,gBAAgB,MAAM,GAAG;AACpC,KAAI,MAAM,SAAS,QACjB,YAAW,mBAAmB,IAAI,KAAM,MAA2C,aAAa,aAAa,CAAC;AAEhH,KAAI,MAAM,QACR,YAAW,gBAAgB,MAAM,QAAQ;AAE3C,WAAU;AACV,WAAU,kBAAkB,MAAM;AAClC,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
|
package/dist/index-h64gcVNJ.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBS,iBADO,iBAAA,CACL,KAAA,EAAF,CAAA,CAAE,KAAA,CAAA,OAAa,cAAb,CAAA,EAAA,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,IAAA,CAAA,EAAA,MAAA;AAAK,iBAeA,iBAAA,CAfA,KAAA,EAeyB,KAfzB,CAAA,EAAA,MAAA;AAeA,iBAgFA,iBAAA,CAhF8B;EAAA,gBAAA;EAAA,KAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAgF9B,gBAAA,EAAA,MAAiB;EAAA,KAAA,EAOxB,KAPwB;EAAA,KAC/B,EAOO,KAPP;EAAgB,UAChB,EAOY,gBAPZ;CAAK,CAAA,EAAA,MACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBS,iBADO,iBAAA,CACL,KAAA,EAAF,CAAA,CAAE,KAAA,CAAA,OAAa,cAAb,CAAA,EAAA,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,IAAA,CAAA,EAAA,MAAA;AAAK,iBAeA,iBAAA,CAfA,KAAA,EAeyB,KAfzB,CAAA,EAAA,MAAA;AAeA,iBAgFA,iBAAA,CAhF8B;EAAA,gBAAA;EAAA,KAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAgF9B,gBAAA,EAAA,MAAiB;EAAA,KAAA,EAOxB,KAPwB;EAAA,KAC/B,EAOO,KAPP;EAAgB,UAChB,EAOY,gBAPZ;CAAK,CAAA,EAAA,MACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAgBA;AAmEA;AAyBA;;;;;AAGkB;;;;;;;iBA/FF,cAAA;;;;;;;;;;;;iBAmEA,YAAA;;;;;;;;iBAyBA,gBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAgBA;AAmEA;AAyBA;;;;;AAGkB;;;;;;;iBA/FF,cAAA;;;;;;;;;;;;iBAmEA,YAAA;;;;;;;;iBAyBA,gBAAA"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
const require_dist = require('../dist-BlIWGSIM.cjs');
|
|
2
|
-
const require_vi_bdSIJ99Y = require('../vi.bdSIJ99Y-Dft_B_Ta.cjs');
|
|
3
|
-
const require_issue_helpers = require('../issue-helpers-D712fGT2.cjs');
|
|
4
|
-
|
|
5
|
-
//#region src/internal/issue-helpers.test.ts
|
|
6
|
-
require_dist.describe("extractIssueId", () => {
|
|
7
|
-
require_dist.it("should extract issue ID from a full Sentry URL", () => {
|
|
8
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
|
|
9
|
-
{
|
|
10
|
-
"issueId": "1234",
|
|
11
|
-
"organizationSlug": "sentry",
|
|
12
|
-
}
|
|
13
|
-
`);
|
|
14
|
-
});
|
|
15
|
-
require_dist.it("should extract issue ID from a Sentry URL with organization in path", () => {
|
|
16
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
|
|
17
|
-
{
|
|
18
|
-
"issueId": "123",
|
|
19
|
-
"organizationSlug": "sentry",
|
|
20
|
-
}
|
|
21
|
-
`);
|
|
22
|
-
});
|
|
23
|
-
require_dist.it("should extract issue ID and org slug from URL with organizations path", () => {
|
|
24
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
|
|
25
|
-
{
|
|
26
|
-
"issueId": "123",
|
|
27
|
-
"organizationSlug": "my-org",
|
|
28
|
-
}
|
|
29
|
-
`);
|
|
30
|
-
});
|
|
31
|
-
require_dist.it("should extract issue ID and org slug from subdomain URL", () => {
|
|
32
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
|
|
33
|
-
issueId: "123",
|
|
34
|
-
organizationSlug: "my-team"
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
require_dist.it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
|
|
38
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
|
|
39
|
-
{
|
|
40
|
-
"issueId": "123",
|
|
41
|
-
"organizationSlug": "sentry",
|
|
42
|
-
}
|
|
43
|
-
`);
|
|
44
|
-
});
|
|
45
|
-
require_dist.it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
|
|
46
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
|
|
47
|
-
{
|
|
48
|
-
"issueId": "123",
|
|
49
|
-
"organizationSlug": "my-team",
|
|
50
|
-
}
|
|
51
|
-
`);
|
|
52
|
-
});
|
|
53
|
-
require_dist.it("should throw error for empty input", () => {
|
|
54
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
|
|
55
|
-
});
|
|
56
|
-
require_dist.it("should throw error for invalid URL path", () => {
|
|
57
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
|
|
58
|
-
});
|
|
59
|
-
require_dist.it("should throw error for non-numeric issue ID in URL", () => {
|
|
60
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
|
|
61
|
-
{
|
|
62
|
-
"issueId": "abc",
|
|
63
|
-
"organizationSlug": "sentry",
|
|
64
|
-
}
|
|
65
|
-
`);
|
|
66
|
-
});
|
|
67
|
-
require_dist.it("should throw error for non-numeric standalone ID", () => {
|
|
68
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
require_dist.describe("parseIssueId", () => {
|
|
72
|
-
require_dist.it("should remove trailing punctuation from issue ID", () => {
|
|
73
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
|
|
74
|
-
});
|
|
75
|
-
require_dist.it("should not modify a clean issue ID", () => {
|
|
76
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
|
|
77
|
-
});
|
|
78
|
-
require_dist.it("should remove special characters except dash and underscore", () => {
|
|
79
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
require_dist.describe("parseIssueParams", () => {
|
|
83
|
-
require_dist.it("should parse from issueUrl", () => {
|
|
84
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
|
|
85
|
-
organizationSlug: "sentry",
|
|
86
|
-
issueId: "123"
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
require_dist.it("should parse from issueId and organizationSlug", () => {
|
|
90
|
-
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({
|
|
91
|
-
issueId: "CLOUDFLARE-MCP-41.!",
|
|
92
|
-
organizationSlug: "sentry-mcp-evals"
|
|
93
|
-
})).toEqual({
|
|
94
|
-
organizationSlug: "sentry-mcp-evals",
|
|
95
|
-
issueId: "CLOUDFLARE-MCP-41"
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
require_dist.it("should throw if neither issueId nor issueUrl is provided", () => {
|
|
99
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
|
|
100
|
-
});
|
|
101
|
-
require_dist.it("should throw if organizationSlug is missing and no issueUrl", () => {
|
|
102
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
|
|
103
|
-
});
|
|
104
|
-
require_dist.it("should throw if issueUrl is invalid", () => {
|
|
105
|
-
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
//# sourceMappingURL=issue-helpers.test.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D,mCAEE,mCAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { describe, it } from "../dist-DDpQABxe.js";
|
|
2
|
-
import { globalExpect } from "../vi.bdSIJ99Y-BfJr7I2s.js";
|
|
3
|
-
import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-BMVLc3mR.js";
|
|
4
|
-
|
|
5
|
-
//#region src/internal/issue-helpers.test.ts
|
|
6
|
-
describe("extractIssueId", () => {
|
|
7
|
-
it("should extract issue ID from a full Sentry URL", () => {
|
|
8
|
-
globalExpect(extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
|
|
9
|
-
{
|
|
10
|
-
"issueId": "1234",
|
|
11
|
-
"organizationSlug": "sentry",
|
|
12
|
-
}
|
|
13
|
-
`);
|
|
14
|
-
});
|
|
15
|
-
it("should extract issue ID from a Sentry URL with organization in path", () => {
|
|
16
|
-
globalExpect(extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
|
|
17
|
-
{
|
|
18
|
-
"issueId": "123",
|
|
19
|
-
"organizationSlug": "sentry",
|
|
20
|
-
}
|
|
21
|
-
`);
|
|
22
|
-
});
|
|
23
|
-
it("should extract issue ID and org slug from URL with organizations path", () => {
|
|
24
|
-
globalExpect(extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
|
|
25
|
-
{
|
|
26
|
-
"issueId": "123",
|
|
27
|
-
"organizationSlug": "my-org",
|
|
28
|
-
}
|
|
29
|
-
`);
|
|
30
|
-
});
|
|
31
|
-
it("should extract issue ID and org slug from subdomain URL", () => {
|
|
32
|
-
globalExpect(extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
|
|
33
|
-
issueId: "123",
|
|
34
|
-
organizationSlug: "my-team"
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
|
|
38
|
-
globalExpect(extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
|
|
39
|
-
{
|
|
40
|
-
"issueId": "123",
|
|
41
|
-
"organizationSlug": "sentry",
|
|
42
|
-
}
|
|
43
|
-
`);
|
|
44
|
-
});
|
|
45
|
-
it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
|
|
46
|
-
globalExpect(extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
|
|
47
|
-
{
|
|
48
|
-
"issueId": "123",
|
|
49
|
-
"organizationSlug": "my-team",
|
|
50
|
-
}
|
|
51
|
-
`);
|
|
52
|
-
});
|
|
53
|
-
it("should throw error for empty input", () => {
|
|
54
|
-
globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
|
|
55
|
-
});
|
|
56
|
-
it("should throw error for invalid URL path", () => {
|
|
57
|
-
globalExpect(() => extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
|
|
58
|
-
});
|
|
59
|
-
it("should throw error for non-numeric issue ID in URL", () => {
|
|
60
|
-
globalExpect(extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
|
|
61
|
-
{
|
|
62
|
-
"issueId": "abc",
|
|
63
|
-
"organizationSlug": "sentry",
|
|
64
|
-
}
|
|
65
|
-
`);
|
|
66
|
-
});
|
|
67
|
-
it("should throw error for non-numeric standalone ID", () => {
|
|
68
|
-
globalExpect(() => extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
describe("parseIssueId", () => {
|
|
72
|
-
it("should remove trailing punctuation from issue ID", () => {
|
|
73
|
-
globalExpect(parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
|
|
74
|
-
});
|
|
75
|
-
it("should not modify a clean issue ID", () => {
|
|
76
|
-
globalExpect(parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
|
|
77
|
-
});
|
|
78
|
-
it("should remove special characters except dash and underscore", () => {
|
|
79
|
-
globalExpect(parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
describe("parseIssueParams", () => {
|
|
83
|
-
it("should parse from issueUrl", () => {
|
|
84
|
-
globalExpect(parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
|
|
85
|
-
organizationSlug: "sentry",
|
|
86
|
-
issueId: "123"
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
it("should parse from issueId and organizationSlug", () => {
|
|
90
|
-
globalExpect(parseIssueParams({
|
|
91
|
-
issueId: "CLOUDFLARE-MCP-41.!",
|
|
92
|
-
organizationSlug: "sentry-mcp-evals"
|
|
93
|
-
})).toEqual({
|
|
94
|
-
organizationSlug: "sentry-mcp-evals",
|
|
95
|
-
issueId: "CLOUDFLARE-MCP-41"
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
it("should throw if neither issueId nor issueUrl is provided", () => {
|
|
99
|
-
globalExpect(() => parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
|
|
100
|
-
});
|
|
101
|
-
it("should throw if organizationSlug is missing and no issueUrl", () => {
|
|
102
|
-
globalExpect(() => parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
|
|
103
|
-
});
|
|
104
|
-
it("should throw if issueUrl is invalid", () => {
|
|
105
|
-
globalExpect(() => parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
//# sourceMappingURL=issue-helpers.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,SAAS,gBAAgB,MAAM;AAC7B,IAAG,oDAAoD,MAAM;AAC3D,eAEE,aAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,aAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,aAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,SAAS,oBAAoB,MAAM;AACjC,IAAG,8BAA8B,MAAM;AACrC,eACE,iBAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,IAAG,kDAAkD,MAAM;AACzD,eACE,iBAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,IAAG,4DAA4D,MAAM;AACnE,eAAO,MACL,iBAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,MACL,iBAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,IAAG,uCAAuC,MAAM;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
|