@backstage/plugin-scaffolder-backend-module-sentry 0.3.8 → 0.4.1-next.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/CHANGELOG.md CHANGED
@@ -1,10 +1,51 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-sentry
2
2
 
3
- ## 0.3.8
3
+ ## 0.4.1-next.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - b0170fa: **BREAKING**: Restrict Sentry API requests to the configured API base URL. Move custom action-level `apiBaseUrl` values to `scaffolder.sentry.apiBaseUrl` before upgrading.
7
+ - Updated dependencies
8
+ - @backstage/config@1.3.10-next.0
9
+ - @backstage/errors@1.3.2-next.0
10
+ - @backstage/plugin-scaffolder-node@0.13.8-next.0
11
+ - @backstage/backend-plugin-api@1.10.2-next.0
12
+
13
+ ## 0.4.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 52b5c79: **BREAKING**: Restrict Sentry API requests to the configured API base URL. Move custom action-level `apiBaseUrl` values to `scaffolder.sentry.apiBaseUrl` before upgrading.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @backstage/config@1.3.9
23
+ - @backstage/plugin-scaffolder-node@0.13.7
24
+ - @backstage/backend-plugin-api@1.10.1
25
+
26
+ ## 0.3.8-next.2
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies
31
+ - @backstage/config@1.3.9-next.0
32
+ - @backstage/plugin-scaffolder-node@0.13.7-next.2
33
+ - @backstage/backend-plugin-api@1.10.1-next.1
34
+
35
+ ## 0.3.8-next.1
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies
40
+ - @backstage/plugin-scaffolder-node@0.13.7-next.1
41
+ - @backstage/backend-plugin-api@1.10.1-next.0
42
+
43
+ ## 0.3.8-next.0
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies
48
+ - @backstage/plugin-scaffolder-node@0.13.7-next.0
8
49
 
9
50
  ## 0.3.7
10
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"createProject.cjs.js","sources":["../../src/actions/createProject.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\nimport { InputError } from '@backstage/errors';\nimport { Config } from '@backstage/config';\nimport { requestSentryApi, resolveSentryApiBaseUrl } from './sentryApi';\n\n/**\n * Creates the `sentry:project:create` Scaffolder action.\n *\n * @remarks\n *\n * See {@link https://backstage.io/docs/features/software-templates/writing-custom-actions}.\n *\n * @param options - Configuration of the Sentry API.\n * @public\n */\nexport function createSentryCreateProjectAction(options: { config: Config }) {\n const { config } = options;\n\n return createTemplateAction({\n id: 'sentry:project:create',\n schema: {\n input: {\n organizationSlug: z =>\n z.string({\n description: 'The slug of the organization the team belongs to',\n }),\n teamSlug: z =>\n z.string({\n description: 'The slug of the team to create a new project for',\n }),\n name: z =>\n z.string({\n description: 'The name for the new project',\n }),\n slug: z =>\n z\n .string({\n description:\n 'Optional slug for the new project. If not provided a slug is generated from the name',\n })\n .optional(),\n platform: z =>\n z\n .string({\n description: 'Optional sentry platform for the new project. ',\n })\n .optional(),\n authToken: z =>\n z\n .string({\n description:\n 'authenticate via bearer auth token. Requires scope: project:write',\n })\n .optional(),\n apiBaseUrl: z =>\n z\n .string({\n description:\n 'Optional compatibility value that must match the configured Sentry API base URL, or the default Sentry API URL if none is configured',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const {\n organizationSlug,\n teamSlug,\n name,\n slug,\n platform,\n authToken,\n apiBaseUrl,\n } = ctx.input;\n\n const body: any = {\n name: name,\n };\n\n if (slug) {\n body.slug = slug;\n }\n\n if (platform) {\n body.platform = platform;\n }\n\n const token = authToken\n ? authToken\n : config.getOptionalString('scaffolder.sentry.token');\n\n if (!token) {\n throw new InputError(`No valid sentry token given`);\n }\n\n const baseUrl = resolveSentryApiBaseUrl({\n config,\n inputApiBaseUrl: apiBaseUrl,\n });\n\n const { result } = await ctx.checkpoint({\n key: `create.project.${organizationSlug}.${teamSlug}`,\n fn: async () => {\n const { body: res, status } = await requestSentryApi<{ id: string }>({\n url: `${baseUrl}/teams/${organizationSlug}/${teamSlug}/projects/`,\n init: {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n },\n expectedStatus: 201,\n });\n\n return {\n code: status,\n result: res,\n };\n },\n });\n\n ctx.output('id', result.id);\n ctx.output('result', result);\n },\n });\n}\n"],"names":["createTemplateAction","InputError","resolveSentryApiBaseUrl","requestSentryApi"],"mappings":";;;;;;AA+BO,SAAS,gCAAgC,OAAA,EAA6B;AAC3E,EAAA,MAAM,EAAE,QAAO,GAAI,OAAA;AAEnB,EAAA,OAAOA,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,uBAAA;AAAA,IACJ,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,gBAAA,EAAkB,CAAA,CAAA,KAChB,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,QAAA,EAAU,CAAA,CAAA,KACR,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,IAAA,EAAM,CAAA,CAAA,KACJ,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,IAAA,EAAM,CAAA,CAAA,KACJ,CAAA,CACG,MAAA,CAAO;AAAA,UACN,WAAA,EACE;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,CAAA;AAAA,QACnD,IAAI,YAAY;AACd,UAAA,MAAM,EAAE,IAAA,EAAM,GAAA,EAAK,MAAA,EAAO,GAAI,MAAMC,0BAAA,CAAiC;AAAA,YACnE,KAAK,CAAA,EAAG,OAAO,CAAA,OAAA,EAAU,gBAAgB,IAAI,QAAQ,CAAA,UAAA,CAAA;AAAA,YACrD,IAAA,EAAM;AAAA,cACJ,MAAA,EAAQ,MAAA;AAAA,cACR,OAAA,EAAS;AAAA,gBACP,aAAA,EAAe,UAAU,KAAK,CAAA,CAAA;AAAA,gBAC9B,cAAA,EAAgB;AAAA,eAClB;AAAA,cACA,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,IAAI;AAAA,aAC3B;AAAA,YACA,cAAA,EAAgB;AAAA,WACjB,CAAA;AAED,UAAA,OAAO;AAAA,YACL,IAAA,EAAM,MAAA;AAAA,YACN,MAAA,EAAQ;AAAA,WACV;AAAA,QACF;AAAA,OACD,CAAA;AAED,MAAA,GAAA,CAAI,MAAA,CAAO,IAAA,EAAM,MAAA,CAAO,EAAE,CAAA;AAC1B,MAAA,GAAA,CAAI,MAAA,CAAO,UAAU,MAAM,CAAA;AAAA,IAC7B;AAAA,GACD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"createProject.cjs.js","sources":["../../src/actions/createProject.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\nimport { InputError } from '@backstage/errors';\nimport { Config } from '@backstage/config';\nimport { requestSentryApi, resolveSentryApiBaseUrl } from './sentryApi';\n\n/**\n * Creates the `sentry:project:create` Scaffolder action.\n *\n * @remarks\n *\n * See {@link https://backstage.io/docs/features/software-templates/writing-custom-actions}.\n *\n * @param options - Configuration of the Sentry API.\n * @public\n */\nexport function createSentryCreateProjectAction(options: { config: Config }) {\n const { config } = options;\n\n return createTemplateAction({\n id: 'sentry:project:create',\n schema: {\n input: {\n organizationSlug: z =>\n z.string({\n description: 'The slug of the organization the team belongs to',\n }),\n teamSlug: z =>\n z.string({\n description: 'The slug of the team to create a new project for',\n }),\n name: z =>\n z.string({\n description: 'The name for the new project',\n }),\n slug: z =>\n z\n .string({\n description:\n 'Optional slug for the new project. If not provided a slug is generated from the name',\n })\n .optional(),\n platform: z =>\n z\n .string({\n description: 'Optional sentry platform for the new project. ',\n })\n .optional(),\n authToken: z =>\n z\n .string({\n description:\n 'authenticate via bearer auth token. Requires scope: project:write',\n })\n .optional(),\n apiBaseUrl: z =>\n z\n .string({\n description:\n 'Optional compatibility value that must match the configured Sentry API base URL, or the default Sentry API URL if none is configured',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const {\n organizationSlug,\n teamSlug,\n name,\n slug,\n platform,\n authToken,\n apiBaseUrl,\n } = ctx.input;\n\n const body: any = {\n name: name,\n };\n\n if (slug) {\n body.slug = slug;\n }\n\n if (platform) {\n body.platform = platform;\n }\n\n const token = authToken\n ? authToken\n : config.getOptionalString('scaffolder.sentry.token');\n\n if (!token) {\n throw new InputError(`No valid sentry token given`);\n }\n\n const baseUrl = resolveSentryApiBaseUrl({\n config,\n inputApiBaseUrl: apiBaseUrl,\n });\n\n const { result } = await ctx.checkpoint({\n key: `create.project.${organizationSlug}.${teamSlug}`,\n fn: async () => {\n const { body: res, status } = await requestSentryApi<{ id: string }>({\n url: `${baseUrl}/teams/${organizationSlug}/${teamSlug}/projects/`,\n init: {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n },\n expectedStatus: 201,\n });\n\n return {\n code: status,\n result: res,\n };\n },\n });\n\n ctx.output('id', result.id);\n ctx.output('result', result);\n },\n });\n}\n"],"names":["createTemplateAction","InputError","resolveSentryApiBaseUrl","requestSentryApi"],"mappings":";;;;;;AA+BO,SAAS,gCAAgC,OAAA,EAA6B;AAC3E,EAAA,MAAM,EAAE,QAAO,GAAI,OAAA;AAEnB,EAAA,OAAOA,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,uBAAA;AAAA,IACJ,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,gBAAA,EAAkB,CAAA,CAAA,KAChB,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,QAAA,EAAU,CAAA,CAAA,KACR,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,IAAA,EAAM,CAAA,CAAA,KACJ,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,IAAA,EAAM,CAAA,CAAA,KACJ,CAAA,CACG,MAAA,CAAO;AAAA,UACN,WAAA,EACE;AAAA,SACH,EACA,QAAA,EAAS;AAAA,QACd,QAAA,EAAU,CAAA,CAAA,KACR,CAAA,CACG,MAAA,CAAO;AAAA,UACN,WAAA,EAAa;AAAA,SACd,EACA,QAAA,EAAS;AAAA,QACd,SAAA,EAAW,CAAA,CAAA,KACT,CAAA,CACG,MAAA,CAAO;AAAA,UACN,WAAA,EACE;AAAA,SACH,EACA,QAAA,EAAS;AAAA,QACd,UAAA,EAAY,CAAA,CAAA,KACV,CAAA,CACG,MAAA,CAAO;AAAA,UACN,WAAA,EACE;AAAA,SACH,EACA,QAAA;AAAS;AAChB,KACF;AAAA,IACA,MAAM,QAAQ,GAAA,EAAK;AACjB,MAAA,MAAM;AAAA,QACJ,gBAAA;AAAA,QACA,QAAA;AAAA,QACA,IAAA;AAAA,QACA,I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A,OAAO;AAAA,YACL,IAAA,EAAM,MAAA;AAAA,YACN,MAAA,EAAQ;AAAA,WACV;AAAA,QACF;AAAA,OACD,CAAA;AAED,MAAA,GAAA,CAAI,MAAA,CAAO,IAAA,EAAM,MAAA,CAAO,EAAE,CAAA;AAC1B,MAAA,GAAA,CAAI,MAAA,CAAO,UAAU,MAAM,CAAA;AAAA,IAC7B;AAAA,GACD,CAAA;AACH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchDSN.cjs.js","sources":["../../src/actions/fetchDSN.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\nimport { InputError } from '@backstage/errors';\nimport { Config } from '@backstage/config';\nimport { requestSentryApi, resolveSentryApiBaseUrl } from './sentryApi';\n\n/**\n * Creates the `sentry:fetch:dsn` Scaffolder action.\n *\n * @remarks\n *\n * See {@link https://backstage.io/docs/features/software-templates/writing-custom-actions}.\n *\n * @param options - Configuration of the Sentry API.\n * @public\n */\nexport function createSentryFetchDSNAction(options: { config: Config }) {\n const { config } = options;\n\n return createTemplateAction({\n id: 'sentry:fetch:dsn',\n supportsDryRun: true,\n schema: {\n input: {\n organizationSlug: z =>\n z.string({\n description: 'The slug of the organization the project belongs to',\n }),\n projectSlug: z =>\n z.string({\n description: 'The slug of the project to fetch the DSN for',\n }),\n authToken: z =>\n z\n .string({\n description:\n 'authenticate via bearer auth token. Requires one of the following scopes: project:admin, project:read, project:write',\n })\n .optional(),\n apiBaseUrl: z =>\n z\n .string({\n description:\n 'Optional compatibility value that must match the configured Sentry API base URL, or the default Sentry API URL if none is configured',\n })\n .optional(),\n },\n output: {\n dsn: z =>\n z\n .string({\n description: 'The public DSN of the Sentry project',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const { organizationSlug, projectSlug, authToken, apiBaseUrl } =\n ctx.input;\n\n const token = authToken\n ? authToken\n : config.getOptionalString('scaffolder.sentry.token');\n\n if (!token) {\n throw new InputError(`No valid sentry token given`);\n }\n\n const baseUrl = resolveSentryApiBaseUrl({\n config,\n inputApiBaseUrl: apiBaseUrl,\n });\n\n const { body: keys } = await requestSentryApi<unknown>({\n url: `${baseUrl}/projects/${organizationSlug}/${projectSlug}/keys/`,\n init: {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n },\n expectedStatus: 200,\n });\n\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new InputError('No keys found for the specified project');\n }\n\n const publicDsn = keys[0]?.dsn?.public;\n if (!publicDsn) {\n throw new InputError('No public DSN found in project keys');\n }\n\n ctx.output('dsn', publicDsn);\n },\n });\n}\n"],"names":["createTemplateAction","InputError","resolveSentryApiBaseUrl","requestSentryApi"],"mappings":";;;;;;AA+BO,SAAS,2BAA2B,OAAA,EAA6B;AACtE,EAAA,MAAM,EAAE,QAAO,GAAI,OAAA;AAEnB,EAAA,OAAOA,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,kBAAA;AAAA,IACJ,cAAA,EAAgB,IAAA;AAAA,IAChB,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,gBAAA,EAAkB,CAAA,CAAA,KAChB,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,WAAA,EAAa,CAAA,CAAA,KACX,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,SAAA,EAAW,CAAA,CAAA,KACT,CAAA,CACG,MAAA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A,MAAM,IAAIF,kBAAW,yCAAyC,CAAA;AAAA,MAChE;AAEA,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,CAAC,CAAA,EAAG,GAAA,EAAK,MAAA;AAChC,MAAA,IAAI,CAAC,SAAA,EAAW;AACd,QAAA,MAAM,IAAIA,kBAAW,qCAAqC,CAAA;AAAA,MAC5D;AAEA,MAAA,GAAA,CAAI,MAAA,CAAO,OAAO,SAAS,CAAA;AAAA,IAC7B;AAAA,GACD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"fetchDSN.cjs.js","sources":["../../src/actions/fetchDSN.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\nimport { InputError } from '@backstage/errors';\nimport { Config } from '@backstage/config';\nimport { requestSentryApi, resolveSentryApiBaseUrl } from './sentryApi';\n\n/**\n * Creates the `sentry:fetch:dsn` Scaffolder action.\n *\n * @remarks\n *\n * See {@link https://backstage.io/docs/features/software-templates/writing-custom-actions}.\n *\n * @param options - Configuration of the Sentry API.\n * @public\n */\nexport function createSentryFetchDSNAction(options: { config: Config }) {\n const { config } = options;\n\n return createTemplateAction({\n id: 'sentry:fetch:dsn',\n supportsDryRun: true,\n schema: {\n input: {\n organizationSlug: z =>\n z.string({\n description: 'The slug of the organization the project belongs to',\n }),\n projectSlug: z =>\n z.string({\n description: 'The slug of the project to fetch the DSN for',\n }),\n authToken: z =>\n z\n .string({\n description:\n 'authenticate via bearer auth token. Requires one of the following scopes: project:admin, project:read, project:write',\n })\n .optional(),\n apiBaseUrl: z =>\n z\n .string({\n description:\n 'Optional compatibility value that must match the configured Sentry API base URL, or the default Sentry API URL if none is configured',\n })\n .optional(),\n },\n output: {\n dsn: z =>\n z\n .string({\n description: 'The public DSN of the Sentry project',\n })\n .optional(),\n },\n },\n async handler(ctx) {\n const { organizationSlug, projectSlug, authToken, apiBaseUrl } =\n ctx.input;\n\n const token = authToken\n ? authToken\n : config.getOptionalString('scaffolder.sentry.token');\n\n if (!token) {\n throw new InputError(`No valid sentry token given`);\n }\n\n const baseUrl = resolveSentryApiBaseUrl({\n config,\n inputApiBaseUrl: apiBaseUrl,\n });\n\n const { body: keys } = await requestSentryApi<unknown>({\n url: `${baseUrl}/projects/${organizationSlug}/${projectSlug}/keys/`,\n init: {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n },\n expectedStatus: 200,\n });\n\n if (!Array.isArray(keys) || keys.length === 0) {\n throw new InputError('No keys found for the specified project');\n }\n\n const publicDsn = keys[0]?.dsn?.public;\n if (!publicDsn) {\n throw new InputError('No public DSN found in project keys');\n }\n\n ctx.output('dsn', publicDsn);\n },\n });\n}\n"],"names":["createTemplateAction","InputError","resolveSentryApiBaseUrl","requestSentryApi"],"mappings":";;;;;;AA+BO,SAAS,2BAA2B,OAAA,EAA6B;AACtE,EAAA,MAAM,EAAE,QAAO,GAAI,OAAA;AAEnB,EAAA,OAAOA,yCAAA,CAAqB;AAAA,IAC1B,EAAA,EAAI,kBAAA;AAAA,IACJ,cAAA,EAAgB,IAAA;AAAA,IAChB,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO;AAAA,QACL,gBAAA,EAAkB,CAAA,CAAA,KAChB,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,WAAA,EAAa,CAAA,CAAA,KACX,CAAA,CAAE,MAAA,CAAO;AAAA,UACP,WAAA,EAAa;AAAA,SACd,CAAA;AAAA,QACH,SAAA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AAA,CAAK,WAAW,CAAA,EAAG;AAC7C,QAAA,MAAM,IAAIF,kBAAW,yCAAyC,CAAA;AAAA,MAChE;AAEA,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,CAAC,CAAA,EAAG,GAAA,EAAK,MAAA;AAChC,MAAA,IAAI,CAAC,SAAA,EAAW;AACd,QAAA,MAAM,IAAIA,kBAAW,qCAAqC,CAAA;AAAA,MAC5D;AAEA,MAAA,GAAA,CAAI,MAAA,CAAO,OAAO,SAAS,CAAA;AAAA,IAC7B;AAAA,GACD,CAAA;AACH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"sentryApi.cjs.js","sources":["../../src/actions/sentryApi.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { InputError } from '@backstage/errors';\n\nconst DEFAULT_SENTRY_API_BASE_URL = 'https://sentry.io/api/0';\n\nfunction normalizeSentryApiBaseUrl(urlString: string, field: string): string {\n let url: URL;\n try {\n url = new URL(urlString);\n } catch {\n throw new InputError(`${field} must be a valid HTTP(S) URL`);\n }\n\n if (\n !['http:', 'https:'].includes(url.protocol) ||\n url.username ||\n url.password ||\n url.search ||\n url.hash\n ) {\n throw new InputError(\n `${field} must be an HTTP(S) URL without credentials, query parameters, or fragments`,\n );\n }\n\n return `${url.origin}${url.pathname.replace(/\\/+$/, '')}`;\n}\n\nexport function resolveSentryApiBaseUrl(options: {\n config: Config;\n inputApiBaseUrl?: string;\n}): string {\n const configuredApiBaseUrl = options.config.getOptionalString(\n 'scaffolder.sentry.apiBaseUrl',\n );\n const effectiveApiBaseUrl = normalizeSentryApiBaseUrl(\n configuredApiBaseUrl ?? DEFAULT_SENTRY_API_BASE_URL,\n configuredApiBaseUrl\n ? 'scaffolder.sentry.apiBaseUrl'\n : 'default Sentry API base URL',\n );\n\n if (options.inputApiBaseUrl !== undefined) {\n const inputApiBaseUrl = normalizeSentryApiBaseUrl(\n options.inputApiBaseUrl,\n 'apiBaseUrl',\n );\n if (inputApiBaseUrl !== effectiveApiBaseUrl) {\n throw new InputError(\n 'apiBaseUrl must match the effective Sentry API base URL',\n );\n }\n }\n\n return effectiveApiBaseUrl;\n}\n\nexport async function requestSentryApi<T>(options: {\n url: string;\n init: RequestInit;\n expectedStatus: number;\n}): Promise<{ body: T; status: number }> {\n let response: Response;\n try {\n response = await fetch(options.url, {\n ...options.init,\n redirect: 'error',\n });\n } catch {\n throw new InputError('Failed to request Sentry API');\n }\n\n if (response.status !== options.expectedStatus) {\n throw new InputError(\n `Sentry API request failed with status ${response.status}`,\n );\n }\n\n if (\n !response.headers\n .get('content-type')\n ?.toLowerCase()\n .includes('application/json')\n ) {\n throw new InputError('Unexpected Sentry response content type');\n }\n\n try {\n return {\n body: (await response.json()) as T,\n status: response.status,\n };\n } catch {\n throw new InputError('Invalid JSON response from Sentry');\n }\n}\n"],"names":["InputError"],"mappings":";;;;AAmBA,MAAM,2BAAA,GAA8B,yBAAA;AAEpC,SAAS,yBAAA,CAA0B,WAAmB,KAAA,EAAuB;AAC3E,EAAA,IAAI,GAAA;AACJ,EAAA,IAAI;AACF,IAAA,GAAA,GAAM,IAAI,IAAI,SAAS,CAAA;AAAA,EACzB,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,iBAAA,CAAW,CAAA,EAAG,KAAK,CAAA,4BAAA,CAA8B,CAAA;AAAA,EAC7D;AAEA,EAAA,IACE,CAAC,CAAC,OAAA,EAAS,QAAQ,CAAA,CAAE,SAAS,GAAA,CAAI,QAAQ,CAAA,IAC1C,GAAA,CAAI,Y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,sCAAA,EAAyC,SAAS,MAAM,CAAA;AAAA,KAC1D;AAAA,EACF;AAEA,EAAA,IACE,CAAC,QAAA,CAAS,OAAA,CACP,GAAA,CAAI,cAAc,GACjB,WAAA,EAAY,CACb,QAAA,CAAS,kBAAkB,CAAA,EAC9B;AACA,IAAA,MAAM,IAAIA,kBAAW,yCAAyC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI;AACF,IAAA,OAAO;AAAA,MACL,IAAA,EAAO,MAAM,QAAA,CAAS,IAAA,EAAK;AAAA,MAC3B,QAAQ,QAAA,CAAS;AAAA,KACnB;AAAA,EACF,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,kBAAW,mCAAmC,CAAA;AAAA,EAC1D;AACF;;;;;"}
1
+ {"version":3,"file":"sentryApi.cjs.js","sources":["../../src/actions/sentryApi.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { InputError } from '@backstage/errors';\n\nconst DEFAULT_SENTRY_API_BASE_URL = 'https://sentry.io/api/0';\n\nfunction normalizeSentryApiBaseUrl(urlString: string, field: string): string {\n let url: URL;\n try {\n url = new URL(urlString);\n } catch {\n throw new InputError(`${field} must be a valid HTTP(S) URL`);\n }\n\n if (\n !['http:', 'https:'].includes(url.protocol) ||\n url.username ||\n url.password ||\n url.search ||\n url.hash\n ) {\n throw new InputError(\n `${field} must be an HTTP(S) URL without credentials, query parameters, or fragments`,\n );\n }\n\n return `${url.origin}${url.pathname.replace(/\\/+$/, '')}`;\n}\n\nexport function resolveSentryApiBaseUrl(options: {\n config: Config;\n inputApiBaseUrl?: string;\n}): string {\n const configuredApiBaseUrl = options.config.getOptionalString(\n 'scaffolder.sentry.apiBaseUrl',\n );\n const effectiveApiBaseUrl = normalizeSentryApiBaseUrl(\n configuredApiBaseUrl ?? DEFAULT_SENTRY_API_BASE_URL,\n configuredApiBaseUrl\n ? 'scaffolder.sentry.apiBaseUrl'\n : 'default Sentry API base URL',\n );\n\n if (options.inputApiBaseUrl !== undefined) {\n const inputApiBaseUrl = normalizeSentryApiBaseUrl(\n options.inputApiBaseUrl,\n 'apiBaseUrl',\n );\n if (inputApiBaseUrl !== effectiveApiBaseUrl) {\n throw new InputError(\n 'apiBaseUrl must match the effective Sentry API base URL',\n );\n }\n }\n\n return effectiveApiBaseUrl;\n}\n\nexport async function requestSentryApi<T>(options: {\n url: string;\n init: RequestInit;\n expectedStatus: number;\n}): Promise<{ body: T; status: number }> {\n let response: Response;\n try {\n response = await fetch(options.url, {\n ...options.init,\n redirect: 'error',\n });\n } catch {\n throw new InputError('Failed to request Sentry API');\n }\n\n if (response.status !== options.expectedStatus) {\n throw new InputError(\n `Sentry API request failed with status ${response.status}`,\n );\n }\n\n if (\n !response.headers\n .get('content-type')\n ?.toLowerCase()\n .includes('application/json')\n ) {\n throw new InputError('Unexpected Sentry response content type');\n }\n\n try {\n return {\n body: (await response.json()) as T,\n status: response.status,\n };\n } catch {\n throw new InputError('Invalid JSON response from Sentry');\n }\n}\n"],"names":["InputError"],"mappings":";;;;AAmBA,MAAM,2BAAA,GAA8B,yBAAA;AAEpC,SAAS,yBAAA,CAA0B,WAAmB,KAAA,EAAuB;AAC3E,EAAA,IAAI,GAAA;AACJ,EAAA,IAAI;AACF,IAAA,GAAA,GAAM,IAAI,IAAI,SAAS,CAAA;AAAA,EACzB,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,iBAAA,CAAW,CAAA,EAAG,KAAK,CAAA,4BAAA,CAA8B,CAAA;AAAA,EAC7D;AAEA,EAAA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,QAAA,CAAS,MAAA,KAAW,OAAA,CAAQ,cAAA,EAAgB;AAC9C,IAAA,MAAM,IAAIA,iBAAA;AAAA,MACR,CAAA,sCAAA,EAAyC,SAAS,MAAM,CAAA;AAAA,KAC1D;AAAA,EACF;AAEA,EAAA,IACE,CAAC,QAAA,CAAS,OAAA,CACP,GAAA,CAAI,cAAc,GACjB,WAAA,EAAY,CACb,QAAA,CAAS,kBAAkB,CAAA,EAC9B;AACA,IAAA,MAAM,IAAIA,kBAAW,yCAAyC,CAAA;AAAA,EAChE;AAEA,EAAA,IAAI;AACF,IAAA,OAAO;AAAA,MACL,IAAA,EAAO,MAAM,QAAA,CAAS,IAAA,EAAK;AAAA,MAC3B,QAAQ,QAAA,CAAS;AAAA,KACnB;AAAA,EACF,CAAA,CAAA,MAAQ;AACN,IAAA,MAAM,IAAIA,kBAAW,mCAAmC,CAAA;AAAA,EAC1D;AACF;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';\nimport { createSentryCreateProjectAction } from './actions/createProject';\nimport { createSentryFetchDSNAction } from './actions/fetchDSN';\n\n/**\n * @public\n * The Sentry Module for the Scaffolder Backend\n */\nexport const sentryModule = createBackendModule({\n pluginId: 'scaffolder',\n moduleId: 'sentry',\n register({ registerInit }) {\n registerInit({\n deps: {\n scaffolder: scaffolderActionsExtensionPoint,\n config: coreServices.rootConfig,\n reade: coreServices.urlReader,\n },\n async init({ scaffolder, config }) {\n scaffolder.addActions(\n createSentryCreateProjectAction({ config }),\n createSentryFetchDSNAction({ config }),\n );\n },\n });\n },\n});\n"],"names":["createBackendModule","scaffolderActionsExtensionPoint","coreServices","createSentryCreateProjectAction","createSentryFetchDSNAction"],"mappings":";;;;;;;AA2BO,MAAM,eAAeA,oCAAA,CAAoB;AAAA,EAC9C,QAAA,EAAU,YAAA;AAAA,EACV,QAAA,EAAU,QAAA;AAAA,EACV,QAAA,CAAS,EAAE,YAAA,EAAa,EAAG;AACzB,IAAA,YAAA,CAAa;AAAA,MACX,IAAA,EAAM;AAAA,QACJ,UAAA,EAAYC,oDAAA;AAAA,QACZ,QAAQC,6BAAA,CAAa,UAAA;AAAA,QACrB,OAAOA,6BAAA,CAAa;AAAA,OACtB;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAY,QAAO,EAAG;AACjC,QAAA,UAAA,CAAW,UAAA;AAAA,UACTC,6CAAA,CAAgC,EAAE,MAAA,EAAQ,CAAA;AAAA,UAC1CC,mCAAA,CAA2B,EAAE,MAAA,EAAQ;AAAA,SACvC;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';\nimport { createSentryCreateProjectAction } from './actions/createProject';\nimport { createSentryFetchDSNAction } from './actions/fetchDSN';\n\n/**\n * @public\n * The Sentry Module for the Scaffolder Backend\n */\nexport const sentryModule = createBackendModule({\n pluginId: 'scaffolder',\n moduleId: 'sentry',\n register({ registerInit }) {\n registerInit({\n deps: {\n scaffolder: scaffolderActionsExtensionPoint,\n config: coreServices.rootConfig,\n reade: coreServices.urlReader,\n },\n async init({ scaffolder, config }) {\n scaffolder.addActions(\n createSentryCreateProjectAction({ config }),\n createSentryFetchDSNAction({ config }),\n );\n },\n });\n },\n});\n"],"names":["createBackendModule","scaffolderActionsExtensionPoint","coreServices","createSentryCreateProjectAction","createSentryFetchDSNAction"],"mappings":";;;;;;;AA2BO,MAAM,eAAeA,oCAAA,CAAoB;AAAA,EAC9C,QAAA,EAAU,YAAA;AAAA,EACV,QAAA,EAAU,QAAA;AAAA,EACV,QAAA,CAAS,EAAE,YAAA,EAAa,EAAG;AACzB,IAAA,YAAA,CAAa;AAAA,MACX,IAAA,EAAM;AAAA,QACJ,UAAA,EAAYC,oDAAA;AAAA,QACZ,QAAQC,6BAAA,CAAa,UAAA;AAAA,QACrB,OAAOA,6BAAA,CAAa;AAAA,OACtB;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,UAAA,EAAY,QAAO,EAAG;AACjC,QAAA,UAAA,CAAW,UAAA;AAAA,UACTC,6CAAA,CAAgC,EAAE,MAAA,EAAQ,CAAA;AAAA,UAC1CC,mCAAA,CAA2B,EAAE,MAAA,EAAQ;AAAA,SACvC;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend-module-sentry",
3
- "version": "0.3.8",
3
+ "version": "0.4.1-next.0",
4
4
  "backstage": {
5
5
  "role": "backend-plugin-module",
6
6
  "pluginId": "scaffolder",
@@ -51,17 +51,17 @@
51
51
  "test": "backstage-cli package test"
52
52
  },
53
53
  "dependencies": {
54
- "@backstage/backend-plugin-api": "^1.10.0",
55
- "@backstage/config": "^1.3.8",
56
- "@backstage/errors": "^1.3.1",
57
- "@backstage/plugin-scaffolder-node": "^0.13.6",
54
+ "@backstage/backend-plugin-api": "1.10.2-next.0",
55
+ "@backstage/config": "1.3.10-next.0",
56
+ "@backstage/errors": "1.3.2-next.0",
57
+ "@backstage/plugin-scaffolder-node": "0.13.8-next.0",
58
58
  "yaml": "^2.3.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@backstage/backend-test-utils": "^1.11.6",
62
- "@backstage/cli": "^0.36.5",
63
- "@backstage/plugin-scaffolder-node-test-utils": "^0.3.14",
64
- "@backstage/types": "^1.2.2",
61
+ "@backstage/backend-test-utils": "1.11.8-next.0",
62
+ "@backstage/cli": "0.36.7-next.0",
63
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.16-next.0",
64
+ "@backstage/types": "1.2.2",
65
65
  "msw": "^2.0.0"
66
66
  },
67
67
  "configSchema": "config.schema.json"