@sentry/mcp-server 0.10.0 → 0.12.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.
Files changed (271) hide show
  1. package/dist/api-client/client.cjs +4 -4
  2. package/dist/api-client/client.d.cts +3 -3
  3. package/dist/api-client/client.d.ts +3 -3
  4. package/dist/api-client/client.js +2 -2
  5. package/dist/api-client/client.test.cjs +8 -9
  6. package/dist/api-client/client.test.cjs.map +1 -1
  7. package/dist/api-client/client.test.js +4 -4
  8. package/dist/api-client/index.cjs +41 -38
  9. package/dist/api-client/index.d.cts +4 -4
  10. package/dist/api-client/index.d.ts +4 -4
  11. package/dist/api-client/index.js +5 -5
  12. package/dist/api-client/schema.cjs +36 -33
  13. package/dist/api-client/schema.d.cts +2 -2
  14. package/dist/api-client/schema.d.ts +2 -2
  15. package/dist/api-client/schema.js +2 -2
  16. package/dist/api-client/types.cjs +1 -1
  17. package/dist/api-client/types.d.cts +3 -3
  18. package/dist/api-client/types.d.ts +3 -3
  19. package/dist/api-client/types.js +1 -1
  20. package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
  21. package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
  22. package/dist/client-4jq_wVgn.d.ts +522 -0
  23. package/dist/client-4jq_wVgn.d.ts.map +1 -0
  24. package/dist/client-B7vZ6JMk.cjs +572 -0
  25. package/dist/client-B7vZ6JMk.cjs.map +1 -0
  26. package/dist/client-CAoHZbyK.js +561 -0
  27. package/dist/client-CAoHZbyK.js.map +1 -0
  28. package/dist/client-DkY0ifZf.d.cts +522 -0
  29. package/dist/client-DkY0ifZf.d.cts.map +1 -0
  30. package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
  31. package/dist/dist-BlIWGSIM.cjs.map +1 -0
  32. package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
  33. package/dist/dist-DDpQABxe.js.map +1 -0
  34. package/dist/errors-B9fwS-aP.cjs +21 -0
  35. package/dist/errors-B9fwS-aP.cjs.map +1 -0
  36. package/dist/errors-BJSrT6Ou.js +15 -0
  37. package/dist/errors-BJSrT6Ou.js.map +1 -0
  38. package/dist/errors.cjs +3 -0
  39. package/dist/errors.d.cts +12 -0
  40. package/dist/errors.d.cts.map +1 -0
  41. package/dist/errors.d.ts +12 -0
  42. package/dist/errors.d.ts.map +1 -0
  43. package/dist/errors.js +3 -0
  44. package/dist/errors.test.cjs +24 -0
  45. package/dist/errors.test.cjs.map +1 -0
  46. package/dist/errors.test.d.cts +1 -0
  47. package/dist/errors.test.d.ts +1 -0
  48. package/dist/errors.test.js +24 -0
  49. package/dist/errors.test.js.map +1 -0
  50. package/dist/{formatting-ggD6YRYR.js → formatting-BaARL2gT.js} +1 -1
  51. package/dist/formatting-BaARL2gT.js.map +1 -0
  52. package/dist/{formatting-B0SJqiqX.cjs → formatting-C2kN0ok6.cjs} +1 -2
  53. package/dist/formatting-C2kN0ok6.cjs.map +1 -0
  54. package/dist/index.cjs +19 -19
  55. package/dist/index.cjs.map +1 -1
  56. package/dist/index.js +18 -17
  57. package/dist/index.js.map +1 -1
  58. package/dist/internal/formatting.cjs +4 -4
  59. package/dist/internal/formatting.d.cts +5 -5
  60. package/dist/internal/formatting.d.cts.map +1 -1
  61. package/dist/internal/formatting.d.ts +5 -5
  62. package/dist/internal/formatting.d.ts.map +1 -1
  63. package/dist/internal/formatting.js +1 -1
  64. package/dist/internal/issue-helpers.cjs +4 -4
  65. package/dist/internal/issue-helpers.d.cts +10 -2
  66. package/dist/internal/issue-helpers.d.cts.map +1 -1
  67. package/dist/internal/issue-helpers.d.ts +10 -2
  68. package/dist/internal/issue-helpers.d.ts.map +1 -1
  69. package/dist/internal/issue-helpers.js +1 -1
  70. package/dist/internal/issue-helpers.test.cjs +21 -25
  71. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  72. package/dist/internal/issue-helpers.test.js +5 -8
  73. package/dist/internal/issue-helpers.test.js.map +1 -1
  74. package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-BMVLc3mR.js} +16 -2
  75. package/dist/issue-helpers-BMVLc3mR.js.map +1 -0
  76. package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-D712fGT2.cjs} +16 -3
  77. package/dist/issue-helpers-D712fGT2.cjs.map +1 -0
  78. package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
  79. package/dist/logging-ByvSjT6V.cjs.map +1 -0
  80. package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
  81. package/dist/logging-CXLD0FFB.js.map +1 -0
  82. package/dist/logging.cjs +2 -2
  83. package/dist/logging.d.cts +31 -3
  84. package/dist/logging.d.cts.map +1 -1
  85. package/dist/logging.d.ts +31 -3
  86. package/dist/logging.d.ts.map +1 -1
  87. package/dist/logging.js +1 -1
  88. package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
  89. package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
  90. package/dist/{promptDefinitions-pHRpPOpJ.cjs → promptDefinitions-BTLIBcGt.cjs} +10 -4
  91. package/dist/promptDefinitions-BTLIBcGt.cjs.map +1 -0
  92. package/dist/{promptDefinitions-tpKruPny.d.ts → promptDefinitions-CF2VWdQ6.d.cts} +12 -4
  93. package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +1 -0
  94. package/dist/{promptDefinitions-BR7PxWcH.d.cts → promptDefinitions-D5FSQckL.d.ts} +11 -3
  95. package/dist/promptDefinitions-D5FSQckL.d.ts.map +1 -0
  96. package/dist/{promptDefinitions-DBNOeSg-.js → promptDefinitions-D8yow1m0.js} +9 -2
  97. package/dist/promptDefinitions-D8yow1m0.js.map +1 -0
  98. package/dist/promptDefinitions.cjs +3 -3
  99. package/dist/promptDefinitions.d.cts +1 -1
  100. package/dist/promptDefinitions.d.ts +1 -1
  101. package/dist/promptDefinitions.js +2 -2
  102. package/dist/{prompts-nfFU-zY-.cjs → prompts-CDbQrutV.cjs} +3 -3
  103. package/dist/prompts-CDbQrutV.cjs.map +1 -0
  104. package/dist/{prompts-DgWOD2rU.js → prompts-Dt3A8Qfl.js} +4 -2
  105. package/dist/prompts-Dt3A8Qfl.js.map +1 -0
  106. package/dist/prompts.cjs +3 -2
  107. package/dist/prompts.d.cts +4 -5
  108. package/dist/prompts.d.cts.map +1 -1
  109. package/dist/prompts.d.ts +4 -5
  110. package/dist/prompts.d.ts.map +1 -1
  111. package/dist/prompts.js +2 -1
  112. package/dist/{resources-OM3EAnnj.js → resources-Bol20Xuo.js} +13 -1
  113. package/dist/resources-Bol20Xuo.js.map +1 -0
  114. package/dist/{resources-BAE7VVZZ.cjs → resources-DNyoutxH.cjs} +13 -2
  115. package/dist/resources-DNyoutxH.cjs.map +1 -0
  116. package/dist/resources.cjs +2 -2
  117. package/dist/resources.d.cts +9 -1
  118. package/dist/resources.d.cts.map +1 -1
  119. package/dist/resources.d.ts +9 -1
  120. package/dist/resources.d.ts.map +1 -1
  121. package/dist/resources.js +1 -1
  122. package/dist/{schema-B7A-FyIi.d.ts → schema-BJv7kREf.d.cts} +215 -68
  123. package/dist/schema-BJv7kREf.d.cts.map +1 -0
  124. package/dist/{schema-jk88gqOu.cjs → schema-BTfISwFu.cjs} +30 -4
  125. package/dist/schema-BTfISwFu.cjs.map +1 -0
  126. package/dist/{schema-PvgLrC1b.d.cts → schema-BnxGHL_i.d.ts} +215 -68
  127. package/dist/schema-BnxGHL_i.d.ts.map +1 -0
  128. package/dist/{schema-3VLYcf4D.cjs → schema-BsvGMALe.cjs} +59 -8
  129. package/dist/schema-BsvGMALe.cjs.map +1 -0
  130. package/dist/{schema-Dltbjui7.js → schema-C_hp0BR7.js} +41 -7
  131. package/dist/schema-C_hp0BR7.js.map +1 -0
  132. package/dist/schema-Dv6aLZgz.js +32 -0
  133. package/dist/schema-Dv6aLZgz.js.map +1 -0
  134. package/dist/schema.cjs +13 -11
  135. package/dist/schema.d.cts +14 -5
  136. package/dist/schema.d.cts.map +1 -1
  137. package/dist/schema.d.ts +14 -5
  138. package/dist/schema.d.ts.map +1 -1
  139. package/dist/schema.js +2 -2
  140. package/dist/{server-yb4PkNyo.js → server-C7cHq_pc.js} +82 -27
  141. package/dist/server-C7cHq_pc.js.map +1 -0
  142. package/dist/{server-VwFSUPQn.cjs → server-DeutbO8v.cjs} +83 -29
  143. package/dist/server-DeutbO8v.cjs.map +1 -0
  144. package/dist/server.cjs +16 -15
  145. package/dist/server.d.cts +24 -6
  146. package/dist/server.d.cts.map +1 -1
  147. package/dist/server.d.ts +24 -6
  148. package/dist/server.d.ts.map +1 -1
  149. package/dist/server.js +15 -14
  150. package/dist/stdio-B73CCTly.cjs +47 -0
  151. package/dist/stdio-B73CCTly.cjs.map +1 -0
  152. package/dist/stdio-ZQLC-i5Q.js +41 -0
  153. package/dist/stdio-ZQLC-i5Q.js.map +1 -0
  154. package/dist/test-setup.cjs +653 -438
  155. package/dist/test-setup.cjs.map +1 -1
  156. package/dist/test-setup.js +653 -438
  157. package/dist/test-setup.js.map +1 -1
  158. package/dist/{toolDefinitions-B94CNDbt.d.cts → toolDefinitions-BOMF-zIC.d.ts} +148 -18
  159. package/dist/toolDefinitions-BOMF-zIC.d.ts.map +1 -0
  160. package/dist/{toolDefinitions-DIhvw3vk.cjs → toolDefinitions-CUegGcWU.cjs} +128 -7
  161. package/dist/toolDefinitions-CUegGcWU.cjs.map +1 -0
  162. package/dist/{toolDefinitions-Bb_1ejkl.js → toolDefinitions-DFAxp3nr.js} +127 -5
  163. package/dist/toolDefinitions-DFAxp3nr.js.map +1 -0
  164. package/dist/{toolDefinitions-q_1-70fG.d.ts → toolDefinitions-Ipvr4Acw.d.cts} +149 -19
  165. package/dist/toolDefinitions-Ipvr4Acw.d.cts.map +1 -0
  166. package/dist/toolDefinitions.cjs +3 -3
  167. package/dist/toolDefinitions.d.cts +1 -1
  168. package/dist/toolDefinitions.d.ts +1 -1
  169. package/dist/toolDefinitions.js +2 -2
  170. package/dist/toolDefinitions.test.cjs +3 -4
  171. package/dist/toolDefinitions.test.cjs.map +1 -1
  172. package/dist/toolDefinitions.test.js +3 -3
  173. package/dist/{tools-CMFpMPpD.js → tools-DpiQwSTY.js} +156 -13
  174. package/dist/tools-DpiQwSTY.js.map +1 -0
  175. package/dist/{tools-BdkmyaZo.cjs → tools-DyOqlsCW.cjs} +157 -15
  176. package/dist/tools-DyOqlsCW.cjs.map +1 -0
  177. package/dist/tools.cjs +10 -9
  178. package/dist/tools.d.cts +121 -8
  179. package/dist/tools.d.cts.map +1 -1
  180. package/dist/tools.d.ts +121 -8
  181. package/dist/tools.d.ts.map +1 -1
  182. package/dist/tools.js +9 -8
  183. package/dist/tools.test.cjs +330 -35
  184. package/dist/tools.test.cjs.map +1 -1
  185. package/dist/tools.test.js +311 -15
  186. package/dist/tools.test.js.map +1 -1
  187. package/dist/transports/stdio.cjs +17 -16
  188. package/dist/transports/stdio.d.cts +27 -6
  189. package/dist/transports/stdio.d.cts.map +1 -1
  190. package/dist/transports/stdio.d.ts +27 -6
  191. package/dist/transports/stdio.d.ts.map +1 -1
  192. package/dist/transports/stdio.js +16 -15
  193. package/dist/{types-jftb-CP9.d.ts → types-D5TPcOfv.d.ts} +4 -4
  194. package/dist/types-D5TPcOfv.d.ts.map +1 -0
  195. package/dist/{types-OeoNXRm-.d.cts → types-DRF2IoP_.d.cts} +4 -4
  196. package/dist/types-DRF2IoP_.d.cts.map +1 -0
  197. package/dist/{types-B03G337q.d.cts → types-Daq2fm0E.d.ts} +7 -5
  198. package/dist/types-Daq2fm0E.d.ts.map +1 -0
  199. package/dist/{types-CN4NEway.d.ts → types-NIQW7KyF.d.cts} +7 -5
  200. package/dist/types-NIQW7KyF.d.cts.map +1 -0
  201. package/dist/types.d.cts +3 -3
  202. package/dist/types.d.ts +3 -3
  203. package/dist/{version-CDnh7DyW.cjs → version-BNmubeQI.cjs} +2 -3
  204. package/dist/{version-CDnh7DyW.cjs.map → version-BNmubeQI.cjs.map} +1 -1
  205. package/dist/version-CRto5Sn_.js +6 -0
  206. package/dist/{version-TjO7fHpC.js.map → version-CRto5Sn_.js.map} +1 -1
  207. package/dist/version.cjs +2 -2
  208. package/dist/version.d.cts +1 -2
  209. package/dist/version.d.cts.map +1 -1
  210. package/dist/version.d.ts +1 -2
  211. package/dist/version.d.ts.map +1 -1
  212. package/dist/version.js +1 -1
  213. package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
  214. package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
  215. package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
  216. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
  217. package/package.json +8 -8
  218. package/dist/client-B4Ux5Zdg.cjs +0 -227
  219. package/dist/client-B4Ux5Zdg.cjs.map +0 -1
  220. package/dist/client-Bz_PNC8o.js +0 -215
  221. package/dist/client-Bz_PNC8o.js.map +0 -1
  222. package/dist/client-J6VSRmQS.d.ts +0 -177
  223. package/dist/client-J6VSRmQS.d.ts.map +0 -1
  224. package/dist/client-tE6FD__9.d.cts +0 -177
  225. package/dist/client-tE6FD__9.d.cts.map +0 -1
  226. package/dist/dist-BKh-M1A1.js.map +0 -1
  227. package/dist/dist-wiyJYfAH.cjs.map +0 -1
  228. package/dist/formatting-B0SJqiqX.cjs.map +0 -1
  229. package/dist/formatting-ggD6YRYR.js.map +0 -1
  230. package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
  231. package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
  232. package/dist/logging-BEMgC5SA.cjs.map +0 -1
  233. package/dist/logging-Cxm8lQvg.js.map +0 -1
  234. package/dist/promptDefinitions-BR7PxWcH.d.cts.map +0 -1
  235. package/dist/promptDefinitions-DBNOeSg-.js.map +0 -1
  236. package/dist/promptDefinitions-pHRpPOpJ.cjs.map +0 -1
  237. package/dist/promptDefinitions-tpKruPny.d.ts.map +0 -1
  238. package/dist/prompts-DgWOD2rU.js.map +0 -1
  239. package/dist/prompts-nfFU-zY-.cjs.map +0 -1
  240. package/dist/resources-BAE7VVZZ.cjs.map +0 -1
  241. package/dist/resources-OM3EAnnj.js.map +0 -1
  242. package/dist/schema-3VLYcf4D.cjs.map +0 -1
  243. package/dist/schema-B7A-FyIi.d.ts.map +0 -1
  244. package/dist/schema-BKa41TQ4.js +0 -17
  245. package/dist/schema-BKa41TQ4.js.map +0 -1
  246. package/dist/schema-Dltbjui7.js.map +0 -1
  247. package/dist/schema-PvgLrC1b.d.cts.map +0 -1
  248. package/dist/schema-jk88gqOu.cjs.map +0 -1
  249. package/dist/server-VwFSUPQn.cjs.map +0 -1
  250. package/dist/server-yb4PkNyo.js.map +0 -1
  251. package/dist/stdio-65sYKLOk.cjs +0 -26
  252. package/dist/stdio-65sYKLOk.cjs.map +0 -1
  253. package/dist/stdio-DkU2-spy.js +0 -19
  254. package/dist/stdio-DkU2-spy.js.map +0 -1
  255. package/dist/toolDefinitions-B94CNDbt.d.cts.map +0 -1
  256. package/dist/toolDefinitions-Bb_1ejkl.js.map +0 -1
  257. package/dist/toolDefinitions-DIhvw3vk.cjs.map +0 -1
  258. package/dist/toolDefinitions-q_1-70fG.d.ts.map +0 -1
  259. package/dist/tools-BdkmyaZo.cjs.map +0 -1
  260. package/dist/tools-CMFpMPpD.js.map +0 -1
  261. package/dist/types-B03G337q.d.cts.map +0 -1
  262. package/dist/types-CN4NEway.d.ts.map +0 -1
  263. package/dist/types-OeoNXRm-.d.cts.map +0 -1
  264. package/dist/types-jftb-CP9.d.ts.map +0 -1
  265. package/dist/version-TjO7fHpC.js +0 -6
  266. package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
  267. package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
  268. /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
  269. /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
  270. /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
  271. /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
@@ -1,12 +1,11 @@
1
- "use strict";
2
- const require_issue_helpers = require('../issue-helpers-DbsECZFq.cjs');
3
- const require_dist = require('../dist-wiyJYfAH.cjs');
4
- const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bs263gvI.cjs');
1
+ const require_dist = require('../dist-BlIWGSIM.cjs');
2
+ const require_vi_bdSIJ99Y = require('../vi.bdSIJ99Y-Dft_B_Ta.cjs');
3
+ const require_issue_helpers = require('../issue-helpers-D712fGT2.cjs');
5
4
 
6
5
  //#region src/internal/issue-helpers.test.ts
7
6
  require_dist.describe("extractIssueId", () => {
8
7
  require_dist.it("should extract issue ID from a full Sentry URL", () => {
9
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
8
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
10
9
  {
11
10
  "issueId": "1234",
12
11
  "organizationSlug": "sentry",
@@ -14,7 +13,7 @@ require_dist.describe("extractIssueId", () => {
14
13
  `);
15
14
  });
16
15
  require_dist.it("should extract issue ID from a Sentry URL with organization in path", () => {
17
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
16
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
18
17
  {
19
18
  "issueId": "123",
20
19
  "organizationSlug": "sentry",
@@ -22,7 +21,7 @@ require_dist.describe("extractIssueId", () => {
22
21
  `);
23
22
  });
24
23
  require_dist.it("should extract issue ID and org slug from URL with organizations path", () => {
25
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
24
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
26
25
  {
27
26
  "issueId": "123",
28
27
  "organizationSlug": "my-org",
@@ -30,13 +29,13 @@ require_dist.describe("extractIssueId", () => {
30
29
  `);
31
30
  });
32
31
  require_dist.it("should extract issue ID and org slug from subdomain URL", () => {
33
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
32
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
34
33
  issueId: "123",
35
34
  organizationSlug: "my-team"
36
35
  });
37
36
  });
38
37
  require_dist.it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
39
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
38
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
40
39
  {
41
40
  "issueId": "123",
42
41
  "organizationSlug": "sentry",
@@ -44,7 +43,7 @@ require_dist.describe("extractIssueId", () => {
44
43
  `);
45
44
  });
46
45
  require_dist.it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
47
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
46
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
48
47
  {
49
48
  "issueId": "123",
50
49
  "organizationSlug": "my-team",
@@ -52,13 +51,13 @@ require_dist.describe("extractIssueId", () => {
52
51
  `);
53
52
  });
54
53
  require_dist.it("should throw error for empty input", () => {
55
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
54
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
56
55
  });
57
56
  require_dist.it("should throw error for invalid URL path", () => {
58
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
57
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
59
58
  });
60
59
  require_dist.it("should throw error for non-numeric issue ID in URL", () => {
61
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
60
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
62
61
  {
63
62
  "issueId": "abc",
64
63
  "organizationSlug": "sentry",
@@ -66,32 +65,29 @@ require_dist.describe("extractIssueId", () => {
66
65
  `);
67
66
  });
68
67
  require_dist.it("should throw error for non-numeric standalone ID", () => {
69
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
68
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
70
69
  });
71
70
  });
72
71
  require_dist.describe("parseIssueId", () => {
73
72
  require_dist.it("should remove trailing punctuation from issue ID", () => {
74
- require_vi_ClIskdbk.globalExpect(
75
- // trailing period and exclamation
76
- require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")
77
- ).toBe("CLOUDFLARE-MCP-41");
73
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
78
74
  });
79
75
  require_dist.it("should not modify a clean issue ID", () => {
80
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
76
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
81
77
  });
82
78
  require_dist.it("should remove special characters except dash and underscore", () => {
83
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
79
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
84
80
  });
85
81
  });
86
82
  require_dist.describe("parseIssueParams", () => {
87
83
  require_dist.it("should parse from issueUrl", () => {
88
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
84
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
89
85
  organizationSlug: "sentry",
90
86
  issueId: "123"
91
87
  });
92
88
  });
93
89
  require_dist.it("should parse from issueId and organizationSlug", () => {
94
- require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueParams({
90
+ require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({
95
91
  issueId: "CLOUDFLARE-MCP-41.!",
96
92
  organizationSlug: "sentry-mcp-evals"
97
93
  })).toEqual({
@@ -100,13 +96,13 @@ require_dist.describe("parseIssueParams", () => {
100
96
  });
101
97
  });
102
98
  require_dist.it("should throw if neither issueId nor issueUrl is provided", () => {
103
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
99
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
104
100
  });
105
101
  require_dist.it("should throw if organizationSlug is missing and no issueUrl", () => {
106
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
102
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
107
103
  });
108
104
  require_dist.it("should throw if issueUrl is invalid", () => {
109
- require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
105
+ require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
110
106
  });
111
107
  });
112
108
 
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D;;GAEE,mCAAa,sBAAsB;CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
1
+ {"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D,mCAEE,mCAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -1,6 +1,6 @@
1
- import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-CyoHu5j4.js";
2
- import { describe, it } from "../dist-BKh-M1A1.js";
3
- import { globalExpect } from "../vi.ClIskdbk-De9q3829.js";
1
+ import { describe, it } from "../dist-DDpQABxe.js";
2
+ import { globalExpect } from "../vi.bdSIJ99Y-BfJr7I2s.js";
3
+ import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-BMVLc3mR.js";
4
4
 
5
5
  //#region src/internal/issue-helpers.test.ts
6
6
  describe("extractIssueId", () => {
@@ -51,7 +51,7 @@ describe("extractIssueId", () => {
51
51
  `);
52
52
  });
53
53
  it("should throw error for empty input", () => {
54
- globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
54
+ globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
55
55
  });
56
56
  it("should throw error for invalid URL path", () => {
57
57
  globalExpect(() => extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
@@ -70,10 +70,7 @@ describe("extractIssueId", () => {
70
70
  });
71
71
  describe("parseIssueId", () => {
72
72
  it("should remove trailing punctuation from issue ID", () => {
73
- globalExpect(
74
- // trailing period and exclamation
75
- parseIssueId("CLOUDFLARE-MCP-41.!")
76
- ).toBe("CLOUDFLARE-MCP-41");
73
+ globalExpect(parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
77
74
  });
78
75
  it("should not modify a clean issue ID", () => {
79
76
  globalExpect(parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,SAAS,gBAAgB,MAAM;AAC7B,IAAG,oDAAoD,MAAM;AAC3D;;GAEE,aAAa,sBAAsB;CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,aAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,aAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,SAAS,oBAAoB,MAAM;AACjC,IAAG,8BAA8B,MAAM;AACrC,eACE,iBAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,IAAG,kDAAkD,MAAM;AACzD,eACE,iBAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,IAAG,4DAA4D,MAAM;AACnE,eAAO,MACL,iBAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,MACL,iBAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,IAAG,uCAAuC,MAAM;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
1
+ {"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,SAAS,gBAAgB,MAAM;AAC7B,IAAG,oDAAoD,MAAM;AAC3D,eAEE,aAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,aAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,aAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,SAAS,oBAAoB,MAAM;AACjC,IAAG,8BAA8B,MAAM;AACrC,eACE,iBAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,IAAG,kDAAkD,MAAM;AACzD,eACE,iBAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,IAAG,4DAA4D,MAAM;AACnE,eAAO,MACL,iBAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,MACL,iBAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,IAAG,uCAAuC,MAAM;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -1,5 +1,13 @@
1
1
  //#region src/internal/issue-helpers.ts
2
2
  /**
3
+ * Issue parameter parsing and validation utilities.
4
+ *
5
+ * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),
6
+ * extracts organization and issue identifiers, and validates issue ID formats.
7
+ * Provides robust parsing for LLM-generated parameters that may contain formatting
8
+ * inconsistencies.
9
+ */
10
+ /**
3
11
  * Extracts the Sentry issue ID and organization slug from a full URL
4
12
  *
5
13
  * @param url - A full Sentry issue URL
@@ -7,8 +15,14 @@
7
15
  * @throws Error if the input is invalid
8
16
  */
9
17
  function extractIssueId(url) {
18
+ if (!url || typeof url !== "string") throw new Error("Invalid Sentry issue URL. URL must be a non-empty string.");
10
19
  if (!url.startsWith("http://") && !url.startsWith("https://")) throw new Error("Invalid Sentry issue URL. Must start with http:// or https://");
11
- const parsedUrl = new URL(url);
20
+ let parsedUrl;
21
+ try {
22
+ parsedUrl = new URL(url);
23
+ } catch (error) {
24
+ throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);
25
+ }
12
26
  const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
13
27
  if (pathParts.length < 2 || !pathParts.includes("issues")) throw new Error("Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'");
14
28
  const issueId = pathParts[pathParts.indexOf("issues") + 1];
@@ -67,4 +81,4 @@ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
67
81
 
68
82
  //#endregion
69
83
  export { extractIssueId, parseIssueId, parseIssueParams };
70
- //# sourceMappingURL=issue-helpers-CyoHu5j4.js.map
84
+ //# sourceMappingURL=issue-helpers-BMVLc3mR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-BMVLc3mR.js","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Issue parameter parsing and validation utilities.\n *\n * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),\n * extracts organization and issue identifiers, and validates issue ID formats.\n * Provides robust parsing for LLM-generated parameters that may contain formatting\n * inconsistencies.\n */\n\n/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url || typeof url !== \"string\") {\n throw new Error(\n \"Invalid Sentry issue URL. URL must be a non-empty string.\",\n );\n }\n\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (error) {\n throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n }\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n\n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`,\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(issueId),\n };\n }\n\n throw new Error(\"Either issueId or issueUrl must be provided\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,eAAeA,KAG7B;AACA,MAAK,cAAc,QAAQ,SACzB,OAAM,IAAI,MACR;AAIJ,MAAK,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;CAIJ,IAAIC;AACJ,KAAI;AACF,cAAY,IAAI,IAAI;CACrB,SAAQ,OAAO;AACd,QAAM,IAAI,OAAO,iDAAiD,IAAI;CACvE;CAED,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AAC/D,KAAI,UAAU,SAAS,MAAM,UAAU,SAAS,SAAS,CACvD,OAAM,IAAI,MACR;CAIJ,MAAM,UAAU,UAAU,UAAU,QAAQ,SAAS,GAAG;AACxD,MAAK,QACH,OAAM,IAAI,MAAM;CAIlB,IAAIC;AACJ,KAAI,UAAU,SAAS,gBAAgB,CACrC,oBAAmB,UAAU,UAAU,QAAQ,gBAAgB,GAAG;UACzD,UAAU,SAAS,KAAK,UAAU,OAAO,SAElD,oBAAmB,UAAU;MACxB;EAEL,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI;AAC/C,MAAI,UAAU,SAAS,KAAK,UAAU,OAAO,MAC3C,oBAAmB,UAAU;CAEhC;AAED,MAAK,iBACH,OAAM,IAAI,MACR;AAIJ,QAAO;EAAE;EAAS;CAAkB;AACrC;;;;;;;;;AAUD,SAAgB,aAAaC,SAAiB;CAC5C,IAAI,eAAe;AAEnB,gBAAe,aAAa,QAAQ,WAAW,GAAG;CAIlD,MAAM,mBAAmB;AAEzB,MAAK,iBAAiB,KAAK,aAAa,CACtC,OAAM,IAAI,OACP,4BAA4B,aAAa;AAI9C,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1,7 +1,14 @@
1
- "use strict";
2
1
 
3
2
  //#region src/internal/issue-helpers.ts
4
3
  /**
4
+ * Issue parameter parsing and validation utilities.
5
+ *
6
+ * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),
7
+ * extracts organization and issue identifiers, and validates issue ID formats.
8
+ * Provides robust parsing for LLM-generated parameters that may contain formatting
9
+ * inconsistencies.
10
+ */
11
+ /**
5
12
  * Extracts the Sentry issue ID and organization slug from a full URL
6
13
  *
7
14
  * @param url - A full Sentry issue URL
@@ -9,8 +16,14 @@
9
16
  * @throws Error if the input is invalid
10
17
  */
11
18
  function extractIssueId(url) {
19
+ if (!url || typeof url !== "string") throw new Error("Invalid Sentry issue URL. URL must be a non-empty string.");
12
20
  if (!url.startsWith("http://") && !url.startsWith("https://")) throw new Error("Invalid Sentry issue URL. Must start with http:// or https://");
13
- const parsedUrl = new URL(url);
21
+ let parsedUrl;
22
+ try {
23
+ parsedUrl = new URL(url);
24
+ } catch (error) {
25
+ throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);
26
+ }
14
27
  const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
15
28
  if (pathParts.length < 2 || !pathParts.includes("issues")) throw new Error("Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'");
16
29
  const issueId = pathParts[pathParts.indexOf("issues") + 1];
@@ -86,4 +99,4 @@ Object.defineProperty(exports, 'parseIssueParams', {
86
99
  return parseIssueParams;
87
100
  }
88
101
  });
89
- //# sourceMappingURL=issue-helpers-DbsECZFq.cjs.map
102
+ //# sourceMappingURL=issue-helpers-D712fGT2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-D712fGT2.cjs","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Issue parameter parsing and validation utilities.\n *\n * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),\n * extracts organization and issue identifiers, and validates issue ID formats.\n * Provides robust parsing for LLM-generated parameters that may contain formatting\n * inconsistencies.\n */\n\n/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url || typeof url !== \"string\") {\n throw new Error(\n \"Invalid Sentry issue URL. URL must be a non-empty string.\",\n );\n }\n\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (error) {\n throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n }\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n\n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`,\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(issueId),\n };\n }\n\n throw new Error(\"Either issueId or issueUrl must be provided\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgB,eAAeA,KAG7B;AACA,MAAK,cAAc,QAAQ,SACzB,OAAM,IAAI,MACR;AAIJ,MAAK,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;CAIJ,IAAIC;AACJ,KAAI;AACF,cAAY,IAAI,IAAI;CACrB,SAAQ,OAAO;AACd,QAAM,IAAI,OAAO,iDAAiD,IAAI;CACvE;CAED,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AAC/D,KAAI,UAAU,SAAS,MAAM,UAAU,SAAS,SAAS,CACvD,OAAM,IAAI,MACR;CAIJ,MAAM,UAAU,UAAU,UAAU,QAAQ,SAAS,GAAG;AACxD,MAAK,QACH,OAAM,IAAI,MAAM;CAIlB,IAAIC;AACJ,KAAI,UAAU,SAAS,gBAAgB,CACrC,oBAAmB,UAAU,UAAU,QAAQ,gBAAgB,GAAG;UACzD,UAAU,SAAS,KAAK,UAAU,OAAO,SAElD,oBAAmB,UAAU;MACxB;EAEL,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI;AAC/C,MAAI,UAAU,SAAS,KAAK,UAAU,OAAO,MAC3C,oBAAmB,UAAU;CAEhC;AAED,MAAK,iBACH,OAAM,IAAI,MACR;AAIJ,QAAO;EAAE;EAAS;CAAkB;AACrC;;;;;;;;;AAUD,SAAgB,aAAaC,SAAiB;CAC5C,IAAI,eAAe;AAEnB,gBAAe,aAAa,QAAQ,WAAW,GAAG;CAIlD,MAAM,mBAAmB;AAEzB,MAAK,iBAAiB,KAAK,aAAa,CACtC,OAAM,IAAI,OACP,4BAA4B,aAAa;AAI9C,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1,5 +1,4 @@
1
- "use strict";
2
- const require_chunk = require('./chunk-BtT13l48.cjs');
1
+ const require_chunk = require('./chunk-DWy1uDak.cjs');
3
2
  const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
4
3
 
5
4
  //#region src/logging.ts
@@ -29,4 +28,4 @@ Object.defineProperty(exports, 'logError', {
29
28
  return logError;
30
29
  }
31
30
  });
32
- //# sourceMappingURL=logging-BEMgC5SA.cjs.map
31
+ //# sourceMappingURL=logging-ByvSjT6V.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging-ByvSjT6V.cjs","names":["error: string | Error | unknown","contexts?: Record<string, Record<string, any>>","attachments?: Record<string, string | Uint8Array>"],"sources":["../src/logging.ts"],"sourcesContent":["/**\n * Logging and telemetry utilities for error reporting.\n *\n * Provides centralized error logging with Sentry integration. Handles both\n * console logging for development and structured error reporting for production\n * monitoring and debugging.\n */\nimport { captureException, captureMessage, withScope } from \"@sentry/core\";\n\n/**\n * Logs errors to console and Sentry with optional context and attachments.\n *\n * Supports both Error objects and string messages. Returns a Sentry event ID\n * that can be included in user-facing error messages for debugging support.\n *\n * @param error - Error object or message string to log\n * @param contexts - Additional context data for Sentry\n * @param attachments - Files or data to attach to the Sentry event\n * @returns Sentry event ID for referencing this error, or undefined if logging fails\n *\n * @example Error Object Logging\n * ```typescript\n * try {\n * await riskyOperation();\n * } catch (error) {\n * const eventId = logError(error, {\n * operation: { name: \"riskyOperation\", params: {...} }\n * });\n * return `Error occurred. Event ID: ${eventId}`;\n * }\n * ```\n *\n * @example String Message Logging\n * ```typescript\n * const eventId = logError(\"Configuration validation failed\", {\n * config: { provided: userConfig, expected: expectedFormat }\n * });\n * ```\n */\nexport function logError(\n error: Error | unknown,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined;\nexport function logError(\n message: string,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined;\nexport function logError(\n error: string | Error | unknown,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined {\n const level = \"error\";\n\n console.error(error);\n\n const eventId = withScope((scope) => {\n if (attachments) {\n for (const [key, data] of Object.entries(attachments)) {\n scope.addAttachment({\n data,\n filename: key,\n });\n }\n }\n\n return typeof error === \"string\"\n ? captureMessage(error, {\n contexts,\n level,\n })\n : captureException(error, {\n contexts,\n level,\n });\n });\n\n return eventId;\n}\n"],"mappings":";;;;AAiDA,SAAgB,SACdA,OACAC,UACAC,aACoB;CACpB,MAAM,QAAQ;AAEd,SAAQ,MAAM,MAAM;CAEpB,MAAM,UAAU,6BAAU,CAAC,UAAU;AACnC,MAAI,YACF,MAAK,MAAM,CAAC,KAAK,KAAK,IAAI,OAAO,QAAQ,YAAY,CACnD,OAAM,cAAc;GAClB;GACA,UAAU;EACX,EAAC;AAIN,gBAAc,UAAU,WACpB,kCAAe,OAAO;GACpB;GACA;EACD,EAAC,GACF,oCAAiB,OAAO;GACtB;GACA;EACD,EAAC;CACP,EAAC;AAEF,QAAO;AACR"}
@@ -22,4 +22,4 @@ function logError(error, contexts, attachments) {
22
22
 
23
23
  //#endregion
24
24
  export { logError };
25
- //# sourceMappingURL=logging-Cxm8lQvg.js.map
25
+ //# sourceMappingURL=logging-CXLD0FFB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging-CXLD0FFB.js","names":["error: string | Error | unknown","contexts?: Record<string, Record<string, any>>","attachments?: Record<string, string | Uint8Array>"],"sources":["../src/logging.ts"],"sourcesContent":["/**\n * Logging and telemetry utilities for error reporting.\n *\n * Provides centralized error logging with Sentry integration. Handles both\n * console logging for development and structured error reporting for production\n * monitoring and debugging.\n */\nimport { captureException, captureMessage, withScope } from \"@sentry/core\";\n\n/**\n * Logs errors to console and Sentry with optional context and attachments.\n *\n * Supports both Error objects and string messages. Returns a Sentry event ID\n * that can be included in user-facing error messages for debugging support.\n *\n * @param error - Error object or message string to log\n * @param contexts - Additional context data for Sentry\n * @param attachments - Files or data to attach to the Sentry event\n * @returns Sentry event ID for referencing this error, or undefined if logging fails\n *\n * @example Error Object Logging\n * ```typescript\n * try {\n * await riskyOperation();\n * } catch (error) {\n * const eventId = logError(error, {\n * operation: { name: \"riskyOperation\", params: {...} }\n * });\n * return `Error occurred. Event ID: ${eventId}`;\n * }\n * ```\n *\n * @example String Message Logging\n * ```typescript\n * const eventId = logError(\"Configuration validation failed\", {\n * config: { provided: userConfig, expected: expectedFormat }\n * });\n * ```\n */\nexport function logError(\n error: Error | unknown,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined;\nexport function logError(\n message: string,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined;\nexport function logError(\n error: string | Error | unknown,\n contexts?: Record<string, Record<string, any>>,\n attachments?: Record<string, string | Uint8Array>,\n): string | undefined {\n const level = \"error\";\n\n console.error(error);\n\n const eventId = withScope((scope) => {\n if (attachments) {\n for (const [key, data] of Object.entries(attachments)) {\n scope.addAttachment({\n data,\n filename: key,\n });\n }\n }\n\n return typeof error === \"string\"\n ? captureMessage(error, {\n contexts,\n level,\n })\n : captureException(error, {\n contexts,\n level,\n });\n });\n\n return eventId;\n}\n"],"mappings":";;;AAiDA,SAAgB,SACdA,OACAC,UACAC,aACoB;CACpB,MAAM,QAAQ;AAEd,SAAQ,MAAM,MAAM;CAEpB,MAAM,UAAU,UAAU,CAAC,UAAU;AACnC,MAAI,YACF,MAAK,MAAM,CAAC,KAAK,KAAK,IAAI,OAAO,QAAQ,YAAY,CACnD,OAAM,cAAc;GAClB;GACA,UAAU;EACX,EAAC;AAIN,gBAAc,UAAU,WACpB,eAAe,OAAO;GACpB;GACA;EACD,EAAC,GACF,iBAAiB,OAAO;GACtB;GACA;EACD,EAAC;CACP,EAAC;AAEF,QAAO;AACR"}
package/dist/logging.cjs CHANGED
@@ -1,3 +1,3 @@
1
- const require_logging = require('./logging-BEMgC5SA.cjs');
1
+ const require_logging = require('./logging-ByvSjT6V.cjs');
2
2
 
3
- exports.logError = require_logging.logError
3
+ exports.logError = require_logging.logError;
@@ -1,9 +1,37 @@
1
1
  //#region src/logging.d.ts
2
+ /**
3
+ * Logs errors to console and Sentry with optional context and attachments.
4
+ *
5
+ * Supports both Error objects and string messages. Returns a Sentry event ID
6
+ * that can be included in user-facing error messages for debugging support.
7
+ *
8
+ * @param error - Error object or message string to log
9
+ * @param contexts - Additional context data for Sentry
10
+ * @param attachments - Files or data to attach to the Sentry event
11
+ * @returns Sentry event ID for referencing this error, or undefined if logging fails
12
+ *
13
+ * @example Error Object Logging
14
+ * ```typescript
15
+ * try {
16
+ * await riskyOperation();
17
+ * } catch (error) {
18
+ * const eventId = logError(error, {
19
+ * operation: { name: "riskyOperation", params: {...} }
20
+ * });
21
+ * return `Error occurred. Event ID: ${eventId}`;
22
+ * }
23
+ * ```
24
+ *
25
+ * @example String Message Logging
26
+ * ```typescript
27
+ * const eventId = logError("Configuration validation failed", {
28
+ * config: { provided: userConfig, expected: expectedFormat }
29
+ * });
30
+ * ```
31
+ */
2
32
  declare function logError(error: Error | unknown, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
3
33
  declare function logError(message: string, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
4
-
5
- //#endregion
6
34
  //# sourceMappingURL=logging.d.ts.map
7
-
35
+ //#endregion
8
36
  export { logError };
9
37
  //# sourceMappingURL=logging.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.d.cts","names":[],"sources":["../src/logging.ts"],"sourcesContent":null,"mappings":";iBAEgB,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;AAHxB,iBAKA,QAAA,CALQ,OAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAOX,MAPW,CAAA,MAAA,EAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAA,WAAA,CAAA,EAQR,MARQ,CAAA,MAAA,EAAA,MAAA,GAQgB,UARhB,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA"}
1
+ {"version":3,"file":"logging.d.cts","names":[],"sources":["../src/logging.ts"],"sourcesContent":[],"mappings":";;AAuCA;;;;;;;AAGsB;AAEtB;;;;;;AAGsB;;;;;;;;;;;;;;;iBARN,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;iBAExB,QAAA,6BAEH,eAAe,oCACZ,wBAAwB"}
package/dist/logging.d.ts CHANGED
@@ -1,9 +1,37 @@
1
1
  //#region src/logging.d.ts
2
+ /**
3
+ * Logs errors to console and Sentry with optional context and attachments.
4
+ *
5
+ * Supports both Error objects and string messages. Returns a Sentry event ID
6
+ * that can be included in user-facing error messages for debugging support.
7
+ *
8
+ * @param error - Error object or message string to log
9
+ * @param contexts - Additional context data for Sentry
10
+ * @param attachments - Files or data to attach to the Sentry event
11
+ * @returns Sentry event ID for referencing this error, or undefined if logging fails
12
+ *
13
+ * @example Error Object Logging
14
+ * ```typescript
15
+ * try {
16
+ * await riskyOperation();
17
+ * } catch (error) {
18
+ * const eventId = logError(error, {
19
+ * operation: { name: "riskyOperation", params: {...} }
20
+ * });
21
+ * return `Error occurred. Event ID: ${eventId}`;
22
+ * }
23
+ * ```
24
+ *
25
+ * @example String Message Logging
26
+ * ```typescript
27
+ * const eventId = logError("Configuration validation failed", {
28
+ * config: { provided: userConfig, expected: expectedFormat }
29
+ * });
30
+ * ```
31
+ */
2
32
  declare function logError(error: Error | unknown, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
3
33
  declare function logError(message: string, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
4
-
5
- //#endregion
6
34
  //# sourceMappingURL=logging.d.ts.map
7
-
35
+ //#endregion
8
36
  export { logError };
9
37
  //# sourceMappingURL=logging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.d.ts","names":[],"sources":["../src/logging.ts"],"sourcesContent":null,"mappings":";iBAEgB,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;AAHxB,iBAKA,QAAA,CALQ,OAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAOX,MAPW,CAAA,MAAA,EAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAA,WAAA,CAAA,EAQR,MARQ,CAAA,MAAA,EAAA,MAAA,GAQgB,UARhB,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA"}
1
+ {"version":3,"file":"logging.d.ts","names":[],"sources":["../src/logging.ts"],"sourcesContent":[],"mappings":";;AAuCA;;;;;;;AAGsB;AAEtB;;;;;;AAGsB;;;;;;;;;;;;;;;iBARN,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;iBAExB,QAAA,6BAEH,eAAe,oCACZ,wBAAwB"}
package/dist/logging.js CHANGED
@@ -1,3 +1,3 @@
1
- import { logError } from "./logging-Cxm8lQvg.js";
1
+ import { logError } from "./logging-CXLD0FFB.js";
2
2
 
3
3
  export { logError };
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
 
3
2
  //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
4
3
  const comma = ",".charCodeAt(0);
@@ -1013,5 +1012,5 @@ var MagicString = class MagicString {
1013
1012
  };
1014
1013
 
1015
1014
  //#endregion
1016
- exports.default = MagicString
1017
- //# sourceMappingURL=magic-string.es-m-ldRjOa.cjs.map
1015
+ exports.default = MagicString;
1016
+ //# sourceMappingURL=magic-string.es-CybcVAw7.cjs.map