@sentry/mcp-server 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-COgY789I.js +225 -0
- package/dist/agent-COgY789I.js.map +1 -0
- package/dist/agent-Cody_f0d.cjs +59 -0
- package/dist/agent-Cody_f0d.cjs.map +1 -0
- package/dist/agent-DZRRChrO.js +53 -0
- package/dist/agent-DZRRChrO.js.map +1 -0
- package/dist/agent-DpCCnhh5.cjs +231 -0
- package/dist/agent-DpCCnhh5.cjs.map +1 -0
- package/dist/agent-tools/discover-dataset-fields.cjs +6 -0
- package/dist/agent-tools/discover-dataset-fields.d.cts +59 -0
- package/dist/agent-tools/discover-dataset-fields.d.cts.map +1 -0
- package/dist/agent-tools/discover-dataset-fields.d.ts +59 -0
- package/dist/agent-tools/discover-dataset-fields.d.ts.map +1 -0
- package/dist/agent-tools/discover-dataset-fields.js +3 -0
- package/dist/agent-tools/lookup-otel-semantics.cjs +5 -0
- package/dist/agent-tools/lookup-otel-semantics.d.cts +38 -0
- package/dist/agent-tools/lookup-otel-semantics.d.cts.map +1 -0
- package/dist/agent-tools/lookup-otel-semantics.d.ts +38 -0
- package/dist/agent-tools/lookup-otel-semantics.d.ts.map +1 -0
- package/dist/agent-tools/lookup-otel-semantics.js +4 -0
- package/dist/agent-tools/whoami.cjs +4 -0
- package/dist/agent-tools/whoami.d.cts +28 -0
- package/dist/agent-tools/whoami.d.cts.map +1 -0
- package/dist/agent-tools/whoami.d.ts +28 -0
- package/dist/agent-tools/whoami.d.ts.map +1 -0
- package/dist/agent-tools/whoami.js +3 -0
- package/dist/{analyze-issue-with-seer-CoqsTklL.js → analyze-issue-with-seer-DcSwrWrs.js} +51 -11
- package/dist/analyze-issue-with-seer-DcSwrWrs.js.map +1 -0
- package/dist/{analyze-issue-with-seer-BkVrrh28.cjs → analyze-issue-with-seer-Dw9iqvSk.cjs} +51 -11
- package/dist/analyze-issue-with-seer-Dw9iqvSk.cjs.map +1 -0
- package/dist/api-client/client.cjs +4 -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 +4 -2
- package/dist/api-client/index.cjs +6 -4
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +6 -4
- package/dist/api-client/schema.cjs +1 -1
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/schema.js +1 -1
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/api-client/types.js +1 -1
- package/dist/api-utils-BlUSO8xh.js +68 -0
- package/dist/api-utils-BlUSO8xh.js.map +1 -0
- package/dist/api-utils-DFWUfQ83.cjs +85 -0
- package/dist/api-utils-DFWUfQ83.cjs.map +1 -0
- package/dist/{client-Dkw5iYu3.cjs → client-CPrEfAwa.cjs} +403 -58
- package/dist/client-CPrEfAwa.cjs.map +1 -0
- package/dist/{client-CQ9Xe1aN.d.cts → client-C_dDreKj.d.ts} +198 -11
- package/dist/client-C_dDreKj.d.ts.map +1 -0
- package/dist/{client-VCJp6Kcu.d.ts → client-CgS3tjJG.d.cts} +198 -11
- package/dist/client-CgS3tjJG.d.cts.map +1 -0
- package/dist/{client-DOYWNvVM.js → client-MaVV1gVC.js} +403 -58
- package/dist/client-MaVV1gVC.js.map +1 -0
- package/dist/config-BUmDxVLS.js +52 -0
- package/dist/config-BUmDxVLS.js.map +1 -0
- package/dist/config-BvtWiL3I.js +449 -0
- package/dist/config-BvtWiL3I.js.map +1 -0
- package/dist/config-CD-5FpOO.cjs +479 -0
- package/dist/config-CD-5FpOO.cjs.map +1 -0
- package/dist/config-FWsgDbm7.cjs +58 -0
- package/dist/config-FWsgDbm7.cjs.map +1 -0
- package/dist/{create-dsn-Dz8nyTFw.cjs → create-dsn-C6IPwoVO.cjs} +12 -10
- package/dist/create-dsn-C6IPwoVO.cjs.map +1 -0
- package/dist/{create-dsn-D530I7Lr.js → create-dsn-QDLdwhDO.js} +12 -10
- package/dist/create-dsn-QDLdwhDO.js.map +1 -0
- package/dist/{create-project-K1od5Rhx.js → create-project-Cax3fWey.js} +14 -11
- package/dist/create-project-Cax3fWey.js.map +1 -0
- package/dist/{create-project-BxzRiryg.cjs → create-project-DdSF58TR.cjs} +14 -11
- package/dist/create-project-DdSF58TR.cjs.map +1 -0
- package/dist/{create-team-CJhrccc1.cjs → create-team-CXaLcylp.cjs} +14 -5
- package/dist/{create-team-CJhrccc1.cjs.map → create-team-CXaLcylp.cjs.map} +1 -1
- package/dist/{create-team-zHz00C6Q.js → create-team-nm06goO5.js} +14 -5
- package/dist/{create-team-zHz00C6Q.js.map → create-team-nm06goO5.js.map} +1 -1
- package/dist/discover-dataset-fields-BEnyqPSq.js +156 -0
- package/dist/discover-dataset-fields-BEnyqPSq.js.map +1 -0
- package/dist/discover-dataset-fields-Cl7HpVkm.cjs +180 -0
- package/dist/discover-dataset-fields-Cl7HpVkm.cjs.map +1 -0
- package/dist/errors-BtJEw2Z-.cjs +38 -0
- package/dist/errors-BtJEw2Z-.cjs.map +1 -0
- package/dist/errors-D_R568zP.js +26 -0
- package/dist/errors-D_R568zP.js.map +1 -0
- package/dist/errors.cjs +2 -1
- package/dist/errors.d.cts +10 -2
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.ts +10 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -2
- package/dist/fetch-utils-CTLoW1R8.d.cts +33 -0
- package/dist/fetch-utils-CTLoW1R8.d.cts.map +1 -0
- package/dist/fetch-utils-C_Xj921x.js +52 -0
- package/dist/fetch-utils-C_Xj921x.js.map +1 -0
- package/dist/fetch-utils-DkcYwqBo.cjs +64 -0
- package/dist/fetch-utils-DkcYwqBo.cjs.map +1 -0
- package/dist/fetch-utils-JDZw4XaU.d.ts +33 -0
- package/dist/fetch-utils-JDZw4XaU.d.ts.map +1 -0
- package/dist/{find-dsns-BoEP0N7B.js → find-dsns-C3G5aBm1.js} +3 -3
- package/dist/{find-dsns-BoEP0N7B.js.map → find-dsns-C3G5aBm1.js.map} +1 -1
- package/dist/{find-dsns-CK59RaUJ.cjs → find-dsns-vQolGM7e.cjs} +3 -3
- package/dist/{find-dsns-CK59RaUJ.cjs.map → find-dsns-vQolGM7e.cjs.map} +1 -1
- package/dist/{find-organizations-BrdMfZRO.cjs → find-organizations-BDtHkcFV.cjs} +3 -3
- package/dist/find-organizations-BDtHkcFV.cjs.map +1 -0
- package/dist/{find-organizations-ojXwWWzk.js → find-organizations-Cs1GvZtJ.js} +3 -3
- package/dist/find-organizations-Cs1GvZtJ.js.map +1 -0
- package/dist/{find-projects-fcLG4KpT.js → find-projects-B0NdOjBO.js} +4 -4
- package/dist/{find-projects-fcLG4KpT.js.map → find-projects-B0NdOjBO.js.map} +1 -1
- package/dist/{find-projects-BZWhlYJh.cjs → find-projects-xM2L0U1W.cjs} +4 -4
- package/dist/{find-projects-BZWhlYJh.cjs.map → find-projects-xM2L0U1W.cjs.map} +1 -1
- package/dist/{find-releases-CZCVEOHZ.cjs → find-releases-BBTYr5Bx.cjs} +3 -3
- package/dist/{find-releases-CZCVEOHZ.cjs.map → find-releases-BBTYr5Bx.cjs.map} +1 -1
- package/dist/{find-releases-BUozr0Z-.js → find-releases-BO2OF_uR.js} +3 -3
- package/dist/{find-releases-BUozr0Z-.js.map → find-releases-BO2OF_uR.js.map} +1 -1
- package/dist/{find-teams-CnU5x9rQ.cjs → find-teams-B237Aq8U.cjs} +4 -4
- package/dist/{find-teams-CnU5x9rQ.cjs.map → find-teams-B237Aq8U.cjs.map} +1 -1
- package/dist/{find-teams-BZ118EIK.js → find-teams-CqUwp0EI.js} +4 -4
- package/dist/{find-teams-BZ118EIK.js.map → find-teams-CqUwp0EI.js.map} +1 -1
- package/dist/formatters-B3ONbRhI.js +79 -0
- package/dist/formatters-B3ONbRhI.js.map +1 -0
- package/dist/formatters-CfeBjhXZ.cjs +235 -0
- package/dist/formatters-CfeBjhXZ.cjs.map +1 -0
- package/dist/formatters-DSYXBiQx.js +217 -0
- package/dist/formatters-DSYXBiQx.js.map +1 -0
- package/dist/formatters-DbqofIoy.cjs +85 -0
- package/dist/formatters-DbqofIoy.cjs.map +1 -0
- package/dist/{formatting-CcTK2X8V.d.cts → formatting-BxyhA4G3.d.cts} +4 -4
- package/dist/formatting-BxyhA4G3.d.cts.map +1 -0
- package/dist/{formatting-D0Aki7rK.cjs → formatting-C180PVwd.cjs} +3 -3
- package/dist/formatting-C180PVwd.cjs.map +1 -0
- package/dist/{formatting-vtXxusbn.d.ts → formatting-C80LN9iK.d.ts} +4 -4
- package/dist/formatting-C80LN9iK.d.ts.map +1 -0
- package/dist/{formatting-Bvyded57.js → formatting-DIvCVunN.js} +3 -3
- package/dist/formatting-DIvCVunN.js.map +1 -0
- package/dist/{formatting-utils-DgOyTl-m.js → formatting-utils-C3sej5ER.js} +1 -1
- package/dist/{formatting-utils-DgOyTl-m.js.map → formatting-utils-C3sej5ER.js.map} +1 -1
- package/dist/{formatting-utils-m9R5bsRU.cjs → formatting-utils-DDz14xeB.cjs} +1 -1
- package/dist/{formatting-utils-m9R5bsRU.cjs.map → formatting-utils-DDz14xeB.cjs.map} +1 -1
- package/dist/{get-doc-DaTCenOE.cjs → get-doc-BfMg0GIa.cjs} +4 -4
- package/dist/{get-doc-DaTCenOE.cjs.map → get-doc-BfMg0GIa.cjs.map} +1 -1
- package/dist/{get-doc-YTiQznr1.js → get-doc-DyqJe6TP.js} +4 -4
- package/dist/{get-doc-YTiQznr1.js.map → get-doc-DyqJe6TP.js.map} +1 -1
- package/dist/{get-event-attachment-DVCPpUMj.js → get-event-attachment-B-ElqztF.js} +3 -3
- package/dist/{get-event-attachment-DVCPpUMj.js.map → get-event-attachment-B-ElqztF.js.map} +1 -1
- package/dist/{get-event-attachment-C-ig2-3F.cjs → get-event-attachment-o0oH43Tv.cjs} +3 -3
- package/dist/{get-event-attachment-C-ig2-3F.cjs.map → get-event-attachment-o0oH43Tv.cjs.map} +1 -1
- package/dist/{get-issue-details-lBrYR9yx.cjs → get-issue-details-CP_RyCpt.cjs} +27 -20
- package/dist/get-issue-details-CP_RyCpt.cjs.map +1 -0
- package/dist/{get-issue-details-Dcmzxknx.js → get-issue-details-CzroF7HR.js} +27 -20
- package/dist/get-issue-details-CzroF7HR.js.map +1 -0
- package/dist/handler-BGhr9FJM.d.cts +15 -0
- package/dist/handler-BGhr9FJM.d.cts.map +1 -0
- package/dist/handler-BH_OLIbD.cjs +152 -0
- package/dist/handler-BH_OLIbD.cjs.map +1 -0
- package/dist/handler-BPPTAi7I.d.ts +15 -0
- package/dist/handler-BPPTAi7I.d.ts.map +1 -0
- package/dist/handler-BZ3hKPb8.d.cts +15 -0
- package/dist/handler-BZ3hKPb8.d.cts.map +1 -0
- package/dist/handler-O9fYgC9a.cjs +114 -0
- package/dist/handler-O9fYgC9a.cjs.map +1 -0
- package/dist/handler-aE_8mEm7.js +146 -0
- package/dist/handler-aE_8mEm7.js.map +1 -0
- package/dist/handler-cUB6XcUV.d.ts +15 -0
- package/dist/handler-cUB6XcUV.d.ts.map +1 -0
- package/dist/handler-ykkULTZ-.js +108 -0
- package/dist/handler-ykkULTZ-.js.map +1 -0
- package/dist/index.cjs +54 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +54 -44
- package/dist/index.js.map +1 -1
- package/dist/internal/fetch-utils.cjs +3 -2
- package/dist/internal/fetch-utils.d.cts +2 -2
- package/dist/internal/fetch-utils.d.ts +2 -2
- package/dist/internal/fetch-utils.js +2 -2
- package/dist/internal/formatting.cjs +2 -2
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +5 -5
- package/dist/internal/formatting.js +2 -2
- package/dist/internal/issue-helpers.cjs +2 -1
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/issue-helpers.js +2 -1
- package/dist/internal/test-fixtures.d.cts +164 -164
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +38 -38
- package/dist/internal/test-fixtures.d.ts.map +1 -1
- package/dist/{issue-helpers-CqqYnwYE.js → issue-helpers-CRx45FYG.js} +15 -19
- package/dist/issue-helpers-CRx45FYG.js.map +1 -0
- package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -1
- package/dist/{issue-helpers-BJffpNoO.d.ts → issue-helpers-D1_Uqr-F.d.ts} +1 -1
- package/dist/issue-helpers-D1_Uqr-F.d.ts.map +1 -0
- package/dist/{issue-helpers-DyAIO0w6.cjs → issue-helpers-s5fKLwJZ.cjs} +14 -19
- package/dist/issue-helpers-s5fKLwJZ.cjs.map +1 -0
- package/dist/{logging-CX2buXiG.cjs → logging-BpL53bY6.cjs} +1 -1
- package/dist/{logging-CX2buXiG.cjs.map → logging-BpL53bY6.cjs.map} +1 -1
- package/dist/{logging-DzxYBMrn.js → logging-tGU_SYcA.js} +1 -1
- package/dist/{logging-DzxYBMrn.js.map → logging-tGU_SYcA.js.map} +1 -1
- package/dist/logging.cjs +1 -1
- package/dist/logging.js +1 -1
- package/dist/lookup-otel-semantics-BbriXZAx.cjs +5088 -0
- package/dist/lookup-otel-semantics-BbriXZAx.cjs.map +1 -0
- package/dist/lookup-otel-semantics-Dt667kdR.js +5076 -0
- package/dist/lookup-otel-semantics-Dt667kdR.js.map +1 -0
- package/dist/{promptDefinitions-C29BWGYg.cjs → promptDefinitions-5V4-M69A.cjs} +2 -2
- package/dist/{promptDefinitions-C29BWGYg.cjs.map → promptDefinitions-5V4-M69A.cjs.map} +1 -1
- package/dist/{promptDefinitions-D3GTBGLr.d.ts → promptDefinitions-DehpwJfn.d.ts} +1 -1
- package/dist/promptDefinitions-DehpwJfn.d.ts.map +1 -0
- package/dist/{promptDefinitions-CSKE8T0a.js → promptDefinitions-DyshsF51.js} +2 -2
- package/dist/{promptDefinitions-CSKE8T0a.js.map → promptDefinitions-DyshsF51.js.map} +1 -1
- package/dist/promptDefinitions.cjs +2 -2
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-Df3i1XSB.cjs → prompts-BTtNbKQR.cjs} +7 -5
- package/dist/prompts-BTtNbKQR.cjs.map +1 -0
- package/dist/{prompts-C8Y9w5c4.js → prompts-CYcvIxWR.js} +7 -5
- package/dist/prompts-CYcvIxWR.js.map +1 -0
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +1 -1
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +2 -2
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -2
- package/dist/resources-CSxBC9gs.js +60 -0
- package/dist/resources-CSxBC9gs.js.map +1 -0
- package/dist/resources-TCvijqOA.cjs +72 -0
- package/dist/resources-TCvijqOA.cjs.map +1 -0
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +2 -2
- package/dist/{schema-3NeMWRAm.d.cts → schema-BlkWypl3.d.ts} +155 -155
- package/dist/schema-BlkWypl3.d.ts.map +1 -0
- package/dist/{schema-DtsnsxMl.js → schema-Bv2fvxgy.js} +2 -2
- package/dist/{schema-DtsnsxMl.js.map → schema-Bv2fvxgy.js.map} +1 -1
- package/dist/{schema-B_cMyyJJ.cjs → schema-C0LznFvu.cjs} +4 -4
- package/dist/schema-C0LznFvu.cjs.map +1 -0
- package/dist/{schema-WDk5Yqww.js → schema-CcFmBoEf.js} +4 -4
- package/dist/schema-CcFmBoEf.js.map +1 -0
- package/dist/{schema-B3CzDGJk.d.ts → schema-CdDcpvrp.d.cts} +375 -375
- package/dist/schema-CdDcpvrp.d.cts.map +1 -0
- package/dist/{schema-BpJVmev8.cjs → schema-DPL_hZXP.cjs} +2 -2
- package/dist/{schema-BpJVmev8.cjs.map → schema-DPL_hZXP.cjs.map} +1 -1
- package/dist/schema.cjs +1 -1
- package/dist/schema.js +1 -1
- package/dist/{search-docs-D5Foht_0.cjs → search-docs-CjIZDaD1.cjs} +4 -4
- package/dist/{search-docs-D5Foht_0.cjs.map → search-docs-CjIZDaD1.cjs.map} +1 -1
- package/dist/{search-docs-BLbB_GV2.js → search-docs-ss09Dt0F.js} +4 -4
- package/dist/{search-docs-BLbB_GV2.js.map → search-docs-ss09Dt0F.js.map} +1 -1
- package/dist/search-issues-BFgCvRYe.js +0 -0
- package/dist/search-issues-Biu64RkQ.cjs +0 -0
- package/dist/{seer-utils-CDm5J8ur.cjs → seer-utils-C7Kv0gr8.cjs} +15 -1
- package/dist/seer-utils-C7Kv0gr8.cjs.map +1 -0
- package/dist/{seer-utils-Cj9DXrow.js → seer-utils-NPHv8KYY.js} +4 -2
- package/dist/seer-utils-NPHv8KYY.js.map +1 -0
- package/dist/{server-BSRxzYFd.js → server-D78x_7Vz.js} +80 -26
- package/dist/server-D78x_7Vz.js.map +1 -0
- package/dist/{server-Dgkqz8bA.cjs → server-DYFiTMLB.cjs} +80 -26
- package/dist/server-DYFiTMLB.cjs.map +1 -0
- package/dist/server.cjs +52 -40
- package/dist/server.d.cts +4 -2
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +5 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +52 -40
- package/dist/{stdio-BQAm0Liz.cjs → stdio-Be01KQkA.cjs} +3 -3
- package/dist/{stdio-BQAm0Liz.cjs.map → stdio-Be01KQkA.cjs.map} +1 -1
- package/dist/{stdio-BcihaDjO.js → stdio-CDb2NHHD.js} +3 -3
- package/dist/{stdio-BcihaDjO.js.map → stdio-CDb2NHHD.js.map} +1 -1
- package/dist/test-setup.cjs +371 -0
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +371 -0
- package/dist/test-setup.js.map +1 -1
- package/dist/toolDefinitions.cjs +184 -0
- package/dist/toolDefinitions.cjs.map +1 -0
- package/dist/toolDefinitions.d.cts +13 -0
- package/dist/toolDefinitions.d.cts.map +1 -0
- package/dist/toolDefinitions.d.ts +8 -20
- package/dist/toolDefinitions.d.ts.map +1 -0
- package/dist/toolDefinitions.js +183 -1059
- package/dist/toolDefinitions.js.map +1 -0
- package/dist/tools/analyze-issue-with-seer.cjs +14 -12
- package/dist/tools/analyze-issue-with-seer.d.cts +2 -2
- package/dist/tools/analyze-issue-with-seer.d.ts +3 -3
- package/dist/tools/analyze-issue-with-seer.js +14 -12
- package/dist/tools/create-dsn.cjs +9 -8
- package/dist/tools/create-dsn.d.cts +2 -2
- package/dist/tools/create-dsn.d.ts +3 -3
- package/dist/tools/create-dsn.js +9 -8
- package/dist/tools/create-project.cjs +10 -9
- package/dist/tools/create-project.d.cts +2 -2
- package/dist/tools/create-project.d.ts +3 -3
- package/dist/tools/create-project.js +10 -9
- package/dist/tools/create-team.cjs +9 -8
- package/dist/tools/create-team.d.cts +2 -2
- package/dist/tools/create-team.d.ts +3 -3
- package/dist/tools/create-team.js +9 -8
- package/dist/tools/find-dsns.cjs +9 -8
- package/dist/tools/find-dsns.d.cts +2 -2
- package/dist/tools/find-dsns.d.ts +3 -3
- package/dist/tools/find-dsns.js +9 -8
- package/dist/tools/find-organizations.cjs +8 -7
- package/dist/tools/find-organizations.d.cts +2 -2
- package/dist/tools/find-organizations.d.ts +3 -3
- package/dist/tools/find-organizations.js +8 -7
- package/dist/tools/find-projects.cjs +9 -8
- package/dist/tools/find-projects.d.cts +2 -2
- package/dist/tools/find-projects.d.ts +3 -3
- package/dist/tools/find-projects.js +9 -8
- package/dist/tools/find-releases.cjs +9 -8
- package/dist/tools/find-releases.d.cts +2 -2
- package/dist/tools/find-releases.d.ts +3 -3
- package/dist/tools/find-releases.js +9 -8
- package/dist/tools/find-teams.cjs +9 -8
- package/dist/tools/find-teams.d.cts +2 -2
- package/dist/tools/find-teams.d.ts +3 -3
- package/dist/tools/find-teams.js +9 -8
- package/dist/tools/get-doc.cjs +9 -8
- package/dist/tools/get-doc.d.cts +2 -2
- package/dist/tools/get-doc.d.ts +3 -3
- package/dist/tools/get-doc.js +9 -8
- package/dist/tools/get-event-attachment.cjs +9 -8
- package/dist/tools/get-event-attachment.d.cts +2 -2
- package/dist/tools/get-event-attachment.d.ts +3 -3
- package/dist/tools/get-event-attachment.js +9 -8
- package/dist/tools/get-issue-details.cjs +13 -12
- package/dist/tools/get-issue-details.d.cts +2 -2
- package/dist/tools/get-issue-details.d.ts +3 -3
- package/dist/tools/get-issue-details.js +13 -12
- package/dist/tools/index.cjs +47 -36
- package/dist/tools/index.d.cts +74 -86
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +15 -27
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +47 -36
- package/dist/tools/search-docs.cjs +10 -8
- package/dist/tools/search-docs.d.cts +2 -2
- package/dist/tools/search-docs.d.ts +3 -3
- package/dist/tools/search-docs.js +10 -8
- package/dist/tools/search-events/agent.cjs +8 -0
- package/dist/tools/search-events/agent.d.cts +43 -0
- package/dist/tools/search-events/agent.d.cts.map +1 -0
- package/dist/tools/search-events/agent.d.ts +43 -0
- package/dist/tools/search-events/agent.d.ts.map +1 -0
- package/dist/tools/search-events/agent.js +8 -0
- package/dist/tools/search-events/config.cjs +7 -0
- package/dist/tools/search-events/config.d.cts +131 -0
- package/dist/tools/search-events/config.d.cts.map +1 -0
- package/dist/tools/search-events/config.d.ts +131 -0
- package/dist/tools/search-events/config.d.ts.map +1 -0
- package/dist/tools/search-events/config.js +3 -0
- package/dist/tools/search-events/formatters.cjs +8 -0
- package/dist/tools/search-events/formatters.d.cts +32 -0
- package/dist/tools/search-events/formatters.d.cts.map +1 -0
- package/dist/tools/search-events/formatters.d.ts +32 -0
- package/dist/tools/search-events/formatters.d.ts.map +1 -0
- package/dist/tools/search-events/formatters.js +6 -0
- package/dist/tools/search-events/handler.cjs +20 -0
- package/dist/tools/search-events/handler.d.cts +5 -0
- package/dist/tools/search-events/handler.d.ts +5 -0
- package/dist/tools/search-events/handler.js +20 -0
- package/dist/tools/search-events/index.cjs +21 -0
- package/dist/tools/search-events/index.d.cts +5 -0
- package/dist/tools/search-events/index.d.ts +5 -0
- package/dist/tools/search-events/index.js +21 -0
- package/dist/tools/search-events/utils.cjs +9 -0
- package/dist/tools/search-events/utils.d.cts +6 -0
- package/dist/tools/search-events/utils.d.ts +6 -0
- package/dist/tools/search-events/utils.js +5 -0
- package/dist/tools/search-issues/agent.cjs +7 -0
- package/dist/tools/search-issues/agent.d.cts +33 -0
- package/dist/tools/search-issues/agent.d.cts.map +1 -0
- package/dist/tools/search-issues/agent.d.ts +33 -0
- package/dist/tools/search-issues/agent.d.ts.map +1 -0
- package/dist/tools/search-issues/agent.js +7 -0
- package/dist/tools/search-issues/config.cjs +3 -0
- package/dist/tools/search-issues/config.d.cts +9 -0
- package/dist/tools/search-issues/config.d.cts.map +1 -0
- package/dist/tools/search-issues/config.d.ts +9 -0
- package/dist/tools/search-issues/config.d.ts.map +1 -0
- package/dist/tools/search-issues/config.js +3 -0
- package/dist/tools/search-issues/formatters.cjs +4 -0
- package/dist/tools/search-issues/formatters.d.cts +15 -0
- package/dist/tools/search-issues/formatters.d.cts.map +1 -0
- package/dist/tools/search-issues/formatters.d.ts +15 -0
- package/dist/tools/search-issues/formatters.d.ts.map +1 -0
- package/dist/tools/search-issues/formatters.js +4 -0
- package/dist/tools/search-issues/handler.cjs +18 -0
- package/dist/tools/search-issues/handler.d.cts +5 -0
- package/dist/tools/search-issues/handler.d.ts +5 -0
- package/dist/tools/search-issues/handler.js +18 -0
- package/dist/tools/search-issues/index.cjs +19 -0
- package/dist/tools/search-issues/index.d.cts +5 -0
- package/dist/tools/search-issues/index.d.ts +5 -0
- package/dist/tools/search-issues/index.js +19 -0
- package/dist/tools/types.d.cts +2 -2
- package/dist/tools/types.d.ts +3 -3
- package/dist/tools/update-issue.cjs +14 -13
- package/dist/tools/update-issue.d.cts +2 -2
- package/dist/tools/update-issue.d.ts +3 -3
- package/dist/tools/update-issue.js +14 -13
- package/dist/tools/update-project.cjs +10 -9
- package/dist/tools/update-project.d.cts +2 -2
- package/dist/tools/update-project.d.ts +3 -3
- package/dist/tools/update-project.js +10 -9
- package/dist/tools/utils/api-utils.cjs +10 -7
- package/dist/tools/utils/api-utils.d.cts +23 -6
- package/dist/tools/utils/api-utils.d.cts.map +1 -1
- package/dist/tools/utils/api-utils.d.ts +25 -8
- package/dist/tools/utils/api-utils.d.ts.map +1 -1
- package/dist/tools/utils/api-utils.js +8 -7
- package/dist/tools/utils/defineTool.d.cts +2 -2
- package/dist/tools/utils/defineTool.d.ts +3 -3
- package/dist/tools/utils/fetch-utils.cjs +4 -3
- package/dist/tools/utils/fetch-utils.d.cts +2 -2
- package/dist/tools/utils/fetch-utils.d.ts +2 -2
- package/dist/tools/utils/fetch-utils.js +3 -3
- package/dist/tools/utils/formatting-utils.cjs +1 -1
- package/dist/tools/utils/formatting-utils.d.cts +3 -3
- package/dist/tools/utils/formatting-utils.d.ts +4 -4
- package/dist/tools/utils/formatting-utils.js +1 -1
- package/dist/tools/utils/issue-utils.cjs +5 -4
- package/dist/tools/utils/issue-utils.d.cts +4 -4
- package/dist/tools/utils/issue-utils.d.ts +6 -6
- package/dist/tools/utils/issue-utils.js +5 -4
- package/dist/tools/utils/seer-utils.cjs +3 -1
- package/dist/tools/utils/seer-utils.d.cts +6 -4
- package/dist/tools/utils/seer-utils.d.cts.map +1 -1
- package/dist/tools/utils/seer-utils.d.ts +7 -5
- package/dist/tools/utils/seer-utils.d.ts.map +1 -1
- package/dist/tools/utils/seer-utils.js +2 -2
- package/dist/tools/whoami.cjs +8 -7
- package/dist/tools/whoami.d.cts +2 -2
- package/dist/tools/whoami.d.ts +3 -3
- package/dist/tools/whoami.js +8 -7
- package/dist/tools-DvKm5uMs.js +44 -0
- package/dist/tools-DvKm5uMs.js.map +1 -0
- package/dist/tools-sQ2wM3Pi.cjs +49 -0
- package/dist/tools-sQ2wM3Pi.cjs.map +1 -0
- package/dist/transports/stdio.cjs +53 -42
- package/dist/transports/stdio.d.cts +1 -1
- package/dist/transports/stdio.d.ts +2 -2
- package/dist/transports/stdio.js +53 -42
- package/dist/types-6zHoEWAx.js +0 -0
- package/dist/{types-DpV1JAZj.d.ts → types-B-8S69No.d.ts} +2 -2
- package/dist/{types-DpV1JAZj.d.ts.map → types-B-8S69No.d.ts.map} +1 -1
- package/dist/{types-qB8a4WQT.d.ts → types-BOcoP3Na.d.ts} +2 -2
- package/dist/{types-qB8a4WQT.d.ts.map → types-BOcoP3Na.d.ts.map} +1 -1
- package/dist/{types-CUN-2OSS.d.cts → types-BV-G5sBp.d.cts} +4 -2
- package/dist/{types-CUN-2OSS.d.cts.map → types-BV-G5sBp.d.cts.map} +1 -1
- package/dist/{types-BoMP-Ro6.d.cts → types-BYtO24VE.d.cts} +2 -2
- package/dist/{types-BoMP-Ro6.d.cts.map → types-BYtO24VE.d.cts.map} +1 -1
- package/dist/{types-DkJtNDXU.d.ts → types-C1Fih0eQ.d.ts} +5 -3
- package/dist/{types-DkJtNDXU.d.ts.map → types-C1Fih0eQ.d.ts.map} +1 -1
- package/dist/types-DdloOYgD.cjs +0 -0
- package/dist/{types-D_mx318Q.d.cts → types-aOEJ0KgQ.d.cts} +2 -2
- package/dist/{types-D_mx318Q.d.cts.map → types-aOEJ0KgQ.d.cts.map} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/{update-issue-DpkxxiNk.cjs → update-issue-D77PudUi.cjs} +20 -13
- package/dist/update-issue-D77PudUi.cjs.map +1 -0
- package/dist/{update-issue-DRTQvy6p.js → update-issue-ndy2PF5G.js} +20 -13
- package/dist/update-issue-ndy2PF5G.js.map +1 -0
- package/dist/{update-project-YLxt2ry2.js → update-project-Bxsi-BG_.js} +5 -5
- package/dist/{update-project-YLxt2ry2.js.map → update-project-Bxsi-BG_.js.map} +1 -1
- package/dist/{update-project-DLDDbcGY.cjs → update-project-DqECtbDA.cjs} +5 -5
- package/dist/{update-project-DLDDbcGY.cjs.map → update-project-DqECtbDA.cjs.map} +1 -1
- package/dist/url-utils-IqgSmI-B.js +152 -0
- package/dist/url-utils-IqgSmI-B.js.map +1 -0
- package/dist/url-utils-vJo2ER5v.cjs +206 -0
- package/dist/url-utils-vJo2ER5v.cjs.map +1 -0
- package/dist/utils/url-utils.cjs +6 -1
- package/dist/utils/url-utils.d.cts +43 -1
- package/dist/utils/url-utils.d.cts.map +1 -1
- package/dist/utils/url-utils.d.ts +43 -1
- package/dist/utils/url-utils.d.ts.map +1 -1
- package/dist/utils/url-utils.js +2 -2
- package/dist/utils-BwXbSgEI.d.ts +35 -0
- package/dist/utils-BwXbSgEI.d.ts.map +1 -0
- package/dist/utils-CqbeJfE1.cjs +138 -0
- package/dist/utils-CqbeJfE1.cjs.map +1 -0
- package/dist/utils-CtBGHj_N.d.cts +35 -0
- package/dist/utils-CtBGHj_N.d.cts.map +1 -0
- package/dist/utils-OgYE-imr.js +108 -0
- package/dist/utils-OgYE-imr.js.map +1 -0
- package/dist/version-Bj68uyCt.js +6 -0
- package/dist/{version-CcTnFB56.js.map → version-Bj68uyCt.js.map} +1 -1
- package/dist/{version-rDjaSkPw.cjs → version-CMS1IOUV.cjs} +2 -2
- package/dist/{version-rDjaSkPw.cjs.map → version-CMS1IOUV.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/{whoami-CEgbTUqt.cjs → whoami-BOJHfdih.cjs} +2 -2
- package/dist/{whoami-CEgbTUqt.cjs.map → whoami-BOJHfdih.cjs.map} +1 -1
- package/dist/{whoami-DesNZnaQ.js → whoami-Bswhb72a.js} +2 -2
- package/dist/{whoami-DesNZnaQ.js.map → whoami-Bswhb72a.js.map} +1 -1
- package/dist/whoami-CoZJKpys.cjs +44 -0
- package/dist/whoami-CoZJKpys.cjs.map +1 -0
- package/dist/whoami-xBAWvzG4.js +32 -0
- package/dist/whoami-xBAWvzG4.js.map +1 -0
- package/package.json +14 -7
- package/dist/analyze-issue-with-seer-BkVrrh28.cjs.map +0 -1
- package/dist/analyze-issue-with-seer-CoqsTklL.js.map +0 -1
- package/dist/api-utils-C6QJAzFL.js +0 -31
- package/dist/api-utils-C6QJAzFL.js.map +0 -1
- package/dist/api-utils-d36iteNO.cjs +0 -36
- package/dist/api-utils-d36iteNO.cjs.map +0 -1
- package/dist/client-CQ9Xe1aN.d.cts.map +0 -1
- package/dist/client-DOYWNvVM.js.map +0 -1
- package/dist/client-Dkw5iYu3.cjs.map +0 -1
- package/dist/client-VCJp6Kcu.d.ts.map +0 -1
- package/dist/create-dsn-D530I7Lr.js.map +0 -1
- package/dist/create-dsn-Dz8nyTFw.cjs.map +0 -1
- package/dist/create-project-BxzRiryg.cjs.map +0 -1
- package/dist/create-project-K1od5Rhx.js.map +0 -1
- package/dist/errors-CIoxzIug.js +0 -15
- package/dist/errors-CIoxzIug.js.map +0 -1
- package/dist/errors-YmiXLOyx.cjs +0 -21
- package/dist/errors-YmiXLOyx.cjs.map +0 -1
- package/dist/fetch-utils-BMKjO-cc.js +0 -29
- package/dist/fetch-utils-BMKjO-cc.js.map +0 -1
- package/dist/fetch-utils-Bv9WjUp0.d.ts +0 -14
- package/dist/fetch-utils-Bv9WjUp0.d.ts.map +0 -1
- package/dist/fetch-utils-DzdRW4Yd.d.cts +0 -14
- package/dist/fetch-utils-DzdRW4Yd.d.cts.map +0 -1
- package/dist/fetch-utils-oab6uNp3.cjs +0 -35
- package/dist/fetch-utils-oab6uNp3.cjs.map +0 -1
- package/dist/find-errors-C3oUMeRi.js +0 -91
- package/dist/find-errors-C3oUMeRi.js.map +0 -1
- package/dist/find-errors-CB9NpSxG.cjs +0 -97
- package/dist/find-errors-CB9NpSxG.cjs.map +0 -1
- package/dist/find-issues-C3uk59rn.cjs +0 -98
- package/dist/find-issues-C3uk59rn.cjs.map +0 -1
- package/dist/find-issues-CAtNGBly.js +0 -92
- package/dist/find-issues-CAtNGBly.js.map +0 -1
- package/dist/find-organizations-BrdMfZRO.cjs.map +0 -1
- package/dist/find-organizations-ojXwWWzk.js.map +0 -1
- package/dist/find-tags-Byk4d3oZ.cjs +0 -45
- package/dist/find-tags-Byk4d3oZ.cjs.map +0 -1
- package/dist/find-tags-d-wF1Se8.js +0 -39
- package/dist/find-tags-d-wF1Se8.js.map +0 -1
- package/dist/find-transactions-BiBgg-AE.js +0 -83
- package/dist/find-transactions-BiBgg-AE.js.map +0 -1
- package/dist/find-transactions-DuZyqjhF.cjs +0 -89
- package/dist/find-transactions-DuZyqjhF.cjs.map +0 -1
- package/dist/formatting-Bvyded57.js.map +0 -1
- package/dist/formatting-CcTK2X8V.d.cts.map +0 -1
- package/dist/formatting-D0Aki7rK.cjs.map +0 -1
- package/dist/formatting-vtXxusbn.d.ts.map +0 -1
- package/dist/get-issue-details-Dcmzxknx.js.map +0 -1
- package/dist/get-issue-details-lBrYR9yx.cjs.map +0 -1
- package/dist/issue-helpers-BJffpNoO.d.ts.map +0 -1
- package/dist/issue-helpers-CqqYnwYE.js.map +0 -1
- package/dist/issue-helpers-DyAIO0w6.cjs.map +0 -1
- package/dist/promptDefinitions-D3GTBGLr.d.ts.map +0 -1
- package/dist/prompts-C8Y9w5c4.js.map +0 -1
- package/dist/prompts-Df3i1XSB.cjs.map +0 -1
- package/dist/resources-BHF8a1ZB.js +0 -92
- package/dist/resources-BHF8a1ZB.js.map +0 -1
- package/dist/resources-BM_YQGcb.cjs +0 -104
- package/dist/resources-BM_YQGcb.cjs.map +0 -1
- package/dist/schema-3NeMWRAm.d.cts.map +0 -1
- package/dist/schema-B3CzDGJk.d.ts.map +0 -1
- package/dist/schema-B_cMyyJJ.cjs.map +0 -1
- package/dist/schema-WDk5Yqww.js.map +0 -1
- package/dist/seer-utils-CDm5J8ur.cjs.map +0 -1
- package/dist/seer-utils-Cj9DXrow.js.map +0 -1
- package/dist/server-BSRxzYFd.js.map +0 -1
- package/dist/server-Dgkqz8bA.cjs.map +0 -1
- package/dist/tools/find-errors.cjs +0 -12
- package/dist/tools/find-errors.d.cts +0 -18
- package/dist/tools/find-errors.d.cts.map +0 -1
- package/dist/tools/find-errors.d.ts +0 -18
- package/dist/tools/find-errors.d.ts.map +0 -1
- package/dist/tools/find-errors.js +0 -12
- package/dist/tools/find-issues.cjs +0 -12
- package/dist/tools/find-issues.d.cts +0 -16
- package/dist/tools/find-issues.d.cts.map +0 -1
- package/dist/tools/find-issues.d.ts +0 -16
- package/dist/tools/find-issues.d.ts.map +0 -1
- package/dist/tools/find-issues.js +0 -12
- package/dist/tools/find-tags.cjs +0 -12
- package/dist/tools/find-tags.d.cts +0 -13
- package/dist/tools/find-tags.d.cts.map +0 -1
- package/dist/tools/find-tags.d.ts +0 -13
- package/dist/tools/find-tags.d.ts.map +0 -1
- package/dist/tools/find-tags.js +0 -12
- package/dist/tools/find-transactions.cjs +0 -12
- package/dist/tools/find-transactions.d.cts +0 -17
- package/dist/tools/find-transactions.d.cts.map +0 -1
- package/dist/tools/find-transactions.d.ts +0 -17
- package/dist/tools/find-transactions.d.ts.map +0 -1
- package/dist/tools/find-transactions.js +0 -12
- package/dist/tools-CHnZvVEN.cjs +0 -53
- package/dist/tools-CHnZvVEN.cjs.map +0 -1
- package/dist/tools-CdXGgq1W.js +0 -48
- package/dist/tools-CdXGgq1W.js.map +0 -1
- package/dist/update-issue-DRTQvy6p.js.map +0 -1
- package/dist/update-issue-DpkxxiNk.cjs.map +0 -1
- package/dist/url-utils-C9hykWmk.cjs +0 -106
- package/dist/url-utils-C9hykWmk.cjs.map +0 -1
- package/dist/url-utils-DvZYfzPM.js +0 -82
- package/dist/url-utils-DvZYfzPM.js.map +0 -1
- package/dist/version-CcTnFB56.js +0 -6
- /package/dist/{api-client-CL1WDkw9.cjs → api-client-BWt6M7ij.cjs} +0 -0
- /package/dist/{api-client-ChL_0F2u.js → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{fetch-utils-C0F4eH6S.cjs → fetch-utils-BqMx2KQr.js} +0 -0
- /package/dist/{fetch-utils-DlPjrSk2.js → fetch-utils-DeZcERfe.cjs} +0 -0
- /package/dist/{index-DVGDAddE.d.ts → index-DE1muTvw.d.ts} +0 -0
- /package/dist/{issue-utils-BbCfbiY8.js → issue-utils-BVAB6I-Z.js} +0 -0
- /package/dist/{issue-utils-DMKiif6C.cjs → issue-utils-pdbo-5LW.cjs} +0 -0
- /package/dist/{types-CCHsZshF.js → search-events-BBFPuvRq.cjs} +0 -0
- /package/dist/{types-MYBaygjr.cjs → search-events-bV3-kK78.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-issue-ndy2PF5G.js","names":["context: ServerContext"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext, withApiErrorHandling } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user (use whoami to get your user ID)\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='user:123456')\",\n \"```\",\n \"\",\n \"### Assign an issue to a team\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='team:789')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- assignedTo format: Use 'user:ID' for users (e.g., 'user:123456') or 'team:ID' for teams (e.g., 'team:789')\",\n \"- To find your user ID, first use the whoami tool which returns your numeric user ID\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // Get current issue details first\n const currentIssue = await withApiErrorHandling(\n () =>\n apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n },\n );\n\n // Update the issue\n const updatedIssue = await withApiErrorHandling(\n () =>\n apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n }),\n {\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n },\n );\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAiBA,2BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,QAAQ,iBAAiB,UAAU;EACnC,YAAY,gBAAgB,UAAU;CACvC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;AAGF,OAAK,OAAO,aAAa,OAAO,QAC9B,OAAM,IAAI,eACR;AAIJ,OAAK,OAAO,aAAa,OAAO,iBAC9B,OAAM,IAAI,eACR;AAKJ,OAAK,OAAO,WAAW,OAAO,WAC5B,OAAM,IAAI,eACR;EAIJ,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,iBAAiB;GACf,kBAAkB,OAAO;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,SAAO,qBAAqB,QAAQ;EAGpC,MAAM,eAAe,MAAM,qBACzB,MACE,WAAW,SAAS;GAClB,kBAAkB;GAClB,SAAS;EACV,EAAC,EACJ;GACE,kBAAkB;GAClB,SAAS;EACV,EACF;EAGD,MAAM,eAAe,MAAM,qBACzB,MACE,WAAW,YAAY;GACrB,kBAAkB;GAClB,SAAS;GACT,QAAQ,OAAO;GACf,YAAY,OAAO;EACpB,EAAC,EACJ;GACE,kBAAkB;GAClB,SAAS;EACV,EACF;EAED,IAAI,UAAU,UAAU,aAAa,QAAQ,gBAAgB,QAAQ;AACrE,aAAW,aAAa,aAAa,MAAM;AAC3C,aAAW,WAAW,WAAW,YAAY,SAAS,aAAa,QAAQ,CAAC;AAG5E,YAAU;AAEV,MAAI,OAAO,UAAU,aAAa,WAAW,OAAO,OAClD,YAAW,cAAc,aAAa,OAAO,OAAO,OAAO,OAAO;AAGpE,MAAI,OAAO,YAAY;GACrB,MAAM,cAAc,iBAAiB,aAAa,cAAc,KAAK;GACrE,MAAM,cACJ,OAAO,eAAe,OAAO,QAAQ,OAAO;AAC9C,cAAW,mBAAmB,YAAY,OAAO,YAAY;EAC9D;AAED,YAAU;AACV,aAAW,cAAc,aAAa,OAAO;EAC7C,MAAM,kBAAkB,iBAAiB,aAAa,cAAc,KAAK;AACzE,aAAW,mBAAmB,gBAAgB;AAE9C,YAAU;AACV,aAAW;AACX,aAAW,gFAAgF,QAAQ,cAAc,aAAa,QAAQ;AAEtI,MAAI,OAAO,WAAW,WACpB,YAAW;WACF,OAAO,WAAW,UAC3B,YAAW;AAGb,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UserInputError } from "./errors-
|
|
1
|
+
import { UserInputError } from "./errors-D_R568zP.js";
|
|
2
2
|
import { defineTool } from "./defineTool-77H4nSna.js";
|
|
3
|
-
import { apiServiceFromContext } from "./api-utils-
|
|
4
|
-
import { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from "./schema-
|
|
5
|
-
import { logError } from "./logging-
|
|
3
|
+
import { apiServiceFromContext } from "./api-utils-BlUSO8xh.js";
|
|
4
|
+
import { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from "./schema-Bv2fvxgy.js";
|
|
5
|
+
import { logError } from "./logging-tGU_SYcA.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { setTag } from "@sentry/core";
|
|
8
8
|
|
|
@@ -117,4 +117,4 @@ var update_project_default = defineTool({
|
|
|
117
117
|
|
|
118
118
|
//#endregion
|
|
119
119
|
export { update_project_default };
|
|
120
|
-
//# sourceMappingURL=update-project-
|
|
120
|
+
//# sourceMappingURL=update-project-Bxsi-BG_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-Bxsi-BG_.js","names":["context: ServerContext","project: Project | undefined","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAgBA,6BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB;EAClB,WAAW,eAAe,UAAU;EACpC,aAAa;EACb,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,+BAA+B,CAAC,UAAU;EAC3E,MAAM,EACH,QAAQ,CACR,aAAa,CACb,MAAM,CACN,SAAS,gDAAgD,CACzD,UAAU;EACb,UAAU,cAAc,UAAU;EAClC,UAAU,cAAc,UAAU,CAAC,SACjC,2FACD;CACF;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,SAAO,qBAAqB,iBAAiB;AAC7C,SAAO,gBAAgB,OAAO,YAAY;AAG1C,MAAI,OAAO,UAAU;AACnB,UAAO,aAAa,OAAO,SAAS;AACpC,OAAI;AACF,UAAM,WAAW,iBAAiB;KAChC;KACA,aAAa,OAAO;KACpB,UAAU,OAAO;IAClB,EAAC;GACH,SAAQ,KAAK;AACZ,aAAS,IAAI;AACb,UAAM,IAAI,OACP,wBAAwB,OAAO,SAAS,cAAc,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;GAEtH;EACF;EAGD,MAAM,oBAAoB,OAAO,QAAQ,OAAO,QAAQ,OAAO;EAE/D,IAAIC;AACJ,MAAI,kBACF,KAAI;AACF,aAAU,MAAM,WAAW,cAAc;IACvC;IACA,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,MAAM,OAAO;IACb,UAAU,OAAO;GAClB,EAAC;EACH,SAAQ,KAAK;AACZ,YAAS,IAAI;AACb,SAAM,IAAI,OACP,2BAA2B,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;EAE3F;OACI;GAEL,MAAM,WAAW,MAAM,WAAW,aAAa,iBAAiB;AAChE,aAAU,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,YAAY;AAC7D,QAAK,QACH,OAAM,IAAI,gBAAgB,UAAU,OAAO,YAAY;EAE1D;EAED,IAAI,UAAU,yBAAyB,iBAAiB;AACxD,aAAW,UAAU,QAAQ,GAAG;AAChC,aAAW,YAAY,QAAQ,KAAK;AACpC,aAAW,YAAY,QAAQ,KAAK;AACpC,MAAI,QAAQ,SACV,YAAW,gBAAgB,QAAQ,SAAS;EAI9C,MAAMC,UAAoB,CAAE;AAC5B,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,SAAU,SAAQ,MAAM,eAAe,OAAO,SAAS,GAAG;AACrE,MAAI,OAAO,SACT,SAAQ,MAAM,sBAAsB,OAAO,SAAS,GAAG;AAEzD,MAAI,QAAQ,SAAS,GAAG;AACtB,cAAW;AACX,aAAU,QAAQ,IAAI,CAAC,YAAY,YAAY,SAAS,CAAC,KAAK,KAAK;AACnE,cAAW;EACZ;AAED,YAAU;AACV,aAAW,6CAA6C,QAAQ,KAAK;AACrE,MAAI,OAAO,SACT,YAAW,yCAAyC,OAAO,SAAS;AAEtE,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_errors = require('./errors-
|
|
2
|
+
const require_errors = require('./errors-BtJEw2Z-.cjs');
|
|
3
3
|
const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
4
|
-
const require_api_utils = require('./api-utils-
|
|
5
|
-
const require_schema = require('./schema-
|
|
6
|
-
const require_logging = require('./logging-
|
|
4
|
+
const require_api_utils = require('./api-utils-DFWUfQ83.cjs');
|
|
5
|
+
const require_schema = require('./schema-DPL_hZXP.cjs');
|
|
6
|
+
const require_logging = require('./logging-BpL53bY6.cjs');
|
|
7
7
|
const zod = require_chunk.__toESM(require("zod"));
|
|
8
8
|
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
9
9
|
|
|
@@ -123,4 +123,4 @@ Object.defineProperty(exports, 'update_project_default', {
|
|
|
123
123
|
return update_project_default;
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
-
//# sourceMappingURL=update-project-
|
|
126
|
+
//# sourceMappingURL=update-project-DqECtbDA.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-DqECtbDA.cjs","names":["ParamOrganizationSlug","ParamProjectSlug","context: ServerContext","project: Project | undefined","UserInputError","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;AAgBA,6BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkBA;EAClB,WAAW,8BAAe,UAAU;EACpC,aAAaC;EACb,MAAM,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,+BAA+B,CAAC,UAAU;EAC3E,MAAM,MACH,QAAQ,CACR,aAAa,CACb,MAAM,CACN,SAAS,gDAAgD,CACzD,UAAU;EACb,UAAU,6BAAc,UAAU;EAClC,UAAU,6BAAc,UAAU,CAAC,SACjC,2FACD;CACF;CACD,MAAM,QAAQ,QAAQC,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,4BAAO,qBAAqB,iBAAiB;AAC7C,4BAAO,gBAAgB,OAAO,YAAY;AAG1C,MAAI,OAAO,UAAU;AACnB,6BAAO,aAAa,OAAO,SAAS;AACpC,OAAI;AACF,UAAM,WAAW,iBAAiB;KAChC;KACA,aAAa,OAAO;KACpB,UAAU,OAAO;IAClB,EAAC;GACH,SAAQ,KAAK;AACZ,6BAAS,IAAI;AACb,UAAM,IAAI,OACP,wBAAwB,OAAO,SAAS,cAAc,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;GAEtH;EACF;EAGD,MAAM,oBAAoB,OAAO,QAAQ,OAAO,QAAQ,OAAO;EAE/D,IAAIC;AACJ,MAAI,kBACF,KAAI;AACF,aAAU,MAAM,WAAW,cAAc;IACvC;IACA,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,MAAM,OAAO;IACb,UAAU,OAAO;GAClB,EAAC;EACH,SAAQ,KAAK;AACZ,4BAAS,IAAI;AACb,SAAM,IAAI,OACP,2BAA2B,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;EAE3F;OACI;GAEL,MAAM,WAAW,MAAM,WAAW,aAAa,iBAAiB;AAChE,aAAU,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,YAAY;AAC7D,QAAK,QACH,OAAM,IAAIC,+BAAgB,UAAU,OAAO,YAAY;EAE1D;EAED,IAAI,UAAU,yBAAyB,iBAAiB;AACxD,aAAW,UAAU,QAAQ,GAAG;AAChC,aAAW,YAAY,QAAQ,KAAK;AACpC,aAAW,YAAY,QAAQ,KAAK;AACpC,MAAI,QAAQ,SACV,YAAW,gBAAgB,QAAQ,SAAS;EAI9C,MAAMC,UAAoB,CAAE;AAC5B,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,SAAU,SAAQ,MAAM,eAAe,OAAO,SAAS,GAAG;AACrE,MAAI,OAAO,SACT,SAAQ,MAAM,sBAAsB,OAAO,SAAS,GAAG;AAEzD,MAAI,QAAQ,SAAS,GAAG;AACtB,cAAW;AACX,aAAU,QAAQ,IAAI,CAAC,YAAY,YAAY,SAAS,CAAC,KAAK,KAAK;AACnE,cAAW;EACZ;AAED,YAAU;AACV,aAAW,6CAA6C,QAAQ,KAAK;AACrE,MAAI,OAAO,SACT,YAAW,yCAAyC,OAAO,SAAS;AAEtE,SAAO;CACR;AACF,EAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
//#region src/utils/url-utils.ts
|
|
2
|
+
/**
|
|
3
|
+
* Determines if a Sentry instance is SaaS or self-hosted based on the host.
|
|
4
|
+
* @param host The Sentry host (e.g., "sentry.io" or "sentry.company.com")
|
|
5
|
+
* @returns true if SaaS instance, false if self-hosted
|
|
6
|
+
*/
|
|
7
|
+
function isSentryHost(host) {
|
|
8
|
+
return host === "sentry.io" || host.endsWith(".sentry.io");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Generates a Sentry issue URL.
|
|
12
|
+
* @param host The Sentry host
|
|
13
|
+
* @param organizationSlug Organization identifier
|
|
14
|
+
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
15
|
+
* @returns The complete issue URL
|
|
16
|
+
*/
|
|
17
|
+
function getIssueUrl(host, organizationSlug, issueId) {
|
|
18
|
+
const isSaas = isSentryHost(host);
|
|
19
|
+
return isSaas ? `https://${organizationSlug}.${host}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generates a Sentry issues search URL.
|
|
23
|
+
* @param host The Sentry host
|
|
24
|
+
* @param organizationSlug Organization identifier
|
|
25
|
+
* @param query Optional search query
|
|
26
|
+
* @param projectSlugOrId Optional project slug or ID
|
|
27
|
+
* @returns The complete issues search URL
|
|
28
|
+
*/
|
|
29
|
+
function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
|
|
30
|
+
const isSaas = isSentryHost(host);
|
|
31
|
+
let url = isSaas ? `https://${organizationSlug}.${host}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;
|
|
32
|
+
const params = new URLSearchParams();
|
|
33
|
+
if (projectSlugOrId) params.append("project", projectSlugOrId);
|
|
34
|
+
if (query) params.append("query", query);
|
|
35
|
+
const queryString = params.toString();
|
|
36
|
+
if (queryString) url += `?${queryString}`;
|
|
37
|
+
return url;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generates a Sentry trace URL for performance investigation.
|
|
41
|
+
* @param host The Sentry host
|
|
42
|
+
* @param organizationSlug Organization identifier
|
|
43
|
+
* @param traceId Trace identifier
|
|
44
|
+
* @returns The complete trace URL
|
|
45
|
+
*/
|
|
46
|
+
function getTraceUrl(host, organizationSlug, traceId) {
|
|
47
|
+
const isSaas = isSentryHost(host);
|
|
48
|
+
return isSaas ? `https://${organizationSlug}.${host}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Generates a Sentry events explorer URL.
|
|
52
|
+
* @param host The Sentry host
|
|
53
|
+
* @param organizationSlug Organization identifier
|
|
54
|
+
* @param query Search query
|
|
55
|
+
* @param dataset Dataset type
|
|
56
|
+
* @param projectSlug Optional project slug
|
|
57
|
+
* @param fields Optional fields to display
|
|
58
|
+
* @returns The complete events explorer URL
|
|
59
|
+
*/
|
|
60
|
+
function getEventsExplorerUrl(host, organizationSlug, query, dataset = "spans", projectSlug, fields) {
|
|
61
|
+
const isSaas = isSentryHost(host);
|
|
62
|
+
let url = isSaas ? `https://${organizationSlug}.${host}/explore/` : `https://${host}/organizations/${organizationSlug}/explore/`;
|
|
63
|
+
const params = new URLSearchParams();
|
|
64
|
+
params.append("query", query);
|
|
65
|
+
params.append("dataset", dataset);
|
|
66
|
+
params.append("layout", "table");
|
|
67
|
+
if (projectSlug) params.append("project", projectSlug);
|
|
68
|
+
if (fields && fields.length > 0) for (const field of fields) params.append("field", field);
|
|
69
|
+
url += `?${params.toString()}`;
|
|
70
|
+
return url;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
|
|
74
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
75
|
+
*
|
|
76
|
+
* @param host The hostname to validate
|
|
77
|
+
* @throws {Error} If the host contains a protocol
|
|
78
|
+
*/
|
|
79
|
+
function _validateSentryHostInternal(host) {
|
|
80
|
+
if (host.startsWith("http://") || host.startsWith("https://")) throw new Error("SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.");
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
84
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
85
|
+
*
|
|
86
|
+
* @param url The HTTPS URL to validate and parse
|
|
87
|
+
* @returns The extracted hostname from the URL
|
|
88
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
89
|
+
*/
|
|
90
|
+
function _validateAndParseSentryUrlInternal(url) {
|
|
91
|
+
if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
|
|
92
|
+
try {
|
|
93
|
+
const parsedUrl = new URL(url);
|
|
94
|
+
return parsedUrl.host;
|
|
95
|
+
} catch (error) {
|
|
96
|
+
throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
101
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
102
|
+
*
|
|
103
|
+
* @param host The hostname to validate
|
|
104
|
+
*/
|
|
105
|
+
function validateSentryHost(host) {
|
|
106
|
+
try {
|
|
107
|
+
_validateSentryHostInternal(host);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.error(`Error: ${error.message}`);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
115
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
116
|
+
*
|
|
117
|
+
* @param url The HTTPS URL to validate and parse
|
|
118
|
+
* @returns The extracted hostname from the URL
|
|
119
|
+
*/
|
|
120
|
+
function validateAndParseSentryUrl(url) {
|
|
121
|
+
try {
|
|
122
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.error(`Error: ${error.message}`);
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
130
|
+
* Throws an error instead of exiting the process (for testing).
|
|
131
|
+
*
|
|
132
|
+
* @param host The hostname to validate
|
|
133
|
+
* @throws {Error} If the host contains a protocol
|
|
134
|
+
*/
|
|
135
|
+
function validateSentryHostThrows(host) {
|
|
136
|
+
_validateSentryHostInternal(host);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
140
|
+
* Throws an error instead of exiting the process (for testing).
|
|
141
|
+
*
|
|
142
|
+
* @param url The HTTPS URL to validate and parse
|
|
143
|
+
* @returns The extracted hostname from the URL
|
|
144
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
145
|
+
*/
|
|
146
|
+
function validateAndParseSentryUrlThrows(url) {
|
|
147
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
//#endregion
|
|
151
|
+
export { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
152
|
+
//# sourceMappingURL=url-utils-IqgSmI-B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils-IqgSmI-B.js","names":["host: string","organizationSlug: string","issueId: string","query?: string","projectSlugOrId?: string","traceId: string","query: string","dataset: \"spans\" | \"errors\" | \"logs\"","projectSlug?: string","fields?: string[]","url: string"],"sources":["../src/utils/url-utils.ts"],"sourcesContent":["/**\n * Determines if a Sentry instance is SaaS or self-hosted based on the host.\n * @param host The Sentry host (e.g., \"sentry.io\" or \"sentry.company.com\")\n * @returns true if SaaS instance, false if self-hosted\n */\nexport function isSentryHost(host: string): boolean {\n return host === \"sentry.io\" || host.endsWith(\".sentry.io\");\n}\n\n/**\n * Generates a Sentry issue URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param issueId Issue identifier (e.g., \"PROJECT-123\")\n * @returns The complete issue URL\n */\nexport function getIssueUrl(\n host: string,\n organizationSlug: string,\n issueId: string,\n): string {\n const isSaas = isSentryHost(host);\n return isSaas\n ? `https://${organizationSlug}.${host}/issues/${issueId}`\n : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;\n}\n\n/**\n * Generates a Sentry issues search URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param query Optional search query\n * @param projectSlugOrId Optional project slug or ID\n * @returns The complete issues search URL\n */\nexport function getIssuesSearchUrl(\n host: string,\n organizationSlug: string,\n query?: string,\n projectSlugOrId?: string,\n): string {\n const isSaas = isSentryHost(host);\n let url = isSaas\n ? `https://${organizationSlug}.${host}/issues/`\n : `https://${host}/organizations/${organizationSlug}/issues/`;\n\n const params = new URLSearchParams();\n if (projectSlugOrId) {\n params.append(\"project\", projectSlugOrId);\n }\n if (query) {\n params.append(\"query\", query);\n }\n\n const queryString = params.toString();\n if (queryString) {\n url += `?${queryString}`;\n }\n\n return url;\n}\n\n/**\n * Generates a Sentry trace URL for performance investigation.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param traceId Trace identifier\n * @returns The complete trace URL\n */\nexport function getTraceUrl(\n host: string,\n organizationSlug: string,\n traceId: string,\n): string {\n const isSaas = isSentryHost(host);\n return isSaas\n ? `https://${organizationSlug}.${host}/explore/traces/trace/${traceId}`\n : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n}\n\n/**\n * Generates a Sentry events explorer URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param query Search query\n * @param dataset Dataset type\n * @param projectSlug Optional project slug\n * @param fields Optional fields to display\n * @returns The complete events explorer URL\n */\nexport function getEventsExplorerUrl(\n host: string,\n organizationSlug: string,\n query: string,\n dataset: \"spans\" | \"errors\" | \"logs\" = \"spans\",\n projectSlug?: string,\n fields?: string[],\n): string {\n const isSaas = isSentryHost(host);\n let url = isSaas\n ? `https://${organizationSlug}.${host}/explore/`\n : `https://${host}/organizations/${organizationSlug}/explore/`;\n\n const params = new URLSearchParams();\n params.append(\"query\", query);\n params.append(\"dataset\", dataset);\n params.append(\"layout\", \"table\");\n\n if (projectSlug) {\n params.append(\"project\", projectSlug);\n }\n\n if (fields && fields.length > 0) {\n for (const field of fields) {\n params.append(\"field\", field);\n }\n }\n\n url += `?${params.toString()}`;\n return url;\n}\n\n/**\n * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nfunction _validateSentryHostInternal(host: string): void {\n if (host.startsWith(\"http://\") || host.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\",\n );\n }\n}\n\n/**\n * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nfunction _validateAndParseSentryUrlInternal(url: string): string {\n if (!url.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.host;\n } catch (error) {\n throw new Error(\n \"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param host The hostname to validate\n */\nexport function validateSentryHost(host: string): void {\n try {\n _validateSentryHostInternal(host);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n */\nexport function validateAndParseSentryUrl(url: string): string {\n try {\n return _validateAndParseSentryUrlInternal(url);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error instead of exiting the process (for testing).\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nexport function validateSentryHostThrows(host: string): void {\n _validateSentryHostInternal(host);\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error instead of exiting the process (for testing).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nexport function validateAndParseSentryUrlThrows(url: string): string {\n return _validateAndParseSentryUrlInternal(url);\n}\n"],"mappings":";;;;;;AAKA,SAAgB,aAAaA,MAAuB;AAClD,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;AAC3D;;;;;;;;AASD,SAAgB,YACdA,MACAC,kBACAC,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,UACF,UAAU,iBAAiB,GAAG,KAAK,UAAU,aAC7C,UAAU,KAAK,iBAAiB,iBAAiB,UAAU;AACjE;;;;;;;;;AAUD,SAAgB,mBACdF,MACAC,kBACAE,OACAC,iBACQ;CACR,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,KAAK,aACnC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,KAAI,gBACF,QAAO,OAAO,WAAW,gBAAgB;AAE3C,KAAI,MACF,QAAO,OAAO,SAAS,MAAM;CAG/B,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YACF,SAAQ,GAAG;AAGb,QAAO;AACR;;;;;;;;AASD,SAAgB,YACdJ,MACAC,kBACAI,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,UACF,UAAU,iBAAiB,GAAG,KAAK,wBAAwB,aAC3D,UAAU,KAAK,iBAAiB,iBAAiB,wBAAwB;AAC/E;;;;;;;;;;;AAYD,SAAgB,qBACdL,MACAC,kBACAK,OACAC,UAAuC,SACvCC,aACAC,QACQ;CACR,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,KAAK,cACnC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,QAAO,OAAO,SAAS,MAAM;AAC7B,QAAO,OAAO,WAAW,QAAQ;AACjC,QAAO,OAAO,UAAU,QAAQ;AAEhC,KAAI,YACF,QAAO,OAAO,WAAW,YAAY;AAGvC,KAAI,UAAU,OAAO,SAAS,EAC5B,MAAK,MAAM,SAAS,OAClB,QAAO,OAAO,SAAS,MAAM;AAIjC,SAAQ,GAAG,OAAO,UAAU;AAC5B,QAAO;AACR;;;;;;;;AASD,SAAS,4BAA4BT,MAAoB;AACvD,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;AAGL;;;;;;;;;AAUD,SAAS,mCAAmCU,KAAqB;AAC/D,MAAK,IAAI,WAAW,WAAW,CAC7B,OAAM,IAAI,MACR;AAIJ,KAAI;EACF,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,QAAM,IAAI,MACR;CAEH;AACF;;;;;;;AAQD,SAAgB,mBAAmBV,MAAoB;AACrD,KAAI;AACF,8BAA4B,KAAK;CAClC,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,0BAA0BU,KAAqB;AAC7D,KAAI;AACF,SAAO,mCAAmC,IAAI;CAC/C,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,yBAAyBV,MAAoB;AAC3D,6BAA4B,KAAK;AAClC;;;;;;;;;AAUD,SAAgB,gCAAgCU,KAAqB;AACnE,QAAO,mCAAmC,IAAI;AAC/C"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/url-utils.ts
|
|
3
|
+
/**
|
|
4
|
+
* Determines if a Sentry instance is SaaS or self-hosted based on the host.
|
|
5
|
+
* @param host The Sentry host (e.g., "sentry.io" or "sentry.company.com")
|
|
6
|
+
* @returns true if SaaS instance, false if self-hosted
|
|
7
|
+
*/
|
|
8
|
+
function isSentryHost(host) {
|
|
9
|
+
return host === "sentry.io" || host.endsWith(".sentry.io");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generates a Sentry issue URL.
|
|
13
|
+
* @param host The Sentry host
|
|
14
|
+
* @param organizationSlug Organization identifier
|
|
15
|
+
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
16
|
+
* @returns The complete issue URL
|
|
17
|
+
*/
|
|
18
|
+
function getIssueUrl(host, organizationSlug, issueId) {
|
|
19
|
+
const isSaas = isSentryHost(host);
|
|
20
|
+
return isSaas ? `https://${organizationSlug}.${host}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generates a Sentry issues search URL.
|
|
24
|
+
* @param host The Sentry host
|
|
25
|
+
* @param organizationSlug Organization identifier
|
|
26
|
+
* @param query Optional search query
|
|
27
|
+
* @param projectSlugOrId Optional project slug or ID
|
|
28
|
+
* @returns The complete issues search URL
|
|
29
|
+
*/
|
|
30
|
+
function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
|
|
31
|
+
const isSaas = isSentryHost(host);
|
|
32
|
+
let url = isSaas ? `https://${organizationSlug}.${host}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;
|
|
33
|
+
const params = new URLSearchParams();
|
|
34
|
+
if (projectSlugOrId) params.append("project", projectSlugOrId);
|
|
35
|
+
if (query) params.append("query", query);
|
|
36
|
+
const queryString = params.toString();
|
|
37
|
+
if (queryString) url += `?${queryString}`;
|
|
38
|
+
return url;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Generates a Sentry trace URL for performance investigation.
|
|
42
|
+
* @param host The Sentry host
|
|
43
|
+
* @param organizationSlug Organization identifier
|
|
44
|
+
* @param traceId Trace identifier
|
|
45
|
+
* @returns The complete trace URL
|
|
46
|
+
*/
|
|
47
|
+
function getTraceUrl(host, organizationSlug, traceId) {
|
|
48
|
+
const isSaas = isSentryHost(host);
|
|
49
|
+
return isSaas ? `https://${organizationSlug}.${host}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Generates a Sentry events explorer URL.
|
|
53
|
+
* @param host The Sentry host
|
|
54
|
+
* @param organizationSlug Organization identifier
|
|
55
|
+
* @param query Search query
|
|
56
|
+
* @param dataset Dataset type
|
|
57
|
+
* @param projectSlug Optional project slug
|
|
58
|
+
* @param fields Optional fields to display
|
|
59
|
+
* @returns The complete events explorer URL
|
|
60
|
+
*/
|
|
61
|
+
function getEventsExplorerUrl(host, organizationSlug, query, dataset = "spans", projectSlug, fields) {
|
|
62
|
+
const isSaas = isSentryHost(host);
|
|
63
|
+
let url = isSaas ? `https://${organizationSlug}.${host}/explore/` : `https://${host}/organizations/${organizationSlug}/explore/`;
|
|
64
|
+
const params = new URLSearchParams();
|
|
65
|
+
params.append("query", query);
|
|
66
|
+
params.append("dataset", dataset);
|
|
67
|
+
params.append("layout", "table");
|
|
68
|
+
if (projectSlug) params.append("project", projectSlug);
|
|
69
|
+
if (fields && fields.length > 0) for (const field of fields) params.append("field", field);
|
|
70
|
+
url += `?${params.toString()}`;
|
|
71
|
+
return url;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
|
|
75
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
76
|
+
*
|
|
77
|
+
* @param host The hostname to validate
|
|
78
|
+
* @throws {Error} If the host contains a protocol
|
|
79
|
+
*/
|
|
80
|
+
function _validateSentryHostInternal(host) {
|
|
81
|
+
if (host.startsWith("http://") || host.startsWith("https://")) throw new Error("SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.");
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
85
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
86
|
+
*
|
|
87
|
+
* @param url The HTTPS URL to validate and parse
|
|
88
|
+
* @returns The extracted hostname from the URL
|
|
89
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
90
|
+
*/
|
|
91
|
+
function _validateAndParseSentryUrlInternal(url) {
|
|
92
|
+
if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
|
|
93
|
+
try {
|
|
94
|
+
const parsedUrl = new URL(url);
|
|
95
|
+
return parsedUrl.host;
|
|
96
|
+
} catch (error) {
|
|
97
|
+
throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
102
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
103
|
+
*
|
|
104
|
+
* @param host The hostname to validate
|
|
105
|
+
*/
|
|
106
|
+
function validateSentryHost(host) {
|
|
107
|
+
try {
|
|
108
|
+
_validateSentryHostInternal(host);
|
|
109
|
+
} catch (error) {
|
|
110
|
+
console.error(`Error: ${error.message}`);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
116
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
117
|
+
*
|
|
118
|
+
* @param url The HTTPS URL to validate and parse
|
|
119
|
+
* @returns The extracted hostname from the URL
|
|
120
|
+
*/
|
|
121
|
+
function validateAndParseSentryUrl(url) {
|
|
122
|
+
try {
|
|
123
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error(`Error: ${error.message}`);
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
131
|
+
* Throws an error instead of exiting the process (for testing).
|
|
132
|
+
*
|
|
133
|
+
* @param host The hostname to validate
|
|
134
|
+
* @throws {Error} If the host contains a protocol
|
|
135
|
+
*/
|
|
136
|
+
function validateSentryHostThrows(host) {
|
|
137
|
+
_validateSentryHostInternal(host);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
141
|
+
* Throws an error instead of exiting the process (for testing).
|
|
142
|
+
*
|
|
143
|
+
* @param url The HTTPS URL to validate and parse
|
|
144
|
+
* @returns The extracted hostname from the URL
|
|
145
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
146
|
+
*/
|
|
147
|
+
function validateAndParseSentryUrlThrows(url) {
|
|
148
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
Object.defineProperty(exports, 'getEventsExplorerUrl', {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () {
|
|
155
|
+
return getEventsExplorerUrl;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, 'getIssueUrl', {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function () {
|
|
161
|
+
return getIssueUrl;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, 'getIssuesSearchUrl', {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return getIssuesSearchUrl;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(exports, 'getTraceUrl', {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function () {
|
|
173
|
+
return getTraceUrl;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, 'isSentryHost', {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () {
|
|
179
|
+
return isSentryHost;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
Object.defineProperty(exports, 'validateAndParseSentryUrl', {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function () {
|
|
185
|
+
return validateAndParseSentryUrl;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, 'validateAndParseSentryUrlThrows', {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () {
|
|
191
|
+
return validateAndParseSentryUrlThrows;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
Object.defineProperty(exports, 'validateSentryHost', {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function () {
|
|
197
|
+
return validateSentryHost;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, 'validateSentryHostThrows', {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () {
|
|
203
|
+
return validateSentryHostThrows;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=url-utils-vJo2ER5v.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils-vJo2ER5v.cjs","names":["host: string","organizationSlug: string","issueId: string","query?: string","projectSlugOrId?: string","traceId: string","query: string","dataset: \"spans\" | \"errors\" | \"logs\"","projectSlug?: string","fields?: string[]","url: string"],"sources":["../src/utils/url-utils.ts"],"sourcesContent":["/**\n * Determines if a Sentry instance is SaaS or self-hosted based on the host.\n * @param host The Sentry host (e.g., \"sentry.io\" or \"sentry.company.com\")\n * @returns true if SaaS instance, false if self-hosted\n */\nexport function isSentryHost(host: string): boolean {\n return host === \"sentry.io\" || host.endsWith(\".sentry.io\");\n}\n\n/**\n * Generates a Sentry issue URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param issueId Issue identifier (e.g., \"PROJECT-123\")\n * @returns The complete issue URL\n */\nexport function getIssueUrl(\n host: string,\n organizationSlug: string,\n issueId: string,\n): string {\n const isSaas = isSentryHost(host);\n return isSaas\n ? `https://${organizationSlug}.${host}/issues/${issueId}`\n : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;\n}\n\n/**\n * Generates a Sentry issues search URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param query Optional search query\n * @param projectSlugOrId Optional project slug or ID\n * @returns The complete issues search URL\n */\nexport function getIssuesSearchUrl(\n host: string,\n organizationSlug: string,\n query?: string,\n projectSlugOrId?: string,\n): string {\n const isSaas = isSentryHost(host);\n let url = isSaas\n ? `https://${organizationSlug}.${host}/issues/`\n : `https://${host}/organizations/${organizationSlug}/issues/`;\n\n const params = new URLSearchParams();\n if (projectSlugOrId) {\n params.append(\"project\", projectSlugOrId);\n }\n if (query) {\n params.append(\"query\", query);\n }\n\n const queryString = params.toString();\n if (queryString) {\n url += `?${queryString}`;\n }\n\n return url;\n}\n\n/**\n * Generates a Sentry trace URL for performance investigation.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param traceId Trace identifier\n * @returns The complete trace URL\n */\nexport function getTraceUrl(\n host: string,\n organizationSlug: string,\n traceId: string,\n): string {\n const isSaas = isSentryHost(host);\n return isSaas\n ? `https://${organizationSlug}.${host}/explore/traces/trace/${traceId}`\n : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n}\n\n/**\n * Generates a Sentry events explorer URL.\n * @param host The Sentry host\n * @param organizationSlug Organization identifier\n * @param query Search query\n * @param dataset Dataset type\n * @param projectSlug Optional project slug\n * @param fields Optional fields to display\n * @returns The complete events explorer URL\n */\nexport function getEventsExplorerUrl(\n host: string,\n organizationSlug: string,\n query: string,\n dataset: \"spans\" | \"errors\" | \"logs\" = \"spans\",\n projectSlug?: string,\n fields?: string[],\n): string {\n const isSaas = isSentryHost(host);\n let url = isSaas\n ? `https://${organizationSlug}.${host}/explore/`\n : `https://${host}/organizations/${organizationSlug}/explore/`;\n\n const params = new URLSearchParams();\n params.append(\"query\", query);\n params.append(\"dataset\", dataset);\n params.append(\"layout\", \"table\");\n\n if (projectSlug) {\n params.append(\"project\", projectSlug);\n }\n\n if (fields && fields.length > 0) {\n for (const field of fields) {\n params.append(\"field\", field);\n }\n }\n\n url += `?${params.toString()}`;\n return url;\n}\n\n/**\n * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nfunction _validateSentryHostInternal(host: string): void {\n if (host.startsWith(\"http://\") || host.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\",\n );\n }\n}\n\n/**\n * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nfunction _validateAndParseSentryUrlInternal(url: string): string {\n if (!url.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.host;\n } catch (error) {\n throw new Error(\n \"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param host The hostname to validate\n */\nexport function validateSentryHost(host: string): void {\n try {\n _validateSentryHostInternal(host);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n */\nexport function validateAndParseSentryUrl(url: string): string {\n try {\n return _validateAndParseSentryUrlInternal(url);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error instead of exiting the process (for testing).\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nexport function validateSentryHostThrows(host: string): void {\n _validateSentryHostInternal(host);\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error instead of exiting the process (for testing).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nexport function validateAndParseSentryUrlThrows(url: string): string {\n return _validateAndParseSentryUrlInternal(url);\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,aAAaA,MAAuB;AAClD,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;AAC3D;;;;;;;;AASD,SAAgB,YACdA,MACAC,kBACAC,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,UACF,UAAU,iBAAiB,GAAG,KAAK,UAAU,aAC7C,UAAU,KAAK,iBAAiB,iBAAiB,UAAU;AACjE;;;;;;;;;AAUD,SAAgB,mBACdF,MACAC,kBACAE,OACAC,iBACQ;CACR,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,KAAK,aACnC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,KAAI,gBACF,QAAO,OAAO,WAAW,gBAAgB;AAE3C,KAAI,MACF,QAAO,OAAO,SAAS,MAAM;CAG/B,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YACF,SAAQ,GAAG;AAGb,QAAO;AACR;;;;;;;;AASD,SAAgB,YACdJ,MACAC,kBACAI,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,UACF,UAAU,iBAAiB,GAAG,KAAK,wBAAwB,aAC3D,UAAU,KAAK,iBAAiB,iBAAiB,wBAAwB;AAC/E;;;;;;;;;;;AAYD,SAAgB,qBACdL,MACAC,kBACAK,OACAC,UAAuC,SACvCC,aACAC,QACQ;CACR,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,KAAK,cACnC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,QAAO,OAAO,SAAS,MAAM;AAC7B,QAAO,OAAO,WAAW,QAAQ;AACjC,QAAO,OAAO,UAAU,QAAQ;AAEhC,KAAI,YACF,QAAO,OAAO,WAAW,YAAY;AAGvC,KAAI,UAAU,OAAO,SAAS,EAC5B,MAAK,MAAM,SAAS,OAClB,QAAO,OAAO,SAAS,MAAM;AAIjC,SAAQ,GAAG,OAAO,UAAU;AAC5B,QAAO;AACR;;;;;;;;AASD,SAAS,4BAA4BT,MAAoB;AACvD,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;AAGL;;;;;;;;;AAUD,SAAS,mCAAmCU,KAAqB;AAC/D,MAAK,IAAI,WAAW,WAAW,CAC7B,OAAM,IAAI,MACR;AAIJ,KAAI;EACF,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,QAAM,IAAI,MACR;CAEH;AACF;;;;;;;AAQD,SAAgB,mBAAmBV,MAAoB;AACrD,KAAI;AACF,8BAA4B,KAAK;CAClC,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,0BAA0BU,KAAqB;AAC7D,KAAI;AACF,SAAO,mCAAmC,IAAI;CAC/C,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,yBAAyBV,MAAoB;AAC3D,6BAA4B,KAAK;AAClC;;;;;;;;;AAUD,SAAgB,gCAAgCU,KAAqB;AACnE,QAAO,mCAAmC,IAAI;AAC/C"}
|
package/dist/utils/url-utils.cjs
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
const require_url_utils = require('../url-utils-
|
|
1
|
+
const require_url_utils = require('../url-utils-vJo2ER5v.cjs');
|
|
2
2
|
|
|
3
|
+
exports.getEventsExplorerUrl = require_url_utils.getEventsExplorerUrl;
|
|
4
|
+
exports.getIssueUrl = require_url_utils.getIssueUrl;
|
|
5
|
+
exports.getIssuesSearchUrl = require_url_utils.getIssuesSearchUrl;
|
|
6
|
+
exports.getTraceUrl = require_url_utils.getTraceUrl;
|
|
7
|
+
exports.isSentryHost = require_url_utils.isSentryHost;
|
|
3
8
|
exports.validateAndParseSentryUrl = require_url_utils.validateAndParseSentryUrl;
|
|
4
9
|
exports.validateAndParseSentryUrlThrows = require_url_utils.validateAndParseSentryUrlThrows;
|
|
5
10
|
exports.validateSentryHost = require_url_utils.validateSentryHost;
|
|
@@ -1,4 +1,46 @@
|
|
|
1
1
|
//#region src/utils/url-utils.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Determines if a Sentry instance is SaaS or self-hosted based on the host.
|
|
4
|
+
* @param host The Sentry host (e.g., "sentry.io" or "sentry.company.com")
|
|
5
|
+
* @returns true if SaaS instance, false if self-hosted
|
|
6
|
+
*/
|
|
7
|
+
declare function isSentryHost(host: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Generates a Sentry issue URL.
|
|
10
|
+
* @param host The Sentry host
|
|
11
|
+
* @param organizationSlug Organization identifier
|
|
12
|
+
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
13
|
+
* @returns The complete issue URL
|
|
14
|
+
*/
|
|
15
|
+
declare function getIssueUrl(host: string, organizationSlug: string, issueId: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Generates a Sentry issues search URL.
|
|
18
|
+
* @param host The Sentry host
|
|
19
|
+
* @param organizationSlug Organization identifier
|
|
20
|
+
* @param query Optional search query
|
|
21
|
+
* @param projectSlugOrId Optional project slug or ID
|
|
22
|
+
* @returns The complete issues search URL
|
|
23
|
+
*/
|
|
24
|
+
declare function getIssuesSearchUrl(host: string, organizationSlug: string, query?: string, projectSlugOrId?: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Generates a Sentry trace URL for performance investigation.
|
|
27
|
+
* @param host The Sentry host
|
|
28
|
+
* @param organizationSlug Organization identifier
|
|
29
|
+
* @param traceId Trace identifier
|
|
30
|
+
* @returns The complete trace URL
|
|
31
|
+
*/
|
|
32
|
+
declare function getTraceUrl(host: string, organizationSlug: string, traceId: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Generates a Sentry events explorer URL.
|
|
35
|
+
* @param host The Sentry host
|
|
36
|
+
* @param organizationSlug Organization identifier
|
|
37
|
+
* @param query Search query
|
|
38
|
+
* @param dataset Dataset type
|
|
39
|
+
* @param projectSlug Optional project slug
|
|
40
|
+
* @param fields Optional fields to display
|
|
41
|
+
* @returns The complete events explorer URL
|
|
42
|
+
*/
|
|
43
|
+
declare function getEventsExplorerUrl(host: string, organizationSlug: string, query: string, dataset?: "spans" | "errors" | "logs", projectSlug?: string, fields?: string[]): string;
|
|
2
44
|
/**
|
|
3
45
|
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
4
46
|
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
@@ -33,5 +75,5 @@ declare function validateSentryHostThrows(host: string): void;
|
|
|
33
75
|
declare function validateAndParseSentryUrlThrows(url: string): string;
|
|
34
76
|
//# sourceMappingURL=url-utils.d.ts.map
|
|
35
77
|
//#endregion
|
|
36
|
-
export { validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
78
|
+
export { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
37
79
|
//# sourceMappingURL=url-utils.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-utils.d.cts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"url-utils.d.cts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AAKA;AAWA;AAmBA;AAkCA;AAqBgB,iBArFA,YAAA,CAqFoB,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AA8EpC;AAgBA;AAgBA;AAYA;;;;iBApMgB,WAAA;;;;;;;;;iBAmBA,kBAAA;;;;;;;;iBAkCA,WAAA;;;;;;;;;;;iBAqBA,oBAAA;;;;;;;iBA8EA,kBAAA;;;;;;;;iBAgBA,yBAAA;;;;;;;;iBAgBA,wBAAA;;;;;;;;;iBAYA,+BAAA"}
|