@sentry/mcp-server 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +40 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +35 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/{client-1dRfG57H.d.ts → client-Bxf4MxOz.d.cts} +10 -6
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-CTm4cvI7.js → client-D5xFZtxK.js} +19 -7
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-BsYOQsEI.d.cts → client-DOhBiaMJ.d.ts} +9 -5
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-DQ837FXP.cjs → client-GKHZSXgV.cjs} +19 -8
- package/dist/client-GKHZSXgV.cjs.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-BQRAzO5v.js → formatting-BaARL2gT.js} +11 -3
- package/dist/formatting-BaARL2gT.js.map +1 -0
- package/dist/{formatting-C-0bHtbh.cjs → formatting-C2kN0ok6.cjs} +11 -4
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +4 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +2 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +2 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +23 -27
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +7 -10
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
- package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
- package/dist/issue-helpers-CSNNO03f.js.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +1 -2
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +1 -2
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-D3ll3qCd.cjs} +6 -7
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +1 -0
- package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-DMucOchd.d.cts} +5 -5
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-H0q1_X-K.d.ts} +6 -6
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-aKmUZWWO.js} +5 -5
- package/dist/promptDefinitions-aKmUZWWO.js.map +1 -0
- package/dist/promptDefinitions.cjs +3 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
- package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
- package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
- package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +6 -7
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +6 -7
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
- package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
- package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
- package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +0 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/schema-B8lT632E.cjs +77 -0
- package/dist/schema-B8lT632E.cjs.map +1 -0
- package/dist/schema-BkHf97d7.js +17 -0
- package/dist/schema-BkHf97d7.js.map +1 -0
- package/dist/{schema-CaJV2aIO.d.cts → schema-C-MLkWMc.d.ts} +385 -272
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-nyYqVk4Y.js → schema-CewAKS9A.js} +19 -3
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-KEMqYaQn.cjs → schema-DkyWSqp_.cjs} +31 -4
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-DwPOkoSP.d.ts → schema-DqxkW9Tx.d.cts} +387 -274
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -9
- package/dist/schema.d.cts +4 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +4 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-BWoJZj5B.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-DtNbD1c-.js → server-qpWdf-ST.js} +32 -25
- package/dist/server-qpWdf-ST.js.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +4 -5
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +4 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/{stdio-D4oW-qT6.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-D4oW-qT6.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-BLzMxGqU.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-BLzMxGqU.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +1568 -1320
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1568 -1319
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-BSC2D_S-.js} +95 -79
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-BtHN8t_d.cjs} +96 -81
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-Dp13BpEu.d.cts} +58 -26
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-fQrpWznJ.d.ts} +57 -25
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-B8ufMRZx.js → tools-4Rtn4WEf.js} +58 -57
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BYt-G6p2.cjs → tools-DHHqAqP9.cjs} +59 -59
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +55 -26
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +55 -26
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +154 -62
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +135 -42
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +4 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +4 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-TaJcaAVg.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-Ds7qzCBB.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-DyM4kaGZ.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-CPuN4Qmi.d.cts → types-DuUmV9zh.d.ts} +5 -5
- package/dist/types-DuUmV9zh.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/version-BT9r_3jm.js +6 -0
- package/dist/{version-dTEKpaGt.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-B0O4KvZ9.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-B0O4KvZ9.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-1dRfG57H.d.ts.map +0 -1
- package/dist/client-BsYOQsEI.d.cts.map +0 -1
- package/dist/client-CTm4cvI7.js.map +0 -1
- package/dist/client-DQ837FXP.cjs.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/formatting-BQRAzO5v.js.map +0 -1
- package/dist/formatting-C-0bHtbh.cjs.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
- package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
- package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
- package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
- package/dist/schema-BCkBPgjj.cjs +0 -64
- package/dist/schema-BCkBPgjj.cjs.map +0 -1
- package/dist/schema-CJrk_GUH.js +0 -15
- package/dist/schema-CJrk_GUH.js.map +0 -1
- package/dist/schema-CaJV2aIO.d.cts.map +0 -1
- package/dist/schema-DwPOkoSP.d.ts.map +0 -1
- package/dist/schema-KEMqYaQn.cjs.map +0 -1
- package/dist/schema-nyYqVk4Y.js.map +0 -1
- package/dist/server-BWoJZj5B.cjs.map +0 -1
- package/dist/server-DtNbD1c-.js.map +0 -1
- package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
- package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
- package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
- package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
- package/dist/tools-B8ufMRZx.js.map +0 -1
- package/dist/tools-BYt-G6p2.cjs.map +0 -1
- package/dist/types-CPuN4Qmi.d.cts.map +0 -1
- package/dist/types-Ds7qzCBB.d.ts.map +0 -1
- package/dist/types-DyM4kaGZ.d.ts.map +0 -1
- package/dist/types-TaJcaAVg.d.cts.map +0 -1
- package/dist/version-dTEKpaGt.js +0 -6
- package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
- package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
- /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
- /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
- /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bs263gvI.cjs');
|
|
1
|
+
const require_dist = require('../dist-BlIWGSIM.cjs');
|
|
2
|
+
const require_vi_bdSIJ99Y = require('../vi.bdSIJ99Y-Dft_B_Ta.cjs');
|
|
3
|
+
const require_issue_helpers = require('../issue-helpers-71XgJVXC.cjs');
|
|
5
4
|
|
|
6
5
|
//#region src/internal/issue-helpers.test.ts
|
|
7
6
|
require_dist.describe("extractIssueId", () => {
|
|
8
7
|
require_dist.it("should extract issue ID from a full Sentry URL", () => {
|
|
9
|
-
|
|
8
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/1234")).toMatchInlineSnapshot(`
|
|
10
9
|
{
|
|
11
10
|
"issueId": "1234",
|
|
12
11
|
"organizationSlug": "sentry",
|
|
@@ -14,7 +13,7 @@ require_dist.describe("extractIssueId", () => {
|
|
|
14
13
|
`);
|
|
15
14
|
});
|
|
16
15
|
require_dist.it("should extract issue ID from a Sentry URL with organization in path", () => {
|
|
17
|
-
|
|
16
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/sentry/issues/123")).toMatchInlineSnapshot(`
|
|
18
17
|
{
|
|
19
18
|
"issueId": "123",
|
|
20
19
|
"organizationSlug": "sentry",
|
|
@@ -22,7 +21,7 @@ require_dist.describe("extractIssueId", () => {
|
|
|
22
21
|
`);
|
|
23
22
|
});
|
|
24
23
|
require_dist.it("should extract issue ID and org slug from URL with organizations path", () => {
|
|
25
|
-
|
|
24
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.io/organizations/my-org/issues/123")).toMatchInlineSnapshot(`
|
|
26
25
|
{
|
|
27
26
|
"issueId": "123",
|
|
28
27
|
"organizationSlug": "my-org",
|
|
@@ -30,13 +29,13 @@ require_dist.describe("extractIssueId", () => {
|
|
|
30
29
|
`);
|
|
31
30
|
});
|
|
32
31
|
require_dist.it("should extract issue ID and org slug from subdomain URL", () => {
|
|
33
|
-
|
|
32
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://my-team.sentry.io/issues/123")).toEqual({
|
|
34
33
|
issueId: "123",
|
|
35
34
|
organizationSlug: "my-team"
|
|
36
35
|
});
|
|
37
36
|
});
|
|
38
37
|
require_dist.it("should extract issue ID and org slug from self-hosted Sentry with subdomain", () => {
|
|
39
|
-
|
|
38
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.mycompany.com/issues/123")).toMatchInlineSnapshot(`
|
|
40
39
|
{
|
|
41
40
|
"issueId": "123",
|
|
42
41
|
"organizationSlug": "sentry",
|
|
@@ -44,7 +43,7 @@ require_dist.describe("extractIssueId", () => {
|
|
|
44
43
|
`);
|
|
45
44
|
});
|
|
46
45
|
require_dist.it("should extract issue ID and org slug from self-hosted Sentry with organization path", () => {
|
|
47
|
-
|
|
46
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://mycompany.com/my-team/issues/123")).toMatchInlineSnapshot(`
|
|
48
47
|
{
|
|
49
48
|
"issueId": "123",
|
|
50
49
|
"organizationSlug": "my-team",
|
|
@@ -52,13 +51,13 @@ require_dist.describe("extractIssueId", () => {
|
|
|
52
51
|
`);
|
|
53
52
|
});
|
|
54
53
|
require_dist.it("should throw error for empty input", () => {
|
|
55
|
-
|
|
54
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
|
|
56
55
|
});
|
|
57
56
|
require_dist.it("should throw error for invalid URL path", () => {
|
|
58
|
-
|
|
57
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
|
|
59
58
|
});
|
|
60
59
|
require_dist.it("should throw error for non-numeric issue ID in URL", () => {
|
|
61
|
-
|
|
60
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.extractIssueId("https://sentry.sentry.io/issues/abc")).toMatchInlineSnapshot(`
|
|
62
61
|
{
|
|
63
62
|
"issueId": "abc",
|
|
64
63
|
"organizationSlug": "sentry",
|
|
@@ -66,47 +65,44 @@ require_dist.describe("extractIssueId", () => {
|
|
|
66
65
|
`);
|
|
67
66
|
});
|
|
68
67
|
require_dist.it("should throw error for non-numeric standalone ID", () => {
|
|
69
|
-
|
|
68
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
70
69
|
});
|
|
71
70
|
});
|
|
72
71
|
require_dist.describe("parseIssueId", () => {
|
|
73
72
|
require_dist.it("should remove trailing punctuation from issue ID", () => {
|
|
74
|
-
|
|
75
|
-
// trailing period and exclamation
|
|
76
|
-
require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")
|
|
77
|
-
).toBe("CLOUDFLARE-MCP-41");
|
|
73
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
|
|
78
74
|
});
|
|
79
75
|
require_dist.it("should not modify a clean issue ID", () => {
|
|
80
|
-
|
|
76
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
|
|
81
77
|
});
|
|
82
78
|
require_dist.it("should remove special characters except dash and underscore", () => {
|
|
83
|
-
|
|
79
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
|
|
84
80
|
});
|
|
85
81
|
});
|
|
86
82
|
require_dist.describe("parseIssueParams", () => {
|
|
87
83
|
require_dist.it("should parse from issueUrl", () => {
|
|
88
|
-
|
|
84
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
|
|
89
85
|
organizationSlug: "sentry",
|
|
90
86
|
issueId: "123"
|
|
91
87
|
});
|
|
92
88
|
});
|
|
93
89
|
require_dist.it("should parse from issueId and organizationSlug", () => {
|
|
94
|
-
|
|
90
|
+
require_vi_bdSIJ99Y.globalExpect(require_issue_helpers.parseIssueParams({
|
|
95
91
|
issueId: "CLOUDFLARE-MCP-41.!",
|
|
96
|
-
organizationSlug: "
|
|
92
|
+
organizationSlug: "sentry-mcp-evals"
|
|
97
93
|
})).toEqual({
|
|
98
|
-
organizationSlug: "
|
|
94
|
+
organizationSlug: "sentry-mcp-evals",
|
|
99
95
|
issueId: "CLOUDFLARE-MCP-41"
|
|
100
96
|
});
|
|
101
97
|
});
|
|
102
98
|
require_dist.it("should throw if neither issueId nor issueUrl is provided", () => {
|
|
103
|
-
|
|
99
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
|
|
104
100
|
});
|
|
105
101
|
require_dist.it("should throw if organizationSlug is missing and no issueUrl", () => {
|
|
106
|
-
|
|
102
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
|
|
107
103
|
});
|
|
108
104
|
require_dist.it("should throw if issueUrl is invalid", () => {
|
|
109
|
-
|
|
105
|
+
require_vi_bdSIJ99Y.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
|
|
110
106
|
});
|
|
111
107
|
});
|
|
112
108
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL.
|
|
1
|
+
{"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,oEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D,mCAEE,mCAAa,sBAAsB,CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
4
|
|
|
5
5
|
//#region src/internal/issue-helpers.test.ts
|
|
6
6
|
describe("extractIssueId", () => {
|
|
@@ -51,7 +51,7 @@ describe("extractIssueId", () => {
|
|
|
51
51
|
`);
|
|
52
52
|
});
|
|
53
53
|
it("should throw error for empty input", () => {
|
|
54
|
-
globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL.
|
|
54
|
+
globalExpect(() => extractIssueId("")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. URL must be a non-empty string.]`);
|
|
55
55
|
});
|
|
56
56
|
it("should throw error for invalid URL path", () => {
|
|
57
57
|
globalExpect(() => extractIssueId("https://sentry.sentry.io/projects/123")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`);
|
|
@@ -70,10 +70,7 @@ describe("extractIssueId", () => {
|
|
|
70
70
|
});
|
|
71
71
|
describe("parseIssueId", () => {
|
|
72
72
|
it("should remove trailing punctuation from issue ID", () => {
|
|
73
|
-
globalExpect(
|
|
74
|
-
// trailing period and exclamation
|
|
75
|
-
parseIssueId("CLOUDFLARE-MCP-41.!")
|
|
76
|
-
).toBe("CLOUDFLARE-MCP-41");
|
|
73
|
+
globalExpect(parseIssueId("CLOUDFLARE-MCP-41.!")).toBe("CLOUDFLARE-MCP-41");
|
|
77
74
|
});
|
|
78
75
|
it("should not modify a clean issue ID", () => {
|
|
79
76
|
globalExpect(parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
|
|
@@ -92,9 +89,9 @@ describe("parseIssueParams", () => {
|
|
|
92
89
|
it("should parse from issueId and organizationSlug", () => {
|
|
93
90
|
globalExpect(parseIssueParams({
|
|
94
91
|
issueId: "CLOUDFLARE-MCP-41.!",
|
|
95
|
-
organizationSlug: "
|
|
92
|
+
organizationSlug: "sentry-mcp-evals"
|
|
96
93
|
})).toEqual({
|
|
97
|
-
organizationSlug: "
|
|
94
|
+
organizationSlug: "sentry-mcp-evals",
|
|
98
95
|
issueId: "CLOUDFLARE-MCP-41"
|
|
99
96
|
});
|
|
100
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL.
|
|
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,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
|
|
3
2
|
//#region src/internal/issue-helpers.ts
|
|
4
3
|
/**
|
|
@@ -9,8 +8,14 @@
|
|
|
9
8
|
* @throws Error if the input is invalid
|
|
10
9
|
*/
|
|
11
10
|
function extractIssueId(url) {
|
|
11
|
+
if (!url || typeof url !== "string") throw new Error("Invalid Sentry issue URL. URL must be a non-empty string.");
|
|
12
12
|
if (!url.startsWith("http://") && !url.startsWith("https://")) throw new Error("Invalid Sentry issue URL. Must start with http:// or https://");
|
|
13
|
-
|
|
13
|
+
let parsedUrl;
|
|
14
|
+
try {
|
|
15
|
+
parsedUrl = new URL(url);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);
|
|
18
|
+
}
|
|
14
19
|
const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
|
|
15
20
|
if (pathParts.length < 2 || !pathParts.includes("issues")) throw new Error("Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'");
|
|
16
21
|
const issueId = pathParts[pathParts.indexOf("issues") + 1];
|
|
@@ -86,4 +91,4 @@ Object.defineProperty(exports, 'parseIssueParams', {
|
|
|
86
91
|
return parseIssueParams;
|
|
87
92
|
}
|
|
88
93
|
});
|
|
89
|
-
//# sourceMappingURL=issue-helpers-
|
|
94
|
+
//# sourceMappingURL=issue-helpers-71XgJVXC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -7,8 +7,14 @@
|
|
|
7
7
|
* @throws Error if the input is invalid
|
|
8
8
|
*/
|
|
9
9
|
function extractIssueId(url) {
|
|
10
|
+
if (!url || typeof url !== "string") throw new Error("Invalid Sentry issue URL. URL must be a non-empty string.");
|
|
10
11
|
if (!url.startsWith("http://") && !url.startsWith("https://")) throw new Error("Invalid Sentry issue URL. Must start with http:// or https://");
|
|
11
|
-
|
|
12
|
+
let parsedUrl;
|
|
13
|
+
try {
|
|
14
|
+
parsedUrl = new URL(url);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);
|
|
17
|
+
}
|
|
12
18
|
const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
|
|
13
19
|
if (pathParts.length < 2 || !pathParts.includes("issues")) throw new Error("Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'");
|
|
14
20
|
const issueId = pathParts[pathParts.indexOf("issues") + 1];
|
|
@@ -67,4 +73,4 @@ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
|
|
|
67
73
|
|
|
68
74
|
//#endregion
|
|
69
75
|
export { extractIssueId, parseIssueId, parseIssueParams };
|
|
70
|
-
//# sourceMappingURL=issue-helpers-
|
|
76
|
+
//# sourceMappingURL=issue-helpers-CSNNO03f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const require_chunk = require('./chunk-BtT13l48.cjs');
|
|
1
|
+
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
3
2
|
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
4
3
|
|
|
5
4
|
//#region src/logging.ts
|
|
@@ -29,4 +28,4 @@ Object.defineProperty(exports, 'logError', {
|
|
|
29
28
|
return logError;
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
//# sourceMappingURL=logging-
|
|
31
|
+
//# sourceMappingURL=logging-ByvSjT6V.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging-
|
|
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"}
|
package/dist/logging.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const require_logging = require('./logging-
|
|
1
|
+
const require_logging = require('./logging-ByvSjT6V.cjs');
|
|
2
2
|
|
|
3
|
-
exports.logError = require_logging.logError
|
|
3
|
+
exports.logError = require_logging.logError;
|
package/dist/logging.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
//#region src/logging.d.ts
|
|
2
2
|
declare function logError(error: Error | unknown, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
|
|
3
3
|
declare function logError(message: string, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=logging.d.ts.map
|
|
7
5
|
|
|
6
|
+
//#endregion
|
|
8
7
|
export { logError };
|
|
9
8
|
//# sourceMappingURL=logging.d.cts.map
|
package/dist/logging.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.cts","names":[],"sources":["../src/logging.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"logging.d.cts","names":[],"sources":["../src/logging.ts"],"sourcesContent":[],"mappings":";iBAEgB,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;AAHxB,iBAKA,QAAA,CALQ,OAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAOX,MAPW,CAAA,MAAA,EAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAA,WAAA,CAAA,EAQR,MARQ,CAAA,MAAA,EAAA,MAAA,GAQgB,UARhB,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA"}
|
package/dist/logging.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
//#region src/logging.d.ts
|
|
2
2
|
declare function logError(error: Error | unknown, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
|
|
3
3
|
declare function logError(message: string, contexts?: Record<string, Record<string, any>>, attachments?: Record<string, string | Uint8Array>): string | undefined;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=logging.d.ts.map
|
|
7
5
|
|
|
6
|
+
//#endregion
|
|
8
7
|
export { logError };
|
|
9
8
|
//# sourceMappingURL=logging.d.ts.map
|
package/dist/logging.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.ts","names":[],"sources":["../src/logging.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"logging.d.ts","names":[],"sources":["../src/logging.ts"],"sourcesContent":[],"mappings":";iBAEgB,QAAA,QACP,4BACI,eAAe,oCACZ,wBAAwB;AAHxB,iBAKA,QAAA,CALQ,OAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAOX,MAPW,CAAA,MAAA,EAOI,MAPJ,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,EAAA,WAAA,CAAA,EAQR,MARQ,CAAA,MAAA,EAAA,MAAA,GAQgB,UARhB,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA"}
|
package/dist/logging.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
|
|
3
2
|
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
4
3
|
const comma = ",".charCodeAt(0);
|
|
@@ -1013,5 +1012,5 @@ var MagicString = class MagicString {
|
|
|
1013
1012
|
};
|
|
1014
1013
|
|
|
1015
1014
|
//#endregion
|
|
1016
|
-
exports.default = MagicString
|
|
1017
|
-
//# sourceMappingURL=magic-string.es-
|
|
1015
|
+
exports.default = MagicString;
|
|
1016
|
+
//# sourceMappingURL=magic-string.es-CybcVAw7.cjs.map
|