@sentry/mcp-server 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/README.md +4 -2
  2. package/dist/analyze-issue-with-seer-Bq3kefOr.cjs +169 -0
  3. package/dist/analyze-issue-with-seer-Bq3kefOr.cjs.map +1 -0
  4. package/dist/analyze-issue-with-seer-Dk0ZFwN8.js +163 -0
  5. package/dist/analyze-issue-with-seer-Dk0ZFwN8.js.map +1 -0
  6. package/dist/api-client/client.cjs +2 -2
  7. package/dist/api-client/client.d.cts +3 -3
  8. package/dist/api-client/client.d.ts +3 -3
  9. package/dist/api-client/client.js +2 -2
  10. package/dist/api-client/index.cjs +10 -2
  11. package/dist/api-client/index.d.cts +4 -4
  12. package/dist/api-client/index.d.ts +5 -5
  13. package/dist/api-client/index.js +5 -5
  14. package/dist/api-client/schema.cjs +9 -1
  15. package/dist/api-client/schema.d.cts +2 -2
  16. package/dist/api-client/schema.d.ts +2 -2
  17. package/dist/api-client/schema.js +2 -2
  18. package/dist/api-client/types.d.cts +3 -3
  19. package/dist/api-client/types.d.ts +3 -3
  20. package/dist/api-client/types.js +1 -1
  21. package/dist/api-utils-BJS0CChW.cjs +36 -0
  22. package/dist/api-utils-BJS0CChW.cjs.map +1 -0
  23. package/dist/api-utils-BcB1cMXS.js +31 -0
  24. package/dist/api-utils-BcB1cMXS.js.map +1 -0
  25. package/dist/client-BNTsOycD.cjs +620 -0
  26. package/dist/client-BNTsOycD.cjs.map +1 -0
  27. package/dist/client-BbamPqV4.js +609 -0
  28. package/dist/client-BbamPqV4.js.map +1 -0
  29. package/dist/client-Dae1ZwWb.d.cts +556 -0
  30. package/dist/client-Dae1ZwWb.d.cts.map +1 -0
  31. package/dist/client-qyEu8fvj.d.ts +556 -0
  32. package/dist/client-qyEu8fvj.d.ts.map +1 -0
  33. package/dist/constants-ClkMK29-.cjs +182 -0
  34. package/dist/constants-ClkMK29-.cjs.map +1 -0
  35. package/dist/constants-S7AU45oQ.js +164 -0
  36. package/dist/constants-S7AU45oQ.js.map +1 -0
  37. package/dist/constants.cjs +5 -0
  38. package/dist/constants.d.cts +23 -0
  39. package/dist/constants.d.cts.map +1 -0
  40. package/dist/constants.d.ts +23 -0
  41. package/dist/constants.d.ts.map +1 -0
  42. package/dist/constants.js +3 -0
  43. package/dist/create-dsn-B3L8iWno.js +59 -0
  44. package/dist/create-dsn-B3L8iWno.js.map +1 -0
  45. package/dist/create-dsn-CVPtt_Es.cjs +65 -0
  46. package/dist/create-dsn-CVPtt_Es.cjs.map +1 -0
  47. package/dist/create-project-B_6a6okf.cjs +82 -0
  48. package/dist/create-project-B_6a6okf.cjs.map +1 -0
  49. package/dist/create-project-DdIXMvWI.js +76 -0
  50. package/dist/create-project-DdIXMvWI.js.map +1 -0
  51. package/dist/create-team-BarRdaZK.js +47 -0
  52. package/dist/create-team-BarRdaZK.js.map +1 -0
  53. package/dist/create-team-C1DP5Z1r.cjs +53 -0
  54. package/dist/create-team-C1DP5Z1r.cjs.map +1 -0
  55. package/dist/defineTool-77H4nSna.js +8 -0
  56. package/dist/defineTool-77H4nSna.js.map +1 -0
  57. package/dist/defineTool-lWNTzWl_.cjs +14 -0
  58. package/dist/defineTool-lWNTzWl_.cjs.map +1 -0
  59. package/dist/{errors-BJSrT6Ou.js → errors-CIoxzIug.js} +1 -1
  60. package/dist/{errors-BJSrT6Ou.js.map → errors-CIoxzIug.js.map} +1 -1
  61. package/dist/{errors-B9fwS-aP.cjs → errors-YmiXLOyx.cjs} +1 -1
  62. package/dist/{errors-B9fwS-aP.cjs.map → errors-YmiXLOyx.cjs.map} +1 -1
  63. package/dist/errors.cjs +1 -1
  64. package/dist/errors.js +1 -1
  65. package/dist/fetch-utils-B-a92ObC.d.ts +14 -0
  66. package/dist/fetch-utils-B-a92ObC.d.ts.map +1 -0
  67. package/dist/fetch-utils-BMKjO-cc.js +29 -0
  68. package/dist/fetch-utils-BMKjO-cc.js.map +1 -0
  69. package/dist/fetch-utils-DlPjrSk2.js +0 -0
  70. package/dist/fetch-utils-DzdRW4Yd.d.cts +14 -0
  71. package/dist/fetch-utils-DzdRW4Yd.d.cts.map +1 -0
  72. package/dist/fetch-utils-oab6uNp3.cjs +35 -0
  73. package/dist/fetch-utils-oab6uNp3.cjs.map +1 -0
  74. package/dist/find-dsns-BDJWY6nZ.cjs +58 -0
  75. package/dist/find-dsns-BDJWY6nZ.cjs.map +1 -0
  76. package/dist/find-dsns-BPbblgrn.js +52 -0
  77. package/dist/find-dsns-BPbblgrn.js.map +1 -0
  78. package/dist/find-errors-B9wLxXA0.js +91 -0
  79. package/dist/find-errors-B9wLxXA0.js.map +1 -0
  80. package/dist/find-errors-DnFs3PaH.cjs +97 -0
  81. package/dist/find-errors-DnFs3PaH.cjs.map +1 -0
  82. package/dist/find-issues-BI1tI3cJ.js +92 -0
  83. package/dist/find-issues-BI1tI3cJ.js.map +1 -0
  84. package/dist/find-issues-CwPbwRXK.cjs +98 -0
  85. package/dist/find-issues-CwPbwRXK.cjs.map +1 -0
  86. package/dist/find-organizations-CdiouW48.js +45 -0
  87. package/dist/find-organizations-CdiouW48.js.map +1 -0
  88. package/dist/find-organizations-DqS6zoTK.cjs +50 -0
  89. package/dist/find-organizations-DqS6zoTK.cjs.map +1 -0
  90. package/dist/find-projects-Ba6cdX7n.cjs +45 -0
  91. package/dist/find-projects-Ba6cdX7n.cjs.map +1 -0
  92. package/dist/find-projects-Ccfxv47h.js +39 -0
  93. package/dist/find-projects-Ccfxv47h.js.map +1 -0
  94. package/dist/find-releases-CFl86XMT.cjs +99 -0
  95. package/dist/find-releases-CFl86XMT.cjs.map +1 -0
  96. package/dist/find-releases-CFoGytN-.js +93 -0
  97. package/dist/find-releases-CFoGytN-.js.map +1 -0
  98. package/dist/find-tags-ORtYLH5b.js +39 -0
  99. package/dist/find-tags-ORtYLH5b.js.map +1 -0
  100. package/dist/find-tags-h2o0BKWO.cjs +45 -0
  101. package/dist/find-tags-h2o0BKWO.cjs.map +1 -0
  102. package/dist/find-teams-DUcDfSOl.cjs +45 -0
  103. package/dist/find-teams-DUcDfSOl.cjs.map +1 -0
  104. package/dist/find-teams-hreVp1nw.js +39 -0
  105. package/dist/find-teams-hreVp1nw.js.map +1 -0
  106. package/dist/find-transactions-BehUqQYs.js +83 -0
  107. package/dist/find-transactions-BehUqQYs.js.map +1 -0
  108. package/dist/find-transactions-BkPscam3.cjs +89 -0
  109. package/dist/find-transactions-BkPscam3.cjs.map +1 -0
  110. package/dist/formatting-B-u5CbYn.d.ts +47 -0
  111. package/dist/formatting-B-u5CbYn.d.ts.map +1 -0
  112. package/dist/formatting-BlMiQa9i.cjs +388 -0
  113. package/dist/formatting-BlMiQa9i.cjs.map +1 -0
  114. package/dist/formatting-Di1X9Jn3.d.cts +47 -0
  115. package/dist/formatting-Di1X9Jn3.d.cts.map +1 -0
  116. package/dist/formatting-pUm38KOj.js +370 -0
  117. package/dist/formatting-pUm38KOj.js.map +1 -0
  118. package/dist/formatting-utils-C3sej5ER.js +14 -0
  119. package/dist/formatting-utils-C3sej5ER.js.map +1 -0
  120. package/dist/formatting-utils-DDz14xeB.cjs +20 -0
  121. package/dist/formatting-utils-DDz14xeB.cjs.map +1 -0
  122. package/dist/get-doc-AuAW_qr9.cjs +86 -0
  123. package/dist/get-doc-AuAW_qr9.cjs.map +1 -0
  124. package/dist/get-doc-BtxZOy7y.js +80 -0
  125. package/dist/get-doc-BtxZOy7y.js.map +1 -0
  126. package/dist/get-event-attachment-Bq5lkaKV.cjs +144 -0
  127. package/dist/get-event-attachment-Bq5lkaKV.cjs.map +1 -0
  128. package/dist/get-event-attachment-DwAl54zv.js +138 -0
  129. package/dist/get-event-attachment-DwAl54zv.js.map +1 -0
  130. package/dist/get-issue-details-DrpD5LlK.js +104 -0
  131. package/dist/get-issue-details-DrpD5LlK.js.map +1 -0
  132. package/dist/get-issue-details-qGwu18JX.cjs +110 -0
  133. package/dist/get-issue-details-qGwu18JX.cjs.map +1 -0
  134. package/dist/index.cjs +60 -21
  135. package/dist/index.cjs.map +1 -1
  136. package/dist/index.js +62 -23
  137. package/dist/index.js.map +1 -1
  138. package/dist/internal/fetch-utils.cjs +3 -0
  139. package/dist/internal/fetch-utils.d.cts +2 -0
  140. package/dist/internal/fetch-utils.d.ts +2 -0
  141. package/dist/internal/fetch-utils.js +3 -0
  142. package/dist/internal/formatting.cjs +1 -1
  143. package/dist/internal/formatting.d.cts +5 -24
  144. package/dist/internal/formatting.d.ts +6 -25
  145. package/dist/internal/formatting.js +1 -1
  146. package/dist/internal/issue-helpers.cjs +1 -1
  147. package/dist/internal/issue-helpers.d.cts +2 -44
  148. package/dist/internal/issue-helpers.d.ts +2 -44
  149. package/dist/internal/issue-helpers.js +1 -1
  150. package/dist/internal/test-fixtures.cjs +214 -0
  151. package/dist/internal/test-fixtures.cjs.map +1 -0
  152. package/dist/internal/test-fixtures.d.cts +2138 -0
  153. package/dist/internal/test-fixtures.d.cts.map +1 -0
  154. package/dist/internal/test-fixtures.d.ts +2138 -0
  155. package/dist/internal/test-fixtures.d.ts.map +1 -0
  156. package/dist/internal/test-fixtures.js +205 -0
  157. package/dist/internal/test-fixtures.js.map +1 -0
  158. package/dist/issue-helpers-BOn4g7rx.d.ts +52 -0
  159. package/dist/issue-helpers-BOn4g7rx.d.ts.map +1 -0
  160. package/dist/{issue-helpers-CSNNO03f.js → issue-helpers-CqqYnwYE.js} +9 -1
  161. package/dist/issue-helpers-CqqYnwYE.js.map +1 -0
  162. package/dist/issue-helpers-Cz01Ipvl.d.cts +52 -0
  163. package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -0
  164. package/dist/{issue-helpers-71XgJVXC.cjs → issue-helpers-DyAIO0w6.cjs} +9 -1
  165. package/dist/issue-helpers-DyAIO0w6.cjs.map +1 -0
  166. package/dist/issue-utils-BVAB6I-Z.js +0 -0
  167. package/dist/issue-utils-pdbo-5LW.cjs +0 -0
  168. package/dist/{logging-CXLD0FFB.js → logging-LnQMFw-_.js} +1 -1
  169. package/dist/logging-LnQMFw-_.js.map +1 -0
  170. package/dist/{logging-ByvSjT6V.cjs → logging-oIouXrcb.cjs} +1 -1
  171. package/dist/logging-oIouXrcb.cjs.map +1 -0
  172. package/dist/logging.cjs +1 -1
  173. package/dist/logging.d.cts +30 -1
  174. package/dist/logging.d.cts.map +1 -1
  175. package/dist/logging.d.ts +30 -1
  176. package/dist/logging.d.ts.map +1 -1
  177. package/dist/logging.js +1 -1
  178. package/dist/{promptDefinitions-H0q1_X-K.d.ts → promptDefinitions-6xelipaz.d.ts} +11 -3
  179. package/dist/promptDefinitions-6xelipaz.d.ts.map +1 -0
  180. package/dist/{promptDefinitions-D3ll3qCd.cjs → promptDefinitions-C29BWGYg.cjs} +11 -4
  181. package/dist/promptDefinitions-C29BWGYg.cjs.map +1 -0
  182. package/dist/{promptDefinitions-aKmUZWWO.js → promptDefinitions-CSKE8T0a.js} +11 -4
  183. package/dist/promptDefinitions-CSKE8T0a.js.map +1 -0
  184. package/dist/{promptDefinitions-DMucOchd.d.cts → promptDefinitions-CVHtYaj8.d.cts} +11 -3
  185. package/dist/promptDefinitions-CVHtYaj8.d.cts.map +1 -0
  186. package/dist/promptDefinitions.cjs +3 -2
  187. package/dist/promptDefinitions.d.cts +1 -1
  188. package/dist/promptDefinitions.d.ts +1 -1
  189. package/dist/promptDefinitions.js +3 -2
  190. package/dist/{prompts-CzD0yl7Z.js → prompts-C8Y9w5c4.js} +9 -7
  191. package/dist/prompts-C8Y9w5c4.js.map +1 -0
  192. package/dist/{prompts-DMwoay8l.cjs → prompts-Df3i1XSB.cjs} +8 -7
  193. package/dist/prompts-Df3i1XSB.cjs.map +1 -0
  194. package/dist/prompts.cjs +2 -1
  195. package/dist/prompts.d.cts +4 -5
  196. package/dist/prompts.d.cts.map +1 -1
  197. package/dist/prompts.d.ts +4 -5
  198. package/dist/prompts.d.ts.map +1 -1
  199. package/dist/prompts.js +2 -1
  200. package/dist/resources-BHF8a1ZB.js +92 -0
  201. package/dist/resources-BHF8a1ZB.js.map +1 -0
  202. package/dist/resources-BM_YQGcb.cjs +104 -0
  203. package/dist/resources-BM_YQGcb.cjs.map +1 -0
  204. package/dist/resources.cjs +5 -2
  205. package/dist/resources.d.cts +30 -7
  206. package/dist/resources.d.cts.map +1 -1
  207. package/dist/resources.d.ts +30 -7
  208. package/dist/resources.d.ts.map +1 -1
  209. package/dist/resources.js +4 -2
  210. package/dist/{schema-DqxkW9Tx.d.cts → schema-B5BpplNK.d.ts} +3746 -575
  211. package/dist/schema-B5BpplNK.d.ts.map +1 -0
  212. package/dist/{schema-DkyWSqp_.cjs → schema-B_cMyyJJ.cjs} +130 -13
  213. package/dist/schema-B_cMyyJJ.cjs.map +1 -0
  214. package/dist/{schema-B8lT632E.cjs → schema-BpJVmev8.cjs} +51 -2
  215. package/dist/schema-BpJVmev8.cjs.map +1 -0
  216. package/dist/{schema-C-MLkWMc.d.ts → schema-Dt-HKnd_.d.cts} +3674 -503
  217. package/dist/schema-Dt-HKnd_.d.cts.map +1 -0
  218. package/dist/schema-DtsnsxMl.js +36 -0
  219. package/dist/schema-DtsnsxMl.js.map +1 -0
  220. package/dist/{schema-CewAKS9A.js → schema-WDk5Yqww.js} +83 -14
  221. package/dist/schema-WDk5Yqww.js.map +1 -0
  222. package/dist/schema.cjs +7 -1
  223. package/dist/schema.d.cts +16 -3
  224. package/dist/schema.d.cts.map +1 -1
  225. package/dist/schema.d.ts +16 -3
  226. package/dist/schema.d.ts.map +1 -1
  227. package/dist/schema.js +3 -2
  228. package/dist/search-docs-CrMdRDJy.js +102 -0
  229. package/dist/search-docs-CrMdRDJy.js.map +1 -0
  230. package/dist/search-docs-VhefTOOH.cjs +108 -0
  231. package/dist/search-docs-VhefTOOH.cjs.map +1 -0
  232. package/dist/seer-utils-Ckr8nYlz.js +87 -0
  233. package/dist/seer-utils-Ckr8nYlz.js.map +1 -0
  234. package/dist/seer-utils-CzYEEZb2.cjs +129 -0
  235. package/dist/seer-utils-CzYEEZb2.cjs.map +1 -0
  236. package/dist/server-CHG27fcn.cjs +243 -0
  237. package/dist/server-CHG27fcn.cjs.map +1 -0
  238. package/dist/server-DeuBftc5.js +237 -0
  239. package/dist/server-DeuBftc5.js.map +1 -0
  240. package/dist/server.cjs +40 -13
  241. package/dist/server.d.cts +22 -4
  242. package/dist/server.d.cts.map +1 -1
  243. package/dist/server.d.ts +22 -4
  244. package/dist/server.d.ts.map +1 -1
  245. package/dist/server.js +42 -15
  246. package/dist/stdio-BtVdTwx-.cjs +57 -0
  247. package/dist/stdio-BtVdTwx-.cjs.map +1 -0
  248. package/dist/stdio-DIuLW5EE.js +51 -0
  249. package/dist/stdio-DIuLW5EE.js.map +1 -0
  250. package/dist/test-setup.cjs +1763 -1410
  251. package/dist/test-setup.cjs.map +1 -1
  252. package/dist/test-setup.js +1581 -1201
  253. package/dist/test-setup.js.map +1 -1
  254. package/dist/toolDefinitions.d.ts +25 -2
  255. package/dist/toolDefinitions.js +1059 -4
  256. package/dist/tools/analyze-issue-with-seer.cjs +16 -0
  257. package/dist/tools/analyze-issue-with-seer.d.cts +16 -0
  258. package/dist/tools/analyze-issue-with-seer.d.cts.map +1 -0
  259. package/dist/tools/analyze-issue-with-seer.d.ts +16 -0
  260. package/dist/tools/analyze-issue-with-seer.d.ts.map +1 -0
  261. package/dist/tools/analyze-issue-with-seer.js +16 -0
  262. package/dist/tools/create-dsn.cjs +12 -0
  263. package/dist/tools/create-dsn.d.cts +15 -0
  264. package/dist/tools/create-dsn.d.cts.map +1 -0
  265. package/dist/tools/create-dsn.d.ts +15 -0
  266. package/dist/tools/create-dsn.d.ts.map +1 -0
  267. package/dist/tools/create-dsn.js +12 -0
  268. package/dist/tools/create-project.cjs +13 -0
  269. package/dist/tools/create-project.d.cts +16 -0
  270. package/dist/tools/create-project.d.cts.map +1 -0
  271. package/dist/tools/create-project.d.ts +16 -0
  272. package/dist/tools/create-project.d.ts.map +1 -0
  273. package/dist/tools/create-project.js +13 -0
  274. package/dist/tools/create-team.cjs +12 -0
  275. package/dist/tools/create-team.d.cts +14 -0
  276. package/dist/tools/create-team.d.cts.map +1 -0
  277. package/dist/tools/create-team.d.ts +14 -0
  278. package/dist/tools/create-team.d.ts.map +1 -0
  279. package/dist/tools/create-team.js +12 -0
  280. package/dist/tools/find-dsns.cjs +12 -0
  281. package/dist/tools/find-dsns.d.cts +14 -0
  282. package/dist/tools/find-dsns.d.cts.map +1 -0
  283. package/dist/tools/find-dsns.d.ts +14 -0
  284. package/dist/tools/find-dsns.d.ts.map +1 -0
  285. package/dist/tools/find-dsns.js +12 -0
  286. package/dist/tools/find-errors.cjs +12 -0
  287. package/dist/tools/find-errors.d.cts +18 -0
  288. package/dist/tools/find-errors.d.cts.map +1 -0
  289. package/dist/tools/find-errors.d.ts +18 -0
  290. package/dist/tools/find-errors.d.ts.map +1 -0
  291. package/dist/tools/find-errors.js +12 -0
  292. package/dist/tools/find-issues.cjs +12 -0
  293. package/dist/tools/find-issues.d.cts +16 -0
  294. package/dist/tools/find-issues.d.cts.map +1 -0
  295. package/dist/tools/find-issues.d.ts +16 -0
  296. package/dist/tools/find-issues.d.ts.map +1 -0
  297. package/dist/tools/find-issues.js +12 -0
  298. package/dist/tools/find-organizations.cjs +10 -0
  299. package/dist/tools/find-organizations.d.cts +9 -0
  300. package/dist/tools/find-organizations.d.cts.map +1 -0
  301. package/dist/tools/find-organizations.d.ts +9 -0
  302. package/dist/tools/find-organizations.d.ts.map +1 -0
  303. package/dist/tools/find-organizations.js +10 -0
  304. package/dist/tools/find-projects.cjs +12 -0
  305. package/dist/tools/find-projects.d.cts +13 -0
  306. package/dist/tools/find-projects.d.cts.map +1 -0
  307. package/dist/tools/find-projects.d.ts +13 -0
  308. package/dist/tools/find-projects.d.ts.map +1 -0
  309. package/dist/tools/find-projects.js +12 -0
  310. package/dist/tools/find-releases.cjs +12 -0
  311. package/dist/tools/find-releases.d.cts +15 -0
  312. package/dist/tools/find-releases.d.cts.map +1 -0
  313. package/dist/tools/find-releases.d.ts +15 -0
  314. package/dist/tools/find-releases.d.ts.map +1 -0
  315. package/dist/tools/find-releases.js +12 -0
  316. package/dist/tools/find-tags.cjs +12 -0
  317. package/dist/tools/find-tags.d.cts +13 -0
  318. package/dist/tools/find-tags.d.cts.map +1 -0
  319. package/dist/tools/find-tags.d.ts +13 -0
  320. package/dist/tools/find-tags.d.ts.map +1 -0
  321. package/dist/tools/find-tags.js +12 -0
  322. package/dist/tools/find-teams.cjs +12 -0
  323. package/dist/tools/find-teams.d.cts +13 -0
  324. package/dist/tools/find-teams.d.cts.map +1 -0
  325. package/dist/tools/find-teams.d.ts +13 -0
  326. package/dist/tools/find-teams.d.ts.map +1 -0
  327. package/dist/tools/find-teams.js +12 -0
  328. package/dist/tools/find-transactions.cjs +12 -0
  329. package/dist/tools/find-transactions.d.cts +17 -0
  330. package/dist/tools/find-transactions.d.cts.map +1 -0
  331. package/dist/tools/find-transactions.d.ts +17 -0
  332. package/dist/tools/find-transactions.d.ts.map +1 -0
  333. package/dist/tools/find-transactions.js +12 -0
  334. package/dist/tools/get-doc.cjs +11 -0
  335. package/dist/tools/get-doc.d.cts +12 -0
  336. package/dist/tools/get-doc.d.cts.map +1 -0
  337. package/dist/tools/get-doc.d.ts +12 -0
  338. package/dist/tools/get-doc.d.ts.map +1 -0
  339. package/dist/tools/get-doc.js +11 -0
  340. package/dist/tools/get-event-attachment.cjs +12 -0
  341. package/dist/tools/get-event-attachment.d.cts +16 -0
  342. package/dist/tools/get-event-attachment.d.cts.map +1 -0
  343. package/dist/tools/get-event-attachment.d.ts +16 -0
  344. package/dist/tools/get-event-attachment.d.ts.map +1 -0
  345. package/dist/tools/get-event-attachment.js +12 -0
  346. package/dist/tools/get-issue-details.cjs +15 -0
  347. package/dist/tools/get-issue-details.d.cts +16 -0
  348. package/dist/tools/get-issue-details.d.cts.map +1 -0
  349. package/dist/tools/get-issue-details.d.ts +16 -0
  350. package/dist/tools/get-issue-details.d.ts.map +1 -0
  351. package/dist/tools/get-issue-details.js +15 -0
  352. package/dist/tools/index.cjs +40 -0
  353. package/dist/tools/index.d.cts +127 -0
  354. package/dist/tools/index.d.cts.map +1 -0
  355. package/dist/tools/index.d.ts +127 -0
  356. package/dist/tools/index.d.ts.map +1 -0
  357. package/dist/tools/index.js +40 -0
  358. package/dist/tools/search-docs.cjs +12 -0
  359. package/dist/tools/search-docs.d.cts +14 -0
  360. package/dist/tools/search-docs.d.cts.map +1 -0
  361. package/dist/tools/search-docs.d.ts +14 -0
  362. package/dist/tools/search-docs.d.ts.map +1 -0
  363. package/dist/tools/search-docs.js +12 -0
  364. package/dist/tools/types.cjs +0 -0
  365. package/dist/tools/types.d.cts +4 -0
  366. package/dist/tools/types.d.ts +4 -0
  367. package/dist/tools/types.js +0 -0
  368. package/dist/tools/update-issue.cjs +16 -0
  369. package/dist/tools/update-issue.d.cts +17 -0
  370. package/dist/tools/update-issue.d.cts.map +1 -0
  371. package/dist/tools/update-issue.d.ts +17 -0
  372. package/dist/tools/update-issue.d.ts.map +1 -0
  373. package/dist/tools/update-issue.js +16 -0
  374. package/dist/tools/update-project.cjs +13 -0
  375. package/dist/tools/update-project.d.cts +18 -0
  376. package/dist/tools/update-project.d.cts.map +1 -0
  377. package/dist/tools/update-project.d.ts +18 -0
  378. package/dist/tools/update-project.d.ts.map +1 -0
  379. package/dist/tools/update-project.js +13 -0
  380. package/dist/tools/utils/api-utils.cjs +8 -0
  381. package/dist/tools/utils/api-utils.d.cts +24 -0
  382. package/dist/tools/utils/api-utils.d.cts.map +1 -0
  383. package/dist/tools/utils/api-utils.d.ts +24 -0
  384. package/dist/tools/utils/api-utils.d.ts.map +1 -0
  385. package/dist/tools/utils/api-utils.js +8 -0
  386. package/dist/tools/utils/defineTool.cjs +3 -0
  387. package/dist/tools/utils/defineTool.d.cts +12 -0
  388. package/dist/tools/utils/defineTool.d.cts.map +1 -0
  389. package/dist/tools/utils/defineTool.d.ts +12 -0
  390. package/dist/tools/utils/defineTool.d.ts.map +1 -0
  391. package/dist/tools/utils/defineTool.js +3 -0
  392. package/dist/tools/utils/fetch-utils.cjs +4 -0
  393. package/dist/tools/utils/fetch-utils.d.cts +2 -0
  394. package/dist/tools/utils/fetch-utils.d.ts +2 -0
  395. package/dist/tools/utils/fetch-utils.js +4 -0
  396. package/dist/tools/utils/formatting-utils.cjs +3 -0
  397. package/dist/tools/utils/formatting-utils.d.cts +15 -0
  398. package/dist/tools/utils/formatting-utils.d.cts.map +1 -0
  399. package/dist/tools/utils/formatting-utils.d.ts +15 -0
  400. package/dist/tools/utils/formatting-utils.d.ts.map +1 -0
  401. package/dist/tools/utils/formatting-utils.js +3 -0
  402. package/dist/tools/utils/issue-utils.cjs +6 -0
  403. package/dist/tools/utils/issue-utils.d.cts +7 -0
  404. package/dist/tools/utils/issue-utils.d.ts +7 -0
  405. package/dist/tools/utils/issue-utils.js +5 -0
  406. package/dist/tools/utils/seer-utils.cjs +9 -0
  407. package/dist/tools/utils/seer-utils.d.cts +28 -0
  408. package/dist/tools/utils/seer-utils.d.cts.map +1 -0
  409. package/dist/tools/utils/seer-utils.d.ts +28 -0
  410. package/dist/tools/utils/seer-utils.d.ts.map +1 -0
  411. package/dist/tools/utils/seer-utils.js +3 -0
  412. package/dist/tools/whoami.cjs +10 -0
  413. package/dist/tools/whoami.d.cts +9 -0
  414. package/dist/tools/whoami.d.cts.map +1 -0
  415. package/dist/tools/whoami.d.ts +9 -0
  416. package/dist/tools/whoami.d.ts.map +1 -0
  417. package/dist/tools/whoami.js +10 -0
  418. package/dist/tools-BiZ7ZDKf.cjs +53 -0
  419. package/dist/tools-BiZ7ZDKf.cjs.map +1 -0
  420. package/dist/tools-DGF9GhbP.js +48 -0
  421. package/dist/tools-DGF9GhbP.js.map +1 -0
  422. package/dist/transports/stdio.cjs +42 -14
  423. package/dist/transports/stdio.d.cts +25 -4
  424. package/dist/transports/stdio.d.cts.map +1 -1
  425. package/dist/transports/stdio.d.ts +25 -4
  426. package/dist/transports/stdio.d.ts.map +1 -1
  427. package/dist/transports/stdio.js +44 -16
  428. package/dist/types-B2qOfefC.d.ts +29 -0
  429. package/dist/types-B2qOfefC.d.ts.map +1 -0
  430. package/dist/{types-DuUmV9zh.d.ts → types-Br0saqtE.d.ts} +7 -3
  431. package/dist/types-Br0saqtE.d.ts.map +1 -0
  432. package/dist/{types-CcffrLXB.d.cts → types-C3pRFQyA.d.cts} +7 -3
  433. package/dist/types-C3pRFQyA.d.cts.map +1 -0
  434. package/dist/types-CCHsZshF.js +0 -0
  435. package/dist/types-CYjev2Ep.d.cts +29 -0
  436. package/dist/types-CYjev2Ep.d.cts.map +1 -0
  437. package/dist/types-CZaMk5Yg.d.cts +29 -0
  438. package/dist/types-CZaMk5Yg.d.cts.map +1 -0
  439. package/dist/types-D5KkaSjc.d.ts +29 -0
  440. package/dist/types-D5KkaSjc.d.ts.map +1 -0
  441. package/dist/types.d.cts +3 -4
  442. package/dist/types.d.ts +3 -4
  443. package/dist/update-issue-Bz-u_Yaa.cjs +115 -0
  444. package/dist/update-issue-Bz-u_Yaa.cjs.map +1 -0
  445. package/dist/update-issue-DN80uuKU.js +109 -0
  446. package/dist/update-issue-DN80uuKU.js.map +1 -0
  447. package/dist/update-project-5j-SOHWU.js +120 -0
  448. package/dist/update-project-5j-SOHWU.js.map +1 -0
  449. package/dist/update-project-C7Xbmhqg.cjs +126 -0
  450. package/dist/update-project-C7Xbmhqg.cjs.map +1 -0
  451. package/dist/version-DvMKCu-i.js +6 -0
  452. package/dist/version-DvMKCu-i.js.map +1 -0
  453. package/dist/{version-CRzAHHGZ.cjs → version-Dyz6_b54.cjs} +2 -2
  454. package/dist/version-Dyz6_b54.cjs.map +1 -0
  455. package/dist/version.cjs +1 -1
  456. package/dist/version.js +1 -1
  457. package/dist/whoami-qIbcECMA.cjs +28 -0
  458. package/dist/whoami-qIbcECMA.cjs.map +1 -0
  459. package/dist/whoami-raA70UBD.js +23 -0
  460. package/dist/whoami-raA70UBD.js.map +1 -0
  461. package/package.json +24 -14
  462. package/dist/api-client/client.test.cjs +0 -33
  463. package/dist/api-client/client.test.cjs.map +0 -1
  464. package/dist/api-client/client.test.d.ts +0 -1
  465. package/dist/api-client/client.test.js +0 -33
  466. package/dist/api-client/client.test.js.map +0 -1
  467. package/dist/chunk-BLXvPPr8.js +0 -30
  468. package/dist/client-Bxf4MxOz.d.cts +0 -179
  469. package/dist/client-Bxf4MxOz.d.cts.map +0 -1
  470. package/dist/client-D5xFZtxK.js +0 -224
  471. package/dist/client-D5xFZtxK.js.map +0 -1
  472. package/dist/client-DOhBiaMJ.d.ts +0 -179
  473. package/dist/client-DOhBiaMJ.d.ts.map +0 -1
  474. package/dist/client-GKHZSXgV.cjs +0 -235
  475. package/dist/client-GKHZSXgV.cjs.map +0 -1
  476. package/dist/dist-BlIWGSIM.cjs +0 -8197
  477. package/dist/dist-BlIWGSIM.cjs.map +0 -1
  478. package/dist/dist-DDpQABxe.js +0 -8054
  479. package/dist/dist-DDpQABxe.js.map +0 -1
  480. package/dist/errors.test.cjs +0 -24
  481. package/dist/errors.test.cjs.map +0 -1
  482. package/dist/errors.test.d.cts +0 -1
  483. package/dist/errors.test.d.ts +0 -1
  484. package/dist/errors.test.js +0 -24
  485. package/dist/errors.test.js.map +0 -1
  486. package/dist/formatting-BaARL2gT.js +0 -68
  487. package/dist/formatting-BaARL2gT.js.map +0 -1
  488. package/dist/formatting-C2kN0ok6.cjs +0 -86
  489. package/dist/formatting-C2kN0ok6.cjs.map +0 -1
  490. package/dist/index-h64gcVNJ.d.ts +0 -1
  491. package/dist/internal/formatting.d.cts.map +0 -1
  492. package/dist/internal/formatting.d.ts.map +0 -1
  493. package/dist/internal/issue-helpers.d.cts.map +0 -1
  494. package/dist/internal/issue-helpers.d.ts.map +0 -1
  495. package/dist/internal/issue-helpers.test.cjs +0 -110
  496. package/dist/internal/issue-helpers.test.cjs.map +0 -1
  497. package/dist/internal/issue-helpers.test.d.cts +0 -1
  498. package/dist/internal/issue-helpers.test.d.ts +0 -1
  499. package/dist/internal/issue-helpers.test.js +0 -110
  500. package/dist/internal/issue-helpers.test.js.map +0 -1
  501. package/dist/issue-helpers-71XgJVXC.cjs.map +0 -1
  502. package/dist/issue-helpers-CSNNO03f.js.map +0 -1
  503. package/dist/logging-ByvSjT6V.cjs.map +0 -1
  504. package/dist/logging-CXLD0FFB.js.map +0 -1
  505. package/dist/magic-string.es-CybcVAw7.cjs +0 -1016
  506. package/dist/magic-string.es-CybcVAw7.cjs.map +0 -1
  507. package/dist/magic-string.es-DY8GVHw9.js +0 -1015
  508. package/dist/magic-string.es-DY8GVHw9.js.map +0 -1
  509. package/dist/promptDefinitions-D3ll3qCd.cjs.map +0 -1
  510. package/dist/promptDefinitions-DMucOchd.d.cts.map +0 -1
  511. package/dist/promptDefinitions-H0q1_X-K.d.ts.map +0 -1
  512. package/dist/promptDefinitions-aKmUZWWO.js.map +0 -1
  513. package/dist/prompts-CzD0yl7Z.js.map +0 -1
  514. package/dist/prompts-DMwoay8l.cjs.map +0 -1
  515. package/dist/resources-D6TW2ER0.cjs +0 -32
  516. package/dist/resources-D6TW2ER0.cjs.map +0 -1
  517. package/dist/resources-x-GaokG8.js +0 -26
  518. package/dist/resources-x-GaokG8.js.map +0 -1
  519. package/dist/schema-B8lT632E.cjs.map +0 -1
  520. package/dist/schema-BkHf97d7.js +0 -17
  521. package/dist/schema-BkHf97d7.js.map +0 -1
  522. package/dist/schema-C-MLkWMc.d.ts.map +0 -1
  523. package/dist/schema-CewAKS9A.js.map +0 -1
  524. package/dist/schema-DkyWSqp_.cjs.map +0 -1
  525. package/dist/schema-DqxkW9Tx.d.cts.map +0 -1
  526. package/dist/server-pGtEIwE3.cjs +0 -148
  527. package/dist/server-pGtEIwE3.cjs.map +0 -1
  528. package/dist/server-qpWdf-ST.js +0 -142
  529. package/dist/server-qpWdf-ST.js.map +0 -1
  530. package/dist/stdio-D8u2W847.js +0 -19
  531. package/dist/stdio-D8u2W847.js.map +0 -1
  532. package/dist/stdio-DydB2Pxu.cjs +0 -25
  533. package/dist/stdio-DydB2Pxu.cjs.map +0 -1
  534. package/dist/toolDefinitions-BSC2D_S-.js +0 -430
  535. package/dist/toolDefinitions-BSC2D_S-.js.map +0 -1
  536. package/dist/toolDefinitions-BtHN8t_d.cjs +0 -436
  537. package/dist/toolDefinitions-BtHN8t_d.cjs.map +0 -1
  538. package/dist/toolDefinitions-Dp13BpEu.d.cts +0 -296
  539. package/dist/toolDefinitions-Dp13BpEu.d.cts.map +0 -1
  540. package/dist/toolDefinitions-fQrpWznJ.d.ts +0 -296
  541. package/dist/toolDefinitions-fQrpWznJ.d.ts.map +0 -1
  542. package/dist/toolDefinitions.cjs +0 -4
  543. package/dist/toolDefinitions.d.cts +0 -2
  544. package/dist/toolDefinitions.test.cjs +0 -15
  545. package/dist/toolDefinitions.test.cjs.map +0 -1
  546. package/dist/toolDefinitions.test.d.cts +0 -1
  547. package/dist/toolDefinitions.test.d.ts +0 -1
  548. package/dist/toolDefinitions.test.js +0 -15
  549. package/dist/toolDefinitions.test.js.map +0 -1
  550. package/dist/tools-4Rtn4WEf.js +0 -470
  551. package/dist/tools-4Rtn4WEf.js.map +0 -1
  552. package/dist/tools-DHHqAqP9.cjs +0 -476
  553. package/dist/tools-DHHqAqP9.cjs.map +0 -1
  554. package/dist/tools.cjs +0 -11
  555. package/dist/tools.d.cts +0 -251
  556. package/dist/tools.d.cts.map +0 -1
  557. package/dist/tools.d.ts +0 -251
  558. package/dist/tools.d.ts.map +0 -1
  559. package/dist/tools.js +0 -11
  560. package/dist/tools.test.cjs +0 -1018
  561. package/dist/tools.test.cjs.map +0 -1
  562. package/dist/tools.test.d.cts +0 -1
  563. package/dist/tools.test.d.ts +0 -1
  564. package/dist/tools.test.js +0 -1018
  565. package/dist/tools.test.js.map +0 -1
  566. package/dist/types-CbLyQvVe.d.cts +0 -38
  567. package/dist/types-CbLyQvVe.d.cts.map +0 -1
  568. package/dist/types-CcffrLXB.d.cts.map +0 -1
  569. package/dist/types-CfJ51LyL.d.ts +0 -38
  570. package/dist/types-CfJ51LyL.d.ts.map +0 -1
  571. package/dist/types-DuUmV9zh.d.ts.map +0 -1
  572. package/dist/version-BT9r_3jm.js +0 -6
  573. package/dist/version-BT9r_3jm.js.map +0 -1
  574. package/dist/version-CRzAHHGZ.cjs.map +0 -1
  575. package/dist/vi.bdSIJ99Y-BfJr7I2s.js +0 -6349
  576. package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +0 -1
  577. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs +0 -6355
  578. package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +0 -1
  579. /package/dist/{api-client-CNv_hbPO.js → api-client-ChL_0F2u.js} +0 -0
  580. /package/dist/{types-6zHoEWAx.js → fetch-utils-C0F4eH6S.cjs} +0 -0
  581. /package/dist/{api-client/client.test.d.cts → index-BrojxuhJ.d.ts} +0 -0
@@ -1,24 +0,0 @@
1
- const require_dist = require('./dist-BlIWGSIM.cjs');
2
- const require_vi_bdSIJ99Y = require('./vi.bdSIJ99Y-Dft_B_Ta.cjs');
3
- const require_errors = require('./errors-B9fwS-aP.cjs');
4
-
5
- //#region src/errors.test.ts
6
- require_dist.describe("UserInputError", () => {
7
- require_dist.it("should create a UserInputError with the correct message and name", () => {
8
- const message = "Invalid input provided";
9
- const error = new require_errors.UserInputError(message);
10
- require_vi_bdSIJ99Y.globalExpect(error.message).toBe(message);
11
- require_vi_bdSIJ99Y.globalExpect(error.name).toBe("UserInputError");
12
- require_vi_bdSIJ99Y.globalExpect(error instanceof Error).toBe(true);
13
- require_vi_bdSIJ99Y.globalExpect(error instanceof require_errors.UserInputError).toBe(true);
14
- });
15
- require_dist.it("should be distinguishable from regular Error", () => {
16
- const userInputError = new require_errors.UserInputError("User input error");
17
- const regularError = new Error("Regular error");
18
- require_vi_bdSIJ99Y.globalExpect(userInputError instanceof require_errors.UserInputError).toBe(true);
19
- require_vi_bdSIJ99Y.globalExpect(regularError instanceof require_errors.UserInputError).toBe(false);
20
- });
21
- });
22
-
23
- //#endregion
24
- //# sourceMappingURL=errors.test.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.test.cjs","names":["UserInputError"],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAIA,8BAAe;AAEjC,mCAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,mCAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,mCAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,mCAAO,iBAAiBA,8BAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,iBAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAIA,8BAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,mCAAO,0BAA0BA,8BAAe,CAAC,KAAK,KAAK;AAC3D,mCAAO,wBAAwBA,8BAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,24 +0,0 @@
1
- import { describe, it } from "./dist-DDpQABxe.js";
2
- import { globalExpect } from "./vi.bdSIJ99Y-BfJr7I2s.js";
3
- import { UserInputError } from "./errors-BJSrT6Ou.js";
4
-
5
- //#region src/errors.test.ts
6
- describe("UserInputError", () => {
7
- it("should create a UserInputError with the correct message and name", () => {
8
- const message = "Invalid input provided";
9
- const error = new UserInputError(message);
10
- globalExpect(error.message).toBe(message);
11
- globalExpect(error.name).toBe("UserInputError");
12
- globalExpect(error instanceof Error).toBe(true);
13
- globalExpect(error instanceof UserInputError).toBe(true);
14
- });
15
- it("should be distinguishable from regular Error", () => {
16
- const userInputError = new UserInputError("User input error");
17
- const regularError = new Error("Regular error");
18
- globalExpect(userInputError instanceof UserInputError).toBe(true);
19
- globalExpect(regularError instanceof UserInputError).toBe(false);
20
- });
21
- });
22
-
23
- //#endregion
24
- //# sourceMappingURL=errors.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.test.js","names":[],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAI,eAAe;AAEjC,eAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,eAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,eAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,eAAO,iBAAiB,eAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,IAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAI,eAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,eAAO,0BAA0B,eAAe,CAAC,KAAK,KAAK;AAC3D,eAAO,wBAAwB,eAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
@@ -1,68 +0,0 @@
1
- //#region src/internal/formatting.ts
2
- function formatFrameHeader(frame, platform) {
3
- if (platform?.startsWith("javascript")) return `${[
4
- frame.filename,
5
- frame.lineNo,
6
- frame.colNo
7
- ].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
8
- return `${frame.function ? `"${frame.function}"` : "unknown function"} in "${frame.filename || frame.module}"${frame.lineNo ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : ""}` : ""}`;
9
- }
10
- function formatEventOutput(event) {
11
- let output = "";
12
- for (const entry of event.entries) {
13
- if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
14
- if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
15
- }
16
- output += formatContexts(event.contexts);
17
- return output;
18
- }
19
- function formatExceptionInterfaceOutput(event, data) {
20
- let output = "";
21
- const firstError = data.value ?? data.values[0];
22
- if (!firstError) return "";
23
- output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
24
- if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
25
- output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
26
- const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
27
- return `${formatFrameHeader(frame, event.platform)}${context}`;
28
- }).join("\n")}\n\`\`\`\n\n`;
29
- return output;
30
- }
31
- function formatRequestInterfaceOutput(event, data) {
32
- if (!data.method || !data.url) return "";
33
- return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
34
- }
35
- function formatContexts(contexts) {
36
- if (!contexts) return "";
37
- return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
38
- return `${key}: ${JSON.stringify(value, void 0, 2)}`;
39
- }).join("\n")}`).join("\n\n")}\n\n`;
40
- }
41
- function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
42
- let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
43
- output += `**Description**: ${issue.title}\n`;
44
- output += `**Culprit**: ${issue.culprit}\n`;
45
- output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
46
- output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
47
- output += `**Occurrences**: ${issue.count}\n`;
48
- output += `**Users Impacted**: ${issue.userCount}\n`;
49
- output += `**Status**: ${issue.status}\n`;
50
- output += `**Platform**: ${issue.platform}\n`;
51
- output += `**Project**: ${issue.project.name}\n`;
52
- output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
53
- output += "\n";
54
- output += "## Event Details\n\n";
55
- output += `**Event ID**: ${event.id}\n`;
56
- if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
57
- if (event.message) output += `**Message**:\n${event.message}\n`;
58
- output += "\n";
59
- output += formatEventOutput(event);
60
- output += "# Using this information\n\n";
61
- output += `- You can reference the IssueID in commit messages (e.g. \`Fixes ${issue.shortId}\`) to automatically close the issue when the commit is merged.\n`;
62
- output += "- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n";
63
- return output;
64
- }
65
-
66
- //#endregion
67
- export { formatEventOutput, formatFrameHeader, formatIssueOutput };
68
- //# sourceMappingURL=formatting-BaARL2gT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting-BaARL2gT.js","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":"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"}
@@ -1,86 +0,0 @@
1
-
2
- //#region src/internal/formatting.ts
3
- function formatFrameHeader(frame, platform) {
4
- if (platform?.startsWith("javascript")) return `${[
5
- frame.filename,
6
- frame.lineNo,
7
- frame.colNo
8
- ].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
9
- return `${frame.function ? `"${frame.function}"` : "unknown function"} in "${frame.filename || frame.module}"${frame.lineNo ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : ""}` : ""}`;
10
- }
11
- function formatEventOutput(event) {
12
- let output = "";
13
- for (const entry of event.entries) {
14
- if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
15
- if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
16
- }
17
- output += formatContexts(event.contexts);
18
- return output;
19
- }
20
- function formatExceptionInterfaceOutput(event, data) {
21
- let output = "";
22
- const firstError = data.value ?? data.values[0];
23
- if (!firstError) return "";
24
- output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
25
- if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
26
- output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
27
- const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
28
- return `${formatFrameHeader(frame, event.platform)}${context}`;
29
- }).join("\n")}\n\`\`\`\n\n`;
30
- return output;
31
- }
32
- function formatRequestInterfaceOutput(event, data) {
33
- if (!data.method || !data.url) return "";
34
- return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
35
- }
36
- function formatContexts(contexts) {
37
- if (!contexts) return "";
38
- return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
39
- return `${key}: ${JSON.stringify(value, void 0, 2)}`;
40
- }).join("\n")}`).join("\n\n")}\n\n`;
41
- }
42
- function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
43
- let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
44
- output += `**Description**: ${issue.title}\n`;
45
- output += `**Culprit**: ${issue.culprit}\n`;
46
- output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
47
- output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
48
- output += `**Occurrences**: ${issue.count}\n`;
49
- output += `**Users Impacted**: ${issue.userCount}\n`;
50
- output += `**Status**: ${issue.status}\n`;
51
- output += `**Platform**: ${issue.platform}\n`;
52
- output += `**Project**: ${issue.project.name}\n`;
53
- output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
54
- output += "\n";
55
- output += "## Event Details\n\n";
56
- output += `**Event ID**: ${event.id}\n`;
57
- if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
58
- if (event.message) output += `**Message**:\n${event.message}\n`;
59
- output += "\n";
60
- output += formatEventOutput(event);
61
- output += "# Using this information\n\n";
62
- output += `- You can reference the IssueID in commit messages (e.g. \`Fixes ${issue.shortId}\`) to automatically close the issue when the commit is merged.\n`;
63
- output += "- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n";
64
- return output;
65
- }
66
-
67
- //#endregion
68
- Object.defineProperty(exports, 'formatEventOutput', {
69
- enumerable: true,
70
- get: function () {
71
- return formatEventOutput;
72
- }
73
- });
74
- Object.defineProperty(exports, 'formatFrameHeader', {
75
- enumerable: true,
76
- get: function () {
77
- return formatFrameHeader;
78
- }
79
- });
80
- Object.defineProperty(exports, 'formatIssueOutput', {
81
- enumerable: true,
82
- get: function () {
83
- return formatIssueOutput;
84
- }
85
- });
86
- //# sourceMappingURL=formatting-C2kN0ok6.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting-C2kN0ok6.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":"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"}
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;iBAWgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgFzB,iBAAA;;;;;;;EAhGA,KAAA,EAuGP,KAvGO;EAAiB,KAAA,EAwGxB,KAxGwB;EAAA,UACT,EAwGV,gBAxGU;CAAc,CAAA,EAAA,MAA3B;AAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;iBAWgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgFzB,iBAAA;;;;;;;EAhGA,KAAA,EAuGP,KAvGO;EAAiB,KAAA,EAwGxB,KAxGwB;EAAA,UACT,EAwGV,gBAxGU;CAAc,CAAA,EAAA,MAA3B;AAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAOA;AAmEA;AAyBA;;;;AAGE,iBA/Fc,cAAA,CA+Fd,GAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;;;;;;;;;;;iBA5BF,YAAA;;;;;;;;iBAyBA,gBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAOA;AAmEA;AAyBA;;;;AAGE,iBA/Fc,cAAA,CA+Fd,GAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;;;;;;;;;;;iBA5BF,YAAA;;;;;;;;iBAyBA,gBAAA"}
@@ -1,110 +0,0 @@
1
- const require_dist = require('../dist-BlIWGSIM.cjs');
2
- const require_vi_bdSIJ99Y = require('../vi.bdSIJ99Y-Dft_B_Ta.cjs');
3
- const require_issue_helpers = require('../issue-helpers-71XgJVXC.cjs');
4
-
5
- //#region src/internal/issue-helpers.test.ts
6
- require_dist.describe("extractIssueId", () => {
7
- require_dist.it("should extract issue ID from a full Sentry URL", () => {
8
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
9
- {
10
- "issueId": "1234",
11
- "organizationSlug": "sentry",
12
- }
13
- `);
14
- });
15
- require_dist.it("should extract issue ID from a Sentry URL with organization in path", () => {
16
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
17
- {
18
- "issueId": "123",
19
- "organizationSlug": "sentry",
20
- }
21
- `);
22
- });
23
- require_dist.it("should extract issue ID and org slug from URL with organizations path", () => {
24
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
25
- {
26
- "issueId": "123",
27
- "organizationSlug": "my-org",
28
- }
29
- `);
30
- });
31
- require_dist.it("should extract issue ID and org slug from subdomain URL", () => {
32
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
33
- issueId: "123",
34
- organizationSlug: "my-team"
35
- });
36
- });
37
- require_dist.it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
38
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
39
- {
40
- "issueId": "123",
41
- "organizationSlug": "sentry",
42
- }
43
- `);
44
- });
45
- require_dist.it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
46
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
47
- {
48
- "issueId": "123",
49
- "organizationSlug": "my-team",
50
- }
51
- `);
52
- });
53
- require_dist.it("should throw error for empty input", () => {
54
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
55
- });
56
- require_dist.it("should throw error for invalid URL path", () => {
57
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
58
- });
59
- require_dist.it("should throw error for non-numeric issue ID in URL", () => {
60
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
61
- {
62
- "issueId": "abc",
63
- "organizationSlug": "sentry",
64
- }
65
- `);
66
- });
67
- require_dist.it("should throw error for non-numeric standalone ID", () => {
68
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
69
- });
70
- });
71
- require_dist.describe("parseIssueId", () => {
72
- require_dist.it("should remove trailing punctuation from issue ID", () => {
73
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
74
- });
75
- require_dist.it("should not modify a clean issue ID", () => {
76
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
77
- });
78
- require_dist.it("should remove special characters except dash and underscore", () => {
79
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
80
- });
81
- });
82
- require_dist.describe("parseIssueParams", () => {
83
- require_dist.it("should parse from issueUrl", () => {
84
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
85
- organizationSlug: "sentry",
86
- issueId: "123"
87
- });
88
- });
89
- require_dist.it("should parse from issueId and organizationSlug", () => {
90
- require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({
91
- issueId: "CLOUDFLARE-MCP-41.!",
92
- organizationSlug: "sentry-mcp-evals"
93
- })).toEqual({
94
- organizationSlug: "sentry-mcp-evals",
95
- issueId: "CLOUDFLARE-MCP-41"
96
- });
97
- });
98
- require_dist.it("should throw if neither issueId nor issueUrl is provided", () => {
99
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
100
- });
101
- require_dist.it("should throw if organizationSlug is missing and no issueUrl", () => {
102
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
103
- });
104
- require_dist.it("should throw if issueUrl is invalid", () => {
105
- require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
106
- });
107
- });
108
-
109
- //#endregion
110
- //# sourceMappingURL=issue-helpers.test.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D,mCAEE,mCAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,110 +0,0 @@
1
- import { describe, it } from "../dist-DDpQABxe.js";
2
- import { globalExpect } from "../vi.bdSIJ99Y-BfJr7I2s.js";
3
- import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-CSNNO03f.js";
4
-
5
- //#region src/internal/issue-helpers.test.ts
6
- describe("extractIssueId", () => {
7
- it("should extract issue ID from a full Sentry URL", () => {
8
- globalExpect(extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
9
- {
10
- "issueId": "1234",
11
- "organizationSlug": "sentry",
12
- }
13
- `);
14
- });
15
- it("should extract issue ID from a Sentry URL with organization in path", () => {
16
- globalExpect(extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
17
- {
18
- "issueId": "123",
19
- "organizationSlug": "sentry",
20
- }
21
- `);
22
- });
23
- it("should extract issue ID and org slug from URL with organizations path", () => {
24
- globalExpect(extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
25
- {
26
- "issueId": "123",
27
- "organizationSlug": "my-org",
28
- }
29
- `);
30
- });
31
- it("should extract issue ID and org slug from subdomain URL", () => {
32
- globalExpect(extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
33
- issueId: "123",
34
- organizationSlug: "my-team"
35
- });
36
- });
37
- it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
38
- globalExpect(extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
39
- {
40
- "issueId": "123",
41
- "organizationSlug": "sentry",
42
- }
43
- `);
44
- });
45
- it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
46
- globalExpect(extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
47
- {
48
- "issueId": "123",
49
- "organizationSlug": "my-team",
50
- }
51
- `);
52
- });
53
- it("should throw error for empty input", () => {
54
- globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
55
- });
56
- it("should throw error for invalid URL path", () => {
57
- globalExpect(() => extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
58
- });
59
- it("should throw error for non-numeric issue ID in URL", () => {
60
- globalExpect(extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
61
- {
62
- "issueId": "abc",
63
- "organizationSlug": "sentry",
64
- }
65
- `);
66
- });
67
- it("should throw error for non-numeric standalone ID", () => {
68
- globalExpect(() => extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
69
- });
70
- });
71
- describe("parseIssueId", () => {
72
- it("should remove trailing punctuation from issue ID", () => {
73
- globalExpect(parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
74
- });
75
- it("should not modify a clean issue ID", () => {
76
- globalExpect(parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
77
- });
78
- it("should remove special characters except dash and underscore", () => {
79
- globalExpect(parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
80
- });
81
- });
82
- describe("parseIssueParams", () => {
83
- it("should parse from issueUrl", () => {
84
- globalExpect(parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
85
- organizationSlug: "sentry",
86
- issueId: "123"
87
- });
88
- });
89
- it("should parse from issueId and organizationSlug", () => {
90
- globalExpect(parseIssueParams({
91
- issueId: "CLOUDFLARE-MCP-41.!",
92
- organizationSlug: "sentry-mcp-evals"
93
- })).toEqual({
94
- organizationSlug: "sentry-mcp-evals",
95
- issueId: "CLOUDFLARE-MCP-41"
96
- });
97
- });
98
- it("should throw if neither issueId nor issueUrl is provided", () => {
99
- globalExpect(() => parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
100
- });
101
- it("should throw if organizationSlug is missing and no issueUrl", () => {
102
- globalExpect(() => parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
103
- });
104
- it("should throw if issueUrl is invalid", () => {
105
- globalExpect(() => parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
106
- });
107
- });
108
-
109
- //#endregion
110
- //# sourceMappingURL=issue-helpers.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,SAAS,gBAAgB,MAAM;AAC7B,IAAG,oDAAoD,MAAM;AAC3D,eAEE,aAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,aAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,aAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,SAAS,oBAAoB,MAAM;AACjC,IAAG,8BAA8B,MAAM;AACrC,eACE,iBAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,IAAG,kDAAkD,MAAM;AACzD,eACE,iBAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,IAAG,4DAA4D,MAAM;AACnE,eAAO,MACL,iBAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,MACL,iBAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,IAAG,uCAAuC,MAAM;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers-71XgJVXC.cjs","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\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":";;;;;;;;;AAOA,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 +0,0 @@
1
- {"version":3,"file":"issue-helpers-CSNNO03f.js","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\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":";;;;;;;;AAOA,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 +0,0 @@
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":["import { captureException, captureMessage, withScope } from \"@sentry/core\";\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":";;;;AAYA,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"}
@@ -1 +0,0 @@
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":["import { captureException, captureMessage, withScope } from \"@sentry/core\";\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":";;;AAYA,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"}