From 5d10f99e53b4c7a989a76a755b48fc74846fcdfc Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Tue, 18 Feb 2025 19:25:49 +0100 Subject: [PATCH 001/119] feat(auth): enable persistency of scopes for Bitbucket Cloud Signed-off-by: Benjamin Janssens --- .changeset/chatty-days-wonder.md | 5 +++++ .changeset/serious-guests-tan.md | 5 +++++ packages/integration-react/src/api/ScmAuth.ts | 2 ++ .../src/authenticator.ts | 1 + 4 files changed, 13 insertions(+) create mode 100644 .changeset/chatty-days-wonder.md create mode 100644 .changeset/serious-guests-tan.md diff --git a/.changeset/chatty-days-wonder.md b/.changeset/chatty-days-wonder.md new file mode 100644 index 0000000000..5e5114c28e --- /dev/null +++ b/.changeset/chatty-days-wonder.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-bitbucket-provider': patch +--- + +Enabled persistency of scopes for Bitbucket Cloud. diff --git a/.changeset/serious-guests-tan.md b/.changeset/serious-guests-tan.md new file mode 100644 index 0000000000..e140f8bc1d --- /dev/null +++ b/.changeset/serious-guests-tan.md @@ -0,0 +1,5 @@ +--- +'@backstage/integration-react': patch +--- + +Added scopes `project` and `repository:admin` for Bitbucket Cloud. diff --git a/packages/integration-react/src/api/ScmAuth.ts b/packages/integration-react/src/api/ScmAuth.ts index ff3e8c098d..d943a3fac8 100644 --- a/packages/integration-react/src/api/ScmAuth.ts +++ b/packages/integration-react/src/api/ScmAuth.ts @@ -239,11 +239,13 @@ export class ScmAuth implements ScmAuthApi { 'pullrequest', 'snippet', 'issue', + 'project', ]; const repoWriteScopes = options?.scopeMapping?.repoWrite ?? [ 'pullrequest:write', 'snippet:write', 'issue:write', + 'repository:admin', ]; return new ScmAuth('bitbucket', bitbucketAuthApi, host, { default: defaultScopes, diff --git a/plugins/auth-backend-module-bitbucket-provider/src/authenticator.ts b/plugins/auth-backend-module-bitbucket-provider/src/authenticator.ts index a2d8275964..e07d9caf98 100644 --- a/plugins/auth-backend-module-bitbucket-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-bitbucket-provider/src/authenticator.ts @@ -28,6 +28,7 @@ export const bitbucketAuthenticator = createOAuthAuthenticator({ PassportOAuthAuthenticatorHelper.defaultProfileTransform, scopes: { required: ['account'], + persist: true, }, initialize({ callbackUrl, config }) { const clientID = config.getString('clientId'); From 3729d19bbb6fb8dd0fb0c7ced02c3567b7e08894 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Tue, 18 Feb 2025 21:00:00 +0100 Subject: [PATCH 002/119] test(auth): update tests Signed-off-by: Benjamin Janssens --- packages/integration-react/src/api/ScmAuth.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/integration-react/src/api/ScmAuth.test.ts b/packages/integration-react/src/api/ScmAuth.test.ts index d252b95b85..30a92a2056 100644 --- a/packages/integration-react/src/api/ScmAuth.test.ts +++ b/packages/integration-react/src/api/ScmAuth.test.ts @@ -129,7 +129,7 @@ describe('ScmAuth', () => { await expect( bitbucketAuth.getCredentials({ url: 'http://example.com' }), ).resolves.toMatchObject({ - token: 'account team pullrequest snippet issue', + token: 'account team pullrequest snippet issue project', }); await expect( bitbucketAuth.getCredentials({ @@ -138,7 +138,7 @@ describe('ScmAuth', () => { }), ).resolves.toMatchObject({ token: - 'account team pullrequest snippet issue pullrequest:write snippet:write issue:write', + 'account team pullrequest snippet issue project pullrequest:write snippet:write issue:write repository:admin', }); }); @@ -195,7 +195,8 @@ describe('ScmAuth', () => { }, }), ).resolves.toMatchObject({ - token: 'account team pullrequest snippet issue snippet:write issue:write', + token: + 'account team pullrequest snippet issue project snippet:write issue:write', }); }); From 44bb6c4ead897b5af0470cc361cdeb115334df03 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Tue, 18 Feb 2025 21:14:57 +0100 Subject: [PATCH 003/119] test(auth): update tests Signed-off-by: Benjamin Janssens --- .../auth-backend-module-bitbucket-provider/src/module.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/auth-backend-module-bitbucket-provider/src/module.test.ts b/plugins/auth-backend-module-bitbucket-provider/src/module.test.ts index f1426d1b0d..6dddfb1d63 100644 --- a/plugins/auth-backend-module-bitbucket-provider/src/module.test.ts +++ b/plugins/auth-backend-module-bitbucket-provider/src/module.test.ts @@ -73,6 +73,7 @@ describe('authModuleBitbucketProvider', () => { expect(decodeOAuthState(startUrl.searchParams.get('state')!)).toEqual({ env: 'development', nonce: decodeURIComponent(nonceCookie.value), + scope: 'account', }); }); }); From 9454ef940c26d988ee47b8dc8d26ed439e66411d Mon Sep 17 00:00:00 2001 From: Lavanya Sainik Date: Mon, 24 Feb 2025 16:11:35 +0000 Subject: [PATCH 004/119] Added support for filtering based on system column in catalog table Signed-off-by: Lavanya Sainik --- .changeset/chilly-sheep-scream.md | 5 +++++ .../src/components/CatalogTable/columns.tsx | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .changeset/chilly-sheep-scream.md diff --git a/.changeset/chilly-sheep-scream.md b/.changeset/chilly-sheep-scream.md new file mode 100644 index 0000000000..eb568ffd8f --- /dev/null +++ b/.changeset/chilly-sheep-scream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': minor +--- + +Added support of filtering based on system columns in catalog table diff --git a/plugins/catalog/src/components/CatalogTable/columns.tsx b/plugins/catalog/src/components/CatalogTable/columns.tsx index d5362badda..d88cc9a77d 100644 --- a/plugins/catalog/src/components/CatalogTable/columns.tsx +++ b/plugins/catalog/src/components/CatalogTable/columns.tsx @@ -62,6 +62,21 @@ export const columnFactories = Object.freeze({ return { title: 'System', field: 'resolved.partOfSystemRelationTitle', + customFilterAndSearch: (query, row) => { + let systems: JsonArray = []; + if ( + row.entity?.spec?.system && + Array.isArray(row.entity?.spec?.system) + ) { + systems = row.entity?.spec?.system; + } else if (row.entity?.spec?.system) { + systems = [row.entity?.spec?.system]; + } + return systems + .join(', ') + .toLocaleUpperCase('en-US') + .includes(query.toLocaleUpperCase('en-US')); + }, render: ({ resolved }) => ( Date: Thu, 27 Feb 2025 12:42:49 +0100 Subject: [PATCH 005/119] fix format error Signed-off-by: Rye Pasaporte --- .../src/components/FailedEntities.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 65e6eb731e..0e62751566 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -93,17 +93,11 @@ const RenderErrorContext = ({ * easily understand the times. */ const convertTimeToLocalTimezone = (strDateTime: string | Date) => { - const dateTime = DateTime.fromFormat( - strDateTime.toLocaleString(), - 'yyyy-MM-dd hh:mm:ss', - { - zone: 'UTC', - }, - ); + const dateTime = DateTime.fromISO(strDateTime.toString(), { zone: 'UTC' }); const dateTimeLocalTz = dateTime.setZone(DateTime.local().zoneName); - return dateTimeLocalTz.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); + return dateTimeLocalTz.toFormat('M/d/yyyy, h:mm:ss a'); }; export const FailedEntities = () => { From 2479827e3baade25f95196fb5c355071125b73e4 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Thu, 27 Feb 2025 15:59:14 +0100 Subject: [PATCH 006/119] add changeset Signed-off-by: Rye Pasaporte --- .changeset/sweet-maps-invent.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sweet-maps-invent.md diff --git a/.changeset/sweet-maps-invent.md b/.changeset/sweet-maps-invent.md new file mode 100644 index 0000000000..81c36352b8 --- /dev/null +++ b/.changeset/sweet-maps-invent.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-unprocessed-entities': patch +--- + +Fixed the `convertTimeToLocalTimezone` function in the FailedEntities compoent to correctly parse ISO 8601 date strings and format them as `M/d/yyyy, h:mm:ss a`. From e859147fb9f2f1ca300e35f27601e7c15a404ef6 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Thu, 27 Feb 2025 16:15:00 +0100 Subject: [PATCH 007/119] use toLocaleString to use user locale settings Signed-off-by: Rye Pasaporte --- .../src/components/FailedEntities.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 0e62751566..5d615ebf4b 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -93,7 +93,9 @@ const RenderErrorContext = ({ * easily understand the times. */ const convertTimeToLocalTimezone = (strDateTime: string | Date) => { - const dateTime = DateTime.fromISO(strDateTime.toString(), { zone: 'UTC' }); + const dateTime = DateTime.fromISO(strDateTime.toLocaleString(), { + zone: 'UTC', + }); const dateTimeLocalTz = dateTime.setZone(DateTime.local().zoneName); From ed4917b9ad0eec56756e8d0a17e601fc0663e015 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Thu, 27 Feb 2025 16:36:04 +0100 Subject: [PATCH 008/119] typo fix Signed-off-by: Rye Pasaporte --- .changeset/sweet-maps-invent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/sweet-maps-invent.md b/.changeset/sweet-maps-invent.md index 81c36352b8..0c2f0b8035 100644 --- a/.changeset/sweet-maps-invent.md +++ b/.changeset/sweet-maps-invent.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-unprocessed-entities': patch --- -Fixed the `convertTimeToLocalTimezone` function in the FailedEntities compoent to correctly parse ISO 8601 date strings and format them as `M/d/yyyy, h:mm:ss a`. +Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings and format them as `M/d/yyyy, h:mm:ss a`. From 8013013c593ed82c70b7403c3dd8e96d22dce2a3 Mon Sep 17 00:00:00 2001 From: Johannes Will Date: Thu, 27 Feb 2025 13:22:24 +0100 Subject: [PATCH 009/119] feat: Add support for topics and membership in catalog-backend-module-gitlab Signed-off-by: Johannes Will --- .../catalog-backend-module-gitlab/config.d.ts | 12 ++ .../report.api.md | 2 + .../src/lib/client.ts | 2 + .../src/lib/types.ts | 12 ++ .../GitlabDiscoveryEntityProvider.ts | 2 + .../src/providers/config.test.ts | 196 ++++++++++++++++++ .../src/providers/config.ts | 7 + 7 files changed, 233 insertions(+) diff --git a/plugins/catalog-backend-module-gitlab/config.d.ts b/plugins/catalog-backend-module-gitlab/config.d.ts index ce1cda50e7..e41de67208 100644 --- a/plugins/catalog-backend-module-gitlab/config.d.ts +++ b/plugins/catalog-backend-module-gitlab/config.d.ts @@ -72,6 +72,18 @@ export interface Config { * Should be in the format group/subgroup/repo, with no leading or trailing slashes. */ excludeRepos?: string[]; + + /** + * (Optional) If true, limit by repositories that the current user is a member of. + * See: https://docs.gitlab.com/api/projects/#list-projects + */ + membership?: boolean; + + /** + * (Optional) List of topic names. Limit results to repositories that match all of given topics. + * See: https://docs.gitlab.com/api/projects/#list-projects + */ + topics?: string; }; }; }; diff --git a/plugins/catalog-backend-module-gitlab/report.api.md b/plugins/catalog-backend-module-gitlab/report.api.md index e2577553d3..5b7bfadf1d 100644 --- a/plugins/catalog-backend-module-gitlab/report.api.md +++ b/plugins/catalog-backend-module-gitlab/report.api.md @@ -120,6 +120,8 @@ export type GitlabProviderConfig = { includeArchivedRepos?: boolean; excludeRepos?: string[]; includeUsersWithoutSeat?: boolean; + membership?: boolean; + topics?: string; }; // @public diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index f5ed760b21..9053d68554 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -41,6 +41,8 @@ export type CommonListOptions = { interface ListProjectOptions extends CommonListOptions { archived?: boolean; group?: string; + membership?: boolean; + topics?: string; } interface UserListOptions extends CommonListOptions { diff --git a/plugins/catalog-backend-module-gitlab/src/lib/types.ts b/plugins/catalog-backend-module-gitlab/src/lib/types.ts index e25f9bacf4..864eca7dfe 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/types.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/types.ts @@ -248,6 +248,18 @@ export type GitlabProviderConfig = { * Defaults to `false` */ includeUsersWithoutSeat?: boolean; + + /** + * If true, the membership parameter is set to true in the GitLab API request. + * See: https://docs.gitlab.com/api/projects/#list-projects + */ + membership?: boolean; + + /** + * Optional comma seperated list of topics to filter projects by, as specified in the GitLab API documentation: + * https://docs.gitlab.com/api/projects/#list-projects + */ + topics?: string; }; /** diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 66a6247295..8bf749c275 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -214,6 +214,8 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { page: 1, per_page: 50, ...(!this.config.includeArchivedRepos && { archived: false }), + ...(this.config.membership && { membership: true }), + ...(this.config.topics && { topics: this.config.topics }), }, ); diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts index e1798df184..8790a3fe53 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts @@ -65,6 +65,8 @@ describe('config', () => { excludeRepos: [], restrictUsersToGroup: false, includeUsersWithoutSeat: false, + membership: undefined, + topics: undefined, }), ); }); @@ -109,6 +111,8 @@ describe('config', () => { excludeRepos: [], restrictUsersToGroup: false, includeUsersWithoutSeat: true, + membership: undefined, + topics: undefined, }), ); }); @@ -153,6 +157,8 @@ describe('config', () => { skipForkedRepos: true, includeArchivedRepos: false, includeUsersWithoutSeat: false, + membership: undefined, + topics: undefined, }), ); }); @@ -197,6 +203,8 @@ describe('config', () => { skipForkedRepos: false, includeArchivedRepos: true, includeUsersWithoutSeat: false, + membership: undefined, + topics: undefined, }), ); }); @@ -242,6 +250,8 @@ describe('config', () => { includeArchivedRepos: false, excludeRepos: ['foo/bar', 'quz/qux'], includeUsersWithoutSeat: false, + membership: undefined, + topics: undefined, }), ); }); @@ -287,6 +297,8 @@ describe('config', () => { restrictUsersToGroup: false, excludeRepos: [], includeUsersWithoutSeat: false, + membership: undefined, + topics: undefined, schedule: { frequency: { minutes: 30 }, timeout: { @@ -336,4 +348,188 @@ describe('config', () => { expect(result).toHaveLength(1); expect(result[0].group).toEqual(''); }); + + it('valid config with membership', () => { + const config = new ConfigReader({ + catalog: { + providers: { + gitlab: { + test: { + group: 'group', + host: 'host', + branch: 'not-master', + fallbackBranch: 'main', + entityFilename: 'custom-file.yaml', + membership: true, + }, + }, + }, + }, + }); + + const result = readGitlabConfigs(config); + expect(result).toHaveLength(1); + result.forEach(r => + expect(r).toStrictEqual({ + id: 'test', + group: 'group', + branch: 'not-master', + fallbackBranch: 'main', + host: 'host', + catalogFile: 'custom-file.yaml', + projectPattern: /[\s\S]*/, + groupPattern: /[\s\S]*/, + userPattern: /[\s\S]*/, + orgEnabled: false, + allowInherited: false, + relations: [], + schedule: undefined, + restrictUsersToGroup: false, + excludeRepos: [], + skipForkedRepos: false, + includeUsersWithoutSeat: false, + includeArchivedRepos: false, + membership: true, + topics: undefined, + }), + ); + }); + + it('valid config with empyt topics', () => { + const config = new ConfigReader({ + catalog: { + providers: { + gitlab: { + test: { + group: 'group', + host: 'host', + branch: 'not-master', + fallbackBranch: 'main', + entityFilename: 'custom-file.yaml', + topics: [], + }, + }, + }, + }, + }); + + const result = readGitlabConfigs(config); + expect(result).toHaveLength(1); + result.forEach(r => + expect(r).toStrictEqual({ + id: 'test', + group: 'group', + branch: 'not-master', + fallbackBranch: 'main', + host: 'host', + catalogFile: 'custom-file.yaml', + projectPattern: /[\s\S]*/, + groupPattern: /[\s\S]*/, + userPattern: /[\s\S]*/, + orgEnabled: false, + allowInherited: false, + relations: [], + schedule: undefined, + restrictUsersToGroup: false, + excludeRepos: [], + skipForkedRepos: false, + includeUsersWithoutSeat: false, + includeArchivedRepos: false, + membership: undefined, + topics: undefined, + }), + ); + }); + + it('valid config with single topics', () => { + const config = new ConfigReader({ + catalog: { + providers: { + gitlab: { + test: { + group: 'group', + host: 'host', + branch: 'not-master', + fallbackBranch: 'main', + entityFilename: 'custom-file.yaml', + topics: ['topic1'], + }, + }, + }, + }, + }); + + const result = readGitlabConfigs(config); + expect(result).toHaveLength(1); + result.forEach(r => + expect(r).toStrictEqual({ + id: 'test', + group: 'group', + branch: 'not-master', + fallbackBranch: 'main', + host: 'host', + catalogFile: 'custom-file.yaml', + projectPattern: /[\s\S]*/, + groupPattern: /[\s\S]*/, + userPattern: /[\s\S]*/, + orgEnabled: false, + allowInherited: false, + relations: [], + schedule: undefined, + restrictUsersToGroup: false, + excludeRepos: [], + skipForkedRepos: false, + includeUsersWithoutSeat: false, + includeArchivedRepos: false, + membership: undefined, + topics: 'topic1', + }), + ); + }); + + it('valid config with multiple topics', () => { + const config = new ConfigReader({ + catalog: { + providers: { + gitlab: { + test: { + group: 'group', + host: 'host', + branch: 'not-master', + fallbackBranch: 'main', + entityFilename: 'custom-file.yaml', + topics: ['topic1', 'topic2', 'topic3'], + }, + }, + }, + }, + }); + + const result = readGitlabConfigs(config); + expect(result).toHaveLength(1); + result.forEach(r => + expect(r).toStrictEqual({ + id: 'test', + group: 'group', + branch: 'not-master', + fallbackBranch: 'main', + host: 'host', + catalogFile: 'custom-file.yaml', + projectPattern: /[\s\S]*/, + groupPattern: /[\s\S]*/, + userPattern: /[\s\S]*/, + orgEnabled: false, + allowInherited: false, + relations: [], + schedule: undefined, + restrictUsersToGroup: false, + excludeRepos: [], + skipForkedRepos: false, + includeUsersWithoutSeat: false, + includeArchivedRepos: false, + membership: undefined, + topics: 'topic1,topic2,topic3', + }), + ); + }); }); diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.ts index bf59bb0d36..5b50fce5b1 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.ts @@ -66,6 +66,11 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { const includeUsersWithoutSeat = config.getOptionalBoolean('includeUsersWithoutSeat') ?? false; + const membership = config.getOptionalBoolean('membership'); + + const topicsArray = config.getOptionalStringArray('topics'); + const topics = topicsArray?.length ? topicsArray.join(',') : undefined; + return { id, group, @@ -85,6 +90,8 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { excludeRepos, restrictUsersToGroup, includeUsersWithoutSeat, + membership, + topics, }; } From a568cdaa3bcdd984e8d99cfe5786ee0158473bf3 Mon Sep 17 00:00:00 2001 From: Johannes Will Date: Fri, 28 Feb 2025 09:45:33 +0100 Subject: [PATCH 010/119] changeset Signed-off-by: Johannes Will --- .changeset/famous-dragons-bake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/famous-dragons-bake.md diff --git a/.changeset/famous-dragons-bake.md b/.changeset/famous-dragons-bake.md new file mode 100644 index 0000000000..17b156de06 --- /dev/null +++ b/.changeset/famous-dragons-bake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-gitlab': patch +--- + +add filter for repos by membership and topics From 9f74383f9cdf9a2bc40c96af6fe8653ac4793b81 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 28 Feb 2025 11:42:31 +0100 Subject: [PATCH 011/119] revert format to work in europe Signed-off-by: Rye Pasaporte --- .changeset/sweet-maps-invent.md | 2 +- .../src/components/FailedEntities.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/sweet-maps-invent.md b/.changeset/sweet-maps-invent.md index 0c2f0b8035..d0da1e6c48 100644 --- a/.changeset/sweet-maps-invent.md +++ b/.changeset/sweet-maps-invent.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-unprocessed-entities': patch --- -Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings and format them as `M/d/yyyy, h:mm:ss a`. +Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings. diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 5d615ebf4b..5ea16ba02f 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -99,7 +99,7 @@ const convertTimeToLocalTimezone = (strDateTime: string | Date) => { const dateTimeLocalTz = dateTime.setZone(DateTime.local().zoneName); - return dateTimeLocalTz.toFormat('M/d/yyyy, h:mm:ss a'); + return dateTimeLocalTz.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); }; export const FailedEntities = () => { From 97abc96bb89eeae7ee6cf834e475aa027d505132 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 28 Feb 2025 12:52:45 +0100 Subject: [PATCH 012/119] update function to use local timezone and use original format Signed-off-by: Rye Pasaporte --- .changeset/sweet-maps-invent.md | 2 +- .../src/components/FailedEntities.tsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.changeset/sweet-maps-invent.md b/.changeset/sweet-maps-invent.md index d0da1e6c48..390ce57dc7 100644 --- a/.changeset/sweet-maps-invent.md +++ b/.changeset/sweet-maps-invent.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-unprocessed-entities': patch --- -Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings. +Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings and set the timezone to the current local timezone. diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 5ea16ba02f..0e13869528 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -94,12 +94,10 @@ const RenderErrorContext = ({ */ const convertTimeToLocalTimezone = (strDateTime: string | Date) => { const dateTime = DateTime.fromISO(strDateTime.toLocaleString(), { - zone: 'UTC', + zone: DateTime.local().zoneName, }); - const dateTimeLocalTz = dateTime.setZone(DateTime.local().zoneName); - - return dateTimeLocalTz.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); + return dateTime.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); }; export const FailedEntities = () => { From 7b3ed9b928b5997aa5bb0a5e6976ee7a2a85280a Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 27 Aug 2023 18:36:03 -0400 Subject: [PATCH 013/119] Add Bitbucket Server Event Integration Signed-off-by: David Lilienfeld --- .changeset/nine-falcons-repeat.md | 6 + .../integrations/bitbucketServer/discovery.md | 96 +++- .../package.json | 8 + .../report.api.md | 75 ++- .../src/index.ts | 9 +- .../src/lib/BitbucketServerClient.test.ts | 87 ++- .../src/lib/BitbucketServerClient.ts | 44 +- .../src/lib/index.ts | 5 +- .../src/lib/types.ts | 51 +- ...oduleBitbucketServerEntityProvider.test.ts | 32 +- ...alogModuleBitbucketServerEntityProvider.ts | 24 +- .../BitbucketServerEntityProvider.test.ts | 495 +++++++++++++++++- .../BitbucketServerEntityProvider.ts | 413 ++++++++++++++- .../BitbucketServerEntityProviderConfig.ts | 2 - .../BitbucketServerLocationParser.ts | 8 +- .../.eslintrc.js | 1 + .../README.md | 48 ++ .../api-report-alpha.md | 14 + .../api-report.md | 18 + .../catalog-info.yaml | 9 + .../package.json | 55 ++ .../src/alpha.ts | 18 + .../src/index.ts | 24 + .../router/BitbucketServerEventRouter.test.ts | 53 ++ .../src/router/BitbucketServerEventRouter.ts | 45 ++ .../eventsModuleBitbucketServerEventRouter.ts | 44 ++ .../eventsModuleBitbucketServerRouter.test.ts | 44 ++ .../src/setupTests.ts | 17 + yarn.lock | 15 + 29 files changed, 1715 insertions(+), 45 deletions(-) create mode 100644 .changeset/nine-falcons-repeat.md create mode 100644 plugins/events-backend-module-bitbucket-server/.eslintrc.js create mode 100644 plugins/events-backend-module-bitbucket-server/README.md create mode 100644 plugins/events-backend-module-bitbucket-server/api-report-alpha.md create mode 100644 plugins/events-backend-module-bitbucket-server/api-report.md create mode 100644 plugins/events-backend-module-bitbucket-server/catalog-info.yaml create mode 100644 plugins/events-backend-module-bitbucket-server/package.json create mode 100644 plugins/events-backend-module-bitbucket-server/src/alpha.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/index.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.test.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts create mode 100644 plugins/events-backend-module-bitbucket-server/src/setupTests.ts diff --git a/.changeset/nine-falcons-repeat.md b/.changeset/nine-falcons-repeat.md new file mode 100644 index 0000000000..a67e925343 --- /dev/null +++ b/.changeset/nine-falcons-repeat.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend-module-bitbucket-server': minor +'@backstage/plugin-events-backend-module-bitbucket-server': minor +--- + +Added the ability for the plugin to receive events coming from Bitbucket Server push webhooks. It then performs a delta mutation on the catalog. diff --git a/docs/integrations/bitbucketServer/discovery.md b/docs/integrations/bitbucketServer/discovery.md index 9ba6c7a96d..a66db83806 100644 --- a/docs/integrations/bitbucketServer/discovery.md +++ b/docs/integrations/bitbucketServer/discovery.md @@ -26,7 +26,47 @@ dependency to `@backstage/plugin-catalog-backend-module-bitbucket-server` to you yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbucket-server ``` -And update your backend by adding the following line: +### Installation with New Backend System + +```ts +// optional if you want HTTP endpojnts to receive external events +// backend.add(import('@backstage/plugin-events-backend/alpha')); +// optional if you want to use AWS SQS instead of HTTP endpoints to receive external events +// backend.add(import('@backstage/plugin-events-backend-module-aws-sqs/alpha')); +backend.add( + import('@backstage/plugin-events-backend-module-bitbucket-server/alpha'), +); +backend.add( + import('@backstage/plugin-catalog-backend-module-bitbucket-server/alpha'), +); +``` + +You need to decide how you want to receive events from external sources like + +- [via HTTP endpoint](https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md) +- [via an AWS SQS queue](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md) + +Further documentation: + +- +- +- + +### Installation with Legacy Backend System + +#### Installation without Events Support + +You will have to add the entity provider in the catalog initialization code of your +backend. The provider is not installed by default, therefore you have to add a +dependency to `@backstage/plugin-catalog-backend-module-bitbucket-server` to your backend +package. + +```bash +# From your Backstage root directory +yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbucket-server +``` + +And then add the entity provider to your catalog builder: ```ts title="packages/backend/src/index.ts" backend.add(import('@backstage/plugin-catalog-backend')); @@ -37,6 +77,60 @@ backend.add( /* highlight-add-end */ ``` +#### Installation with Events Support + +Please follow the installation instructions at + +- +- + +Additionally, you need to decide how you want to receive events from external sources like + +- [via HTTP endpoint](https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md) + - Bitbucket Server events webhook url should be set to `{backstageBaseUrl}/api/events/http/bitbucketServer` +- [via an AWS SQS queue](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md) + +Set up your provider + +```ts title="packages/backend/src/plugins/catalog.ts" +import { CatalogBuilder } from '@backstage/plugin-catalog-backend'; +/* highlight-add-start */ +import { BitbucketServerEntityProvider } from '@backstage/plugin-catalog-backend-module-bitbucket-server'; +/* highlight-add-end */ + +import { ScaffolderEntitiesProcessor } from '@backstage/plugin-scaffolder-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; + +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + const builder = await CatalogBuilder.create(env); + builder.addProcessor(new ScaffolderEntitiesProcessor()); + /* highlight-add-start */ + const bitbucketServerProvider = BitbucketServerEntityProvider.fromConfig( + env.config, + { + catalogApi: new CatalogClient({ discoveryApi: env.discovery }), + logger: env.logger, + scheduler: env.scheduler, + events: env.events, + tokenManager: env.tokenManager, + }, + ); + env.eventBroker.subscribe(bitbucketServerProvider); + builder.addEntityProvider(bitbucketServerProvider); + /* highlight-add-end */ + const { processingEngine, router } = await builder.build(); + await processingEngine.start(); + return router; +} +``` + +**Attention:** +`catalogApi` and `tokenManager` are required at this variant +compared to the one without events support. + ## Configuration To use the entity provider, you'll need a [Bitbucket Server integration set up](locations.md). diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 6113f4b41b..a7c403b534 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -51,17 +51,25 @@ }, "dependencies": { "@backstage/backend-plugin-api": "workspace:^", + "@backstage/backend-tasks": "workspace:^", + "@backstage/catalog-client": "workspace:^", "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", + "@backstage/plugin-catalog-common": "workspace:^", "@backstage/plugin-catalog-node": "workspace:^", "p-throttle": "^4.1.1", + "@backstage/plugin-events-node": "workspace:^", + "@types/node-fetch": "^2.5.12", + "node-fetch": "^2.7.0", "uuid": "^11.0.0" }, "devDependencies": { + "@backstage/backend-common": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", + "@backstage/plugin-events-backend-test-utils": "workspace:^", "luxon": "^3.0.0", "msw": "^1.0.0" }, diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index 0da9b78139..c72733806b 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -5,14 +5,18 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; +import { CatalogApi } from '@backstage/catalog-client'; import { Config } from '@backstage/config'; import { Entity } from '@backstage/catalog-model'; import { EntityProvider } from '@backstage/plugin-catalog-node'; import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; -import { LocationSpec } from '@backstage/plugin-catalog-node'; +import { EventsService } from '@backstage/plugin-events-node'; +import { LocationSpec } from '@backstage/plugin-catalog-common'; import { LoggerService } from '@backstage/backend-plugin-api'; import { SchedulerService } from '@backstage/backend-plugin-api'; import { SchedulerServiceTaskRunner } from '@backstage/backend-plugin-api'; +import { TaskRunner } from '@backstage/backend-tasks'; +import { TokenManager } from '@backstage/backend-common'; // @public export class BitbucketServerClient { @@ -22,6 +26,11 @@ export class BitbucketServerClient { config: BitbucketServerIntegrationConfig; }): BitbucketServerClient; // (undocumented) + getDefaultBranch(options: { + projectKey: string; + repo: string; + }): Promise; + // (undocumented) getFile(options: { projectKey: string; repo: string; @@ -47,6 +56,16 @@ export class BitbucketServerClient { }; } +// @public (undocumented) +export type BitbucketServerDefaultBranch = { + id: string; + displayId: string; + type: string; + latestCommit: string; + latestChangeset: string; + isDefault: boolean; +}; + // @public export class BitbucketServerEntityProvider implements EntityProvider { connect(connection: EntityProviderConnection): Promise; @@ -55,9 +74,12 @@ export class BitbucketServerEntityProvider implements EntityProvider { config: Config, options: { logger: LoggerService; + events?: EventsService; parser?: BitbucketServerLocationParser; - schedule?: SchedulerServiceTaskRunner; - scheduler?: SchedulerService; + schedule?: TaskRunner; + scheduler?: PluginTaskScheduler; + catalogApi?: CatalogApi; + tokenManager?: TokenManager; }, ): BitbucketServerEntityProvider[]; getProviderName(): string; @@ -65,6 +87,52 @@ export class BitbucketServerEntityProvider implements EntityProvider { refresh(logger: LoggerService): Promise; } +// @public (undocumented) +export namespace BitbucketServerEvents { + // (undocumented) + export type Actor = { + name?: string; + id: number; + }; + // (undocumented) + export type Change = { + ref: { + id: string; + displayId: string; + type: string; + }; + }; + // (undocumented) + export interface Event { + // (undocumented) + eventKey: string; + } + // (undocumented) + export interface RefsChangedEvent extends Event { + // (undocumented) + actor: Actor; + // (undocumented) + changes: Change[]; + // (undocumented) + commits: undefined; + // (undocumented) + date: string; + // (undocumented) + repository: Repository; + // (undocumented) + ToCommit: undefined; + } + // (undocumented) + export type Repository = { + slug: string; + id: number; + name: string; + project: BitbucketServerProject; + }; + { + } +} + // @public (undocumented) export type BitbucketServerListOptions = { [key: string]: number | undefined; @@ -108,6 +176,7 @@ export type BitbucketServerRepository = { }[] >; archived: boolean; + defaultBranch: string; }; // @public (undocumented) diff --git a/plugins/catalog-backend-module-bitbucket-server/src/index.ts b/plugins/catalog-backend-module-bitbucket-server/src/index.ts index f05c9ca0e9..96e3a1a0a7 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/index.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/index.ts @@ -21,12 +21,7 @@ */ export { default } from './module'; -export { BitbucketServerClient } from './lib'; -export type { - BitbucketServerProject, - BitbucketServerRepository, - BitbucketServerPagedResponse, - BitbucketServerListOptions, -} from './lib'; +export * from './lib'; + export { BitbucketServerEntityProvider } from './providers'; export type { BitbucketServerLocationParser } from './providers'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts index 6abcede9de..fbb4054390 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts @@ -23,7 +23,12 @@ import { BitbucketServerPagedResponse, paginated, } from './BitbucketServerClient'; -import { BitbucketServerProject, BitbucketServerRepository } from './types'; +import { + BitbucketServerDefaultBranch, + BitbucketServerProject, + BitbucketServerRepository, +} from './types'; +import { NotFoundError } from '@backstage/errors'; const server = setupServer(); @@ -122,6 +127,7 @@ describe('BitbucketServerClient', () => { ], }, archived: false, + defaultBranch: 'master', }, ], }; @@ -200,6 +206,7 @@ describe('BitbucketServerClient', () => { ], }, archived: false, + defaultBranch: 'master', }; return res(ctx.json(response)); @@ -217,4 +224,82 @@ describe('BitbucketServerClient', () => { 'https://bitbucket.mycompany.com/projects/test-project', ); }); + + it('getRepository no repo', async () => { + server.use( + rest.get( + `${config.apiBaseUrl}/projects/test-project/repos/wrong-repo`, + (_, res, ctx) => { + return res(ctx.status(404)); + }, + ), + ); + + const error = async () => { + await client.getRepository({ + projectKey: 'test-project', + repo: 'wrong-repo', + }); + }; + + await expect(error).rejects.toThrow( + "Repository 'wrong-repo' in project 'test-project' does not exist.", + ); + await expect(error).rejects.toThrow(NotFoundError); + }); + + it('getDefaultBranch success', async () => { + server.use( + rest.get( + `${config.apiBaseUrl}/projects/test-project/repos/test-repo/default-branch`, + (req, res, ctx) => { + if ( + req.headers.get('authorization') !== + 'Basic dGVzdC11c2VyOnRlc3QtcHc=' + ) { + return res(ctx.status(400)); + } + const response: BitbucketServerDefaultBranch = { + id: 'refs/heads/master', + displayId: 'master', + type: 'BRANCH', + latestCommit: '0f2f3ae484054696568bf4560ba4da280f7df82a', + latestChangeset: '0f2f3ae484054696568bf4560ba4da280f7df82a', + isDefault: true, + }; + + return res(ctx.json(response)); + }, + ), + ); + + const repo = await client.getDefaultBranch({ + projectKey: 'test-project', + repo: 'test-repo', + }); + expect(repo.displayId).toEqual('master'); + }); + + it('getDefaultBranch endpoint', async () => { + server.use( + rest.get( + `${config.apiBaseUrl}/projects/test-project/repos/wrong-repo/default-branch`, + (_, res, ctx) => { + return res(ctx.status(404)); + }, + ), + ); + + const error = async () => { + await client.getDefaultBranch({ + projectKey: 'test-project', + repo: 'wrong-repo', + }); + }; + + await expect(error).rejects.toThrow( + "Your Bitbucket Server version no longer supports the default branch endpoint or 'wrong-repo' in 'test-project' does not exist.", + ); + await expect(error).rejects.toThrow(NotFoundError); + }); }); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index 3dd61d64e7..ba5f75268c 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -18,7 +18,6 @@ import { BitbucketServerIntegrationConfig, getBitbucketServerRequestOptions, } from '@backstage/integration'; -import { BitbucketServerProject, BitbucketServerRepository } from './types'; import pThrottle from 'p-throttle'; // 1 per second @@ -32,6 +31,15 @@ const throttledFetch = throttle( return await fetch(url, options); }, ); +import { + BitbucketServerDefaultBranch, + BitbucketServerRepository, +} from './index'; + +import { BitbucketServerProject } from './types'; +import { NotFoundError } from '@backstage/errors'; + +import { ResponseError } from '@backstage/errors'; /** * A client for interacting with a Bitbucket Server instance @@ -92,7 +100,35 @@ export class BitbucketServerClient { request, getBitbucketServerRequestOptions(this.config), ); - return response.json(); + if (response.ok) { + return response.json(); + } + if (response.status === 404) { + throw new NotFoundError( + `Repository '${options.repo}' in project '${options.projectKey}' does not exist.`, + ); + } + throw await ResponseError.fromResponse(response); + } + + async getDefaultBranch(options: { + projectKey: string; + repo: string; + }): Promise { + const request = `${this.config.apiBaseUrl}/projects/${options.projectKey}/repos/${options.repo}/default-branch`; + const response = await fetch( + request, + getBitbucketServerRequestOptions(this.config), + ); + if (response.ok) { + return response.json(); + } + if (response.status === 404) { + throw new NotFoundError( + `Your Bitbucket Server version no longer supports the default branch endpoint or '${options.repo}' in '${options.projectKey}' does not exist.`, + ); + } + throw await ResponseError.fromResponse(response); } resolvePath(options: { projectKey: string; repo: string; path: string }): { @@ -163,7 +199,9 @@ export type BitbucketServerPagedResponse = { values: T[]; nextPageStart: number; }; - +/** + * @public + */ export async function* paginated( request: ( options: BitbucketServerListOptions, diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts index 8b72c9335b..14fb01629e 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts @@ -19,7 +19,4 @@ export type { BitbucketServerPagedResponse, BitbucketServerListOptions, } from './BitbucketServerClient'; -export type { - BitbucketServerRepository, - BitbucketServerProject, -} from './types'; +export * from './types'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts index 381eecb493..e014528791 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts @@ -15,7 +15,7 @@ */ /** @public */ -export type BitbucketServerRepository = { +type BitbucketServerRepository = { project: { key: string; }; @@ -28,9 +28,56 @@ export type BitbucketServerRepository = { }[] >; archived: boolean; + defaultBranch: string; }; /** @public */ -export type BitbucketServerProject = { +type BitbucketServerProject = { key: string; }; + +/** @public */ +type BitbucketServerDefaultBranch = { + id: string; + displayId: string; + type: string; + latestCommit: string; + latestChangeset: string; + isDefault: boolean; +}; + +/** @public */ +namespace BitbucketServerEvents { + interface Event { + eventKey: string; + } + + export interface RefsChangedEvent extends Event { + date: string; + actor: Actor; + repository: Repository; + changes: Change[]; + commits: undefined; + ToCommit: undefined; + } + type Actor = { + name?: string; + id: number; + }; + type Change = { + ref: { id: string; displayId: string; type: string }; + }; + type Repository = { + slug: string; + id: number; + name: string; + project: BitbucketServerProject; + }; +} + +export type { + BitbucketServerDefaultBranch, + BitbucketServerProject, + BitbucketServerEvents, + BitbucketServerRepository, +}; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts index fbd4fa7a36..27420e9300 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts @@ -16,20 +16,35 @@ import { SchedulerServiceTaskScheduleDefinition } from '@backstage/backend-plugin-api'; import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; +import { createServiceFactory } from '@backstage/backend-plugin-api'; +import { TaskScheduleDefinition } from '@backstage/backend-tasks'; +import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; +import { TestEventsService } from '@backstage/plugin-events-backend-test-utils'; +import { eventsServiceRef } from '@backstage/plugin-events-node'; +import { Duration } from 'luxon'; import { catalogModuleBitbucketServerEntityProvider } from './catalogModuleBitbucketServerEntityProvider'; -import { BitbucketServerEntityProvider } from '../providers'; +import { BitbucketServerEntityProvider } from '../providers/BitbucketServerEntityProvider'; describe('catalogModuleBitbucketServerEntityProvider', () => { it('should register provider at the catalog extension point', async () => { + const events = new TestEventsService(); + const eventsServiceFactory = createServiceFactory({ + service: eventsServiceRef, + deps: {}, + async factory({}) { + return events; + }, + }); let addedProviders: Array | undefined; let usedSchedule: SchedulerServiceTaskScheduleDefinition | undefined; - const extensionPoint = { + const catalogExtensionPointImpl = { addEntityProvider: (providers: any) => { addedProviders = providers; }, }; + const connection = jest.fn() as unknown as EntityProviderConnection; const runner = jest.fn(); const scheduler = mockServices.scheduler.mock({ createScheduledTaskRunner(schedule) { @@ -60,7 +75,9 @@ describe('catalogModuleBitbucketServerEntityProvider', () => { }; await startTestBackend({ - extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], + extensionPoints: [ + [catalogProcessingExtensionPoint, catalogExtensionPointImpl], + ], features: [ catalogModuleBitbucketServerEntityProvider, mockServices.rootConfig.factory({ data: config }), @@ -72,9 +89,14 @@ describe('catalogModuleBitbucketServerEntityProvider', () => { expect(usedSchedule?.frequency).toEqual({ months: 1 }); expect(usedSchedule?.timeout).toEqual({ minutes: 3 }); expect(addedProviders?.length).toEqual(1); - expect(addedProviders?.pop()?.getProviderName()).toEqual( + expect(runner).not.toHaveBeenCalled(); + const provider = addedProviders!.pop()!; + expect(provider.getProviderName()).toEqual( 'bitbucketServer-provider:default', ); - expect(runner).not.toHaveBeenCalled(); + await provider.connect(connection); + expect(events.subscribed).toHaveLength(1); + expect(events.subscribed[0].id).toEqual('bitbucketServer-provider:default'); + expect(runner).toHaveBeenCalledTimes(1); }); }); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts index 2c78d219d9..615bbb3477 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts @@ -18,8 +18,12 @@ import { coreServices, createBackendModule, } from '@backstage/backend-plugin-api'; -import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; -import { BitbucketServerEntityProvider } from '../providers'; +import { + catalogProcessingExtensionPoint, + catalogServiceRef, +} from '@backstage/plugin-catalog-node/alpha'; +import { eventsServiceRef } from '@backstage/plugin-events-node'; +import { BitbucketServerEntityProvider } from '../providers/BitbucketServerEntityProvider'; /** * @public @@ -31,14 +35,28 @@ export const catalogModuleBitbucketServerEntityProvider = createBackendModule({ env.registerInit({ deps: { catalog: catalogProcessingExtensionPoint, + catalogApi: catalogServiceRef, config: coreServices.rootConfig, + events: eventsServiceRef, logger: coreServices.logger, scheduler: coreServices.scheduler, + tokenManager: coreServices.tokenManager, }, - async init({ catalog, config, logger, scheduler }) { + async init({ + catalog, + catalogApi, + config, + events, + logger, + scheduler, + tokenManager, + }) { const providers = BitbucketServerEntityProvider.fromConfig(config, { + catalogApi, + events, logger, scheduler, + tokenManager, }); catalog.addEntityProvider(providers); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts index 05e0ea6a01..dd2735177b 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { TokenManager } from '@backstage/backend-common'; import { SchedulerService, SchedulerServiceTaskRunner, @@ -24,11 +25,22 @@ import { registerMswTestHooks, } from '@backstage/backend-test-utils'; import { ConfigReader } from '@backstage/config'; -import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; +import { + DeferredEntity, + EntityProviderConnection, + locationSpecToLocationEntity, +} from '@backstage/plugin-catalog-node'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; -import { BitbucketServerEntityProvider } from './BitbucketServerEntityProvider'; +import { + BitbucketServerEntityProvider, + toDeferredEntities, +} from './BitbucketServerEntityProvider'; import { BitbucketServerPagedResponse } from '../lib'; +import { Entity, LocationEntity } from '@backstage/catalog-model'; +import { BitbucketServerEvents } from '../lib/index'; +import { CatalogApi } from '@backstage/catalog-client'; +import { DefaultEventsService } from '@backstage/plugin-events-node'; class PersistingTaskRunner implements SchedulerServiceTaskRunner { private tasks: SchedulerServiceTaskInvocationDefinition[] = []; @@ -57,9 +69,15 @@ function pagedResponse(values: any): BitbucketServerPagedResponse { const logger = mockServices.logger.mock(); +const events = DefaultEventsService.create({ logger }); + const server = setupServer(); -function setupStubs(projects: Project[], baseUrl: string) { +function setupStubs( + projects: Project[], + baseUrl: string, + defaultBranch: string, +) { // Stub projects server.use( rest.get(`${baseUrl}/rest/api/1.0/projects`, (_, res, ctx) => { @@ -93,6 +111,7 @@ function setupStubs(projects: Project[], baseUrl: string) { ], }, archived: repo.archived ?? false, + defaultBranch: defaultBranch, }); } return res(ctx.json(pagedResponse(response))); @@ -102,6 +121,107 @@ function setupStubs(projects: Project[], baseUrl: string) { } } +const host = 'bitbucket.mycompany.com'; +const targetPath = `/catalog-info.yaml`; +const test1RepoUrl = `https://${host}/projects/TEST/repos/test1/browse`; + +function setupRepositoryReqHandler(defaultBranch: string) { + server.use( + rest.get( + `https://${host}/rest/api/1.0/projects/TEST/repos/test1`, + (_, res, ctx) => { + const response = { + slug: 'test1', + id: 1, + name: 'test1', + project: { + key: 'TEST', + id: 1, + name: 'TEST', + links: { + self: [ + { + href: `https://${host}/projects/TEST`, + }, + ], + }, + }, + links: { + self: [ + { + href: `${test1RepoUrl}`, + }, + ], + }, + defaultBranch: defaultBranch, + }; + return res(ctx.json(response)); + }, + ), + ); +} + +const tokenManager = { + getToken: async () => { + return { token: 'fake-token' }; + }, +} as any as TokenManager; +const repoPushEvent: BitbucketServerEvents.RefsChangedEvent = { + eventKey: 'repo:refs_changed', + date: '2017-09-19T09:45:32+1000', + actor: { + name: 'admin', + id: 1, + }, + repository: { + slug: 'test1', + id: 84, + name: 'test1', + project: { + key: 'TEST', + }, + }, + changes: [ + { + ref: { + id: 'refs/heads/master', + displayId: 'master', + type: 'BRANCH', + }, + }, + ], + commits: undefined, + ToCommit: undefined, +}; +const repoPushEventParams = { + topic: 'bitbucketServer.repo:refs_changed', + eventPayload: repoPushEvent, + metadata: { 'x-event-key': 'repo:refs_changed' }, +}; + +const createLocationEntity = ( + repoUrl: string, + path: string, + defaultBranch: string, +): LocationEntity => { + const target = `${repoUrl}${path}`; + + const entity = locationSpecToLocationEntity({ + location: { + type: 'url', + target: target, + presence: 'optional', + }, + }); + entity.metadata.annotations = { + ...entity.metadata.annotations, + [`${host}/repo-url`]: target, + ['bitbucket.org/default-branch']: defaultBranch, + }; + + return entity; +}; + describe('BitbucketServerEntityProvider', () => { registerMswTestHooks(server); afterEach(() => { @@ -157,6 +277,7 @@ describe('BitbucketServerEntityProvider', () => { }); const providers = BitbucketServerEntityProvider.fromConfig(config, { logger, + events, schedule, }); @@ -191,6 +312,7 @@ describe('BitbucketServerEntityProvider', () => { }); const providers = BitbucketServerEntityProvider.fromConfig(config, { logger, + events, schedule, }); @@ -204,7 +326,6 @@ describe('BitbucketServerEntityProvider', () => { }); it('apply full update on scheduled execution with filters', async () => { - const host = 'bitbucket.mycompany.com'; const config = new ConfigReader({ integrations: { bitbucketServer: [ @@ -253,6 +374,7 @@ describe('BitbucketServerEntityProvider', () => { { key: 'other-project', repos: [{ name: 'other-repo' }] }, ], `https://${host}`, + 'master', ); await provider.connect(entityProviderConnection); @@ -270,6 +392,7 @@ describe('BitbucketServerEntityProvider', () => { annotations: { 'backstage.io/managed-by-location': `url:${url}`, 'backstage.io/managed-by-origin-location': `url:${url}`, + 'bitbucket.org/default-branch': 'master', }, name: 'generated-77f4323822420990f8c3e3c981d38c2dec4ae3a6', }, @@ -291,7 +414,6 @@ describe('BitbucketServerEntityProvider', () => { }); it('apply full update on scheduled execution without filters', async () => { - const host = 'bitbucket.mycompany.com'; const config = new ConfigReader({ integrations: { bitbucketServer: [ @@ -329,6 +451,7 @@ describe('BitbucketServerEntityProvider', () => { { key: 'other-project', repos: [{ name: 'other-repo' }] }, ], `https://${host}`, + 'master', ); await provider.connect(entityProviderConnection); @@ -345,6 +468,7 @@ describe('BitbucketServerEntityProvider', () => { annotations: { 'backstage.io/managed-by-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', }, name: 'generated-77f4323822420990f8c3e3c981d38c2dec4ae3a6', }, @@ -364,6 +488,7 @@ describe('BitbucketServerEntityProvider', () => { annotations: { 'backstage.io/managed-by-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', }, name: 'generated-d8d4944c30c2906dfee172ddda9537f9893b2c0f', }, @@ -441,7 +566,6 @@ describe('BitbucketServerEntityProvider', () => { }); it('apply full update with schedule in config', async () => { - const host = 'bitbucket.mycompany.com'; const config = new ConfigReader({ integrations: { bitbucketServer: [ @@ -488,6 +612,7 @@ describe('BitbucketServerEntityProvider', () => { { key: 'other-project', repos: [{ name: 'other-repo' }] }, ], `https://${host}`, + 'master', ); await provider.connect(entityProviderConnection); @@ -504,6 +629,7 @@ describe('BitbucketServerEntityProvider', () => { annotations: { 'backstage.io/managed-by-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', }, name: 'generated-77f4323822420990f8c3e3c981d38c2dec4ae3a6', }, @@ -523,6 +649,7 @@ describe('BitbucketServerEntityProvider', () => { annotations: { 'backstage.io/managed-by-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', }, name: 'generated-d8d4944c30c2906dfee172ddda9537f9893b2c0f', }, @@ -542,4 +669,360 @@ describe('BitbucketServerEntityProvider', () => { entities: expectedEntities, }); }); + + it('Multiple location entities to deferred entities', async () => { + const schedule = new PersistingTaskRunner(); + const config = new ConfigReader({ + catalog: { + providers: { + bitbucketServer: { + host: host, + }, + }, + }, + integrations: { + bitbucketServer: [ + { + host: host, + }, + ], + }, + }); + const providers = BitbucketServerEntityProvider.fromConfig(config, { + logger, + events, + schedule, + }); + + expect(providers).toHaveLength(1); + expect(providers[0].getProviderName()).toEqual( + 'bitbucketServer-provider:default', + ); + + const locationEntities = [ + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Location', + metadata: { + annotations: { + 'backstage.io/managed-by-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + [`${host}/repo-url`]: `https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', + }, + name: 'generated-77f4323822420990f8c3e3c981d38c2dec4ae3a6', + }, + spec: { + presence: 'optional', + target: `https://${host}/projects/project-test/repos/repo-test/browse/catalog-info.yaml`, + type: 'url', + }, + }, + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Location', + metadata: { + annotations: { + 'backstage.io/managed-by-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + 'backstage.io/managed-by-origin-location': `url:https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + [`${host}/repo-url`]: `https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + 'bitbucket.org/default-branch': 'master', + }, + name: 'generated-d8d4944c30c2906dfee172ddda9537f9893b2c0f', + }, + spec: { + presence: 'optional', + target: `https://${host}/projects/other-project/repos/other-repo/browse/catalog-info.yaml`, + type: 'url', + }, + }, + ]; + + const deferredEntities = toDeferredEntities( + locationEntities, + providers[0].getProviderName(), + ); + + expect(deferredEntities).toEqual([ + { + locationKey: providers[0].getProviderName(), + entity: locationEntities[0], + }, + { + locationKey: providers[0].getProviderName(), + entity: locationEntities[1], + }, + ]); + }); + + it('refresh onRepoPush', async () => { + const schedule = new PersistingTaskRunner(); + const keptModule = createLocationEntity( + test1RepoUrl, + `/kept-module:${targetPath}`, + 'master', + ); + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + setupRepositoryReqHandler('master'); + + const config = new ConfigReader({ + integrations: { + bitbucketServer: [ + { + host: host, + }, + ], + }, + catalog: { + providers: { + bitbucketServer: { + mainProvider: { + host: host, + apiBaseUrl: `https://${host}/rest/api/1.0`, + catalogPath: `/kept-module:/catalog-info.yaml`, + defaultBranch: 'master', + }, + }, + }, + }, + }); + + const catalogApi = { + getEntities: async ( + request: { filter: Record }, + options: { token: string }, + ): Promise<{ items: Entity[] }> => { + if ( + options.token !== 'fake-token' || + request.filter.kind !== 'Location' || + request.filter[`metadata.annotations.${host}/repo-url`] !== + `${test1RepoUrl}/kept-module:${targetPath}` + ) { + return { items: [] }; + } + return { + items: [keptModule], + }; + }, + }; + const provider = BitbucketServerEntityProvider.fromConfig(config, { + catalogApi: catalogApi as any as CatalogApi, + logger, + schedule, + events, + tokenManager, + })[0]; + + await provider.connect(entityProviderConnection); + await events.publish(repoPushEventParams); + + expect(entityProviderConnection.refresh).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.refresh).toHaveBeenCalledWith({ + keys: [`url:${test1RepoUrl}/kept-module:${targetPath}`], + }); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(0); + }); + + it('no refresh onRepoPush due to different default branch', async () => { + const schedule = new PersistingTaskRunner(); + const keptModule = createLocationEntity( + test1RepoUrl, + `/kept-module:${targetPath}`, + 'main', + ); + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + setupRepositoryReqHandler('main'); + + const config = new ConfigReader({ + integrations: { + bitbucketServer: [ + { + host: host, + }, + ], + }, + catalog: { + providers: { + bitbucketServer: { + mainProvider: { + host: host, + apiBaseUrl: `https://${host}/rest/api/1.0`, + catalogPath: `/kept-module:/catalog-info.yaml`, + }, + }, + }, + }, + }); + + const catalogApi = { + getEntities: async ( + request: { filter: Record }, + options: { token: string }, + ): Promise<{ items: Entity[] }> => { + if ( + options.token !== 'fake-token' || + request.filter.kind !== 'Location' || + request.filter[`metadata.annotations.${host}/repo-url`] !== + `${test1RepoUrl}/kept-module:${targetPath}` + ) { + return { items: [] }; + } + return { + items: [keptModule], + }; + }, + }; + const provider = BitbucketServerEntityProvider.fromConfig(config, { + catalogApi: catalogApi as any as CatalogApi, + logger, + schedule, + events, + tokenManager, + })[0]; + + await provider.connect(entityProviderConnection); + await events.publish(repoPushEventParams); + + expect(entityProviderConnection.refresh).toHaveBeenCalledTimes(0); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(0); + }); + + it('add onRepoPush', async () => { + const schedule = new PersistingTaskRunner(); + setupRepositoryReqHandler('master'); + const addedModule = createLocationEntity( + test1RepoUrl, + `/added-module:${targetPath}`, + 'master', + ); + + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const config = new ConfigReader({ + integrations: { + bitbucketServer: [ + { + host: host, + }, + ], + }, + catalog: { + providers: { + bitbucketServer: { + mainProvider: { + host: host, + apiBaseUrl: `https://${host}/rest/api/1.0`, + catalogPath: `/added-module:/catalog-info.yaml`, + }, + }, + }, + }, + }); + + const catalogApi = { + getEntities: async ( + _request: { filter: Record }, + _options: { token: string }, + ): Promise<{ items: Entity[] }> => { + return { + items: [], + }; + }, + }; + const provider = BitbucketServerEntityProvider.fromConfig(config, { + catalogApi: catalogApi as any as CatalogApi, + logger, + schedule, + events, + tokenManager, + })[0]; + + await provider.connect(entityProviderConnection); + await events.publish(repoPushEventParams); + const addedEntities = [ + { + entity: addedModule, + locationKey: 'bitbucketServer-provider:mainProvider', + }, + ]; + const removedEntities: DeferredEntity[] = []; + + expect(entityProviderConnection.refresh).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.refresh).toHaveBeenCalledWith({ + keys: [], + }); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + type: 'delta', + added: addedEntities, + removed: removedEntities, + }); + }); + + it('fail add onRepoPush from wrong default branch', async () => { + const schedule = new PersistingTaskRunner(); + setupRepositoryReqHandler('main'); + + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const config = new ConfigReader({ + integrations: { + bitbucketServer: [ + { + host: host, + }, + ], + }, + catalog: { + providers: { + bitbucketServer: { + mainProvider: { + host: host, + apiBaseUrl: `https://${host}/rest/api/1.0`, + catalogPath: `/added-module:/catalog-info.yaml`, + }, + }, + }, + }, + }); + + const catalogApi = { + getEntities: async ( + _request: { filter: Record }, + _options: { token: string }, + ): Promise<{ items: Entity[] }> => { + return { + items: [], + }; + }, + }; + const provider = BitbucketServerEntityProvider.fromConfig(config, { + catalogApi: catalogApi as any as CatalogApi, + logger, + schedule, + events, + tokenManager, + })[0]; + + await provider.connect(entityProviderConnection); + await events.publish(repoPushEventParams); + + expect(entityProviderConnection.refresh).toHaveBeenCalledTimes(0); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(0); + }); }); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index 46f492d64c..4afc02b8b5 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Entity } from '@backstage/catalog-model'; +import { PluginTaskScheduler, TaskRunner } from '@backstage/backend-tasks'; +import { Entity, LocationEntity } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import { InputError } from '@backstage/errors'; import { @@ -24,6 +25,7 @@ import { import { EntityProvider, EntityProviderConnection, + DeferredEntity, } from '@backstage/plugin-catalog-node'; import * as uuid from 'uuid'; import { BitbucketServerClient, paginated } from '../lib'; @@ -40,6 +42,12 @@ import { SchedulerService, SchedulerServiceTaskRunner, } from '@backstage/backend-plugin-api'; +import { BitbucketServerEvents } from '../lib'; +import { EventsService } from '@backstage/plugin-events-node'; +import { CatalogApi } from '@backstage/catalog-client'; +import { TokenManager } from '@backstage/backend-common'; + +const TOPIC_REPO_REFS_CHANGED = 'bitbucketServer.repo:refs_changed'; /** * Discovers catalog files located in Bitbucket Server. @@ -56,14 +64,23 @@ export class BitbucketServerEntityProvider implements EntityProvider { private readonly logger: LoggerService; private readonly scheduleFn: () => Promise; private connection?: EntityProviderConnection; + private readonly catalogApi?: CatalogApi; + private readonly events?: EventsService; + private readonly tokenManager?: TokenManager; + private eventConfigErrorThrown = false; + private readonly targetAnnotation: string; + private readonly defaultBranchAnnotation: string; static fromConfig( config: Config, options: { logger: LoggerService; + events?: EventsService; parser?: BitbucketServerLocationParser; - schedule?: SchedulerServiceTaskRunner; - scheduler?: SchedulerService; + schedule?: TaskRunner; + scheduler?: PluginTaskScheduler; + catalogApi?: CatalogApi; + tokenManager?: TokenManager; }, ): BitbucketServerEntityProvider[] { const integrations = ScmIntegrations.fromConfig(config); @@ -98,6 +115,9 @@ export class BitbucketServerEntityProvider implements EntityProvider { options.logger, taskRunner, options.parser, + options.catalogApi, + options.events, + options.tokenManager, ); }); } @@ -108,6 +128,9 @@ export class BitbucketServerEntityProvider implements EntityProvider { logger: LoggerService, taskRunner: SchedulerServiceTaskRunner, parser?: BitbucketServerLocationParser, + catalogApi?: CatalogApi, + events?: EventsService, + tokenManager?: TokenManager, ) { this.integration = integration; this.config = config; @@ -116,6 +139,11 @@ export class BitbucketServerEntityProvider implements EntityProvider { target: this.getProviderName(), }); this.scheduleFn = this.createScheduleFn(taskRunner); + this.catalogApi = catalogApi; + this.tokenManager = tokenManager; + this.targetAnnotation = `${this.config.host.split(':')[0]}/repo-url`; + this.defaultBranchAnnotation = 'bitbucket.org/default-branch'; + this.events = events; } private createScheduleFn( @@ -154,6 +182,22 @@ export class BitbucketServerEntityProvider implements EntityProvider { async connect(connection: EntityProviderConnection): Promise { this.connection = connection; await this.scheduleFn(); + + if (this.events) { + await this.events.subscribe({ + id: this.getProviderName(), + topics: [TOPIC_REPO_REFS_CHANGED], + onEvent: async params => { + if (params.topic !== TOPIC_REPO_REFS_CHANGED) { + return; + } + + await this.onRepoPush( + params.eventPayload as BitbucketServerEvents.RefsChangedEvent, + ); + }, + }); + } } async refresh(logger: LoggerService) { @@ -218,10 +262,373 @@ export class BitbucketServerEntityProvider implements EntityProvider { presence: 'optional', }, })) { + if (entity.metadata.annotations === undefined) { + entity.metadata.annotations = {}; + } + if (repository.defaultBranch === undefined) { + const defaultBranchResponse = await client.getDefaultBranch({ + repo: repository.slug, + projectKey: project.key, + }); + entity.metadata.annotations[this.defaultBranchAnnotation] = + defaultBranchResponse.displayId; + } else { + entity.metadata.annotations[this.defaultBranchAnnotation] = + repository.defaultBranch; + } result.push(entity); } } } return result; } + + /** + * Checks if the webhook was triggered on a commit to the head branch of a repository + * @param event Bitbucket Server webhook repo:refs_changed event + */ + private isDefaultBranchPush( + defaultBranch: String, + event: BitbucketServerEvents.RefsChangedEvent, + ): boolean { + return event.changes.some(c => defaultBranch === c.ref.displayId); + } + + /** + * Checks if the provider is able to handle events + * @returns Boolean + */ + private canHandleEvents(): boolean { + if ( + this.catalogApi !== undefined && + this.catalogApi !== null && + this.tokenManager !== undefined && + this.tokenManager !== null + ) { + return true; + } + + if (!this.eventConfigErrorThrown) { + this.eventConfigErrorThrown = true; + throw new Error( + `${this.getProviderName()} not well configured to handle repo:push. Missing CatalogApi and/or TokenManager.`, + ); + } + + return false; + } + + /** + * Creates a Bitbucket Server location entity for the repository that is referenced in the push event passed in. + * + * @param event A Bitbucket Server push event with repository information. + * + * @returns An array of location entities for the repository. + * + * @example + * + * const RefsChangedEvent = { + * "eventKey": "repo:refs_changed", + * "date": "2022-01-01T00:00:00Z", + * "actor": { + * "name": "johndoe", + * "emailAddress": "johndoe@example.com", + * "id": 123, + * "displayName": "John Doe", + * "active": true, + * "slug": "johndoe", + * "type": "NORMAL" + * }, + * "repository": { + * "slug": "my-repo", + * "id": 123, + * "name": "My Repository", + * "project": { + * "key": "my-project", + * "id": 456, + * "name": "My Project", + * "description": "My project description", + * "public": true, + * "type": "NORMAL" + * } + * }, + * "changes": [ + * { + * "ref": { + * "id": "refs/heads/master", + * "displayId": "master", + * "type": "BRANCH" + * }, + * "refId": "refs/heads/master", + * "fromHash": "0123456789abcdef0123456789abcdef0123456", + * "toHash": "fedcba9876543210fedcba9876543210fedcba9", + * "type": "UPDATE" + * } + * ] + * }; + * + * const locationEntities = await getLocationEntity(RefsChangedEvent); + * + * // locationEntities: + * // [ + * // { + * // kind: 'Location', + * // metadata: { + * // name: 'my-repo', + * // namespace: 'my-project', + * // annotations: { + * // 'backstage.io/managed-by-location': 'url/catalog-info-path', + * // 'backstage.io/managed-by-origin-location': 'url/catalog-info-path', + * // 'host/repo-url': 'url', + * // }, + * // }, + * // spec: { + * // type: 'bitbucket', + * // target: 'url/catalog-info-path', + * // presence: 'optional', + * // }, + * // }, + * // ] + */ + private async getLocationEntity( + event: BitbucketServerEvents.RefsChangedEvent, + ): Promise { + const client = BitbucketServerClient.fromConfig({ + config: this.integration.config, + }); + const result: Entity[] = []; + try { + const repository = await client.getRepository({ + projectKey: event.repository.project.key, + repo: event.repository.slug, + }); + + for await (const entity of this.parser({ + client, + logger: this.logger, + location: { + type: 'url', + target: `${repository.links.self[0].href}${this.config.catalogPath}`, + presence: 'optional', + }, + })) { + entity.metadata.annotations![ + this.targetAnnotation + ] = `${repository.links.self[0].href}${this.config.catalogPath}`; + + if (entity.metadata.annotations === undefined) { + entity.metadata.annotations = {}; + } + + if (repository.defaultBranch === undefined) { + const defaultBranchResponse = await client.getDefaultBranch({ + repo: repository.slug, + projectKey: event.repository.project.key, + }); + entity.metadata.annotations[this.defaultBranchAnnotation] = + defaultBranchResponse.displayId; + } else { + entity.metadata.annotations[this.defaultBranchAnnotation] = + repository.defaultBranch; + } + result.push(entity); + } + } catch (error: any) { + if (error.name === 'NotFoundError') { + this.logger.error(error.message); + } + } + + return result; + } + + /** + * Finds if there are existing location entities for the repository that was pushed. If there are, it simply refreshes those entities, + * if not, it discovers any entity that was added and removed in the list of entities + * @param event - A Bitbucket Server webhook event for repo:refs_change + */ + private async onRepoPush( + event: BitbucketServerEvents.RefsChangedEvent, + ): Promise { + if (!this.canHandleEvents()) { + this.logger.error( + 'Bitbucket Server catalog entity provider is not set up to handle events. Missing tokenManager or catalogApi.', + ); + return; + } + + if (!this.connection) { + throw new Error('Not initialized'); + } + + const repoSlug = event.repository.slug; + const catalogRepoUrl: string = `https://${this.config.host}/projects/${event.repository.project.key}/repos/${repoSlug}/browse${this.config.catalogPath}`; + this.logger.info(`handle repo:push event for ${catalogRepoUrl}`); + const targets = await this.getLocationEntity(event); + if (targets.length === 0) { + this.logger.error('Failed to create location entity.'); + return; + } + const { token } = await this.tokenManager!.getToken(); + const existing = await this.findExistingLocations(catalogRepoUrl, token); + const stillExisting: LocationEntity[] = []; + const removed: DeferredEntity[] = []; + existing.forEach(item => { + if ( + targets.find( + value => + value.metadata.annotations![this.targetAnnotation] === + item.spec.target, + ) + ) { + stillExisting.push(item); + } else { + removed.push({ + locationKey: this.getProviderName(), + entity: item, + }); + } + }); + + const added = await this.getAddedEntities(targets, existing); + + if ( + stillExisting.length > 0 && + stillExisting[0].metadata.annotations![this.defaultBranchAnnotation] !== + undefined && + !this.isDefaultBranchPush( + stillExisting[0].metadata.annotations![this.defaultBranchAnnotation], + event, + ) + ) { + return; + } else if ( + added.length > 0 && + added[0].entity.metadata.annotations![this.defaultBranchAnnotation] !== + undefined && + !this.isDefaultBranchPush( + added[0].entity.metadata.annotations![this.defaultBranchAnnotation], + event, + ) + ) { + return; + } else if ( + removed.length > 0 && + removed[0].entity.metadata.annotations![this.defaultBranchAnnotation] !== + undefined && + !this.isDefaultBranchPush( + removed[0].entity.metadata.annotations![this.defaultBranchAnnotation], + event, + ) + ) { + return; + } + + const promises: Promise[] = [ + this.connection.refresh({ + keys: stillExisting.map(entity => `url:${entity.spec.target}`), + }), + ]; + + if (added.length > 0 || removed.length > 0) { + promises.push( + this.connection.applyMutation({ + type: 'delta', + added: added, + removed: removed, + }), + ); + } + + await Promise.all(promises); + + return; + } + + /** + * Gets the location entities that are to be newly added to the catalog. + * @param targets Location entities for catalog files in the repository that was pushed + * @param existing The location entities in the repository that was pushed that already exist + * @returns Returns all deferred entities that represent location entities that don't exist in the catalog yet + */ + private async getAddedEntities( + targets: Entity[], + existing: LocationEntity[], + ): Promise { + const added: DeferredEntity[] = toDeferredEntities( + targets.filter( + target => + !existing.find( + item => + item.spec.target === + target.metadata.annotations![this.targetAnnotation], + ), + ), + this.getProviderName(), + ); + return added; + } + + /** + * Finds all location entities in the catalog that already have the annotation `metadata.annotations.${this.config.host}/repo-url` + * that is equivalent to @param repoURL\. + * @param repoURL URL for the reposity that the method finds the existing location entities for + * @param token Token from class token manager + */ + private async findExistingLocations( + catalogRepoUrl: string, + token: string, + ): Promise { + const filter: Record = {}; + filter.kind = 'Location'; + filter[`metadata.annotations.${this.targetAnnotation}`] = catalogRepoUrl; + + return this.catalogApi!.getEntities({ filter }, { token }).then( + result => result.items, + ) as Promise; + } + + // private static toLocationSpec(target: string): LocationSpec { + // return { + // type: 'url', + // target: target, + // presence: 'required', + // }; + // } +} + +/** + * Converts an array of entities into an array of deferred entities with the provider's name as the location key. + * + * @param targets An array of entities to convert. + * + * @returns An array of deferred entities with the provider's name as the location key. + * + * @example + * + * const entities = [ + * { kind: 'Component', namespace: 'default', name: 'my-component' }, + * { kind: 'System', namespace: 'default', name: 'my-system' }, + * { kind: 'API', namespace: 'default', name: 'my-api' }, + * ]; + * + * const deferredEntities = toDeferredEntities(entities); + * + * // deferredEntities: + * // [ + * // { locationKey: 'my-provider', entity: { kind: 'Component', namespace: 'default', name: 'my-component' } }, + * // { locationKey: 'my-provider', entity: { kind: 'System', namespace: 'default', name: 'my-system' } }, + * // { locationKey: 'my-provider', entity: { kind: 'API', namespace: 'default', name: 'my-api' } }, + * // ] + */ +export function toDeferredEntities( + targets: Entity[], + locationKey: string, +): DeferredEntity[] { + return targets.map(entity => { + return { + locationKey, + entity, + }; + }); } diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProviderConfig.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProviderConfig.ts index 018ff23069..3b921b6bab 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProviderConfig.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProviderConfig.ts @@ -48,10 +48,8 @@ export function readProviderConfigs( // simple/single config variant return [readProviderConfig(DEFAULT_PROVIDER_ID, providersConfig)]; } - return providersConfig.keys().map(id => { const providerConfig = providersConfig.getConfig(id); - return readProviderConfig(id, providerConfig); }); } diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerLocationParser.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerLocationParser.ts index 6aea23387e..1c48d5e7bd 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerLocationParser.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerLocationParser.ts @@ -14,13 +14,11 @@ * limitations under the License. */ -import { - LocationSpec, - locationSpecToLocationEntity, -} from '@backstage/plugin-catalog-node'; +import { locationSpecToLocationEntity } from '@backstage/plugin-catalog-node'; import { Entity } from '@backstage/catalog-model'; -import { BitbucketServerClient } from '../lib'; import { LoggerService } from '@backstage/backend-plugin-api'; +import { LocationSpec } from '@backstage/plugin-catalog-common'; +import { BitbucketServerClient } from '../lib'; /** * A custom callback that reacts to finding a location by yielding entities. diff --git a/plugins/events-backend-module-bitbucket-server/.eslintrc.js b/plugins/events-backend-module-bitbucket-server/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/events-backend-module-bitbucket-server/README.md b/plugins/events-backend-module-bitbucket-server/README.md new file mode 100644 index 0000000000..2c8fdff092 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/README.md @@ -0,0 +1,48 @@ +# events-backend-module-bitbucket-server + +Welcome to the `events-backend-module-bitbucket-server` backend plugin! + +This package is a module for the `events-backend` backend plugin +and extends the event system with an `BitbucketServerEventRouter`. + +The event router will subscribe to the topic `bitbucketServer` +and route the events to more concrete topics based on the value +of the provided `x-event-key` metadata field. + +Examples: + +| x-event-key | topic | +| ------------------- | ----------------------------------- | +| `repo:refs_changed` | `bitbucketServer.repo:refs_changed` | +| `repo:modified` | `bitbucketServer.repo:modified` | + +Please find all possible webhook event types at the +[official documentation](https://confluence.atlassian.com/bitbucketserver/event-payload-938025882.html). + +## Installation + +Install the [`events-backend` plugin](../events-backend/README.md). + +Install this module: + +```bash +# From your Backstage root directory +yarn add --cwd packages/backend @backstage/plugin-events-backend-module-bitbucket-server +``` + +```ts +// packages/backend/src/index.ts +backend.add( + import('@backstage/plugin-events-backend-module-bitbucket-server/alpha'), +); +``` + +### Legacy Backend System + +```ts +// packages/backend/src/plugins/events.ts +const eventRouter = new BitbucketCloudEventRouter({ + events: env.events, +}); +await eventRouter.subscribe(); +``` diff --git a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md new file mode 100644 index 0000000000..62fb3e2a6b --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md @@ -0,0 +1,14 @@ +## API Report File for "@backstage/plugin-events-backend-module-bitbucket-server" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; + +// @alpha +const eventsModuleBitbucketServerEventRouter: () => BackendFeature; +export default eventsModuleBitbucketServerEventRouter; +export { eventsModuleBitbucketServerEventRouter }; + +// (No @packageDocumentation comment for this package) +``` diff --git a/plugins/events-backend-module-bitbucket-server/api-report.md b/plugins/events-backend-module-bitbucket-server/api-report.md new file mode 100644 index 0000000000..18292a0d11 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/api-report.md @@ -0,0 +1,18 @@ +## API Report File for "@backstage/plugin-events-backend-module-bitbucket-server" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { EventParams } from '@backstage/plugin-events-node'; +import { EventsService } from '@backstage/plugin-events-node'; +import { SubTopicEventRouter } from '@backstage/plugin-events-node'; + +// @public +export class BitbucketServerEventRouter extends SubTopicEventRouter { + constructor(options: { events: EventsService }); + // (undocumented) + protected determineSubTopic(params: EventParams): string | undefined; + // (undocumented) + protected getSubscriberId(): string; +} +``` diff --git a/plugins/events-backend-module-bitbucket-server/catalog-info.yaml b/plugins/events-backend-module-bitbucket-server/catalog-info.yaml new file mode 100644 index 0000000000..d2a04ca2a8 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/catalog-info.yaml @@ -0,0 +1,9 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: backstage-plugin-events-backend-module-bitbucket-server + title: '@backstage/plugin-events-backend-module-bitbucket-server' +spec: + lifecycle: experimental + type: backstage-backend-plugin-module + owner: maintainers diff --git a/plugins/events-backend-module-bitbucket-server/package.json b/plugins/events-backend-module-bitbucket-server/package.json new file mode 100644 index 0000000000..025f559b44 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/package.json @@ -0,0 +1,55 @@ +{ + "name": "@backstage/plugin-events-backend-module-bitbucket-server", + "version": "0.1.0", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "publishConfig": { + "access": "public" + }, + "exports": { + ".": "./src/index.ts", + "./alpha": "./src/alpha.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "alpha": [ + "src/alpha.ts" + ], + "package.json": [ + "package.json" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "plugins/events-backend-module-bitbucket-server" + }, + "backstage": { + "role": "backend-plugin-module" + }, + "scripts": { + "start": "backstage-cli package start", + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "clean": "backstage-cli package clean", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack" + }, + "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", + "@backstage/plugin-events-node": "workspace:^" + }, + "devDependencies": { + "@backstage/backend-test-utils": "workspace:^", + "@backstage/cli": "workspace:^", + "@backstage/plugin-events-backend-test-utils": "workspace:^", + "supertest": "^6.1.3" + }, + "files": [ + "dist" + ] +} diff --git a/plugins/events-backend-module-bitbucket-server/src/alpha.ts b/plugins/events-backend-module-bitbucket-server/src/alpha.ts new file mode 100644 index 0000000000..c741a37f24 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/alpha.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { eventsModuleBitbucketServerEventRouter } from './service/eventsModuleBitbucketServerEventRouter'; +export { eventsModuleBitbucketServerEventRouter as default } from './service/eventsModuleBitbucketServerEventRouter'; diff --git a/plugins/events-backend-module-bitbucket-server/src/index.ts b/plugins/events-backend-module-bitbucket-server/src/index.ts new file mode 100644 index 0000000000..78c97808a4 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/index.ts @@ -0,0 +1,24 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The module "bitbucket-server" for the Backstage backend plugin "events-backend" + * adding an event router for Bitbucket Server. + * + * @packageDocumentation + */ + +export { BitbucketServerEventRouter } from './router/BitbucketServerEventRouter'; diff --git a/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.test.ts b/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.test.ts new file mode 100644 index 0000000000..6fdb4020f3 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.test.ts @@ -0,0 +1,53 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TestEventsService } from '@backstage/plugin-events-backend-test-utils'; +import { BitbucketServerEventRouter } from './BitbucketServerEventRouter'; + +describe('BitbucketServerEventRouter', () => { + const events = new TestEventsService(); + const eventRouter = new BitbucketServerEventRouter({ events }); + const topic = 'bitbucketServer'; + const eventPayload = { test: 'payload' }; + const metadata = { 'x-event-key': 'test:type' }; + + beforeEach(() => { + events.reset(); + }); + + it('subscribed to topic', () => { + eventRouter.subscribe(); + + expect(events.subscribed).toHaveLength(1); + expect(events.subscribed[0].id).toEqual('BitbucketServerEventRouter'); + expect(events.subscribed[0].topics).toEqual([topic]); + }); + + it('no x-event-key', () => { + eventRouter.onEvent({ topic, eventPayload }); + + expect(events.published).toEqual([]); + }); + + it('with x-event-key', () => { + eventRouter.onEvent({ topic, eventPayload, metadata }); + + expect(events.published.length).toBe(1); + expect(events.published[0].topic).toEqual('bitbucketServer.test:type'); + expect(events.published[0].eventPayload).toEqual(eventPayload); + expect(events.published[0].metadata).toEqual(metadata); + }); +}); diff --git a/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.ts b/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.ts new file mode 100644 index 0000000000..45031cc5f3 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/router/BitbucketServerEventRouter.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + EventParams, + EventsService, + SubTopicEventRouter, +} from '@backstage/plugin-events-node'; + +/** + * Subscribes to the generic `bitbucketServer` topic + * and publishes the events under the more concrete sub-topic + * depending on the `x-event-key` provided. + * + * @public + */ +export class BitbucketServerEventRouter extends SubTopicEventRouter { + constructor(options: { events: EventsService }) { + super({ + events: options.events, + topic: 'bitbucketServer', + }); + } + + protected getSubscriberId(): string { + return 'BitbucketServerEventRouter'; + } + + protected determineSubTopic(params: EventParams): string | undefined { + return params.metadata?.['x-event-key'] as string | undefined; + } +} diff --git a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts new file mode 100644 index 0000000000..60fc67eb4f --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createBackendModule } from '@backstage/backend-plugin-api'; +import { eventsServiceRef } from '@backstage/plugin-events-node'; +import { BitbucketServerEventRouter } from '../router/BitbucketServerEventRouter'; + +/** + * Module for the events-backend plugin, adding an event router for Bitbucket Server. + * + * Registers the `BitbucketServerEventRouter`. + * + * @alpha + */ +export const eventsModuleBitbucketServerEventRouter = createBackendModule({ + pluginId: 'events', + moduleId: 'bitbucket-server-event-router', + register(env) { + env.registerInit({ + deps: { + events: eventsServiceRef, + }, + async init({ events }) { + const eventRouter = new BitbucketServerEventRouter({ + events, + }); + await eventRouter.subscribe(); + }, + }); + }, +}); diff --git a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts new file mode 100644 index 0000000000..56e158b8ab --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createServiceFactory } from '@backstage/backend-plugin-api'; +import { startTestBackend } from '@backstage/backend-test-utils'; +import { TestEventsService } from '@backstage/plugin-events-backend-test-utils'; +import { eventsServiceRef } from '@backstage/plugin-events-node'; +import { eventsModuleBitbucketServerEventRouter } from './eventsModuleBitbucketServerEventRouter'; + +describe('eventsModuleBitbucketServerEventRouter', () => { + it('should be correctly wired and set up', async () => { + const events = new TestEventsService(); + const eventsServiceFactory = createServiceFactory({ + service: eventsServiceRef, + deps: {}, + async factory({}) { + return events; + }, + }); + + await startTestBackend({ + features: [ + eventsServiceFactory(), + eventsModuleBitbucketServerEventRouter(), + ], + }); + + expect(events.subscribed).toHaveLength(1); + expect(events.subscribed[0].id).toEqual('BitbucketServerEventRouter'); + }); +}); diff --git a/plugins/events-backend-module-bitbucket-server/src/setupTests.ts b/plugins/events-backend-module-bitbucket-server/src/setupTests.ts new file mode 100644 index 0000000000..d3232290a7 --- /dev/null +++ b/plugins/events-backend-module-bitbucket-server/src/setupTests.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {}; diff --git a/yarn.lock b/yarn.lock index b337860101..42754c71b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5739,11 +5739,13 @@ __metadata: dependencies: "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" + "@backstage/catalog-client": "workspace:^" "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" "@backstage/integration": "workspace:^" + "@backstage/plugin-catalog-common": "workspace:^" "@backstage/plugin-catalog-node": "workspace:^" luxon: ^3.0.0 msw: ^1.0.0 @@ -6557,6 +6559,19 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-events-backend-module-bitbucket-server@workspace:plugins/events-backend-module-bitbucket-server": + version: 0.0.0-use.local + resolution: "@backstage/plugin-events-backend-module-bitbucket-server@workspace:plugins/events-backend-module-bitbucket-server" + dependencies: + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-test-utils": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/plugin-events-backend-test-utils": "workspace:^" + "@backstage/plugin-events-node": "workspace:^" + supertest: ^6.1.3 + languageName: unknown + linkType: soft + "@backstage/plugin-events-backend-module-gerrit@workspace:plugins/events-backend-module-gerrit": version: 0.0.0-use.local resolution: "@backstage/plugin-events-backend-module-gerrit@workspace:plugins/events-backend-module-gerrit" From 02e6dd48e9a37e2b77bacd76c5499f6c543513b8 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Wed, 19 Jun 2024 00:47:06 -0400 Subject: [PATCH 014/119] Fixed catalog backend tests and move backend-common to dependencies Signed-off-by: David Lilienfeld --- .../package.json | 2 +- ...oduleBitbucketServerEntityProvider.test.ts | 47 +++++++++---------- .../BitbucketServerEntityProvider.ts | 4 +- .../api-report-alpha.md | 4 +- .../package.json | 44 ++++++++--------- yarn.lock | 26 +++++++++- 6 files changed, 76 insertions(+), 51 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index a7c403b534..d31a3fc87d 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -50,6 +50,7 @@ "test": "backstage-cli package test" }, "dependencies": { + "@backstage/backend-common": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/backend-tasks": "workspace:^", "@backstage/catalog-client": "workspace:^", @@ -66,7 +67,6 @@ "uuid": "^11.0.0" }, "devDependencies": { - "@backstage/backend-common": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/plugin-events-backend-test-utils": "workspace:^", diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts index 27420e9300..e389f430d7 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts @@ -22,7 +22,6 @@ import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; import { TestEventsService } from '@backstage/plugin-events-backend-test-utils'; import { eventsServiceRef } from '@backstage/plugin-events-node'; -import { Duration } from 'luxon'; import { catalogModuleBitbucketServerEntityProvider } from './catalogModuleBitbucketServerEntityProvider'; import { BitbucketServerEntityProvider } from '../providers/BitbucketServerEntityProvider'; @@ -53,35 +52,35 @@ describe('catalogModuleBitbucketServerEntityProvider', () => { }, }); - const config = { - catalog: { - providers: { - bitbucketServer: { - host: 'bitbucket.mycompany.com', - schedule: { - frequency: 'P1M', - timeout: 'PT3M', - }, - }, - }, - }, - integrations: { - bitbucketServer: [ - { - host: 'bitbucket.mycompany.com', - }, - ], - }, - }; - await startTestBackend({ extensionPoints: [ [catalogProcessingExtensionPoint, catalogExtensionPointImpl], ], features: [ + eventsServiceFactory(), catalogModuleBitbucketServerEntityProvider, - mockServices.rootConfig.factory({ data: config }), - mockServices.logger.factory(), + mockServices.rootConfig.factory({ + data: { + catalog: { + providers: { + bitbucketServer: { + host: 'bitbucket.mycompany.com', + schedule: { + frequency: 'P1M', + timeout: 'PT3M', + }, + }, + }, + }, + integrations: { + bitbucketServer: [ + { + host: 'bitbucket.mycompany.com', + }, + ], + }, + }, + }), scheduler.factory, ], }); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index 4afc02b8b5..bf4c895121 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -77,8 +77,8 @@ export class BitbucketServerEntityProvider implements EntityProvider { logger: LoggerService; events?: EventsService; parser?: BitbucketServerLocationParser; - schedule?: TaskRunner; - scheduler?: PluginTaskScheduler; + schedule?: SchedulerServiceTaskRunner; + scheduler?: SchedulerService; catalogApi?: CatalogApi; tokenManager?: TokenManager; }, diff --git a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md index 62fb3e2a6b..2eb8fc6075 100644 --- a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md +++ b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleBitbucketServerEventRouter: () => BackendFeature; +const eventsModuleBitbucketServerEventRouter: BackendFeatureCompat; export default eventsModuleBitbucketServerEventRouter; export { eventsModuleBitbucketServerEventRouter }; diff --git a/plugins/events-backend-module-bitbucket-server/package.json b/plugins/events-backend-module-bitbucket-server/package.json index 025f559b44..4f38cb1f05 100644 --- a/plugins/events-backend-module-bitbucket-server/package.json +++ b/plugins/events-backend-module-bitbucket-server/package.json @@ -1,17 +1,28 @@ { "name": "@backstage/plugin-events-backend-module-bitbucket-server", "version": "0.1.0", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "backstage": { + "role": "backend-plugin-module", + "pluginId": "events", + "pluginPackage": "@backstage/plugin-events-backend" + }, "publishConfig": { "access": "public" }, + "homepage": "https://backstage.io", + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "plugins/events-backend-module-bitbucket-server" + }, + "license": "Apache-2.0", "exports": { ".": "./src/index.ts", "./alpha": "./src/alpha.ts", "./package.json": "./package.json" }, + "main": "src/index.ts", + "types": "src/index.ts", "typesVersions": { "*": { "alpha": [ @@ -22,22 +33,17 @@ ] } }, - "repository": { - "type": "git", - "url": "https://github.com/backstage/backstage", - "directory": "plugins/events-backend-module-bitbucket-server" - }, - "backstage": { - "role": "backend-plugin-module" - }, + "files": [ + "dist" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", - "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "clean": "backstage-cli package clean", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-plugin-api": "workspace:^", @@ -46,10 +52,6 @@ "devDependencies": { "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", - "@backstage/plugin-events-backend-test-utils": "workspace:^", - "supertest": "^6.1.3" - }, - "files": [ - "dist" - ] + "@backstage/plugin-events-backend-test-utils": "workspace:^" + } } diff --git a/yarn.lock b/yarn.lock index 42754c71b9..dd86d50acc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3794,6 +3794,29 @@ __metadata: languageName: unknown linkType: soft +"@backstage/backend-tasks@workspace:^, @backstage/backend-tasks@workspace:packages/backend-tasks": + version: 0.0.0-use.local + resolution: "@backstage/backend-tasks@workspace:packages/backend-tasks" + dependencies: + "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-test-utils": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/config": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/types": "workspace:^" + "@opentelemetry/api": ^1.3.0 + "@types/luxon": ^3.0.0 + cron: ^3.0.0 + knex: ^3.0.0 + lodash: ^4.17.21 + luxon: ^3.0.0 + uuid: ^9.0.0 + wait-for-expect: ^3.0.2 + zod: ^3.22.4 + languageName: unknown + linkType: soft + "@backstage/backend-test-utils@workspace:^, @backstage/backend-test-utils@workspace:packages/backend-test-utils": version: 0.0.0-use.local resolution: "@backstage/backend-test-utils@workspace:packages/backend-test-utils" @@ -5737,7 +5760,9 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-bitbucket-server@workspace:plugins/catalog-backend-module-bitbucket-server" dependencies: + "@backstage/backend-common": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-client": "workspace:^" "@backstage/catalog-model": "workspace:^" @@ -6568,7 +6593,6 @@ __metadata: "@backstage/cli": "workspace:^" "@backstage/plugin-events-backend-test-utils": "workspace:^" "@backstage/plugin-events-node": "workspace:^" - supertest: ^6.1.3 languageName: unknown linkType: soft From 9463dfeda0d248de8837c5b17e251f911e6bf913 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Tue, 20 Aug 2024 23:55:13 -0400 Subject: [PATCH 015/119] Fix unused imports and api report Signed-off-by: David Lilienfeld --- .../catalog-backend-module-bitbucket-server/report.api.md | 5 ++--- .../catalogModuleBitbucketServerEntityProvider.test.ts | 1 - .../src/providers/BitbucketServerEntityProvider.ts | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index c72733806b..040626a83d 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -15,7 +15,6 @@ import { LocationSpec } from '@backstage/plugin-catalog-common'; import { LoggerService } from '@backstage/backend-plugin-api'; import { SchedulerService } from '@backstage/backend-plugin-api'; import { SchedulerServiceTaskRunner } from '@backstage/backend-plugin-api'; -import { TaskRunner } from '@backstage/backend-tasks'; import { TokenManager } from '@backstage/backend-common'; // @public @@ -76,8 +75,8 @@ export class BitbucketServerEntityProvider implements EntityProvider { logger: LoggerService; events?: EventsService; parser?: BitbucketServerLocationParser; - schedule?: TaskRunner; - scheduler?: PluginTaskScheduler; + schedule?: SchedulerServiceTaskRunner; + scheduler?: SchedulerService; catalogApi?: CatalogApi; tokenManager?: TokenManager; }, diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts index e389f430d7..4ae6ff3aae 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts @@ -17,7 +17,6 @@ import { SchedulerServiceTaskScheduleDefinition } from '@backstage/backend-plugin-api'; import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; import { createServiceFactory } from '@backstage/backend-plugin-api'; -import { TaskScheduleDefinition } from '@backstage/backend-tasks'; import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; import { TestEventsService } from '@backstage/plugin-events-backend-test-utils'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index bf4c895121..aa7c3d5863 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { PluginTaskScheduler, TaskRunner } from '@backstage/backend-tasks'; import { Entity, LocationEntity } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import { InputError } from '@backstage/errors'; From 71c0954ab417cd91cd1ab5e811410c7ddc28c75a Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Mon, 26 Aug 2024 14:04:46 -0400 Subject: [PATCH 016/119] Remove tokenmanager from module Signed-off-by: David Lilienfeld --- ...atalogModuleBitbucketServerEntityProvider.test.ts | 2 +- .../catalogModuleBitbucketServerEntityProvider.ts | 12 +----------- .../api-report-alpha.md | 4 ++-- .../eventsModuleBitbucketServerRouter.test.ts | 5 +---- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts index 4ae6ff3aae..f9345170ed 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts @@ -56,7 +56,7 @@ describe('catalogModuleBitbucketServerEntityProvider', () => { [catalogProcessingExtensionPoint, catalogExtensionPointImpl], ], features: [ - eventsServiceFactory(), + eventsServiceFactory, catalogModuleBitbucketServerEntityProvider, mockServices.rootConfig.factory({ data: { diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts index 615bbb3477..a829428296 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts @@ -40,23 +40,13 @@ export const catalogModuleBitbucketServerEntityProvider = createBackendModule({ events: eventsServiceRef, logger: coreServices.logger, scheduler: coreServices.scheduler, - tokenManager: coreServices.tokenManager, }, - async init({ - catalog, - catalogApi, - config, - events, - logger, - scheduler, - tokenManager, - }) { + async init({ catalog, catalogApi, config, events, logger, scheduler }) { const providers = BitbucketServerEntityProvider.fromConfig(config, { catalogApi, events, logger, scheduler, - tokenManager, }); catalog.addEntityProvider(providers); diff --git a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md index 2eb8fc6075..3c4ce45a1f 100644 --- a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md +++ b/plugins/events-backend-module-bitbucket-server/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; +import { BackendFeature } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleBitbucketServerEventRouter: BackendFeatureCompat; +const eventsModuleBitbucketServerEventRouter: BackendFeature; export default eventsModuleBitbucketServerEventRouter; export { eventsModuleBitbucketServerEventRouter }; diff --git a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts index 56e158b8ab..a66c000089 100644 --- a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts +++ b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerRouter.test.ts @@ -32,10 +32,7 @@ describe('eventsModuleBitbucketServerEventRouter', () => { }); await startTestBackend({ - features: [ - eventsServiceFactory(), - eventsModuleBitbucketServerEventRouter(), - ], + features: [eventsServiceFactory, eventsModuleBitbucketServerEventRouter], }); expect(events.subscribed).toHaveLength(1); From cf3bb62037595f5e7dfc5270953083f24a96dbc5 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Thu, 29 Aug 2024 10:56:12 -0400 Subject: [PATCH 017/119] Remove deprecated package and fix yarn file Signed-off-by: David Lilienfeld --- .../package.json | 1 - yarn.lock | 24 ------------------- 2 files changed, 25 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index d31a3fc87d..922d6aea43 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -52,7 +52,6 @@ "dependencies": { "@backstage/backend-common": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", - "@backstage/backend-tasks": "workspace:^", "@backstage/catalog-client": "workspace:^", "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", diff --git a/yarn.lock b/yarn.lock index dd86d50acc..b3a662a179 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3794,29 +3794,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/backend-tasks@workspace:^, @backstage/backend-tasks@workspace:packages/backend-tasks": - version: 0.0.0-use.local - resolution: "@backstage/backend-tasks@workspace:packages/backend-tasks" - dependencies: - "@backstage/backend-common": "workspace:^" - "@backstage/backend-plugin-api": "workspace:^" - "@backstage/backend-test-utils": "workspace:^" - "@backstage/cli": "workspace:^" - "@backstage/config": "workspace:^" - "@backstage/errors": "workspace:^" - "@backstage/types": "workspace:^" - "@opentelemetry/api": ^1.3.0 - "@types/luxon": ^3.0.0 - cron: ^3.0.0 - knex: ^3.0.0 - lodash: ^4.17.21 - luxon: ^3.0.0 - uuid: ^9.0.0 - wait-for-expect: ^3.0.2 - zod: ^3.22.4 - languageName: unknown - linkType: soft - "@backstage/backend-test-utils@workspace:^, @backstage/backend-test-utils@workspace:packages/backend-test-utils": version: 0.0.0-use.local resolution: "@backstage/backend-test-utils@workspace:packages/backend-test-utils" @@ -5762,7 +5739,6 @@ __metadata: dependencies: "@backstage/backend-common": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" - "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-client": "workspace:^" "@backstage/catalog-model": "workspace:^" From cb417ca1113b5097ab83a8cbca40ca07d0400298 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sat, 9 Nov 2024 22:25:34 -0500 Subject: [PATCH 018/119] Fixed all catalog update tests Signed-off-by: David Lilienfeld --- .../package.json | 1 - .../report.api.md | 12 ++++++-- .../src/lib/types.ts | 4 --- ...alogModuleBitbucketServerEntityProvider.ts | 12 +++++++- .../BitbucketServerEntityProvider.test.ts | 30 ++++++++++++------- .../BitbucketServerEntityProvider.ts | 23 +++++++------- ...pi-report-alpha.md => report-alpha.api.md} | 2 +- .../{api-report.md => report.api.md} | 11 +++++++ .../src/index.ts | 2 ++ .../eventsModuleBitbucketServerEventRouter.ts | 2 +- yarn.lock | 1 - 11 files changed, 69 insertions(+), 31 deletions(-) rename plugins/events-backend-module-bitbucket-server/{api-report-alpha.md => report-alpha.api.md} (97%) rename plugins/events-backend-module-bitbucket-server/{api-report.md => report.api.md} (55%) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 922d6aea43..0d5ba5611e 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -50,7 +50,6 @@ "test": "backstage-cli package test" }, "dependencies": { - "@backstage/backend-common": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/catalog-client": "workspace:^", "@backstage/catalog-model": "workspace:^", diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index 040626a83d..94a0fed689 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -4,6 +4,7 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; +import { AuthService } from '@backstage/backend-plugin-api'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; import { CatalogApi } from '@backstage/catalog-client'; import { Config } from '@backstage/config'; @@ -15,7 +16,6 @@ import { LocationSpec } from '@backstage/plugin-catalog-common'; import { LoggerService } from '@backstage/backend-plugin-api'; import { SchedulerService } from '@backstage/backend-plugin-api'; import { SchedulerServiceTaskRunner } from '@backstage/backend-plugin-api'; -import { TokenManager } from '@backstage/backend-common'; // @public export class BitbucketServerClient { @@ -55,6 +55,8 @@ export class BitbucketServerClient { }; } +// Warning: (ae-missing-release-tag) "BitbucketServerDefaultBranch" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BitbucketServerDefaultBranch = { id: string; @@ -78,7 +80,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { schedule?: SchedulerServiceTaskRunner; scheduler?: SchedulerService; catalogApi?: CatalogApi; - tokenManager?: TokenManager; + auth?: AuthService; }, ): BitbucketServerEntityProvider[]; getProviderName(): string; @@ -86,6 +88,8 @@ export class BitbucketServerEntityProvider implements EntityProvider { refresh(logger: LoggerService): Promise; } +// Warning: (ae-missing-release-tag) "BitbucketServerEvents" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export namespace BitbucketServerEvents { // (undocumented) @@ -156,11 +160,15 @@ export type BitbucketServerPagedResponse = { nextPageStart: number; }; +// Warning: (ae-missing-release-tag) "BitbucketServerProject" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BitbucketServerProject = { key: string; }; +// Warning: (ae-missing-release-tag) "BitbucketServerRepository" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BitbucketServerRepository = { project: { diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts index e014528791..51e014fb97 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -/** @public */ type BitbucketServerRepository = { project: { key: string; @@ -31,12 +30,10 @@ type BitbucketServerRepository = { defaultBranch: string; }; -/** @public */ type BitbucketServerProject = { key: string; }; -/** @public */ type BitbucketServerDefaultBranch = { id: string; displayId: string; @@ -46,7 +43,6 @@ type BitbucketServerDefaultBranch = { isDefault: boolean; }; -/** @public */ namespace BitbucketServerEvents { interface Event { eventKey: string; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts index a829428296..2d68b6ef49 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts @@ -40,13 +40,23 @@ export const catalogModuleBitbucketServerEntityProvider = createBackendModule({ events: eventsServiceRef, logger: coreServices.logger, scheduler: coreServices.scheduler, + auth: coreServices.auth, }, - async init({ catalog, catalogApi, config, events, logger, scheduler }) { + async init({ + catalog, + catalogApi, + config, + events, + logger, + scheduler, + auth, + }) { const providers = BitbucketServerEntityProvider.fromConfig(config, { catalogApi, events, logger, scheduler, + auth, }); catalog.addEntityProvider(providers); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts index dd2735177b..81699550bd 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { TokenManager } from '@backstage/backend-common'; import { SchedulerService, SchedulerServiceTaskRunner, SchedulerServiceTaskInvocationDefinition, + AuthService, } from '@backstage/backend-plugin-api'; import { mockServices, @@ -69,6 +69,8 @@ function pagedResponse(values: any): BitbucketServerPagedResponse { const logger = mockServices.logger.mock(); +const authService = mockServices.auth.mock(); + const events = DefaultEventsService.create({ logger }); const server = setupServer(); @@ -161,11 +163,11 @@ function setupRepositoryReqHandler(defaultBranch: string) { ); } -const tokenManager = { - getToken: async () => { - return { token: 'fake-token' }; - }, -} as any as TokenManager; +// const authService = { +// getPluginRequestToken: async ({onBehalfOf, targetPluginId}) => { +// return { token: 'fake-token' }; +// }, +// } as any as AuthService; const repoPushEvent: BitbucketServerEvents.RefsChangedEvent = { eventKey: 'repo:refs_changed', date: '2017-09-19T09:45:32+1000', @@ -769,6 +771,10 @@ describe('BitbucketServerEntityProvider', () => { setupRepositoryReqHandler('master'); + authService.getPluginRequestToken.mockResolvedValue({ + token: 'fake-token', + }); + const config = new ConfigReader({ integrations: { bitbucketServer: [ @@ -809,12 +815,13 @@ describe('BitbucketServerEntityProvider', () => { }; }, }; + const provider = BitbucketServerEntityProvider.fromConfig(config, { catalogApi: catalogApi as any as CatalogApi, logger, schedule, events, - tokenManager, + auth: authService as any as AuthService, })[0]; await provider.connect(entityProviderConnection); @@ -885,7 +892,7 @@ describe('BitbucketServerEntityProvider', () => { logger, schedule, events, - tokenManager, + auth: authService as any as AuthService, })[0]; await provider.connect(entityProviderConnection); @@ -898,6 +905,9 @@ describe('BitbucketServerEntityProvider', () => { it('add onRepoPush', async () => { const schedule = new PersistingTaskRunner(); setupRepositoryReqHandler('master'); + authService.getPluginRequestToken.mockResolvedValue({ + token: 'fake-token', + }); const addedModule = createLocationEntity( test1RepoUrl, `/added-module:${targetPath}`, @@ -945,7 +955,7 @@ describe('BitbucketServerEntityProvider', () => { logger, schedule, events, - tokenManager, + auth: authService as any as AuthService, })[0]; await provider.connect(entityProviderConnection); @@ -1015,7 +1025,7 @@ describe('BitbucketServerEntityProvider', () => { logger, schedule, events, - tokenManager, + auth: authService as any as AuthService, })[0]; await provider.connect(entityProviderConnection); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index aa7c3d5863..85878468cc 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -37,6 +37,7 @@ import { defaultBitbucketServerLocationParser, } from './BitbucketServerLocationParser'; import { + AuthService, LoggerService, SchedulerService, SchedulerServiceTaskRunner, @@ -44,7 +45,6 @@ import { import { BitbucketServerEvents } from '../lib'; import { EventsService } from '@backstage/plugin-events-node'; import { CatalogApi } from '@backstage/catalog-client'; -import { TokenManager } from '@backstage/backend-common'; const TOPIC_REPO_REFS_CHANGED = 'bitbucketServer.repo:refs_changed'; @@ -65,7 +65,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { private connection?: EntityProviderConnection; private readonly catalogApi?: CatalogApi; private readonly events?: EventsService; - private readonly tokenManager?: TokenManager; + private readonly auth?: AuthService; private eventConfigErrorThrown = false; private readonly targetAnnotation: string; private readonly defaultBranchAnnotation: string; @@ -79,7 +79,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { schedule?: SchedulerServiceTaskRunner; scheduler?: SchedulerService; catalogApi?: CatalogApi; - tokenManager?: TokenManager; + auth?: AuthService; }, ): BitbucketServerEntityProvider[] { const integrations = ScmIntegrations.fromConfig(config); @@ -116,7 +116,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { options.parser, options.catalogApi, options.events, - options.tokenManager, + options.auth, ); }); } @@ -129,7 +129,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { parser?: BitbucketServerLocationParser, catalogApi?: CatalogApi, events?: EventsService, - tokenManager?: TokenManager, + auth?: AuthService, ) { this.integration = integration; this.config = config; @@ -139,7 +139,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { }); this.scheduleFn = this.createScheduleFn(taskRunner); this.catalogApi = catalogApi; - this.tokenManager = tokenManager; + this.auth = auth; this.targetAnnotation = `${this.config.host.split(':')[0]}/repo-url`; this.defaultBranchAnnotation = 'bitbucket.org/default-branch'; this.events = events; @@ -301,8 +301,8 @@ export class BitbucketServerEntityProvider implements EntityProvider { if ( this.catalogApi !== undefined && this.catalogApi !== null && - this.tokenManager !== undefined && - this.tokenManager !== null + this.auth !== undefined && + this.auth !== null ) { return true; } @@ -451,7 +451,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { ): Promise { if (!this.canHandleEvents()) { this.logger.error( - 'Bitbucket Server catalog entity provider is not set up to handle events. Missing tokenManager or catalogApi.', + 'Bitbucket Server catalog entity provider is not set up to handle events. Missing authService or catalogApi.', ); return; } @@ -468,7 +468,10 @@ export class BitbucketServerEntityProvider implements EntityProvider { this.logger.error('Failed to create location entity.'); return; } - const { token } = await this.tokenManager!.getToken(); + const { token } = await this.auth!.getPluginRequestToken({ + onBehalfOf: await this.auth!.getOwnServiceCredentials(), + targetPluginId: 'catalog', // e.g. 'catalog' + }); const existing = await this.findExistingLocations(catalogRepoUrl, token); const stillExisting: LocationEntity[] = []; const removed: DeferredEntity[] = []; diff --git a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md b/plugins/events-backend-module-bitbucket-server/report-alpha.api.md similarity index 97% rename from plugins/events-backend-module-bitbucket-server/api-report-alpha.md rename to plugins/events-backend-module-bitbucket-server/report-alpha.api.md index 3c4ce45a1f..61559711f3 100644 --- a/plugins/events-backend-module-bitbucket-server/api-report-alpha.md +++ b/plugins/events-backend-module-bitbucket-server/report-alpha.api.md @@ -5,7 +5,7 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; -// @alpha +// @public const eventsModuleBitbucketServerEventRouter: BackendFeature; export default eventsModuleBitbucketServerEventRouter; export { eventsModuleBitbucketServerEventRouter }; diff --git a/plugins/events-backend-module-bitbucket-server/api-report.md b/plugins/events-backend-module-bitbucket-server/report.api.md similarity index 55% rename from plugins/events-backend-module-bitbucket-server/api-report.md rename to plugins/events-backend-module-bitbucket-server/report.api.md index 18292a0d11..aaf7b22293 100644 --- a/plugins/events-backend-module-bitbucket-server/api-report.md +++ b/plugins/events-backend-module-bitbucket-server/report.api.md @@ -3,6 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; import { EventParams } from '@backstage/plugin-events-node'; import { EventsService } from '@backstage/plugin-events-node'; import { SubTopicEventRouter } from '@backstage/plugin-events-node'; @@ -15,4 +16,14 @@ export class BitbucketServerEventRouter extends SubTopicEventRouter { // (undocumented) protected getSubscriberId(): string; } + +// @public +const eventsModuleBitbucketServerEventRouter: BackendFeature; +export default eventsModuleBitbucketServerEventRouter; +export { eventsModuleBitbucketServerEventRouter }; + +// Warnings were encountered during analysis: +// +// src/router/BitbucketServerEventRouter.d.ts:13:5 - (ae-undocumented) Missing documentation for "getSubscriberId". +// src/router/BitbucketServerEventRouter.d.ts:14:5 - (ae-undocumented) Missing documentation for "determineSubTopic". ``` diff --git a/plugins/events-backend-module-bitbucket-server/src/index.ts b/plugins/events-backend-module-bitbucket-server/src/index.ts index 78c97808a4..afa3e204d2 100644 --- a/plugins/events-backend-module-bitbucket-server/src/index.ts +++ b/plugins/events-backend-module-bitbucket-server/src/index.ts @@ -22,3 +22,5 @@ */ export { BitbucketServerEventRouter } from './router/BitbucketServerEventRouter'; +export { eventsModuleBitbucketServerEventRouter } from './service/eventsModuleBitbucketServerEventRouter'; +export { eventsModuleBitbucketServerEventRouter as default } from './service/eventsModuleBitbucketServerEventRouter'; diff --git a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts index 60fc67eb4f..2a8a26358b 100644 --- a/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts +++ b/plugins/events-backend-module-bitbucket-server/src/service/eventsModuleBitbucketServerEventRouter.ts @@ -23,7 +23,7 @@ import { BitbucketServerEventRouter } from '../router/BitbucketServerEventRouter * * Registers the `BitbucketServerEventRouter`. * - * @alpha + * @public */ export const eventsModuleBitbucketServerEventRouter = createBackendModule({ pluginId: 'events', diff --git a/yarn.lock b/yarn.lock index b3a662a179..baddc683e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5737,7 +5737,6 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-bitbucket-server@workspace:plugins/catalog-backend-module-bitbucket-server" dependencies: - "@backstage/backend-common": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-client": "workspace:^" From 6d489aaac5eb6dfb783c49020c2aa46c4ae050b9 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 10 Nov 2024 20:27:30 -0500 Subject: [PATCH 019/119] Remove documentation temporarily Signed-off-by: David Lilienfeld --- .../report.api.md | 17 +-- .../src/lib/types.ts | 4 + .../BitbucketServerEntityProvider.ts | 125 ------------------ 3 files changed, 13 insertions(+), 133 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index 94a0fed689..abf7c913c8 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -5,6 +5,7 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; import { AuthService } from '@backstage/backend-plugin-api'; +import { BackendFeature } from '@backstage/backend-plugin-api'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; import { CatalogApi } from '@backstage/catalog-client'; import { Config } from '@backstage/config'; @@ -55,8 +56,6 @@ export class BitbucketServerClient { }; } -// Warning: (ae-missing-release-tag) "BitbucketServerDefaultBranch" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BitbucketServerDefaultBranch = { id: string; @@ -88,8 +87,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { refresh(logger: LoggerService): Promise; } -// Warning: (ae-missing-release-tag) "BitbucketServerEvents" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export namespace BitbucketServerEvents { // (undocumented) @@ -160,15 +157,11 @@ export type BitbucketServerPagedResponse = { nextPageStart: number; }; -// Warning: (ae-missing-release-tag) "BitbucketServerProject" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BitbucketServerProject = { key: string; }; -// Warning: (ae-missing-release-tag) "BitbucketServerRepository" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BitbucketServerRepository = { project: { @@ -189,4 +182,12 @@ export type BitbucketServerRepository = { // @public (undocumented) const catalogModuleBitbucketServerEntityProvider: BackendFeature; export default catalogModuleBitbucketServerEntityProvider; + +// @public (undocumented) +export function paginated( + request: ( + options: BitbucketServerListOptions, + ) => Promise>, + options?: BitbucketServerListOptions, +): AsyncGenerator; ``` diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts index 51e014fb97..e014528791 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ type BitbucketServerRepository = { project: { key: string; @@ -30,10 +31,12 @@ type BitbucketServerRepository = { defaultBranch: string; }; +/** @public */ type BitbucketServerProject = { key: string; }; +/** @public */ type BitbucketServerDefaultBranch = { id: string; displayId: string; @@ -43,6 +46,7 @@ type BitbucketServerDefaultBranch = { isDefault: boolean; }; +/** @public */ namespace BitbucketServerEvents { interface Event { eventKey: string; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index 85878468cc..c6df6a19b4 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -282,10 +282,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { return result; } - /** - * Checks if the webhook was triggered on a commit to the head branch of a repository - * @param event Bitbucket Server webhook repo:refs_changed event - */ private isDefaultBranchPush( defaultBranch: String, event: BitbucketServerEvents.RefsChangedEvent, @@ -317,78 +313,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { return false; } - /** - * Creates a Bitbucket Server location entity for the repository that is referenced in the push event passed in. - * - * @param event A Bitbucket Server push event with repository information. - * - * @returns An array of location entities for the repository. - * - * @example - * - * const RefsChangedEvent = { - * "eventKey": "repo:refs_changed", - * "date": "2022-01-01T00:00:00Z", - * "actor": { - * "name": "johndoe", - * "emailAddress": "johndoe@example.com", - * "id": 123, - * "displayName": "John Doe", - * "active": true, - * "slug": "johndoe", - * "type": "NORMAL" - * }, - * "repository": { - * "slug": "my-repo", - * "id": 123, - * "name": "My Repository", - * "project": { - * "key": "my-project", - * "id": 456, - * "name": "My Project", - * "description": "My project description", - * "public": true, - * "type": "NORMAL" - * } - * }, - * "changes": [ - * { - * "ref": { - * "id": "refs/heads/master", - * "displayId": "master", - * "type": "BRANCH" - * }, - * "refId": "refs/heads/master", - * "fromHash": "0123456789abcdef0123456789abcdef0123456", - * "toHash": "fedcba9876543210fedcba9876543210fedcba9", - * "type": "UPDATE" - * } - * ] - * }; - * - * const locationEntities = await getLocationEntity(RefsChangedEvent); - * - * // locationEntities: - * // [ - * // { - * // kind: 'Location', - * // metadata: { - * // name: 'my-repo', - * // namespace: 'my-project', - * // annotations: { - * // 'backstage.io/managed-by-location': 'url/catalog-info-path', - * // 'backstage.io/managed-by-origin-location': 'url/catalog-info-path', - * // 'host/repo-url': 'url', - * // }, - * // }, - * // spec: { - * // type: 'bitbucket', - * // target: 'url/catalog-info-path', - * // presence: 'optional', - * // }, - * // }, - * // ] - */ private async getLocationEntity( event: BitbucketServerEvents.RefsChangedEvent, ): Promise { @@ -441,11 +365,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { return result; } - /** - * Finds if there are existing location entities for the repository that was pushed. If there are, it simply refreshes those entities, - * if not, it discovers any entity that was added and removed in the list of entities - * @param event - A Bitbucket Server webhook event for repo:refs_change - */ private async onRepoPush( event: BitbucketServerEvents.RefsChangedEvent, ): Promise { @@ -547,12 +466,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { return; } - /** - * Gets the location entities that are to be newly added to the catalog. - * @param targets Location entities for catalog files in the repository that was pushed - * @param existing The location entities in the repository that was pushed that already exist - * @returns Returns all deferred entities that represent location entities that don't exist in the catalog yet - */ private async getAddedEntities( targets: Entity[], existing: LocationEntity[], @@ -571,12 +484,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { return added; } - /** - * Finds all location entities in the catalog that already have the annotation `metadata.annotations.${this.config.host}/repo-url` - * that is equivalent to @param repoURL\. - * @param repoURL URL for the reposity that the method finds the existing location entities for - * @param token Token from class token manager - */ private async findExistingLocations( catalogRepoUrl: string, token: string, @@ -589,40 +496,8 @@ export class BitbucketServerEntityProvider implements EntityProvider { result => result.items, ) as Promise; } - - // private static toLocationSpec(target: string): LocationSpec { - // return { - // type: 'url', - // target: target, - // presence: 'required', - // }; - // } } -/** - * Converts an array of entities into an array of deferred entities with the provider's name as the location key. - * - * @param targets An array of entities to convert. - * - * @returns An array of deferred entities with the provider's name as the location key. - * - * @example - * - * const entities = [ - * { kind: 'Component', namespace: 'default', name: 'my-component' }, - * { kind: 'System', namespace: 'default', name: 'my-system' }, - * { kind: 'API', namespace: 'default', name: 'my-api' }, - * ]; - * - * const deferredEntities = toDeferredEntities(entities); - * - * // deferredEntities: - * // [ - * // { locationKey: 'my-provider', entity: { kind: 'Component', namespace: 'default', name: 'my-component' } }, - * // { locationKey: 'my-provider', entity: { kind: 'System', namespace: 'default', name: 'my-system' } }, - * // { locationKey: 'my-provider', entity: { kind: 'API', namespace: 'default', name: 'my-api' } }, - * // ] - */ export function toDeferredEntities( targets: Entity[], locationKey: string, From a8a42c387d70362f07c72df45109822aea5d3c6f Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 24 Nov 2024 20:12:20 -0500 Subject: [PATCH 020/119] Fix api report Signed-off-by: David Lilienfeld --- plugins/catalog-backend-module-bitbucket-server/report.api.md | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index abf7c913c8..add82b0a90 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -3,7 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; import { AuthService } from '@backstage/backend-plugin-api'; import { BackendFeature } from '@backstage/backend-plugin-api'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; From 0f12f17fb21f93664678a2fb026acaa3a83a94ab Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 24 Nov 2024 20:31:44 -0500 Subject: [PATCH 021/119] Fix events backend BBS report Signed-off-by: David Lilienfeld --- plugins/events-backend-module-bitbucket-server/report.api.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/events-backend-module-bitbucket-server/report.api.md b/plugins/events-backend-module-bitbucket-server/report.api.md index aaf7b22293..e0b55a5f57 100644 --- a/plugins/events-backend-module-bitbucket-server/report.api.md +++ b/plugins/events-backend-module-bitbucket-server/report.api.md @@ -21,9 +21,4 @@ export class BitbucketServerEventRouter extends SubTopicEventRouter { const eventsModuleBitbucketServerEventRouter: BackendFeature; export default eventsModuleBitbucketServerEventRouter; export { eventsModuleBitbucketServerEventRouter }; - -// Warnings were encountered during analysis: -// -// src/router/BitbucketServerEventRouter.d.ts:13:5 - (ae-undocumented) Missing documentation for "getSubscriberId". -// src/router/BitbucketServerEventRouter.d.ts:14:5 - (ae-undocumented) Missing documentation for "determineSubTopic". ``` From 1fa7494869b15531ac4bbbb985c1ffe17820b2a6 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Fri, 6 Dec 2024 23:43:50 -0500 Subject: [PATCH 022/119] Fix yarn lock Signed-off-by: David Lilienfeld --- yarn.lock | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index baddc683e1..554c2410f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5747,9 +5747,13 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-common": "workspace:^" "@backstage/plugin-catalog-node": "workspace:^" + "@backstage/plugin-events-backend-test-utils": "workspace:^" + "@backstage/plugin-events-node": "workspace:^" + "@types/node-fetch": ^2.5.12 luxon: ^3.0.0 msw: ^1.0.0 p-throttle: ^4.1.1 + node-fetch: ^2.7.0 uuid: ^11.0.0 languageName: unknown linkType: soft @@ -20106,7 +20110,7 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.4, @types/node-fetch@npm:^2.6.9": +"@types/node-fetch@npm:^2.5.12, @types/node-fetch@npm:^2.6.4, @types/node-fetch@npm:^2.6.9": version: 2.6.12 resolution: "@types/node-fetch@npm:2.6.12" dependencies: From 26fe586505050d511e8fcef2ecf80b8bb0b76991 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Fri, 6 Dec 2024 23:58:48 -0500 Subject: [PATCH 023/119] Fix package deps catalog plugin Signed-off-by: David Lilienfeld --- plugins/catalog-backend-module-bitbucket-server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 0d5ba5611e..0f2861ca56 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -60,7 +60,6 @@ "@backstage/plugin-catalog-node": "workspace:^", "p-throttle": "^4.1.1", "@backstage/plugin-events-node": "workspace:^", - "@types/node-fetch": "^2.5.12", "node-fetch": "^2.7.0", "uuid": "^11.0.0" }, @@ -68,6 +67,7 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/plugin-events-backend-test-utils": "workspace:^", + "@types/node-fetch": "^2.5.12", "luxon": "^3.0.0", "msw": "^1.0.0" }, From 351f3aedb9828e16b1d779e46af969684b98193e Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Fri, 13 Dec 2024 17:39:11 -0500 Subject: [PATCH 024/119] Fix package.json and yarn.lock Signed-off-by: David Lilienfeld --- plugins/catalog-backend-module-bitbucket-server/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 0f2861ca56..45edfa150f 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -58,9 +58,9 @@ "@backstage/integration": "workspace:^", "@backstage/plugin-catalog-common": "workspace:^", "@backstage/plugin-catalog-node": "workspace:^", - "p-throttle": "^4.1.1", "@backstage/plugin-events-node": "workspace:^", "node-fetch": "^2.7.0", + "p-throttle": "^4.1.1", "uuid": "^11.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 554c2410f7..4605124ba9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5752,8 +5752,8 @@ __metadata: "@types/node-fetch": ^2.5.12 luxon: ^3.0.0 msw: ^1.0.0 - p-throttle: ^4.1.1 node-fetch: ^2.7.0 + p-throttle: ^4.1.1 uuid: ^11.0.0 languageName: unknown linkType: soft From 00d989fd7a943d7e221585d2dc83b18dd5cb2aa4 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Fri, 13 Dec 2024 17:43:19 -0500 Subject: [PATCH 025/119] Moved throttle below imports in BitbucketServerClient Signed-off-by: David Lilienfeld --- .../src/lib/BitbucketServerClient.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index ba5f75268c..a29b0ae4ff 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -19,6 +19,13 @@ import { getBitbucketServerRequestOptions, } from '@backstage/integration'; import pThrottle from 'p-throttle'; +import { + BitbucketServerDefaultBranch, + BitbucketServerRepository, +} from './index'; +import { BitbucketServerProject } from './types'; +import { NotFoundError } from '@backstage/errors'; +import { ResponseError } from '@backstage/errors'; // 1 per second const throttle = pThrottle({ @@ -31,15 +38,6 @@ const throttledFetch = throttle( return await fetch(url, options); }, ); -import { - BitbucketServerDefaultBranch, - BitbucketServerRepository, -} from './index'; - -import { BitbucketServerProject } from './types'; -import { NotFoundError } from '@backstage/errors'; - -import { ResponseError } from '@backstage/errors'; /** * A client for interacting with a Bitbucket Server instance From bb305509fdf3f213e5a512ecc5e147bdd12f7e91 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 2 Mar 2025 22:52:59 -0500 Subject: [PATCH 026/119] Fix all suggestions | working tests Signed-off-by: David Lilienfeld --- .../integrations/bitbucketServer/discovery.md | 10 ++- .../package.json | 2 - .../report-alpha.api.md | 6 -- .../report.api.md | 4 +- .../src/alpha.ts | 6 +- .../src/lib/BitbucketServerClient.ts | 1 + ...alogModuleBitbucketServerEntityProvider.ts | 6 +- .../BitbucketServerEntityProvider.test.ts | 71 +++++++------------ .../BitbucketServerEntityProvider.ts | 31 ++++---- .../README.md | 14 +--- .../package.json | 2 +- .../report-alpha.api.md | 7 -- .../report.api.md | 12 ---- .../src/alpha.ts | 3 +- .../src/index.ts | 1 - yarn.lock | 4 +- 16 files changed, 52 insertions(+), 128 deletions(-) diff --git a/docs/integrations/bitbucketServer/discovery.md b/docs/integrations/bitbucketServer/discovery.md index a66db83806..150e92f11b 100644 --- a/docs/integrations/bitbucketServer/discovery.md +++ b/docs/integrations/bitbucketServer/discovery.md @@ -30,14 +30,12 @@ yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbuck ```ts // optional if you want HTTP endpojnts to receive external events -// backend.add(import('@backstage/plugin-events-backend/alpha')); +// backend.add(import('@backstage/plugin-events-backend')); // optional if you want to use AWS SQS instead of HTTP endpoints to receive external events -// backend.add(import('@backstage/plugin-events-backend-module-aws-sqs/alpha')); +// backend.add(import('@backstage/plugin-events-backend-module-aws-sqs')); +backend.add(import('@backstage/plugin-events-backend-module-bitbucket-server')); backend.add( - import('@backstage/plugin-events-backend-module-bitbucket-server/alpha'), -); -backend.add( - import('@backstage/plugin-catalog-backend-module-bitbucket-server/alpha'), + import('@backstage/plugin-catalog-backend-module-bitbucket-server'), ); ``` diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 45edfa150f..41c4fabd69 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -59,7 +59,6 @@ "@backstage/plugin-catalog-common": "workspace:^", "@backstage/plugin-catalog-node": "workspace:^", "@backstage/plugin-events-node": "workspace:^", - "node-fetch": "^2.7.0", "p-throttle": "^4.1.1", "uuid": "^11.0.0" }, @@ -67,7 +66,6 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/plugin-events-backend-test-utils": "workspace:^", - "@types/node-fetch": "^2.5.12", "luxon": "^3.0.0", "msw": "^1.0.0" }, diff --git a/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md b/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md index 06212c3c60..7082701333 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md @@ -3,11 +3,5 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; - -// @alpha (undocumented) -const _feature: BackendFeature; -export default _feature; - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index add82b0a90..cdbe714be3 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -6,7 +6,7 @@ import { AuthService } from '@backstage/backend-plugin-api'; import { BackendFeature } from '@backstage/backend-plugin-api'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; -import { CatalogApi } from '@backstage/catalog-client'; +import { CatalogService } from '@backstage/plugin-catalog-node'; import { Config } from '@backstage/config'; import { Entity } from '@backstage/catalog-model'; import { EntityProvider } from '@backstage/plugin-catalog-node'; @@ -77,7 +77,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { parser?: BitbucketServerLocationParser; schedule?: SchedulerServiceTaskRunner; scheduler?: SchedulerService; - catalogApi?: CatalogApi; + catalogApi?: CatalogService; auth?: AuthService; }, ): BitbucketServerEntityProvider[]; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts b/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts index cba672ce49..706d03bd5d 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts @@ -14,8 +14,4 @@ * limitations under the License. */ -import { default as feature } from './module'; - -/** @alpha */ -const _feature = feature; -export default _feature; +import {} from './module'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index a29b0ae4ff..6deb47ca6a 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -197,6 +197,7 @@ export type BitbucketServerPagedResponse = { values: T[]; nextPageStart: number; }; + /** * @public */ diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts index 2d68b6ef49..d66ef4e2a2 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.ts @@ -18,10 +18,8 @@ import { coreServices, createBackendModule, } from '@backstage/backend-plugin-api'; -import { - catalogProcessingExtensionPoint, - catalogServiceRef, -} from '@backstage/plugin-catalog-node/alpha'; +import { catalogServiceRef } from '@backstage/plugin-catalog-node'; +import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; import { eventsServiceRef } from '@backstage/plugin-events-node'; import { BitbucketServerEntityProvider } from '../providers/BitbucketServerEntityProvider'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts index 81699550bd..ba4e3e0411 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.test.ts @@ -18,7 +18,7 @@ import { SchedulerService, SchedulerServiceTaskRunner, SchedulerServiceTaskInvocationDefinition, - AuthService, + BackstageCredentials, } from '@backstage/backend-plugin-api'; import { mockServices, @@ -26,6 +26,7 @@ import { } from '@backstage/backend-test-utils'; import { ConfigReader } from '@backstage/config'; import { + CatalogService, DeferredEntity, EntityProviderConnection, locationSpecToLocationEntity, @@ -39,8 +40,8 @@ import { import { BitbucketServerPagedResponse } from '../lib'; import { Entity, LocationEntity } from '@backstage/catalog-model'; import { BitbucketServerEvents } from '../lib/index'; -import { CatalogApi } from '@backstage/catalog-client'; import { DefaultEventsService } from '@backstage/plugin-events-node'; +import { catalogServiceMock } from '@backstage/plugin-catalog-node/testUtils'; class PersistingTaskRunner implements SchedulerServiceTaskRunner { private tasks: SchedulerServiceTaskInvocationDefinition[] = []; @@ -163,11 +164,6 @@ function setupRepositoryReqHandler(defaultBranch: string) { ); } -// const authService = { -// getPluginRequestToken: async ({onBehalfOf, targetPluginId}) => { -// return { token: 'fake-token' }; -// }, -// } as any as AuthService; const repoPushEvent: BitbucketServerEvents.RefsChangedEvent = { eventKey: 'repo:refs_changed', date: '2017-09-19T09:45:32+1000', @@ -771,9 +767,7 @@ describe('BitbucketServerEntityProvider', () => { setupRepositoryReqHandler('master'); - authService.getPluginRequestToken.mockResolvedValue({ - token: 'fake-token', - }); + // authService.getOwnServiceCredentials(); const config = new ConfigReader({ integrations: { @@ -797,13 +791,14 @@ describe('BitbucketServerEntityProvider', () => { }, }); - const catalogApi = { + const catalogApi = catalogServiceMock.mock({ getEntities: async ( request: { filter: Record }, - options: { token: string }, + credentials: { credentials: BackstageCredentials }, ): Promise<{ items: Entity[] }> => { if ( - options.token !== 'fake-token' || + credentials.credentials !== + (await authService.getOwnServiceCredentials()) || request.filter.kind !== 'Location' || request.filter[`metadata.annotations.${host}/repo-url`] !== `${test1RepoUrl}/kept-module:${targetPath}` @@ -814,14 +809,14 @@ describe('BitbucketServerEntityProvider', () => { items: [keptModule], }; }, - }; + }); const provider = BitbucketServerEntityProvider.fromConfig(config, { - catalogApi: catalogApi as any as CatalogApi, + catalogApi: catalogApi, logger, schedule, events, - auth: authService as any as AuthService, + auth: authService, })[0]; await provider.connect(entityProviderConnection); @@ -869,13 +864,14 @@ describe('BitbucketServerEntityProvider', () => { }, }); - const catalogApi = { + const catalogApi = catalogServiceMock.mock({ getEntities: async ( request: { filter: Record }, - options: { token: string }, + credentials: { credentials: BackstageCredentials }, ): Promise<{ items: Entity[] }> => { if ( - options.token !== 'fake-token' || + credentials.credentials !== + (await authService.getOwnServiceCredentials()) || request.filter.kind !== 'Location' || request.filter[`metadata.annotations.${host}/repo-url`] !== `${test1RepoUrl}/kept-module:${targetPath}` @@ -886,13 +882,14 @@ describe('BitbucketServerEntityProvider', () => { items: [keptModule], }; }, - }; + }); + const provider = BitbucketServerEntityProvider.fromConfig(config, { - catalogApi: catalogApi as any as CatalogApi, + catalogApi: catalogApi, logger, schedule, events, - auth: authService as any as AuthService, + auth: authService, })[0]; await provider.connect(entityProviderConnection); @@ -940,22 +937,13 @@ describe('BitbucketServerEntityProvider', () => { }, }); - const catalogApi = { - getEntities: async ( - _request: { filter: Record }, - _options: { token: string }, - ): Promise<{ items: Entity[] }> => { - return { - items: [], - }; - }, - }; + const catalogApi = catalogServiceMock({ entities: [] }); const provider = BitbucketServerEntityProvider.fromConfig(config, { - catalogApi: catalogApi as any as CatalogApi, + catalogApi: catalogApi, logger, schedule, events, - auth: authService as any as AuthService, + auth: authService, })[0]; await provider.connect(entityProviderConnection); @@ -1010,22 +998,13 @@ describe('BitbucketServerEntityProvider', () => { }, }); - const catalogApi = { - getEntities: async ( - _request: { filter: Record }, - _options: { token: string }, - ): Promise<{ items: Entity[] }> => { - return { - items: [], - }; - }, - }; + const catalogApi = catalogServiceMock({ entities: [] }); const provider = BitbucketServerEntityProvider.fromConfig(config, { - catalogApi: catalogApi as any as CatalogApi, + catalogApi: catalogApi as any as CatalogService, logger, schedule, events, - auth: authService as any as AuthService, + auth: authService, })[0]; await provider.connect(entityProviderConnection); diff --git a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts index c6df6a19b4..b462f8756a 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/providers/BitbucketServerEntityProvider.ts @@ -25,6 +25,7 @@ import { EntityProvider, EntityProviderConnection, DeferredEntity, + CatalogService, } from '@backstage/plugin-catalog-node'; import * as uuid from 'uuid'; import { BitbucketServerClient, paginated } from '../lib'; @@ -38,13 +39,13 @@ import { } from './BitbucketServerLocationParser'; import { AuthService, + BackstageCredentials, LoggerService, SchedulerService, SchedulerServiceTaskRunner, } from '@backstage/backend-plugin-api'; import { BitbucketServerEvents } from '../lib'; import { EventsService } from '@backstage/plugin-events-node'; -import { CatalogApi } from '@backstage/catalog-client'; const TOPIC_REPO_REFS_CHANGED = 'bitbucketServer.repo:refs_changed'; @@ -63,7 +64,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { private readonly logger: LoggerService; private readonly scheduleFn: () => Promise; private connection?: EntityProviderConnection; - private readonly catalogApi?: CatalogApi; + private readonly catalogApi?: CatalogService; private readonly events?: EventsService; private readonly auth?: AuthService; private eventConfigErrorThrown = false; @@ -78,7 +79,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { parser?: BitbucketServerLocationParser; schedule?: SchedulerServiceTaskRunner; scheduler?: SchedulerService; - catalogApi?: CatalogApi; + catalogApi?: CatalogService; auth?: AuthService; }, ): BitbucketServerEntityProvider[] { @@ -127,7 +128,7 @@ export class BitbucketServerEntityProvider implements EntityProvider { logger: LoggerService, taskRunner: SchedulerServiceTaskRunner, parser?: BitbucketServerLocationParser, - catalogApi?: CatalogApi, + catalogApi?: CatalogService, events?: EventsService, auth?: AuthService, ) { @@ -294,19 +295,14 @@ export class BitbucketServerEntityProvider implements EntityProvider { * @returns Boolean */ private canHandleEvents(): boolean { - if ( - this.catalogApi !== undefined && - this.catalogApi !== null && - this.auth !== undefined && - this.auth !== null - ) { + if (this.catalogApi && this.auth) { return true; } if (!this.eventConfigErrorThrown) { this.eventConfigErrorThrown = true; throw new Error( - `${this.getProviderName()} not well configured to handle repo:push. Missing CatalogApi and/or TokenManager.`, + `${this.getProviderName()} not well configured to handle repo:push. Missing CatalogApi and/or AuthService.`, ); } @@ -387,11 +383,10 @@ export class BitbucketServerEntityProvider implements EntityProvider { this.logger.error('Failed to create location entity.'); return; } - const { token } = await this.auth!.getPluginRequestToken({ - onBehalfOf: await this.auth!.getOwnServiceCredentials(), - targetPluginId: 'catalog', // e.g. 'catalog' - }); - const existing = await this.findExistingLocations(catalogRepoUrl, token); + const existing = await this.findExistingLocations( + catalogRepoUrl, + await this.auth!.getOwnServiceCredentials(), + ); const stillExisting: LocationEntity[] = []; const removed: DeferredEntity[] = []; existing.forEach(item => { @@ -486,13 +481,13 @@ export class BitbucketServerEntityProvider implements EntityProvider { private async findExistingLocations( catalogRepoUrl: string, - token: string, + credentials: BackstageCredentials, ): Promise { const filter: Record = {}; filter.kind = 'Location'; filter[`metadata.annotations.${this.targetAnnotation}`] = catalogRepoUrl; - return this.catalogApi!.getEntities({ filter }, { token }).then( + return this.catalogApi!.getEntities({ filter }, { credentials }).then( result => result.items, ) as Promise; } diff --git a/plugins/events-backend-module-bitbucket-server/README.md b/plugins/events-backend-module-bitbucket-server/README.md index 2c8fdff092..4950015010 100644 --- a/plugins/events-backend-module-bitbucket-server/README.md +++ b/plugins/events-backend-module-bitbucket-server/README.md @@ -32,17 +32,5 @@ yarn add --cwd packages/backend @backstage/plugin-events-backend-module-bitbucke ```ts // packages/backend/src/index.ts -backend.add( - import('@backstage/plugin-events-backend-module-bitbucket-server/alpha'), -); -``` - -### Legacy Backend System - -```ts -// packages/backend/src/plugins/events.ts -const eventRouter = new BitbucketCloudEventRouter({ - events: env.events, -}); -await eventRouter.subscribe(); +backend.add(import('@backstage/plugin-events-backend-module-bitbucket-server')); ``` diff --git a/plugins/events-backend-module-bitbucket-server/package.json b/plugins/events-backend-module-bitbucket-server/package.json index 4f38cb1f05..4cfe424618 100644 --- a/plugins/events-backend-module-bitbucket-server/package.json +++ b/plugins/events-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-bitbucket-server", - "version": "0.1.0", + "version": "0.0.0", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-bitbucket-server/report-alpha.api.md b/plugins/events-backend-module-bitbucket-server/report-alpha.api.md index 61559711f3..47b9068604 100644 --- a/plugins/events-backend-module-bitbucket-server/report-alpha.api.md +++ b/plugins/events-backend-module-bitbucket-server/report-alpha.api.md @@ -3,12 +3,5 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; - -// @public -const eventsModuleBitbucketServerEventRouter: BackendFeature; -export default eventsModuleBitbucketServerEventRouter; -export { eventsModuleBitbucketServerEventRouter }; - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/events-backend-module-bitbucket-server/report.api.md b/plugins/events-backend-module-bitbucket-server/report.api.md index e0b55a5f57..916f7fa2ab 100644 --- a/plugins/events-backend-module-bitbucket-server/report.api.md +++ b/plugins/events-backend-module-bitbucket-server/report.api.md @@ -4,18 +4,6 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; -import { EventParams } from '@backstage/plugin-events-node'; -import { EventsService } from '@backstage/plugin-events-node'; -import { SubTopicEventRouter } from '@backstage/plugin-events-node'; - -// @public -export class BitbucketServerEventRouter extends SubTopicEventRouter { - constructor(options: { events: EventsService }); - // (undocumented) - protected determineSubTopic(params: EventParams): string | undefined; - // (undocumented) - protected getSubscriberId(): string; -} // @public const eventsModuleBitbucketServerEventRouter: BackendFeature; diff --git a/plugins/events-backend-module-bitbucket-server/src/alpha.ts b/plugins/events-backend-module-bitbucket-server/src/alpha.ts index c741a37f24..588ee62daa 100644 --- a/plugins/events-backend-module-bitbucket-server/src/alpha.ts +++ b/plugins/events-backend-module-bitbucket-server/src/alpha.ts @@ -14,5 +14,4 @@ * limitations under the License. */ -export { eventsModuleBitbucketServerEventRouter } from './service/eventsModuleBitbucketServerEventRouter'; -export { eventsModuleBitbucketServerEventRouter as default } from './service/eventsModuleBitbucketServerEventRouter'; +import {} from './service/eventsModuleBitbucketServerEventRouter'; diff --git a/plugins/events-backend-module-bitbucket-server/src/index.ts b/plugins/events-backend-module-bitbucket-server/src/index.ts index afa3e204d2..6cf9aeb5e2 100644 --- a/plugins/events-backend-module-bitbucket-server/src/index.ts +++ b/plugins/events-backend-module-bitbucket-server/src/index.ts @@ -21,6 +21,5 @@ * @packageDocumentation */ -export { BitbucketServerEventRouter } from './router/BitbucketServerEventRouter'; export { eventsModuleBitbucketServerEventRouter } from './service/eventsModuleBitbucketServerEventRouter'; export { eventsModuleBitbucketServerEventRouter as default } from './service/eventsModuleBitbucketServerEventRouter'; diff --git a/yarn.lock b/yarn.lock index 4605124ba9..783947ce26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5749,10 +5749,8 @@ __metadata: "@backstage/plugin-catalog-node": "workspace:^" "@backstage/plugin-events-backend-test-utils": "workspace:^" "@backstage/plugin-events-node": "workspace:^" - "@types/node-fetch": ^2.5.12 luxon: ^3.0.0 msw: ^1.0.0 - node-fetch: ^2.7.0 p-throttle: ^4.1.1 uuid: ^11.0.0 languageName: unknown @@ -20110,7 +20108,7 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.5.12, @types/node-fetch@npm:^2.6.4, @types/node-fetch@npm:^2.6.9": +"@types/node-fetch@npm:^2.6.4, @types/node-fetch@npm:^2.6.9": version: 2.6.12 resolution: "@types/node-fetch@npm:2.6.12" dependencies: From 9785da55cf95508c503e7af259008340ab3e7a29 Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Wed, 5 Mar 2025 12:50:48 -0500 Subject: [PATCH 027/119] Fix api reports Signed-off-by: David Lilienfeld --- .../package.json | 4 -- .../report-alpha.api.md | 7 --- .../report.api.md | 54 ------------------- .../src/alpha.ts | 17 ------ .../src/index.ts | 11 +++- .../src/lib/BitbucketServerClient.ts | 3 -- .../src/lib/index.ts | 8 ++- .../src/lib/types.ts | 1 - .../package.json | 4 -- .../report-alpha.api.md | 7 --- .../report.api.md | 1 - .../src/alpha.ts | 17 ------ .../src/index.ts | 2 - 13 files changed, 17 insertions(+), 119 deletions(-) delete mode 100644 plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md delete mode 100644 plugins/catalog-backend-module-bitbucket-server/src/alpha.ts delete mode 100644 plugins/events-backend-module-bitbucket-server/report-alpha.api.md delete mode 100644 plugins/events-backend-module-bitbucket-server/src/alpha.ts diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 41c4fabd69..1f9b8baa27 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -21,16 +21,12 @@ "license": "Apache-2.0", "exports": { ".": "./src/index.ts", - "./alpha": "./src/alpha.ts", "./package.json": "./package.json" }, "main": "src/index.ts", "types": "src/index.ts", "typesVersions": { "*": { - "alpha": [ - "src/alpha.ts" - ], "package.json": [ "package.json" ] diff --git a/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md b/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md deleted file mode 100644 index 7082701333..0000000000 --- a/plugins/catalog-backend-module-bitbucket-server/report-alpha.api.md +++ /dev/null @@ -1,7 +0,0 @@ -## API Report File for "@backstage/plugin-catalog-backend-module-bitbucket-server" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -// (No @packageDocumentation comment for this package) -``` diff --git a/plugins/catalog-backend-module-bitbucket-server/report.api.md b/plugins/catalog-backend-module-bitbucket-server/report.api.md index cdbe714be3..7cb13e651f 100644 --- a/plugins/catalog-backend-module-bitbucket-server/report.api.md +++ b/plugins/catalog-backend-module-bitbucket-server/report.api.md @@ -86,52 +86,6 @@ export class BitbucketServerEntityProvider implements EntityProvider { refresh(logger: LoggerService): Promise; } -// @public (undocumented) -export namespace BitbucketServerEvents { - // (undocumented) - export type Actor = { - name?: string; - id: number; - }; - // (undocumented) - export type Change = { - ref: { - id: string; - displayId: string; - type: string; - }; - }; - // (undocumented) - export interface Event { - // (undocumented) - eventKey: string; - } - // (undocumented) - export interface RefsChangedEvent extends Event { - // (undocumented) - actor: Actor; - // (undocumented) - changes: Change[]; - // (undocumented) - commits: undefined; - // (undocumented) - date: string; - // (undocumented) - repository: Repository; - // (undocumented) - ToCommit: undefined; - } - // (undocumented) - export type Repository = { - slug: string; - id: number; - name: string; - project: BitbucketServerProject; - }; - { - } -} - // @public (undocumented) export type BitbucketServerListOptions = { [key: string]: number | undefined; @@ -181,12 +135,4 @@ export type BitbucketServerRepository = { // @public (undocumented) const catalogModuleBitbucketServerEntityProvider: BackendFeature; export default catalogModuleBitbucketServerEntityProvider; - -// @public (undocumented) -export function paginated( - request: ( - options: BitbucketServerListOptions, - ) => Promise>, - options?: BitbucketServerListOptions, -): AsyncGenerator; ``` diff --git a/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts b/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts deleted file mode 100644 index 706d03bd5d..0000000000 --- a/plugins/catalog-backend-module-bitbucket-server/src/alpha.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2023 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {} from './module'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/index.ts b/plugins/catalog-backend-module-bitbucket-server/src/index.ts index 96e3a1a0a7..722be03d7a 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/index.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/index.ts @@ -21,7 +21,16 @@ */ export { default } from './module'; -export * from './lib'; + +export { BitbucketServerClient } from './lib'; + +export type { + BitbucketServerProject, + BitbucketServerRepository, + BitbucketServerPagedResponse, + BitbucketServerListOptions, + BitbucketServerDefaultBranch, +} from './lib'; export { BitbucketServerEntityProvider } from './providers'; export type { BitbucketServerLocationParser } from './providers'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index 6deb47ca6a..70e791c992 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -198,9 +198,6 @@ export type BitbucketServerPagedResponse = { nextPageStart: number; }; -/** - * @public - */ export async function* paginated( request: ( options: BitbucketServerListOptions, diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts index 14fb01629e..4533cb1305 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/index.ts @@ -19,4 +19,10 @@ export type { BitbucketServerPagedResponse, BitbucketServerListOptions, } from './BitbucketServerClient'; -export * from './types'; +export type { + BitbucketServerDefaultBranch, + BitbucketServerRepository, + BitbucketServerEvents, + BitbucketServerProject, +} from './types'; +// export * from './types'; diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts index e014528791..efdf3d7cf8 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/types.ts @@ -46,7 +46,6 @@ type BitbucketServerDefaultBranch = { isDefault: boolean; }; -/** @public */ namespace BitbucketServerEvents { interface Event { eventKey: string; diff --git a/plugins/events-backend-module-bitbucket-server/package.json b/plugins/events-backend-module-bitbucket-server/package.json index 4cfe424618..29945bd16f 100644 --- a/plugins/events-backend-module-bitbucket-server/package.json +++ b/plugins/events-backend-module-bitbucket-server/package.json @@ -18,16 +18,12 @@ "license": "Apache-2.0", "exports": { ".": "./src/index.ts", - "./alpha": "./src/alpha.ts", "./package.json": "./package.json" }, "main": "src/index.ts", "types": "src/index.ts", "typesVersions": { "*": { - "alpha": [ - "src/alpha.ts" - ], "package.json": [ "package.json" ] diff --git a/plugins/events-backend-module-bitbucket-server/report-alpha.api.md b/plugins/events-backend-module-bitbucket-server/report-alpha.api.md deleted file mode 100644 index 47b9068604..0000000000 --- a/plugins/events-backend-module-bitbucket-server/report-alpha.api.md +++ /dev/null @@ -1,7 +0,0 @@ -## API Report File for "@backstage/plugin-events-backend-module-bitbucket-server" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -// (No @packageDocumentation comment for this package) -``` diff --git a/plugins/events-backend-module-bitbucket-server/report.api.md b/plugins/events-backend-module-bitbucket-server/report.api.md index 916f7fa2ab..913556cfe9 100644 --- a/plugins/events-backend-module-bitbucket-server/report.api.md +++ b/plugins/events-backend-module-bitbucket-server/report.api.md @@ -8,5 +8,4 @@ import { BackendFeature } from '@backstage/backend-plugin-api'; // @public const eventsModuleBitbucketServerEventRouter: BackendFeature; export default eventsModuleBitbucketServerEventRouter; -export { eventsModuleBitbucketServerEventRouter }; ``` diff --git a/plugins/events-backend-module-bitbucket-server/src/alpha.ts b/plugins/events-backend-module-bitbucket-server/src/alpha.ts deleted file mode 100644 index 588ee62daa..0000000000 --- a/plugins/events-backend-module-bitbucket-server/src/alpha.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2023 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {} from './service/eventsModuleBitbucketServerEventRouter'; diff --git a/plugins/events-backend-module-bitbucket-server/src/index.ts b/plugins/events-backend-module-bitbucket-server/src/index.ts index 6cf9aeb5e2..8a765ecfdf 100644 --- a/plugins/events-backend-module-bitbucket-server/src/index.ts +++ b/plugins/events-backend-module-bitbucket-server/src/index.ts @@ -20,6 +20,4 @@ * * @packageDocumentation */ - -export { eventsModuleBitbucketServerEventRouter } from './service/eventsModuleBitbucketServerEventRouter'; export { eventsModuleBitbucketServerEventRouter as default } from './service/eventsModuleBitbucketServerEventRouter'; From 066a915751b2cb3d9cac916d0224f0272386d840 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Thu, 6 Mar 2025 18:52:07 +0100 Subject: [PATCH 028/119] chore: remove repository:admin from default repo write scopes Signed-off-by: Benjamin Janssens --- .changeset/serious-guests-tan.md | 2 +- packages/integration-react/src/api/ScmAuth.test.ts | 2 +- packages/integration-react/src/api/ScmAuth.ts | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.changeset/serious-guests-tan.md b/.changeset/serious-guests-tan.md index e140f8bc1d..c051dca464 100644 --- a/.changeset/serious-guests-tan.md +++ b/.changeset/serious-guests-tan.md @@ -2,4 +2,4 @@ '@backstage/integration-react': patch --- -Added scopes `project` and `repository:admin` for Bitbucket Cloud. +Added scope `project` for Bitbucket Cloud. diff --git a/packages/integration-react/src/api/ScmAuth.test.ts b/packages/integration-react/src/api/ScmAuth.test.ts index 30a92a2056..5872354d79 100644 --- a/packages/integration-react/src/api/ScmAuth.test.ts +++ b/packages/integration-react/src/api/ScmAuth.test.ts @@ -138,7 +138,7 @@ describe('ScmAuth', () => { }), ).resolves.toMatchObject({ token: - 'account team pullrequest snippet issue project pullrequest:write snippet:write issue:write repository:admin', + 'account team pullrequest snippet issue project pullrequest:write snippet:write issue:write', }); }); diff --git a/packages/integration-react/src/api/ScmAuth.ts b/packages/integration-react/src/api/ScmAuth.ts index d943a3fac8..011422d4cf 100644 --- a/packages/integration-react/src/api/ScmAuth.ts +++ b/packages/integration-react/src/api/ScmAuth.ts @@ -245,7 +245,6 @@ export class ScmAuth implements ScmAuthApi { 'pullrequest:write', 'snippet:write', 'issue:write', - 'repository:admin', ]; return new ScmAuth('bitbucket', bitbucketAuthApi, host, { default: defaultScopes, From 79c541d889c53ef1830cd6dcbcd3490ce1f10aca Mon Sep 17 00:00:00 2001 From: David Lilienfeld Date: Sun, 9 Mar 2025 00:02:39 -0500 Subject: [PATCH 029/119] Remove legacy backend docs Signed-off-by: David Lilienfeld --- .../integrations/bitbucketServer/discovery.md | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/docs/integrations/bitbucketServer/discovery.md b/docs/integrations/bitbucketServer/discovery.md index 150e92f11b..7947913182 100644 --- a/docs/integrations/bitbucketServer/discovery.md +++ b/docs/integrations/bitbucketServer/discovery.md @@ -50,85 +50,6 @@ Further documentation: - - -### Installation with Legacy Backend System - -#### Installation without Events Support - -You will have to add the entity provider in the catalog initialization code of your -backend. The provider is not installed by default, therefore you have to add a -dependency to `@backstage/plugin-catalog-backend-module-bitbucket-server` to your backend -package. - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbucket-server -``` - -And then add the entity provider to your catalog builder: - -```ts title="packages/backend/src/index.ts" -backend.add(import('@backstage/plugin-catalog-backend')); -/* highlight-add-start */ -backend.add( - import('@backstage/plugin-catalog-backend-module-bitbucket-server'), -); -/* highlight-add-end */ -``` - -#### Installation with Events Support - -Please follow the installation instructions at - -- -- - -Additionally, you need to decide how you want to receive events from external sources like - -- [via HTTP endpoint](https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md) - - Bitbucket Server events webhook url should be set to `{backstageBaseUrl}/api/events/http/bitbucketServer` -- [via an AWS SQS queue](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md) - -Set up your provider - -```ts title="packages/backend/src/plugins/catalog.ts" -import { CatalogBuilder } from '@backstage/plugin-catalog-backend'; -/* highlight-add-start */ -import { BitbucketServerEntityProvider } from '@backstage/plugin-catalog-backend-module-bitbucket-server'; -/* highlight-add-end */ - -import { ScaffolderEntitiesProcessor } from '@backstage/plugin-scaffolder-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const builder = await CatalogBuilder.create(env); - builder.addProcessor(new ScaffolderEntitiesProcessor()); - /* highlight-add-start */ - const bitbucketServerProvider = BitbucketServerEntityProvider.fromConfig( - env.config, - { - catalogApi: new CatalogClient({ discoveryApi: env.discovery }), - logger: env.logger, - scheduler: env.scheduler, - events: env.events, - tokenManager: env.tokenManager, - }, - ); - env.eventBroker.subscribe(bitbucketServerProvider); - builder.addEntityProvider(bitbucketServerProvider); - /* highlight-add-end */ - const { processingEngine, router } = await builder.build(); - await processingEngine.start(); - return router; -} -``` - -**Attention:** -`catalogApi` and `tokenManager` are required at this variant -compared to the one without events support. - ## Configuration To use the entity provider, you'll need a [Bitbucket Server integration set up](locations.md). From 5aa5283152a799ed37c15e5bdbb71cec9ce17110 Mon Sep 17 00:00:00 2001 From: Eric Roberson Date: Thu, 13 Mar 2025 18:30:24 -0700 Subject: [PATCH 030/119] docs: fix example location annotations in incrementalentityprovider Signed-off-by: Eric Roberson --- docs/features/software-catalog/external-integrations.md | 9 ++++++--- .../README.md | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/features/software-catalog/external-integrations.md b/docs/features/software-catalog/external-integrations.md index 343128bfbf..915726eb6c 100644 --- a/docs/features/software-catalog/external-integrations.md +++ b/docs/features/software-catalog/external-integrations.md @@ -1161,9 +1161,11 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider { private readonly token: string; + private readonly mySource: string; - constructor(token: string) { + constructor(token: string, mySource: string) { this.token = token; + this.mySource = mySource; } getProviderName() { @@ -1181,6 +1183,7 @@ export class MyIncrementalEntityProvider cursor: Cursor = { page: 1 }, ): Promise> { const { apiClient } = context; + const location = `${this.getProviderName()}:${mySource}`; // call your API with the current cursor const data = await apiClient.getServices(cursor); @@ -1200,8 +1203,8 @@ export class MyIncrementalEntityProvider name: item.name, annotations: { // You need to define these, otherwise they'll fail validation - [ANNOTATION_LOCATION]: this.getProviderName(), - [ANNOTATION_ORIGIN_LOCATION]: this.getProviderName(), + [ANNOTATION_LOCATION]: location, + [ANNOTATION_ORIGIN_LOCATION]: location, }, }, spec: { diff --git a/plugins/catalog-backend-module-incremental-ingestion/README.md b/plugins/catalog-backend-module-incremental-ingestion/README.md index 2535fbe8e3..ee47d759b9 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/README.md +++ b/plugins/catalog-backend-module-incremental-ingestion/README.md @@ -211,9 +211,11 @@ The last step is to implement the actual `next` method that will accept the curs export class MyIncrementalEntityProvider implements IncrementalEntityProvider { token: string; + mySource: string; - constructor(token: string) { + constructor(token: string, mySource: string) { this.token = token; + this.mySource = mySource; } getProviderName() { @@ -230,6 +232,7 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider> { const { apiClient } = context; + const location = `${this.getProviderName()}:${mySource}`; // call your API with the current cursor const data = await apiClient.getServices(cursor); @@ -249,8 +252,8 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider Date: Thu, 13 Mar 2025 18:53:08 -0700 Subject: [PATCH 031/119] chore: add changeset Signed-off-by: Eric Roberson --- .changeset/wide-planets-camp.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wide-planets-camp.md diff --git a/.changeset/wide-planets-camp.md b/.changeset/wide-planets-camp.md new file mode 100644 index 0000000000..c36ed69dff --- /dev/null +++ b/.changeset/wide-planets-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch +--- + +fixed misleading example location annotations in docs From 7495edfc17c2a6ecd1bff8efcea0e310df1ef033 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Wed, 16 Oct 2024 15:19:45 +0500 Subject: [PATCH 032/119] feat: Added custom timeout for oidc provider Signed-off-by: Ruslan Nasyrov --- .changeset/early-feet-lay.md | 5 +++++ .../src/authenticator.ts | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 .changeset/early-feet-lay.md diff --git a/.changeset/early-feet-lay.md b/.changeset/early-feet-lay.md new file mode 100644 index 0000000000..d6f62d1129 --- /dev/null +++ b/.changeset/early-feet-lay.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-oidc-provider': minor +--- + +Added custom timeout setting for oidc provider diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts index c396ea7034..ece4776bf8 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts @@ -34,12 +34,14 @@ import { } from '@backstage/plugin-auth-node'; const HTTP_OPTION_TIMEOUT = 10000; -const httpOptionsProvider: CustomHttpOptionsProvider = (_url, options) => { - return { - ...options, - timeout: HTTP_OPTION_TIMEOUT, +const createHttpOptionsProvider = + ({ timeout }: { timeout?: number }): CustomHttpOptionsProvider => + (_url, options) => { + return { + ...options, + timeout: timeout ?? HTTP_OPTION_TIMEOUT, + }; }; -}; /** * authentication result for the OIDC which includes the token set and user @@ -84,6 +86,9 @@ export const oidcAuthenticator = createOAuthAuthenticator({ 'The oidc provider no longer supports the "scope" configuration option. Please use the "additionalScopes" option instead.', ); } + const httpOptionsProvider = createHttpOptionsProvider({ + timeout: config.getOptionalNumber('timeout'), + }); Issuer[custom.http_options] = httpOptionsProvider; const promise = Issuer.discover(metadataUrl).then(issuer => { From 7ee07a12481fa47a20fac60ab1a37c52f915ef90 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Thu, 17 Oct 2024 12:16:29 +0500 Subject: [PATCH 033/119] changed timeout type Signed-off-by: Ruslan Nasyrov --- plugins/auth-backend-module-oidc-provider/config.d.ts | 2 ++ plugins/auth-backend-module-oidc-provider/package.json | 1 + .../src/authenticator.ts | 10 +++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/auth-backend-module-oidc-provider/config.d.ts b/plugins/auth-backend-module-oidc-provider/config.d.ts index 409c658c23..4c7c435e54 100644 --- a/plugins/auth-backend-module-oidc-provider/config.d.ts +++ b/plugins/auth-backend-module-oidc-provider/config.d.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { HumanDuration } from '@backstage/types'; import { HumanDuration } from '@backstage/types'; @@ -33,6 +34,7 @@ export interface Config { tokenSignedResponseAlg?: string; additionalScopes?: string | string[]; prompt?: string; + timeout?: HumanDuration; signIn?: { resolvers: Array< | { diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index 3de2277163..3e82e6183e 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -37,6 +37,7 @@ "@backstage/backend-plugin-api": "workspace:^", "@backstage/plugin-auth-backend": "workspace:^", "@backstage/plugin-auth-node": "workspace:^", + "@backstage/types": "workspace:^", "express": "^4.18.2", "openid-client": "^5.5.0", "passport": "^0.7.0" diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts index ece4776bf8..9c4589a73e 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts @@ -32,6 +32,7 @@ import { PassportOAuthAuthenticatorHelper, PassportOAuthPrivateInfo, } from '@backstage/plugin-auth-node'; +import { durationToMilliseconds, HumanDuration } from '@backstage/types'; const HTTP_OPTION_TIMEOUT = 10000; const createHttpOptionsProvider = @@ -86,8 +87,15 @@ export const oidcAuthenticator = createOAuthAuthenticator({ 'The oidc provider no longer supports the "scope" configuration option. Please use the "additionalScopes" option instead.', ); } + + const timeoutHumanDuration = config.getOptional('timeout'); + const timeoutMilliseconds = + typeof timeoutHumanDuration === 'object' + ? durationToMilliseconds(timeoutHumanDuration) + : undefined; + const httpOptionsProvider = createHttpOptionsProvider({ - timeout: config.getOptionalNumber('timeout'), + timeout: timeoutMilliseconds, }); Issuer[custom.http_options] = httpOptionsProvider; From 5b423cff583e662f9080d173cb27d2ebf84cecb3 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Fri, 25 Oct 2024 12:47:57 +0500 Subject: [PATCH 034/119] review changes #2 Signed-off-by: Ruslan Nasyrov --- .../auth-backend-module-oidc-provider/package.json | 1 + .../src/authenticator.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index 3e82e6183e..7d6dc841ab 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@backstage/backend-plugin-api": "workspace:^", + "@backstage/config": "workspace:^", "@backstage/plugin-auth-backend": "workspace:^", "@backstage/plugin-auth-node": "workspace:^", "@backstage/types": "workspace:^", diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts index 9c4589a73e..b98bec3cc4 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts @@ -33,6 +33,7 @@ import { PassportOAuthPrivateInfo, } from '@backstage/plugin-auth-node'; import { durationToMilliseconds, HumanDuration } from '@backstage/types'; +import { readDurationFromConfig } from '@backstage/config'; const HTTP_OPTION_TIMEOUT = 10000; const createHttpOptionsProvider = @@ -88,12 +89,11 @@ export const oidcAuthenticator = createOAuthAuthenticator({ ); } - const timeoutHumanDuration = config.getOptional('timeout'); - const timeoutMilliseconds = - typeof timeoutHumanDuration === 'object' - ? durationToMilliseconds(timeoutHumanDuration) - : undefined; - + const timeoutMilliseconds = config.has('timeout') + ? durationToMilliseconds( + readDurationFromConfig(config, { key: 'timeout' }), + ) + : undefined; const httpOptionsProvider = createHttpOptionsProvider({ timeout: timeoutMilliseconds, }); From 06a58f67976f482d8bc2330a8d91565ec33e0228 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Fri, 25 Oct 2024 13:28:07 +0500 Subject: [PATCH 035/119] review changes #2 (fix) Signed-off-by: Ruslan Nasyrov --- plugins/auth-backend-module-oidc-provider/src/authenticator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts index b98bec3cc4..6e7022f7cf 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.ts @@ -32,7 +32,7 @@ import { PassportOAuthAuthenticatorHelper, PassportOAuthPrivateInfo, } from '@backstage/plugin-auth-node'; -import { durationToMilliseconds, HumanDuration } from '@backstage/types'; +import { durationToMilliseconds } from '@backstage/types'; import { readDurationFromConfig } from '@backstage/config'; const HTTP_OPTION_TIMEOUT = 10000; From f9f72525a94bfbf0f1a60729228532c0fa4e48e7 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Fri, 8 Nov 2024 15:48:32 +0500 Subject: [PATCH 036/119] added an example of usage and configuration tests Signed-off-by: Ruslan Nasyrov --- .changeset/early-feet-lay.md | 12 +++ .../src/authenticator.test.ts | 76 +++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/.changeset/early-feet-lay.md b/.changeset/early-feet-lay.md index d6f62d1129..ee6fd89730 100644 --- a/.changeset/early-feet-lay.md +++ b/.changeset/early-feet-lay.md @@ -3,3 +3,15 @@ --- Added custom timeout setting for oidc provider + +Here is an example of how to use a custom timeout with the configuration: + +```yaml +auth: + oidc: + production: + clientId: ${AUTH_GOOGLE_CLIENT_ID} + clientSecret: ${AUTH_GOOGLE_CLIENT_SECRET} + timeout: + seconds: 30 +``` diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts index 38e134bcd0..d12427f127 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts @@ -28,6 +28,7 @@ import { ConfigReader } from '@backstage/config'; import { JWK, SignJWT, exportJWK, generateKeyPair } from 'jose'; import { rest } from 'msw'; import express from 'express'; +import { custom } from 'openid-client'; describe('oidcAuthenticator', () => { let implementation: any; @@ -169,6 +170,81 @@ describe('oidcAuthenticator', () => { jest.clearAllMocks(); }); + describe('timeout configuration', () => { + const TEST_URL = new URL('https://test.com'); + + it('should use default timeout when no timeout is configured', async () => { + const { promise } = oidcAuthenticator.initialize({ + callbackUrl: 'https://backstage.test/callback', + config: new ConfigReader({ + metadataUrl: 'https://oidc.test/.well-known/openid-configuration', + clientId: 'clientId', + clientSecret: 'clientSecret', + }), + }); + const { client } = await promise; + + const timeout = client[custom.http_options](TEST_URL, {}).timeout; + + // Check if the HTTP timeout is set to the default value + expect(timeout).toBeDefined(); + expect(timeout).toBe(10000); + }); + + it('should use configured timeout when provided in the config', async () => { + const { promise } = oidcAuthenticator.initialize({ + callbackUrl: 'https://backstage.test/callback', + config: new ConfigReader({ + metadataUrl: 'https://oidc.test/.well-known/openid-configuration', + clientId: 'clientId', + clientSecret: 'clientSecret', + timeout: { + seconds: 30, + }, + }), + }); + const { client } = await promise; + + const timeout = client[custom.http_options](TEST_URL, {}).timeout; + + // Check if the HTTP timeout is set to the configured value (30 seconds) + expect(timeout).toBeDefined(); + expect(timeout).toBe(30000); + }); + + it('should handle invalid timeout configuration gracefully', async () => { + expect(() => { + oidcAuthenticator.initialize({ + callbackUrl: 'https://backstage.test/callback', + config: new ConfigReader({ + metadataUrl: 'https://oidc.test/.well-known/openid-configuration', + clientId: 'clientId', + clientSecret: 'clientSecret', + timeout: '30s', + }), + }); + }).toThrow( + "Failed to read duration from config, TypeError: Invalid type in config for key 'timeout' in 'mock-config', got string, wanted object", + ); + + expect(() => { + oidcAuthenticator.initialize({ + callbackUrl: 'https://backstage.test/callback', + config: new ConfigReader({ + metadataUrl: 'https://oidc.test/.well-known/openid-configuration', + clientId: 'clientId', + clientSecret: 'clientSecret', + timeout: { + seconds: '30s', + }, + }), + }); + }).toThrow( + "Failed to read duration from config, Error: Unable to convert config value for key 'timeout.seconds' in 'mock-config' to a number", + ); + }); + }); + describe('#start', () => { let fakeSession: Record; let startRequest: OAuthAuthenticatorStartInput; From 98ff86af2e98f31f7b23795c0a51c2386284fcc3 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Thu, 13 Mar 2025 14:04:58 +0500 Subject: [PATCH 037/119] fixed config imports Signed-off-by: Ruslan Nasyrov --- plugins/auth-backend-module-oidc-provider/config.d.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/auth-backend-module-oidc-provider/config.d.ts b/plugins/auth-backend-module-oidc-provider/config.d.ts index 4c7c435e54..907db35612 100644 --- a/plugins/auth-backend-module-oidc-provider/config.d.ts +++ b/plugins/auth-backend-module-oidc-provider/config.d.ts @@ -15,8 +15,6 @@ */ import { HumanDuration } from '@backstage/types'; -import { HumanDuration } from '@backstage/types'; - export interface Config { auth?: { providers?: { @@ -38,9 +36,9 @@ export interface Config { signIn?: { resolvers: Array< | { - resolver: 'emailLocalPartMatchingUserEntityName'; - allowedDomains?: string[]; - } + resolver: 'emailLocalPartMatchingUserEntityName'; + allowedDomains?: string[]; + } | { resolver: 'emailMatchingUserEntityProfileEmail' } >; }; From c197bf80dc76d4db7ffe10db9f348fd9f000fc3a Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Fri, 14 Mar 2025 16:18:08 +0500 Subject: [PATCH 038/119] prettier fix Signed-off-by: Ruslan Nasyrov --- plugins/auth-backend-module-oidc-provider/config.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/auth-backend-module-oidc-provider/config.d.ts b/plugins/auth-backend-module-oidc-provider/config.d.ts index 907db35612..65716a46b6 100644 --- a/plugins/auth-backend-module-oidc-provider/config.d.ts +++ b/plugins/auth-backend-module-oidc-provider/config.d.ts @@ -36,9 +36,9 @@ export interface Config { signIn?: { resolvers: Array< | { - resolver: 'emailLocalPartMatchingUserEntityName'; - allowedDomains?: string[]; - } + resolver: 'emailLocalPartMatchingUserEntityName'; + allowedDomains?: string[]; + } | { resolver: 'emailMatchingUserEntityProfileEmail' } >; }; From 8f68415a7365ef5af79ee28c501cd48621dba811 Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Mon, 17 Mar 2025 11:12:46 +0500 Subject: [PATCH 039/119] fix test Signed-off-by: Ruslan Nasyrov --- .../src/authenticator.test.ts | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts index d12427f127..a7a80da9ab 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts @@ -117,12 +117,12 @@ describe('oidcAuthenticator', () => { return res( req.headers.get('Authorization') ? ctx.json({ - access_token: 'accessToken', - id_token: idToken, - refresh_token: 'refreshToken', - scope: 'testScope', - expires_in: 3600, - }) + access_token: 'accessToken', + id_token: idToken, + refresh_token: 'refreshToken', + scope: 'testScope', + expires_in: 3600, + }) : ctx.status(401), ); }), @@ -220,12 +220,10 @@ describe('oidcAuthenticator', () => { metadataUrl: 'https://oidc.test/.well-known/openid-configuration', clientId: 'clientId', clientSecret: 'clientSecret', - timeout: '30s', + timeout: 123, // Invalid: should be a duration object }), }); - }).toThrow( - "Failed to read duration from config, TypeError: Invalid type in config for key 'timeout' in 'mock-config', got string, wanted object", - ); + }).toThrow(); expect(() => { oidcAuthenticator.initialize({ @@ -235,13 +233,11 @@ describe('oidcAuthenticator', () => { clientId: 'clientId', clientSecret: 'clientSecret', timeout: { - seconds: '30s', + invalid: 'value', }, }), }); - }).toThrow( - "Failed to read duration from config, Error: Unable to convert config value for key 'timeout.seconds' in 'mock-config' to a number", - ); + }).toThrow(); }); }); From 5803ea239b48adfce4fd99be0b82ff3b89a50dfb Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Mon, 17 Mar 2025 12:45:07 +0500 Subject: [PATCH 040/119] prettier fix Signed-off-by: Ruslan Nasyrov --- .../src/authenticator.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts index a7a80da9ab..c327d4ecc5 100644 --- a/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts +++ b/plugins/auth-backend-module-oidc-provider/src/authenticator.test.ts @@ -117,12 +117,12 @@ describe('oidcAuthenticator', () => { return res( req.headers.get('Authorization') ? ctx.json({ - access_token: 'accessToken', - id_token: idToken, - refresh_token: 'refreshToken', - scope: 'testScope', - expires_in: 3600, - }) + access_token: 'accessToken', + id_token: idToken, + refresh_token: 'refreshToken', + scope: 'testScope', + expires_in: 3600, + }) : ctx.status(401), ); }), From ba88bfa464ed664898c2eafc6ca4033fcaa519a1 Mon Sep 17 00:00:00 2001 From: deepthi-28 Date: Mon, 17 Mar 2025 15:55:21 +0530 Subject: [PATCH 041/119] Delete pop up button is added for dev tools Signed-off-by: deepthi-28 --- .changeset/deep-flies-vanish.md | 5 + .../src/components/DeleteEntityDialog.tsx | 64 +++++++++++++ .../src/components/FailedEntities.tsx | 96 +++++++++++-------- 3 files changed, 127 insertions(+), 38 deletions(-) create mode 100644 .changeset/deep-flies-vanish.md create mode 100644 plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx diff --git a/.changeset/deep-flies-vanish.md b/.changeset/deep-flies-vanish.md new file mode 100644 index 0000000000..8ae47e9b81 --- /dev/null +++ b/.changeset/deep-flies-vanish.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-unprocessed-entities': patch +--- + +Added confirmation popup for delete entities in devtools diff --git a/plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx b/plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx new file mode 100644 index 0000000000..a1843b43b6 --- /dev/null +++ b/plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx @@ -0,0 +1,64 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import React, { useState } from 'react'; +import { assertError } from '@backstage/errors'; + +interface DeleteEntityDialogProps { + open: boolean; + onClose: () => any; + onConfirm: () => any; +} + +export function DeleteEntityDialog(props: DeleteEntityDialogProps) { + const { open, onClose, onConfirm } = props; + const [busy, setBusy] = useState(false); + const onDelete = async () => { + setBusy(true); + try { + onConfirm(); + } catch (err) { + assertError(err); + } finally { + setBusy(false); + } + }; + + return ( + + + Are you sure you want to delete this entity? + + + + + + + ); +} diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 65e6eb731e..26d3fd8b5b 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -34,6 +34,7 @@ import { EntityDialog } from './EntityDialog'; import { catalogUnprocessedEntitiesApiRef } from '../api'; import useAsync from 'react-use/esm/useAsync'; import DeleteIcon from '@material-ui/icons/Delete'; +import { DeleteEntityDialog } from './DeleteEntityDialog'; const useStyles = makeStyles((theme: Theme) => ({ errorBox: { @@ -117,6 +118,9 @@ export const FailedEntities = () => { const [, setSelectedSearchTerm] = useState(''); const unprocessedEntityApi = useApi(catalogUnprocessedEntitiesApiRef); const alertApi = useApi(alertApiRef); + const [entityID, setEntityID] = useState(''); + const [entityRefVal, setEntityRefVal] = useState(''); + const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false); if (loading) { return ; @@ -125,25 +129,32 @@ export const FailedEntities = () => { return ; } - const handleDelete = async ({ + const handleDelete = ({ entityId, entityRef, }: { entityId: string; entityRef: string; }) => { + setEntityID(entityId); + setEntityRefVal(entityRef); + setConfirmationDialogOpen(true); + }; + + const cleanUpAfterRemoval = async () => { try { - await unprocessedEntityApi.delete(entityId); + await unprocessedEntityApi.delete(entityID); alertApi.post({ - message: `Entity ${entityRef} has been deleted`, + message: `Entity ${entityRefVal} has been deleted`, severity: 'success', }); } catch (e) { alertApi.post({ - message: `Ran into an issue when deleting ${entityRef}. Please try again later.`, + message: `Ran into an issue when deleting ${entityRefVal}. Please try again later.`, severity: 'error', }); } + setConfirmationDialogOpen(false); }; const columns: TableColumn[] = [ @@ -213,8 +224,8 @@ export const FailedEntities = () => { return ( - await handleDelete({ + onClick={() => + handleDelete({ entityId: entity_id, entityRef: entity_ref, }) @@ -228,37 +239,46 @@ export const FailedEntities = () => { ]; return ( - - No failed entities found - - } - onSearchChange={(searchTerm: string) => setSelectedSearchTerm(searchTerm)} - detailPanel={({ rowData }) => { - const errors = (rowData as UnprocessedEntity).errors; - return ( - <> - {errors?.map((e, idx) => { - return ( - - - {e.name} - - - - - ); - })} - - ); - }} - /> + <> +
+ No failed entities found + + } + onSearchChange={(searchTerm: string) => + setSelectedSearchTerm(searchTerm) + } + detailPanel={({ rowData }) => { + const errors = (rowData as UnprocessedEntity).errors; + return ( + <> + {errors?.map((e, idx) => { + return ( + + + {e.name} + + + + + ); + })} + + ); + }} + /> + setConfirmationDialogOpen(false)} + onConfirm={cleanUpAfterRemoval} + /> + ); }; From 9a6080e6771e2a97837480683da877d6f07f4037 Mon Sep 17 00:00:00 2001 From: Hellgren Heikki Date: Tue, 18 Mar 2025 12:16:14 +0200 Subject: [PATCH 042/119] feat(notifications): support notification send throttling Signed-off-by: Hellgren Heikki --- .changeset/rotten-bobcats-notice.md | 5 + plugins/notifications-backend/config.d.ts | 32 ++++ plugins/notifications-backend/package.json | 6 +- .../src/service/router.ts | 138 +++++++++++------- yarn.lock | 2 + 5 files changed, 127 insertions(+), 56 deletions(-) create mode 100644 .changeset/rotten-bobcats-notice.md create mode 100644 plugins/notifications-backend/config.d.ts diff --git a/.changeset/rotten-bobcats-notice.md b/.changeset/rotten-bobcats-notice.md new file mode 100644 index 0000000000..0f6d1c74f9 --- /dev/null +++ b/.changeset/rotten-bobcats-notice.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications-backend': patch +--- + +Allow throttling notification sending not to block the system with huge amount of receiving users diff --git a/plugins/notifications-backend/config.d.ts b/plugins/notifications-backend/config.d.ts new file mode 100644 index 0000000000..5dd795f8d3 --- /dev/null +++ b/plugins/notifications-backend/config.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { HumanDuration } from '@backstage/types'; + +export interface Config { + /** + * Configuration options for notifications-backend + */ + notifications?: { + /** + * Concurrency limit for notification sending, defaults to 10 + */ + concurrencyLimit?: number; + /** + * Throttle duration between notification sending, defaults to 50ms + */ + throttleInterval?: HumanDuration | string; + }; +} diff --git a/plugins/notifications-backend/package.json b/plugins/notifications-backend/package.json index c96539caf8..6e9de108db 100644 --- a/plugins/notifications-backend/package.json +++ b/plugins/notifications-backend/package.json @@ -26,6 +26,7 @@ "types": "src/index.ts", "files": [ "dist", + "config.d.ts", "migrations/**/*.{js,d.ts}" ], "scripts": { @@ -49,9 +50,11 @@ "@backstage/plugin-notifications-common": "workspace:^", "@backstage/plugin-notifications-node": "workspace:^", "@backstage/plugin-signals-node": "workspace:^", + "@backstage/types": "workspace:^", "express": "^4.17.1", "express-promise-router": "^4.1.0", "knex": "^3.0.0", + "p-throttle": "^4.1.1", "uuid": "^11.0.0", "winston": "^3.2.1", "yn": "^4.0.0" @@ -68,5 +71,6 @@ "@types/supertest": "^2.0.8", "msw": "^1.0.0", "supertest": "^7.0.0" - } + }, + "configSchema": "config.d.ts" } diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts index 368974b6ca..7f0279b437 100644 --- a/plugins/notifications-backend/src/service/router.ts +++ b/plugins/notifications-backend/src/service/router.ts @@ -48,7 +48,9 @@ import { } from '@backstage/plugin-notifications-common'; import { parseEntityOrderFieldParams } from './parseEntityOrderFieldParams'; import { getUsersForEntityRef } from './getUsersForEntityRef'; -import { Config } from '@backstage/config'; +import { Config, readDurationFromConfig } from '@backstage/config'; +import { durationToMilliseconds } from '@backstage/types'; +import pThrottle from 'p-throttle'; /** @internal */ export interface RouterOptions { @@ -82,6 +84,19 @@ export async function createRouter( const WEB_NOTIFICATION_CHANNEL = 'Web'; const store = await DatabaseNotificationsStore.create({ database }); const frontendBaseUrl = config.getString('app.baseUrl'); + const concurrencyLimit = + config.getOptionalNumber('notifications.concurrencyLimit') ?? 10; + const throttleInterval = config.has('notifications.throttleInterval') + ? durationToMilliseconds( + readDurationFromConfig(config, { + key: 'notifications.throttleInterval', + }), + ) + : 50; + const throttle = pThrottle({ + limit: concurrencyLimit, + interval: throttleInterval, + }); const getUser = async (req: Request) => { const credentials = await httpAuth.credentials(req, { allow: ['user'] }); @@ -470,71 +485,84 @@ export async function createRouter( }, channel: 'notifications', }); - postProcessNotification(ret, opts); } + postProcessNotification(ret, opts); return notification; }; + const sendUserNotification = async ( + baseNotification: Omit, + user: string, + opts: NotificationSendOptions, + origin: string, + scope?: string, + ): Promise => { + const userNotification = { + ...baseNotification, + id: uuid(), + user, + }; + const notification = await preProcessNotification(userNotification, opts); + + const enabled = await isNotificationsEnabled({ + user, + channel: WEB_NOTIFICATION_CHANNEL, + origin: userNotification.origin, + }); + + let ret = notification; + + if (!enabled) { + postProcessNotification(ret, opts); + return undefined; + } + + let existingNotification; + if (scope) { + existingNotification = await store.getExistingScopeNotification({ + user, + scope, + origin, + }); + } + + if (existingNotification) { + const restored = await store.restoreExistingNotification({ + id: existingNotification.id, + notification, + }); + ret = restored ?? notification; + } else { + await store.saveNotification(notification); + } + + if (signals) { + await signals.publish({ + recipients: { type: 'user', entityRef: [user] }, + message: { + action: 'new_notification', + notification_id: ret.id, + }, + channel: 'notifications', + }); + } + postProcessNotification(ret, opts); + return ret; + }; + const sendUserNotifications = async ( baseNotification: Omit, users: string[], opts: NotificationSendOptions, origin: string, - ) => { - const notifications = []; + ): Promise => { const { scope } = opts.payload; const uniqueUsers = [...new Set(users)]; - for (const user of uniqueUsers) { - const userNotification = { - ...baseNotification, - id: uuid(), - user, - }; - const notification = await preProcessNotification(userNotification, opts); - - const enabled = await isNotificationsEnabled({ - user, - channel: WEB_NOTIFICATION_CHANNEL, - origin: userNotification.origin, - }); - - let ret = notification; - if (enabled) { - let existingNotification; - if (scope) { - existingNotification = await store.getExistingScopeNotification({ - user, - scope, - origin, - }); - } - - if (existingNotification) { - const restored = await store.restoreExistingNotification({ - id: existingNotification.id, - notification, - }); - ret = restored ?? notification; - } else { - await store.saveNotification(notification); - } - - notifications.push(ret); - - if (signals) { - await signals.publish({ - recipients: { type: 'user', entityRef: [user] }, - message: { - action: 'new_notification', - notification_id: ret.id, - }, - channel: 'notifications', - }); - } - } - postProcessNotification(ret, opts); - } - return notifications; + const throttled = throttle((user: string) => + sendUserNotification(baseNotification, user, opts, origin, scope), + ); + const sent = await Promise.all(uniqueUsers.map(user => throttled(user))); + return sent.filter(n => n !== undefined); }; const createNotificationHandler = async ( diff --git a/yarn.lock b/yarn.lock index 0ea358c567..1f38a972bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7053,12 +7053,14 @@ __metadata: "@backstage/plugin-notifications-node": "workspace:^" "@backstage/plugin-signals-backend": "workspace:^" "@backstage/plugin-signals-node": "workspace:^" + "@backstage/types": "workspace:^" "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 knex: ^3.0.0 msw: ^1.0.0 + p-throttle: ^4.1.1 supertest: ^7.0.0 uuid: ^11.0.0 winston: ^3.2.1 From a580e574ecc779ee799f18a3b0949da3b5d451b4 Mon Sep 17 00:00:00 2001 From: Eric Roberson Date: Tue, 18 Mar 2025 08:05:15 -0700 Subject: [PATCH 043/119] docs: add imports to example Signed-off-by: Eric Roberson --- docs/features/software-catalog/external-integrations.md | 8 +++++++- .../README.md | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/features/software-catalog/external-integrations.md b/docs/features/software-catalog/external-integrations.md index 915726eb6c..64468f7f41 100644 --- a/docs/features/software-catalog/external-integrations.md +++ b/docs/features/software-catalog/external-integrations.md @@ -1157,6 +1157,12 @@ export class MyIncrementalEntityProvider The last step is to implement the actual `next` method that will accept the cursor, call the API, process the result and return the result. ```ts +import { + ANNOTATION_LOCATION, + ANNOTATION_ORIGIN_LOCATION, +} from '@backstage/catalog-model'; +import { IncrementalEntityProvider } from '@backstage/plugin-catalog-backend-module-incremental-ingestion'; + export class MyIncrementalEntityProvider implements IncrementalEntityProvider { @@ -1183,7 +1189,7 @@ export class MyIncrementalEntityProvider cursor: Cursor = { page: 1 }, ): Promise> { const { apiClient } = context; - const location = `${this.getProviderName()}:${mySource}`; + const location = `${this.getProviderName()}:${this.mySource}`; // call your API with the current cursor const data = await apiClient.getServices(cursor); diff --git a/plugins/catalog-backend-module-incremental-ingestion/README.md b/plugins/catalog-backend-module-incremental-ingestion/README.md index ee47d759b9..7673ca08ab 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/README.md +++ b/plugins/catalog-backend-module-incremental-ingestion/README.md @@ -208,6 +208,12 @@ export class MyIncrementalEntityProvider The last step is to implement the actual `next` method that will accept the cursor, call the API, process the result and return the result. ```ts +import { + ANNOTATION_LOCATION, + ANNOTATION_ORIGIN_LOCATION, +} from '@backstage/catalog-model'; +import { IncrementalEntityProvider } from '@backstage/plugin-catalog-backend-module-incremental-ingestion'; + export class MyIncrementalEntityProvider implements IncrementalEntityProvider { token: string; @@ -232,7 +238,7 @@ export class MyIncrementalEntityProvider implements IncrementalEntityProvider> { const { apiClient } = context; - const location = `${this.getProviderName()}:${mySource}`; + const location = `${this.getProviderName()}:${this.mySource}`; // call your API with the current cursor const data = await apiClient.getServices(cursor); From 356e102bc73d561423079528780c0b5cb975e2d8 Mon Sep 17 00:00:00 2001 From: Lavanya Sainik Date: Mon, 24 Feb 2025 16:11:35 +0000 Subject: [PATCH 044/119] Added support for filtering based on system column in catalog table Signed-off-by: Lavanya Sainik --- .../src/components/CatalogTable/columns.tsx | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/plugins/catalog/src/components/CatalogTable/columns.tsx b/plugins/catalog/src/components/CatalogTable/columns.tsx index d88cc9a77d..87de8bfc91 100644 --- a/plugins/catalog/src/components/CatalogTable/columns.tsx +++ b/plugins/catalog/src/components/CatalogTable/columns.tsx @@ -63,19 +63,16 @@ export const columnFactories = Object.freeze({ title: 'System', field: 'resolved.partOfSystemRelationTitle', customFilterAndSearch: (query, row) => { - let systems: JsonArray = []; - if ( - row.entity?.spec?.system && - Array.isArray(row.entity?.spec?.system) - ) { - systems = row.entity?.spec?.system; - } else if (row.entity?.spec?.system) { - systems = [row.entity?.spec?.system]; + if (!row.resolved.partOfSystemRelations) { + return false; } - return systems - .join(', ') - .toLocaleUpperCase('en-US') - .includes(query.toLocaleUpperCase('en-US')); + + const systemNames = row.resolved.partOfSystemRelations.map( + ref => ref.name, + ); // Extract system names from entityRefs + + const searchText = systemNames.join(', ').toLocaleUpperCase('en-US'); + return searchText.includes(query.toLocaleUpperCase('en-US')); }, render: ({ resolved }) => ( Date: Wed, 19 Mar 2025 17:11:51 +0000 Subject: [PATCH 045/119] Update Storybook to fix composeStories Signed-off-by: Charles de Dreuille --- canon-docs/package.json | 4 +- .../src/app/(docs)/components/button/page.mdx | 23 +- canon-docs/src/snippets/button.tsx | 120 +--- canon-docs/yarn.lock | 493 ++++++++++----- packages/canon/.storybook/manager.ts | 12 - packages/canon/package.json | 17 +- yarn.lock | 562 +++++++++--------- 7 files changed, 682 insertions(+), 549 deletions(-) delete mode 100644 packages/canon/.storybook/manager.ts diff --git a/canon-docs/package.json b/canon-docs/package.json index 8558fac8e3..7bdaa718be 100644 --- a/canon-docs/package.json +++ b/canon-docs/package.json @@ -14,7 +14,7 @@ "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", "@next/mdx": "^15.1.4", - "@storybook/react": "^8.4.7", + "@storybook/react": "9.0.0-alpha.8", "@uiw/codemirror-themes": "^4.23.7", "@uiw/react-codemirror": "^4.23.7", "motion": "^12.4.1", @@ -23,7 +23,7 @@ "react-dom": "^18.0.2", "react-frame-component": "^5.2.7", "shiki": "^1.26.1", - "storybook": "^8.4.7" + "storybook": "9.0.0-alpha.8" }, "devDependencies": { "@types/mdx": "^2.0.13", diff --git a/canon-docs/src/app/(docs)/components/button/page.mdx b/canon-docs/src/app/(docs)/components/button/page.mdx index a92a6675d1..31d821772a 100644 --- a/canon-docs/src/app/(docs)/components/button/page.mdx +++ b/canon-docs/src/app/(docs)/components/button/page.mdx @@ -2,14 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { - ButtonPreview, - ButtonSizes, - ButtonWithIcons, - ButtonFullWidth, - ButtonDisabled, - ButtonResponsive, -} from '@/snippets/button'; +import { ButtonSnippet } from '@/snippets/button'; import { buttonVariants } from '@/snippets/_snippets'; import { buttonPropDefs } from './props'; @@ -20,7 +13,7 @@ A button component that can be used to trigger actions. } + preview={} code={` @@ -98,7 +91,7 @@ Here's a view when buttons have icons. align="center" py={4} open - preview={} + preview={} code={` @@ -114,7 +107,7 @@ Here's a view when buttons are full width. align="center" py={4} open - preview={} + preview={} code={` `} @@ -128,7 +121,7 @@ Here's a view when buttons are disabled. align="center" py={4} open - preview={} + preview={} code={``} /> @@ -140,7 +133,7 @@ Here's a view when buttons are responsive. align="center" py={4} open - preview={} + preview={} code={``} diff --git a/canon-docs/src/snippets/button.tsx b/canon-docs/src/snippets/button.tsx index aa20b3e46a..e1b60fa72a 100644 --- a/canon-docs/src/snippets/button.tsx +++ b/canon-docs/src/snippets/button.tsx @@ -1,102 +1,26 @@ 'use client'; -import { Button, Flex, ButtonProps, Text } from '../../../packages/canon'; +import { composeStories } from '@storybook/react'; +import * as ButtonStories from '../../../packages/canon/src/components/Button/Button.stories'; +import { useEffect, useState } from 'react'; -export const ButtonPreview = () => { - return ( - - - - - ); -}; - -export const ButtonSizes = () => { - return ( - - - - - ); -}; - -export const ButtonWithIcons = () => { - return ( - - - - - - ); -}; - -export const ButtonFullWidth = () => { - return ( - - - - - - ); -}; - -export const ButtonDisabled = () => { - return ; -}; - -export const ButtonResponsive = () => { - return ( - - ); -}; - -export const ButtonPlayground = () => { - const variants: string[] = ['primary', 'secondary', 'tertiary']; - - return ( - - {variants.map(variant => ( - - {variant} - {['small', 'medium'].map(size => ( - - - - - - ))} - - ))} - - ); +export const ButtonSnippet = ({ story }: { story: string }) => { + const stories = composeStories(ButtonStories); + const [isReady, setIsReady] = useState(false); + + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Variants') return ; + if (story === 'Sizes') return ; + if (story === 'WithIcons') return ; + if (story === 'FullWidth') return ; + if (story === 'Disabled') return ; + if (story === 'Responsive') return ; + if (story === 'Playground') return ; + + return null; }; diff --git a/canon-docs/yarn.lock b/canon-docs/yarn.lock index 858a1106e0..204a4bd898 100644 --- a/canon-docs/yarn.lock +++ b/canon-docs/yarn.lock @@ -5,12 +5,37 @@ __metadata: version: 6 cacheKey: 8 -"@babel/runtime@npm:^7.18.6": - version: 7.26.0 - resolution: "@babel/runtime@npm:7.26.0" +"@adobe/css-tools@npm:^4.4.0": + version: 4.4.2 + resolution: "@adobe/css-tools@npm:4.4.2" + checksum: ecc9f626fab00c0d17dc62a3427e515cb6f4413d565d7492184331604530e42e00efbd2d8f6a767b7dbfc68a8a581f270fcddf4eb6bb8cddbb52d1d1df38dc99 + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.10.4": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": ^7.25.9 + js-tokens: ^4.0.0 + picocolors: ^1.0.0 + checksum: db13f5c42d54b76c1480916485e6900748bbcb0014a8aca87f50a091f70ff4e0d0a6db63cade75eb41fcc3d2b6ba0a7f89e343def4f96f00269b41b8ab8dd7b8 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 5b85918cb1a92a7f3f508ea02699e8d2422fe17ea8e82acd445006c0ef7520fbf48e3dbcdaf7b0a1d571fc3a2715a29719e5226636cb6042e15fe6ed2a590944 + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.6": + version: 7.26.10 + resolution: "@babel/runtime@npm:7.26.10" dependencies: regenerator-runtime: ^0.14.0 - checksum: c8e2c0504ab271b3467a261a8f119bf2603eb857a0d71e37791f4e3fae00f681365073cc79f141ddaa90c6077c60ba56448004ad5429d07ac73532be9f7cf28a + checksum: 22d2e0abb86e90de489ab16bb578db6fe2b63a88696db431198b24963749820c723f1982298cdbbea187f7b2b80fb4d98a514faf114ddb2fdc14a4b96277b955 languageName: node linkType: hard @@ -722,39 +747,6 @@ __metadata: languageName: node linkType: hard -"@storybook/components@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/components@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: b50923e759eea99320fdf8946056fb33614b9d993ca567207cd0d714e5fae83da485b64b0d74a18b84355396b33c28b5eea050484c40967873c540f83d314b9a - languageName: node - linkType: hard - -"@storybook/core@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/core@npm:8.6.4" - dependencies: - "@storybook/theming": 8.6.4 - better-opn: ^3.0.2 - browser-assert: ^1.2.1 - esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 - esbuild-register: ^3.5.0 - jsdoc-type-pratt-parser: ^4.0.0 - process: ^0.11.10 - recast: ^0.23.5 - semver: ^7.6.2 - util: ^0.12.5 - ws: ^8.2.3 - peerDependencies: - prettier: ^2 || ^3 - peerDependenciesMeta: - prettier: - optional: true - checksum: 8352b0f65bd7c0462471409a7f086125f4e1a93e1777fa20268beb78109f9784cc1d75536a4f9136368db87ba3c5c11987c95835937ba4c2776f968365795d8f - languageName: node - linkType: hard - "@storybook/global@npm:^5.0.0": version: 5.0.0 resolution: "@storybook/global@npm:5.0.0" @@ -762,66 +754,32 @@ __metadata: languageName: node linkType: hard -"@storybook/manager-api@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/manager-api@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 50447d3961dfab2b2f36afa76aaeb779a9b51ca66a912bc763103f18f2f71514191388b101ec83093ac9dee6ab509b955da41325f15d88cfe1c480e7d7d1f9eb - languageName: node - linkType: hard - -"@storybook/preview-api@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/preview-api@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: d8f642de8053686192e28f7ec748944c99c9e4d0cef7f13d96e840fd159c8bea2e3139b88a84eb16009fbda3152a61d9e075777211c10773e4d01fd103bf0e28 - languageName: node - linkType: hard - -"@storybook/react-dom-shim@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/react-dom-shim@npm:8.6.4" +"@storybook/react-dom-shim@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/react-dom-shim@npm:9.0.0-alpha.8" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 - checksum: 0062191f312c0bf32e622904b9da7176c961cec99258c6b230c3fb6758c1cca95ac4142d4701628dc8eb922601d74c350549b78e146b5af1747edf8cb3def756 + storybook: ^9.0.0-alpha.8 + checksum: e235aca5a13900a580fdaa7b11ff00b7dbb389e3b2701ba12688d4d624fe83f6d1448a61c649f4f95f52d72e46fffa67be4cacbf005637110b4f3c372d821d38 languageName: node linkType: hard -"@storybook/react@npm:^8.4.7": - version: 8.6.4 - resolution: "@storybook/react@npm:8.6.4" +"@storybook/react@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/react@npm:9.0.0-alpha.8" dependencies: - "@storybook/components": 8.6.4 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 8.6.4 - "@storybook/preview-api": 8.6.4 - "@storybook/react-dom-shim": 8.6.4 - "@storybook/theming": 8.6.4 + "@storybook/react-dom-shim": 9.0.0-alpha.8 peerDependencies: - "@storybook/test": 8.6.4 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 - typescript: ">= 4.2.x" + storybook: ^9.0.0-alpha.8 + typescript: ">= 4.9.x" peerDependenciesMeta: - "@storybook/test": - optional: true typescript: optional: true - checksum: 4e9860c8e177d0dd496e7d6c53927daa8429b82f9c02d5b004de61244573901160a936ba37ce69810fb13e3602391e18723237a901c57e1bd19cf9f58241c30c - languageName: node - linkType: hard - -"@storybook/theming@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/theming@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: b7e13026c381e18e7ad2064e1528876eb01b7563ad16aababcac531ce76f5e59b985a72603f57d75465a611ea564bd46b9b1760634211faf4307f9265f06e044 + checksum: 4ba2b0fe9cab5272856ab6e26dce732dc7baa4650539e9195c5dca0e15fccd87444ab5f580d17ccf5a98eff54621bbb733dd73c82aca2933f68ff753ff5246b3 languageName: node linkType: hard @@ -842,6 +800,46 @@ __metadata: languageName: node linkType: hard +"@testing-library/dom@npm:10.4.0": + version: 10.4.0 + resolution: "@testing-library/dom@npm:10.4.0" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: 5.3.0 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: bb128b90be0c8cd78c5f5e67aa45f53de614cc048a2b50b230e736ec710805ac6c73375af354b83c74d710b3928d52b83a273a4cb89de4eb3efe49e91e706837 + languageName: node + linkType: hard + +"@testing-library/jest-dom@npm:^6.6.3": + version: 6.6.3 + resolution: "@testing-library/jest-dom@npm:6.6.3" + dependencies: + "@adobe/css-tools": ^4.4.0 + aria-query: ^5.0.0 + chalk: ^3.0.0 + css.escape: ^1.5.1 + dom-accessibility-api: ^0.6.3 + lodash: ^4.17.21 + redent: ^3.0.0 + checksum: c1dc4260b05309a0084416639006cd105849acc5b102bef682a3b19bd6fce07ff6762085fc7f2599546c995a2fc66fdb1d70e50e22a634a0098524056cc9e511 + languageName: node + linkType: hard + +"@testing-library/user-event@npm:^14.6.1": + version: 14.6.1 + resolution: "@testing-library/user-event@npm:14.6.1" + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: 4cb8a81fea1fea83a42619e9545137b51636bb7a3182c596bb468e5664f1e4699a275c2d0fb8b6dcc3fe2684f9d87b0637ab7cb4f566051539146872c9141fcb + languageName: node + linkType: hard + "@types/acorn@npm:^4.0.0": version: 4.0.6 resolution: "@types/acorn@npm:4.0.6" @@ -851,6 +849,13 @@ __metadata: languageName: node linkType: hard +"@types/aria-query@npm:^5.0.1": + version: 5.0.4 + resolution: "@types/aria-query@npm:5.0.4" + checksum: ad8b87e4ad64255db5f0a73bc2b4da9b146c38a3a8ab4d9306154334e0fc67ae64e76bfa298eebd1e71830591fb15987e5de7111bdb36a2221bdc379e3415fb0 + languageName: node + linkType: hard + "@types/debug@npm:^4.0.0": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -964,6 +969,13 @@ __metadata: languageName: node linkType: hard +"@types/uuid@npm:^9.0.1": + version: 9.0.8 + resolution: "@types/uuid@npm:9.0.8" + checksum: b8c60b7ba8250356b5088302583d1704a4e1a13558d143c549c408bf8920535602ffc12394ede77f8a8083511b023704bc66d1345792714002bfa261b17c5275 + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": version: 8.19.1 resolution: "@typescript-eslint/eslint-plugin@npm:8.19.1" @@ -1143,6 +1155,47 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/expect@npm:3.0.9" + dependencies: + "@vitest/spy": 3.0.9 + "@vitest/utils": 3.0.9 + chai: ^5.2.0 + tinyrainbow: ^2.0.0 + checksum: 6df325d45e0ad4b6ad73a55e5328f615f92171fc4dbf3875972c08013727cfa435b9916636c7f3902a45f1874db10805d449311b70125edf1422dceb325ac982 + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/pretty-format@npm:3.0.9" + dependencies: + tinyrainbow: ^2.0.0 + checksum: 447b53bd962bc5978cf3e8c67f0600e38470ea63ab6ae24fb048dca79305828f37d9d854a7db1abc97ebde66a65187f87a99ca7969e43c750998c944e3ec48c6 + languageName: node + linkType: hard + +"@vitest/spy@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/spy@npm:3.0.9" + dependencies: + tinyspy: ^3.0.2 + checksum: 1b90f40c4ac34529e7d098c745396a51e9b2f187d31d50a664ac7374db56edb3792862a35d1b8049e421705db6445761d687f9f8c5e298a9ca6cfa47d55625d7 + languageName: node + linkType: hard + +"@vitest/utils@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/utils@npm:3.0.9" + dependencies: + "@vitest/pretty-format": 3.0.9 + loupe: ^3.1.3 + tinyrainbow: ^2.0.0 + checksum: d31797594598817670cc49dfcd4ded2953d707c62e5dc7807737e8108073e97499cf7ef2eb3295f1fb52446a8a85ba50aacef21126689251092bc8566bff4bb6 + languageName: node + linkType: hard + "acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -1196,6 +1249,13 @@ __metadata: languageName: node linkType: hard +"ansi-styles@npm:^5.0.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 + languageName: node + linkType: hard + "ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" @@ -1210,7 +1270,16 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.3.2": +"aria-query@npm:5.3.0": + version: 5.3.0 + resolution: "aria-query@npm:5.3.0" + dependencies: + dequal: ^2.0.3 + checksum: 305bd73c76756117b59aba121d08f413c7ff5e80fa1b98e217a3443fcddb9a232ee790e24e432b59ae7625aebcf4c47cb01c2cac872994f0b426f5bdfcd96ba9 + languageName: node + linkType: hard + +"aria-query@npm:^5.0.0, aria-query@npm:^5.3.2": version: 5.3.2 resolution: "aria-query@npm:5.3.2" checksum: d971175c85c10df0f6d14adfe6f1292409196114ab3c62f238e208b53103686f46cc70695a4f775b73bc65f6a09b6a092fd963c4f3a5a7d690c8fc5094925717 @@ -1321,6 +1390,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: a0789dd882211b87116e81e2648ccb7f60340b34f19877dd020b39ebb4714e475eb943e14ba3e22201c221ef6645b7bfe10297e76b6ac95b48a9898c1211ce66 + languageName: node + linkType: hard + "ast-types-flow@npm:^0.0.8": version: 0.0.8 resolution: "ast-types-flow@npm:0.0.8" @@ -1420,13 +1496,6 @@ __metadata: languageName: node linkType: hard -"browser-assert@npm:^1.2.1": - version: 1.2.1 - resolution: "browser-assert@npm:1.2.1" - checksum: 8b2407cd04c1ed592cf892dec35942b7d72635829221e0788c9a16c4d2afa8b7156bc9705b1c4b32c30d88136c576fda3cbcb8f494d6f865264c706ea8798d92 - languageName: node - linkType: hard - "busboy@npm:1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -1491,7 +1560,7 @@ __metadata: "@mdx-js/loader": ^3.1.0 "@mdx-js/react": ^3.1.0 "@next/mdx": ^15.1.4 - "@storybook/react": ^8.4.7 + "@storybook/react": 9.0.0-alpha.8 "@types/mdx": ^2.0.13 "@types/node": ^20 "@types/react": ^18.0.0 @@ -1507,7 +1576,7 @@ __metadata: react-dom: ^18.0.2 react-frame-component: ^5.2.7 shiki: ^1.26.1 - storybook: ^8.4.7 + storybook: 9.0.0-alpha.8 typescript: ^5 languageName: unknown linkType: soft @@ -1519,7 +1588,30 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0": +"chai@npm:^5.2.0": + version: 5.2.0 + resolution: "chai@npm:5.2.0" + dependencies: + assertion-error: ^2.0.1 + check-error: ^2.1.1 + deep-eql: ^5.0.1 + loupe: ^3.1.0 + pathval: ^2.0.0 + checksum: 15e4ba12d02df3620fd59b4a6e8efe43b47872ce61f1c0ca77ac1205a2a5898f3b6f1f52408fd1a708b8d07fdfb5e65b97af40bad9fd94a69ed8d4264c7a69f1 + languageName: node + linkType: hard + +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + +"chalk@npm:^4.0.0, chalk@npm:^4.1.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1557,6 +1649,13 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^2.1.1": + version: 2.1.1 + resolution: "check-error@npm:2.1.1" + checksum: d785ed17b1d4a4796b6e75c765a9a290098cf52ff9728ce0756e8ffd4293d2e419dd30c67200aee34202463b474306913f2fcfaf1890641026d9fc6966fea27a + languageName: node + linkType: hard + "client-only@npm:0.0.1": version: 0.0.1 resolution: "client-only@npm:0.0.1" @@ -1634,6 +1733,13 @@ __metadata: languageName: node linkType: hard +"css.escape@npm:^1.5.1": + version: 1.5.1 + resolution: "css.escape@npm:1.5.1" + checksum: f6d38088d870a961794a2580b2b2af1027731bb43261cfdce14f19238a88664b351cc8978abc20f06cc6bbde725699dec8deb6fe9816b139fc3f2af28719e774 + languageName: node + linkType: hard + "csstype@npm:^3.0.2": version: 3.1.3 resolution: "csstype@npm:3.1.3" @@ -1711,6 +1817,13 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^5.0.1": + version: 5.0.2 + resolution: "deep-eql@npm:5.0.2" + checksum: 6aaaadb4c19cbce42e26b2bbe5bd92875f599d2602635dc97f0294bae48da79e89470aedee05f449e0ca8c65e9fd7e7872624d1933a1db02713d99c2ca8d1f24 + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -1747,7 +1860,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0": +"dequal@npm:^2.0.0, dequal@npm:^2.0.3": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 @@ -1790,6 +1903,20 @@ __metadata: languageName: node linkType: hard +"dom-accessibility-api@npm:^0.5.9": + version: 0.5.16 + resolution: "dom-accessibility-api@npm:0.5.16" + checksum: 005eb283caef57fc1adec4d5df4dd49189b628f2f575af45decb210e04d634459e3f1ee64f18b41e2dcf200c844bc1d9279d80807e686a30d69a4756151ad248 + languageName: node + linkType: hard + +"dom-accessibility-api@npm:^0.6.3": + version: 0.6.3 + resolution: "dom-accessibility-api@npm:0.6.3" + checksum: c325b5144bb406df23f4affecffc117dbaec9af03daad9ee6b510c5be647b14d28ef0a4ea5ca06d696d8ab40bb777e5fed98b985976fdef9d8790178fa1d573f + languageName: node + linkType: hard + "dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": version: 1.0.1 resolution: "dunder-proto@npm:1.0.1" @@ -2931,6 +3058,13 @@ __metadata: languageName: node linkType: hard +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -2941,7 +3075,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:^2.0.3": +"inherits@npm:2": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -2983,16 +3117,6 @@ __metadata: languageName: node linkType: hard -"is-arguments@npm:^1.0.4": - version: 1.2.0 - resolution: "is-arguments@npm:1.2.0" - dependencies: - call-bound: ^1.0.2 - has-tostringtag: ^1.0.2 - checksum: aae9307fedfe2e5be14aebd0f48a9eeedf6b8c8f5a0b66257b965146d1e94abdc3f08e3dce3b1d908e1fa23c70039a88810ee1d753905758b9b6eebbab0bafeb - languageName: node - linkType: hard - "is-array-buffer@npm:^3.0.4, is-array-buffer@npm:^3.0.5": version: 3.0.5 resolution: "is-array-buffer@npm:3.0.5" @@ -3120,7 +3244,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": +"is-generator-function@npm:^1.0.10": version: 1.1.0 resolution: "is-generator-function@npm:1.1.0" dependencies: @@ -3235,7 +3359,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15, is-typed-array@npm:^1.1.3": +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15": version: 1.1.15 resolution: "is-typed-array@npm:1.1.15" dependencies: @@ -3320,7 +3444,7 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0": +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 @@ -3550,6 +3674,13 @@ __metadata: languageName: node linkType: hard +"lodash@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 + languageName: node + linkType: hard + "longest-streak@npm:^3.0.0": version: 3.1.0 resolution: "longest-streak@npm:3.1.0" @@ -3568,6 +3699,13 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.0, loupe@npm:^3.1.3": + version: 3.1.3 + resolution: "loupe@npm:3.1.3" + checksum: 9b2530b1d5a44d2c9fc5241f97ea00296dca257173c535b4832bc31f9516e10387991feb5b3fff23df116c8fcf907ce3980f82b215dcc5d19cde17ce9b9ec3e1 + languageName: node + linkType: hard + "lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -3575,6 +3713,15 @@ __metadata: languageName: node linkType: hard +"lz-string@npm:^1.5.0": + version: 1.5.0 + resolution: "lz-string@npm:1.5.0" + bin: + lz-string: bin/bin.js + checksum: 1ee98b4580246fd90dd54da6e346fb1caefcf05f677c686d9af237a157fdea3fd7c83a4bc58f858cd5b10a34d27afe0fdcbd0505a47e0590726a873dc8b8f65d + languageName: node + linkType: hard + "markdown-extensions@npm:^2.0.0": version: 2.0.0 resolution: "markdown-extensions@npm:2.0.0" @@ -4086,6 +4233,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + "minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -4453,6 +4607,13 @@ __metadata: languageName: node linkType: hard +"pathval@npm:^2.0.0": + version: 2.0.0 + resolution: "pathval@npm:2.0.0" + checksum: 682b6a6289de7990909effef7dae9aa7bb6218c0426727bccf66a35b34e7bfbc65615270c5e44e3c9557a5cb44b1b9ef47fc3cb18bce6ad3ba92bcd28467ed7d + languageName: node + linkType: hard + "picocolors@npm:^1.0.0": version: 1.1.1 resolution: "picocolors@npm:1.1.1" @@ -4467,6 +4628,15 @@ __metadata: languageName: node linkType: hard +"polished@npm:^4.2.2": + version: 4.3.1 + resolution: "polished@npm:4.3.1" + dependencies: + "@babel/runtime": ^7.17.8 + checksum: a6f863c23f1d2f3f5cda3427b5885c9fb9e83b036d681e24820b143c7df40d2685bebb01c0939767120a28e1183671ae17c93db82ac30b3c20942180bb153bc7 + languageName: node + linkType: hard + "possible-typed-array-names@npm:^1.0.0": version: 1.0.0 resolution: "possible-typed-array-names@npm:1.0.0" @@ -4492,10 +4662,14 @@ __metadata: languageName: node linkType: hard -"process@npm:^0.11.10": - version: 0.11.10 - resolution: "process@npm:0.11.10" - checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 +"pretty-format@npm:^27.0.2": + version: 27.5.1 + resolution: "pretty-format@npm:27.5.1" + dependencies: + ansi-regex: ^5.0.1 + ansi-styles: ^5.0.0 + react-is: ^17.0.1 + checksum: cf610cffcb793885d16f184a62162f2dd0df31642d9a18edf4ca298e909a8fe80bdbf556d5c9573992c102ce8bf948691da91bf9739bee0ffb6e79c8a8a6e088 languageName: node linkType: hard @@ -4561,6 +4735,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^17.0.1": + version: 17.0.2 + resolution: "react-is@npm:17.0.2" + checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 + languageName: node + linkType: hard + "react@npm:^18.0.2": version: 18.3.1 resolution: "react@npm:18.3.1" @@ -4631,6 +4812,16 @@ __metadata: languageName: node linkType: hard +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + "reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": version: 1.0.10 resolution: "reflect.getprototypeof@npm:1.0.10" @@ -5053,21 +5244,34 @@ __metadata: languageName: node linkType: hard -"storybook@npm:^8.4.7": - version: 8.6.4 - resolution: "storybook@npm:8.6.4" +"storybook@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "storybook@npm:9.0.0-alpha.8" dependencies: - "@storybook/core": 8.6.4 + "@storybook/global": ^5.0.0 + "@testing-library/dom": 10.4.0 + "@testing-library/jest-dom": ^6.6.3 + "@testing-library/user-event": ^14.6.1 + "@types/uuid": ^9.0.1 + "@vitest/expect": 3.0.9 + "@vitest/spy": 3.0.9 + better-opn: ^3.0.2 + esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 + esbuild-register: ^3.5.0 + jsdoc-type-pratt-parser: ^4.0.0 + polished: ^4.2.2 + recast: ^0.23.5 + semver: ^7.6.2 + uuid: ^9.0.0 + ws: ^8.18.0 peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: prettier: optional: true bin: - getstorybook: ./bin/index.cjs - sb: ./bin/index.cjs storybook: ./bin/index.cjs - checksum: 96c59b5c6ac27dfb9fb85d110b0257a77264015454dd0ca7893ae9df04dbf31e523ff351ba45283f33a58ecb28fd985349aa9c1fb83ab51d0c781a4d5809fa15 + checksum: d48c9b2b05279bc0ee8eabeb505e9b662d576fbd8902311cf6694e1c1eb3ef960e417e20f656b6bc869c14b59bedc77c89b70b50575beb2caa24fcd92d3d15b6 languageName: node linkType: hard @@ -5215,6 +5419,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -5291,6 +5504,20 @@ __metadata: languageName: node linkType: hard +"tinyrainbow@npm:^2.0.0": + version: 2.0.0 + resolution: "tinyrainbow@npm:2.0.0" + checksum: 26360631d97e43955a07cfb70fe40a154ce4e2bcd14fa3d37ce8e2ed8f4fa9e5ba00783e4906bbfefe6dcabef5d3510f5bee207cb693bee4e4e7553f5454bef1 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -5531,16 +5758,12 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.5": - version: 0.12.5 - resolution: "util@npm:0.12.5" - dependencies: - inherits: ^2.0.3 - is-arguments: ^1.0.4 - is-generator-function: ^1.0.7 - is-typed-array: ^1.1.3 - which-typed-array: ^1.1.2 - checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a +"uuid@npm:^9.0.0": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 39931f6da74e307f51c0fb463dc2462807531dc80760a9bff1e35af4316131b4fc3203d16da60ae33f07fdca5b56f3f1dd662da0c99fea9aaeab2004780cc5f4 languageName: node linkType: hard @@ -5617,7 +5840,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18": version: 1.1.18 resolution: "which-typed-array@npm:1.1.18" dependencies: @@ -5678,9 +5901,9 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.2.3": - version: 8.18.0 - resolution: "ws@npm:8.18.0" +"ws@npm:^8.18.0": + version: 8.18.1 + resolution: "ws@npm:8.18.1" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -5689,7 +5912,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 91d4d35bc99ff6df483bdf029b9ea4bfd7af1f16fc91231a96777a63d263e1eabf486e13a2353970efc534f9faa43bdbf9ee76525af22f4752cbc5ebda333975 + checksum: 4658357185d891bc45cc2d42a84f9e192d047e8476fb5cba25b604f7d75ca87ca0dd54cd0b2cc49aeee57c79045a741cb7d0b14501953ac60c790cd105c42f23 languageName: node linkType: hard diff --git a/packages/canon/.storybook/manager.ts b/packages/canon/.storybook/manager.ts deleted file mode 100644 index c88b10b392..0000000000 --- a/packages/canon/.storybook/manager.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { addons } from '@storybook/manager-api'; -import { create } from '@storybook/theming'; - -const theme = create({ - base: 'light', - brandTitle: 'Canon', - brandImage: 'logo.svg', -}); - -addons.setConfig({ - theme, -}); diff --git a/packages/canon/package.json b/packages/canon/package.json index 5227e63fa5..c2c287f937 100644 --- a/packages/canon/package.json +++ b/packages/canon/package.json @@ -47,15 +47,16 @@ }, "devDependencies": { "@backstage/cli": "workspace:^", - "@storybook/addon-essentials": "^8.6.4", - "@storybook/addon-interactions": "^8.6.4", + "@chromatic-com/storybook": "^4.0.0-0", + "@storybook/addon-essentials": "^9.0.0-alpha.8", + "@storybook/addon-interactions": "^9.0.0-alpha.8", "@storybook/addon-styling-webpack": "^1.0.1", - "@storybook/addon-themes": "^8.6.4", + "@storybook/addon-themes": "^9.0.0-alpha.8", "@storybook/addon-webpack5-compiler-swc": "^2.1.0", - "@storybook/blocks": "^8.6.4", - "@storybook/react": "^8.6.4", - "@storybook/react-webpack5": "^8.6.4", - "@storybook/test": "^8.6.4", + "@storybook/blocks": "^9.0.0-alpha.8", + "@storybook/react": "9.0.0-alpha.8", + "@storybook/react-webpack5": "^9.0.0-alpha.8", + "@storybook/test": "^8.6.7", "@testing-library/jest-dom": "^6.0.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", @@ -68,7 +69,7 @@ "react": "^18.0.2", "react-dom": "^18.0.2", "react-router-dom": "^6.3.0", - "storybook": "^8.6.4" + "storybook": "^9.0.0-alpha.8" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0", diff --git a/yarn.lock b/yarn.lock index e5471a78c8..3d1c5c2c19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3779,16 +3779,17 @@ __metadata: dependencies: "@backstage/cli": "workspace:^" "@base-ui-components/react": ^1.0.0-alpha.5 + "@chromatic-com/storybook": ^4.0.0-0 "@remixicon/react": ^4.5.0 - "@storybook/addon-essentials": ^8.6.4 - "@storybook/addon-interactions": ^8.6.4 + "@storybook/addon-essentials": ^9.0.0-alpha.8 + "@storybook/addon-interactions": ^9.0.0-alpha.8 "@storybook/addon-styling-webpack": ^1.0.1 - "@storybook/addon-themes": ^8.6.4 + "@storybook/addon-themes": ^9.0.0-alpha.8 "@storybook/addon-webpack5-compiler-swc": ^2.1.0 - "@storybook/blocks": ^8.6.4 - "@storybook/react": ^8.6.4 - "@storybook/react-webpack5": ^8.6.4 - "@storybook/test": ^8.6.4 + "@storybook/blocks": ^9.0.0-alpha.8 + "@storybook/react": 9.0.0-alpha.8 + "@storybook/react-webpack5": ^9.0.0-alpha.8 + "@storybook/test": ^8.6.7 "@testing-library/jest-dom": ^6.0.0 "@types/react": ^18.0.0 "@types/react-dom": ^18.0.0 @@ -3802,7 +3803,7 @@ __metadata: react: ^18.0.2 react-dom: ^18.0.2 react-router-dom: ^6.3.0 - storybook: ^8.6.4 + storybook: ^9.0.0-alpha.8 peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -8805,6 +8806,21 @@ __metadata: languageName: node linkType: hard +"@chromatic-com/storybook@npm:^4.0.0-0": + version: 4.0.0-next.3 + resolution: "@chromatic-com/storybook@npm:4.0.0-next.3" + dependencies: + chromatic: ^11.27.0 + filesize: ^10.0.12 + jsonfile: ^6.1.0 + react-confetti: ^6.1.0 + strip-ansi: ^7.1.0 + peerDependencies: + storybook: ^0.0.0-0 || ^9.0.0 || ^9.0.0-alpha.4 + checksum: 5d01a6701f50afb42b89312240aca6ef81c37b9085462d4a7c7e70e94bb5cbfa3fd3e0a585453bcbb201baae88a8a8be9cbe5961ee176f5f7b7fcf13dc579c83 + languageName: node + linkType: hard + "@codemirror/autocomplete@npm:^6.0.0": version: 6.3.0 resolution: "@codemirror/autocomplete@npm:6.3.0" @@ -17265,131 +17281,113 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-actions@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-actions@npm:8.6.4" - dependencies: - "@storybook/global": ^5.0.0 - "@types/uuid": ^9.0.1 - dequal: ^2.0.2 - polished: ^4.2.2 - uuid: ^9.0.0 - peerDependencies: - storybook: ^8.6.4 - checksum: b08f73070ac90f2c0d404b63f3148ebe11d4683f0728fd04459df62b521422d8c17b3619f6c012a90571a2d5520ee34d35e02fd104c0298580177dd57e045312 - languageName: node - linkType: hard - -"@storybook/addon-backgrounds@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-backgrounds@npm:8.6.4" +"@storybook/addon-backgrounds@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-backgrounds@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 memoizerific: ^1.11.3 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: 53a67d385d6241730d0d992552de58316cfa4c46f56fa5a81df8647c76356778164783b8a872e31b3624692f456186074e06407778cf4442ffc8596cdaded49e + storybook: ^9.0.0-alpha.8 + checksum: 3f7527dda74c319d8f0f675136ee3691352cd3f1e0d1beea559708d60f46a17c52a53623b3fc664b8c40879a23c3a94d7326e4520a3846aafd0b3a5c7a1e85ad languageName: node linkType: hard -"@storybook/addon-controls@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-controls@npm:8.6.4" +"@storybook/addon-controls@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-controls@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 dequal: ^2.0.2 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: a25c7f2ae7c3b4aee89ba865e5a305293d54bc4723f4e8e4f22d3c42a626d09b83a69521e728e2b3b35107a7709702801c1f5a4fe96e16871d77108282b8a8a2 + storybook: ^9.0.0-alpha.8 + checksum: 227dfebeff3be21cb15b06e39f7ce596472c458f77d514188c548ee8e3d19c52eb5dcec248fcfe2c5d91a5a27b48b93bec667cfa72620e8e9b1ab6065ddcee88 languageName: node linkType: hard -"@storybook/addon-docs@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-docs@npm:8.6.4" +"@storybook/addon-docs@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-docs@npm:9.0.0-alpha.8" dependencies: "@mdx-js/react": ^3.0.0 - "@storybook/blocks": 8.6.4 - "@storybook/csf-plugin": 8.6.4 - "@storybook/react-dom-shim": 8.6.4 + "@storybook/blocks": 9.0.0-alpha.8 + "@storybook/csf-plugin": 9.0.0-alpha.8 + "@storybook/react-dom-shim": 9.0.0-alpha.8 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: 28705136eb3117fcc46b4038a6fb8bf24207fa39b2b5043ab3dd124a3a186d02d36afdb03a456638ec652e1944679de0721361bca27caa5920b234e92c4e9149 + storybook: ^9.0.0-alpha.8 + checksum: 76726fb05e8bfc209645dc8e185abb625be4dd800fee3f75aba19d00e60e073cb4b1b5efa5c02df3bd751dc57dd59189ba3968ba65b8269865108d1334c23c0d languageName: node linkType: hard -"@storybook/addon-essentials@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-essentials@npm:8.6.4" +"@storybook/addon-essentials@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-essentials@npm:9.0.0-alpha.8" dependencies: - "@storybook/addon-actions": 8.6.4 - "@storybook/addon-backgrounds": 8.6.4 - "@storybook/addon-controls": 8.6.4 - "@storybook/addon-docs": 8.6.4 - "@storybook/addon-highlight": 8.6.4 - "@storybook/addon-measure": 8.6.4 - "@storybook/addon-outline": 8.6.4 - "@storybook/addon-toolbars": 8.6.4 - "@storybook/addon-viewport": 8.6.4 + "@storybook/addon-backgrounds": 9.0.0-alpha.8 + "@storybook/addon-controls": 9.0.0-alpha.8 + "@storybook/addon-docs": 9.0.0-alpha.8 + "@storybook/addon-highlight": 9.0.0-alpha.8 + "@storybook/addon-measure": 9.0.0-alpha.8 + "@storybook/addon-outline": 9.0.0-alpha.8 + "@storybook/addon-toolbars": 9.0.0-alpha.8 + "@storybook/addon-viewport": 9.0.0-alpha.8 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: 564cc7e6f4559572f12c7f015e40a3995c55c681704e4082ef80d9db0c7b06433a67473e810ea9d67a46121f3a4aca8d7851953bc7f109f54e96c069b05230e0 + storybook: ^9.0.0-alpha.8 + checksum: b3981fc97766c727ddd4d9edcaedb202a9aef3089129660e1f1573a8eab6db44002d48d5a0cc98f7cb24c9ebec9f28ef2fcfe59820f05f0a476d6c5da8c1a396 languageName: node linkType: hard -"@storybook/addon-highlight@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-highlight@npm:8.6.4" +"@storybook/addon-highlight@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-highlight@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: e080b543bd3fbe0e8d6e916f2abd562b7136371dff64e96d196532dca4958016b7890c6dcd48545f11c2ac31aa0d3a713b98d6fd2cde2a1f94b1ebaf7031095d + storybook: ^9.0.0-alpha.8 + checksum: d3b98b333a00d53de2d5e778792d633eb6cbdb37a940b138f5c5c6990ad5f10071372278e1f3ce06025b3d96c117a8b19ec979ff540c8fa5595377a6cdebe494 languageName: node linkType: hard -"@storybook/addon-interactions@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-interactions@npm:8.6.4" +"@storybook/addon-interactions@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-interactions@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 - "@storybook/instrumenter": 8.6.4 - "@storybook/test": 8.6.4 polished: ^4.2.2 ts-dedent: ^2.2.0 peerDependencies: - storybook: ^8.6.4 - checksum: 6abfd78b17aef00708eb6221d3fdfc45fb738e1fd206a5c08c3909476abe6f042a507b6226ff99708538196294f37aea1d743ca7c33ea270ca0456c0f332ab55 + storybook: ^9.0.0-alpha.8 + checksum: 16bed44a424971d8ea65de43d8b5eda7f28800b32e2a3b18ac73ac17ef1145ab1c96c2686f4f9172bfcb0776c05593caa02dee9fd31b3ebfbb1119b4f6510fd3 languageName: node linkType: hard -"@storybook/addon-measure@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-measure@npm:8.6.4" +"@storybook/addon-measure@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-measure@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 tiny-invariant: ^1.3.1 peerDependencies: - storybook: ^8.6.4 - checksum: b020d052c87aab591b4b7e31dd60764af9f70140ad4d529d468cdf0c8eb45d02ad7ec2bc01a83d88a1547cf567da8db5e4ba0b4c7294e968df2bace3f07f4fd7 + storybook: ^9.0.0-alpha.8 + checksum: b30cc38f8ecc3664300cec8898446edb070250f1d7e4b42ab8bfba2d6b3245e58c7ed9c9abefdf07ff9d3eb42fd59dfafaa50f3e5d4f28b6e400461c0fb541ef languageName: node linkType: hard -"@storybook/addon-outline@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-outline@npm:8.6.4" +"@storybook/addon-outline@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-outline@npm:9.0.0-alpha.8" dependencies: "@storybook/global": ^5.0.0 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: d705c2dda8fc4b9af2ecb8217a0463f0f8213f836150627f67e4702d449071e5982580617ff75ae8c48960ca27e957fe3700c17cd854e05d326ceeaf622202c2 + storybook: ^9.0.0-alpha.8 + checksum: d66347d5ca3f786a07a52f96f2479ce768b2721fadcc19c24a1e6de5fad629866fe06f206a9240a305851ab638feb5d189024920a676fe41ef6651d4919e616e languageName: node linkType: hard @@ -17404,34 +17402,34 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-themes@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-themes@npm:8.6.4" +"@storybook/addon-themes@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-themes@npm:9.0.0-alpha.8" dependencies: ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: 11ae08e570df4d94ed452c0be6b15773d51c0a8003c6a238156262fafbb8e094fb5c3d20c11bceaae68461ba12fe305732e4d3ea53bf16c8e115ec2ef6fd1f00 + storybook: ^9.0.0-alpha.8 + checksum: 66de97b77be87d4791af0993e51660aa5a3e4536d90a56039551725d7eec16bc5a920cd955edac28d02502bf6f97c228ef5004884523d32e471a01cdffba83b7 languageName: node linkType: hard -"@storybook/addon-toolbars@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-toolbars@npm:8.6.4" +"@storybook/addon-toolbars@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-toolbars@npm:9.0.0-alpha.8" peerDependencies: - storybook: ^8.6.4 - checksum: c15ef11c50ac067e5b226dba30db956405d94b5ff56d67279697bcdcc63367ef0ab523f091b8755f8b8ab5c1ac6e55c3ded9cef6f5b917261ea9a232bcf9a8dc + storybook: ^9.0.0-alpha.8 + checksum: 5a06fe915e90cb75a11f6b04035e7b7ee58442ed78647abe08fd66330afd705f5c645f9c1c1850eeb479f2ac70440d4c112e0171ff11cb8c9eec09f0fd1a178b languageName: node linkType: hard -"@storybook/addon-viewport@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/addon-viewport@npm:8.6.4" +"@storybook/addon-viewport@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/addon-viewport@npm:9.0.0-alpha.8" dependencies: memoizerific: ^1.11.3 peerDependencies: - storybook: ^8.6.4 - checksum: 746cd771f371b825da4c5b974602a1c14287212c19ddff9f593e77e9867a3efe76ccc9ee3e503efdcf91949bf3a03979c8f37aa2fe62eb888a3eb11dd208def2 + storybook: ^9.0.0-alpha.8 + checksum: 5b3070794bed9de04937a5a4315ce375894866e2e42d3cc19025d76087abb2c629a83916b7981731c4e0f34e6f310da91f7df20df970dfd88593fd1e23c8e894 languageName: node linkType: hard @@ -17445,30 +17443,30 @@ __metadata: languageName: node linkType: hard -"@storybook/blocks@npm:8.6.4, @storybook/blocks@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/blocks@npm:8.6.4" +"@storybook/blocks@npm:9.0.0-alpha.8, @storybook/blocks@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/blocks@npm:9.0.0-alpha.8" dependencies: - "@storybook/icons": ^1.2.12 + "@storybook/icons": ^1.4.0 ts-dedent: ^2.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - storybook: ^8.6.4 + storybook: ^9.0.0-alpha.8 peerDependenciesMeta: react: optional: true react-dom: optional: true - checksum: fb891491f99fa63c02c90e00d166c9299cf93512d2d6036a932a1c243cd568f7ca45af961b89a19ba1c1c51c4ad76d0de8d687249f1dcb8b3411fbec2b7cf238 + checksum: 0802d6793125081f7b95ccfa7a56b56f2267e1b1984bafeec9192fbcf5ad81cb14a3f8e06dc36c680f4ad07d90f85335f4f54076bb52836f6d6cc778580a1fb9 languageName: node linkType: hard -"@storybook/builder-webpack5@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/builder-webpack5@npm:8.6.4" +"@storybook/builder-webpack5@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/builder-webpack5@npm:9.0.0-alpha.8" dependencies: - "@storybook/core-webpack": 8.6.4 + "@storybook/core-webpack": 9.0.0-alpha.8 "@types/semver": ^7.3.4 browser-assert: ^1.2.1 case-sensitive-paths-webpack-plugin: ^2.4.0 @@ -17493,66 +17491,33 @@ __metadata: webpack-hot-middleware: ^2.25.1 webpack-virtual-modules: ^0.6.0 peerDependencies: - storybook: ^8.6.4 + storybook: ^9.0.0-alpha.8 peerDependenciesMeta: typescript: optional: true - checksum: 1de3fe0c3e6143aeb31c3d1952fad56cb896e00d6fbe1652ac78e230b5787c079c9b977c481f224b31e8ad6f08e0f4a6b65ec5262c87fe682e916d5068c671ff + checksum: 0d329f2160282bccfc58a679c26e14b141b89e48d3a0ef53bccf7df760f6f6df952e1e85ced2e17ea331873efa6ffe9bec939df0057168793e37358eff27d32c languageName: node linkType: hard -"@storybook/components@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/components@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: b50923e759eea99320fdf8946056fb33614b9d993ca567207cd0d714e5fae83da485b64b0d74a18b84355396b33c28b5eea050484c40967873c540f83d314b9a - languageName: node - linkType: hard - -"@storybook/core-webpack@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/core-webpack@npm:8.6.4" +"@storybook/core-webpack@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/core-webpack@npm:9.0.0-alpha.8" dependencies: ts-dedent: ^2.0.0 peerDependencies: - storybook: ^8.6.4 - checksum: 48d39eb184662b0c1e6e5a8acfba2057b35ea9151874dddc406322811a65d9f58b7cc454a06b913b239f7215cf62e6d8939994a78f9fa38d6e9744e9232758f1 + storybook: ^9.0.0-alpha.8 + checksum: 4b037b4bc9f3a7f97e29c8275542a08255c42ff68d4f0d6a7701980965ce77e6a33b62e59af88da1e4029475e42ae7a7a0ea20850621ae48fdc8c96213a6e04d languageName: node linkType: hard -"@storybook/core@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/core@npm:8.6.4" - dependencies: - "@storybook/theming": 8.6.4 - better-opn: ^3.0.2 - browser-assert: ^1.2.1 - esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 - esbuild-register: ^3.5.0 - jsdoc-type-pratt-parser: ^4.0.0 - process: ^0.11.10 - recast: ^0.23.5 - semver: ^7.6.2 - util: ^0.12.5 - ws: ^8.2.3 - peerDependencies: - prettier: ^2 || ^3 - peerDependenciesMeta: - prettier: - optional: true - checksum: 8352b0f65bd7c0462471409a7f086125f4e1a93e1777fa20268beb78109f9784cc1d75536a4f9136368db87ba3c5c11987c95835937ba4c2776f968365795d8f - languageName: node - linkType: hard - -"@storybook/csf-plugin@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/csf-plugin@npm:8.6.4" +"@storybook/csf-plugin@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/csf-plugin@npm:9.0.0-alpha.8" dependencies: unplugin: ^1.3.1 peerDependencies: - storybook: ^8.6.4 - checksum: f1750183ad0c83438803da83d705a0e73819ad7e0cfd010182cc504d8a37ab2f500df4c6ea61ec82b464b13e992a2a4cf6756aabb2a66e12e8c2ee3f22553929 + storybook: ^9.0.0-alpha.8 + checksum: f25a0c995c9295cefc8177b43d26b8312f50478bcc431fae5b532d96ffb2ddf60d9f806cea758fdee5424b767c97f1bfdc7ffb69aca1b05a7eedf224e3970e76 languageName: node linkType: hard @@ -17572,34 +17537,25 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.2.12": - version: 1.2.12 - resolution: "@storybook/icons@npm:1.2.12" +"@storybook/icons@npm:^1.4.0": + version: 1.4.0 + resolution: "@storybook/icons@npm:1.4.0" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: a4c87cbfadfa1369680c4acc9d5ef90b9ff23e2ad603b6c0aba0dafe89780e5643c567160eb0544fe33f3b9f157adda2621ae45b4036ac001139a34926e00102 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + checksum: a1e41fa9539629cb22a985dac695ac396afc5eb6ded7ce81497499a737ebf7556521acc569dbc0454e0b231ae50e8a5afbeee246dfbf8dc06a16a9cc1caa5bc8 languageName: node linkType: hard -"@storybook/instrumenter@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/instrumenter@npm:8.6.4" +"@storybook/instrumenter@npm:8.6.7": + version: 8.6.7 + resolution: "@storybook/instrumenter@npm:8.6.7" dependencies: "@storybook/global": ^5.0.0 "@vitest/utils": ^2.1.1 peerDependencies: - storybook: ^8.6.4 - checksum: acfc58fd5c29ec78a00498441c97d4528e8f915956c67600c75e7a30d240fb86551e9ce0dad8c0f83c78a828417a64d8aff38db754b87b854c70507d8d3638d0 - languageName: node - linkType: hard - -"@storybook/manager-api@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/manager-api@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 50447d3961dfab2b2f36afa76aaeb779a9b51ca66a912bc763103f18f2f71514191388b101ec83093ac9dee6ab509b955da41325f15d88cfe1c480e7d7d1f9eb + storybook: ^8.6.7 + checksum: 8b5bbdd73637233ddebf6d3f14d3904c6f122f29f2efe4a0172a1f03e066a88a3453ae3eef140b227eb626ee959c0c3522f62944407f4530e24e6a6ac804598b languageName: node linkType: hard @@ -17612,12 +17568,12 @@ __metadata: languageName: node linkType: hard -"@storybook/preset-react-webpack@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/preset-react-webpack@npm:8.6.4" +"@storybook/preset-react-webpack@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/preset-react-webpack@npm:9.0.0-alpha.8" dependencies: - "@storybook/core-webpack": 8.6.4 - "@storybook/react": 8.6.4 + "@storybook/core-webpack": 9.0.0-alpha.8 + "@storybook/react": 9.0.0-alpha.8 "@storybook/react-docgen-typescript-plugin": 1.0.6--canary.9.0c3f3b7.0 "@types/semver": ^7.3.4 find-up: ^5.0.0 @@ -17630,20 +17586,11 @@ __metadata: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 + storybook: ^9.0.0-alpha.8 peerDependenciesMeta: typescript: optional: true - checksum: 9327cda765833877e77305767cfd7e90056d22c551593fc4a99557936bfd41972ad0702abf3e53f2112f020fcc850595176e226b595c87795ff9f4e5b2cf2fa0 - languageName: node - linkType: hard - -"@storybook/preview-api@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/preview-api@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: d8f642de8053686192e28f7ec748944c99c9e4d0cef7f13d96e840fd159c8bea2e3139b88a84eb16009fbda3152a61d9e075777211c10773e4d01fd103bf0e28 + checksum: 1a2436e9e295967ddd475a21d2f806590a5526189a1f781ccdfa89453a5ff8d4dbe6b0c0e0f2d5c08a13a2c0cce5376f8ddfe1c07a84c5021b5233c45c699596 languageName: node linkType: hard @@ -17665,84 +17612,68 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/react-dom-shim@npm:8.6.4" +"@storybook/react-dom-shim@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/react-dom-shim@npm:9.0.0-alpha.8" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 - checksum: 0062191f312c0bf32e622904b9da7176c961cec99258c6b230c3fb6758c1cca95ac4142d4701628dc8eb922601d74c350549b78e146b5af1747edf8cb3def756 + storybook: ^9.0.0-alpha.8 + checksum: e235aca5a13900a580fdaa7b11ff00b7dbb389e3b2701ba12688d4d624fe83f6d1448a61c649f4f95f52d72e46fffa67be4cacbf005637110b4f3c372d821d38 languageName: node linkType: hard -"@storybook/react-webpack5@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/react-webpack5@npm:8.6.4" +"@storybook/react-webpack5@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/react-webpack5@npm:9.0.0-alpha.8" dependencies: - "@storybook/builder-webpack5": 8.6.4 - "@storybook/preset-react-webpack": 8.6.4 - "@storybook/react": 8.6.4 + "@storybook/builder-webpack5": 9.0.0-alpha.8 + "@storybook/preset-react-webpack": 9.0.0-alpha.8 + "@storybook/react": 9.0.0-alpha.8 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 - typescript: ">= 4.2.x" + storybook: ^9.0.0-alpha.8 + typescript: ">= 4.9.x" peerDependenciesMeta: typescript: optional: true - checksum: e30788afe3e5de10b9f5e061e4b180dadc6fcb607c6ef330f5dc0252249eef4ded5c809e2bb4491edd865bb3528f4ae9044b29e9a40fe8f5278fceaac8fbea8d + checksum: 25f8c99159e502ab0c5fae0ce6942aac9650e5aea4287adcb2dc7801add34b31db8f9a2079d3762fa0d3277616e60cf2c187b01a1440efa30ea1736b7c4b3281 languageName: node linkType: hard -"@storybook/react@npm:8.6.4, @storybook/react@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/react@npm:8.6.4" +"@storybook/react@npm:9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "@storybook/react@npm:9.0.0-alpha.8" dependencies: - "@storybook/components": 8.6.4 "@storybook/global": ^5.0.0 - "@storybook/manager-api": 8.6.4 - "@storybook/preview-api": 8.6.4 - "@storybook/react-dom-shim": 8.6.4 - "@storybook/theming": 8.6.4 + "@storybook/react-dom-shim": 9.0.0-alpha.8 peerDependencies: - "@storybook/test": 8.6.4 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.6.4 - typescript: ">= 4.2.x" + storybook: ^9.0.0-alpha.8 + typescript: ">= 4.9.x" peerDependenciesMeta: - "@storybook/test": - optional: true typescript: optional: true - checksum: 4e9860c8e177d0dd496e7d6c53927daa8429b82f9c02d5b004de61244573901160a936ba37ce69810fb13e3602391e18723237a901c57e1bd19cf9f58241c30c + checksum: 4ba2b0fe9cab5272856ab6e26dce732dc7baa4650539e9195c5dca0e15fccd87444ab5f580d17ccf5a98eff54621bbb733dd73c82aca2933f68ff753ff5246b3 languageName: node linkType: hard -"@storybook/test@npm:8.6.4, @storybook/test@npm:^8.6.4": - version: 8.6.4 - resolution: "@storybook/test@npm:8.6.4" +"@storybook/test@npm:^8.6.7": + version: 8.6.7 + resolution: "@storybook/test@npm:8.6.7" dependencies: "@storybook/global": ^5.0.0 - "@storybook/instrumenter": 8.6.4 + "@storybook/instrumenter": 8.6.7 "@testing-library/dom": 10.4.0 "@testing-library/jest-dom": 6.5.0 "@testing-library/user-event": 14.5.2 "@vitest/expect": 2.0.5 "@vitest/spy": 2.0.5 peerDependencies: - storybook: ^8.6.4 - checksum: 2c16f1cc8e0f6e57f5972a664839885467c7a8b01cf807b32ea7cdd3508354cd408603f05b3f6d1c118e4560f4224102df6dfc0242deb0d2ea670895e8cdcc81 - languageName: node - linkType: hard - -"@storybook/theming@npm:8.6.4": - version: 8.6.4 - resolution: "@storybook/theming@npm:8.6.4" - peerDependencies: - storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: b7e13026c381e18e7ad2064e1528876eb01b7563ad16aababcac531ce76f5e59b985a72603f57d75465a611ea564bd46b9b1760634211faf4307f9265f06e044 + storybook: ^8.6.7 + checksum: d269423580cbcc61de74a3940504f00bb580b389b04432aa6a0a7e8fed54536782ef254e8edcf6bac3ce98d35e439fdfd86316cf53f3435396f12cbc2e060541 languageName: node linkType: hard @@ -18700,7 +18631,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.0.0": +"@testing-library/jest-dom@npm:^6.0.0, @testing-library/jest-dom@npm:^6.6.3": version: 6.6.3 resolution: "@testing-library/jest-dom@npm:6.6.3" dependencies: @@ -18757,7 +18688,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/user-event@npm:14.5.2, @testing-library/user-event@npm:^14.0.0": +"@testing-library/user-event@npm:14.5.2": version: 14.5.2 resolution: "@testing-library/user-event@npm:14.5.2" peerDependencies: @@ -18766,6 +18697,15 @@ __metadata: languageName: node linkType: hard +"@testing-library/user-event@npm:^14.0.0, @testing-library/user-event@npm:^14.6.1": + version: 14.6.1 + resolution: "@testing-library/user-event@npm:14.6.1" + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: 4cb8a81fea1fea83a42619e9545137b51636bb7a3182c596bb468e5664f1e4699a275c2d0fb8b6dcc3fe2684f9d87b0637ab7cb4f566051539146872c9141fcb + languageName: node + linkType: hard + "@tokenizer/token@npm:^0.3.0": version: 0.3.0 resolution: "@tokenizer/token@npm:0.3.0" @@ -21229,15 +21169,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:>1.6.0": - version: 2.1.3 - resolution: "@vitest/expect@npm:2.1.3" +"@vitest/expect@npm:3.0.9, @vitest/expect@npm:>1.6.0": + version: 3.0.9 + resolution: "@vitest/expect@npm:3.0.9" dependencies: - "@vitest/spy": 2.1.3 - "@vitest/utils": 2.1.3 - chai: ^5.1.1 - tinyrainbow: ^1.2.0 - checksum: c0651cb19d50733169bbc0477ea84d063272200de73bcaf0b13436000c1c5b334589d9dbe2d4245619b3c283e9b477ae24f49117a40eb6eb83adc79f18fe2f63 + "@vitest/spy": 3.0.9 + "@vitest/utils": 3.0.9 + chai: ^5.2.0 + tinyrainbow: ^2.0.0 + checksum: 6df325d45e0ad4b6ad73a55e5328f615f92171fc4dbf3875972c08013727cfa435b9916636c7f3902a45f1874db10805d449311b70125edf1422dceb325ac982 languageName: node linkType: hard @@ -21250,21 +21190,21 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/pretty-format@npm:2.1.3" +"@vitest/pretty-format@npm:2.1.9": + version: 2.1.9 + resolution: "@vitest/pretty-format@npm:2.1.9" dependencies: tinyrainbow: ^1.2.0 - checksum: ff4aa144a49c0ee579bfae940745b70a0ca3c504f52c23f1e8f5c0642824785232f844040d31b48eea71b5a80519809810359a75d29186ab40341174c50a4a0d + checksum: 33f7ff0a9d356ddd6534390a0aea260dc04a3022a94901c87d141bacf71d2b3fff2e3bf08a55dd424c5355fd3b41656cb7871c76372fef45ffac1ea89d0dc508 languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/pretty-format@npm:2.1.6" +"@vitest/pretty-format@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/pretty-format@npm:3.0.9" dependencies: - tinyrainbow: ^1.2.0 - checksum: 4cab9152ac97fa190db85bbe7e1ae8f1b5d2312fa3ccf7e813119933b2aaf4c763c6156a6d91cb186d3ed4be81f5bb70da2c731fde2d12457fe0871087d2be74 + tinyrainbow: ^2.0.0 + checksum: 447b53bd962bc5978cf3e8c67f0600e38470ea63ab6ae24fb048dca79305828f37d9d854a7db1abc97ebde66a65187f87a99ca7969e43c750998c944e3ec48c6 languageName: node linkType: hard @@ -21277,12 +21217,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/spy@npm:2.1.3" +"@vitest/spy@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/spy@npm:3.0.9" dependencies: - tinyspy: ^3.0.0 - checksum: b04aad8e458087202b7a16d332365a142be055db8c4653d916ebb8d47eacf23c3edef23b3918490eed9f8cb69da240d72844c3570f38521fbe7e0647e01d0271 + tinyspy: ^3.0.2 + checksum: 1b90f40c4ac34529e7d098c745396a51e9b2f187d31d50a664ac7374db56edb3792862a35d1b8049e421705db6445761d687f9f8c5e298a9ca6cfa47d55625d7 languageName: node linkType: hard @@ -21298,25 +21238,25 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/utils@npm:2.1.3" +"@vitest/utils@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/utils@npm:3.0.9" dependencies: - "@vitest/pretty-format": 2.1.3 - loupe: ^3.1.1 - tinyrainbow: ^1.2.0 - checksum: 0c1e262600bc329fab43bb19d575326a6d38175c2bdc345bc5326b81cf34303f22a1b67a0197dc6a935c3019e2f21c4da52a49c609967bea9cb4790a44a347ce + "@vitest/pretty-format": 3.0.9 + loupe: ^3.1.3 + tinyrainbow: ^2.0.0 + checksum: d31797594598817670cc49dfcd4ded2953d707c62e5dc7807737e8108073e97499cf7ef2eb3295f1fb52446a8a85ba50aacef21126689251092bc8566bff4bb6 languageName: node linkType: hard "@vitest/utils@npm:^2.1.1": - version: 2.1.6 - resolution: "@vitest/utils@npm:2.1.6" + version: 2.1.9 + resolution: "@vitest/utils@npm:2.1.9" dependencies: - "@vitest/pretty-format": 2.1.6 + "@vitest/pretty-format": 2.1.9 loupe: ^3.1.2 tinyrainbow: ^1.2.0 - checksum: 8b9c994eccb724d76128e875e8438d519bfae0126e7431e8682e7f07d9faeff929db1afa2742b188883e42508d4cdcb2326f9ae27c1b53b5f746d283a9e75462 + checksum: b24fb9c6765801f2e0578ad5c32fadf9541a833301eaed2877a427096cf05214244b361f94eda80be2b9c841f58ae3c67d37dedc5a902b2cb44041979bae4d8f languageName: node linkType: hard @@ -24380,16 +24320,16 @@ __metadata: languageName: node linkType: hard -"chai@npm:^5.1.1": - version: 5.1.1 - resolution: "chai@npm:5.1.1" +"chai@npm:^5.1.1, chai@npm:^5.2.0": + version: 5.2.0 + resolution: "chai@npm:5.2.0" dependencies: assertion-error: ^2.0.1 check-error: ^2.1.1 deep-eql: ^5.0.1 loupe: ^3.1.0 pathval: ^2.0.0 - checksum: 1e0a5e1b5febdfa8ceb97b9aff608286861ecb86533863119b2f39f07c08fb59f3c1791ab554947f009b9d71d509b9e4e734fb12133cb81f231c2c2ee7c1e738 + checksum: 15e4ba12d02df3620fd59b4a6e8efe43b47872ce61f1c0ca77ac1205a2a5898f3b6f1f52408fd1a708b8d07fdfb5e65b97af40bad9fd94a69ed8d4264c7a69f1 languageName: node linkType: hard @@ -24548,6 +24488,25 @@ __metadata: languageName: node linkType: hard +"chromatic@npm:^11.27.0": + version: 11.27.0 + resolution: "chromatic@npm:11.27.0" + peerDependencies: + "@chromatic-com/cypress": ^0.*.* || ^1.0.0 + "@chromatic-com/playwright": ^0.*.* || ^1.0.0 + peerDependenciesMeta: + "@chromatic-com/cypress": + optional: true + "@chromatic-com/playwright": + optional: true + bin: + chroma: dist/bin.js + chromatic: dist/bin.js + chromatic-cli: dist/bin.js + checksum: aaa024eb06e79072ee9c7d491818be052e7b6f0e20fc79323780ea2ccc2ce01f6157b19755d0b4b415a723d0d00cf610274dffc201c1041d2ca54ac98e240880 + languageName: node + linkType: hard + "chrome-trace-event@npm:^1.0.2": version: 1.0.2 resolution: "chrome-trace-event@npm:1.0.2" @@ -29292,6 +29251,13 @@ __metadata: languageName: node linkType: hard +"filesize@npm:^10.0.12": + version: 10.1.6 + resolution: "filesize@npm:10.1.6" + checksum: a797a9d41c8f27a9ae334d23f99fc5d903eac5d03c82190dc163901205435b56626fe1260c779ba3e87a2a34d426f19ff264c3f7d956e00f2d3ac69760b52e33 + languageName: node + linkType: hard + "filesize@npm:^8.0.6": version: 8.0.6 resolution: "filesize@npm:8.0.6" @@ -33917,7 +33883,7 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^6.0.1": +"jsonfile@npm:^6.0.1, jsonfile@npm:^6.1.0": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" dependencies: @@ -35172,10 +35138,10 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.1, loupe@npm:^3.1.2": - version: 3.1.2 - resolution: "loupe@npm:3.1.2" - checksum: 4a75bbe8877a1ced3603e08b1095cd6f4c987c50fe63719fdc3009029560f91e07a915e7f6eff1322bb62bfb2a2beeef06b13ccb3c12f81bda9f3674434dcab9 +"loupe@npm:^3.1.0, loupe@npm:^3.1.1, loupe@npm:^3.1.2, loupe@npm:^3.1.3": + version: 3.1.3 + resolution: "loupe@npm:3.1.3" + checksum: 9b2530b1d5a44d2c9fc5241f97ea00296dca257173c535b4832bc31f9516e10387991feb5b3fff23df116c8fcf907ce3980f82b215dcc5d19cde17ce9b9ec3e1 languageName: node linkType: hard @@ -40637,6 +40603,17 @@ __metadata: languageName: node linkType: hard +"react-confetti@npm:^6.1.0": + version: 6.4.0 + resolution: "react-confetti@npm:6.4.0" + dependencies: + tween-functions: ^1.2.0 + peerDependencies: + react: ^16.3.0 || ^17.0.1 || ^18.0.0 || ^19.0.0 + checksum: 70850ccbf970d961f415768f2ac81a7b4a9afad83997f137cffa04fc18be112ca2aef94f377b3353ca6bc7800290d812c8b9f9601b557980e6dd9c2a49eb5871 + languageName: node + linkType: hard + "react-copy-to-clipboard@npm:5.1.0, react-copy-to-clipboard@npm:^5.0.4": version: 5.1.0 resolution: "react-copy-to-clipboard@npm:5.1.0" @@ -43795,21 +43772,34 @@ __metadata: languageName: node linkType: hard -"storybook@npm:^8.6.4": - version: 8.6.4 - resolution: "storybook@npm:8.6.4" +"storybook@npm:^9.0.0-alpha.8": + version: 9.0.0-alpha.8 + resolution: "storybook@npm:9.0.0-alpha.8" dependencies: - "@storybook/core": 8.6.4 + "@storybook/global": ^5.0.0 + "@testing-library/dom": 10.4.0 + "@testing-library/jest-dom": ^6.6.3 + "@testing-library/user-event": ^14.6.1 + "@types/uuid": ^9.0.1 + "@vitest/expect": 3.0.9 + "@vitest/spy": 3.0.9 + better-opn: ^3.0.2 + esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 + esbuild-register: ^3.5.0 + jsdoc-type-pratt-parser: ^4.0.0 + polished: ^4.2.2 + recast: ^0.23.5 + semver: ^7.6.2 + uuid: ^9.0.0 + ws: ^8.18.0 peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: prettier: optional: true bin: - getstorybook: ./bin/index.cjs - sb: ./bin/index.cjs storybook: ./bin/index.cjs - checksum: 96c59b5c6ac27dfb9fb85d110b0257a77264015454dd0ca7893ae9df04dbf31e523ff351ba45283f33a58ecb28fd985349aa9c1fb83ab51d0c781a4d5809fa15 + checksum: d48c9b2b05279bc0ee8eabeb505e9b662d576fbd8902311cf6694e1c1eb3ef960e417e20f656b6bc869c14b59bedc77c89b70b50575beb2caa24fcd92d3d15b6 languageName: node linkType: hard @@ -45006,7 +44996,14 @@ __metadata: languageName: node linkType: hard -"tinyspy@npm:^3.0.0": +"tinyrainbow@npm:^2.0.0": + version: 2.0.0 + resolution: "tinyrainbow@npm:2.0.0" + checksum: 26360631d97e43955a07cfb70fe40a154ce4e2bcd14fa3d37ce8e2ed8f4fa9e5ba00783e4906bbfefe6dcabef5d3510f5bee207cb693bee4e4e7553f5454bef1 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.0, tinyspy@npm:^3.0.2": version: 3.0.2 resolution: "tinyspy@npm:3.0.2" checksum: 5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 @@ -45464,6 +45461,13 @@ __metadata: languageName: node linkType: hard +"tween-functions@npm:^1.2.0": + version: 1.2.0 + resolution: "tween-functions@npm:1.2.0" + checksum: 880708d680eff5c347ddcb9f922ad121703a91c78ce308ed309073e73a794b633eb0b80589a839365803f150515ad34c9646809ae8a0e90f09e62686eefb1ab6 + languageName: node + linkType: hard + "tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": version: 0.14.5 resolution: "tweetnacl@npm:0.14.5" @@ -47325,7 +47329,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.8.0": +"ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.8.0": version: 8.18.1 resolution: "ws@npm:8.18.1" peerDependencies: From 4e7db4beb2cdd8f4916ddafe43987ee64e6d0c8e Mon Sep 17 00:00:00 2001 From: deepthi-28 Date: Thu, 20 Mar 2025 11:44:01 +0530 Subject: [PATCH 046/119] Renamed the dialogue box and in changeset description corrected Signed-off-by: deepthi-28 --- .changeset/deep-flies-vanish.md | 2 +- ...eEntityDialog.tsx => DeleteEntityConfirmationDialog.tsx} | 6 ++++-- .../src/components/FailedEntities.tsx | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) rename plugins/catalog-unprocessed-entities/src/components/{DeleteEntityDialog.tsx => DeleteEntityConfirmationDialog.tsx} (92%) diff --git a/.changeset/deep-flies-vanish.md b/.changeset/deep-flies-vanish.md index 8ae47e9b81..30aa10f290 100644 --- a/.changeset/deep-flies-vanish.md +++ b/.changeset/deep-flies-vanish.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-unprocessed-entities': patch --- -Added confirmation popup for delete entities in devtools +Added confirmation popup for delete entities in Catalog Unprocessed Entities plugin diff --git a/plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx b/plugins/catalog-unprocessed-entities/src/components/DeleteEntityConfirmationDialog.tsx similarity index 92% rename from plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx rename to plugins/catalog-unprocessed-entities/src/components/DeleteEntityConfirmationDialog.tsx index a1843b43b6..be93817d69 100644 --- a/plugins/catalog-unprocessed-entities/src/components/DeleteEntityDialog.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/DeleteEntityConfirmationDialog.tsx @@ -21,13 +21,15 @@ import DialogTitle from '@material-ui/core/DialogTitle'; import React, { useState } from 'react'; import { assertError } from '@backstage/errors'; -interface DeleteEntityDialogProps { +interface DeleteEntityConfirmationProps { open: boolean; onClose: () => any; onConfirm: () => any; } -export function DeleteEntityDialog(props: DeleteEntityDialogProps) { +export function DeleteEntityConfirmationDialog( + props: DeleteEntityConfirmationProps, +) { const { open, onClose, onConfirm } = props; const [busy, setBusy] = useState(false); const onDelete = async () => { diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 26d3fd8b5b..ef77d16bad 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -34,7 +34,7 @@ import { EntityDialog } from './EntityDialog'; import { catalogUnprocessedEntitiesApiRef } from '../api'; import useAsync from 'react-use/esm/useAsync'; import DeleteIcon from '@material-ui/icons/Delete'; -import { DeleteEntityDialog } from './DeleteEntityDialog'; +import { DeleteEntityConfirmationDialog } from './DeleteEntityConfirmationDialog'; const useStyles = makeStyles((theme: Theme) => ({ errorBox: { @@ -274,7 +274,7 @@ export const FailedEntities = () => { ); }} /> - setConfirmationDialogOpen(false)} onConfirm={cleanUpAfterRemoval} From 1460c09c4f01d5ae73f74eb8f2adf5fbd6495eda Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 07:55:55 +0000 Subject: [PATCH 047/119] Update actions/cache digest to 5a3ec84 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/api-breaking-changes-comment.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/deploy_packages.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/api-breaking-changes-comment.yml b/.github/workflows/api-breaking-changes-comment.yml index 91c0a43447..10f93cc6eb 100644 --- a/.github/workflows/api-breaking-changes-comment.yml +++ b/.github/workflows/api-breaking-changes-comment.yml @@ -103,7 +103,7 @@ jobs: - name: Fetch cached Manifests File id: cache - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: comment.md key: ${{ needs.setup.outputs.comment-cache-key }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1b5df56ef..76898bc8d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -239,7 +239,7 @@ jobs: # Use the lower-level cache actions for the success cache, so that we can store the cache even on failed builds - name: restore backstage-cli cache - uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 + uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: .cache/backstage-cli key: ${{ runner.os }}-v${{ matrix.node-version }}-backstage-cli-${{ github.run_id }} @@ -260,7 +260,7 @@ jobs: # Always save success cache even if there were failures, that way it can be used in re-triggered builds - name: save backstage-cli cache - uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 + uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4 if: always() with: path: .cache/backstage-cli diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 0387de0d97..e363fa4680 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -94,7 +94,7 @@ jobs: run: yarn backstage-cli config:check --lax - name: backstage-cli cache - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: .cache/backstage-cli key: ${{ runner.os }}-v${{ matrix.node-version }}-backstage-cli-${{ github.run_id }} From 9aca7122b8388805b5a15847309e2475796bfdea Mon Sep 17 00:00:00 2001 From: deepthi-28 Date: Thu, 20 Mar 2025 16:34:54 +0530 Subject: [PATCH 048/119] The naming of state variable has been changed Signed-off-by: deepthi-28 --- .../src/components/FailedEntities.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index ef77d16bad..b4df10335d 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -118,8 +118,8 @@ export const FailedEntities = () => { const [, setSelectedSearchTerm] = useState(''); const unprocessedEntityApi = useApi(catalogUnprocessedEntitiesApiRef); const alertApi = useApi(alertApiRef); - const [entityID, setEntityID] = useState(''); - const [entityRefVal, setEntityRefVal] = useState(''); + const [selectedEntityId, setSelectedEntityId] = useState(''); + const [selectedEntityRef, setSelectedEntityRef] = useState(''); const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false); if (loading) { @@ -136,21 +136,21 @@ export const FailedEntities = () => { entityId: string; entityRef: string; }) => { - setEntityID(entityId); - setEntityRefVal(entityRef); + setSelectedEntityId(entityId); + setSelectedEntityRef(entityRef); setConfirmationDialogOpen(true); }; const cleanUpAfterRemoval = async () => { try { - await unprocessedEntityApi.delete(entityID); + await unprocessedEntityApi.delete(selectedEntityId); alertApi.post({ - message: `Entity ${entityRefVal} has been deleted`, + message: `Entity ${selectedEntityRef} has been deleted`, severity: 'success', }); } catch (e) { alertApi.post({ - message: `Ran into an issue when deleting ${entityRefVal}. Please try again later.`, + message: `Ran into an issue when deleting ${selectedEntityRef}. Please try again later.`, severity: 'error', }); } From 4cbc613848eb4e9095976871c2651317eedc6b76 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 21 Mar 2025 10:25:31 +0100 Subject: [PATCH 049/119] add initial test Signed-off-by: Rye Pasaporte --- .../src/plugin.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/catalog-unprocessed-entities/src/plugin.test.ts b/plugins/catalog-unprocessed-entities/src/plugin.test.ts index add3d677f0..7012f52dd9 100644 --- a/plugins/catalog-unprocessed-entities/src/plugin.test.ts +++ b/plugins/catalog-unprocessed-entities/src/plugin.test.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { convertTimeToLocalTimezone } from './components/FailedEntities'; import { catalogUnprocessedEntitiesPlugin } from './plugin'; describe('catalog-unprocessed-entities', () => { @@ -20,3 +21,17 @@ describe('catalog-unprocessed-entities', () => { expect(catalogUnprocessedEntitiesPlugin).toBeDefined(); }); }); + +describe('components/FailedEntities/convertTimeToLocalTimezone', () => { + it('should correctly a UTC ISO string to local time', () => { + const utcTime = '2024-09-03T08:15:08.088Z'; + const localTime = convertTimeToLocalTimezone(utcTime); + expect(localTime).toBe('2024-09-03 08:15:08 UTC'); + }); + + it('should correctly convert a UTC Date object to local time', () => { + const utcTime = new Date('2024-09-03T08:15:08.088Z'); + const localTime = convertTimeToLocalTimezone(utcTime); + expect(localTime).toBe('2024-09-03 08:15:08 UTC'); + }); +}); From 8a84064b851388a27c34e3092e3f8ea9d261afd4 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 21 Mar 2025 10:27:07 +0100 Subject: [PATCH 050/119] typo Signed-off-by: Rye Pasaporte --- .../src/components/FailedEntities.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 0e13869528..0f553986fc 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -92,7 +92,7 @@ const RenderErrorContext = ({ * Converts input datetime which lacks timezone info into user's local time so that they can * easily understand the times. */ -const convertTimeToLocalTimezone = (strDateTime: string | Date) => { +export const convertTimeToLocalTimezone = (strDateTime: string | Date) => { const dateTime = DateTime.fromISO(strDateTime.toLocaleString(), { zone: DateTime.local().zoneName, }); From 0a96d69434b2bf3f3b1c3009a7de083ce865e868 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 21 Mar 2025 10:43:16 +0100 Subject: [PATCH 051/119] update function to contain only reading string rather than reading Date Signed-off-by: Rye Pasaporte --- .../src/components/FailedEntities.tsx | 2 +- .../src/plugin.test.ts | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 0f553986fc..7120728050 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -92,7 +92,7 @@ const RenderErrorContext = ({ * Converts input datetime which lacks timezone info into user's local time so that they can * easily understand the times. */ -export const convertTimeToLocalTimezone = (strDateTime: string | Date) => { +export const convertTimeToLocalTimezone = (strDateTime: string) => { const dateTime = DateTime.fromISO(strDateTime.toLocaleString(), { zone: DateTime.local().zoneName, }); diff --git a/plugins/catalog-unprocessed-entities/src/plugin.test.ts b/plugins/catalog-unprocessed-entities/src/plugin.test.ts index 7012f52dd9..8201dd97a8 100644 --- a/plugins/catalog-unprocessed-entities/src/plugin.test.ts +++ b/plugins/catalog-unprocessed-entities/src/plugin.test.ts @@ -29,9 +29,15 @@ describe('components/FailedEntities/convertTimeToLocalTimezone', () => { expect(localTime).toBe('2024-09-03 08:15:08 UTC'); }); - it('should correctly convert a UTC Date object to local time', () => { - const utcTime = new Date('2024-09-03T08:15:08.088Z'); - const localTime = convertTimeToLocalTimezone(utcTime); - expect(localTime).toBe('2024-09-03 08:15:08 UTC'); + it('should return "Invalid Date" for an invalid date string', () => { + const invalidTime = 'invalid-date-string'; + const localTime = convertTimeToLocalTimezone(invalidTime); + expect(localTime).toBe('Invalid DateTime'); + }); + + it('should handle empty string input', () => { + const emptyString = ''; + const localTime = convertTimeToLocalTimezone(emptyString); + expect(localTime).toBe('Invalid DateTime'); }); }); From 83e9e1ecfb164b4969d29c05ce54d3ff1aec4ca0 Mon Sep 17 00:00:00 2001 From: Rye Pasaporte Date: Fri, 21 Mar 2025 11:03:06 +0100 Subject: [PATCH 052/119] revert accepting Date Signed-off-by: Rye Pasaporte --- .../src/components/FailedEntities.tsx | 9 ++++++--- plugins/catalog-unprocessed-entities/src/plugin.test.ts | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 7120728050..0a8e63bd03 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -92,12 +92,15 @@ const RenderErrorContext = ({ * Converts input datetime which lacks timezone info into user's local time so that they can * easily understand the times. */ -export const convertTimeToLocalTimezone = (strDateTime: string) => { - const dateTime = DateTime.fromISO(strDateTime.toLocaleString(), { +export const convertTimeToLocalTimezone = (dateTime: string | Date) => { + const isoDateTime = + typeof dateTime === 'string' ? dateTime : dateTime.toISOString(); + + const strDateTime = DateTime.fromISO(isoDateTime, { zone: DateTime.local().zoneName, }); - return dateTime.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); + return strDateTime.toFormat('yyyy-MM-dd hh:mm:ss ZZZZ'); }; export const FailedEntities = () => { diff --git a/plugins/catalog-unprocessed-entities/src/plugin.test.ts b/plugins/catalog-unprocessed-entities/src/plugin.test.ts index 8201dd97a8..ebeb24f4ab 100644 --- a/plugins/catalog-unprocessed-entities/src/plugin.test.ts +++ b/plugins/catalog-unprocessed-entities/src/plugin.test.ts @@ -29,6 +29,12 @@ describe('components/FailedEntities/convertTimeToLocalTimezone', () => { expect(localTime).toBe('2024-09-03 08:15:08 UTC'); }); + it('should correctly convert a UTC Date object to local time', () => { + const utcTime = new Date('2024-09-03T08:15:08.088Z'); + const localTime = convertTimeToLocalTimezone(utcTime); + expect(localTime).toBe('2024-09-03 08:15:08 UTC'); + }); + it('should return "Invalid Date" for an invalid date string', () => { const invalidTime = 'invalid-date-string'; const localTime = convertTimeToLocalTimezone(invalidTime); From 0bd3b1e2071081767c748e1bc6555b55a24c6b34 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 15:15:42 +0000 Subject: [PATCH 053/119] chore(deps): update actions/cache action to v4.2.3 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/api-breaking-changes-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-breaking-changes-comment.yml b/.github/workflows/api-breaking-changes-comment.yml index 91c0a43447..9a344a2fe4 100644 --- a/.github/workflows/api-breaking-changes-comment.yml +++ b/.github/workflows/api-breaking-changes-comment.yml @@ -74,7 +74,7 @@ jobs: - name: Cache Comment if: ${{ steps.event.outputs.ACTION != 'closed' }} - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: comment.md key: ${{ steps.hash.outputs.COMMENT_FILE_HASH }} From a81fe1f72d88aa330b5518e0eceb4e8f8185c48b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:51:44 +0000 Subject: [PATCH 054/119] build(deps): bump next from 14.2.23 to 14.2.25 in /canon-docs Bumps [next](https://github.com/vercel/next.js) from 14.2.23 to 14.2.25. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.23...v14.2.25) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- canon-docs/package.json | 2 +- canon-docs/yarn.lock | 92 ++++++++++++++++++++--------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/canon-docs/package.json b/canon-docs/package.json index 8558fac8e3..25ffb047a8 100644 --- a/canon-docs/package.json +++ b/canon-docs/package.json @@ -18,7 +18,7 @@ "@uiw/codemirror-themes": "^4.23.7", "@uiw/react-codemirror": "^4.23.7", "motion": "^12.4.1", - "next": "14.2.23", + "next": "14.2.25", "react": "^18.0.2", "react-dom": "^18.0.2", "react-frame-component": "^5.2.7", diff --git a/canon-docs/yarn.lock b/canon-docs/yarn.lock index 2be457741c..2320a6a2dd 100644 --- a/canon-docs/yarn.lock +++ b/canon-docs/yarn.lock @@ -501,10 +501,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.2.23": - version: 14.2.23 - resolution: "@next/env@npm:14.2.23" - checksum: dad74ff7de68992a0753f728a5b926ed6eb0af8a62deece6bbb32ba254b1f7d870e256b61db8d4c40fa811695cfc5e69ba964339f3cb8b40237cf9c28dfe747f +"@next/env@npm:14.2.25": + version: 14.2.25 + resolution: "@next/env@npm:14.2.25" + checksum: c937d4e8b62c7ae9c74bd607888e791b78445e93d523d22d0838e816c3fbeb7b1b62766d110ef235229e4c4ca8587f493e6ec761eb0a2c774dabaee2b58f581b languageName: node linkType: hard @@ -534,65 +534,65 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-darwin-arm64@npm:14.2.23" +"@next/swc-darwin-arm64@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-darwin-arm64@npm:14.2.25" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-darwin-x64@npm:14.2.23" +"@next/swc-darwin-x64@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-darwin-x64@npm:14.2.25" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-linux-arm64-gnu@npm:14.2.23" +"@next/swc-linux-arm64-gnu@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-linux-arm64-gnu@npm:14.2.25" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-linux-arm64-musl@npm:14.2.23" +"@next/swc-linux-arm64-musl@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-linux-arm64-musl@npm:14.2.25" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-linux-x64-gnu@npm:14.2.23" +"@next/swc-linux-x64-gnu@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-linux-x64-gnu@npm:14.2.25" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-linux-x64-musl@npm:14.2.23" +"@next/swc-linux-x64-musl@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-linux-x64-musl@npm:14.2.25" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-win32-arm64-msvc@npm:14.2.23" +"@next/swc-win32-arm64-msvc@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-win32-arm64-msvc@npm:14.2.25" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-win32-ia32-msvc@npm:14.2.23" +"@next/swc-win32-ia32-msvc@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-win32-ia32-msvc@npm:14.2.25" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.2.23": - version: 14.2.23 - resolution: "@next/swc-win32-x64-msvc@npm:14.2.23" +"@next/swc-win32-x64-msvc@npm:14.2.25": + version: 14.2.25 + resolution: "@next/swc-win32-x64-msvc@npm:14.2.25" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1502,7 +1502,7 @@ __metadata: eslint-config-next: 14.2.23 lightningcss: ^1.28.2 motion: ^12.4.1 - next: 14.2.23 + next: 14.2.25 react: ^18.0.2 react-dom: ^18.0.2 react-frame-component: ^5.2.7 @@ -4176,20 +4176,20 @@ __metadata: languageName: node linkType: hard -"next@npm:14.2.23": - version: 14.2.23 - resolution: "next@npm:14.2.23" +"next@npm:14.2.25": + version: 14.2.25 + resolution: "next@npm:14.2.25" dependencies: - "@next/env": 14.2.23 - "@next/swc-darwin-arm64": 14.2.23 - "@next/swc-darwin-x64": 14.2.23 - "@next/swc-linux-arm64-gnu": 14.2.23 - "@next/swc-linux-arm64-musl": 14.2.23 - "@next/swc-linux-x64-gnu": 14.2.23 - "@next/swc-linux-x64-musl": 14.2.23 - "@next/swc-win32-arm64-msvc": 14.2.23 - "@next/swc-win32-ia32-msvc": 14.2.23 - "@next/swc-win32-x64-msvc": 14.2.23 + "@next/env": 14.2.25 + "@next/swc-darwin-arm64": 14.2.25 + "@next/swc-darwin-x64": 14.2.25 + "@next/swc-linux-arm64-gnu": 14.2.25 + "@next/swc-linux-arm64-musl": 14.2.25 + "@next/swc-linux-x64-gnu": 14.2.25 + "@next/swc-linux-x64-musl": 14.2.25 + "@next/swc-win32-arm64-msvc": 14.2.25 + "@next/swc-win32-ia32-msvc": 14.2.25 + "@next/swc-win32-x64-msvc": 14.2.25 "@swc/helpers": 0.5.5 busboy: 1.6.0 caniuse-lite: ^1.0.30001579 @@ -4230,7 +4230,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 4f9f744439fb860ba7c64ae1c61bc361bdd36e41d56760c52eabb404f4143c854b78ba9a79b7aefc322d93edbbd66d966cbdaf86772a88a8bf2e6b289987f14f + checksum: ca47d0f1d41351adaf75a37c8e8ce39dd76ebc62b054266ef84b5fc1ea41241ad5f16ab7a1ca47b6613b2c3e4c6f48b179f8cd3b0f087912ec7164c4e72981f0 languageName: node linkType: hard From 4b622bf795e853763da97adab37807b6b70fa1cb Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Sat, 22 Mar 2025 07:17:52 +0530 Subject: [PATCH 055/119] feat(catalog-import): adding translation Signed-off-by: its-mitesh-kumar --- .../DefaultImportPage/DefaultImportPage.tsx | 5 +++- .../ImportInfoCard/ImportInfoCard.test.tsx | 17 +++++++---- .../ImportInfoCard/ImportInfoCard.tsx | 5 +++- plugins/catalog-import/src/translation.ts | 28 +++++++++++++++++++ 4 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 plugins/catalog-import/src/translation.ts diff --git a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx index fa89ac2caf..cdff61fe73 100644 --- a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx +++ b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.tsx @@ -28,6 +28,8 @@ import { useTheme } from '@material-ui/core/styles'; import React from 'react'; import { ImportInfoCard } from '../ImportInfoCard'; import { ImportStepper } from '../ImportStepper'; +import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { catalogImportTranslationRef } from '../../translation'; /** * The default catalog import page. @@ -35,6 +37,7 @@ import { ImportStepper } from '../ImportStepper'; * @public */ export const DefaultImportPage = () => { + const { t } = useTranslationRef(catalogImportTranslationRef); const theme = useTheme(); const configApi = useApi(configApiRef); const isMobile = useMediaQuery(theme.breakpoints.down('sm')); @@ -54,7 +57,7 @@ export const DefaultImportPage = () => { return ( -
+
{supportTitle} diff --git a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.test.tsx b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.test.tsx index c33de77ffd..caa6be223d 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.test.tsx +++ b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.test.tsx @@ -25,6 +25,8 @@ import { screen } from '@testing-library/react'; import React from 'react'; import { CatalogImportApi, catalogImportApiRef } from '../../api'; import { ImportInfoCard } from './ImportInfoCard'; +import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { catalogImportTranslationRef } from '../../translation'; describe('', () => { let apis: TestApiRegistry; @@ -50,6 +52,14 @@ describe('', () => { }); it('renders without exploding', async () => { + let translatedText = ''; + + const TestComponent = () => { + const { t } = useTranslationRef(catalogImportTranslationRef); + translatedText = t('importInfoCard.title'); + return ; + }; + await renderInTestApp( ', () => { [catalogImportApiRef, catalogImportApi], ]} > - + , ); - - expect( - screen.getByText('Register an existing component'), - ).toBeInTheDocument(); + expect(screen.getByText(translatedText)).toBeInTheDocument(); }); it('renders section on GitHub discovery if supported', async () => { diff --git a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx index be8a457572..c0790006e5 100644 --- a/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx +++ b/plugins/catalog-import/src/components/ImportInfoCard/ImportInfoCard.tsx @@ -21,6 +21,8 @@ import Typography from '@material-ui/core/Typography'; import React from 'react'; import { catalogImportApiRef } from '../../api'; import { useCatalogFilename } from '../../hooks'; +import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { catalogImportTranslationRef } from '../../translation'; /** * Props for {@link ImportInfoCard}. @@ -43,6 +45,7 @@ export const ImportInfoCard = (props: ImportInfoCardProps) => { exampleRepositoryUrl = 'https://github.com/backstage/backstage', } = props; + const { t } = useTranslationRef(catalogImportTranslationRef); const configApi = useApi(configApiRef); const appTitle = configApi.getOptionalString('app.title') || 'Backstage'; const catalogImportApi = useApi(catalogImportApiRef); @@ -53,7 +56,7 @@ export const ImportInfoCard = (props: ImportInfoCardProps) => { return ( Date: Sat, 22 Mar 2025 07:22:03 +0530 Subject: [PATCH 056/119] adding changeset file Signed-off-by: its-mitesh-kumar --- .changeset/moody-eagles-smile.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/moody-eagles-smile.md diff --git a/.changeset/moody-eagles-smile.md b/.changeset/moody-eagles-smile.md new file mode 100644 index 0000000000..a2aab46cd8 --- /dev/null +++ b/.changeset/moody-eagles-smile.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-import': minor +--- + +adding translation for `Register an existing component` text From e38856727b3ec928eba62c313a531c8c4f85d221 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 09:25:45 +0000 Subject: [PATCH 057/119] Upgrade Storybook Signed-off-by: Charles de Dreuille --- packages/canon/package.json | 21 +- yarn.lock | 475 ++++++++++++++++++------------------ 2 files changed, 253 insertions(+), 243 deletions(-) diff --git a/packages/canon/package.json b/packages/canon/package.json index c2c287f937..35b55637fe 100644 --- a/packages/canon/package.json +++ b/packages/canon/package.json @@ -47,21 +47,20 @@ }, "devDependencies": { "@backstage/cli": "workspace:^", - "@chromatic-com/storybook": "^4.0.0-0", - "@storybook/addon-essentials": "^9.0.0-alpha.8", - "@storybook/addon-interactions": "^9.0.0-alpha.8", + "@storybook/addon-essentials": "^8.6.8", + "@storybook/addon-interactions": "^8.6.8", "@storybook/addon-styling-webpack": "^1.0.1", - "@storybook/addon-themes": "^9.0.0-alpha.8", - "@storybook/addon-webpack5-compiler-swc": "^2.1.0", - "@storybook/blocks": "^9.0.0-alpha.8", - "@storybook/react": "9.0.0-alpha.8", - "@storybook/react-webpack5": "^9.0.0-alpha.8", - "@storybook/test": "^8.6.7", + "@storybook/addon-themes": "^8.6.8", + "@storybook/addon-webpack5-compiler-swc": "^3.0.0", + "@storybook/blocks": "^8.6.8", + "@storybook/react": "^8.6.8", + "@storybook/react-webpack5": "^8.6.8", + "@storybook/test": "^8.6.8", "@testing-library/jest-dom": "^6.0.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "chalk": "^5.4.1", - "eslint-plugin-storybook": "^0.11.4", + "eslint-plugin-storybook": "^0.11.6", "glob": "^11.0.1", "globals": "^15.11.0", "lightningcss": "^1.29.1", @@ -69,7 +68,7 @@ "react": "^18.0.2", "react-dom": "^18.0.2", "react-router-dom": "^6.3.0", - "storybook": "^9.0.0-alpha.8" + "storybook": "^8.6.8" }, "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0", diff --git a/yarn.lock b/yarn.lock index 3d1c5c2c19..ea0ddbfe96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3779,23 +3779,22 @@ __metadata: dependencies: "@backstage/cli": "workspace:^" "@base-ui-components/react": ^1.0.0-alpha.5 - "@chromatic-com/storybook": ^4.0.0-0 "@remixicon/react": ^4.5.0 - "@storybook/addon-essentials": ^9.0.0-alpha.8 - "@storybook/addon-interactions": ^9.0.0-alpha.8 + "@storybook/addon-essentials": ^8.6.8 + "@storybook/addon-interactions": ^8.6.8 "@storybook/addon-styling-webpack": ^1.0.1 - "@storybook/addon-themes": ^9.0.0-alpha.8 - "@storybook/addon-webpack5-compiler-swc": ^2.1.0 - "@storybook/blocks": ^9.0.0-alpha.8 - "@storybook/react": 9.0.0-alpha.8 - "@storybook/react-webpack5": ^9.0.0-alpha.8 - "@storybook/test": ^8.6.7 + "@storybook/addon-themes": ^8.6.8 + "@storybook/addon-webpack5-compiler-swc": ^3.0.0 + "@storybook/blocks": ^8.6.8 + "@storybook/react": ^8.6.8 + "@storybook/react-webpack5": ^8.6.8 + "@storybook/test": ^8.6.8 "@testing-library/jest-dom": ^6.0.0 "@types/react": ^18.0.0 "@types/react-dom": ^18.0.0 chalk: ^5.4.1 clsx: ^2.1.1 - eslint-plugin-storybook: ^0.11.4 + eslint-plugin-storybook: ^0.11.6 glob: ^11.0.1 globals: ^15.11.0 lightningcss: ^1.29.1 @@ -3803,7 +3802,7 @@ __metadata: react: ^18.0.2 react-dom: ^18.0.2 react-router-dom: ^6.3.0 - storybook: ^9.0.0-alpha.8 + storybook: ^8.6.8 peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 @@ -8806,21 +8805,6 @@ __metadata: languageName: node linkType: hard -"@chromatic-com/storybook@npm:^4.0.0-0": - version: 4.0.0-next.3 - resolution: "@chromatic-com/storybook@npm:4.0.0-next.3" - dependencies: - chromatic: ^11.27.0 - filesize: ^10.0.12 - jsonfile: ^6.1.0 - react-confetti: ^6.1.0 - strip-ansi: ^7.1.0 - peerDependencies: - storybook: ^0.0.0-0 || ^9.0.0 || ^9.0.0-alpha.4 - checksum: 5d01a6701f50afb42b89312240aca6ef81c37b9085462d4a7c7e70e94bb5cbfa3fd3e0a585453bcbb201baae88a8a8be9cbe5961ee176f5f7b7fcf13dc579c83 - languageName: node - linkType: hard - "@codemirror/autocomplete@npm:^6.0.0": version: 6.3.0 resolution: "@codemirror/autocomplete@npm:6.3.0" @@ -17281,113 +17265,131 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-backgrounds@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-backgrounds@npm:9.0.0-alpha.8" +"@storybook/addon-actions@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-actions@npm:8.6.8" + dependencies: + "@storybook/global": ^5.0.0 + "@types/uuid": ^9.0.1 + dequal: ^2.0.2 + polished: ^4.2.2 + uuid: ^9.0.0 + peerDependencies: + storybook: ^8.6.8 + checksum: 8799cdad3f4c604cb7dd11331e2a9a2786ea0dfb2dddde7dfc1f782d748911dc3c1d495828b89e70f49f114c6040507adce3d607d6a4ef146b8daf83070c7373 + languageName: node + linkType: hard + +"@storybook/addon-backgrounds@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-backgrounds@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 memoizerific: ^1.11.3 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 3f7527dda74c319d8f0f675136ee3691352cd3f1e0d1beea559708d60f46a17c52a53623b3fc664b8c40879a23c3a94d7326e4520a3846aafd0b3a5c7a1e85ad + storybook: ^8.6.8 + checksum: 4483217be3ca542ab37c5d565511295587097965f5df4f0c0ca83eca8d3f7f4bed3ef32eb5f7ef434a1fabd1727e06ad227ac52174d22b9c86611f0f18f0543e languageName: node linkType: hard -"@storybook/addon-controls@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-controls@npm:9.0.0-alpha.8" +"@storybook/addon-controls@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-controls@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 dequal: ^2.0.2 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 227dfebeff3be21cb15b06e39f7ce596472c458f77d514188c548ee8e3d19c52eb5dcec248fcfe2c5d91a5a27b48b93bec667cfa72620e8e9b1ab6065ddcee88 + storybook: ^8.6.8 + checksum: 81ffa2fe6cc7daf23d8db1a14ea0a81d4e25b933c5df554f39ebcd5ce18348da7dcfd68d5d0fc862bb39f034767186cb4d568653593ca9f3af3e47044b907559 languageName: node linkType: hard -"@storybook/addon-docs@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-docs@npm:9.0.0-alpha.8" +"@storybook/addon-docs@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-docs@npm:8.6.8" dependencies: "@mdx-js/react": ^3.0.0 - "@storybook/blocks": 9.0.0-alpha.8 - "@storybook/csf-plugin": 9.0.0-alpha.8 - "@storybook/react-dom-shim": 9.0.0-alpha.8 + "@storybook/blocks": 8.6.8 + "@storybook/csf-plugin": 8.6.8 + "@storybook/react-dom-shim": 8.6.8 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 76726fb05e8bfc209645dc8e185abb625be4dd800fee3f75aba19d00e60e073cb4b1b5efa5c02df3bd751dc57dd59189ba3968ba65b8269865108d1334c23c0d + storybook: ^8.6.8 + checksum: 22becb8d5bfd23c092d2666650c8cf19d68e794842f6772dbc617303bf9f6f70f838de3eed2e070fb23c603ea141ef9bf1ce9b9f2c24f62884d6b52df2f54ba7 languageName: node linkType: hard -"@storybook/addon-essentials@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-essentials@npm:9.0.0-alpha.8" +"@storybook/addon-essentials@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-essentials@npm:8.6.8" dependencies: - "@storybook/addon-backgrounds": 9.0.0-alpha.8 - "@storybook/addon-controls": 9.0.0-alpha.8 - "@storybook/addon-docs": 9.0.0-alpha.8 - "@storybook/addon-highlight": 9.0.0-alpha.8 - "@storybook/addon-measure": 9.0.0-alpha.8 - "@storybook/addon-outline": 9.0.0-alpha.8 - "@storybook/addon-toolbars": 9.0.0-alpha.8 - "@storybook/addon-viewport": 9.0.0-alpha.8 + "@storybook/addon-actions": 8.6.8 + "@storybook/addon-backgrounds": 8.6.8 + "@storybook/addon-controls": 8.6.8 + "@storybook/addon-docs": 8.6.8 + "@storybook/addon-highlight": 8.6.8 + "@storybook/addon-measure": 8.6.8 + "@storybook/addon-outline": 8.6.8 + "@storybook/addon-toolbars": 8.6.8 + "@storybook/addon-viewport": 8.6.8 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: b3981fc97766c727ddd4d9edcaedb202a9aef3089129660e1f1573a8eab6db44002d48d5a0cc98f7cb24c9ebec9f28ef2fcfe59820f05f0a476d6c5da8c1a396 + storybook: ^8.6.8 + checksum: eaaca24361e850809eb06fd01d873aad1203dc419bc112d50e6327b9ea4daabfca03e9cc0843c1f36da4965b766a28813b6f668df4fc189c84ccdf40a9a0df30 languageName: node linkType: hard -"@storybook/addon-highlight@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-highlight@npm:9.0.0-alpha.8" +"@storybook/addon-highlight@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-highlight@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: d3b98b333a00d53de2d5e778792d633eb6cbdb37a940b138f5c5c6990ad5f10071372278e1f3ce06025b3d96c117a8b19ec979ff540c8fa5595377a6cdebe494 + storybook: ^8.6.8 + checksum: 85eeb8d549b6b3358d31c8204a58164a2c6a7728d0d6e53799e65b4d3ab4cb29743bffc7f861b36d50eb2213f569668840a15c54c44beaefe7b707f2dc7966a5 languageName: node linkType: hard -"@storybook/addon-interactions@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-interactions@npm:9.0.0-alpha.8" +"@storybook/addon-interactions@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-interactions@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 + "@storybook/instrumenter": 8.6.8 + "@storybook/test": 8.6.8 polished: ^4.2.2 ts-dedent: ^2.2.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 16bed44a424971d8ea65de43d8b5eda7f28800b32e2a3b18ac73ac17ef1145ab1c96c2686f4f9172bfcb0776c05593caa02dee9fd31b3ebfbb1119b4f6510fd3 + storybook: ^8.6.8 + checksum: 99a28f5c4ad3d1f2c239a339158733691ee68e5bf062e015607cb717841ee8eecd1f5244936d64f3ac39c00da8f1de0806cf3333d35f1c79b4762b3a40261c4e languageName: node linkType: hard -"@storybook/addon-measure@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-measure@npm:9.0.0-alpha.8" +"@storybook/addon-measure@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-measure@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 tiny-invariant: ^1.3.1 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: b30cc38f8ecc3664300cec8898446edb070250f1d7e4b42ab8bfba2d6b3245e58c7ed9c9abefdf07ff9d3eb42fd59dfafaa50f3e5d4f28b6e400461c0fb541ef + storybook: ^8.6.8 + checksum: d31e576014aa960ad856a95a8156b65115856dc83b8670502ada1e730ec0ccade1f19e6f9eec2e80960c1b7c442b49777be4e4c4ccd05f849d66ba0d127b378d languageName: node linkType: hard -"@storybook/addon-outline@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-outline@npm:9.0.0-alpha.8" +"@storybook/addon-outline@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-outline@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: d66347d5ca3f786a07a52f96f2479ce768b2721fadcc19c24a1e6de5fad629866fe06f206a9240a305851ab638feb5d189024920a676fe41ef6651d4919e616e + storybook: ^8.6.8 + checksum: 4d6e137b0de24da56aca1e41b39673488bda2634952027e982ae134ffb8aaa3ed67120c348c157f15d27c65dd530dec815df805c671f6e8a9f5d5697a84c251b languageName: node linkType: hard @@ -17402,71 +17404,71 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-themes@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-themes@npm:9.0.0-alpha.8" +"@storybook/addon-themes@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-themes@npm:8.6.8" dependencies: ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 66de97b77be87d4791af0993e51660aa5a3e4536d90a56039551725d7eec16bc5a920cd955edac28d02502bf6f97c228ef5004884523d32e471a01cdffba83b7 + storybook: ^8.6.8 + checksum: c75aa43e1aaf5af0d2526319d35209a796c074983fbe053f6fab63277e4ae9b872d8b6ae796851e9d7f471e1c94d3ba4925ff7b3fadbe0986fdb922a87be824a languageName: node linkType: hard -"@storybook/addon-toolbars@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-toolbars@npm:9.0.0-alpha.8" +"@storybook/addon-toolbars@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-toolbars@npm:8.6.8" peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 5a06fe915e90cb75a11f6b04035e7b7ee58442ed78647abe08fd66330afd705f5c645f9c1c1850eeb479f2ac70440d4c112e0171ff11cb8c9eec09f0fd1a178b + storybook: ^8.6.8 + checksum: 5c034aca498ddd91ca23cd571b4c7a9c6d643bd19cf0c67346f4ae4617292ca858dbe1170c566ac550ad6f7d564effee329d89e9f2fa1219e605d8b6cfe06572 languageName: node linkType: hard -"@storybook/addon-viewport@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/addon-viewport@npm:9.0.0-alpha.8" +"@storybook/addon-viewport@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/addon-viewport@npm:8.6.8" dependencies: memoizerific: ^1.11.3 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 5b3070794bed9de04937a5a4315ce375894866e2e42d3cc19025d76087abb2c629a83916b7981731c4e0f34e6f310da91f7df20df970dfd88593fd1e23c8e894 + storybook: ^8.6.8 + checksum: 8a9f21bad254ef1cb31cb4ff8fc6089e90894678bb234ad92c4e2aaae4f4c7a50fc31b559f30ff105b627872e14bbda1cb8c475f3429ac3207d7aae841915ba0 languageName: node linkType: hard -"@storybook/addon-webpack5-compiler-swc@npm:^2.1.0": - version: 2.1.0 - resolution: "@storybook/addon-webpack5-compiler-swc@npm:2.1.0" +"@storybook/addon-webpack5-compiler-swc@npm:^3.0.0": + version: 3.0.0 + resolution: "@storybook/addon-webpack5-compiler-swc@npm:3.0.0" dependencies: "@swc/core": ^1.10.8 swc-loader: ^0.2.6 - checksum: 1a5ebc6842f29b342d4bb0a8efab183e521c07b96aee9071dbddb2d4c8ab3525dd79cd1b3be914d0f45dbb97a2cb5b78392e352ed5f406f891f9f10857e1315d + checksum: 4dbf7df5ed5c6c8a6f532c2761839206bdc9d3d4a11c5cf435b4ded44c8bcb57b83cf389dd8c9510e0dc90587d8ef0ba45730daf865ca8b24c58757dcb649f63 languageName: node linkType: hard -"@storybook/blocks@npm:9.0.0-alpha.8, @storybook/blocks@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/blocks@npm:9.0.0-alpha.8" +"@storybook/blocks@npm:8.6.8, @storybook/blocks@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/blocks@npm:8.6.8" dependencies: - "@storybook/icons": ^1.4.0 + "@storybook/icons": ^1.2.12 ts-dedent: ^2.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - storybook: ^9.0.0-alpha.8 + storybook: ^8.6.8 peerDependenciesMeta: react: optional: true react-dom: optional: true - checksum: 0802d6793125081f7b95ccfa7a56b56f2267e1b1984bafeec9192fbcf5ad81cb14a3f8e06dc36c680f4ad07d90f85335f4f54076bb52836f6d6cc778580a1fb9 + checksum: 5d52e9e64179b4355b34f4fbafb2903249c654b7f3f8656887fa60e704b9d7ea8d57b617227d3e71d742eef64023b961b8eb938806ce267f86dfe437e967861d languageName: node linkType: hard -"@storybook/builder-webpack5@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/builder-webpack5@npm:9.0.0-alpha.8" +"@storybook/builder-webpack5@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/builder-webpack5@npm:8.6.8" dependencies: - "@storybook/core-webpack": 9.0.0-alpha.8 + "@storybook/core-webpack": 8.6.8 "@types/semver": ^7.3.4 browser-assert: ^1.2.1 case-sensitive-paths-webpack-plugin: ^2.4.0 @@ -17491,33 +17493,66 @@ __metadata: webpack-hot-middleware: ^2.25.1 webpack-virtual-modules: ^0.6.0 peerDependencies: - storybook: ^9.0.0-alpha.8 + storybook: ^8.6.8 peerDependenciesMeta: typescript: optional: true - checksum: 0d329f2160282bccfc58a679c26e14b141b89e48d3a0ef53bccf7df760f6f6df952e1e85ced2e17ea331873efa6ffe9bec939df0057168793e37358eff27d32c + checksum: 27bc38b1b46f681f2a24410b4b06973b516b5031f35b355cddc48c70eb7784537f6fadec2ceca367a818f13a8700877893730d676a3ce6ba25f3e5baf69bae6b languageName: node linkType: hard -"@storybook/core-webpack@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/core-webpack@npm:9.0.0-alpha.8" +"@storybook/components@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/components@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: fb69c6d7804f91fffd3fc7d42ba5b144c7b808af6e6b764c14cdef11263897e551e5cc8a0fa379b9ed73f5c0438ed32d355c7ed63801046e1cb078c479d4cecf + languageName: node + linkType: hard + +"@storybook/core-webpack@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/core-webpack@npm:8.6.8" dependencies: ts-dedent: ^2.0.0 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: 4b037b4bc9f3a7f97e29c8275542a08255c42ff68d4f0d6a7701980965ce77e6a33b62e59af88da1e4029475e42ae7a7a0ea20850621ae48fdc8c96213a6e04d + storybook: ^8.6.8 + checksum: f64234cac8402cb15e441922c4cd756cd81264f1051d7d31d5d6209169d7adc34296b88f2e3bcd8b416837686ad5b69ed023c53984cb22fdc18533ffdca1205d languageName: node linkType: hard -"@storybook/csf-plugin@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/csf-plugin@npm:9.0.0-alpha.8" +"@storybook/core@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/core@npm:8.6.8" + dependencies: + "@storybook/theming": 8.6.8 + better-opn: ^3.0.2 + browser-assert: ^1.2.1 + esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 + esbuild-register: ^3.5.0 + jsdoc-type-pratt-parser: ^4.0.0 + process: ^0.11.10 + recast: ^0.23.5 + semver: ^7.6.2 + util: ^0.12.5 + ws: ^8.2.3 + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + checksum: d67dea27c021b51f17a0d5807b72a29ea174bb8c945fb41092fbf3698002810da0a510aa7e0e23e1682634362f9b52590ba1a09ef6dd40a2ad5653988b0b0e14 + languageName: node + linkType: hard + +"@storybook/csf-plugin@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/csf-plugin@npm:8.6.8" dependencies: unplugin: ^1.3.1 peerDependencies: - storybook: ^9.0.0-alpha.8 - checksum: f25a0c995c9295cefc8177b43d26b8312f50478bcc431fae5b532d96ffb2ddf60d9f806cea758fdee5424b767c97f1bfdc7ffb69aca1b05a7eedf224e3970e76 + storybook: ^8.6.8 + checksum: 17dece5267ae2bfb735ccb26485722bb16dbb2c53aea18c94aa6f532a5b848b2a2558678b6ccad3dbfabbf596aa45d543aea3a1967afa1e97c244f8603d86ec9 languageName: node linkType: hard @@ -17537,7 +17572,7 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.4.0": +"@storybook/icons@npm:^1.2.12": version: 1.4.0 resolution: "@storybook/icons@npm:1.4.0" peerDependencies: @@ -17547,15 +17582,24 @@ __metadata: languageName: node linkType: hard -"@storybook/instrumenter@npm:8.6.7": - version: 8.6.7 - resolution: "@storybook/instrumenter@npm:8.6.7" +"@storybook/instrumenter@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/instrumenter@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 "@vitest/utils": ^2.1.1 peerDependencies: - storybook: ^8.6.7 - checksum: 8b5bbdd73637233ddebf6d3f14d3904c6f122f29f2efe4a0172a1f03e066a88a3453ae3eef140b227eb626ee959c0c3522f62944407f4530e24e6a6ac804598b + storybook: ^8.6.8 + checksum: 111508d96d3cacb04388a58a7977b2766616348a33f0d461f53786a73286e58e73dde637d26f6395f0841d323da30b4985707a801d43236394c8303c847351db + languageName: node + linkType: hard + +"@storybook/manager-api@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/manager-api@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: ee575781572898fc2fa734750ccb4bad09fc021bd0878ca9a05d9668cb336610d53e8110f4ff3c2c180573a64e9caba8f50f59d0bd3f0398a5c98e2eafdd91ae languageName: node linkType: hard @@ -17568,12 +17612,12 @@ __metadata: languageName: node linkType: hard -"@storybook/preset-react-webpack@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/preset-react-webpack@npm:9.0.0-alpha.8" +"@storybook/preset-react-webpack@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/preset-react-webpack@npm:8.6.8" dependencies: - "@storybook/core-webpack": 9.0.0-alpha.8 - "@storybook/react": 9.0.0-alpha.8 + "@storybook/core-webpack": 8.6.8 + "@storybook/react": 8.6.8 "@storybook/react-docgen-typescript-plugin": 1.0.6--canary.9.0c3f3b7.0 "@types/semver": ^7.3.4 find-up: ^5.0.0 @@ -17586,11 +17630,20 @@ __metadata: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 + storybook: ^8.6.8 peerDependenciesMeta: typescript: optional: true - checksum: 1a2436e9e295967ddd475a21d2f806590a5526189a1f781ccdfa89453a5ff8d4dbe6b0c0e0f2d5c08a13a2c0cce5376f8ddfe1c07a84c5021b5233c45c699596 + checksum: 019aceb0ba0b79779839a3719ab37a130d951e644dad574310e76ac67ccfc41ee53b118209726a7c851ad40965054b1e1f24b1481a02f4dc9bf65d2b537d6117 + languageName: node + linkType: hard + +"@storybook/preview-api@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/preview-api@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: ac923a342d09c9e51f67734acaea19a41dc87cfc6cb22aea262591396d41cd4b69896417b618c55f17a9d64660b659813475c30d338c9bb6aa45391cfe8328f0 languageName: node linkType: hard @@ -17612,68 +17665,84 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/react-dom-shim@npm:9.0.0-alpha.8" +"@storybook/react-dom-shim@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/react-dom-shim@npm:8.6.8" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 - checksum: e235aca5a13900a580fdaa7b11ff00b7dbb389e3b2701ba12688d4d624fe83f6d1448a61c649f4f95f52d72e46fffa67be4cacbf005637110b4f3c372d821d38 + storybook: ^8.6.8 + checksum: d48ba28fefe0bbe0bde02de6a99629d84ba9436fb539ffc6d779173f7b8f6ec466e26018e943d95fa079d73ace2d96d5911def0221754262782e8a5e8b20882d languageName: node linkType: hard -"@storybook/react-webpack5@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/react-webpack5@npm:9.0.0-alpha.8" +"@storybook/react-webpack5@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/react-webpack5@npm:8.6.8" dependencies: - "@storybook/builder-webpack5": 9.0.0-alpha.8 - "@storybook/preset-react-webpack": 9.0.0-alpha.8 - "@storybook/react": 9.0.0-alpha.8 + "@storybook/builder-webpack5": 8.6.8 + "@storybook/preset-react-webpack": 8.6.8 + "@storybook/react": 8.6.8 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 - typescript: ">= 4.9.x" + storybook: ^8.6.8 + typescript: ">= 4.2.x" peerDependenciesMeta: typescript: optional: true - checksum: 25f8c99159e502ab0c5fae0ce6942aac9650e5aea4287adcb2dc7801add34b31db8f9a2079d3762fa0d3277616e60cf2c187b01a1440efa30ea1736b7c4b3281 + checksum: 49c60b8005e44c623f3a2d18694770ab72cb6fd2e51611592d287971f51f4218de2f228c677debda6aba5c6d97d71510e2ca303eaa2d3b67069262198ab17271 languageName: node linkType: hard -"@storybook/react@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/react@npm:9.0.0-alpha.8" +"@storybook/react@npm:8.6.8, @storybook/react@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/react@npm:8.6.8" dependencies: + "@storybook/components": 8.6.8 "@storybook/global": ^5.0.0 - "@storybook/react-dom-shim": 9.0.0-alpha.8 + "@storybook/manager-api": 8.6.8 + "@storybook/preview-api": 8.6.8 + "@storybook/react-dom-shim": 8.6.8 + "@storybook/theming": 8.6.8 peerDependencies: + "@storybook/test": 8.6.8 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 - typescript: ">= 4.9.x" + storybook: ^8.6.8 + typescript: ">= 4.2.x" peerDependenciesMeta: + "@storybook/test": + optional: true typescript: optional: true - checksum: 4ba2b0fe9cab5272856ab6e26dce732dc7baa4650539e9195c5dca0e15fccd87444ab5f580d17ccf5a98eff54621bbb733dd73c82aca2933f68ff753ff5246b3 + checksum: ebbfb2bed68d4ca8c8777769e5b752b1becf9cc1c3fd6f051df9a8eb012d209526b9e188812f3bf8ecf337a331c5049afa2236d2b073fbcafafd35e79cc3ed78 languageName: node linkType: hard -"@storybook/test@npm:^8.6.7": - version: 8.6.7 - resolution: "@storybook/test@npm:8.6.7" +"@storybook/test@npm:8.6.8, @storybook/test@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/test@npm:8.6.8" dependencies: "@storybook/global": ^5.0.0 - "@storybook/instrumenter": 8.6.7 + "@storybook/instrumenter": 8.6.8 "@testing-library/dom": 10.4.0 "@testing-library/jest-dom": 6.5.0 "@testing-library/user-event": 14.5.2 "@vitest/expect": 2.0.5 "@vitest/spy": 2.0.5 peerDependencies: - storybook: ^8.6.7 - checksum: d269423580cbcc61de74a3940504f00bb580b389b04432aa6a0a7e8fed54536782ef254e8edcf6bac3ce98d35e439fdfd86316cf53f3435396f12cbc2e060541 + storybook: ^8.6.8 + checksum: 7787760fe34cc004a556dbdc6bf6ed8f64970c16d1afb985dc57ca269cffea2203538d3756440108cc4acd8430325162d5481d90e8835787ae9ac1bf55d2f387 + languageName: node + linkType: hard + +"@storybook/theming@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/theming@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 1be0dea23178af562133f1047165e170f7e90bec4c3cedbdcb59df22685f314273a06a4677835ab84e6dbc682b803590adad6963217971c8136b076ce69800aa languageName: node linkType: hard @@ -18631,7 +18700,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.0.0, @testing-library/jest-dom@npm:^6.6.3": +"@testing-library/jest-dom@npm:^6.0.0": version: 6.6.3 resolution: "@testing-library/jest-dom@npm:6.6.3" dependencies: @@ -18697,7 +18766,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/user-event@npm:^14.0.0, @testing-library/user-event@npm:^14.6.1": +"@testing-library/user-event@npm:^14.0.0": version: 14.6.1 resolution: "@testing-library/user-event@npm:14.6.1" peerDependencies: @@ -21169,7 +21238,7 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:3.0.9, @vitest/expect@npm:>1.6.0": +"@vitest/expect@npm:>1.6.0": version: 3.0.9 resolution: "@vitest/expect@npm:3.0.9" dependencies: @@ -24488,25 +24557,6 @@ __metadata: languageName: node linkType: hard -"chromatic@npm:^11.27.0": - version: 11.27.0 - resolution: "chromatic@npm:11.27.0" - peerDependencies: - "@chromatic-com/cypress": ^0.*.* || ^1.0.0 - "@chromatic-com/playwright": ^0.*.* || ^1.0.0 - peerDependenciesMeta: - "@chromatic-com/cypress": - optional: true - "@chromatic-com/playwright": - optional: true - bin: - chroma: dist/bin.js - chromatic: dist/bin.js - chromatic-cli: dist/bin.js - checksum: aaa024eb06e79072ee9c7d491818be052e7b6f0e20fc79323780ea2ccc2ce01f6157b19755d0b4b415a723d0d00cf610274dffc201c1041d2ca54ac98e240880 - languageName: node - linkType: hard - "chrome-trace-event@npm:^1.0.2": version: 1.0.2 resolution: "chrome-trace-event@npm:1.0.2" @@ -28134,17 +28184,16 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-storybook@npm:^0.11.4": - version: 0.11.4 - resolution: "eslint-plugin-storybook@npm:0.11.4" +"eslint-plugin-storybook@npm:^0.11.6": + version: 0.11.6 + resolution: "eslint-plugin-storybook@npm:0.11.6" dependencies: "@storybook/csf": ^0.1.11 "@typescript-eslint/utils": ^8.8.1 ts-dedent: ^2.2.0 peerDependencies: eslint: ">=8" - typescript: ">=4.8.4 <5.8.0" - checksum: c3909478f32862a4d2687af240f91df9190e6c23e7618fee366dd8e7c1fa7f31c1c8bf9d49c8b4c01bd0f7857f5f85ccdfd6897d56bde353da3192652a2e9ded + checksum: 0dbc32176a729761c2f77187f6a3f7a5560727dd746f5b425aa0b8c35d0f4e979e0a3e86e0d647425343ba33616455abe5a72f30757d89ce85049a39d6062b4f languageName: node linkType: hard @@ -29251,13 +29300,6 @@ __metadata: languageName: node linkType: hard -"filesize@npm:^10.0.12": - version: 10.1.6 - resolution: "filesize@npm:10.1.6" - checksum: a797a9d41c8f27a9ae334d23f99fc5d903eac5d03c82190dc163901205435b56626fe1260c779ba3e87a2a34d426f19ff264c3f7d956e00f2d3ac69760b52e33 - languageName: node - linkType: hard - "filesize@npm:^8.0.6": version: 8.0.6 resolution: "filesize@npm:8.0.6" @@ -33883,7 +33925,7 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^6.0.1, jsonfile@npm:^6.1.0": +"jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" dependencies: @@ -40603,17 +40645,6 @@ __metadata: languageName: node linkType: hard -"react-confetti@npm:^6.1.0": - version: 6.4.0 - resolution: "react-confetti@npm:6.4.0" - dependencies: - tween-functions: ^1.2.0 - peerDependencies: - react: ^16.3.0 || ^17.0.1 || ^18.0.0 || ^19.0.0 - checksum: 70850ccbf970d961f415768f2ac81a7b4a9afad83997f137cffa04fc18be112ca2aef94f377b3353ca6bc7800290d812c8b9f9601b557980e6dd9c2a49eb5871 - languageName: node - linkType: hard - "react-copy-to-clipboard@npm:5.1.0, react-copy-to-clipboard@npm:^5.0.4": version: 5.1.0 resolution: "react-copy-to-clipboard@npm:5.1.0" @@ -43772,34 +43803,21 @@ __metadata: languageName: node linkType: hard -"storybook@npm:^9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "storybook@npm:9.0.0-alpha.8" +"storybook@npm:^8.6.8": + version: 8.6.8 + resolution: "storybook@npm:8.6.8" dependencies: - "@storybook/global": ^5.0.0 - "@testing-library/dom": 10.4.0 - "@testing-library/jest-dom": ^6.6.3 - "@testing-library/user-event": ^14.6.1 - "@types/uuid": ^9.0.1 - "@vitest/expect": 3.0.9 - "@vitest/spy": 3.0.9 - better-opn: ^3.0.2 - esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 - esbuild-register: ^3.5.0 - jsdoc-type-pratt-parser: ^4.0.0 - polished: ^4.2.2 - recast: ^0.23.5 - semver: ^7.6.2 - uuid: ^9.0.0 - ws: ^8.18.0 + "@storybook/core": 8.6.8 peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: prettier: optional: true bin: + getstorybook: ./bin/index.cjs + sb: ./bin/index.cjs storybook: ./bin/index.cjs - checksum: d48c9b2b05279bc0ee8eabeb505e9b662d576fbd8902311cf6694e1c1eb3ef960e417e20f656b6bc869c14b59bedc77c89b70b50575beb2caa24fcd92d3d15b6 + checksum: 93b92e53c00ff29b4864932c26c52dd4a45e76b3d46811a2bcdc0271ef37c96e2f8d1833982569ab6a6348d6e84d8348aecf74ee72164744459de4c78d0f6759 languageName: node linkType: hard @@ -45461,13 +45479,6 @@ __metadata: languageName: node linkType: hard -"tween-functions@npm:^1.2.0": - version: 1.2.0 - resolution: "tween-functions@npm:1.2.0" - checksum: 880708d680eff5c347ddcb9f922ad121703a91c78ce308ed309073e73a794b633eb0b80589a839365803f150515ad34c9646809ae8a0e90f09e62686eefb1ab6 - languageName: node - linkType: hard - "tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": version: 0.14.5 resolution: "tweetnacl@npm:0.14.5" @@ -47329,7 +47340,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.8.0": +"ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.8.0": version: 8.18.1 resolution: "ws@npm:8.18.1" peerDependencies: From b15a7fe77be1c53559ca3ba47db9a79361561ec1 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 09:28:19 +0000 Subject: [PATCH 058/119] Fix dependencies in docs Signed-off-by: Charles de Dreuille --- canon-docs/package.json | 4 +- canon-docs/yarn.lock | 554 ++++++++++++---------------------------- 2 files changed, 168 insertions(+), 390 deletions(-) diff --git a/canon-docs/package.json b/canon-docs/package.json index 7bdaa718be..2bb88bd744 100644 --- a/canon-docs/package.json +++ b/canon-docs/package.json @@ -14,7 +14,7 @@ "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", "@next/mdx": "^15.1.4", - "@storybook/react": "9.0.0-alpha.8", + "@storybook/react": "^8.6.8", "@uiw/codemirror-themes": "^4.23.7", "@uiw/react-codemirror": "^4.23.7", "motion": "^12.4.1", @@ -23,7 +23,7 @@ "react-dom": "^18.0.2", "react-frame-component": "^5.2.7", "shiki": "^1.26.1", - "storybook": "9.0.0-alpha.8" + "storybook": "^8.6.8" }, "devDependencies": { "@types/mdx": "^2.0.13", diff --git a/canon-docs/yarn.lock b/canon-docs/yarn.lock index 204a4bd898..6dbd15358b 100644 --- a/canon-docs/yarn.lock +++ b/canon-docs/yarn.lock @@ -5,32 +5,7 @@ __metadata: version: 6 cacheKey: 8 -"@adobe/css-tools@npm:^4.4.0": - version: 4.4.2 - resolution: "@adobe/css-tools@npm:4.4.2" - checksum: ecc9f626fab00c0d17dc62a3427e515cb6f4413d565d7492184331604530e42e00efbd2d8f6a767b7dbfc68a8a581f270fcddf4eb6bb8cddbb52d1d1df38dc99 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.10.4": - version: 7.26.2 - resolution: "@babel/code-frame@npm:7.26.2" - dependencies: - "@babel/helper-validator-identifier": ^7.25.9 - js-tokens: ^4.0.0 - picocolors: ^1.0.0 - checksum: db13f5c42d54b76c1480916485e6900748bbcb0014a8aca87f50a091f70ff4e0d0a6db63cade75eb41fcc3d2b6ba0a7f89e343def4f96f00269b41b8ab8dd7b8 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 5b85918cb1a92a7f3f508ea02699e8d2422fe17ea8e82acd445006c0ef7520fbf48e3dbcdaf7b0a1d571fc3a2715a29719e5226636cb6042e15fe6ed2a590944 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.6": +"@babel/runtime@npm:^7.18.6": version: 7.26.10 resolution: "@babel/runtime@npm:7.26.10" dependencies: @@ -747,6 +722,39 @@ __metadata: languageName: node linkType: hard +"@storybook/components@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/components@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: fb69c6d7804f91fffd3fc7d42ba5b144c7b808af6e6b764c14cdef11263897e551e5cc8a0fa379b9ed73f5c0438ed32d355c7ed63801046e1cb078c479d4cecf + languageName: node + linkType: hard + +"@storybook/core@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/core@npm:8.6.8" + dependencies: + "@storybook/theming": 8.6.8 + better-opn: ^3.0.2 + browser-assert: ^1.2.1 + esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 + esbuild-register: ^3.5.0 + jsdoc-type-pratt-parser: ^4.0.0 + process: ^0.11.10 + recast: ^0.23.5 + semver: ^7.6.2 + util: ^0.12.5 + ws: ^8.2.3 + peerDependencies: + prettier: ^2 || ^3 + peerDependenciesMeta: + prettier: + optional: true + checksum: d67dea27c021b51f17a0d5807b72a29ea174bb8c945fb41092fbf3698002810da0a510aa7e0e23e1682634362f9b52590ba1a09ef6dd40a2ad5653988b0b0e14 + languageName: node + linkType: hard + "@storybook/global@npm:^5.0.0": version: 5.0.0 resolution: "@storybook/global@npm:5.0.0" @@ -754,32 +762,66 @@ __metadata: languageName: node linkType: hard -"@storybook/react-dom-shim@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/react-dom-shim@npm:9.0.0-alpha.8" +"@storybook/manager-api@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/manager-api@npm:8.6.8" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 - checksum: e235aca5a13900a580fdaa7b11ff00b7dbb389e3b2701ba12688d4d624fe83f6d1448a61c649f4f95f52d72e46fffa67be4cacbf005637110b4f3c372d821d38 + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: ee575781572898fc2fa734750ccb4bad09fc021bd0878ca9a05d9668cb336610d53e8110f4ff3c2c180573a64e9caba8f50f59d0bd3f0398a5c98e2eafdd91ae languageName: node linkType: hard -"@storybook/react@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "@storybook/react@npm:9.0.0-alpha.8" - dependencies: - "@storybook/global": ^5.0.0 - "@storybook/react-dom-shim": 9.0.0-alpha.8 +"@storybook/preview-api@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/preview-api@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: ac923a342d09c9e51f67734acaea19a41dc87cfc6cb22aea262591396d41cd4b69896417b618c55f17a9d64660b659813475c30d338c9bb6aa45391cfe8328f0 + languageName: node + linkType: hard + +"@storybook/react-dom-shim@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/react-dom-shim@npm:8.6.8" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^9.0.0-alpha.8 - typescript: ">= 4.9.x" + storybook: ^8.6.8 + checksum: d48ba28fefe0bbe0bde02de6a99629d84ba9436fb539ffc6d779173f7b8f6ec466e26018e943d95fa079d73ace2d96d5911def0221754262782e8a5e8b20882d + languageName: node + linkType: hard + +"@storybook/react@npm:^8.6.8": + version: 8.6.8 + resolution: "@storybook/react@npm:8.6.8" + dependencies: + "@storybook/components": 8.6.8 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 8.6.8 + "@storybook/preview-api": 8.6.8 + "@storybook/react-dom-shim": 8.6.8 + "@storybook/theming": 8.6.8 + peerDependencies: + "@storybook/test": 8.6.8 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.6.8 + typescript: ">= 4.2.x" peerDependenciesMeta: + "@storybook/test": + optional: true typescript: optional: true - checksum: 4ba2b0fe9cab5272856ab6e26dce732dc7baa4650539e9195c5dca0e15fccd87444ab5f580d17ccf5a98eff54621bbb733dd73c82aca2933f68ff753ff5246b3 + checksum: ebbfb2bed68d4ca8c8777769e5b752b1becf9cc1c3fd6f051df9a8eb012d209526b9e188812f3bf8ecf337a331c5049afa2236d2b073fbcafafd35e79cc3ed78 + languageName: node + linkType: hard + +"@storybook/theming@npm:8.6.8": + version: 8.6.8 + resolution: "@storybook/theming@npm:8.6.8" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 1be0dea23178af562133f1047165e170f7e90bec4c3cedbdcb59df22685f314273a06a4677835ab84e6dbc682b803590adad6963217971c8136b076ce69800aa languageName: node linkType: hard @@ -800,46 +842,6 @@ __metadata: languageName: node linkType: hard -"@testing-library/dom@npm:10.4.0": - version: 10.4.0 - resolution: "@testing-library/dom@npm:10.4.0" - dependencies: - "@babel/code-frame": ^7.10.4 - "@babel/runtime": ^7.12.5 - "@types/aria-query": ^5.0.1 - aria-query: 5.3.0 - chalk: ^4.1.0 - dom-accessibility-api: ^0.5.9 - lz-string: ^1.5.0 - pretty-format: ^27.0.2 - checksum: bb128b90be0c8cd78c5f5e67aa45f53de614cc048a2b50b230e736ec710805ac6c73375af354b83c74d710b3928d52b83a273a4cb89de4eb3efe49e91e706837 - languageName: node - linkType: hard - -"@testing-library/jest-dom@npm:^6.6.3": - version: 6.6.3 - resolution: "@testing-library/jest-dom@npm:6.6.3" - dependencies: - "@adobe/css-tools": ^4.4.0 - aria-query: ^5.0.0 - chalk: ^3.0.0 - css.escape: ^1.5.1 - dom-accessibility-api: ^0.6.3 - lodash: ^4.17.21 - redent: ^3.0.0 - checksum: c1dc4260b05309a0084416639006cd105849acc5b102bef682a3b19bd6fce07ff6762085fc7f2599546c995a2fc66fdb1d70e50e22a634a0098524056cc9e511 - languageName: node - linkType: hard - -"@testing-library/user-event@npm:^14.6.1": - version: 14.6.1 - resolution: "@testing-library/user-event@npm:14.6.1" - peerDependencies: - "@testing-library/dom": ">=7.21.4" - checksum: 4cb8a81fea1fea83a42619e9545137b51636bb7a3182c596bb468e5664f1e4699a275c2d0fb8b6dcc3fe2684f9d87b0637ab7cb4f566051539146872c9141fcb - languageName: node - linkType: hard - "@types/acorn@npm:^4.0.0": version: 4.0.6 resolution: "@types/acorn@npm:4.0.6" @@ -849,13 +851,6 @@ __metadata: languageName: node linkType: hard -"@types/aria-query@npm:^5.0.1": - version: 5.0.4 - resolution: "@types/aria-query@npm:5.0.4" - checksum: ad8b87e4ad64255db5f0a73bc2b4da9b146c38a3a8ab4d9306154334e0fc67ae64e76bfa298eebd1e71830591fb15987e5de7111bdb36a2221bdc379e3415fb0 - languageName: node - linkType: hard - "@types/debug@npm:^4.0.0": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -969,13 +964,6 @@ __metadata: languageName: node linkType: hard -"@types/uuid@npm:^9.0.1": - version: 9.0.8 - resolution: "@types/uuid@npm:9.0.8" - checksum: b8c60b7ba8250356b5088302583d1704a4e1a13558d143c549c408bf8920535602ffc12394ede77f8a8083511b023704bc66d1345792714002bfa261b17c5275 - languageName: node - linkType: hard - "@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": version: 8.19.1 resolution: "@typescript-eslint/eslint-plugin@npm:8.19.1" @@ -1155,47 +1143,6 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/expect@npm:3.0.9" - dependencies: - "@vitest/spy": 3.0.9 - "@vitest/utils": 3.0.9 - chai: ^5.2.0 - tinyrainbow: ^2.0.0 - checksum: 6df325d45e0ad4b6ad73a55e5328f615f92171fc4dbf3875972c08013727cfa435b9916636c7f3902a45f1874db10805d449311b70125edf1422dceb325ac982 - languageName: node - linkType: hard - -"@vitest/pretty-format@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/pretty-format@npm:3.0.9" - dependencies: - tinyrainbow: ^2.0.0 - checksum: 447b53bd962bc5978cf3e8c67f0600e38470ea63ab6ae24fb048dca79305828f37d9d854a7db1abc97ebde66a65187f87a99ca7969e43c750998c944e3ec48c6 - languageName: node - linkType: hard - -"@vitest/spy@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/spy@npm:3.0.9" - dependencies: - tinyspy: ^3.0.2 - checksum: 1b90f40c4ac34529e7d098c745396a51e9b2f187d31d50a664ac7374db56edb3792862a35d1b8049e421705db6445761d687f9f8c5e298a9ca6cfa47d55625d7 - languageName: node - linkType: hard - -"@vitest/utils@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/utils@npm:3.0.9" - dependencies: - "@vitest/pretty-format": 3.0.9 - loupe: ^3.1.3 - tinyrainbow: ^2.0.0 - checksum: d31797594598817670cc49dfcd4ded2953d707c62e5dc7807737e8108073e97499cf7ef2eb3295f1fb52446a8a85ba50aacef21126689251092bc8566bff4bb6 - languageName: node - linkType: hard - "acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -1249,13 +1196,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^5.0.0": - version: 5.2.0 - resolution: "ansi-styles@npm:5.2.0" - checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 - languageName: node - linkType: hard - "ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" @@ -1270,16 +1210,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:5.3.0": - version: 5.3.0 - resolution: "aria-query@npm:5.3.0" - dependencies: - dequal: ^2.0.3 - checksum: 305bd73c76756117b59aba121d08f413c7ff5e80fa1b98e217a3443fcddb9a232ee790e24e432b59ae7625aebcf4c47cb01c2cac872994f0b426f5bdfcd96ba9 - languageName: node - linkType: hard - -"aria-query@npm:^5.0.0, aria-query@npm:^5.3.2": +"aria-query@npm:^5.3.2": version: 5.3.2 resolution: "aria-query@npm:5.3.2" checksum: d971175c85c10df0f6d14adfe6f1292409196114ab3c62f238e208b53103686f46cc70695a4f775b73bc65f6a09b6a092fd963c4f3a5a7d690c8fc5094925717 @@ -1390,13 +1321,6 @@ __metadata: languageName: node linkType: hard -"assertion-error@npm:^2.0.1": - version: 2.0.1 - resolution: "assertion-error@npm:2.0.1" - checksum: a0789dd882211b87116e81e2648ccb7f60340b34f19877dd020b39ebb4714e475eb943e14ba3e22201c221ef6645b7bfe10297e76b6ac95b48a9898c1211ce66 - languageName: node - linkType: hard - "ast-types-flow@npm:^0.0.8": version: 0.0.8 resolution: "ast-types-flow@npm:0.0.8" @@ -1496,6 +1420,13 @@ __metadata: languageName: node linkType: hard +"browser-assert@npm:^1.2.1": + version: 1.2.1 + resolution: "browser-assert@npm:1.2.1" + checksum: 8b2407cd04c1ed592cf892dec35942b7d72635829221e0788c9a16c4d2afa8b7156bc9705b1c4b32c30d88136c576fda3cbcb8f494d6f865264c706ea8798d92 + languageName: node + linkType: hard + "busboy@npm:1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -1505,13 +1436,13 @@ __metadata: languageName: node linkType: hard -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" +"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind-apply-helpers@npm:1.0.2" dependencies: es-errors: ^1.3.0 function-bind: ^1.1.2 - checksum: 3c55343261bb387c58a4762d15ad9d42053659a62681ec5eb50690c6b52a4a666302a01d557133ce6533e8bd04530ee3b209f23dd06c9577a1925556f8fcccdf + checksum: b2863d74fcf2a6948221f65d95b91b4b2d90cfe8927650b506141e669f7d5de65cea191bf788838bc40d13846b7886c5bc5c84ab96c3adbcf88ad69a72fcdc6b languageName: node linkType: hard @@ -1527,13 +1458,13 @@ __metadata: languageName: node linkType: hard -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" +"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3, call-bound@npm:^1.0.4": + version: 1.0.4 + resolution: "call-bound@npm:1.0.4" dependencies: - call-bind-apply-helpers: ^1.0.1 - get-intrinsic: ^1.2.6 - checksum: a93bbe0f2d0a2d6c144a4349ccd0593d5d0d5d9309b69101710644af8964286420062f2cc3114dca120b9bc8cc07507952d4b1b3ea7672e0d7f6f1675efedb32 + call-bind-apply-helpers: ^1.0.2 + get-intrinsic: ^1.3.0 + checksum: 2f6399488d1c272f56306ca60ff696575e2b7f31daf23bc11574798c84d9f2759dceb0cb1f471a85b77f28962a7ac6411f51d283ea2e45319009a19b6ccab3b2 languageName: node linkType: hard @@ -1560,7 +1491,7 @@ __metadata: "@mdx-js/loader": ^3.1.0 "@mdx-js/react": ^3.1.0 "@next/mdx": ^15.1.4 - "@storybook/react": 9.0.0-alpha.8 + "@storybook/react": ^8.6.8 "@types/mdx": ^2.0.13 "@types/node": ^20 "@types/react": ^18.0.0 @@ -1576,7 +1507,7 @@ __metadata: react-dom: ^18.0.2 react-frame-component: ^5.2.7 shiki: ^1.26.1 - storybook: 9.0.0-alpha.8 + storybook: ^8.6.8 typescript: ^5 languageName: unknown linkType: soft @@ -1588,30 +1519,7 @@ __metadata: languageName: node linkType: hard -"chai@npm:^5.2.0": - version: 5.2.0 - resolution: "chai@npm:5.2.0" - dependencies: - assertion-error: ^2.0.1 - check-error: ^2.1.1 - deep-eql: ^5.0.1 - loupe: ^3.1.0 - pathval: ^2.0.0 - checksum: 15e4ba12d02df3620fd59b4a6e8efe43b47872ce61f1c0ca77ac1205a2a5898f3b6f1f52408fd1a708b8d07fdfb5e65b97af40bad9fd94a69ed8d4264c7a69f1 - languageName: node - linkType: hard - -"chalk@npm:^3.0.0": - version: 3.0.0 - resolution: "chalk@npm:3.0.0" - dependencies: - ansi-styles: ^4.1.0 - supports-color: ^7.1.0 - checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": +"chalk@npm:^4.0.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1649,13 +1557,6 @@ __metadata: languageName: node linkType: hard -"check-error@npm:^2.1.1": - version: 2.1.1 - resolution: "check-error@npm:2.1.1" - checksum: d785ed17b1d4a4796b6e75c765a9a290098cf52ff9728ce0756e8ffd4293d2e419dd30c67200aee34202463b474306913f2fcfaf1890641026d9fc6966fea27a - languageName: node - linkType: hard - "client-only@npm:0.0.1": version: 0.0.1 resolution: "client-only@npm:0.0.1" @@ -1733,13 +1634,6 @@ __metadata: languageName: node linkType: hard -"css.escape@npm:^1.5.1": - version: 1.5.1 - resolution: "css.escape@npm:1.5.1" - checksum: f6d38088d870a961794a2580b2b2af1027731bb43261cfdce14f19238a88664b351cc8978abc20f06cc6bbde725699dec8deb6fe9816b139fc3f2af28719e774 - languageName: node - linkType: hard - "csstype@npm:^3.0.2": version: 3.1.3 resolution: "csstype@npm:3.1.3" @@ -1817,13 +1711,6 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^5.0.1": - version: 5.0.2 - resolution: "deep-eql@npm:5.0.2" - checksum: 6aaaadb4c19cbce42e26b2bbe5bd92875f599d2602635dc97f0294bae48da79e89470aedee05f449e0ca8c65e9fd7e7872624d1933a1db02713d99c2ca8d1f24 - languageName: node - linkType: hard - "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -1860,7 +1747,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0, dequal@npm:^2.0.3": +"dequal@npm:^2.0.0": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 @@ -1903,20 +1790,6 @@ __metadata: languageName: node linkType: hard -"dom-accessibility-api@npm:^0.5.9": - version: 0.5.16 - resolution: "dom-accessibility-api@npm:0.5.16" - checksum: 005eb283caef57fc1adec4d5df4dd49189b628f2f575af45decb210e04d634459e3f1ee64f18b41e2dcf200c844bc1d9279d80807e686a30d69a4756151ad248 - languageName: node - linkType: hard - -"dom-accessibility-api@npm:^0.6.3": - version: 0.6.3 - resolution: "dom-accessibility-api@npm:0.6.3" - checksum: c325b5144bb406df23f4affecffc117dbaec9af03daad9ee6b510c5be647b14d28ef0a4ea5ca06d696d8ab40bb777e5fed98b985976fdef9d8790178fa1d573f - languageName: node - linkType: hard - "dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": version: 1.0.1 resolution: "dunder-proto@npm:1.0.1" @@ -2063,12 +1936,12 @@ __metadata: languageName: node linkType: hard -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" +"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": + version: 1.1.1 + resolution: "es-object-atoms@npm:1.1.1" dependencies: es-errors: ^1.3.0 - checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c + checksum: 214d3767287b12f36d3d7267ef342bbbe1e89f899cfd67040309fc65032372a8e60201410a99a1645f2f90c1912c8c49c8668066f6bdd954bcd614dda2e3da97 languageName: node linkType: hard @@ -2684,12 +2557,12 @@ __metadata: languageName: node linkType: hard -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" +"for-each@npm:^0.3.3, for-each@npm:^0.3.5": + version: 0.3.5 + resolution: "for-each@npm:0.3.5" dependencies: - is-callable: ^1.1.3 - checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + is-callable: ^1.2.7 + checksum: 3c986d7e11f4381237cc98baa0a2f87eabe74719eee65ed7bed275163082b940ede19268c61d04c6260e0215983b12f8d885e3c8f9aa8c2113bf07c37051745c languageName: node linkType: hard @@ -2760,21 +2633,21 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" +"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0": + version: 1.3.0 + resolution: "get-intrinsic@npm:1.3.0" dependencies: - call-bind-apply-helpers: ^1.0.1 + call-bind-apply-helpers: ^1.0.2 es-define-property: ^1.0.1 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 + es-object-atoms: ^1.1.1 function-bind: ^1.1.2 - get-proto: ^1.0.0 + get-proto: ^1.0.1 gopd: ^1.2.0 has-symbols: ^1.1.0 hasown: ^2.0.2 math-intrinsics: ^1.1.0 - checksum: a1597b3b432074f805b6a0ba1182130dd6517c0ea0c4eecc4b8834c803913e1ea62dfc412865be795b3dacb1555a21775b70cf9af7a18b1454ff3414e5442d4a + checksum: 301008e4482bb9a9cb49e132b88fee093bff373b4e6def8ba219b1e96b60158a6084f273ef5cafe832e42cd93462f4accb46a618d35fe59a2b507f2388c5b79d languageName: node linkType: hard @@ -3058,13 +2931,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:^4.0.0": - version: 4.0.0 - resolution: "indent-string@npm:4.0.0" - checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 - languageName: node - linkType: hard - "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -3075,7 +2941,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2": +"inherits@npm:2, inherits@npm:^2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -3117,6 +2983,16 @@ __metadata: languageName: node linkType: hard +"is-arguments@npm:^1.0.4": + version: 1.2.0 + resolution: "is-arguments@npm:1.2.0" + dependencies: + call-bound: ^1.0.2 + has-tostringtag: ^1.0.2 + checksum: aae9307fedfe2e5be14aebd0f48a9eeedf6b8c8f5a0b66257b965146d1e94abdc3f08e3dce3b1d908e1fa23c70039a88810ee1d753905758b9b6eebbab0bafeb + languageName: node + linkType: hard + "is-array-buffer@npm:^3.0.4, is-array-buffer@npm:^3.0.5": version: 3.0.5 resolution: "is-array-buffer@npm:3.0.5" @@ -3168,7 +3044,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.2.7": +"is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac @@ -3244,7 +3120,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.10": +"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": version: 1.1.0 resolution: "is-generator-function@npm:1.1.0" dependencies: @@ -3359,7 +3235,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15": +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15, is-typed-array@npm:^1.1.3": version: 1.1.15 resolution: "is-typed-array@npm:1.1.15" dependencies: @@ -3444,7 +3320,7 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": +"js-tokens@npm:^3.0.0 || ^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 @@ -3674,13 +3550,6 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.21": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 - languageName: node - linkType: hard - "longest-streak@npm:^3.0.0": version: 3.1.0 resolution: "longest-streak@npm:3.1.0" @@ -3699,13 +3568,6 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.3": - version: 3.1.3 - resolution: "loupe@npm:3.1.3" - checksum: 9b2530b1d5a44d2c9fc5241f97ea00296dca257173c535b4832bc31f9516e10387991feb5b3fff23df116c8fcf907ce3980f82b215dcc5d19cde17ce9b9ec3e1 - languageName: node - linkType: hard - "lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -3713,15 +3575,6 @@ __metadata: languageName: node linkType: hard -"lz-string@npm:^1.5.0": - version: 1.5.0 - resolution: "lz-string@npm:1.5.0" - bin: - lz-string: bin/bin.js - checksum: 1ee98b4580246fd90dd54da6e346fb1caefcf05f677c686d9af237a157fdea3fd7c83a4bc58f858cd5b10a34d27afe0fdcbd0505a47e0590726a873dc8b8f65d - languageName: node - linkType: hard - "markdown-extensions@npm:^2.0.0": version: 2.0.0 resolution: "markdown-extensions@npm:2.0.0" @@ -4233,13 +4086,6 @@ __metadata: languageName: node linkType: hard -"min-indent@npm:^1.0.0": - version: 1.0.1 - resolution: "min-indent@npm:1.0.1" - checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 - languageName: node - linkType: hard - "minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -4607,13 +4453,6 @@ __metadata: languageName: node linkType: hard -"pathval@npm:^2.0.0": - version: 2.0.0 - resolution: "pathval@npm:2.0.0" - checksum: 682b6a6289de7990909effef7dae9aa7bb6218c0426727bccf66a35b34e7bfbc65615270c5e44e3c9557a5cb44b1b9ef47fc3cb18bce6ad3ba92bcd28467ed7d - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.1.1 resolution: "picocolors@npm:1.1.1" @@ -4628,15 +4467,6 @@ __metadata: languageName: node linkType: hard -"polished@npm:^4.2.2": - version: 4.3.1 - resolution: "polished@npm:4.3.1" - dependencies: - "@babel/runtime": ^7.17.8 - checksum: a6f863c23f1d2f3f5cda3427b5885c9fb9e83b036d681e24820b143c7df40d2685bebb01c0939767120a28e1183671ae17c93db82ac30b3c20942180bb153bc7 - languageName: node - linkType: hard - "possible-typed-array-names@npm:^1.0.0": version: 1.0.0 resolution: "possible-typed-array-names@npm:1.0.0" @@ -4662,14 +4492,10 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^27.0.2": - version: 27.5.1 - resolution: "pretty-format@npm:27.5.1" - dependencies: - ansi-regex: ^5.0.1 - ansi-styles: ^5.0.0 - react-is: ^17.0.1 - checksum: cf610cffcb793885d16f184a62162f2dd0df31642d9a18edf4ca298e909a8fe80bdbf556d5c9573992c102ce8bf948691da91bf9739bee0ffb6e79c8a8a6e088 +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 languageName: node linkType: hard @@ -4735,13 +4561,6 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^17.0.1": - version: 17.0.2 - resolution: "react-is@npm:17.0.2" - checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 - languageName: node - linkType: hard - "react@npm:^18.0.2": version: 18.3.1 resolution: "react@npm:18.3.1" @@ -4812,16 +4631,6 @@ __metadata: languageName: node linkType: hard -"redent@npm:^3.0.0": - version: 3.0.0 - resolution: "redent@npm:3.0.0" - dependencies: - indent-string: ^4.0.0 - strip-indent: ^3.0.0 - checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b - languageName: node - linkType: hard - "reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": version: 1.0.10 resolution: "reflect.getprototypeof@npm:1.0.10" @@ -5244,34 +5053,21 @@ __metadata: languageName: node linkType: hard -"storybook@npm:9.0.0-alpha.8": - version: 9.0.0-alpha.8 - resolution: "storybook@npm:9.0.0-alpha.8" +"storybook@npm:^8.6.8": + version: 8.6.8 + resolution: "storybook@npm:8.6.8" dependencies: - "@storybook/global": ^5.0.0 - "@testing-library/dom": 10.4.0 - "@testing-library/jest-dom": ^6.6.3 - "@testing-library/user-event": ^14.6.1 - "@types/uuid": ^9.0.1 - "@vitest/expect": 3.0.9 - "@vitest/spy": 3.0.9 - better-opn: ^3.0.2 - esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 - esbuild-register: ^3.5.0 - jsdoc-type-pratt-parser: ^4.0.0 - polished: ^4.2.2 - recast: ^0.23.5 - semver: ^7.6.2 - uuid: ^9.0.0 - ws: ^8.18.0 + "@storybook/core": 8.6.8 peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: prettier: optional: true bin: + getstorybook: ./bin/index.cjs + sb: ./bin/index.cjs storybook: ./bin/index.cjs - checksum: d48c9b2b05279bc0ee8eabeb505e9b662d576fbd8902311cf6694e1c1eb3ef960e417e20f656b6bc869c14b59bedc77c89b70b50575beb2caa24fcd92d3d15b6 + checksum: 93b92e53c00ff29b4864932c26c52dd4a45e76b3d46811a2bcdc0271ef37c96e2f8d1833982569ab6a6348d6e84d8348aecf74ee72164744459de4c78d0f6759 languageName: node linkType: hard @@ -5419,15 +5215,6 @@ __metadata: languageName: node linkType: hard -"strip-indent@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-indent@npm:3.0.0" - dependencies: - min-indent: ^1.0.0 - checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 - languageName: node - linkType: hard - "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -5504,20 +5291,6 @@ __metadata: languageName: node linkType: hard -"tinyrainbow@npm:^2.0.0": - version: 2.0.0 - resolution: "tinyrainbow@npm:2.0.0" - checksum: 26360631d97e43955a07cfb70fe40a154ce4e2bcd14fa3d37ce8e2ed8f4fa9e5ba00783e4906bbfefe6dcabef5d3510f5bee207cb693bee4e4e7553f5454bef1 - languageName: node - linkType: hard - -"tinyspy@npm:^3.0.2": - version: 3.0.2 - resolution: "tinyspy@npm:3.0.2" - checksum: 5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -5758,12 +5531,16 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 39931f6da74e307f51c0fb463dc2462807531dc80760a9bff1e35af4316131b4fc3203d16da60ae33f07fdca5b56f3f1dd662da0c99fea9aaeab2004780cc5f4 +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: ^2.0.3 + is-arguments: ^1.0.4 + is-generator-function: ^1.0.7 + is-typed-array: ^1.1.3 + which-typed-array: ^1.1.2 + checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a languageName: node linkType: hard @@ -5840,17 +5617,18 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18": - version: 1.1.18 - resolution: "which-typed-array@npm:1.1.18" +"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.2": + version: 1.1.19 + resolution: "which-typed-array@npm:1.1.19" dependencies: available-typed-arrays: ^1.0.7 call-bind: ^1.0.8 - call-bound: ^1.0.3 - for-each: ^0.3.3 + call-bound: ^1.0.4 + for-each: ^0.3.5 + get-proto: ^1.0.1 gopd: ^1.2.0 has-tostringtag: ^1.0.2 - checksum: d2feea7f51af66b3a240397aa41c796585033e1069f18e5b6d4cd3878538a1e7780596fd3ea9bf347c43d9e98e13be09b37d9ea3887cef29b11bc291fd47bb52 + checksum: 162d2a07f68ea323f88ed9419861487ce5d02cb876f2cf9dd1e428d04a63133f93a54f89308f337b27cabd312ee3d027cae4a79002b2f0a85b79b9ef4c190670 languageName: node linkType: hard @@ -5901,7 +5679,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.18.0": +"ws@npm:^8.2.3": version: 8.18.1 resolution: "ws@npm:8.18.1" peerDependencies: From bbab6b6d9b05923bdedf71d05e4e1097e46285d0 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 14:53:27 +0000 Subject: [PATCH 059/119] Update snippets Signed-off-by: Charles de Dreuille --- .../src/app/(docs)/components/box/page.mdx | 4 +- .../app/(docs)/components/checkbox/page.mdx | 7 +- .../app/(docs)/components/container/page.mdx | 4 +- .../src/app/(docs)/components/field/page.mdx | 11 +- .../src/app/(docs)/components/flex/page.mdx | 4 +- .../src/app/(docs)/components/grid/page.mdx | 4 +- .../app/(docs)/components/heading/page.mdx | 12 +-- .../(docs)/components/icon-button/page.mdx | 19 ++-- .../src/app/(docs)/components/icon/page.mdx | 4 +- .../src/app/(docs)/components/input/page.mdx | 6 +- .../src/app/(docs)/components/text/page.mdx | 15 +-- .../src/app/(docs)/theme/typography/page.mdx | 8 +- .../src/app/(playground)/playground/page.tsx | 19 ++-- canon-docs/src/snippets/box.tsx | 32 +++--- canon-docs/src/snippets/checkbox.tsx | 42 +++----- canon-docs/src/snippets/container.tsx | 34 +++--- canon-docs/src/snippets/field.tsx | 34 +++--- canon-docs/src/snippets/flex.tsx | 41 +++---- canon-docs/src/snippets/grid.tsx | 36 +++---- canon-docs/src/snippets/heading.tsx | 52 +++------ canon-docs/src/snippets/icon-button.tsx | 73 ++++--------- canon-docs/src/snippets/icon.tsx | 19 +++- canon-docs/src/snippets/inline.tsx | 47 -------- canon-docs/src/snippets/input.tsx | 43 +++----- canon-docs/src/snippets/text.tsx | 102 +++--------------- .../components/Heading/Heading.stories.tsx | 5 +- packages/canon/src/components/Icon/icons.ts | 2 +- packages/canon/src/components/Icon/types.ts | 5 +- 28 files changed, 238 insertions(+), 446 deletions(-) delete mode 100644 canon-docs/src/snippets/inline.tsx diff --git a/canon-docs/src/app/(docs)/components/box/page.mdx b/canon-docs/src/app/(docs)/components/box/page.mdx index c1413dbe19..1a96ffc621 100644 --- a/canon-docs/src/app/(docs)/components/box/page.mdx +++ b/canon-docs/src/app/(docs)/components/box/page.mdx @@ -2,7 +2,7 @@ import { CodeBlock } from '@/components/CodeBlock'; import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; import { Snippet } from '@/components/Snippet'; -import { BoxPreview } from '@/snippets/box'; +import { BoxSnippet } from '@/snippets/box'; import { boxPropDefs } from './props'; import { spacingPropDefs } from '../../../../utils/propDefs'; @@ -12,7 +12,7 @@ Box is the lowest-level component in Canon. It provides a consistent API for sty } + preview={} code={` `} diff --git a/canon-docs/src/app/(docs)/components/checkbox/page.mdx b/canon-docs/src/app/(docs)/components/checkbox/page.mdx index fd2ec42e1b..42d67c7857 100644 --- a/canon-docs/src/app/(docs)/components/checkbox/page.mdx +++ b/canon-docs/src/app/(docs)/components/checkbox/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { CheckboxPreview, CheckboxAllVariants } from '@/snippets/checkbox'; +import { CheckboxSnippet } from '@/snippets/checkbox'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; @@ -11,8 +11,9 @@ import { checkboxPropDefs } from './props'; A checkbox component that can be used to trigger actions. } + preview={} code={``} /> @@ -55,7 +56,7 @@ Here's a view when checkboxes have different variants. align="center" py={4} open - preview={} + preview={} code={` diff --git a/canon-docs/src/app/(docs)/components/container/page.mdx b/canon-docs/src/app/(docs)/components/container/page.mdx index 0dbe0223e5..cd6b2d738d 100644 --- a/canon-docs/src/app/(docs)/components/container/page.mdx +++ b/canon-docs/src/app/(docs)/components/container/page.mdx @@ -2,7 +2,7 @@ import { CodeBlock } from '@/components/CodeBlock'; import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; import { Snippet } from '@/components/Snippet'; -import { ContainerPreview } from '@/snippets/container'; +import { ContainerSnippet } from '@/snippets/container'; import { containerPropDefs } from './props'; # Container @@ -12,7 +12,7 @@ content on the page. } + preview={} code={` `} diff --git a/canon-docs/src/app/(docs)/components/field/page.mdx b/canon-docs/src/app/(docs)/components/field/page.mdx index 54c091faeb..ceaddcaac5 100644 --- a/canon-docs/src/app/(docs)/components/field/page.mdx +++ b/canon-docs/src/app/(docs)/components/field/page.mdx @@ -2,7 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { FieldPreview } from '@/snippets/field'; +import { FieldSnippet } from '@/snippets/field'; import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; import { fieldRootPropDefs, @@ -15,7 +15,12 @@ import { A wrapper around `Input` or `Select` component to add label, description and error messages.. -} code={``} /> +} + code={``} +/> @@ -85,7 +90,7 @@ Here's a simple input with a label and description. align="center" py={4} open - preview={} + preview={} code={` Name Visible on your profile diff --git a/canon-docs/src/app/(docs)/components/flex/page.mdx b/canon-docs/src/app/(docs)/components/flex/page.mdx index 0e1a6a1fb8..3d0c22a90b 100644 --- a/canon-docs/src/app/(docs)/components/flex/page.mdx +++ b/canon-docs/src/app/(docs)/components/flex/page.mdx @@ -8,7 +8,7 @@ import { flexAlign, } from '@/snippets/_snippets'; import { Snippet } from '@/components/Snippet'; -import { FlexPreview } from '@/snippets/flex'; +import { FlexSnippet } from '@/snippets/flex'; import { flexPropDefs } from './props'; import { spacingPropDefs } from '../../../../utils/propDefs'; @@ -21,7 +21,7 @@ columns. All values are responsive. } + preview={} code={` diff --git a/canon-docs/src/app/(docs)/components/grid/page.mdx b/canon-docs/src/app/(docs)/components/grid/page.mdx index c57493b114..94f3eaec08 100644 --- a/canon-docs/src/app/(docs)/components/grid/page.mdx +++ b/canon-docs/src/app/(docs)/components/grid/page.mdx @@ -3,7 +3,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; import { grid } from '@/snippets/_snippets'; import { Snippet } from '@/components/Snippet'; -import { GridPreview } from '@/snippets/grid'; +import { GridSnippet } from '@/snippets/grid'; import { spacingPropDefs } from '../../../../utils/propDefs'; import { gridPropDefs, gridItemPropDefs } from './props'; @@ -14,7 +14,7 @@ more complex ones. } + preview={} code={` diff --git a/canon-docs/src/app/(docs)/components/heading/page.mdx b/canon-docs/src/app/(docs)/components/heading/page.mdx index ad8131cdbd..98bdab6efb 100644 --- a/canon-docs/src/app/(docs)/components/heading/page.mdx +++ b/canon-docs/src/app/(docs)/components/heading/page.mdx @@ -1,9 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { - HeadingPreview, - HeadingAllVariants, - HeadingResponsive, -} from '@/snippets/heading'; +import { HeadingSnippet } from '@/snippets/heading'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; @@ -15,7 +11,7 @@ Headings are used to structure the content of your page. } + preview={} code={`Hello World!`} /> @@ -56,7 +52,7 @@ appearance of the heading. } + preview={} code={` Display Title 1 @@ -74,7 +70,7 @@ on the screen size. } + preview={} code={` Responsive heading `} diff --git a/canon-docs/src/app/(docs)/components/icon-button/page.mdx b/canon-docs/src/app/(docs)/components/icon-button/page.mdx index 28b6eefbf2..d1ea768a62 100644 --- a/canon-docs/src/app/(docs)/components/icon-button/page.mdx +++ b/canon-docs/src/app/(docs)/components/icon-button/page.mdx @@ -2,12 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { - IconButtonPreview, - IconButtonSizes, - IconButtonDisabled, - IconButtonResponsive, -} from '@/snippets/icon-button'; +import { IconButtonSnippet } from '@/snippets/icon-button'; import { iconButtonVariants } from '@/snippets/_snippets'; import { iconButtonPropDefs } from './props'; @@ -18,11 +13,11 @@ A button component with a single icon that can be used to trigger actions. } + preview={} code={` -`} + `} /> @@ -62,7 +57,7 @@ Here's a view when buttons have different variants. align="center" py={4} open - preview={} + preview={} code={iconButtonVariants} /> @@ -74,7 +69,7 @@ Here's a view when buttons have different sizes. align="center" py={4} open - preview={} + preview={} code={` @@ -89,7 +84,7 @@ Here's a view when buttons are disabled. align="center" py={4} open - preview={} + preview={} code={``} /> @@ -101,6 +96,6 @@ Here's a view when buttons are responsive. align="center" py={4} open - preview={} + preview={} code={``} /> diff --git a/canon-docs/src/app/(docs)/components/icon/page.mdx b/canon-docs/src/app/(docs)/components/icon/page.mdx index 3d8d065374..78d8c85d01 100644 --- a/canon-docs/src/app/(docs)/components/icon/page.mdx +++ b/canon-docs/src/app/(docs)/components/icon/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { IconPreview } from '@/snippets/icon'; +import { IconSnippet } from '@/snippets/icon'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; @@ -12,7 +12,7 @@ Icons are used to represent an action or a state. } + preview={} code={``} /> diff --git a/canon-docs/src/app/(docs)/components/input/page.mdx b/canon-docs/src/app/(docs)/components/input/page.mdx index 228ef68061..a74862a62e 100644 --- a/canon-docs/src/app/(docs)/components/input/page.mdx +++ b/canon-docs/src/app/(docs)/components/input/page.mdx @@ -2,7 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { InputPreview, InputSizes } from '@/snippets/input'; +import { InputSnippet } from '@/snippets/input'; import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; import { inputPropDefs } from './props'; @@ -13,7 +13,7 @@ A input component tfor your forms. } + preview={} code={``} /> @@ -55,7 +55,7 @@ Here's a simple input with a label and description. align="center" py={4} open - preview={} + preview={} code={` diff --git a/canon-docs/src/app/(docs)/components/text/page.mdx b/canon-docs/src/app/(docs)/components/text/page.mdx index 9b904f84c4..ef18739199 100644 --- a/canon-docs/src/app/(docs)/components/text/page.mdx +++ b/canon-docs/src/app/(docs)/components/text/page.mdx @@ -1,10 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { - TextPreview, - TextAllVariants, - TextResponsive, - TextAllWeights, -} from '@/snippets/text'; +import { TextSnippet } from '@/snippets/text'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; @@ -16,7 +11,7 @@ The `Text` component is used to display content on your page. } + preview={} code={` A man looks at a painting in a museum and says, “Brothers and sisters I have none, but that man's father is my father's son.” Who is in @@ -60,7 +55,7 @@ appearance of the text. } + preview={} code={` A man looks at a painting in a museum and says, “Brothers and sisters I @@ -92,7 +87,7 @@ appearance of the text. } + preview={} code={` A man looks at a painting in a museum and says, “Brothers and sisters I @@ -114,7 +109,7 @@ on the screen size. } + preview={} code={` Responsive text `} diff --git a/canon-docs/src/app/(docs)/theme/typography/page.mdx b/canon-docs/src/app/(docs)/theme/typography/page.mdx index 74b3144ef6..9ec36d6e8b 100644 --- a/canon-docs/src/app/(docs)/theme/typography/page.mdx +++ b/canon-docs/src/app/(docs)/theme/typography/page.mdx @@ -1,5 +1,5 @@ -import { HeadingAllVariants } from '@/snippets/heading'; -import { TextAllVariants } from '@/snippets/text'; +import { HeadingSnippet } from '@/snippets/heading'; +import { TextSnippet } from '@/snippets/text'; import { Snippet } from '@/components/Snippet'; # Typography @@ -20,7 +20,7 @@ component](?path=/docs/components-heading--docs). } + preview={} code={` Display Title 1 @@ -40,7 +40,7 @@ page. } + preview={} code={` A man looks at a painting in a museum and says, “Brothers and sisters I diff --git a/canon-docs/src/app/(playground)/playground/page.tsx b/canon-docs/src/app/(playground)/playground/page.tsx index 354f07bb25..7184227a0a 100644 --- a/canon-docs/src/app/(playground)/playground/page.tsx +++ b/canon-docs/src/app/(playground)/playground/page.tsx @@ -5,10 +5,10 @@ import { Grid, Flex, Text } from '../../../../../packages/canon'; import { screenSizes } from '@/utils/data'; import { Frame } from '@/components/Frame'; import { usePlayground } from '@/utils/playground-context'; -import { ButtonPlayground } from '@/snippets/button'; -import { CheckboxPlayground } from '@/snippets/checkbox'; -import { HeadingPlayground } from '@/snippets/heading'; -import { TextPlayground } from '@/snippets/text'; +import { ButtonSnippet } from '@/snippets/button'; +import { CheckboxSnippet } from '@/snippets/checkbox'; +import { HeadingSnippet } from '@/snippets/heading'; +import { TextSnippet } from '@/snippets/text'; import styles from './styles.module.css'; @@ -55,16 +55,19 @@ const Content = () => { return ( {selectedComponents.find(c => c === 'button') && ( - } title="Button" /> + } title="Button" /> )} {selectedComponents.find(c => c === 'checkbox') && ( - } title="Checkbox" /> + } + title="Checkbox" + /> )} {selectedComponents.find(c => c === 'heading') && ( - } title="Heading" /> + } title="Heading" /> )} {selectedComponents.find(c => c === 'text') && ( - } title="Text" /> + } title="Text" /> )} {/* {selectedComponents.find(c => c === 'input') && ( } title="Input" /> diff --git a/canon-docs/src/snippets/box.tsx b/canon-docs/src/snippets/box.tsx index 2a99ebee7d..ff7725a5ad 100644 --- a/canon-docs/src/snippets/box.tsx +++ b/canon-docs/src/snippets/box.tsx @@ -1,20 +1,20 @@ 'use client'; -import { Box } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as BoxStories from '../../../packages/canon/src/components/Box/Box.stories'; -export const BoxPreview = () => { - return ( - - ); +export const BoxSnippet = ({ story }: { story: string }) => { + const stories = composeStories(BoxStories); + const [isReady, setIsReady] = useState(false); + + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Preview') return ; + + return null; }; diff --git a/canon-docs/src/snippets/checkbox.tsx b/canon-docs/src/snippets/checkbox.tsx index fe2a5b0219..fe71240d2d 100644 --- a/canon-docs/src/snippets/checkbox.tsx +++ b/canon-docs/src/snippets/checkbox.tsx @@ -1,32 +1,22 @@ 'use client'; -import { Checkbox, Flex, Text } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as CheckboxStories from '../../../packages/canon/src/components/Checkbox/Checkbox.stories'; -export const CheckboxPreview = () => { - return ; -}; +export const CheckboxSnippet = ({ story }: { story: string }) => { + const stories = composeStories(CheckboxStories); + const [isReady, setIsReady] = useState(false); -export const CheckboxAllVariants = () => { - return ( - - - - - - - ); -}; + useEffect(() => { + setIsReady(true); + }, [story]); -export const CheckboxPlayground = () => { - return ( - - All variants - - - - - - - - ); + if (!isReady) return null; + + if (story === 'Default') return ; + if (story === 'AllVariants') return ; + if (story === 'Playground') return ; + + return null; }; diff --git a/canon-docs/src/snippets/container.tsx b/canon-docs/src/snippets/container.tsx index 27c0ba9922..c73988c28e 100644 --- a/canon-docs/src/snippets/container.tsx +++ b/canon-docs/src/snippets/container.tsx @@ -1,24 +1,20 @@ 'use client'; -import { Box, Container } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as ContainerStories from '../../../packages/canon/src/components/Container/Container.stories'; -const DecorativeBox = () => ( - -); +export const ContainerSnippet = ({ story }: { story: string }) => { + const stories = composeStories(ContainerStories); + const [isReady, setIsReady] = useState(false); -export const ContainerPreview = () => { - return ( - - - - ); + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Preview') return ; + + return null; }; diff --git a/canon-docs/src/snippets/field.tsx b/canon-docs/src/snippets/field.tsx index e801d85641..dfe16a80a9 100644 --- a/canon-docs/src/snippets/field.tsx +++ b/canon-docs/src/snippets/field.tsx @@ -1,23 +1,21 @@ 'use client'; -import { Input, Field } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as FieldStories from '../../../packages/canon/src/components/Field/Field.stories'; -export const FieldPreview = () => { - return ( -
- - Name - - Visible on your profile - -
- ); -}; +export const FieldSnippet = ({ story }: { story: string }) => { + const stories = composeStories(FieldStories); + const [isReady, setIsReady] = useState(false); -export const InputPlayground = () => { - return ( -
- -
- ); + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Default') return ; + if (story === 'WithLabelAndDescription') + return ; + return null; }; diff --git a/canon-docs/src/snippets/flex.tsx b/canon-docs/src/snippets/flex.tsx index 8bfab8878e..d020a37537 100644 --- a/canon-docs/src/snippets/flex.tsx +++ b/canon-docs/src/snippets/flex.tsx @@ -1,31 +1,20 @@ 'use client'; -import { Flex } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as FlexStories from '../../../packages/canon/src/components/Flex/Flex.stories'; -const DecorativeBox = () => { - return ( -
- ); -}; +export const FlexSnippet = ({ story }: { story: string }) => { + const stories = composeStories(FlexStories); + const [isReady, setIsReady] = useState(false); -export const FlexPreview = () => { - return ( -
- - - - - -
- ); + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Default') return ; + + return null; }; diff --git a/canon-docs/src/snippets/grid.tsx b/canon-docs/src/snippets/grid.tsx index 87012b7630..8f72e8453c 100644 --- a/canon-docs/src/snippets/grid.tsx +++ b/canon-docs/src/snippets/grid.tsx @@ -1,26 +1,20 @@ 'use client'; -import { Box, Grid } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as GridStories from '../../../packages/canon/src/components/Grid/Grid.stories'; -const FakeBox = () => ( - -); +export const GridSnippet = ({ story }: { story: string }) => { + const stories = composeStories(GridStories); + const [isReady, setIsReady] = useState(false); -export const GridPreview = () => { - return ( - - - - - - ); + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Default') return ; + + return null; }; diff --git a/canon-docs/src/snippets/heading.tsx b/canon-docs/src/snippets/heading.tsx index 484497e7a7..5ec970c4a7 100644 --- a/canon-docs/src/snippets/heading.tsx +++ b/canon-docs/src/snippets/heading.tsx @@ -1,42 +1,24 @@ 'use client'; -import { Heading, Flex, Text } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as HeadingStories from '../../../packages/canon/src/components/Heading/Heading.stories'; -export const HeadingPreview = () => { - return Look mum, no hands!; -}; +export const HeadingSnippet = ({ story }: { story: string }) => { + const stories = composeStories(HeadingStories); + const [isReady, setIsReady] = useState(false); -export const HeadingAllVariants = () => { - return ( - - Display - Title 1 - Title 2 - Title 3 - Title 4 - - ); -}; + useEffect(() => { + setIsReady(true); + }, [story]); -export const HeadingResponsive = () => { - return ( - - - Responsive heading - - - ); -}; + if (!isReady) return null; -export const HeadingPlayground = () => { - return ( - - All variants - Display - Title 1 - Title 2 - Title 3 - Title 4 - - ); + if (story === 'Default') return ; + if (story === 'Title1') return ; + if (story === 'AllVariants') return ; + if (story === 'Responsive') return ; + if (story === 'Playground') return ; + + return null; }; diff --git a/canon-docs/src/snippets/icon-button.tsx b/canon-docs/src/snippets/icon-button.tsx index 2079041456..954822cce6 100644 --- a/canon-docs/src/snippets/icon-button.tsx +++ b/canon-docs/src/snippets/icon-button.tsx @@ -1,57 +1,24 @@ 'use client'; -import { IconButton, Flex, ButtonProps, Text } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as IconButtonStories from '../../../packages/canon/src/components/IconButton/IconButton.stories'; -export const IconButtonPreview = () => { - return ( - - - - - ); -}; - -export const IconButtonSizes = () => { - return ( - - - - - ); -}; - -export const IconButtonDisabled = () => { - return ; -}; - -export const IconButtonResponsive = () => { - return ( - - ); -}; - -export const IconButtonPlayground = () => { - const variants: string[] = ['primary', 'secondary']; - - return ( - - {variants.map(variant => ( - - {variant} - {['small', 'medium'].map(size => ( - - - - ))} - - ))} - - ); +export const IconButtonSnippet = ({ story }: { story: string }) => { + const stories = composeStories(IconButtonStories); + const [isReady, setIsReady] = useState(false); + + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Variants') return ; + if (story === 'Sizes') return ; + if (story === 'Disabled') return ; + if (story === 'Responsive') return ; + if (story === 'Playground') return ; + + return null; }; diff --git a/canon-docs/src/snippets/icon.tsx b/canon-docs/src/snippets/icon.tsx index 126dbaf686..b0557ab2cd 100644 --- a/canon-docs/src/snippets/icon.tsx +++ b/canon-docs/src/snippets/icon.tsx @@ -1,7 +1,20 @@ 'use client'; -import { Icon } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as IconStories from '../../../packages/canon/src/components/Icon/Icon.stories'; -export const IconPreview = () => { - return ; +export const IconSnippet = ({ story }: { story: string }) => { + const stories = composeStories(IconStories); + const [isReady, setIsReady] = useState(false); + + useEffect(() => { + setIsReady(true); + }, [story]); + + if (!isReady) return null; + + if (story === 'Default') return ; + + return null; }; diff --git a/canon-docs/src/snippets/inline.tsx b/canon-docs/src/snippets/inline.tsx deleted file mode 100644 index 43fd56c650..0000000000 --- a/canon-docs/src/snippets/inline.tsx +++ /dev/null @@ -1,47 +0,0 @@ -'use client'; - -import { Box, Flex } from '../../../packages/canon'; - -const fakeBlockList = [ - { width: 45, height: 60 }, - { width: 150, height: 75 }, - { width: 80, height: 50 }, - { width: 120, height: 70 }, - { width: 95, height: 65 }, - { width: 80, height: 32 }, - { width: 130, height: 60 }, - { width: 100, height: 80 }, - { width: 140, height: 45 }, - { width: 85, height: 70 }, - { width: 125, height: 50 }, -]; - -const FakeBox = ({ - width = 120, - height = 80, -}: { - width?: number; - height?: number; -}) => ( - -); - -export const InlinePreview = () => { - return ( - - {fakeBlockList.map((block, index) => ( - - ))} - - ); -}; diff --git a/canon-docs/src/snippets/input.tsx b/canon-docs/src/snippets/input.tsx index 69d0b62b7f..f4536cdde6 100644 --- a/canon-docs/src/snippets/input.tsx +++ b/canon-docs/src/snippets/input.tsx @@ -1,36 +1,21 @@ 'use client'; -import { Input, Grid } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as InputStories from '../../../packages/canon/src/components/Input/Input.stories'; -export const InputPreview = () => { - return ( -
- -
- ); -}; +export const InputSnippet = ({ story }: { story: string }) => { + const stories = composeStories(InputStories); + const [isReady, setIsReady] = useState(false); -export const InputSizes = () => { - return ( - - - - - ); -}; + useEffect(() => { + setIsReady(true); + }, [story]); -export const InputError = () => { - return ( -
- -
- ); -}; + if (!isReady) return null; -export const InputPlayground = () => { - return ( -
- -
- ); + if (story === 'Primary') return ; + if (story === 'Sizes') return ; + + return null; }; diff --git a/canon-docs/src/snippets/text.tsx b/canon-docs/src/snippets/text.tsx index 4d39cbf6dd..e721dcc094 100644 --- a/canon-docs/src/snippets/text.tsx +++ b/canon-docs/src/snippets/text.tsx @@ -1,94 +1,24 @@ 'use client'; -import { Flex, Text } from '../../../packages/canon'; +import { useEffect, useState } from 'react'; +import { composeStories } from '@storybook/react'; +import * as TextStories from '../../../packages/canon/src/components/Text/Text.stories'; -export const TextPreview = () => { - return ( - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is in - the painting? - - ); -}; +export const TextSnippet = ({ story }: { story: string }) => { + const stories = composeStories(TextStories); + const [isReady, setIsReady] = useState(false); -export const TextAllVariants = () => { - return ( - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - ); -}; + useEffect(() => { + setIsReady(true); + }, [story]); -export const TextAllWeights = () => { - return ( - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - ); -}; + if (!isReady) return null; -export const TextResponsive = () => { - return ( - Responsive text - ); -}; + if (story === 'Default') return ; + if (story === 'AllVariants') return ; + if (story === 'AllWeights') return ; + if (story === 'Responsive') return ; + if (story === 'Playground') return ; -export const TextPlayground = () => { - return ( - - Subtitle - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - Body - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - Caption - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - Label - - A man looks at a painting in a museum and says, “Brothers and sisters I - have none, but that man's father is my father's son.” Who is - in the painting? - - - ); + return null; }; diff --git a/packages/canon/src/components/Heading/Heading.stories.tsx b/packages/canon/src/components/Heading/Heading.stories.tsx index 1357bde877..b4c0ab7546 100644 --- a/packages/canon/src/components/Heading/Heading.stories.tsx +++ b/packages/canon/src/components/Heading/Heading.stories.tsx @@ -42,7 +42,7 @@ export const Title1: Story = { export const AllVariants: Story = { render: () => ( - + Display Title 1 Title 2 @@ -70,8 +70,7 @@ export const CustomTag: Story = { export const Playground: Story = { render: () => ( - - All variants + Display Title 1 Title 2 diff --git a/packages/canon/src/components/Icon/icons.ts b/packages/canon/src/components/Icon/icons.ts index 8cc862459c..615c918db7 100644 --- a/packages/canon/src/components/Icon/icons.ts +++ b/packages/canon/src/components/Icon/icons.ts @@ -130,4 +130,4 @@ export const icons: IconMap = { youtube: RiYoutubeLine, 'zoom-in': RiZoomInLine, 'zoom-out': RiZoomOutLine, -}; +} as const; diff --git a/packages/canon/src/components/Icon/types.ts b/packages/canon/src/components/Icon/types.ts index 5cbdb8e147..4870a1afc4 100644 --- a/packages/canon/src/components/Icon/types.ts +++ b/packages/canon/src/components/Icon/types.ts @@ -15,6 +15,7 @@ */ import { ReactNode } from 'react'; +import type { RemixiconComponentType } from '@remixicon/react'; /** @public */ export type IconNames = @@ -74,7 +75,7 @@ export type IconNames = | 'zoom-out'; /** @public */ -export type IconMap = Partial>; +export type IconMap = Partial>; /** @public */ export type IconProps = { @@ -92,5 +93,5 @@ export interface IconContextProps { /** @public */ export interface IconProviderProps { children?: ReactNode; - overrides?: Partial>; + overrides?: Partial>; } From 5e80f0ba7e01064719a879a45422515798963a59 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 14:58:57 +0000 Subject: [PATCH 060/119] Changeset + report Signed-off-by: Charles de Dreuille --- .changeset/quick-carrots-open.md | 5 +++++ packages/canon/report.api.md | 5 +++-- packages/canon/src/components/Heading/Heading.stories.tsx | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/quick-carrots-open.md diff --git a/.changeset/quick-carrots-open.md b/.changeset/quick-carrots-open.md new file mode 100644 index 0000000000..7cde586e64 --- /dev/null +++ b/.changeset/quick-carrots-open.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Fix types on the Icon component. diff --git a/packages/canon/report.api.md b/packages/canon/report.api.md index e3d55339ea..6dfbc59ffb 100644 --- a/packages/canon/report.api.md +++ b/packages/canon/report.api.md @@ -13,6 +13,7 @@ import { default as React_2 } from 'react'; import * as React_3 from 'react'; import { ReactNode } from 'react'; import { RefAttributes } from 'react'; +import type { RemixiconComponentType } from '@remixicon/react'; import { ScrollArea as ScrollArea_2 } from '@base-ui-components/react/scroll-area'; import { Tooltip as Tooltip_2 } from '@base-ui-components/react/tooltip'; @@ -636,7 +637,7 @@ export interface IconContextProps { } // @public (undocumented) -export type IconMap = Partial>; +export type IconMap = Partial>; // @public (undocumented) export type IconNames = @@ -711,7 +712,7 @@ export interface IconProviderProps { // (undocumented) children?: ReactNode; // (undocumented) - overrides?: Partial>; + overrides?: Partial>; } // @public (undocumented) diff --git a/packages/canon/src/components/Heading/Heading.stories.tsx b/packages/canon/src/components/Heading/Heading.stories.tsx index b4c0ab7546..4b1d06aebd 100644 --- a/packages/canon/src/components/Heading/Heading.stories.tsx +++ b/packages/canon/src/components/Heading/Heading.stories.tsx @@ -18,7 +18,6 @@ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; import { Heading } from './Heading'; import { Flex } from '../Flex'; -import { Text } from '../Text'; const meta = { title: 'Components/Heading', From e0dcdf687fabc95169bca9063103aacc5e84cda9 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 15:45:10 +0000 Subject: [PATCH 061/119] Fixed responsive values Signed-off-by: Charles de Dreuille --- .../src/app/(docs)/components/button/page.mdx | 6 +----- .../src/app/(docs)/components/heading/page.mdx | 5 +---- .../app/(docs)/components/icon-button/page.mdx | 6 +----- .../src/app/(docs)/components/text/page.mdx | 4 +--- canon-docs/src/snippets/box.tsx | 8 -------- canon-docs/src/snippets/button.tsx | 8 -------- canon-docs/src/snippets/checkbox.tsx | 8 -------- canon-docs/src/snippets/container.tsx | 8 -------- canon-docs/src/snippets/field.tsx | 8 -------- canon-docs/src/snippets/flex.tsx | 8 -------- canon-docs/src/snippets/grid.tsx | 8 -------- canon-docs/src/snippets/heading.tsx | 8 -------- canon-docs/src/snippets/icon-button.tsx | 8 -------- canon-docs/src/snippets/icon.tsx | 8 -------- canon-docs/src/snippets/input.tsx | 8 -------- canon-docs/src/snippets/text.tsx | 8 -------- .../canon/src/components/Flex/Flex.stories.tsx | 18 +++++++++++++++--- 17 files changed, 19 insertions(+), 116 deletions(-) diff --git a/canon-docs/src/app/(docs)/components/button/page.mdx b/canon-docs/src/app/(docs)/components/button/page.mdx index 31d821772a..38eb819d4d 100644 --- a/canon-docs/src/app/(docs)/components/button/page.mdx +++ b/canon-docs/src/app/(docs)/components/button/page.mdx @@ -129,11 +129,7 @@ Here's a view when buttons are disabled. Here's a view when buttons are responsive. -} + Responsive Button `} diff --git a/canon-docs/src/app/(docs)/components/heading/page.mdx b/canon-docs/src/app/(docs)/components/heading/page.mdx index 98bdab6efb..af4ea94648 100644 --- a/canon-docs/src/app/(docs)/components/heading/page.mdx +++ b/canon-docs/src/app/(docs)/components/heading/page.mdx @@ -67,10 +67,7 @@ appearance of the heading. You can also use the `variant` prop to change the appearance of the text based on the screen size. -} + Responsive heading `} diff --git a/canon-docs/src/app/(docs)/components/icon-button/page.mdx b/canon-docs/src/app/(docs)/components/icon-button/page.mdx index d1ea768a62..12eb8c61ce 100644 --- a/canon-docs/src/app/(docs)/components/icon-button/page.mdx +++ b/canon-docs/src/app/(docs)/components/icon-button/page.mdx @@ -92,10 +92,6 @@ Here's a view when buttons are disabled. Here's a view when buttons are responsive. -} +`} /> diff --git a/canon-docs/src/app/(docs)/components/text/page.mdx b/canon-docs/src/app/(docs)/components/text/page.mdx index ef18739199..877f953c43 100644 --- a/canon-docs/src/app/(docs)/components/text/page.mdx +++ b/canon-docs/src/app/(docs)/components/text/page.mdx @@ -107,9 +107,7 @@ appearance of the text. You can also use the `variant` prop to change the appearance of the text based on the screen size. -} + Responsive text `} diff --git a/canon-docs/src/snippets/box.tsx b/canon-docs/src/snippets/box.tsx index ff7725a5ad..df254b9f7e 100644 --- a/canon-docs/src/snippets/box.tsx +++ b/canon-docs/src/snippets/box.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as BoxStories from '../../../packages/canon/src/components/Box/Box.stories'; export const BoxSnippet = ({ story }: { story: string }) => { const stories = composeStories(BoxStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Preview') return ; diff --git a/canon-docs/src/snippets/button.tsx b/canon-docs/src/snippets/button.tsx index e1b60fa72a..eaf87c7dce 100644 --- a/canon-docs/src/snippets/button.tsx +++ b/canon-docs/src/snippets/button.tsx @@ -2,17 +2,9 @@ import { composeStories } from '@storybook/react'; import * as ButtonStories from '../../../packages/canon/src/components/Button/Button.stories'; -import { useEffect, useState } from 'react'; export const ButtonSnippet = ({ story }: { story: string }) => { const stories = composeStories(ButtonStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Variants') return ; if (story === 'Sizes') return ; diff --git a/canon-docs/src/snippets/checkbox.tsx b/canon-docs/src/snippets/checkbox.tsx index fe71240d2d..888f24c228 100644 --- a/canon-docs/src/snippets/checkbox.tsx +++ b/canon-docs/src/snippets/checkbox.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as CheckboxStories from '../../../packages/canon/src/components/Checkbox/Checkbox.stories'; export const CheckboxSnippet = ({ story }: { story: string }) => { const stories = composeStories(CheckboxStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; if (story === 'AllVariants') return ; diff --git a/canon-docs/src/snippets/container.tsx b/canon-docs/src/snippets/container.tsx index c73988c28e..9faa6e06e2 100644 --- a/canon-docs/src/snippets/container.tsx +++ b/canon-docs/src/snippets/container.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as ContainerStories from '../../../packages/canon/src/components/Container/Container.stories'; export const ContainerSnippet = ({ story }: { story: string }) => { const stories = composeStories(ContainerStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Preview') return ; diff --git a/canon-docs/src/snippets/field.tsx b/canon-docs/src/snippets/field.tsx index dfe16a80a9..2c913472d7 100644 --- a/canon-docs/src/snippets/field.tsx +++ b/canon-docs/src/snippets/field.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as FieldStories from '../../../packages/canon/src/components/Field/Field.stories'; export const FieldSnippet = ({ story }: { story: string }) => { const stories = composeStories(FieldStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; if (story === 'WithLabelAndDescription') diff --git a/canon-docs/src/snippets/flex.tsx b/canon-docs/src/snippets/flex.tsx index d020a37537..c4fc40926e 100644 --- a/canon-docs/src/snippets/flex.tsx +++ b/canon-docs/src/snippets/flex.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as FlexStories from '../../../packages/canon/src/components/Flex/Flex.stories'; export const FlexSnippet = ({ story }: { story: string }) => { const stories = composeStories(FlexStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; diff --git a/canon-docs/src/snippets/grid.tsx b/canon-docs/src/snippets/grid.tsx index 8f72e8453c..1a41fe8ee6 100644 --- a/canon-docs/src/snippets/grid.tsx +++ b/canon-docs/src/snippets/grid.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as GridStories from '../../../packages/canon/src/components/Grid/Grid.stories'; export const GridSnippet = ({ story }: { story: string }) => { const stories = composeStories(GridStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; diff --git a/canon-docs/src/snippets/heading.tsx b/canon-docs/src/snippets/heading.tsx index 5ec970c4a7..b4e3ac9997 100644 --- a/canon-docs/src/snippets/heading.tsx +++ b/canon-docs/src/snippets/heading.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as HeadingStories from '../../../packages/canon/src/components/Heading/Heading.stories'; export const HeadingSnippet = ({ story }: { story: string }) => { const stories = composeStories(HeadingStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; if (story === 'Title1') return ; diff --git a/canon-docs/src/snippets/icon-button.tsx b/canon-docs/src/snippets/icon-button.tsx index 954822cce6..b346d0be4f 100644 --- a/canon-docs/src/snippets/icon-button.tsx +++ b/canon-docs/src/snippets/icon-button.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as IconButtonStories from '../../../packages/canon/src/components/IconButton/IconButton.stories'; export const IconButtonSnippet = ({ story }: { story: string }) => { const stories = composeStories(IconButtonStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Variants') return ; if (story === 'Sizes') return ; diff --git a/canon-docs/src/snippets/icon.tsx b/canon-docs/src/snippets/icon.tsx index b0557ab2cd..978af55204 100644 --- a/canon-docs/src/snippets/icon.tsx +++ b/canon-docs/src/snippets/icon.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as IconStories from '../../../packages/canon/src/components/Icon/Icon.stories'; export const IconSnippet = ({ story }: { story: string }) => { const stories = composeStories(IconStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; diff --git a/canon-docs/src/snippets/input.tsx b/canon-docs/src/snippets/input.tsx index f4536cdde6..00f5dc5a01 100644 --- a/canon-docs/src/snippets/input.tsx +++ b/canon-docs/src/snippets/input.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as InputStories from '../../../packages/canon/src/components/Input/Input.stories'; export const InputSnippet = ({ story }: { story: string }) => { const stories = composeStories(InputStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Primary') return ; if (story === 'Sizes') return ; diff --git a/canon-docs/src/snippets/text.tsx b/canon-docs/src/snippets/text.tsx index e721dcc094..b42f58b877 100644 --- a/canon-docs/src/snippets/text.tsx +++ b/canon-docs/src/snippets/text.tsx @@ -1,18 +1,10 @@ 'use client'; -import { useEffect, useState } from 'react'; import { composeStories } from '@storybook/react'; import * as TextStories from '../../../packages/canon/src/components/Text/Text.stories'; export const TextSnippet = ({ story }: { story: string }) => { const stories = composeStories(TextStories); - const [isReady, setIsReady] = useState(false); - - useEffect(() => { - setIsReady(true); - }, [story]); - - if (!isReady) return null; if (story === 'Default') return ; if (story === 'AllVariants') return ; diff --git a/packages/canon/src/components/Flex/Flex.stories.tsx b/packages/canon/src/components/Flex/Flex.stories.tsx index 3b7a7a07c5..58f96ce157 100644 --- a/packages/canon/src/components/Flex/Flex.stories.tsx +++ b/packages/canon/src/components/Flex/Flex.stories.tsx @@ -61,21 +61,33 @@ const DecorativeBox = () => { export const Default: Story = { args: { - children: [, , ], + children: ( + <> + , , + + ), }, }; export const ColumnDirection: Story = { args: { direction: 'column', - children: [, , ], + children: ( + <> + , , + + ), }, }; export const RowDirection: Story = { args: { direction: 'row', - children: [, , ], + children: ( + <> + , , + + ), }, }; From 1a1fbcd42b1c9aaf82cfacf7daaf3eaf158da8ec Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 16:36:27 +0000 Subject: [PATCH 062/119] Added new stories Signed-off-by: Charles de Dreuille --- .../src/components/Heading/Heading.stories.tsx | 13 +++++++++++++ packages/canon/src/components/Text/Text.stories.tsx | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/packages/canon/src/components/Heading/Heading.stories.tsx b/packages/canon/src/components/Heading/Heading.stories.tsx index 1357bde877..6fd5fae0fd 100644 --- a/packages/canon/src/components/Heading/Heading.stories.tsx +++ b/packages/canon/src/components/Heading/Heading.stories.tsx @@ -68,6 +68,19 @@ export const CustomTag: Story = { }, }; +export const WrappedInLink: Story = { + args: { + ...Default.args, + }, + decorators: [ + Story => ( + + + + ), + ], +}; + export const Playground: Story = { render: () => ( diff --git a/packages/canon/src/components/Text/Text.stories.tsx b/packages/canon/src/components/Text/Text.stories.tsx index 9cf2a73f6e..ab904f524c 100644 --- a/packages/canon/src/components/Text/Text.stories.tsx +++ b/packages/canon/src/components/Text/Text.stories.tsx @@ -89,6 +89,19 @@ export const Responsive: Story = { }, }; +export const WrappedInLink: Story = { + args: { + ...Default.args, + }, + decorators: [ + Story => ( + + + + ), + ], +}; + export const Playground: Story = { render: () => ( From 7c5e323c7fe930344481b86bdbdc0e2e28641606 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Sun, 23 Mar 2025 16:52:50 +0000 Subject: [PATCH 063/119] Fix watch mode Signed-off-by: Charles de Dreuille --- package.json | 1 + packages/canon/package.json | 3 ++- yarn.lock | 31 ++++++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 083c70e483..2635dfb341 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "@types/webpack": "^5.28.0", "array-to-table": "^1.0.1", "command-exists": "^1.2.9", + "concurrently": "^9.1.2", "cross-env": "^7.0.0", "e2e-test": "workspace:*", "eslint": "^8.6.0", diff --git a/packages/canon/package.json b/packages/canon/package.json index 5227e63fa5..411857d1a4 100644 --- a/packages/canon/package.json +++ b/packages/canon/package.json @@ -36,7 +36,7 @@ "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", - "start": "yarn build:css:watch && yarn storybook", + "start": "concurrently \"yarn build:css:watch\" \"yarn storybook\"", "storybook": "storybook dev -p 6006", "test": "backstage-cli package test" }, @@ -60,6 +60,7 @@ "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "chalk": "^5.4.1", + "concurrently": "^9.1.2", "eslint-plugin-storybook": "^0.11.4", "glob": "^11.0.1", "globals": "^15.11.0", diff --git a/yarn.lock b/yarn.lock index bb1e6d2214..f0dadb8c9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3794,6 +3794,7 @@ __metadata: "@types/react-dom": ^18.0.0 chalk: ^5.4.1 clsx: ^2.1.1 + concurrently: ^9.1.2 eslint-plugin-storybook: ^0.11.4 glob: ^11.0.1 globals: ^15.11.0 @@ -25314,6 +25315,24 @@ __metadata: languageName: node linkType: hard +"concurrently@npm:^9.1.2": + version: 9.1.2 + resolution: "concurrently@npm:9.1.2" + dependencies: + chalk: ^4.1.2 + lodash: ^4.17.21 + rxjs: ^7.8.1 + shell-quote: ^1.8.1 + supports-color: ^8.1.1 + tree-kill: ^1.2.2 + yargs: ^17.7.2 + bin: + conc: dist/bin/concurrently.js + concurrently: dist/bin/concurrently.js + checksum: 9e25e8ee6272ada26739aff1fb43e96ac458fafca82f45b8360bdd9115d60bbc679d282dfc52001b861b6e9f32b3063aed975691d8dec9e62807a9679763a1d8 + languageName: node + linkType: hard + "conf@npm:^10.2.0": version: 10.2.0 resolution: "conf@npm:10.2.0" @@ -42434,6 +42453,7 @@ __metadata: "@useoptic/optic": ^1.0.0 array-to-table: ^1.0.1 command-exists: ^1.2.9 + concurrently: ^9.1.2 cross-env: ^7.0.0 e2e-test: "workspace:*" eslint: ^8.6.0 @@ -42496,7 +42516,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.1, rxjs@npm:^7.2.0, rxjs@npm:^7.5.5": +"rxjs@npm:7.8.1": version: 7.8.1 resolution: "rxjs@npm:7.8.1" dependencies: @@ -42514,6 +42534,15 @@ __metadata: languageName: node linkType: hard +"rxjs@npm:^7.2.0, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1": + version: 7.8.2 + resolution: "rxjs@npm:7.8.2" + dependencies: + tslib: ^2.1.0 + checksum: 2f233d7c832a6c255dabe0759014d7d9b1c9f1cb2f2f0d59690fd11c883c9826ea35a51740c06ab45b6ade0d9087bde9192f165cba20b6730d344b831ef80744 + languageName: node + linkType: hard + "sade@npm:^1.7.3": version: 1.8.1 resolution: "sade@npm:1.8.1" From 6e72e879d702d2e38214ccb05e00ee77b986b09c Mon Sep 17 00:00:00 2001 From: Ruslan Nasyrov Date: Mon, 24 Mar 2025 12:27:07 +0500 Subject: [PATCH 064/119] fixed changeset Signed-off-by: Ruslan Nasyrov --- .changeset/early-feet-lay.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/early-feet-lay.md b/.changeset/early-feet-lay.md index ee6fd89730..71a557e5e5 100644 --- a/.changeset/early-feet-lay.md +++ b/.changeset/early-feet-lay.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend-module-oidc-provider': minor +'@backstage/plugin-auth-backend-module-oidc-provider': patch --- Added custom timeout setting for oidc provider From 07bfa0820adadb573240b517a3eb1bbff2d41af7 Mon Sep 17 00:00:00 2001 From: deepthi-28 Date: Mon, 24 Mar 2025 13:37:53 +0530 Subject: [PATCH 065/119] State variable type changed empty string to undefined Signed-off-by: deepthi-28 --- .../src/components/FailedEntities.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index b4df10335d..1c92d27cb6 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -118,8 +118,12 @@ export const FailedEntities = () => { const [, setSelectedSearchTerm] = useState(''); const unprocessedEntityApi = useApi(catalogUnprocessedEntitiesApiRef); const alertApi = useApi(alertApiRef); - const [selectedEntityId, setSelectedEntityId] = useState(''); - const [selectedEntityRef, setSelectedEntityRef] = useState(''); + const [selectedEntityId, setSelectedEntityId] = useState( + undefined, + ); + const [selectedEntityRef, setSelectedEntityRef] = useState< + string | undefined + >(undefined); const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false); if (loading) { @@ -143,11 +147,13 @@ export const FailedEntities = () => { const cleanUpAfterRemoval = async () => { try { - await unprocessedEntityApi.delete(selectedEntityId); - alertApi.post({ - message: `Entity ${selectedEntityRef} has been deleted`, - severity: 'success', - }); + if (selectedEntityId) { + await unprocessedEntityApi.delete(selectedEntityId); + alertApi.post({ + message: `Entity ${selectedEntityRef} has been deleted`, + severity: 'success', + }); + } } catch (e) { alertApi.post({ message: `Ran into an issue when deleting ${selectedEntityRef}. Please try again later.`, From ee851a8f1bfa72a9ba289d3277f533e426c8ecb5 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 24 Mar 2025 08:27:46 +0000 Subject: [PATCH 066/119] Add anchor reset Signed-off-by: Charles de Dreuille --- packages/canon/css/core.css | 5 +++++ packages/canon/css/styles.css | 5 +++++ packages/canon/src/css/core.css | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/packages/canon/css/core.css b/packages/canon/css/core.css index 34e447147e..70a12322d6 100644 --- a/packages/canon/css/core.css +++ b/packages/canon/css/core.css @@ -9158,6 +9158,11 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; + + & a { + color: inherit; + text-decoration: none; + } } [data-theme="dark"] { diff --git a/packages/canon/css/styles.css b/packages/canon/css/styles.css index 3b312c220e..d5ae86745c 100644 --- a/packages/canon/css/styles.css +++ b/packages/canon/css/styles.css @@ -9158,6 +9158,11 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; + + & a { + color: inherit; + text-decoration: none; + } } [data-theme="dark"] { diff --git a/packages/canon/src/css/core.css b/packages/canon/src/css/core.css index 8efb066b70..4c02bc961d 100644 --- a/packages/canon/src/css/core.css +++ b/packages/canon/src/css/core.css @@ -113,6 +113,12 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; + + /* Global reset */ + a { + color: inherit; + text-decoration: none; + } } /* Dark theme tokens */ From ec2a69aaafc7f72cf7c385d299000500f24fe4c8 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 24 Mar 2025 09:05:06 +0000 Subject: [PATCH 067/119] Update styles.css Signed-off-by: Charles de Dreuille --- packages/canon/src/components/Link/styles.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/canon/src/components/Link/styles.css b/packages/canon/src/components/Link/styles.css index 40a4f340ca..ad65368cd3 100644 --- a/packages/canon/src/components/Link/styles.css +++ b/packages/canon/src/components/Link/styles.css @@ -14,7 +14,7 @@ * limitations under the License. */ -.canon-Link { +a.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); padding: 0; @@ -36,30 +36,30 @@ } } -.canon-Link--variant-body { +a.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -.canon-Link--variant-subtitle { +a.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -.canon-Link--variant-caption { +a.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -.canon-Link--variant-label { +a.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -.canon-Link--weight-regular { +a.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -.canon-Link--weight-bold { +a.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } From 513477fbb7026e39c60c31a57c7b84c0cb4d0bd9 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 24 Mar 2025 09:06:38 +0000 Subject: [PATCH 068/119] Fix CSS export Signed-off-by: Charles de Dreuille --- .changeset/lemon-shoes-enter.md | 5 +++++ packages/canon/css/components.css | 14 +++++++------- packages/canon/css/link.css | 14 +++++++------- packages/canon/css/styles.css | 14 +++++++------- 4 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 .changeset/lemon-shoes-enter.md diff --git a/.changeset/lemon-shoes-enter.md b/.changeset/lemon-shoes-enter.md new file mode 100644 index 0000000000..a950989d93 --- /dev/null +++ b/.changeset/lemon-shoes-enter.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Add global CSS reset for anchor tags. diff --git a/packages/canon/css/components.css b/packages/canon/css/components.css index cb376e64ed..7ae8378f2e 100644 --- a/packages/canon/css/components.css +++ b/packages/canon/css/components.css @@ -584,7 +584,7 @@ margin: .375rem 1rem; } -.canon-Link { +a.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -602,31 +602,31 @@ } } -.canon-Link--variant-body { +a.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -.canon-Link--variant-subtitle { +a.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -.canon-Link--variant-caption { +a.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -.canon-Link--variant-label { +a.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -.canon-Link--weight-regular { +a.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -.canon-Link--weight-bold { +a.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } diff --git a/packages/canon/css/link.css b/packages/canon/css/link.css index ddc47c5d04..5908e1b16f 100644 --- a/packages/canon/css/link.css +++ b/packages/canon/css/link.css @@ -1,4 +1,4 @@ -.canon-Link { +a.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -16,30 +16,30 @@ } } -.canon-Link--variant-body { +a.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -.canon-Link--variant-subtitle { +a.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -.canon-Link--variant-caption { +a.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -.canon-Link--variant-label { +a.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -.canon-Link--weight-regular { +a.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -.canon-Link--weight-bold { +a.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } diff --git a/packages/canon/css/styles.css b/packages/canon/css/styles.css index d5ae86745c..b44b21f175 100644 --- a/packages/canon/css/styles.css +++ b/packages/canon/css/styles.css @@ -9790,7 +9790,7 @@ margin: .375rem 1rem; } -.canon-Link { +a.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -9808,31 +9808,31 @@ } } -.canon-Link--variant-body { +a.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -.canon-Link--variant-subtitle { +a.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -.canon-Link--variant-caption { +a.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -.canon-Link--variant-label { +a.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -.canon-Link--weight-regular { +a.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -.canon-Link--weight-bold { +a.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } From 5890016e8ae56d959a3a7c8ce4b1d63c692ef22a Mon Sep 17 00:00:00 2001 From: Matt Benson Date: Fri, 7 Feb 2025 19:25:05 -0600 Subject: [PATCH 069/119] add api to retrieve template extensions info from scaffolder-backend Signed-off-by: Matt Benson --- .changeset/strange-planes-kneel.md | 6 ++ plugins/scaffolder-react/report.api.md | 51 ++++++++++++++-- plugins/scaffolder-react/src/api/types.ts | 72 ++++++++++++++++++++++- plugins/scaffolder/report.api.md | 3 + plugins/scaffolder/src/api.ts | 12 ++++ 5 files changed, 136 insertions(+), 8 deletions(-) create mode 100644 .changeset/strange-planes-kneel.md diff --git a/.changeset/strange-planes-kneel.md b/.changeset/strange-planes-kneel.md new file mode 100644 index 0000000000..8e57057aee --- /dev/null +++ b/.changeset/strange-planes-kneel.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder-react': minor +'@backstage/plugin-scaffolder': minor +--- + +add api to retrieve template extensions info from scaffolder-backend diff --git a/plugins/scaffolder-react/report.api.md b/plugins/scaffolder-react/report.api.md index d62a2b43d4..23a8a5975d 100644 --- a/plugins/scaffolder-react/report.api.md +++ b/plugins/scaffolder-react/report.api.md @@ -55,11 +55,8 @@ export type Action = { examples?: ActionExample[]; }; -// @public -export type ActionExample = { - description: string; - example: string; -}; +// @public @deprecated +export type ActionExample = ScaffolderUsageExample; // @public export function createScaffolderFieldExtension< @@ -168,6 +165,15 @@ export type LayoutTemplate = NonNullable< // @public export type ListActionsResponse = Array; +// @public +export type ListTemplateExtensionsResponse = { + filters: Record; + globals: { + functions: Record; + values: Record; + }; +}; + // @public export type LogEvent = { type: 'log' | 'completion' | 'cancelled' | 'recovered'; @@ -241,6 +247,7 @@ export interface ScaffolderApi { tasks: ScaffolderTask[]; totalTasks?: number; }>; + listTemplateExtensions?(): Promise; retry?(taskId: string): Promise; scaffold( options: ScaffolderScaffoldOptions, @@ -492,6 +499,13 @@ export type ScaffolderTaskStatus = | 'processing' | 'skipped'; +// @public +export type ScaffolderUsageExample = { + description?: string; + example: string; + notes?: string; +}; + // @public export interface ScaffolderUseTemplateSecrets { // (undocumented) @@ -523,6 +537,33 @@ export type TaskStream = { output?: ScaffolderTaskOutput; }; +// @public +export type TemplateFilter = { + description?: string; + schema?: { + input?: JSONSchema7; + arguments?: JSONSchema7[]; + output?: JSONSchema7; + }; + examples?: ScaffolderUsageExample[]; +}; + +// @public +export type TemplateGlobalFunction = { + description?: string; + schema?: { + arguments?: JSONSchema7[]; + output?: JSONSchema7; + }; + examples?: ScaffolderUsageExample[]; +}; + +// @public +export type TemplateGlobalValue = { + description?: string; + value: JsonValue; +}; + // @public (undocumented) export type TemplateGroupFilter = { title?: React.ReactNode; diff --git a/plugins/scaffolder-react/src/api/types.ts b/plugins/scaffolder-react/src/api/types.ts index 8e4d989a55..cb73704010 100644 --- a/plugins/scaffolder-react/src/api/types.ts +++ b/plugins/scaffolder-react/src/api/types.ts @@ -45,15 +45,24 @@ export type ScaffolderTask = { }; /** - * A single action example + * A single scaffolder usage example * * @public */ -export type ActionExample = { - description: string; +export type ScaffolderUsageExample = { + description?: string; example: string; + notes?: string; }; +/** + * A single action example + * + * @public + * @deprecated in favor of ScaffolderUsageExample + */ +export type ActionExample = ScaffolderUsageExample; + /** * The response shape for a single action in the `listActions` call to the `scaffolder-backend` * @@ -76,6 +85,58 @@ export type Action = { */ export type ListActionsResponse = Array; +/** + * The response shape for a single filter in the `listTemplateExtensions` call to the `scaffolder-backend` + * + * @public + */ +export type TemplateFilter = { + description?: string; + schema?: { + input?: JSONSchema7; + arguments?: JSONSchema7[]; + output?: JSONSchema7; + }; + examples?: ScaffolderUsageExample[]; +}; + +/** + * The response shape for a single global function in the `listTemplateExtensions` call to the `scaffolder-backend` + * + * @public + */ +export type TemplateGlobalFunction = { + description?: string; + schema?: { + arguments?: JSONSchema7[]; + output?: JSONSchema7; + }; + examples?: ScaffolderUsageExample[]; +}; + +/** + * The response shape for a single global value in the `listTemplateExtensions` call to the `scaffolder-backend` + * + * @public + */ +export type TemplateGlobalValue = { + description?: string; + value: JsonValue; +}; + +/** + * The response shape for the `listTemplateExtensions` call to the `scaffolder-backend` + * + * @public + */ +export type ListTemplateExtensionsResponse = { + filters: Record; + globals: { + functions: Record; + values: Record; + }; +}; + /** @public */ export type ScaffolderOutputLink = { title?: string; @@ -236,6 +297,11 @@ export interface ScaffolderApi { */ listActions(): Promise; + /** + * Returns a structure describing the available templating extensions. + */ + listTemplateExtensions?(): Promise; + streamLogs(options: ScaffolderStreamLogsOptions): Observable; dryRun?(options: ScaffolderDryRunOptions): Promise; diff --git a/plugins/scaffolder/report.api.md b/plugins/scaffolder/report.api.md index c51423ed83..379e6a98b9 100644 --- a/plugins/scaffolder/report.api.md +++ b/plugins/scaffolder/report.api.md @@ -25,6 +25,7 @@ import { JSX as JSX_2 } from 'react'; import { LayoutOptions as LayoutOptions_2 } from '@backstage/plugin-scaffolder-react'; import { LayoutTemplate as LayoutTemplate_2 } from '@backstage/plugin-scaffolder-react'; import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-scaffolder-react'; +import { ListTemplateExtensionsResponse } from '@backstage/plugin-scaffolder-react'; import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-react'; import { Observable } from '@backstage/types'; import { PathParams } from '@backstage/core-plugin-api'; @@ -561,6 +562,8 @@ export class ScaffolderClient implements ScaffolderApi_2 { totalTasks?: number; }>; // (undocumented) + listTemplateExtensions(): Promise; + // (undocumented) retry?(taskId: string): Promise; // (undocumented) scaffold( diff --git a/plugins/scaffolder/src/api.ts b/plugins/scaffolder/src/api.ts index 01e163bb30..85450b012a 100644 --- a/plugins/scaffolder/src/api.ts +++ b/plugins/scaffolder/src/api.ts @@ -24,6 +24,7 @@ import { ResponseError } from '@backstage/errors'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { ListActionsResponse, + ListTemplateExtensionsResponse, LogEvent, ScaffolderApi, ScaffolderDryRunOptions, @@ -324,6 +325,17 @@ export class ScaffolderClient implements ScaffolderApi { return await response.json(); } + async listTemplateExtensions(): Promise { + const baseUrl = await this.discoveryApi.getBaseUrl('scaffolder'); + const response = await this.fetchApi.fetch( + `${baseUrl}/v2/template-extensions`, + ); + if (!response.ok) { + throw ResponseError.fromResponse(response); + } + return response.json(); + } + async cancelTask(taskId: string): Promise { const baseUrl = await this.discoveryApi.getBaseUrl('scaffolder'); const url = `${baseUrl}/v2/tasks/${encodeURIComponent(taskId)}/cancel`; From 9680ef4f7ff3e86f7e8305268a72bcde576f8ffe Mon Sep 17 00:00:00 2001 From: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:13:26 +0530 Subject: [PATCH 070/119] Improve observability docs readability Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com> --- docs/plugins/observability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/observability.md b/docs/plugins/observability.md index 3bc625e7c6..c294001606 100644 --- a/docs/plugins/observability.md +++ b/docs/plugins/observability.md @@ -21,7 +21,7 @@ The backend supplies a central logging service, [`rootLogger`](../backend-system/core-services/root-logger.md), as well as a plugin based logger, [`logger`](../backend-system/core-services/logger.md) from `coreServices`. To add additional granularity to your logs, you can create children from the plugin -based logger, using the `.child()` method and provide is with JSON data. For example, +based logger, using the `.child()` method and provide it with JSON data. For example, if you wanted to log items for a specific span in your plugin, you could do ```ts From 95b3a3b7b13fe9e5ecc9b2b07392cb7eb71a89c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 10:41:12 +0000 Subject: [PATCH 071/119] chore(deps): update dependency lightningcss to v1.29.3 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 105 +++++++++++++++++++++++++----------------------------- 1 file changed, 48 insertions(+), 57 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0d07eadbfb..40eee19adf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26746,19 +26746,10 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^1.0.3": - version: 1.0.3 - resolution: "detect-libc@npm:1.0.3" - bin: - detect-libc: ./bin/detect-libc.js - checksum: daaaed925ffa7889bd91d56e9624e6c8033911bb60f3a50a74a87500680652969dbaab9526d1e200a4c94acf80fc862a22131841145a0a8482d60a99c24f4a3e - languageName: node - linkType: hard - -"detect-libc@npm:^2.0.0": - version: 2.0.1 - resolution: "detect-libc@npm:2.0.1" - checksum: ccb05fcabbb555beb544d48080179c18523a343face9ee4e1a86605a8715b4169f94d663c21a03c310ac824592f2ba9a5270218819bb411ad7be578a527593d7 +"detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.3": + version: 2.0.3 + resolution: "detect-libc@npm:2.0.3" + checksum: 2ba6a939ae55f189aea996ac67afceb650413c7a34726ee92c40fb0deb2400d57ef94631a8a3f052055eea7efb0f99a9b5e6ce923415daa3e68221f963cfc27d languageName: node linkType: hard @@ -34555,91 +34546,91 @@ __metadata: languageName: node linkType: hard -"lightningcss-darwin-arm64@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-darwin-arm64@npm:1.29.1" +"lightningcss-darwin-arm64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-darwin-arm64@npm:1.29.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"lightningcss-darwin-x64@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-darwin-x64@npm:1.29.1" +"lightningcss-darwin-x64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-darwin-x64@npm:1.29.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"lightningcss-freebsd-x64@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-freebsd-x64@npm:1.29.1" +"lightningcss-freebsd-x64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-freebsd-x64@npm:1.29.3" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"lightningcss-linux-arm-gnueabihf@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-linux-arm-gnueabihf@npm:1.29.1" +"lightningcss-linux-arm-gnueabihf@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm-gnueabihf@npm:1.29.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"lightningcss-linux-arm64-gnu@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-linux-arm64-gnu@npm:1.29.1" +"lightningcss-linux-arm64-gnu@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm64-gnu@npm:1.29.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"lightningcss-linux-arm64-musl@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-linux-arm64-musl@npm:1.29.1" +"lightningcss-linux-arm64-musl@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm64-musl@npm:1.29.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"lightningcss-linux-x64-gnu@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-linux-x64-gnu@npm:1.29.1" +"lightningcss-linux-x64-gnu@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-x64-gnu@npm:1.29.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"lightningcss-linux-x64-musl@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-linux-x64-musl@npm:1.29.1" +"lightningcss-linux-x64-musl@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-x64-musl@npm:1.29.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"lightningcss-win32-arm64-msvc@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-win32-arm64-msvc@npm:1.29.1" +"lightningcss-win32-arm64-msvc@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-win32-arm64-msvc@npm:1.29.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"lightningcss-win32-x64-msvc@npm:1.29.1": - version: 1.29.1 - resolution: "lightningcss-win32-x64-msvc@npm:1.29.1" +"lightningcss-win32-x64-msvc@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-win32-x64-msvc@npm:1.29.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "lightningcss@npm:^1.29.1": - version: 1.29.1 - resolution: "lightningcss@npm:1.29.1" + version: 1.29.3 + resolution: "lightningcss@npm:1.29.3" dependencies: - detect-libc: ^1.0.3 - lightningcss-darwin-arm64: 1.29.1 - lightningcss-darwin-x64: 1.29.1 - lightningcss-freebsd-x64: 1.29.1 - lightningcss-linux-arm-gnueabihf: 1.29.1 - lightningcss-linux-arm64-gnu: 1.29.1 - lightningcss-linux-arm64-musl: 1.29.1 - lightningcss-linux-x64-gnu: 1.29.1 - lightningcss-linux-x64-musl: 1.29.1 - lightningcss-win32-arm64-msvc: 1.29.1 - lightningcss-win32-x64-msvc: 1.29.1 + detect-libc: ^2.0.3 + lightningcss-darwin-arm64: 1.29.3 + lightningcss-darwin-x64: 1.29.3 + lightningcss-freebsd-x64: 1.29.3 + lightningcss-linux-arm-gnueabihf: 1.29.3 + lightningcss-linux-arm64-gnu: 1.29.3 + lightningcss-linux-arm64-musl: 1.29.3 + lightningcss-linux-x64-gnu: 1.29.3 + lightningcss-linux-x64-musl: 1.29.3 + lightningcss-win32-arm64-msvc: 1.29.3 + lightningcss-win32-x64-msvc: 1.29.3 dependenciesMeta: lightningcss-darwin-arm64: optional: true @@ -34661,7 +34652,7 @@ __metadata: optional: true lightningcss-win32-x64-msvc: optional: true - checksum: d1c4dba66dfe7f6a76532bdb84c35742bee61149550e5eb5b0e84e282f21aecd335f917ca9619bb7ca95fc1eb3092dc7e22f2c16b01e9a0ee472b76452343cce + checksum: 80cad5e1eb1c5eaae22ca6f17b127d65b5c93e859da124d57a90e256d7cb7802afa8dc7a6e1ec1e6aa208d0b23c8b9ec07078e69e61b10748bffdc8cadebed7e languageName: node linkType: hard From af060452bf73fd8b844b6c2762ddf583ef2ee6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 25 Mar 2025 11:49:37 +0100 Subject: [PATCH 072/119] add strings as a supported duration too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/auth-backend-module-oidc-provider/config.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-backend-module-oidc-provider/config.d.ts b/plugins/auth-backend-module-oidc-provider/config.d.ts index 65716a46b6..8a1df804e6 100644 --- a/plugins/auth-backend-module-oidc-provider/config.d.ts +++ b/plugins/auth-backend-module-oidc-provider/config.d.ts @@ -32,7 +32,7 @@ export interface Config { tokenSignedResponseAlg?: string; additionalScopes?: string | string[]; prompt?: string; - timeout?: HumanDuration; + timeout?: HumanDuration | string; signIn?: { resolvers: Array< | { From 4371b5d781b4d3b6d54d4627cc4de2231f45d4da Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 25 Mar 2025 11:30:56 +0000 Subject: [PATCH 073/119] Better global style Signed-off-by: Charles de Dreuille --- packages/canon/src/components/Link/styles.css | 14 +++++++------- packages/canon/src/css/core.css | 13 ++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/canon/src/components/Link/styles.css b/packages/canon/src/components/Link/styles.css index ad65368cd3..40a4f340ca 100644 --- a/packages/canon/src/components/Link/styles.css +++ b/packages/canon/src/components/Link/styles.css @@ -14,7 +14,7 @@ * limitations under the License. */ -a.canon-Link { +.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); padding: 0; @@ -36,30 +36,30 @@ a.canon-Link { } } -a.canon-Link--variant-body { +.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -a.canon-Link--variant-subtitle { +.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -a.canon-Link--variant-caption { +.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -a.canon-Link--variant-label { +.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -a.canon-Link--weight-regular { +.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -a.canon-Link--weight-bold { +.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } diff --git a/packages/canon/src/css/core.css b/packages/canon/src/css/core.css index 4c02bc961d..d0686e94f7 100644 --- a/packages/canon/src/css/core.css +++ b/packages/canon/src/css/core.css @@ -18,8 +18,13 @@ @import './normalize.css'; @import './utilities.css'; -/* Light theme tokens */ +/* Global reset */ +:where(a) { + color: inherit; + text-decoration: none; +} +/* Light theme tokens */ :root { /* Font families */ --canon-font-regular: system-ui; @@ -113,12 +118,6 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; - - /* Global reset */ - a { - color: inherit; - text-decoration: none; - } } /* Dark theme tokens */ From 1d7e840089c2c58bb26dd5b723fac8471b74917b Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 25 Mar 2025 11:34:03 +0000 Subject: [PATCH 074/119] Removed package Signed-off-by: Charles de Dreuille --- package.json | 1 - yarn.lock | 1 - 2 files changed, 2 deletions(-) diff --git a/package.json b/package.json index 2635dfb341..083c70e483 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,6 @@ "@types/webpack": "^5.28.0", "array-to-table": "^1.0.1", "command-exists": "^1.2.9", - "concurrently": "^9.1.2", "cross-env": "^7.0.0", "e2e-test": "workspace:*", "eslint": "^8.6.0", diff --git a/yarn.lock b/yarn.lock index f0dadb8c9f..2261bc2e38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -42453,7 +42453,6 @@ __metadata: "@useoptic/optic": ^1.0.0 array-to-table: ^1.0.1 command-exists: ^1.2.9 - concurrently: ^9.1.2 cross-env: ^7.0.0 e2e-test: "workspace:*" eslint: ^8.6.0 From 2137831f043089d6b030851ec1b08c02f0baa530 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 25 Mar 2025 11:35:23 +0000 Subject: [PATCH 075/119] Fix styles Signed-off-by: Charles de Dreuille --- packages/canon/css/components.css | 14 +++++++------- packages/canon/css/core.css | 10 +++++----- packages/canon/css/link.css | 14 +++++++------- packages/canon/css/styles.css | 24 ++++++++++++------------ 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/canon/css/components.css b/packages/canon/css/components.css index 7ae8378f2e..cb376e64ed 100644 --- a/packages/canon/css/components.css +++ b/packages/canon/css/components.css @@ -584,7 +584,7 @@ margin: .375rem 1rem; } -a.canon-Link { +.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -602,31 +602,31 @@ a.canon-Link { } } -a.canon-Link--variant-body { +.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -a.canon-Link--variant-subtitle { +.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -a.canon-Link--variant-caption { +.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -a.canon-Link--variant-label { +.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -a.canon-Link--weight-regular { +.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -a.canon-Link--weight-bold { +.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } diff --git a/packages/canon/css/core.css b/packages/canon/css/core.css index 70a12322d6..b4583ea35d 100644 --- a/packages/canon/css/core.css +++ b/packages/canon/css/core.css @@ -9083,6 +9083,11 @@ } } +:where(a) { + color: inherit; + text-decoration: none; +} + :root { --canon-font-regular: system-ui; --canon-font-monospace: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace; @@ -9158,11 +9163,6 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; - - & a { - color: inherit; - text-decoration: none; - } } [data-theme="dark"] { diff --git a/packages/canon/css/link.css b/packages/canon/css/link.css index 5908e1b16f..ddc47c5d04 100644 --- a/packages/canon/css/link.css +++ b/packages/canon/css/link.css @@ -1,4 +1,4 @@ -a.canon-Link { +.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -16,30 +16,30 @@ a.canon-Link { } } -a.canon-Link--variant-body { +.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -a.canon-Link--variant-subtitle { +.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -a.canon-Link--variant-caption { +.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -a.canon-Link--variant-label { +.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -a.canon-Link--weight-regular { +.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -a.canon-Link--weight-bold { +.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } diff --git a/packages/canon/css/styles.css b/packages/canon/css/styles.css index b44b21f175..65163bca10 100644 --- a/packages/canon/css/styles.css +++ b/packages/canon/css/styles.css @@ -9083,6 +9083,11 @@ } } +:where(a) { + color: inherit; + text-decoration: none; +} + :root { --canon-font-regular: system-ui; --canon-font-monospace: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace; @@ -9158,11 +9163,6 @@ --canon-ring: #1f5493; --canon-scrollbar: #a0a0a03b; --canon-scrollbar-thumb: #a0a0a0; - - & a { - color: inherit; - text-decoration: none; - } } [data-theme="dark"] { @@ -9790,7 +9790,7 @@ margin: .375rem 1rem; } -a.canon-Link { +.canon-Link { font-family: var(--canon-font-regular); color: var(--canon-fg-link); cursor: pointer; @@ -9808,31 +9808,31 @@ a.canon-Link { } } -a.canon-Link--variant-body { +.canon-Link--variant-body { font-size: var(--canon-font-size-3); line-height: 140%; } -a.canon-Link--variant-subtitle { +.canon-Link--variant-subtitle { font-size: var(--canon-font-size-4); line-height: 140%; } -a.canon-Link--variant-caption { +.canon-Link--variant-caption { font-size: var(--canon-font-size-2); line-height: 140%; } -a.canon-Link--variant-label { +.canon-Link--variant-label { font-size: var(--canon-font-size-1); line-height: 140%; } -a.canon-Link--weight-regular { +.canon-Link--weight-regular { font-weight: var(--canon-font-weight-regular); } -a.canon-Link--weight-bold { +.canon-Link--weight-bold { font-weight: var(--canon-font-weight-bold); } From 55905367ddf486c1bd0dd91be13aabc59c52c47d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Mar 2025 12:51:22 +0000 Subject: [PATCH 076/119] Version Packages (next) --- .changeset/create-app-1742907012.md | 5 + .changeset/pre.json | 36 +- docs/releases/v1.38.0-next.0-changelog.md | 1156 +++++++++++++++++ package.json | 2 +- packages/app-next/CHANGELOG.md | 46 + packages/app-next/package.json | 2 +- packages/app/CHANGELOG.md | 42 + packages/app/package.json | 2 +- packages/backend-defaults/CHANGELOG.md | 23 + packages/backend-defaults/package.json | 2 +- .../CHANGELOG.md | 24 + .../package.json | 2 +- packages/backend-legacy/CHANGELOG.md | 38 + packages/backend-legacy/package.json | 2 +- packages/backend-test-utils/CHANGELOG.md | 14 + packages/backend-test-utils/package.json | 2 +- packages/backend/CHANGELOG.md | 38 + packages/backend/package.json | 2 +- packages/canon/CHANGELOG.md | 8 + packages/canon/package.json | 2 +- packages/cli/CHANGELOG.md | 23 + packages/cli/package.json | 2 +- packages/core-compat-api/CHANGELOG.md | 10 + packages/core-compat-api/package.json | 2 +- packages/create-app/CHANGELOG.md | 8 + packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 14 + packages/dev-utils/package.json | 2 +- packages/e2e-test/CHANGELOG.md | 9 + packages/e2e-test/package.json | 2 +- packages/scaffolder-internal/CHANGELOG.md | 8 + packages/scaffolder-internal/package.json | 2 +- .../techdocs-cli-embedded-app/CHANGELOG.md | 19 + .../techdocs-cli-embedded-app/package.json | 2 +- packages/techdocs-cli/CHANGELOG.md | 11 + packages/techdocs-cli/package.json | 2 +- plugins/api-docs/CHANGELOG.md | 15 + plugins/api-docs/package.json | 2 +- .../CHANGELOG.md | 10 + .../package.json | 2 +- .../CHANGELOG.md | 25 + .../package.json | 2 +- plugins/auth-backend/CHANGELOG.md | 31 + plugins/auth-backend/package.json | 2 +- .../catalog-backend-module-aws/CHANGELOG.md | 16 + .../catalog-backend-module-aws/package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 16 + .../package.json | 2 +- .../CHANGELOG.md | 10 + .../package.json | 2 +- .../CHANGELOG.md | 15 + .../package.json | 2 +- .../CHANGELOG.md | 17 + .../package.json | 2 +- plugins/catalog-graph/CHANGELOG.md | 14 + plugins/catalog-graph/package.json | 2 +- plugins/catalog-import/CHANGELOG.md | 18 + plugins/catalog-import/package.json | 2 +- plugins/catalog-react/CHANGELOG.md | 22 + plugins/catalog-react/package.json | 2 +- .../catalog-unprocessed-entities/CHANGELOG.md | 14 + .../catalog-unprocessed-entities/package.json | 2 +- plugins/catalog/CHANGELOG.md | 25 + plugins/catalog/package.json | 2 +- plugins/devtools-backend/CHANGELOG.md | 16 + plugins/devtools-backend/package.json | 2 +- plugins/devtools/CHANGELOG.md | 13 + plugins/devtools/package.json | 2 +- plugins/home-react/CHANGELOG.md | 9 + plugins/home-react/package.json | 2 +- plugins/home/CHANGELOG.md | 17 + plugins/home/package.json | 2 +- plugins/kubernetes-cluster/CHANGELOG.md | 13 + plugins/kubernetes-cluster/package.json | 2 +- plugins/kubernetes/CHANGELOG.md | 15 + plugins/kubernetes/package.json | 2 +- plugins/notifications/CHANGELOG.md | 15 + plugins/notifications/package.json | 2 +- plugins/org-react/CHANGELOG.md | 11 + plugins/org-react/package.json | 2 +- plugins/org/CHANGELOG.md | 13 + plugins/org/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 18 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 10 + .../package.json | 2 +- plugins/scaffolder-backend/CHANGELOG.md | 36 + plugins/scaffolder-backend/package.json | 2 +- .../scaffolder-node-test-utils/CHANGELOG.md | 10 + .../scaffolder-node-test-utils/package.json | 2 +- plugins/scaffolder-node/CHANGELOG.md | 13 + plugins/scaffolder-node/package.json | 2 +- plugins/scaffolder-react/CHANGELOG.md | 22 + plugins/scaffolder-react/package.json | 2 +- plugins/scaffolder/CHANGELOG.md | 25 + plugins/scaffolder/package.json | 2 +- .../CHANGELOG.md | 16 + .../package.json | 2 +- plugins/search-backend/CHANGELOG.md | 16 + plugins/search-backend/package.json | 2 +- plugins/search/CHANGELOG.md | 16 + plugins/search/package.json | 2 +- .../techdocs-addons-test-utils/CHANGELOG.md | 15 + .../techdocs-addons-test-utils/package.json | 2 +- plugins/techdocs-backend/CHANGELOG.md | 19 + plugins/techdocs-backend/package.json | 2 +- plugins/techdocs-node/CHANGELOG.md | 15 + plugins/techdocs-node/package.json | 2 +- plugins/techdocs/CHANGELOG.md | 23 + plugins/techdocs/package.json | 2 +- plugins/user-settings-backend/CHANGELOG.md | 13 + plugins/user-settings-backend/package.json | 2 +- plugins/user-settings/CHANGELOG.md | 18 + plugins/user-settings/package.json | 2 +- yarn.lock | 236 ++-- 143 files changed, 2568 insertions(+), 158 deletions(-) create mode 100644 .changeset/create-app-1742907012.md create mode 100644 docs/releases/v1.38.0-next.0-changelog.md diff --git a/.changeset/create-app-1742907012.md b/.changeset/create-app-1742907012.md new file mode 100644 index 0000000000..b50d431d4b --- /dev/null +++ b/.changeset/create-app-1742907012.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Bumped create-app version. diff --git a/.changeset/pre.json b/.changeset/pre.json index a36f400a24..c7911415f8 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -196,5 +196,39 @@ "@backstage/plugin-user-settings-backend": "0.3.0", "@backstage/plugin-user-settings-common": "0.0.1" }, - "changesets": [] + "changesets": [ + "chilly-sheep-scream", + "clever-tomatoes-jump", + "create-app-1742907012", + "cuddly-dodos-allow", + "cuddly-kids-sell", + "cuddly-mirrors-ask", + "deep-flies-vanish", + "early-feet-lay", + "every-ties-wink", + "famous-dragons-bake", + "funny-hotels-cut", + "giant-donkeys-punch", + "honest-ties-worry", + "itchy-times-behave", + "large-kings-protect", + "lemon-shoes-enter", + "metal-animals-notice", + "odd-bobcats-hang", + "orange-queens-grin", + "sad-pots-try", + "silver-rocks-invite", + "spotty-towns-show", + "strange-planes-kneel", + "sweet-maps-invent", + "swift-boats-add", + "tame-sloths-brake", + "thin-snails-judge", + "tiny-swans-warn", + "twenty-forks-cheat", + "twenty-walls-join", + "wet-penguins-beg", + "wide-planets-camp", + "witty-planets-sing" + ] } diff --git a/docs/releases/v1.38.0-next.0-changelog.md b/docs/releases/v1.38.0-next.0-changelog.md new file mode 100644 index 0000000000..9adf106e6f --- /dev/null +++ b/docs/releases/v1.38.0-next.0-changelog.md @@ -0,0 +1,1156 @@ +# Release v1.38.0-next.0 + +Upgrade Helper: [https://backstage.github.io/upgrade-helper/?to=1.38.0-next.0](https://backstage.github.io/upgrade-helper/?to=1.38.0-next.0) + +## @backstage/backend-defaults@0.9.0-next.0 + +### Minor Changes + +- 01edf6e: Allow pass through of redis client and cluster options to Cache core service + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@1.2.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-dev-utils@0.1.5 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/types@1.2.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/cli@0.32.0-next.0 + +### Minor Changes + +- c7254ae: Internal update to move the `clean`, `pre/postpack` and `fix` commands into their own separate module. + +### Patch Changes + +- 4ea76f7: Bump @module-federation/enhanced ^0.9.0 to fix GHSA-593f-38f6-jp5m +- 87a5cb4: Fixed an issue causing the `repo lint` command to fail when the `--max-warnings` option was used. +- d83f3f4: Resolved a problem where the `start` command did not correctly handle multiple `--require` flags, ensuring all specified modules are now properly loaded. +- Updated dependencies + - @backstage/catalog-model@1.7.3 + - @backstage/cli-common@0.1.15 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/eslint-plugin@0.1.10 + - @backstage/integration@1.16.2 + - @backstage/release-manifests@0.0.12 + - @backstage/types@1.2.1 + +## @backstage/plugin-catalog@1.29.0-next.0 + +### Minor Changes + +- 9454ef9: Added support of filtering based on system columns in catalog table + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + +## @backstage/plugin-scaffolder@1.30.0-next.0 + +### Minor Changes + +- 5890016: add api to retrieve template extensions info from scaffolder-backend + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + +## @backstage/plugin-scaffolder-backend@1.32.0-next.0 + +### Minor Changes + +- 75e4db4: add template-extensions scaffolder service endpoint + +### Patch Changes + +- 497d47a: Document the internal built-in filters, and ensure that the types are validated when using `createTemplateFilter` and `createTemplateGlobalFunction` from the `zod` schema. +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend-module-azure@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.3.9-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.6.2-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.2.8-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.28 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitea@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.8.2-next.0 + - @backstage/plugin-scaffolder-common@1.5.10 + +## @backstage/plugin-scaffolder-react@1.15.0-next.0 + +### Minor Changes + +- 5890016: add api to retrieve template extensions info from scaffolder-backend + +### Patch Changes + +- 6ed42b7: Scaffolding - Template card - button to show template entity detail +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + +## @backstage/backend-dynamic-feature-service@0.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-common@0.1.15 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-app-node@0.1.31 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + +## @backstage/backend-test-utils@1.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-app-api@1.2.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/canon@0.2.1-next.0 + +### Patch Changes + +- 6af7b16: Updated styles for the Menu component in Canon. +- 513477f: Add global CSS reset for anchor tags. +- 05a5003: Fix the Icon component when the name is not found to return null instead of an empty SVG. + +## @backstage/core-compat-api@0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/version-bridge@1.0.11 + +## @backstage/create-app@0.6.1-next.0 + +### Patch Changes + +- Bumped create-app version. +- Updated dependencies + - @backstage/cli-common@0.1.15 + +## @backstage/dev-utils@1.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + +## @techdocs/cli@1.9.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/cli-common@0.1.15 + - @backstage/config@1.3.2 + +## @backstage/plugin-api-docs@0.12.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + +## @backstage/plugin-auth-backend@0.24.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend-module-oidc-provider@0.4.2-next.0 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.4.1 + - @backstage/plugin-auth-backend-module-auth0-provider@0.2.1 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.3.1 + - @backstage/plugin-auth-backend-module-bitbucket-server-provider@0.2.1 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.4.1 + - @backstage/plugin-auth-backend-module-github-provider@0.3.1 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.3.1 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.3.1 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.4.1 + - @backstage/plugin-auth-backend-module-okta-provider@0.2.1 + - @backstage/plugin-auth-backend-module-onelogin-provider@0.3.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.4.2-next.0 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.2.6 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.4.1 + - @backstage/plugin-auth-backend-module-google-provider@0.3.1 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.2.6 + - @backstage/plugin-catalog-node@1.16.1 + +## @backstage/plugin-auth-backend-module-aws-alb-provider@0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/errors@1.2.7 + +## @backstage/plugin-auth-backend-module-oidc-provider@0.4.2-next.0 + +### Patch Changes + +- 7495edf: Added custom timeout setting for oidc provider + + Here is an example of how to use a custom timeout with the configuration: + + ```yaml + auth: + oidc: + production: + clientId: ${AUTH_GOOGLE_CLIENT_ID} + clientSecret: ${AUTH_GOOGLE_CLIENT_SECRET} + timeout: + seconds: 30 + ``` + +- Updated dependencies + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/types@1.2.1 + +## @backstage/plugin-catalog-backend-module-aws@0.4.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-kubernetes-common@0.9.4 + +## @backstage/plugin-catalog-backend-module-github@0.7.12-next.0 + +### Patch Changes + +- 16648ef: Added `validateLocationsExist` to the config definition where it was missing. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/plugin-catalog-backend-module-github-org@0.3.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend-module-github@0.7.12-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/plugin-catalog-backend-module-gitlab@0.6.5-next.0 + +### Patch Changes + +- a568cda: add filter for repos by membership and topics +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/plugin-catalog-backend-module-gitlab-org@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend-module-gitlab@0.6.5-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.6.5-next.0 + +### Patch Changes + +- 27d1031: fixed misleading example location annotations in docs +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + +## @backstage/plugin-catalog-graph@0.4.18-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/types@1.2.1 + +## @backstage/plugin-catalog-import@0.12.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/plugin-catalog-common@1.1.3 + +## @backstage/plugin-catalog-react@1.16.1-next.0 + +### Patch Changes + +- 186d016: Add `operation` to alpha `defaultEntityContentGroups`. +- 221ddba: Fix offset pagination to reset when updating filters in `useEntityList` +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/frontend-test-utils@0.3.0 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-permission-react@0.4.32 + +## @backstage/plugin-catalog-unprocessed-entities@0.2.16-next.0 + +### Patch Changes + +- ba88bfa: Added confirmation popup for delete entities in Catalog Unprocessed Entities plugin +- 2479827: Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings and set the timezone to the current local timezone. +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + +## @backstage/plugin-devtools@0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-devtools-common@0.1.15 + - @backstage/plugin-permission-react@0.4.32 + +## @backstage/plugin-devtools-backend@0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-common@0.1.15 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-devtools-common@0.1.15 + - @backstage/plugin-permission-common@0.8.4 + +## @backstage/plugin-home@0.8.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-home-react@0.1.25-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + +## @backstage/plugin-home-react@0.1.25-next.0 + +### Patch Changes + +- 2e4cb15: Fixes auto-hiding of content divider when title not specified +- Updated dependencies + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + +## @backstage/plugin-kubernetes@0.12.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-kubernetes-common@0.9.4 + - @backstage/plugin-kubernetes-react@0.5.5 + - @backstage/plugin-permission-react@0.4.32 + +## @backstage/plugin-kubernetes-cluster@0.0.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/plugin-kubernetes-common@0.9.4 + - @backstage/plugin-kubernetes-react@0.5.5 + - @backstage/plugin-permission-react@0.4.32 + +## @backstage/plugin-notifications@0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/plugin-notifications-common@0.0.8 + - @backstage/plugin-signals-react@0.0.11 + +## @backstage/plugin-org@0.6.38-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-catalog-common@1.1.3 + +## @backstage/plugin-org-react@0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + +## @backstage/plugin-scaffolder-backend-module-azure@0.2.8-next.0 + +### Patch Changes + +- 2bd41ce: Made "publish:azure" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-bitbucket@0.3.9-next.0 + +### Patch Changes + +- adfceee: Made "publish:bitbucket" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.2.8-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.2.8-next.0 + +## @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.2.8-next.0 + +### Patch Changes + +- 5266f1c: Made "publish:bitbucketCloud" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-bitbucket-cloud-common@0.2.28 + +## @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.3.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.3.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + +## @backstage/plugin-scaffolder-backend-module-gcp@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-gerrit@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-gitea@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-github@0.6.2-next.0 + +### Patch Changes + +- 1af427a: Made "github:autolinks:create" action idempotent +- 180ea6e: Made "github:branch-protection:create" action idempotent +- 0be1a1e: Made "publish:github" action idempotent +- a833f0f: Made "github:actions:dispatch" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + +## @backstage/plugin-scaffolder-backend-module-gitlab@0.8.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + +## @backstage/plugin-scaffolder-backend-module-notifications@0.1.9-next.0 + +### Patch Changes + +- 25a7675: Made "notification:send" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/plugin-notifications-common@0.0.8 + - @backstage/plugin-notifications-node@0.2.13 + +## @backstage/plugin-scaffolder-backend-module-rails@0.5.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + +## @backstage/plugin-scaffolder-backend-module-sentry@0.2.8-next.0 + +### Patch Changes + +- dcda66a: Made "sentry:project:create" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.4.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/types@1.2.1 + - @backstage/plugin-scaffolder-node-test-utils@0.2.1-next.0 + +## @backstage/plugin-scaffolder-node@0.8.1-next.0 + +### Patch Changes + +- 497d47a: Document the internal built-in filters, and ensure that the types are validated when using `createTemplateFilter` and `createTemplateGlobalFunction` from the `zod` schema. +- Updated dependencies + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + - @backstage/plugin-scaffolder-common@1.5.10 + +## @backstage/plugin-scaffolder-node-test-utils@0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-test-utils@1.3.2-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/types@1.2.1 + +## @backstage/plugin-search@1.4.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + +## @backstage/plugin-search-backend@2.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-openapi-utils@0.5.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + +## @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + +## @backstage/plugin-techdocs@1.12.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-techdocs-common@0.1.0 + - @backstage/plugin-techdocs-react@1.2.15 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.47-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/core-app-api@1.16.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/test-utils@1.7.6 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-techdocs-react@1.2.15 + +## @backstage/plugin-techdocs-backend@2.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-techdocs-common@0.1.0 + +## @backstage/plugin-techdocs-node@1.13.2-next.0 + +### Patch Changes + +- 304a422: Update AWS file retrieval logic from storing file in buffer array to piping to res for better memory efficiency. +- Updated dependencies + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-techdocs-common@0.1.0 + +## @backstage/plugin-user-settings@0.8.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/plugin-signals-react@0.0.11 + - @backstage/plugin-user-settings-common@0.0.1 + +## @backstage/plugin-user-settings-backend@0.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-signals-node@0.1.18 + - @backstage/plugin-user-settings-common@0.0.1 + +## example-app@0.2.108-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/canon@0.2.1-next.0 + - @backstage/plugin-catalog-unprocessed-entities@0.2.16-next.0 + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-scaffolder@1.30.0-next.0 + - @backstage/plugin-api-docs@0.12.6-next.0 + - @backstage/plugin-catalog-graph@0.4.18-next.0 + - @backstage/plugin-catalog-import@0.12.12-next.0 + - @backstage/plugin-org@0.6.38-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/plugin-user-settings@0.8.21-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-app-api@0.11.0 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-devtools@0.1.26-next.0 + - @backstage/plugin-home@0.8.7-next.0 + - @backstage/plugin-kubernetes@0.12.6-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.24-next.0 + - @backstage/plugin-notifications@0.5.4-next.0 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-search@1.4.25-next.0 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-signals@0.0.17 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.22 + - @backstage/plugin-techdocs-react@1.2.15 + +## example-app-next@0.0.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/canon@0.2.1-next.0 + - @backstage/plugin-catalog-unprocessed-entities@0.2.16-next.0 + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-scaffolder@1.30.0-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/plugin-api-docs@0.12.6-next.0 + - @backstage/plugin-catalog-graph@0.4.18-next.0 + - @backstage/plugin-catalog-import@0.12.12-next.0 + - @backstage/plugin-org@0.6.38-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/plugin-user-settings@0.8.21-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-app-api@0.11.0 + - @backstage/frontend-defaults@0.2.0 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-app@0.1.7 + - @backstage/plugin-app-visualizer@0.1.17 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-home@0.8.7-next.0 + - @backstage/plugin-kubernetes@0.12.6-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.24-next.0 + - @backstage/plugin-notifications@0.5.4-next.0 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-search@1.4.25-next.0 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-signals@0.0.17 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.22 + - @backstage/plugin-techdocs-react@1.2.15 + +## example-backend@0.0.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.6.2-next.0 + - @backstage/plugin-scaffolder-backend@1.32.0-next.0 + - @backstage/plugin-scaffolder-backend-module-notifications@0.1.9-next.0 + - @backstage/plugin-app-backend@0.5.0 + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.3.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-devtools-backend@0.5.4-next.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-kubernetes-backend@0.19.4 + - @backstage/plugin-notifications-backend@0.5.4 + - @backstage/plugin-permission-backend@0.5.55 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-proxy-backend@0.6.0 + - @backstage/plugin-search-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/plugin-signals-backend@0.3.2 + - @backstage/plugin-techdocs-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/plugin-auth-backend-module-guest-provider@0.2.6 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.5.0 + - @backstage/plugin-catalog-backend-module-openapi@0.2.8 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-backend-module-unprocessed@0.5.6 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.2.6 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-backend-module-catalog@0.3.2 + - @backstage/plugin-search-backend-module-explore@0.3.0 + +## example-backend-legacy@0.2.109-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend@1.32.0-next.0 + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-kubernetes-backend@0.19.4 + - @backstage/plugin-permission-backend@0.5.55 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/plugin-signals-backend@0.3.2 + - @backstage/plugin-techdocs-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-backend-module-unprocessed@0.5.6 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.3.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.8.2-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.5.8-next.0 + - @backstage/plugin-search-backend-module-catalog@0.3.2 + - @backstage/plugin-search-backend-module-elasticsearch@1.7.0 + - @backstage/plugin-search-backend-module-explore@0.3.0 + - @backstage/plugin-search-backend-module-pg@0.5.42 + - @backstage/plugin-signals-node@0.1.18 + +## e2e-test@0.2.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.6.1-next.0 + - @backstage/cli-common@0.1.15 + - @backstage/errors@1.2.7 + +## @internal/scaffolder@0.0.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/frontend-plugin-api@0.10.0 + +## techdocs-cli-embedded-app@0.2.107-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/test-utils@1.7.6 + - @backstage/theme@0.6.4 + - @backstage/plugin-techdocs-react@1.2.15 diff --git a/package.json b/package.json index 083c70e483..aed62a8c2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "1.37.0", + "version": "1.38.0-next.0", "backstage": { "cli": { "new": { diff --git a/packages/app-next/CHANGELOG.md b/packages/app-next/CHANGELOG.md index d7bdd7fa17..acf3fa9f56 100644 --- a/packages/app-next/CHANGELOG.md +++ b/packages/app-next/CHANGELOG.md @@ -1,5 +1,51 @@ # example-app-next +## 0.0.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/canon@0.2.1-next.0 + - @backstage/plugin-catalog-unprocessed-entities@0.2.16-next.0 + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-scaffolder@1.30.0-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/plugin-api-docs@0.12.6-next.0 + - @backstage/plugin-catalog-graph@0.4.18-next.0 + - @backstage/plugin-catalog-import@0.12.12-next.0 + - @backstage/plugin-org@0.6.38-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/plugin-user-settings@0.8.21-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-app-api@0.11.0 + - @backstage/frontend-defaults@0.2.0 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-app@0.1.7 + - @backstage/plugin-app-visualizer@0.1.17 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-home@0.8.7-next.0 + - @backstage/plugin-kubernetes@0.12.6-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.24-next.0 + - @backstage/plugin-notifications@0.5.4-next.0 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-search@1.4.25-next.0 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-signals@0.0.17 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.22 + - @backstage/plugin-techdocs-react@1.2.15 + ## 0.0.21 ### Patch Changes diff --git a/packages/app-next/package.json b/packages/app-next/package.json index fd78b59760..84067d4988 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -1,6 +1,6 @@ { "name": "example-app-next", - "version": "0.0.21", + "version": "0.0.22-next.0", "backstage": { "role": "frontend" }, diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index a7fbce0cf7..99c3eb234d 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,47 @@ # example-app +## 0.2.108-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/canon@0.2.1-next.0 + - @backstage/plugin-catalog-unprocessed-entities@0.2.16-next.0 + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-scaffolder@1.30.0-next.0 + - @backstage/plugin-api-docs@0.12.6-next.0 + - @backstage/plugin-catalog-graph@0.4.18-next.0 + - @backstage/plugin-catalog-import@0.12.12-next.0 + - @backstage/plugin-org@0.6.38-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/plugin-user-settings@0.8.21-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-app-api@0.11.0 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-devtools@0.1.26-next.0 + - @backstage/plugin-home@0.8.7-next.0 + - @backstage/plugin-kubernetes@0.12.6-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.24-next.0 + - @backstage/plugin-notifications@0.5.4-next.0 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-search@1.4.25-next.0 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-signals@0.0.17 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.22 + - @backstage/plugin-techdocs-react@1.2.15 + ## 0.2.107 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index ce8f4b8482..357de42061 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.107", + "version": "0.2.108-next.0", "backstage": { "role": "frontend" }, diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index 81b70c541e..72607fd320 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/backend-defaults +## 0.9.0-next.0 + +### Minor Changes + +- 01edf6e: Allow pass through of redis client and cluster options to Cache core service + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@1.2.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-dev-utils@0.1.5 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/types@1.2.1 + - @backstage/plugin-events-node@0.4.9 + ## 0.8.2 ### Patch Changes diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 1318d57d42..5d2ae323c6 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-defaults", - "version": "0.8.2", + "version": "0.9.0-next.0", "description": "Backend defaults used by Backstage backend apps", "backstage": { "role": "node-library" diff --git a/packages/backend-dynamic-feature-service/CHANGELOG.md b/packages/backend-dynamic-feature-service/CHANGELOG.md index 59e4342757..39a1fb1795 100644 --- a/packages/backend-dynamic-feature-service/CHANGELOG.md +++ b/packages/backend-dynamic-feature-service/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/backend-dynamic-feature-service +## 0.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-common@0.1.15 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-app-node@0.1.31 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + ## 0.6.1 ### Patch Changes diff --git a/packages/backend-dynamic-feature-service/package.json b/packages/backend-dynamic-feature-service/package.json index 33cc595286..2b97805a2e 100644 --- a/packages/backend-dynamic-feature-service/package.json +++ b/packages/backend-dynamic-feature-service/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-dynamic-feature-service", - "version": "0.6.1", + "version": "0.6.2-next.0", "description": "Backstage dynamic feature service", "backstage": { "role": "node-library" diff --git a/packages/backend-legacy/CHANGELOG.md b/packages/backend-legacy/CHANGELOG.md index 5dc4eced46..1ca1f34ebb 100644 --- a/packages/backend-legacy/CHANGELOG.md +++ b/packages/backend-legacy/CHANGELOG.md @@ -1,5 +1,43 @@ # example-backend-legacy +## 0.2.109-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend@1.32.0-next.0 + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-kubernetes-backend@0.19.4 + - @backstage/plugin-permission-backend@0.5.55 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/plugin-signals-backend@0.3.2 + - @backstage/plugin-techdocs-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-backend-module-unprocessed@0.5.6 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.3.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.8.2-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.5.8-next.0 + - @backstage/plugin-search-backend-module-catalog@0.3.2 + - @backstage/plugin-search-backend-module-elasticsearch@1.7.0 + - @backstage/plugin-search-backend-module-explore@0.3.0 + - @backstage/plugin-search-backend-module-pg@0.5.42 + - @backstage/plugin-signals-node@0.1.18 + ## 0.2.108 ### Patch Changes diff --git a/packages/backend-legacy/package.json b/packages/backend-legacy/package.json index 90430aa4a8..e4a415c93d 100644 --- a/packages/backend-legacy/package.json +++ b/packages/backend-legacy/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-legacy", - "version": "0.2.108", + "version": "0.2.109-next.0", "backstage": { "role": "backend" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 793a0ecb4d..3804c1afb8 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/backend-test-utils +## 1.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-app-api@1.2.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-events-node@0.4.9 + ## 1.3.1 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 17f5d8fad1..54ce0ef6d2 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-test-utils", - "version": "1.3.1", + "version": "1.3.2-next.0", "description": "Test helpers library for Backstage backends", "backstage": { "role": "node-library" diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index d60080901c..dd57069564 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,43 @@ # example-backend +## 0.0.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.6.2-next.0 + - @backstage/plugin-scaffolder-backend@1.32.0-next.0 + - @backstage/plugin-scaffolder-backend-module-notifications@0.1.9-next.0 + - @backstage/plugin-app-backend@0.5.0 + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.3.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/plugin-devtools-backend@0.5.4-next.0 + - @backstage/plugin-events-backend@0.5.0 + - @backstage/plugin-kubernetes-backend@0.19.4 + - @backstage/plugin-notifications-backend@0.5.4 + - @backstage/plugin-permission-backend@0.5.55 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-proxy-backend@0.6.0 + - @backstage/plugin-search-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/plugin-signals-backend@0.3.2 + - @backstage/plugin-techdocs-backend@2.0.1-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/plugin-auth-backend-module-guest-provider@0.2.6 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.5.0 + - @backstage/plugin-catalog-backend-module-openapi@0.2.8 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-backend-module-unprocessed@0.5.6 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.2.6 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-backend-module-catalog@0.3.2 + - @backstage/plugin-search-backend-module-explore@0.3.0 + ## 0.0.36 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 47ffbf0ece..454bfc2066 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.0.36", + "version": "0.0.37-next.0", "backstage": { "role": "backend" }, diff --git a/packages/canon/CHANGELOG.md b/packages/canon/CHANGELOG.md index 87a8dd4265..8281606041 100644 --- a/packages/canon/CHANGELOG.md +++ b/packages/canon/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/canon +## 0.2.1-next.0 + +### Patch Changes + +- 6af7b16: Updated styles for the Menu component in Canon. +- 513477f: Add global CSS reset for anchor tags. +- 05a5003: Fix the Icon component when the name is not found to return null instead of an empty SVG. + ## 0.2.0 ### Minor Changes diff --git a/packages/canon/package.json b/packages/canon/package.json index 411857d1a4..f394fdb497 100644 --- a/packages/canon/package.json +++ b/packages/canon/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/canon", - "version": "0.2.0", + "version": "0.2.1-next.0", "backstage": { "role": "web-library" }, diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 0a4c7f2e77..6fb3d27120 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/cli +## 0.32.0-next.0 + +### Minor Changes + +- c7254ae: Internal update to move the `clean`, `pre/postpack` and `fix` commands into their own separate module. + +### Patch Changes + +- 4ea76f7: Bump @module-federation/enhanced ^0.9.0 to fix GHSA-593f-38f6-jp5m +- 87a5cb4: Fixed an issue causing the `repo lint` command to fail when the `--max-warnings` option was used. +- d83f3f4: Resolved a problem where the `start` command did not correctly handle multiple `--require` flags, ensuring all specified modules are now properly loaded. +- Updated dependencies + - @backstage/catalog-model@1.7.3 + - @backstage/cli-common@0.1.15 + - @backstage/cli-node@0.2.13 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/eslint-plugin@0.1.10 + - @backstage/integration@1.16.2 + - @backstage/release-manifests@0.0.12 + - @backstage/types@1.2.1 + ## 0.31.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 5077e28e79..aeb6eb47c3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/cli", - "version": "0.31.0", + "version": "0.32.0-next.0", "description": "CLI for developing Backstage plugins and apps", "backstage": { "role": "cli" diff --git a/packages/core-compat-api/CHANGELOG.md b/packages/core-compat-api/CHANGELOG.md index 4884e0a184..8d425843d4 100644 --- a/packages/core-compat-api/CHANGELOG.md +++ b/packages/core-compat-api/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-compat-api +## 0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/version-bridge@1.0.11 + ## 0.4.0 ### Minor Changes diff --git a/packages/core-compat-api/package.json b/packages/core-compat-api/package.json index eb1fd98ccc..d512c66c18 100644 --- a/packages/core-compat-api/package.json +++ b/packages/core-compat-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/core-compat-api", - "version": "0.4.0", + "version": "0.4.1-next.0", "backstage": { "role": "web-library" }, diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 375b0bde56..bed7ee413f 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/create-app +## 0.6.1-next.0 + +### Patch Changes + +- Bumped create-app version. +- Updated dependencies + - @backstage/cli-common@0.1.15 + ## 0.6.0 ### Minor Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 0d9fb381a3..fdf01776d8 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/create-app", - "version": "0.6.0", + "version": "0.6.1-next.0", "description": "A CLI that helps you create your own Backstage app", "backstage": { "role": "cli" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 82330fd76c..21e4401525 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/dev-utils +## 1.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + ## 1.1.8 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 0bd88f0a26..f026fba9a1 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/dev-utils", - "version": "1.1.8", + "version": "1.1.9-next.0", "description": "Utilities for developing Backstage plugins.", "backstage": { "role": "web-library" diff --git a/packages/e2e-test/CHANGELOG.md b/packages/e2e-test/CHANGELOG.md index 423070e648..014ea8e321 100644 --- a/packages/e2e-test/CHANGELOG.md +++ b/packages/e2e-test/CHANGELOG.md @@ -1,5 +1,14 @@ # e2e-test +## 0.2.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.6.1-next.0 + - @backstage/cli-common@0.1.15 + - @backstage/errors@1.2.7 + ## 0.2.26 ### Patch Changes diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index f76a5770d3..ae5ed05af8 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -1,6 +1,6 @@ { "name": "e2e-test", - "version": "0.2.26", + "version": "0.2.27-next.0", "description": "E2E test for verifying Backstage packages", "backstage": { "role": "cli" diff --git a/packages/scaffolder-internal/CHANGELOG.md b/packages/scaffolder-internal/CHANGELOG.md index 2339472b24..b8378e4996 100644 --- a/packages/scaffolder-internal/CHANGELOG.md +++ b/packages/scaffolder-internal/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/scaffolder +## 0.0.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/frontend-plugin-api@0.10.0 + ## 0.0.7 ### Patch Changes diff --git a/packages/scaffolder-internal/package.json b/packages/scaffolder-internal/package.json index f57a049022..20d6a7ef72 100644 --- a/packages/scaffolder-internal/package.json +++ b/packages/scaffolder-internal/package.json @@ -1,6 +1,6 @@ { "name": "@internal/scaffolder", - "version": "0.0.7", + "version": "0.0.8-next.0", "backstage": { "role": "web-library", "inline": true diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 571d1e31a9..0057a5ddcb 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,24 @@ # techdocs-cli-embedded-app +## 0.2.107-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/cli@0.32.0-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/app-defaults@1.6.0 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/test-utils@1.7.6 + - @backstage/theme@0.6.4 + - @backstage/plugin-techdocs-react@1.2.15 + ## 0.2.106 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 971746e720..bcd30c4a00 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,6 +1,6 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.106", + "version": "0.2.107-next.0", "backstage": { "role": "frontend" }, diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 99ebf4f87f..cf0e24c487 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,16 @@ # @techdocs/cli +## 1.9.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/cli-common@0.1.15 + - @backstage/config@1.3.2 + ## 1.9.1 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 683c73ff3f..febbe38922 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,6 +1,6 @@ { "name": "@techdocs/cli", - "version": "1.9.1", + "version": "1.9.2-next.0", "description": "Utility CLI for managing TechDocs sites in Backstage.", "backstage": { "role": "cli" diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 176f63364f..a30cc08a1d 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-api-docs +## 0.12.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + ## 0.12.5 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 1fcdf205b2..5df57448b2 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs", - "version": "0.12.5", + "version": "0.12.6-next.0", "description": "A Backstage plugin that helps represent API entities in the frontend", "backstage": { "role": "frontend-plugin", diff --git a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md index 858ba95b83..cbd6118a9c 100644 --- a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend-module-aws-alb-provider +## 0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/errors@1.2.7 + ## 0.4.1 ### Patch Changes diff --git a/plugins/auth-backend-module-aws-alb-provider/package.json b/plugins/auth-backend-module-aws-alb-provider/package.json index cafbc0b5c1..c56cd0e2c9 100644 --- a/plugins/auth-backend-module-aws-alb-provider/package.json +++ b/plugins/auth-backend-module-aws-alb-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-aws-alb-provider", - "version": "0.4.1", + "version": "0.4.2-next.0", "description": "The aws-alb provider module for the Backstage auth backend.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md index 0441c68756..9864be61f9 100644 --- a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-auth-backend-module-oidc-provider +## 0.4.2-next.0 + +### Patch Changes + +- 7495edf: Added custom timeout setting for oidc provider + + Here is an example of how to use a custom timeout with the configuration: + + ```yaml + auth: + oidc: + production: + clientId: ${AUTH_GOOGLE_CLIENT_ID} + clientSecret: ${AUTH_GOOGLE_CLIENT_SECRET} + timeout: + seconds: 30 + ``` + +- Updated dependencies + - @backstage/plugin-auth-backend@0.24.5-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/types@1.2.1 + ## 0.4.1 ### Patch Changes diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index 07cfa0a35c..0e212409fa 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-oidc-provider", - "version": "0.4.1", + "version": "0.4.2-next.0", "description": "The oidc-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 73cc1effcb..22df305701 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-auth-backend +## 0.24.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-backend-module-oidc-provider@0.4.2-next.0 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.4.1 + - @backstage/plugin-auth-backend-module-auth0-provider@0.2.1 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.3.1 + - @backstage/plugin-auth-backend-module-bitbucket-server-provider@0.2.1 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.4.1 + - @backstage/plugin-auth-backend-module-github-provider@0.3.1 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.3.1 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.3.1 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.4.1 + - @backstage/plugin-auth-backend-module-okta-provider@0.2.1 + - @backstage/plugin-auth-backend-module-onelogin-provider@0.3.1 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.4.2-next.0 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.2.6 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.4.1 + - @backstage/plugin-auth-backend-module-google-provider@0.3.1 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.2.6 + - @backstage/plugin-catalog-node@1.16.1 + ## 0.24.4 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 2173e8a3e1..1dabc3b306 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.24.4", + "version": "0.24.5-next.0", "description": "A Backstage backend plugin that handles authentication", "backstage": { "role": "backend-plugin", diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index ea21282077..a80f3cded4 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.4.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-kubernetes-common@0.9.4 + ## 0.4.9 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index dfaa2ff914..1f7ce93c97 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", - "version": "0.4.9", + "version": "0.4.10-next.0", "description": "A Backstage catalog backend module that helps integrate towards AWS", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-github-org/CHANGELOG.md b/plugins/catalog-backend-module-github-org/CHANGELOG.md index d0647ba4e1..5e07707e42 100644 --- a/plugins/catalog-backend-module-github-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-github-org/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-github-org +## 0.3.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend-module-github@0.7.12-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + ## 0.3.8 ### Patch Changes diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json index cb68676e62..f8b9f94205 100644 --- a/plugins/catalog-backend-module-github-org/package.json +++ b/plugins/catalog-backend-module-github-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github-org", - "version": "0.3.8", + "version": "0.3.9-next.0", "description": "The github-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index 629a5bfe94..3fb473203a 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-github +## 0.7.12-next.0 + +### Patch Changes + +- 16648ef: Added `validateLocationsExist` to the config definition where it was missing. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + ## 0.7.11 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 240571df53..2550eaf757 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github", - "version": "0.7.11", + "version": "0.7.12-next.0", "description": "A Backstage catalog backend module that helps integrate towards GitHub", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md index 87843783a9..17de05e67d 100644 --- a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-gitlab-org +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend-module-gitlab@0.6.5-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + ## 0.2.7 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab-org/package.json b/plugins/catalog-backend-module-gitlab-org/package.json index 883360efd2..40ebc68b8e 100644 --- a/plugins/catalog-backend-module-gitlab-org/package.json +++ b/plugins/catalog-backend-module-gitlab-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab-org", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The gitlab-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index 0893e2c8ad..14345708ae 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.6.5-next.0 + +### Patch Changes + +- a568cda: add filter for repos by membership and topics +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + ## 0.6.4 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index daa63096b7..6b78d7ecd9 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", - "version": "0.6.4", + "version": "0.6.5-next.0", "description": "A Backstage catalog backend module that helps integrate towards GitLab", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md index cb0b578d80..fea3252df5 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md +++ b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog-backend-module-incremental-ingestion +## 0.6.5-next.0 + +### Patch Changes + +- 27d1031: fixed misleading example location annotations in docs +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-catalog-backend@1.32.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + ## 0.6.4 ### Patch Changes diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index 84d9da8307..1f81db0671 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-incremental-ingestion", - "version": "0.6.4", + "version": "0.6.5-next.0", "description": "An entity provider for streaming large asset sources into the catalog", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 3038bc395c..ed19da0f5c 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-graph +## 0.4.18-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/types@1.2.1 + ## 0.4.17 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 275f628001..be3e79993d 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.4.17", + "version": "0.4.18-next.0", "backstage": { "role": "frontend-plugin", "pluginId": "catalog-graph", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index 7562fa1e12..4e7f4a9b25 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-import +## 0.12.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/plugin-catalog-common@1.1.3 + ## 0.12.11 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index b319e9ec42..13816daaae 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-import", - "version": "0.12.11", + "version": "0.12.12-next.0", "description": "A Backstage plugin the helps you import entities into your catalog", "backstage": { "role": "frontend-plugin", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 54e3ddd668..85f13822c7 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-catalog-react +## 1.16.1-next.0 + +### Patch Changes + +- 186d016: Add `operation` to alpha `defaultEntityContentGroups`. +- 221ddba: Fix offset pagination to reset when updating filters in `useEntityList` +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/frontend-test-utils@0.3.0 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-permission-react@0.4.32 + ## 1.16.0 ### Minor Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 07ced3ad6d..0969c223c5 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-react", - "version": "1.16.0", + "version": "1.16.1-next.0", "description": "A frontend library that helps other Backstage plugins interact with the catalog", "backstage": { "role": "web-library", diff --git a/plugins/catalog-unprocessed-entities/CHANGELOG.md b/plugins/catalog-unprocessed-entities/CHANGELOG.md index f0444cc950..8c475e53b4 100644 --- a/plugins/catalog-unprocessed-entities/CHANGELOG.md +++ b/plugins/catalog-unprocessed-entities/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-unprocessed-entities +## 0.2.16-next.0 + +### Patch Changes + +- ba88bfa: Added confirmation popup for delete entities in Catalog Unprocessed Entities plugin +- 2479827: Fixed the `convertTimeToLocalTimezone` function in the FailedEntities component to correctly parse ISO 8601 date strings and set the timezone to the current local timezone. +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + ## 0.2.15 ### Patch Changes diff --git a/plugins/catalog-unprocessed-entities/package.json b/plugins/catalog-unprocessed-entities/package.json index d4995d35f3..ec679ff92a 100644 --- a/plugins/catalog-unprocessed-entities/package.json +++ b/plugins/catalog-unprocessed-entities/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-unprocessed-entities", - "version": "0.2.15", + "version": "0.2.16-next.0", "backstage": { "role": "frontend-plugin", "pluginId": "catalog-unprocessed-entities", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index b4bafe3e9f..bc6ce467f4 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-catalog +## 1.29.0-next.0 + +### Minor Changes + +- 9454ef9: Added support of filtering based on system columns in catalog table + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + ## 1.28.0 ### Minor Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index e8605e0db4..752ba744e3 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "1.28.0", + "version": "1.29.0-next.0", "description": "The Backstage plugin for browsing the Backstage catalog", "backstage": { "role": "frontend-plugin", diff --git a/plugins/devtools-backend/CHANGELOG.md b/plugins/devtools-backend/CHANGELOG.md index 5a47901a88..505ffcccba 100644 --- a/plugins/devtools-backend/CHANGELOG.md +++ b/plugins/devtools-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-devtools-backend +## 0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/cli-common@0.1.15 + - @backstage/config@1.3.2 + - @backstage/config-loader@1.10.0 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-devtools-common@0.1.15 + - @backstage/plugin-permission-common@0.8.4 + ## 0.5.3 ### Patch Changes diff --git a/plugins/devtools-backend/package.json b/plugins/devtools-backend/package.json index 5e29bec68a..346b7c0683 100644 --- a/plugins/devtools-backend/package.json +++ b/plugins/devtools-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools-backend", - "version": "0.5.3", + "version": "0.5.4-next.0", "backstage": { "role": "backend-plugin", "pluginId": "devtools", diff --git a/plugins/devtools/CHANGELOG.md b/plugins/devtools/CHANGELOG.md index 1eb71178ec..84673cf885 100644 --- a/plugins/devtools/CHANGELOG.md +++ b/plugins/devtools/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-devtools +## 0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-devtools-common@0.1.15 + - @backstage/plugin-permission-react@0.4.32 + ## 0.1.25 ### Patch Changes diff --git a/plugins/devtools/package.json b/plugins/devtools/package.json index a6aacae303..e808c5661f 100644 --- a/plugins/devtools/package.json +++ b/plugins/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools", - "version": "0.1.25", + "version": "0.1.26-next.0", "backstage": { "role": "frontend-plugin", "pluginId": "devtools", diff --git a/plugins/home-react/CHANGELOG.md b/plugins/home-react/CHANGELOG.md index 375a66d89a..147af1ff00 100644 --- a/plugins/home-react/CHANGELOG.md +++ b/plugins/home-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-home-react +## 0.1.25-next.0 + +### Patch Changes + +- 2e4cb15: Fixes auto-hiding of content divider when title not specified +- Updated dependencies + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + ## 0.1.24 ### Patch Changes diff --git a/plugins/home-react/package.json b/plugins/home-react/package.json index b93115978e..d889cc35b8 100644 --- a/plugins/home-react/package.json +++ b/plugins/home-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-home-react", - "version": "0.1.24", + "version": "0.1.25-next.0", "description": "A Backstage plugin that contains react components helps you build a home page", "backstage": { "role": "web-library", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 269085753f..55c4fff8bf 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-home +## 0.8.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-home-react@0.1.25-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + ## 0.8.6 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index 77f566c84b..3d573aba6a 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-home", - "version": "0.8.6", + "version": "0.8.7-next.0", "description": "A Backstage plugin that helps you build a home page", "backstage": { "role": "frontend-plugin", diff --git a/plugins/kubernetes-cluster/CHANGELOG.md b/plugins/kubernetes-cluster/CHANGELOG.md index 23754b7f63..5eb33892dd 100644 --- a/plugins/kubernetes-cluster/CHANGELOG.md +++ b/plugins/kubernetes-cluster/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-kubernetes-cluster +## 0.0.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/plugin-kubernetes-common@0.9.4 + - @backstage/plugin-kubernetes-react@0.5.5 + - @backstage/plugin-permission-react@0.4.32 + ## 0.0.23 ### Patch Changes diff --git a/plugins/kubernetes-cluster/package.json b/plugins/kubernetes-cluster/package.json index 5a6646fe6a..18cf04a0f3 100644 --- a/plugins/kubernetes-cluster/package.json +++ b/plugins/kubernetes-cluster/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-cluster", - "version": "0.0.23", + "version": "0.0.24-next.0", "description": "A Backstage plugin that shows details of Kubernetes clusters", "backstage": { "role": "frontend-plugin", diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index 71e613138e..b31a12b498 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-kubernetes +## 0.12.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-kubernetes-common@0.9.4 + - @backstage/plugin-kubernetes-react@0.5.5 + - @backstage/plugin-permission-react@0.4.32 + ## 0.12.5 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index b683b9eed1..8d621e0d88 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes", - "version": "0.12.5", + "version": "0.12.6-next.0", "description": "A Backstage plugin that integrates towards Kubernetes", "backstage": { "role": "frontend-plugin", diff --git a/plugins/notifications/CHANGELOG.md b/plugins/notifications/CHANGELOG.md index 8aa3efaffd..d53a073802 100644 --- a/plugins/notifications/CHANGELOG.md +++ b/plugins/notifications/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-notifications +## 0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/plugin-notifications-common@0.0.8 + - @backstage/plugin-signals-react@0.0.11 + ## 0.5.3 ### Patch Changes diff --git a/plugins/notifications/package.json b/plugins/notifications/package.json index 9c66c05cf5..83c24cd86a 100644 --- a/plugins/notifications/package.json +++ b/plugins/notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications", - "version": "0.5.3", + "version": "0.5.4-next.0", "backstage": { "role": "frontend-plugin", "pluginId": "notifications", diff --git a/plugins/org-react/CHANGELOG.md b/plugins/org-react/CHANGELOG.md index 70743c2733..4eabf7f880 100644 --- a/plugins/org-react/CHANGELOG.md +++ b/plugins/org-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-org-react +## 0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + ## 0.1.36 ### Patch Changes diff --git a/plugins/org-react/package.json b/plugins/org-react/package.json index 3b653e5a1d..38e87dafa7 100644 --- a/plugins/org-react/package.json +++ b/plugins/org-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org-react", - "version": "0.1.36", + "version": "0.1.37-next.0", "backstage": { "role": "web-library", "pluginId": "org", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 3fbdfa88d1..9acb7d28c4 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-org +## 0.6.38-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/plugin-catalog-common@1.1.3 + ## 0.6.37 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index ecbe5fd918..2ca15727f6 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org", - "version": "0.6.37", + "version": "0.6.38-next.0", "description": "A Backstage plugin that helps you create entity pages for your organization", "backstage": { "role": "frontend-plugin", diff --git a/plugins/scaffolder-backend-module-azure/CHANGELOG.md b/plugins/scaffolder-backend-module-azure/CHANGELOG.md index 37ff6ad5d9..34f97a8df8 100644 --- a/plugins/scaffolder-backend-module-azure/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-azure/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-azure +## 0.2.8-next.0 + +### Patch Changes + +- 2bd41ce: Made "publish:azure" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-azure/package.json b/plugins/scaffolder-backend-module-azure/package.json index bb8bfc1fae..edf977479c 100644 --- a/plugins/scaffolder-backend-module-azure/package.json +++ b/plugins/scaffolder-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-azure", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The azure module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md index dd7a76b272..e3a1efb9f3 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket-cloud +## 0.2.8-next.0 + +### Patch Changes + +- 5266f1c: Made "publish:bitbucketCloud" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-bitbucket-cloud-common@0.2.28 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/package.json b/plugins/scaffolder-backend-module-bitbucket-cloud/package.json index 4b5f7cc20d..be6970464b 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/package.json +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket-cloud", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The Bitbucket Cloud module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md index 05cec9755f..4b7c6f660e 100644 --- a/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket-server +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket-server/package.json b/plugins/scaffolder-backend-module-bitbucket-server/package.json index a3991ed872..b6613955b1 100644 --- a/plugins/scaffolder-backend-module-bitbucket-server/package.json +++ b/plugins/scaffolder-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket-server", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The Bitbucket Server module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md index ea1b89fcf3..ca5234edd5 100644 --- a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket +## 0.3.9-next.0 + +### Patch Changes + +- adfceee: Made "publish:bitbucket" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.2.8-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.2.8-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket/package.json b/plugins/scaffolder-backend-module-bitbucket/package.json index eef31dcc09..682fd0c9f3 100644 --- a/plugins/scaffolder-backend-module-bitbucket/package.json +++ b/plugins/scaffolder-backend-module-bitbucket/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket", - "version": "0.3.8", + "version": "0.3.9-next.0", "description": "The bitbucket module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md index 31f14f6e83..2497422f80 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-confluence-to-markdown +## 0.3.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.3.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json index 68b6e95a32..510681fad1 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown", - "version": "0.3.7", + "version": "0.3.8-next.0", "description": "The confluence-to-markdown module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index df7962c753..54d9acd7a6 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.3.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + ## 0.3.8 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index cb0024a8c7..fb059f8cbf 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", - "version": "0.3.8", + "version": "0.3.9-next.0", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gcp/CHANGELOG.md b/plugins/scaffolder-backend-module-gcp/CHANGELOG.md index 2c7f7aad50..2eb075f10b 100644 --- a/plugins/scaffolder-backend-module-gcp/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gcp/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-gcp +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gcp/package.json b/plugins/scaffolder-backend-module-gcp/package.json index 5bbf4fe25d..169fc96fb4 100644 --- a/plugins/scaffolder-backend-module-gcp/package.json +++ b/plugins/scaffolder-backend-module-gcp/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gcp", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The GCP Bucket module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md index 0fd6b23927..610a1ca4fc 100644 --- a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-gerrit +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gerrit/package.json b/plugins/scaffolder-backend-module-gerrit/package.json index dbfdc9c4e6..8b22f56df5 100644 --- a/plugins/scaffolder-backend-module-gerrit/package.json +++ b/plugins/scaffolder-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gerrit", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The gerrit module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md index ede7fe2edd..8696920ac8 100644 --- a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-gitea +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitea/package.json b/plugins/scaffolder-backend-module-gitea/package.json index 4dfe6a7f7a..0a3ca829f2 100644 --- a/plugins/scaffolder-backend-module-gitea/package.json +++ b/plugins/scaffolder-backend-module-gitea/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitea", - "version": "0.2.7", + "version": "0.2.8-next.0", "description": "The gitea module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-github/CHANGELOG.md b/plugins/scaffolder-backend-module-github/CHANGELOG.md index 63d9cb5f3f..3ed0e8768a 100644 --- a/plugins/scaffolder-backend-module-github/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-github/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-scaffolder-backend-module-github +## 0.6.2-next.0 + +### Patch Changes + +- 1af427a: Made "github:autolinks:create" action idempotent +- 180ea6e: Made "github:branch-protection:create" action idempotent +- 0be1a1e: Made "publish:github" action idempotent +- a833f0f: Made "github:actions:dispatch" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + ## 0.6.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-github/package.json b/plugins/scaffolder-backend-module-github/package.json index bcd05269b6..7e34632295 100644 --- a/plugins/scaffolder-backend-module-github/package.json +++ b/plugins/scaffolder-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-github", - "version": "0.6.1", + "version": "0.6.2-next.0", "description": "The github module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md index 8b6c0cf382..6b625c4a32 100644 --- a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-gitlab +## 0.8.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + ## 0.8.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitlab/package.json b/plugins/scaffolder-backend-module-gitlab/package.json index c241a45114..ab99965145 100644 --- a/plugins/scaffolder-backend-module-gitlab/package.json +++ b/plugins/scaffolder-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitlab", - "version": "0.8.1", + "version": "0.8.2-next.0", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md index 74a5e47108..5a5632c5c7 100644 --- a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-notifications +## 0.1.9-next.0 + +### Patch Changes + +- 25a7675: Made "notification:send" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/plugin-notifications-common@0.0.8 + - @backstage/plugin-notifications-node@0.2.13 + ## 0.1.8 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-notifications/package.json b/plugins/scaffolder-backend-module-notifications/package.json index 826a44feaf..5618f3f8e0 100644 --- a/plugins/scaffolder-backend-module-notifications/package.json +++ b/plugins/scaffolder-backend-module-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-notifications", - "version": "0.1.8", + "version": "0.1.9-next.0", "description": "The notifications backend module for the scaffolder plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index e1d3e9ff95..f4f569690c 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.5.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + ## 0.5.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 879d550e8e..203f943046 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", - "version": "0.5.7", + "version": "0.5.8-next.0", "description": "A module for the scaffolder backend that lets you template projects using Rails", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md index 5cd2bd197f..447dc3a32d 100644 --- a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-sentry +## 0.2.8-next.0 + +### Patch Changes + +- dcda66a: Made "sentry:project:create" action idempotent +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + ## 0.2.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-sentry/package.json b/plugins/scaffolder-backend-module-sentry/package.json index 95d01beff8..1b7501b24f 100644 --- a/plugins/scaffolder-backend-module-sentry/package.json +++ b/plugins/scaffolder-backend-module-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-sentry", - "version": "0.2.7", + "version": "0.2.8-next.0", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index ecf673d86d..242c959b0c 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.4.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/types@1.2.1 + - @backstage/plugin-scaffolder-node-test-utils@0.2.1-next.0 + ## 0.4.8 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index dc61954d69..108652007a 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.4.8", + "version": "0.4.9-next.0", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index e608265d9d..645074a218 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/plugin-scaffolder-backend +## 1.32.0-next.0 + +### Minor Changes + +- 75e4db4: add template-extensions scaffolder service endpoint + +### Patch Changes + +- 497d47a: Document the internal built-in filters, and ensure that the types are validated when using `createTemplateFilter` and `createTemplateGlobalFunction` from the `zod` schema. +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-scaffolder-backend-module-azure@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.3.9-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.6.2-next.0 + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.2.8-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.28 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.2.6 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-events-node@0.4.9 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitea@0.2.8-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.8.2-next.0 + - @backstage/plugin-scaffolder-common@1.5.10 + ## 1.31.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 7285d674a6..e2bd6b8a49 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "1.31.0", + "version": "1.32.0-next.0", "description": "The Backstage backend plugin that helps you create new things", "backstage": { "role": "backend-plugin", diff --git a/plugins/scaffolder-node-test-utils/CHANGELOG.md b/plugins/scaffolder-node-test-utils/CHANGELOG.md index 42097d4520..d89806e658 100644 --- a/plugins/scaffolder-node-test-utils/CHANGELOG.md +++ b/plugins/scaffolder-node-test-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-node-test-utils +## 0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.8.1-next.0 + - @backstage/backend-test-utils@1.3.2-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/types@1.2.1 + ## 0.2.0 ### Minor Changes diff --git a/plugins/scaffolder-node-test-utils/package.json b/plugins/scaffolder-node-test-utils/package.json index 2dcb8b8bbf..8bf45ac0b4 100644 --- a/plugins/scaffolder-node-test-utils/package.json +++ b/plugins/scaffolder-node-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node-test-utils", - "version": "0.2.0", + "version": "0.2.1-next.0", "backstage": { "role": "node-library", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-node/CHANGELOG.md b/plugins/scaffolder-node/CHANGELOG.md index 2cb1c30072..024b6df9bb 100644 --- a/plugins/scaffolder-node/CHANGELOG.md +++ b/plugins/scaffolder-node/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-node +## 0.8.1-next.0 + +### Patch Changes + +- 497d47a: Document the internal built-in filters, and ensure that the types are validated when using `createTemplateFilter` and `createTemplateGlobalFunction` from the `zod` schema. +- Updated dependencies + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/types@1.2.1 + - @backstage/plugin-scaffolder-common@1.5.10 + ## 0.8.0 ### Minor Changes diff --git a/plugins/scaffolder-node/package.json b/plugins/scaffolder-node/package.json index a3c2921be9..a6d459f9ac 100644 --- a/plugins/scaffolder-node/package.json +++ b/plugins/scaffolder-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node", - "version": "0.8.0", + "version": "0.8.1-next.0", "description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "node-library", diff --git a/plugins/scaffolder-react/CHANGELOG.md b/plugins/scaffolder-react/CHANGELOG.md index 0b16b94983..4525edc3ce 100644 --- a/plugins/scaffolder-react/CHANGELOG.md +++ b/plugins/scaffolder-react/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-scaffolder-react +## 1.15.0-next.0 + +### Minor Changes + +- 5890016: add api to retrieve template extensions info from scaffolder-backend + +### Patch Changes + +- 6ed42b7: Scaffolding - Template card - button to show template entity detail +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + ## 1.14.6 ### Patch Changes diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index 6247bbe1d3..4a47eb3c9f 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-react", - "version": "1.14.6", + "version": "1.15.0-next.0", "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder", "backstage": { "role": "web-library", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 2d02c91ec0..8ba31c4ab8 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-scaffolder +## 1.30.0-next.0 + +### Minor Changes + +- 5890016: add api to retrieve template extensions info from scaffolder-backend + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.15.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/types@1.2.1 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-permission-react@0.4.32 + - @backstage/plugin-scaffolder-common@1.5.10 + ## 1.29.0 ### Minor Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index f03f9e5a23..dc8cd0ebe3 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "1.29.0", + "version": "1.30.0-next.0", "description": "The Backstage plugin that helps you create new things", "backstage": { "role": "frontend-plugin", diff --git a/plugins/search-backend-module-techdocs/CHANGELOG.md b/plugins/search-backend-module-techdocs/CHANGELOG.md index 8700e8bc91..fbd205b1ea 100644 --- a/plugins/search-backend-module-techdocs/CHANGELOG.md +++ b/plugins/search-backend-module-techdocs/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-search-backend-module-techdocs +## 0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + ## 0.4.0 ### Minor Changes diff --git a/plugins/search-backend-module-techdocs/package.json b/plugins/search-backend-module-techdocs/package.json index 9ca1630a7c..eab306e7ec 100644 --- a/plugins/search-backend-module-techdocs/package.json +++ b/plugins/search-backend-module-techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-techdocs", - "version": "0.4.0", + "version": "0.4.1-next.0", "description": "A module for the search backend that exports techdocs modules", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index ec5995601d..621ce2b7e0 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-search-backend +## 2.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-permission-node@0.9.0 + - @backstage/plugin-search-backend-node@1.3.9 + - @backstage/backend-openapi-utils@0.5.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-search-common@1.2.17 + ## 2.0.0 ### Major Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index 91acb56855..33543eafc5 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend", - "version": "2.0.0", + "version": "2.0.1-next.0", "description": "The Backstage backend plugin that provides your backstage app with search", "backstage": { "role": "backend-plugin", diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 92aa67b880..e6804c09d2 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-search +## 1.4.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/types@1.2.1 + - @backstage/version-bridge@1.0.11 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + ## 1.4.24 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index 7e12ef21d0..373a7b7033 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search", - "version": "1.4.24", + "version": "1.4.25-next.0", "description": "The Backstage plugin that provides your backstage app with search", "backstage": { "role": "frontend-plugin", diff --git a/plugins/techdocs-addons-test-utils/CHANGELOG.md b/plugins/techdocs-addons-test-utils/CHANGELOG.md index b9bff49e81..658d70e232 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.47-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.29.0-next.0 + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/plugin-techdocs@1.12.5-next.0 + - @backstage/core-app-api@1.16.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/integration-react@1.2.5 + - @backstage/test-utils@1.7.6 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-techdocs-react@1.2.15 + ## 1.0.46 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index 9071a86a93..e9ed1850bc 100644 --- a/plugins/techdocs-addons-test-utils/package.json +++ b/plugins/techdocs-addons-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-addons-test-utils", - "version": "1.0.46", + "version": "1.0.47-next.0", "backstage": { "role": "web-library", "pluginId": "techdocs-addons", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 60246c4903..ef45686374 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-techdocs-backend +## 2.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-techdocs-node@1.13.2-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.4.1-next.0 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/plugin-catalog-common@1.1.3 + - @backstage/plugin-catalog-node@1.16.1 + - @backstage/plugin-permission-common@0.8.4 + - @backstage/plugin-techdocs-common@0.1.0 + ## 2.0.0 ### Major Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 4f94659b99..1b0d3989b1 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "2.0.0", + "version": "2.0.1-next.0", "description": "The Backstage backend plugin that renders technical documentation for your components", "backstage": { "role": "backend-plugin", diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index 1f561240ac..e9371862a5 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-techdocs-node +## 1.13.2-next.0 + +### Patch Changes + +- 304a422: Update AWS file retrieval logic from storing file in buffer array to piping to res for better memory efficiency. +- Updated dependencies + - @backstage/backend-plugin-api@1.2.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/errors@1.2.7 + - @backstage/integration@1.16.2 + - @backstage/integration-aws-node@0.1.15 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-techdocs-common@0.1.0 + ## 1.13.1 ### Patch Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index 059039f7c0..3ff6dc7325 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-node", - "version": "1.13.1", + "version": "1.13.2-next.0", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", "backstage": { "role": "node-library", diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 9290407afb..77993703fd 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/plugin-techdocs +## 1.12.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-client@1.9.1 + - @backstage/catalog-model@1.7.3 + - @backstage/config@1.3.2 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/integration@1.16.2 + - @backstage/integration-react@1.2.5 + - @backstage/theme@0.6.4 + - @backstage/plugin-auth-react@0.1.13 + - @backstage/plugin-search-common@1.2.17 + - @backstage/plugin-search-react@1.8.7 + - @backstage/plugin-techdocs-common@0.1.0 + - @backstage/plugin-techdocs-react@1.2.15 + ## 1.12.4 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 6f4069e1bb..6a96f9144d 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs", - "version": "1.12.4", + "version": "1.12.5-next.0", "description": "The Backstage plugin that renders technical documentation for your components", "backstage": { "role": "frontend-plugin", diff --git a/plugins/user-settings-backend/CHANGELOG.md b/plugins/user-settings-backend/CHANGELOG.md index c558bc4cdc..c543c24a04 100644 --- a/plugins/user-settings-backend/CHANGELOG.md +++ b/plugins/user-settings-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-user-settings-backend +## 0.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-defaults@0.9.0-next.0 + - @backstage/plugin-auth-node@0.6.1 + - @backstage/backend-plugin-api@1.2.1 + - @backstage/errors@1.2.7 + - @backstage/types@1.2.1 + - @backstage/plugin-signals-node@0.1.18 + - @backstage/plugin-user-settings-common@0.0.1 + ## 0.3.0 ### Minor Changes diff --git a/plugins/user-settings-backend/package.json b/plugins/user-settings-backend/package.json index c5b31476d5..20e20c20a1 100644 --- a/plugins/user-settings-backend/package.json +++ b/plugins/user-settings-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings-backend", - "version": "0.3.0", + "version": "0.3.1-next.0", "description": "The Backstage backend plugin to manage user settings", "backstage": { "role": "backend-plugin", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 5fe4af28b3..d3d089b122 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-user-settings +## 0.8.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.16.1-next.0 + - @backstage/core-compat-api@0.4.1-next.0 + - @backstage/catalog-model@1.7.3 + - @backstage/core-app-api@1.16.0 + - @backstage/core-components@0.17.0 + - @backstage/core-plugin-api@1.10.5 + - @backstage/errors@1.2.7 + - @backstage/frontend-plugin-api@0.10.0 + - @backstage/theme@0.6.4 + - @backstage/types@1.2.1 + - @backstage/plugin-signals-react@0.0.11 + - @backstage/plugin-user-settings-common@0.0.1 + ## 0.8.20 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 2d36c291ea..b2b7836226 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings", - "version": "0.8.20", + "version": "0.8.21-next.0", "description": "A Backstage plugin that provides a settings page", "backstage": { "role": "frontend-plugin", diff --git a/yarn.lock b/yarn.lock index 286d6c93fc..d41c946abe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4141,6 +4141,27 @@ __metadata: languageName: unknown linkType: soft +"@backstage/core-compat-api@npm:^0.4.0": + version: 0.4.0 + resolution: "@backstage/core-compat-api@npm:0.4.0" + dependencies: + "@backstage/core-plugin-api": ^1.10.5 + "@backstage/frontend-plugin-api": ^0.10.0 + "@backstage/plugin-catalog-react": ^1.16.0 + "@backstage/version-bridge": ^1.0.11 + lodash: ^4.17.21 + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + react-router-dom: ^6.3.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 783ee24e7c9b7a495201049fc239de18328c6f02d192e8922d3adeb8c8e9a7bb13431f6b341a1464a885f88af4da7fbdff02f93061274597375fcfd32e54cb42 + languageName: node + linkType: hard + "@backstage/core-compat-api@workspace:^, @backstage/core-compat-api@workspace:packages/core-compat-api": version: 0.0.0-use.local resolution: "@backstage/core-compat-api@workspace:packages/core-compat-api" @@ -4178,6 +4199,84 @@ __metadata: languageName: unknown linkType: soft +"@backstage/core-components@^0.17.0, @backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": + version: 0.0.0-use.local + resolution: "@backstage/core-components@workspace:packages/core-components" + dependencies: + "@backstage/app-defaults": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/config": "workspace:^" + "@backstage/core-app-api": "workspace:^" + "@backstage/core-plugin-api": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/test-utils": "workspace:^" + "@backstage/theme": "workspace:^" + "@backstage/version-bridge": "workspace:^" + "@dagrejs/dagre": ^1.1.4 + "@date-io/core": ^1.3.13 + "@material-table/core": ^3.1.0 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.61 + "@react-hookz/web": ^24.0.0 + "@testing-library/dom": ^10.0.0 + "@testing-library/jest-dom": ^6.0.0 + "@testing-library/react": ^16.0.0 + "@testing-library/user-event": ^14.0.0 + "@types/ansi-regex": ^5.0.0 + "@types/classnames": ^2.2.9 + "@types/d3-selection": ^3.0.1 + "@types/d3-shape": ^3.0.1 + "@types/d3-zoom": ^3.0.1 + "@types/google-protobuf": ^3.7.2 + "@types/react": ^18.0.0 + "@types/react-helmet": ^6.1.0 + "@types/react-sparklines": ^1.7.0 + "@types/react-syntax-highlighter": ^15.0.0 + "@types/react-virtualized-auto-sizer": ^1.0.1 + "@types/react-window": ^1.8.5 + "@types/zen-observable": ^0.8.0 + ansi-regex: ^6.0.1 + classnames: ^2.2.6 + cross-fetch: ^4.0.0 + d3-selection: ^3.0.0 + d3-shape: ^3.0.0 + d3-zoom: ^3.0.0 + history: ^5.0.0 + js-yaml: ^4.1.0 + linkify-react: 4.1.3 + linkifyjs: 4.1.3 + lodash: ^4.17.21 + msw: ^1.0.0 + pluralize: ^8.0.0 + qs: ^6.9.4 + rc-progress: 3.5.1 + react: ^18.0.2 + react-dom: ^18.0.2 + react-helmet: 6.1.0 + react-hook-form: ^7.12.2 + react-idle-timer: 5.7.2 + react-markdown: ^8.0.0 + react-router-dom: ^6.3.0 + react-sparklines: ^1.7.0 + react-syntax-highlighter: ^15.4.5 + react-use: ^17.3.2 + react-virtualized-auto-sizer: ^1.0.11 + react-window: ^1.8.6 + remark-gfm: ^3.0.1 + zen-observable: ^0.10.0 + zod: ^3.22.4 + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + react-router-dom: ^6.3.0 + peerDependenciesMeta: + "@types/react": + optional: true + languageName: unknown + linkType: soft + "@backstage/core-components@npm:^0.13.10": version: 0.13.10 resolution: "@backstage/core-components@npm:0.13.10" @@ -4281,85 +4380,7 @@ __metadata: languageName: node linkType: hard -"@backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": - version: 0.0.0-use.local - resolution: "@backstage/core-components@workspace:packages/core-components" - dependencies: - "@backstage/app-defaults": "workspace:^" - "@backstage/cli": "workspace:^" - "@backstage/config": "workspace:^" - "@backstage/core-app-api": "workspace:^" - "@backstage/core-plugin-api": "workspace:^" - "@backstage/errors": "workspace:^" - "@backstage/test-utils": "workspace:^" - "@backstage/theme": "workspace:^" - "@backstage/version-bridge": "workspace:^" - "@dagrejs/dagre": ^1.1.4 - "@date-io/core": ^1.3.13 - "@material-table/core": ^3.1.0 - "@material-ui/core": ^4.12.2 - "@material-ui/icons": ^4.9.1 - "@material-ui/lab": 4.0.0-alpha.61 - "@react-hookz/web": ^24.0.0 - "@testing-library/dom": ^10.0.0 - "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^16.0.0 - "@testing-library/user-event": ^14.0.0 - "@types/ansi-regex": ^5.0.0 - "@types/classnames": ^2.2.9 - "@types/d3-selection": ^3.0.1 - "@types/d3-shape": ^3.0.1 - "@types/d3-zoom": ^3.0.1 - "@types/google-protobuf": ^3.7.2 - "@types/react": ^18.0.0 - "@types/react-helmet": ^6.1.0 - "@types/react-sparklines": ^1.7.0 - "@types/react-syntax-highlighter": ^15.0.0 - "@types/react-virtualized-auto-sizer": ^1.0.1 - "@types/react-window": ^1.8.5 - "@types/zen-observable": ^0.8.0 - ansi-regex: ^6.0.1 - classnames: ^2.2.6 - cross-fetch: ^4.0.0 - d3-selection: ^3.0.0 - d3-shape: ^3.0.0 - d3-zoom: ^3.0.0 - history: ^5.0.0 - js-yaml: ^4.1.0 - linkify-react: 4.1.3 - linkifyjs: 4.1.3 - lodash: ^4.17.21 - msw: ^1.0.0 - pluralize: ^8.0.0 - qs: ^6.9.4 - rc-progress: 3.5.1 - react: ^18.0.2 - react-dom: ^18.0.2 - react-helmet: 6.1.0 - react-hook-form: ^7.12.2 - react-idle-timer: 5.7.2 - react-markdown: ^8.0.0 - react-router-dom: ^6.3.0 - react-sparklines: ^1.7.0 - react-syntax-highlighter: ^15.4.5 - react-use: ^17.3.2 - react-virtualized-auto-sizer: ^1.0.11 - react-window: ^1.8.6 - remark-gfm: ^3.0.1 - zen-observable: ^0.10.0 - zod: ^3.22.4 - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - react-router-dom: ^6.3.0 - peerDependenciesMeta: - "@types/react": - optional: true - languageName: unknown - linkType: soft - -"@backstage/core-plugin-api@^1.10.0, @backstage/core-plugin-api@^1.8.2, @backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": +"@backstage/core-plugin-api@^1.10.0, @backstage/core-plugin-api@^1.10.5, @backstage/core-plugin-api@^1.8.2, @backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": version: 0.0.0-use.local resolution: "@backstage/core-plugin-api@workspace:packages/core-plugin-api" dependencies: @@ -4556,7 +4577,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/frontend-plugin-api@workspace:^, @backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api": +"@backstage/frontend-plugin-api@^0.10.0, @backstage/frontend-plugin-api@workspace:^, @backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api": version: 0.0.0-use.local resolution: "@backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api" dependencies: @@ -4590,7 +4611,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/frontend-test-utils@workspace:^, @backstage/frontend-test-utils@workspace:packages/frontend-test-utils": +"@backstage/frontend-test-utils@^0.3.0, @backstage/frontend-test-utils@workspace:^, @backstage/frontend-test-utils@workspace:packages/frontend-test-utils": version: 0.0.0-use.local resolution: "@backstage/frontend-test-utils@workspace:packages/frontend-test-utils" dependencies: @@ -4639,7 +4660,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/integration-react@^1.1.24, @backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": +"@backstage/integration-react@^1.1.24, @backstage/integration-react@^1.2.5, @backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": version: 0.0.0-use.local resolution: "@backstage/integration-react@workspace:packages/integration-react" dependencies: @@ -5861,7 +5882,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-common@^1.0.20, @backstage/plugin-catalog-common@workspace:^, @backstage/plugin-catalog-common@workspace:plugins/catalog-common": +"@backstage/plugin-catalog-common@^1.0.20, @backstage/plugin-catalog-common@^1.1.3, @backstage/plugin-catalog-common@workspace:^, @backstage/plugin-catalog-common@workspace:plugins/catalog-common": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-common@workspace:plugins/catalog-common" dependencies: @@ -5985,7 +6006,48 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-react@^1.14.0, @backstage/plugin-catalog-react@^1.9.3, @backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": +"@backstage/plugin-catalog-react@npm:^1.14.0, @backstage/plugin-catalog-react@npm:^1.16.0, @backstage/plugin-catalog-react@npm:^1.9.3": + version: 1.16.0 + resolution: "@backstage/plugin-catalog-react@npm:1.16.0" + dependencies: + "@backstage/catalog-client": ^1.9.1 + "@backstage/catalog-model": ^1.7.3 + "@backstage/core-compat-api": ^0.4.0 + "@backstage/core-components": ^0.17.0 + "@backstage/core-plugin-api": ^1.10.5 + "@backstage/errors": ^1.2.7 + "@backstage/frontend-plugin-api": ^0.10.0 + "@backstage/frontend-test-utils": ^0.3.0 + "@backstage/integration-react": ^1.2.5 + "@backstage/plugin-catalog-common": ^1.1.3 + "@backstage/plugin-permission-common": ^0.8.4 + "@backstage/plugin-permission-react": ^0.4.32 + "@backstage/types": ^1.2.1 + "@backstage/version-bridge": ^1.0.11 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.61 + "@react-hookz/web": ^24.0.0 + classnames: ^2.2.6 + lodash: ^4.17.21 + material-ui-popup-state: ^1.9.3 + qs: ^6.9.4 + react-use: ^17.2.4 + yaml: ^2.0.0 + zen-observable: ^0.10.0 + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + react-router-dom: ^6.3.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 7ac3b023d53e4f4102d73cb5c29db7d6adc47432ec696b1fbc4107d1c44154ae2314ceb048d032e1174a0170251edca482710b1e7fd7ec9de5b55f18c6a3a1ea + languageName: node + linkType: hard + +"@backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-react@workspace:plugins/catalog-react" dependencies: @@ -6949,7 +7011,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-common@workspace:^, @backstage/plugin-permission-common@workspace:plugins/permission-common": +"@backstage/plugin-permission-common@^0.8.4, @backstage/plugin-permission-common@workspace:^, @backstage/plugin-permission-common@workspace:plugins/permission-common": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-common@workspace:plugins/permission-common" dependencies: @@ -6988,7 +7050,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-react@workspace:^, @backstage/plugin-permission-react@workspace:plugins/permission-react": +"@backstage/plugin-permission-react@^0.4.32, @backstage/plugin-permission-react@workspace:^, @backstage/plugin-permission-react@workspace:plugins/permission-react": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-react@workspace:plugins/permission-react" dependencies: @@ -8480,7 +8542,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/version-bridge@^1.0.10, @backstage/version-bridge@^1.0.7, @backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": +"@backstage/version-bridge@^1.0.10, @backstage/version-bridge@^1.0.11, @backstage/version-bridge@^1.0.7, @backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": version: 0.0.0-use.local resolution: "@backstage/version-bridge@workspace:packages/version-bridge" dependencies: From b6e92d89252df5d7eb3c2afe8ff938560cc9f355 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 25 Mar 2025 13:32:12 +0000 Subject: [PATCH 077/119] Code update Signed-off-by: Charles de Dreuille --- .../src/app/(docs)/components/box/page.mdx | 2 +- .../src/app/(docs)/components/button/page.mdx | 4 +- .../app/(docs)/components/checkbox/page.mdx | 2 +- .../app/(docs)/components/container/page.mdx | 2 +- .../src/app/(docs)/components/field/page.mdx | 2 +- .../src/app/(docs)/components/flex/page.mdx | 4 +- .../src/app/(docs)/components/grid/page.mdx | 4 +- .../app/(docs)/components/heading/page.mdx | 2 +- .../(docs)/components/icon-button/page.mdx | 4 +- .../src/app/(docs)/components/icon/page.mdx | 2 +- .../src/app/(docs)/components/input/page.mdx | 2 +- .../src/app/(docs)/components/text/page.mdx | 2 +- .../src/app/(docs)/theme/theming/page.mdx | 2 +- .../src/app/(docs)/theme/typography/page.mdx | 3 +- .../src/app/(playground)/playground/page.tsx | 10 +- canon-docs/src/snippets/box.tsx | 12 -- canon-docs/src/snippets/button.tsx | 18 --- canon-docs/src/snippets/checkbox.tsx | 14 -- .../{_snippets.ts => code-snippets.ts} | 0 canon-docs/src/snippets/container.tsx | 12 -- canon-docs/src/snippets/field.tsx | 13 -- canon-docs/src/snippets/flex.tsx | 12 -- canon-docs/src/snippets/grid.tsx | 12 -- canon-docs/src/snippets/heading.tsx | 16 --- canon-docs/src/snippets/icon-button.tsx | 16 --- canon-docs/src/snippets/icon.tsx | 12 -- canon-docs/src/snippets/input.tsx | 13 -- canon-docs/src/snippets/stories-snippets.tsx | 126 ++++++++++++++++++ canon-docs/src/snippets/text.tsx | 16 --- 29 files changed, 150 insertions(+), 189 deletions(-) delete mode 100644 canon-docs/src/snippets/box.tsx delete mode 100644 canon-docs/src/snippets/button.tsx delete mode 100644 canon-docs/src/snippets/checkbox.tsx rename canon-docs/src/snippets/{_snippets.ts => code-snippets.ts} (100%) delete mode 100644 canon-docs/src/snippets/container.tsx delete mode 100644 canon-docs/src/snippets/field.tsx delete mode 100644 canon-docs/src/snippets/flex.tsx delete mode 100644 canon-docs/src/snippets/grid.tsx delete mode 100644 canon-docs/src/snippets/heading.tsx delete mode 100644 canon-docs/src/snippets/icon-button.tsx delete mode 100644 canon-docs/src/snippets/icon.tsx delete mode 100644 canon-docs/src/snippets/input.tsx create mode 100644 canon-docs/src/snippets/stories-snippets.tsx delete mode 100644 canon-docs/src/snippets/text.tsx diff --git a/canon-docs/src/app/(docs)/components/box/page.mdx b/canon-docs/src/app/(docs)/components/box/page.mdx index 1a96ffc621..25ce3b6cd8 100644 --- a/canon-docs/src/app/(docs)/components/box/page.mdx +++ b/canon-docs/src/app/(docs)/components/box/page.mdx @@ -2,7 +2,7 @@ import { CodeBlock } from '@/components/CodeBlock'; import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; import { Snippet } from '@/components/Snippet'; -import { BoxSnippet } from '@/snippets/box'; +import { BoxSnippet } from '@/snippets/stories-snippets'; import { boxPropDefs } from './props'; import { spacingPropDefs } from '../../../../utils/propDefs'; diff --git a/canon-docs/src/app/(docs)/components/button/page.mdx b/canon-docs/src/app/(docs)/components/button/page.mdx index 38eb819d4d..e1ecee8920 100644 --- a/canon-docs/src/app/(docs)/components/button/page.mdx +++ b/canon-docs/src/app/(docs)/components/button/page.mdx @@ -2,8 +2,8 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { ButtonSnippet } from '@/snippets/button'; -import { buttonVariants } from '@/snippets/_snippets'; +import { ButtonSnippet } from '@/snippets/stories-snippets'; +import { buttonVariants } from '@/snippets/code-snippets'; import { buttonPropDefs } from './props'; # Button diff --git a/canon-docs/src/app/(docs)/components/checkbox/page.mdx b/canon-docs/src/app/(docs)/components/checkbox/page.mdx index 42d67c7857..413636dc9a 100644 --- a/canon-docs/src/app/(docs)/components/checkbox/page.mdx +++ b/canon-docs/src/app/(docs)/components/checkbox/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { CheckboxSnippet } from '@/snippets/checkbox'; +import { CheckboxSnippet } from '@/snippets/stories-snippets'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; diff --git a/canon-docs/src/app/(docs)/components/container/page.mdx b/canon-docs/src/app/(docs)/components/container/page.mdx index cd6b2d738d..40f0321624 100644 --- a/canon-docs/src/app/(docs)/components/container/page.mdx +++ b/canon-docs/src/app/(docs)/components/container/page.mdx @@ -2,7 +2,7 @@ import { CodeBlock } from '@/components/CodeBlock'; import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; import { Snippet } from '@/components/Snippet'; -import { ContainerSnippet } from '@/snippets/container'; +import { ContainerSnippet } from '@/snippets/stories-snippets'; import { containerPropDefs } from './props'; # Container diff --git a/canon-docs/src/app/(docs)/components/field/page.mdx b/canon-docs/src/app/(docs)/components/field/page.mdx index ceaddcaac5..1526ce8c9f 100644 --- a/canon-docs/src/app/(docs)/components/field/page.mdx +++ b/canon-docs/src/app/(docs)/components/field/page.mdx @@ -2,7 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { FieldSnippet } from '@/snippets/field'; +import { FieldSnippet } from '@/snippets/stories-snippets'; import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; import { fieldRootPropDefs, diff --git a/canon-docs/src/app/(docs)/components/flex/page.mdx b/canon-docs/src/app/(docs)/components/flex/page.mdx index 3d0c22a90b..8150f3e3c5 100644 --- a/canon-docs/src/app/(docs)/components/flex/page.mdx +++ b/canon-docs/src/app/(docs)/components/flex/page.mdx @@ -6,9 +6,9 @@ import { flexSimple, flexResponsive, flexAlign, -} from '@/snippets/_snippets'; +} from '@/snippets/code-snippets'; import { Snippet } from '@/components/Snippet'; -import { FlexSnippet } from '@/snippets/flex'; +import { FlexSnippet } from '@/snippets/stories-snippets'; import { flexPropDefs } from './props'; import { spacingPropDefs } from '../../../../utils/propDefs'; diff --git a/canon-docs/src/app/(docs)/components/grid/page.mdx b/canon-docs/src/app/(docs)/components/grid/page.mdx index 94f3eaec08..c8604076eb 100644 --- a/canon-docs/src/app/(docs)/components/grid/page.mdx +++ b/canon-docs/src/app/(docs)/components/grid/page.mdx @@ -1,9 +1,9 @@ import { CodeBlock } from '@/components/CodeBlock'; import { PropsTable } from '@/components/PropsTable'; import { Tabs } from '@/components/Tabs'; -import { grid } from '@/snippets/_snippets'; +import { grid } from '@/snippets/code-snippets'; import { Snippet } from '@/components/Snippet'; -import { GridSnippet } from '@/snippets/grid'; +import { GridSnippet } from '@/snippets/stories-snippets'; import { spacingPropDefs } from '../../../../utils/propDefs'; import { gridPropDefs, gridItemPropDefs } from './props'; diff --git a/canon-docs/src/app/(docs)/components/heading/page.mdx b/canon-docs/src/app/(docs)/components/heading/page.mdx index af4ea94648..10fd60bef1 100644 --- a/canon-docs/src/app/(docs)/components/heading/page.mdx +++ b/canon-docs/src/app/(docs)/components/heading/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { HeadingSnippet } from '@/snippets/heading'; +import { HeadingSnippet } from '@/snippets/stories-snippets'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; diff --git a/canon-docs/src/app/(docs)/components/icon-button/page.mdx b/canon-docs/src/app/(docs)/components/icon-button/page.mdx index 12eb8c61ce..60530ec9ea 100644 --- a/canon-docs/src/app/(docs)/components/icon-button/page.mdx +++ b/canon-docs/src/app/(docs)/components/icon-button/page.mdx @@ -2,8 +2,8 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { IconButtonSnippet } from '@/snippets/icon-button'; -import { iconButtonVariants } from '@/snippets/_snippets'; +import { IconButtonSnippet } from '@/snippets/stories-snippets'; +import { iconButtonVariants } from '@/snippets/code-snippets'; import { iconButtonPropDefs } from './props'; # Icon Button diff --git a/canon-docs/src/app/(docs)/components/icon/page.mdx b/canon-docs/src/app/(docs)/components/icon/page.mdx index 78d8c85d01..66be460d13 100644 --- a/canon-docs/src/app/(docs)/components/icon/page.mdx +++ b/canon-docs/src/app/(docs)/components/icon/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { IconSnippet } from '@/snippets/icon'; +import { IconSnippet } from '@/snippets/stories-snippets'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; diff --git a/canon-docs/src/app/(docs)/components/input/page.mdx b/canon-docs/src/app/(docs)/components/input/page.mdx index a74862a62e..0ecaaa5409 100644 --- a/canon-docs/src/app/(docs)/components/input/page.mdx +++ b/canon-docs/src/app/(docs)/components/input/page.mdx @@ -2,7 +2,7 @@ import { PropsTable } from '@/components/PropsTable'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; -import { InputSnippet } from '@/snippets/input'; +import { InputSnippet } from '@/snippets/stories-snippets'; import { BaseUI } from '@/components/HeadlessBanners/BaseUI'; import { inputPropDefs } from './props'; diff --git a/canon-docs/src/app/(docs)/components/text/page.mdx b/canon-docs/src/app/(docs)/components/text/page.mdx index 877f953c43..70d5de5504 100644 --- a/canon-docs/src/app/(docs)/components/text/page.mdx +++ b/canon-docs/src/app/(docs)/components/text/page.mdx @@ -1,5 +1,5 @@ import { PropsTable } from '@/components/PropsTable'; -import { TextSnippet } from '@/snippets/text'; +import { TextSnippet } from '@/snippets/stories-snippets'; import { Snippet } from '@/components/Snippet'; import { Tabs } from '@/components/Tabs'; import { CodeBlock } from '@/components/CodeBlock'; diff --git a/canon-docs/src/app/(docs)/theme/theming/page.mdx b/canon-docs/src/app/(docs)/theme/theming/page.mdx index cab9480a14..e3fc42da44 100644 --- a/canon-docs/src/app/(docs)/theme/theming/page.mdx +++ b/canon-docs/src/app/(docs)/theme/theming/page.mdx @@ -1,7 +1,7 @@ import { CodeBlock } from '@/components/CodeBlock'; import * as Table from '@/components/Table'; import { Chip } from '@/components/Chip'; -import { customTheme } from '@/snippets/_snippets'; +import { customTheme } from '@/snippets/code-snippets'; # Theming diff --git a/canon-docs/src/app/(docs)/theme/typography/page.mdx b/canon-docs/src/app/(docs)/theme/typography/page.mdx index 9ec36d6e8b..98a342bc91 100644 --- a/canon-docs/src/app/(docs)/theme/typography/page.mdx +++ b/canon-docs/src/app/(docs)/theme/typography/page.mdx @@ -1,5 +1,4 @@ -import { HeadingSnippet } from '@/snippets/heading'; -import { TextSnippet } from '@/snippets/text'; +import { HeadingSnippet, TextSnippet } from '@/snippets/stories-snippets'; import { Snippet } from '@/components/Snippet'; # Typography diff --git a/canon-docs/src/app/(playground)/playground/page.tsx b/canon-docs/src/app/(playground)/playground/page.tsx index 7184227a0a..3f1675551e 100644 --- a/canon-docs/src/app/(playground)/playground/page.tsx +++ b/canon-docs/src/app/(playground)/playground/page.tsx @@ -5,10 +5,12 @@ import { Grid, Flex, Text } from '../../../../../packages/canon'; import { screenSizes } from '@/utils/data'; import { Frame } from '@/components/Frame'; import { usePlayground } from '@/utils/playground-context'; -import { ButtonSnippet } from '@/snippets/button'; -import { CheckboxSnippet } from '@/snippets/checkbox'; -import { HeadingSnippet } from '@/snippets/heading'; -import { TextSnippet } from '@/snippets/text'; +import { + ButtonSnippet, + CheckboxSnippet, + HeadingSnippet, + TextSnippet, +} from '@/snippets/stories-snippets'; import styles from './styles.module.css'; diff --git a/canon-docs/src/snippets/box.tsx b/canon-docs/src/snippets/box.tsx deleted file mode 100644 index df254b9f7e..0000000000 --- a/canon-docs/src/snippets/box.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as BoxStories from '../../../packages/canon/src/components/Box/Box.stories'; - -export const BoxSnippet = ({ story }: { story: string }) => { - const stories = composeStories(BoxStories); - - if (story === 'Preview') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/button.tsx b/canon-docs/src/snippets/button.tsx deleted file mode 100644 index eaf87c7dce..0000000000 --- a/canon-docs/src/snippets/button.tsx +++ /dev/null @@ -1,18 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as ButtonStories from '../../../packages/canon/src/components/Button/Button.stories'; - -export const ButtonSnippet = ({ story }: { story: string }) => { - const stories = composeStories(ButtonStories); - - if (story === 'Variants') return ; - if (story === 'Sizes') return ; - if (story === 'WithIcons') return ; - if (story === 'FullWidth') return ; - if (story === 'Disabled') return ; - if (story === 'Responsive') return ; - if (story === 'Playground') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/checkbox.tsx b/canon-docs/src/snippets/checkbox.tsx deleted file mode 100644 index 888f24c228..0000000000 --- a/canon-docs/src/snippets/checkbox.tsx +++ /dev/null @@ -1,14 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as CheckboxStories from '../../../packages/canon/src/components/Checkbox/Checkbox.stories'; - -export const CheckboxSnippet = ({ story }: { story: string }) => { - const stories = composeStories(CheckboxStories); - - if (story === 'Default') return ; - if (story === 'AllVariants') return ; - if (story === 'Playground') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/_snippets.ts b/canon-docs/src/snippets/code-snippets.ts similarity index 100% rename from canon-docs/src/snippets/_snippets.ts rename to canon-docs/src/snippets/code-snippets.ts diff --git a/canon-docs/src/snippets/container.tsx b/canon-docs/src/snippets/container.tsx deleted file mode 100644 index 9faa6e06e2..0000000000 --- a/canon-docs/src/snippets/container.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as ContainerStories from '../../../packages/canon/src/components/Container/Container.stories'; - -export const ContainerSnippet = ({ story }: { story: string }) => { - const stories = composeStories(ContainerStories); - - if (story === 'Preview') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/field.tsx b/canon-docs/src/snippets/field.tsx deleted file mode 100644 index 2c913472d7..0000000000 --- a/canon-docs/src/snippets/field.tsx +++ /dev/null @@ -1,13 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as FieldStories from '../../../packages/canon/src/components/Field/Field.stories'; - -export const FieldSnippet = ({ story }: { story: string }) => { - const stories = composeStories(FieldStories); - - if (story === 'Default') return ; - if (story === 'WithLabelAndDescription') - return ; - return null; -}; diff --git a/canon-docs/src/snippets/flex.tsx b/canon-docs/src/snippets/flex.tsx deleted file mode 100644 index c4fc40926e..0000000000 --- a/canon-docs/src/snippets/flex.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as FlexStories from '../../../packages/canon/src/components/Flex/Flex.stories'; - -export const FlexSnippet = ({ story }: { story: string }) => { - const stories = composeStories(FlexStories); - - if (story === 'Default') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/grid.tsx b/canon-docs/src/snippets/grid.tsx deleted file mode 100644 index 1a41fe8ee6..0000000000 --- a/canon-docs/src/snippets/grid.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as GridStories from '../../../packages/canon/src/components/Grid/Grid.stories'; - -export const GridSnippet = ({ story }: { story: string }) => { - const stories = composeStories(GridStories); - - if (story === 'Default') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/heading.tsx b/canon-docs/src/snippets/heading.tsx deleted file mode 100644 index b4e3ac9997..0000000000 --- a/canon-docs/src/snippets/heading.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as HeadingStories from '../../../packages/canon/src/components/Heading/Heading.stories'; - -export const HeadingSnippet = ({ story }: { story: string }) => { - const stories = composeStories(HeadingStories); - - if (story === 'Default') return ; - if (story === 'Title1') return ; - if (story === 'AllVariants') return ; - if (story === 'Responsive') return ; - if (story === 'Playground') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/icon-button.tsx b/canon-docs/src/snippets/icon-button.tsx deleted file mode 100644 index b346d0be4f..0000000000 --- a/canon-docs/src/snippets/icon-button.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as IconButtonStories from '../../../packages/canon/src/components/IconButton/IconButton.stories'; - -export const IconButtonSnippet = ({ story }: { story: string }) => { - const stories = composeStories(IconButtonStories); - - if (story === 'Variants') return ; - if (story === 'Sizes') return ; - if (story === 'Disabled') return ; - if (story === 'Responsive') return ; - if (story === 'Playground') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/icon.tsx b/canon-docs/src/snippets/icon.tsx deleted file mode 100644 index 978af55204..0000000000 --- a/canon-docs/src/snippets/icon.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as IconStories from '../../../packages/canon/src/components/Icon/Icon.stories'; - -export const IconSnippet = ({ story }: { story: string }) => { - const stories = composeStories(IconStories); - - if (story === 'Default') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/input.tsx b/canon-docs/src/snippets/input.tsx deleted file mode 100644 index 00f5dc5a01..0000000000 --- a/canon-docs/src/snippets/input.tsx +++ /dev/null @@ -1,13 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as InputStories from '../../../packages/canon/src/components/Input/Input.stories'; - -export const InputSnippet = ({ story }: { story: string }) => { - const stories = composeStories(InputStories); - - if (story === 'Primary') return ; - if (story === 'Sizes') return ; - - return null; -}; diff --git a/canon-docs/src/snippets/stories-snippets.tsx b/canon-docs/src/snippets/stories-snippets.tsx new file mode 100644 index 0000000000..e7cc92811d --- /dev/null +++ b/canon-docs/src/snippets/stories-snippets.tsx @@ -0,0 +1,126 @@ +'use client'; + +import { composeStories } from '@storybook/react'; +import * as BoxStories from '../../../packages/canon/src/components/Box/Box.stories'; +import * as ButtonStories from '../../../packages/canon/src/components/Button/Button.stories'; +import * as CheckboxStories from '../../../packages/canon/src/components/Checkbox/Checkbox.stories'; +import * as ContainerStories from '../../../packages/canon/src/components/Container/Container.stories'; +import * as FieldStories from '../../../packages/canon/src/components/Field/Field.stories'; +import * as GridStories from '../../../packages/canon/src/components/Grid/Grid.stories'; +import * as HeadingStories from '../../../packages/canon/src/components/Heading/Heading.stories'; +import * as IconButtonStories from '../../../packages/canon/src/components/IconButton/IconButton.stories'; +import * as IconStories from '../../../packages/canon/src/components/Icon/Icon.stories'; +import * as InputStories from '../../../packages/canon/src/components/Input/Input.stories'; +import * as TextStories from '../../../packages/canon/src/components/Text/Text.stories'; +import * as FlexStories from '../../../packages/canon/src/components/Flex/Flex.stories'; +export const BoxSnippet = ({ story }: { story: keyof typeof BoxStories }) => { + const stories = composeStories(BoxStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const ButtonSnippet = ({ + story, +}: { + story: keyof typeof ButtonStories; +}) => { + const stories = composeStories(ButtonStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const CheckboxSnippet = ({ + story, +}: { + story: keyof typeof CheckboxStories; +}) => { + const stories = composeStories(CheckboxStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const ContainerSnippet = ({ + story, +}: { + story: keyof typeof ContainerStories; +}) => { + const stories = composeStories(ContainerStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const FlexSnippet = ({ story }: { story: keyof typeof FlexStories }) => { + const stories = composeStories(FlexStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const FieldSnippet = ({ + story, +}: { + story: keyof typeof FieldStories; +}) => { + const stories = composeStories(FieldStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const GridSnippet = ({ story }: { story: keyof typeof GridStories }) => { + const stories = composeStories(GridStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const HeadingSnippet = ({ + story, +}: { + story: keyof typeof HeadingStories; +}) => { + const stories = composeStories(HeadingStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const IconButtonSnippet = ({ + story, +}: { + story: keyof typeof IconButtonStories; +}) => { + const stories = composeStories(IconButtonStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const IconSnippet = ({ story }: { story: keyof typeof IconStories }) => { + const stories = composeStories(IconStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const InputSnippet = ({ + story, +}: { + story: keyof typeof InputStories; +}) => { + const stories = composeStories(InputStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; + +export const TextSnippet = ({ story }: { story: keyof typeof TextStories }) => { + const stories = composeStories(TextStories); + const StoryComponent = stories[story as keyof typeof stories]; + + return StoryComponent ? : null; +}; diff --git a/canon-docs/src/snippets/text.tsx b/canon-docs/src/snippets/text.tsx deleted file mode 100644 index b42f58b877..0000000000 --- a/canon-docs/src/snippets/text.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import { composeStories } from '@storybook/react'; -import * as TextStories from '../../../packages/canon/src/components/Text/Text.stories'; - -export const TextSnippet = ({ story }: { story: string }) => { - const stories = composeStories(TextStories); - - if (story === 'Default') return ; - if (story === 'AllVariants') return ; - if (story === 'AllWeights') return ; - if (story === 'Responsive') return ; - if (story === 'Playground') return ; - - return null; -}; From fc2860c10258a52b229b12394da10a2e7d440d1d Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 25 Mar 2025 14:02:45 +0000 Subject: [PATCH 078/119] Update stories-snippets.tsx Signed-off-by: Charles de Dreuille --- canon-docs/src/snippets/stories-snippets.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/canon-docs/src/snippets/stories-snippets.tsx b/canon-docs/src/snippets/stories-snippets.tsx index e7cc92811d..76137e9b82 100644 --- a/canon-docs/src/snippets/stories-snippets.tsx +++ b/canon-docs/src/snippets/stories-snippets.tsx @@ -13,6 +13,7 @@ import * as IconStories from '../../../packages/canon/src/components/Icon/Icon.s import * as InputStories from '../../../packages/canon/src/components/Input/Input.stories'; import * as TextStories from '../../../packages/canon/src/components/Text/Text.stories'; import * as FlexStories from '../../../packages/canon/src/components/Flex/Flex.stories'; + export const BoxSnippet = ({ story }: { story: keyof typeof BoxStories }) => { const stories = composeStories(BoxStories); const StoryComponent = stories[story as keyof typeof stories]; From cb11167e116a3ba5a0444a7ecd5d9a824ead0117 Mon Sep 17 00:00:00 2001 From: Peter Macdonald Date: Tue, 25 Mar 2025 15:51:50 +0100 Subject: [PATCH 079/119] attempt at api docs fix Signed-off-by: Peter Macdonald --- .github/workflows/deploy_microsite.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_microsite.yml b/.github/workflows/deploy_microsite.yml index a700b21d5e..1f246abd26 100644 --- a/.github/workflows/deploy_microsite.yml +++ b/.github/workflows/deploy_microsite.yml @@ -92,7 +92,7 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: stable-openapi-docs - path: docs/**/*.api.mdx + path: docs/**/api/**/* if-no-files-found: error retention-days: 1 @@ -165,7 +165,7 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: next-openapi-docs - path: docs/**/*.api.mdx + path: docs/**/api/**/* if-no-files-found: error retention-days: 1 @@ -220,7 +220,7 @@ jobs: uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4 with: name: stable-openapi-docs - path: docs/**/*.api.mdx + path: docs - name: grab lastest releases docs run: | @@ -257,7 +257,7 @@ jobs: uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4 with: name: next-openapi-docs - path: docs/**/*.api.mdx + path: docs - name: build microsite run: yarn build From 75886029999dcead0251594dfbee5b371d6ebca0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 18:19:22 +0000 Subject: [PATCH 080/119] Update dependency vite to v5.4.15 [SECURITY] Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- storybook/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 1a3e6f0a24..ac937bd655 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -4811,8 +4811,8 @@ __metadata: linkType: hard "vite@npm:^5.4.8": - version: 5.4.14 - resolution: "vite@npm:5.4.14" + version: 5.4.15 + resolution: "vite@npm:5.4.15" dependencies: esbuild: ^0.21.3 fsevents: ~2.3.3 @@ -4849,7 +4849,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 7360661da0415809454ff8809b6666e868ffc3e5ccfbd5fc17425341546cdc3dd3d37c68fcd6ed7305252aaecd0d251ede3745b57aaebd00b8aececc30b6697b + checksum: 296463795fdc806e2650b9caae6409b630eb4acd4ef295121e7f700548a2ecb7d7805ad25a46d668be79dc78f1ea48319afd9a646afe934fb3371f8fe30e84be languageName: node linkType: hard From f7cb5383e926b1d6f59fce9afafc8bb926339a55 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 25 Mar 2025 20:57:09 +0100 Subject: [PATCH 081/119] canon: prop extraction fixes Signed-off-by: Patrik Oldsberg --- .changeset/famous-eggs-dance.md | 5 +++ packages/canon/src/utils/extractProps.ts | 54 ++++++++++++++++-------- 2 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 .changeset/famous-eggs-dance.md diff --git a/.changeset/famous-eggs-dance.md b/.changeset/famous-eggs-dance.md new file mode 100644 index 0000000000..8293746402 --- /dev/null +++ b/.changeset/famous-eggs-dance.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Internal refactor and fixes to the prop extraction logic for layout components. diff --git a/packages/canon/src/utils/extractProps.ts b/packages/canon/src/utils/extractProps.ts index 8631f4e228..1668117909 100644 --- a/packages/canon/src/utils/extractProps.ts +++ b/packages/canon/src/utils/extractProps.ts @@ -14,6 +14,16 @@ * limitations under the License. */ +type BasePropDef = { + type: string; + values?: readonly unknown[]; + default?: unknown; + required?: boolean; + className?: string; + responsive?: true; + customProperties?: string[]; +}; + export function extractProps( props: { className?: string; @@ -22,45 +32,53 @@ export function extractProps( as?: keyof JSX.IntrinsicElements; [key: string]: any; }, - propDefs: { [key: string]: any }, + propDefs: { [name in string]: BasePropDef }, ) { let className: string[] = (props.className || '').split(' '); let style: React.CSSProperties = { ...props.style }; - const hasProp = (key: string) => props.hasOwnProperty(key); for (const key in propDefs) { + const propDef = propDefs[key]; + // Check if the prop is present or has a default value - if (!hasProp(key) && !propDefs[key].hasOwnProperty('default')) { + if (!Object.hasOwn(props, key) && !propDef.hasOwnProperty('default')) { continue; // Skip processing if neither is present } - const value = hasProp(key) ? props[key] : propDefs[key].default; - const propDefsValues = propDefs[key].values; - const propDefsCustomProperties = propDefs[key].customProperties; - const propDefsClassName = propDefs[key].className; - const isResponsive = propDefs[key].responsive; + const value = Object.hasOwn(props, key) + ? (props[key] as unknown) + : propDefs[key].default; + const propDefsValues = propDef.values; + const propDefsCustomProperties = propDef.customProperties; + const propDefsClassName = propDef.className; + const isResponsive = propDef.responsive; - const handleValue = (val: string, prefix: string = '') => { + const handleValue = (val: unknown, prefix: string = '') => { // Skip adding class name if the key is "as" if (key === 'as') return; - if (propDefsValues.includes(val)) { + if (propDefsValues?.includes(val)) { className.push(`${prefix}${propDefsClassName}-${val}`); } else { - const customPropertyKey = - isResponsive && prefix - ? `${propDefsCustomProperties}-${prefix.slice(0, -1)}` - : propDefsCustomProperties; - (style as any)[customPropertyKey] = val; + if (propDefsCustomProperties) { + for (const customProperty of propDefsCustomProperties) { + const customPropertyKey = + isResponsive && prefix + ? `${customProperty}-${prefix.slice(0, -1)}` + : customProperty; + style[customPropertyKey as keyof typeof style] = val as any; + } + } className.push(`${prefix}${propDefsClassName}`); } }; - if (isResponsive && typeof value === 'object') { + if (isResponsive && typeof value === 'object' && value !== null) { + const breakpointValues = value as { [key: string]: unknown }; // Handle responsive object values - for (const breakpoint in value) { + for (const breakpoint in breakpointValues) { const prefix = breakpoint === 'initial' ? '' : `${breakpoint}:`; - handleValue(value[breakpoint], prefix); + handleValue(breakpointValues[breakpoint], prefix); } } else { handleValue(value); From 5d7bad4920956ce0e8d51efa8efb59a18da20d36 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 25 Mar 2025 22:04:26 +0100 Subject: [PATCH 082/119] core-components: fix AlertDisplay messaging Signed-off-by: Patrik Oldsberg --- .changeset/funny-lizards-clean.md | 5 +++++ packages/core-components/src/translation.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/funny-lizards-clean.md diff --git a/.changeset/funny-lizards-clean.md b/.changeset/funny-lizards-clean.md new file mode 100644 index 0000000000..7c85e28188 --- /dev/null +++ b/.changeset/funny-lizards-clean.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Fixed the messaging in the `AlertDisplay` where it was claiming that there were older messages available rather than newer. diff --git a/packages/core-components/src/translation.ts b/packages/core-components/src/translation.ts index 13bd62bab8..40b6e94798 100644 --- a/packages/core-components/src/translation.ts +++ b/packages/core-components/src/translation.ts @@ -106,8 +106,8 @@ export const coreComponentsTranslationRef = createTranslationRef({ }, }, alertDisplay: { - message_one: '({{ count }} older message)', - message_other: '({{ count }} older messages)', + message_one: '({{ count }} newer message)', + message_other: '({{ count }} newer messages)', }, autoLogout: { stillTherePrompt: { From 7568b53ab1ccd9f62cd81fcbca062e87ed105cab Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:40:56 +0000 Subject: [PATCH 083/119] fix(deps): update dependency @base-ui-components/react to v1.0.0-alpha.7 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 165 +++++++++++++++++++++++++++++------------------------- 1 file changed, 88 insertions(+), 77 deletions(-) diff --git a/yarn.lock b/yarn.lock index 306ccef43a..a4257d75e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3335,12 +3335,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.26.7, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": - version: 7.26.10 - resolution: "@babel/runtime@npm:7.26.10" +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.26.10, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": + version: 7.27.0 + resolution: "@babel/runtime@npm:7.27.0" dependencies: regenerator-runtime: ^0.14.0 - checksum: 22d2e0abb86e90de489ab16bb578db6fe2b63a88696db431198b24963749820c723f1982298cdbbea187f7b2b80fb4d98a514faf114ddb2fdc14a4b96277b955 + checksum: 3e73d9e65f76fad8f99802b5364c941f4a60c693b3eca66147bb0bfa54cf0fbe017232155e16e3fd83c0a049b51b8d7239efbd73626534abe8b54a6dd57dcb1b languageName: node linkType: hard @@ -8571,13 +8571,13 @@ __metadata: linkType: hard "@base-ui-components/react@npm:^1.0.0-alpha.5": - version: 1.0.0-alpha.6 - resolution: "@base-ui-components/react@npm:1.0.0-alpha.6" + version: 1.0.0-alpha.7 + resolution: "@base-ui-components/react@npm:1.0.0-alpha.7" dependencies: - "@babel/runtime": ^7.26.7 - "@floating-ui/react": ^0.27.3 + "@babel/runtime": ^7.26.10 + "@floating-ui/react": ^0.27.5 "@floating-ui/utils": ^0.2.9 - "@react-aria/overlays": ^3.25.0 + "@react-aria/overlays": ^3.26.1 prop-types: ^15.8.1 use-sync-external-store: ^1.4.0 peerDependencies: @@ -8587,7 +8587,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 952ac38cabf580ff820c97d6ec1c9c07629c9b9a5129361ddfbdc47a6724af6329ad1eba2807b92db71a6ab9b87bb79cb659c7929b5e209fb01747ac2a89cbd9 + checksum: d20f951097500baa13a5856f6c364956e226efa882a8dc1e3787f892d1d103386788b4ce72beb5d5ef92bb4382d9936c63f247b8fc0c87c4345644326bb88fbc languageName: node linkType: hard @@ -9682,9 +9682,9 @@ __metadata: languageName: node linkType: hard -"@floating-ui/react@npm:^0.27.3": - version: 0.27.3 - resolution: "@floating-ui/react@npm:0.27.3" +"@floating-ui/react@npm:^0.27.5": + version: 0.27.5 + resolution: "@floating-ui/react@npm:0.27.5" dependencies: "@floating-ui/react-dom": ^2.1.2 "@floating-ui/utils": ^0.2.9 @@ -9692,7 +9692,7 @@ __metadata: peerDependencies: react: ">=17.0.0" react-dom: ">=17.0.0" - checksum: 34a6283df3ae232546903dcdb69a5d2d13706a7ceb7b3779bb3b9b1ef042ad7241fe5d3899fd7c6713a0e890b86b56285f89a45de4344828877085a262f29713 + checksum: 453bea48e52728bc1c065689bf4b7d340c65006ceab805569fcb849de01ab28527a0550c1e05dc95d3e0187c4836cc56600ab252f1ee74f1f9dfb0d6bb9144c6 languageName: node linkType: hard @@ -15336,75 +15336,76 @@ __metadata: languageName: node linkType: hard -"@react-aria/focus@npm:^3.19.1": - version: 3.19.1 - resolution: "@react-aria/focus@npm:3.19.1" +"@react-aria/focus@npm:^3.20.1": + version: 3.20.1 + resolution: "@react-aria/focus@npm:3.20.1" dependencies: - "@react-aria/interactions": ^3.23.0 - "@react-aria/utils": ^3.27.0 - "@react-types/shared": ^3.27.0 + "@react-aria/interactions": ^3.24.1 + "@react-aria/utils": ^3.28.1 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 clsx: ^2.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 1ad0714617aefbcd164f37fcbbd82b3edf7f1148983b67a7c08b7f6c55d05f03b141310d70dda8e5bbb866e0790d345c6fa6038fd4fdb6b4226b65aba664513e + checksum: 212596f44e3d02e51efbeb395eb8b1b0a3d4236876ddf25757acffc575cd1692704639e342ead111e6fbaba19bc34ee80c0e5dc2cef9ea3e46ffbefe6e546d03 languageName: node linkType: hard -"@react-aria/i18n@npm:^3.12.5": - version: 3.12.5 - resolution: "@react-aria/i18n@npm:3.12.5" +"@react-aria/i18n@npm:^3.12.7": + version: 3.12.7 + resolution: "@react-aria/i18n@npm:3.12.7" dependencies: "@internationalized/date": ^3.7.0 "@internationalized/message": ^3.1.6 "@internationalized/number": ^3.6.0 "@internationalized/string": ^3.2.5 "@react-aria/ssr": ^3.9.7 - "@react-aria/utils": ^3.27.0 - "@react-types/shared": ^3.27.0 + "@react-aria/utils": ^3.28.1 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 573ef15b43d60566f3c58fbfa38bae363ea7f8e265e93620587afa42c8e2f9e33310a9da83b1e55773c87d389efbcab6bf574e413895bb52fc6ab6ac70cbca31 + checksum: e376fc40d7190f55a4187850d918f4fcd1f2d9c13b1be3693baea746bd39524c4dc6d37d25ec7ad46f36bea3922192a099279002da38c87d4f2d4125db4aee6a languageName: node linkType: hard -"@react-aria/interactions@npm:^3.23.0": - version: 3.23.0 - resolution: "@react-aria/interactions@npm:3.23.0" +"@react-aria/interactions@npm:^3.24.1": + version: 3.24.1 + resolution: "@react-aria/interactions@npm:3.24.1" dependencies: "@react-aria/ssr": ^3.9.7 - "@react-aria/utils": ^3.27.0 - "@react-types/shared": ^3.27.0 + "@react-aria/utils": ^3.28.1 + "@react-stately/flags": ^3.1.0 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 43d47bc2b5f1afa0b47cfba9514b6e0daee6d0d2507ae0f5dbb18f6b3f90e64a9de99fd4787eb663517ca84576de9ef7d731f490102848dcecf886babf3d2f50 + checksum: 2d18ffb3a028adf138d225b52cb520c2e6f28951db6528e61712fd0f571968c18d1094c681c0af3811e8a98bbd6ed08b78a3fac1368e7f3b669cc9c7f42810e8 languageName: node linkType: hard -"@react-aria/overlays@npm:^3.25.0": - version: 3.25.0 - resolution: "@react-aria/overlays@npm:3.25.0" +"@react-aria/overlays@npm:^3.26.1": + version: 3.26.1 + resolution: "@react-aria/overlays@npm:3.26.1" dependencies: - "@react-aria/focus": ^3.19.1 - "@react-aria/i18n": ^3.12.5 - "@react-aria/interactions": ^3.23.0 + "@react-aria/focus": ^3.20.1 + "@react-aria/i18n": ^3.12.7 + "@react-aria/interactions": ^3.24.1 "@react-aria/ssr": ^3.9.7 - "@react-aria/utils": ^3.27.0 - "@react-aria/visually-hidden": ^3.8.19 - "@react-stately/overlays": ^3.6.13 - "@react-types/button": ^3.10.2 - "@react-types/overlays": ^3.8.12 - "@react-types/shared": ^3.27.0 + "@react-aria/utils": ^3.28.1 + "@react-aria/visually-hidden": ^3.8.21 + "@react-stately/overlays": ^3.6.14 + "@react-types/button": ^3.11.0 + "@react-types/overlays": ^3.8.13 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: d2a4646debad2fe9e607d38029eb0969ae58ed22cc2e02a2e01ee13b860cf30e32e121db2494e10460930961f6185db65f20e23d5301be0d7d605478b7fae658 + checksum: 3356e5e1ed855988846c134571315db4159b46a189d92862482122edcf063c7b422174dec2ca70c31b716e880224ee38d8fd4f296077d234893e93bd8997add8 languageName: node linkType: hard @@ -15419,34 +15420,35 @@ __metadata: languageName: node linkType: hard -"@react-aria/utils@npm:^3.27.0": - version: 3.27.0 - resolution: "@react-aria/utils@npm:3.27.0" +"@react-aria/utils@npm:^3.28.1": + version: 3.28.1 + resolution: "@react-aria/utils@npm:3.28.1" dependencies: "@react-aria/ssr": ^3.9.7 + "@react-stately/flags": ^3.1.0 "@react-stately/utils": ^3.10.5 - "@react-types/shared": ^3.27.0 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 clsx: ^2.0.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: c93031bd77378483ad507d424d42341a164e2232007cd44397bcd197d0363a4164b201238fdfb47692bdc95ec92bca6c3c311d617dad5b6c2f3a67c6e0a42981 + checksum: 201aac61ee0e6b857bc9718f798f809f55bca08c2333d5d07a89c50c327d016646588f21b47708a7126b77163b18defe35c88830db976df6f33136f0cb8ba3f0 languageName: node linkType: hard -"@react-aria/visually-hidden@npm:^3.8.19": - version: 3.8.19 - resolution: "@react-aria/visually-hidden@npm:3.8.19" +"@react-aria/visually-hidden@npm:^3.8.21": + version: 3.8.21 + resolution: "@react-aria/visually-hidden@npm:3.8.21" dependencies: - "@react-aria/interactions": ^3.23.0 - "@react-aria/utils": ^3.27.0 - "@react-types/shared": ^3.27.0 + "@react-aria/interactions": ^3.24.1 + "@react-aria/utils": ^3.28.1 + "@react-types/shared": ^3.28.0 "@swc/helpers": ^0.5.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 83085be588ce63114e6506f61fa6987521b4539a1c4e1c5912e18d2a2b8feaa962f90d1c1fa689158f95c9428136b63305f8ccee6426ff0b9a0504b804d64e8e + checksum: c6c189c68c398f48a172efa21990c869962e86cee5d5606eab2c8576915f3b19514574930416c2811582eb1c5a627f62b2eb7b0a032575deabf49d4dd051b331 languageName: node linkType: hard @@ -15489,16 +15491,25 @@ __metadata: languageName: node linkType: hard -"@react-stately/overlays@npm:^3.6.13": - version: 3.6.13 - resolution: "@react-stately/overlays@npm:3.6.13" +"@react-stately/flags@npm:^3.1.0": + version: 3.1.0 + resolution: "@react-stately/flags@npm:3.1.0" + dependencies: + "@swc/helpers": ^0.5.0 + checksum: 2b68e0881f9ca748ba20cb9b4fb227671bc253ec6acef4c9fcce2efcdd32f7a71ff6e2ee20999d0c4a6518117e880c481a9733bbbfbae24c42bb381626bc2712 + languageName: node + linkType: hard + +"@react-stately/overlays@npm:^3.6.14": + version: 3.6.14 + resolution: "@react-stately/overlays@npm:3.6.14" dependencies: "@react-stately/utils": ^3.10.5 - "@react-types/overlays": ^3.8.12 + "@react-types/overlays": ^3.8.13 "@swc/helpers": ^0.5.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: b1cd9f95b2fadf38fd27b543d91459234767bc3ff13ffa9ba7d6bc8d325e7f84aa572fadf6740dc44a1f36038fcbde8d28667098ff762bdcc9aef6f8f40cfe12 + checksum: 196dce01eded2414755abe0278b2fa30933675103b641fa0a32814344e59c2c2673962d5c2635b013b0ef5e3da7a9c851ef7cf1f8bba817edc0e9bc9173d0e17 languageName: node linkType: hard @@ -15513,34 +15524,34 @@ __metadata: languageName: node linkType: hard -"@react-types/button@npm:^3.10.2": - version: 3.10.2 - resolution: "@react-types/button@npm:3.10.2" +"@react-types/button@npm:^3.11.0": + version: 3.11.0 + resolution: "@react-types/button@npm:3.11.0" dependencies: - "@react-types/shared": ^3.27.0 + "@react-types/shared": ^3.28.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 7d5157c33a495a6b218b1b8c6cc11e406a5ecf028293c0d6f3303744af60802f9dfa2eff669741b38368406f2791df1d907f18c8d91cf903dd65b1e17f606cee + checksum: fe922f0d094607913df66b201cd3006bdf2df8cf63af118ff06c02239dfb2d529f96ccefe8abaafdec1b8142072d342ce00077673f89fb8f9444d424a8ad5f8f languageName: node linkType: hard -"@react-types/overlays@npm:^3.8.12": - version: 3.8.12 - resolution: "@react-types/overlays@npm:3.8.12" +"@react-types/overlays@npm:^3.8.13": + version: 3.8.13 + resolution: "@react-types/overlays@npm:3.8.13" dependencies: - "@react-types/shared": ^3.27.0 + "@react-types/shared": ^3.28.0 peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 8bfed3dbc884d0b0bc88e6085e83632cfc4433488ba153eb2a68bee5fd485b4891be5763734cdc5daeca744ac84813ee5050224f3b82b98a439e0984163f8d0a + checksum: fb365fa0de9c9ed4c8960d97161182ae1b27e8cdb8c1b8fbdcc5607b44226b9f73db4070f8b4767da45a50830b3d09620c7870cff31ffb4ef3a0819295c39522 languageName: node linkType: hard -"@react-types/shared@npm:^3.27.0": - version: 3.27.0 - resolution: "@react-types/shared@npm:3.27.0" +"@react-types/shared@npm:^3.28.0": + version: 3.28.0 + resolution: "@react-types/shared@npm:3.28.0" peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - checksum: 72de4ba6f7e168e6c94cacd3c100c280df9ead41bd9d93f0f8b3e5ad5e8d75d96738b4dde9fc5d1907733b54baca63cd474034691a5a0f22120e1a4657ca3ad0 + checksum: c0d1b3f8bc2f45ff1850bc34bf6322998eb8e6c842281ec4b248fe5b6ced158567ef39f086fc37ae42295c1c604412d2bdd5e3fb0ec8f4f03fe3bc68632b4ade languageName: node linkType: hard From bc1cae41c5369b473f0c88b618731b26a122e750 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 02:09:53 +0000 Subject: [PATCH 084/119] fix(deps): update dependency @octokit/core to v5.2.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index a4257d75e0..648c69d5cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12714,8 +12714,8 @@ __metadata: linkType: hard "@octokit/core@npm:^4.0.0, @octokit/core@npm:^4.2.1": - version: 4.2.1 - resolution: "@octokit/core@npm:4.2.1" + version: 4.2.4 + resolution: "@octokit/core@npm:4.2.4" dependencies: "@octokit/auth-token": ^3.0.0 "@octokit/graphql": ^5.0.0 @@ -12724,22 +12724,22 @@ __metadata: "@octokit/types": ^9.0.0 before-after-hook: ^2.2.0 universal-user-agent: ^6.0.0 - checksum: f82d52e937e12da1c7c163341c845b8e27e7fa75678f5e5954e6fa017a94f1833d6e5c4e43f0be796fbfea9dc5e1137087f655dbd5acb3d57879e1b28568e0a9 + checksum: ac8ab47440a31b0228a034aacac6994b64d6b073ad5b688b4c5157fc5ee0d1af1c926e6087bf17fd7244ee9c5998839da89065a90819bde4a97cb77d4edf58a6 languageName: node linkType: hard "@octokit/core@npm:^5.0.0, @octokit/core@npm:^5.2.0": - version: 5.2.0 - resolution: "@octokit/core@npm:5.2.0" + version: 5.2.1 + resolution: "@octokit/core@npm:5.2.1" dependencies: "@octokit/auth-token": ^4.0.0 "@octokit/graphql": ^7.1.0 - "@octokit/request": ^8.3.1 - "@octokit/request-error": ^5.1.0 + "@octokit/request": ^8.4.1 + "@octokit/request-error": ^5.1.1 "@octokit/types": ^13.0.0 before-after-hook: ^2.2.0 universal-user-agent: ^6.0.0 - checksum: 57d5f02b759b569323dcb76cc72bf94ea7d0de58638c118ee14ec3e37d303c505893137dd72918328794844f35c74b3cd16999319c4b40d410a310d44a9b7566 + checksum: a7076095ec1109bb9273764a2b561b323368e96ea2c1257cef1d48107fe6493f363cfa84539da2d182b065831667c1baa85b00e99712079e299e06b46ba8693b languageName: node linkType: hard @@ -13064,7 +13064,7 @@ __metadata: languageName: node linkType: hard -"@octokit/request-error@npm:^5.0.0, @octokit/request-error@npm:^5.1.0, @octokit/request-error@npm:^5.1.1": +"@octokit/request-error@npm:^5.0.0, @octokit/request-error@npm:^5.1.1": version: 5.1.1 resolution: "@octokit/request-error@npm:5.1.1" dependencies: @@ -13103,7 +13103,7 @@ __metadata: languageName: node linkType: hard -"@octokit/request@npm:^8.0.0, @octokit/request@npm:^8.0.2, @octokit/request@npm:^8.3.1, @octokit/request@npm:^8.4.1": +"@octokit/request@npm:^8.0.0, @octokit/request@npm:^8.0.2, @octokit/request@npm:^8.4.1": version: 8.4.1 resolution: "@octokit/request@npm:8.4.1" dependencies: From de19466ee627fb0101016fd23f9b683b4375c435 Mon Sep 17 00:00:00 2001 From: AmbrishRamachandiran Date: Wed, 26 Mar 2025 15:03:37 +0530 Subject: [PATCH 085/119] Added notes design to ldp org Signed-off-by: AmbrishRamachandiran --- docs/integrations/ldap/org.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/integrations/ldap/org.md b/docs/integrations/ldap/org.md index 4dd7b7d1d8..9913cf0729 100644 --- a/docs/integrations/ldap/org.md +++ b/docs/integrations/ldap/org.md @@ -86,13 +86,14 @@ catalog: These config blocks have a lot of options in them, so we will describe each "root" key within the block separately. -> NOTE: -> -> If you want to import users and groups from different LDAP servers, you can define multiple providers with different names. -> If they should come from the same server, you can define multiple users and groups blocks within the same provider using an array of users / groups. -> Entries coming from the same block will be able to detect group memberships based on the `memberOf` attribute. -> -> If you want only to import users or groups, you can omit the groups or users block. +:::note Note + +If you want to import users and groups from different LDAP servers, you can define multiple providers with different names. +If they should come from the same server, you can define multiple users and groups blocks within the same provider using an array of users / groups. +Entries coming from the same block will be able to detect group memberships based on the `memberOf` attribute. +If you want only to import users or groups, you can omit the groups or users block. + +::: ### target From 9768992a4e0cac77da1cc368c9686f615abc81f4 Mon Sep 17 00:00:00 2001 From: djamaile Date: Wed, 26 Mar 2025 11:22:53 +0100 Subject: [PATCH 086/119] fix: mark github webhookSecret as optional Signed-off-by: djamaile --- .changeset/stale-tables-stick.md | 5 +++++ packages/integration/config.d.ts | 2 +- packages/integration/src/github/config.ts | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/stale-tables-stick.md diff --git a/.changeset/stale-tables-stick.md b/.changeset/stale-tables-stick.md new file mode 100644 index 0000000000..bea1c3361b --- /dev/null +++ b/.changeset/stale-tables-stick.md @@ -0,0 +1,5 @@ +--- +'@backstage/integration': patch +--- + +Mark GitHub `webhookSecret` config property as optional. A `webhookSecret` is not required when creating a GitHub App. diff --git a/packages/integration/config.d.ts b/packages/integration/config.d.ts index bd5267ab3d..8205e0c71e 100644 --- a/packages/integration/config.d.ts +++ b/packages/integration/config.d.ts @@ -239,7 +239,7 @@ export interface Config { * The secret used for webhooks * @visibility secret */ - webhookSecret: string; + webhookSecret?: string; /** * The client ID to use */ diff --git a/packages/integration/src/github/config.ts b/packages/integration/src/github/config.ts index 1ff4779be2..74a0267d62 100644 --- a/packages/integration/src/github/config.ts +++ b/packages/integration/src/github/config.ts @@ -92,7 +92,7 @@ export type GithubAppConfig = { /** * Webhook secret can be configured at https://github.com/organizations/$org/settings/apps/$AppName */ - webhookSecret: string; + webhookSecret?: string; /** * Found at https://github.com/organizations/$org/settings/apps/$AppName */ @@ -128,7 +128,7 @@ export function readGithubIntegrationConfig( appId: c.getNumber('appId'), clientId: c.getString('clientId'), clientSecret: c.getString('clientSecret'), - webhookSecret: c.getString('webhookSecret'), + webhookSecret: c.getOptionalString('webhookSecret'), privateKey: c.getString('privateKey'), allowedInstallationOwners: c.getOptionalStringArray( 'allowedInstallationOwners', From 64506f3e203d4bf65e5fa4948d4bce9028b06178 Mon Sep 17 00:00:00 2001 From: djamaile Date: Wed, 26 Mar 2025 11:35:27 +0100 Subject: [PATCH 087/119] chore: run api report Signed-off-by: djamaile --- packages/integration/report.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration/report.api.md b/packages/integration/report.api.md index c85db9306b..fc38853029 100644 --- a/packages/integration/report.api.md +++ b/packages/integration/report.api.md @@ -647,7 +647,7 @@ export type GiteaIntegrationConfig = { export type GithubAppConfig = { appId: number; privateKey: string; - webhookSecret: string; + webhookSecret?: string; clientId: string; clientSecret: string; allowedInstallationOwners?: string[]; From 146e41b9962fd86fef3e70b3f076d07f88f571bf Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Wed, 26 Mar 2025 11:36:05 +0100 Subject: [PATCH 088/119] fix(discovery): fix bug in event-based discovery that causes unnecessary API calls to Bitbucket Cloud Signed-off-by: Benjamin Janssens --- .changeset/tame-worms-do.md | 5 +++++ .../src/providers/BitbucketCloudEntityProvider.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/tame-worms-do.md diff --git a/.changeset/tame-worms-do.md b/.changeset/tame-worms-do.md new file mode 100644 index 0000000000..21872b9106 --- /dev/null +++ b/.changeset/tame-worms-do.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch +--- + +Fixed bug in event-based discovery that caused unnecessary API calls to Bitbucket Cloud diff --git a/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.ts b/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.ts index e4ba2f2dc0..5beb98ac08 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.ts +++ b/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.ts @@ -326,6 +326,8 @@ export class BitbucketCloudEntityProvider implements EntityProvider { const optRepoFilter = repoSlug ? ` repo:${repoSlug}` : ''; const query = `"${catalogFilename}" path:${catalogPath}${optRepoFilter}`; + if (repoSlug) return this.processQuery(workspace, query); + const projects = this.client .listProjectsByWorkspace(workspace) .iterateResults(); From 425df052b4a2d137177886ffef032e9dc4dd82c8 Mon Sep 17 00:00:00 2001 From: Benjamin Janssens Date: Wed, 26 Mar 2025 11:53:04 +0100 Subject: [PATCH 089/119] test(discovery): update tests Signed-off-by: Benjamin Janssens --- .../BitbucketCloudEntityProvider.test.ts | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.test.ts index 489578e853..5b2f9992c9 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-cloud/src/providers/BitbucketCloudEntityProvider.test.ts @@ -542,31 +542,11 @@ describe('BitbucketCloudEntityProvider', () => { })[0]; server.use( - rest.get( - `https://api.bitbucket.org/2.0/workspaces/test-ws/projects`, - (_req, res, ctx) => { - const response = { - values: [ - { - key: 'TEST', - }, - { - key: 'TEST2', - }, - ], - }; - return res(ctx.json(response)); - }, - ), rest.get( `https://api.bitbucket.org/2.0/workspaces/test-ws/search/code`, (req, res, ctx) => { const query = req.url.searchParams.get('search_query'); - if ( - !query || - !query.includes('repo:test-repo') || - !query.includes('project:TEST') - ) { + if (!query || !query.includes('repo:test-repo')) { return res(ctx.json({ values: [] })); } @@ -643,10 +623,6 @@ describe('BitbucketCloudEntityProvider', () => { entity: addedModule, locationKey: 'bitbucketCloud-provider:myProvider', }, - { - entity: addedModule, - locationKey: 'bitbucketCloud-provider:myProvider', - }, ]; const removedEntities = [ { From 552170ddad461854c5de9731720ac28b1cd98c3f Mon Sep 17 00:00:00 2001 From: Adam Kunicki Date: Wed, 26 Mar 2025 09:26:16 -0700 Subject: [PATCH 090/119] Add Slack Notification Processor Signed-off-by: Adam Kunicki --- .changeset/light-cameras-fold.md | 5 + docs/notifications/processors.md | 30 +- .../.eslintrc.js | 1 + .../README.md | 56 +++ .../catalog-info.yaml | 10 + .../config.d.ts | 28 ++ .../package.json | 61 +++ .../report.api.md | 20 + .../src/index.ts | 28 ++ .../lib/SlackNotificationProcessor.test.ts | 285 +++++++++++++ .../src/lib/SlackNotificationProcessor.ts | 285 +++++++++++++ .../src/lib/constants.ts | 33 ++ .../src/lib/index.ts | 18 + .../src/lib/types.ts | 20 + .../src/lib/util.ts | 92 ++++ .../src/module.ts | 58 +++ yarn.lock | 392 ++++++++++++++++-- 17 files changed, 1384 insertions(+), 38 deletions(-) create mode 100644 .changeset/light-cameras-fold.md create mode 100644 plugins/notifications-backend-module-slack/.eslintrc.js create mode 100644 plugins/notifications-backend-module-slack/README.md create mode 100644 plugins/notifications-backend-module-slack/catalog-info.yaml create mode 100644 plugins/notifications-backend-module-slack/config.d.ts create mode 100644 plugins/notifications-backend-module-slack/package.json create mode 100644 plugins/notifications-backend-module-slack/report.api.md create mode 100644 plugins/notifications-backend-module-slack/src/index.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/constants.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/index.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/types.ts create mode 100644 plugins/notifications-backend-module-slack/src/lib/util.ts create mode 100644 plugins/notifications-backend-module-slack/src/module.ts diff --git a/.changeset/light-cameras-fold.md b/.changeset/light-cameras-fold.md new file mode 100644 index 0000000000..8ec49c5d02 --- /dev/null +++ b/.changeset/light-cameras-fold.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications-backend-module-slack': minor +--- + +Added a new Slack NotificationProcessor for use with the notifications plugin diff --git a/docs/notifications/processors.md b/docs/notifications/processors.md index abee7c97c3..2d7de61ba0 100644 --- a/docs/notifications/processors.md +++ b/docs/notifications/processors.md @@ -104,4 +104,32 @@ Apart from STMP, the email processor also supports the following transmissions: - sendmail - stream (only for debugging purposes) -See more information at https://github.com/backstage/backstage/blob/master/plugins/notifications-backend-module-email/README.md +See more information at + +### Slack Processor + +Slack processor is used to send notifications to users and channels in Slack. To install the Slack processor, add the `@backstage/plugin-notifications-backend-module-slack` package to your backend. + +```bash +yarn workspace backend add @backstage/plugin-notifications-backend-module-slack +``` + +Add the Slack processor to your backend: + +```ts +import { createBackend } from '@backstage/plugin-notifications-backend'; +const backend = createBackend(); +// ... +backend.add(import('@backstage/plugin-notifications-backend-module-slack')); +``` + +To configure the Slack processor, you need to add the following configuration to your `app-config.yaml`: + +```yaml +notifications: + processors: + slack: + - token: xoxb-XXXXXXXXX +``` + +See more information including how to configure your Slack App at diff --git a/plugins/notifications-backend-module-slack/.eslintrc.js b/plugins/notifications-backend-module-slack/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/plugins/notifications-backend-module-slack/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/notifications-backend-module-slack/README.md b/plugins/notifications-backend-module-slack/README.md new file mode 100644 index 0000000000..e64bac868c --- /dev/null +++ b/plugins/notifications-backend-module-slack/README.md @@ -0,0 +1,56 @@ +# @backstage/plugin-notifications-backend-module-slack + +The Slack backend module for the notifications plugin. + +## Getting Started + +### Module Installation + +Add the module to your backend: + +```ts +// packages/backend/src/index.ts +backend.add(import('@backstage/plugin-notifications-backend-module-slack')); +``` + +### Slack Configuration + +To use this you'll need to create a Slack App or use an existing one. It should have at least the following scopes: +`chat:write`, `users:read`, `im:write` (for direct message support). + +Additionally you may include scopes `chat:write.public` in order to send messages to public channels your app is not +a member of. + +These scopes are under OAuth & Permissions. You will also want to save the Bot User OAuth Token. This will be needed +in the following step to configure `app-config.yaml`. + +### Configure Backstage + +You'll now need to configure the Slack module in your `app-config.yaml`. + +```yaml +notifications: + processors: + slack: + - token: xoxb-XXXXXXXXX +``` + +Multiple instances can be added in the `slack` array, allowing you to have multiple configurations if you need to send +messages to more than one Slack workspace. Org-Wide App installation is not currently supported. + +### Entity Requirements + +Entities must be annotated with one of the following annotations: + +- `slack.com/user-id` for direct messages +- `slack.com/channel-name` for public channel messages +- `slack.com/channel-id` for public or private channel messages + +Slack prefers use of ID over name and `slack.com/channel-id` is the recommended annotation. + +### Observability + +The processor includes the following counter metrics if you are exporting metrics using OpenTelemetry: + +- `notifications.processors.slack.sent.count` - The number of messages sent +- `notifications.processors.slack.error.count` - The number of messages that failed to send diff --git a/plugins/notifications-backend-module-slack/catalog-info.yaml b/plugins/notifications-backend-module-slack/catalog-info.yaml new file mode 100644 index 0000000000..327ae8239f --- /dev/null +++ b/plugins/notifications-backend-module-slack/catalog-info.yaml @@ -0,0 +1,10 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: backstage-plugin-notifications-backend-module-slack + title: '@backstage/plugin-notifications-backend-module-slack' + description: The slack backend module for the notifications plugin. +spec: + lifecycle: experimental + type: backstage-backend-plugin-module + owner: maintainers diff --git a/plugins/notifications-backend-module-slack/config.d.ts b/plugins/notifications-backend-module-slack/config.d.ts new file mode 100644 index 0000000000..f620f0e206 --- /dev/null +++ b/plugins/notifications-backend-module-slack/config.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface Config { + notifications?: { + processors?: { + slack?: Array<{ + /** + * Slack Bot Token. Usually starts with `xoxb-`. + * @visibility secret + */ + token?: string; + }>; + }; + }; +} diff --git a/plugins/notifications-backend-module-slack/package.json b/plugins/notifications-backend-module-slack/package.json new file mode 100644 index 0000000000..2bc7a8eb00 --- /dev/null +++ b/plugins/notifications-backend-module-slack/package.json @@ -0,0 +1,61 @@ +{ + "name": "@backstage/plugin-notifications-backend-module-slack", + "version": "0.0.0", + "description": "The slack backend module for the notifications plugin.", + "backstage": { + "role": "backend-plugin-module", + "pluginId": "notifications", + "pluginPackage": "@backstage/plugin-notifications-backend" + }, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts" + }, + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "plugins/notifications-backend-module-slack" + }, + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist", + "config.d.ts" + ], + "scripts": { + "build": "backstage-cli package build", + "clean": "backstage-cli package clean", + "lint": "backstage-cli package lint", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" + }, + "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", + "@backstage/catalog-client": "workspace:^", + "@backstage/catalog-model": "workspace:^", + "@backstage/config": "workspace:^", + "@backstage/errors": "workspace:^", + "@backstage/plugin-notifications-common": "workspace:^", + "@backstage/plugin-notifications-node": "workspace:^", + "@backstage/types": "workspace:^", + "@opentelemetry/api": "^1.9.0", + "@slack/bolt": "^3.21.4", + "@slack/types": "^2.14.0", + "@slack/web-api": "^7.5.0", + "dataloader": "2.2.2", + "p-throttle": "4.1.1" + }, + "devDependencies": { + "@backstage/backend-test-utils": "workspace:^", + "@backstage/cli": "workspace:^", + "@backstage/plugin-catalog-node": "workspace:^", + "@backstage/test-utils": "workspace:^", + "@faker-js/faker": "^8.4.1", + "msw": "^2.2.14" + }, + "configSchema": "config.d.ts" +} diff --git a/plugins/notifications-backend-module-slack/report.api.md b/plugins/notifications-backend-module-slack/report.api.md new file mode 100644 index 0000000000..dfd2460e91 --- /dev/null +++ b/plugins/notifications-backend-module-slack/report.api.md @@ -0,0 +1,20 @@ +## API Report File for "@backstage/plugin-notifications-backend-module-slack" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; + +// @public +export const ANNOTATION_SLACK_CHANNEL_ID = 'slack.com/channel-id'; + +// @public +export const ANNOTATION_SLACK_CHANNEL_NAME = 'slack.com/channel-name'; + +// @public +export const ANNOTATION_SLACK_USER_ID = 'slack.com/user-id'; + +// @public +const notificationsModuleSlack: BackendFeature; +export default notificationsModuleSlack; +``` diff --git a/plugins/notifications-backend-module-slack/src/index.ts b/plugins/notifications-backend-module-slack/src/index.ts new file mode 100644 index 0000000000..14cde37d13 --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/index.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The slack backend module for the notifications plugin. + * + * @packageDocumentation + */ + +export { + ANNOTATION_SLACK_CHANNEL_ID, + ANNOTATION_SLACK_CHANNEL_NAME, + ANNOTATION_SLACK_USER_ID, +} from './lib'; +export { notificationsModuleSlack as default } from './module'; diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts new file mode 100644 index 0000000000..5396a71736 --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts @@ -0,0 +1,285 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { mockServices } from '@backstage/backend-test-utils'; +import { SlackNotificationProcessor } from './SlackNotificationProcessor'; +import { catalogServiceMock } from '@backstage/plugin-catalog-node/testUtils'; +import { WebClient } from '@slack/web-api'; +import { Entity } from '@backstage/catalog-model'; + +jest.mock('@slack/web-api', () => { + const mockSlack = { + chat: { + postMessage: jest.fn(() => ({ + ok: true, + ts: '1234567890.123456', + channel: 'C12345678', + })), + }, + conversations: { + list: jest.fn(() => ({ + ok: true, + channels: [{ id: 'C12345678', name: 'test' }], + })), + }, + users: { + list: jest.fn(() => ({ + ok: true, + members: [ + { + id: 'U12345678', + name: 'test', + profile: { email: 'test@example.com' }, + real_name: 'Test User', + is_bot: false, + is_app_user: false, + deleted: false, + }, + ], + })), + }, + }; + return { WebClient: jest.fn(() => mockSlack) }; +}); + +const DEFAULT_ENTITIES_RESPONSE = { + items: [ + { + kind: 'User', + metadata: { + name: 'mock', + namespace: 'default', + annotations: { + 'slack.com/user-id': 'U12345678', + }, + }, + spec: { + type: 'service', + owner: 'group:default/mock', + }, + } as unknown as Entity, + { + kind: 'Group', + metadata: { + name: 'mock', + namespace: 'default', + annotations: { + 'slack.com/channel-id': 'C12345678', + }, + }, + } as unknown as Entity, + ], +}; + +describe('SlackNotificationProcessor', () => { + const logger = mockServices.logger.mock(); + const auth = mockServices.auth(); + const discovery = mockServices.discovery(); + const config = mockServices.rootConfig({ + data: { + app: { + baseUrl: 'https://example.org', + }, + notifications: { + processors: { + slack: [ + { + token: 'mock-token', + }, + ], + }, + }, + }, + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should send a notification to a group', async () => { + const slack = new WebClient(); + + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + await processor.processOptions({ + recipients: { type: 'entity', entityRef: 'group:default/mock' }, + payload: { title: 'notification' }, + }); + + expect(slack.chat.postMessage).toHaveBeenCalledWith({ + channel: 'C12345678', + text: 'notification', + attachments: [ + { + color: '#00A699', + blocks: [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: 'No description provided', + }, + accessory: { + type: 'button', + text: { + type: 'plain_text', + text: 'View More', + }, + url: '', + action_id: 'button-action', + }, + }, + { + type: 'context', + elements: [ + { + type: 'plain_text', + text: 'Severity: normal', + emoji: true, + }, + { + type: 'plain_text', + text: 'Topic: N/A', + emoji: true, + }, + ], + }, + ], + fallback: 'notification', + }, + ], + }); + }); + + it('should send a notification to a user', async () => { + const slack = new WebClient(); + + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + await processor.postProcess( + { + origin: 'plugin', + id: '1234', + user: 'user:default/mock', + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, + }, + { + recipients: { type: 'entity', entityRef: 'user:default/mock' }, + payload: { title: 'notification' }, + }, + ); + + expect(slack.chat.postMessage).toHaveBeenCalledWith({ + channel: 'U12345678', + text: 'notification', + attachments: [ + { + color: '#00A699', + blocks: [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: 'No description provided', + }, + accessory: { + type: 'button', + text: { + type: 'plain_text', + text: 'View More', + }, + url: '', + action_id: 'button-action', + }, + }, + { + type: 'context', + elements: [ + { + type: 'plain_text', + text: 'Severity: normal', + emoji: true, + }, + { + type: 'plain_text', + text: 'Topic: N/A', + emoji: true, + }, + ], + }, + ], + fallback: 'notification', + }, + ], + }); + }); + it('should not send broadcast messages', async () => { + const slack = new WebClient(); + + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + processor.processOptions({ + recipients: { type: 'broadcast' }, + payload: { title: 'notification' }, + }); + processor.postProcess( + { + origin: 'plugin', + id: '1234', + user: null, + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, + }, + { + recipients: { type: 'broadcast' }, + payload: { title: 'notification' }, + }, + ); + + expect(slack.chat.postMessage).not.toHaveBeenCalled(); + }); +}); diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts new file mode 100644 index 0000000000..225f2f20ae --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts @@ -0,0 +1,285 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + AuthService, + DiscoveryService, + LoggerService, +} from '@backstage/backend-plugin-api'; +import { CatalogApi } from '@backstage/catalog-client'; +import { Entity, parseEntityRef } from '@backstage/catalog-model'; +import { Config } from '@backstage/config'; +import { NotFoundError } from '@backstage/errors'; +import { Notification } from '@backstage/plugin-notifications-common'; +import { + NotificationProcessor, + NotificationSendOptions, +} from '@backstage/plugin-notifications-node'; +import { durationToMilliseconds } from '@backstage/types'; +import { Counter, metrics } from '@opentelemetry/api'; +import { ChatPostMessageArguments, WebClient } from '@slack/web-api'; +import DataLoader from 'dataloader'; +import pThrottle from 'p-throttle'; +import { + ANNOTATION_SLACK_CHANNEL_ID, + ANNOTATION_SLACK_CHANNEL_NAME, + ANNOTATION_SLACK_USER_ID, +} from './constants'; +import { toChatPostMessageArgs } from './util'; + +export class SlackNotificationProcessor implements NotificationProcessor { + private readonly logger: LoggerService; + private readonly catalog: CatalogApi; + private readonly auth: AuthService; + private readonly slack: WebClient; + private readonly sendNotifications; + private readonly messagesSent: Counter; + private readonly messagesFailed: Counter; + + static fromConfig( + config: Config, + options: { + auth: AuthService; + discovery: DiscoveryService; + logger: LoggerService; + catalog: CatalogApi; + slack?: WebClient; + }, + ): SlackNotificationProcessor[] { + const slackConfig = + config.getOptionalConfigArray('notifications.processors.slack') ?? []; + return slackConfig.map(c => { + const token = c.getString('token'); + const slack = options.slack ?? new WebClient(token); + return new SlackNotificationProcessor({ + slack, + ...options, + }); + }); + } + + private constructor(options: { + slack: WebClient; + auth: AuthService; + discovery: DiscoveryService; + logger: LoggerService; + catalog: CatalogApi; + }) { + const { auth, catalog, logger, slack } = options; + this.logger = logger; + this.catalog = catalog; + this.auth = auth; + this.slack = slack; + + const meter = metrics.getMeter('default'); + this.messagesSent = meter.createCounter( + 'notifications.processors.slack.sent.count', + { + description: 'Number of messages sent to Slack successfully', + }, + ); + this.messagesFailed = meter.createCounter( + 'notifications.processors.slack.error.count', + { + description: 'Number of messages that failed to send to Slack', + }, + ); + + const throttle = pThrottle({ + limit: 10, + interval: durationToMilliseconds({ minutes: 1 }), + }); + const throttled = throttle((opts: ChatPostMessageArguments) => + this.sendNotification(opts), + ); + this.sendNotifications = async (opts: ChatPostMessageArguments[]) => { + const results = await Promise.allSettled( + opts.map(message => throttled(message)), + ); + + let successCount = 0; + let failureCount = 0; + + results.forEach(result => { + if (result.status === 'fulfilled') { + successCount++; + } else { + this.logger.error( + `Failed to send Slack channel notification: ${result.reason.message}`, + ); + failureCount++; + } + }); + + this.messagesSent.add(successCount); + this.messagesFailed.add(failureCount); + }; + } + + getName(): string { + return 'SlackNotificationProcessor'; + } + + async processOptions( + options: NotificationSendOptions, + ): Promise { + if (options.recipients.type !== 'entity') { + return options; + } + + const entityRefs = [options.recipients.entityRef].flat(); + + const outbound: ChatPostMessageArguments[] = []; + await Promise.all( + entityRefs.map(async entityRef => { + const compoundEntityRef = parseEntityRef(entityRef); + // skip users as they are sent direct messages, but allow all other entity kinds + // to have a channel id annotation. + if (compoundEntityRef.kind === 'user') { + return; + } + + let channel; + try { + channel = await this.getChannelId(entityRef); + } catch (error) { + this.logger.error( + `Failed to get Slack channel for entity: ${ + (error as Error).message + }`, + ); + return; + } + + if (!channel) { + this.logger.debug(`No Slack channel found for entity: ${entityRef}`); + return; + } + + this.logger.debug( + `Sending notification with payload: ${JSON.stringify( + options.payload, + )}`, + ); + + const payload = toChatPostMessageArgs({ + channel, + payload: options.payload, + }); + + this.logger.debug( + `Sending Slack channel notification: ${JSON.stringify(payload)}`, + ); + outbound.push(payload); + }), + ); + + console.log('dispatching message'); + await this.sendNotifications(outbound); + + return options; + } + + async postProcess( + notification: Notification, + options: NotificationSendOptions, + ): Promise { + if (options.recipients.type === 'broadcast' || !notification.user) { + return; + } + + const entityRefs = [options.recipients.entityRef].flat(); + if (entityRefs.some(e => parseEntityRef(e).kind === 'group')) { + // We've already dispatched a slack channel message, so let's not send a DM. + return; + } + + const destination = await this.getSlackUserId(notification.user); + if (!destination) { + this.logger.error(`No email found for user entity: ${notification.user}`); + return; + } + + const payload = toChatPostMessageArgs({ + channel: destination, + payload: options.payload, + }); + + this.logger.debug(`Sending DM notification: ${JSON.stringify(payload)}`); + + // batch it up + await this.sendNotifications([payload]); + } + + async getEntities( + entityRefs: readonly string[], + ): Promise<(Entity | undefined)[]> { + const { token } = await this.auth.getPluginRequestToken({ + onBehalfOf: await this.auth.getOwnServiceCredentials(), + targetPluginId: 'catalog', + }); + + const response = await this.catalog.getEntitiesByRefs( + { + entityRefs: entityRefs.slice(), + fields: [ + `metadata.annotations.${ANNOTATION_SLACK_CHANNEL_NAME}`, + `metadata.annotations.${ANNOTATION_SLACK_CHANNEL_ID}`, + `metadata.annotations.${ANNOTATION_SLACK_USER_ID}`, + ], + }, + { + token, + }, + ); + + return response.items; + } + + async getSlackUserId(entityRef: string): Promise { + const entityLoader = new DataLoader( + entityRefs => this.getEntities(entityRefs), + ); + const entity = await entityLoader.load(entityRef); + + return entity?.metadata?.annotations?.[ANNOTATION_SLACK_USER_ID]; + } + + async getChannelId(entityRef: string): Promise { + const entityLoader = new DataLoader( + entityRefs => this.getEntities(entityRefs), + ); + const entity = await entityLoader.load(entityRef); + + if (!entity) { + console.log(`Entity not found: ${entityRef}`); + throw new NotFoundError(`Entity not found: ${entityRef}`); + } + + return ( + entity?.metadata?.annotations?.[ANNOTATION_SLACK_CHANNEL_ID] || + entity?.metadata?.annotations?.[ANNOTATION_SLACK_CHANNEL_NAME] + ); + } + + async sendNotification(args: ChatPostMessageArguments): Promise { + const response = await this.slack.chat.postMessage(args); + + if (!response.ok) { + throw new Error(`Failed to send notification: ${response.error}`); + } + } +} diff --git a/plugins/notifications-backend-module-slack/src/lib/constants.ts b/plugins/notifications-backend-module-slack/src/lib/constants.ts new file mode 100644 index 0000000000..24c1868d55 --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/constants.ts @@ -0,0 +1,33 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @public + * The annotation key for the entity's Slack user ID + */ +export const ANNOTATION_SLACK_USER_ID = 'slack.com/user-id'; + +/** + * @public + * The annotation key for the entity's Slack channel name. + */ +export const ANNOTATION_SLACK_CHANNEL_NAME = 'slack.com/channel-name'; + +/** + * @public + * The annotation key for the entity's Slack channel ID. + */ +export const ANNOTATION_SLACK_CHANNEL_ID = 'slack.com/channel-id'; diff --git a/plugins/notifications-backend-module-slack/src/lib/index.ts b/plugins/notifications-backend-module-slack/src/lib/index.ts new file mode 100644 index 0000000000..97835063b3 --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { SlackNotificationProcessor } from './SlackNotificationProcessor'; +export * from './constants'; diff --git a/plugins/notifications-backend-module-slack/src/lib/types.ts b/plugins/notifications-backend-module-slack/src/lib/types.ts new file mode 100644 index 0000000000..bd87e9656c --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/types.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface SlackNotificationOptions { + url: string; + payload: string; +} diff --git a/plugins/notifications-backend-module-slack/src/lib/util.ts b/plugins/notifications-backend-module-slack/src/lib/util.ts new file mode 100644 index 0000000000..e39701d88a --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/lib/util.ts @@ -0,0 +1,92 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + NotificationPayload, + NotificationSeverity, +} from '@backstage/plugin-notifications-common'; +import { ChatPostMessageArguments, KnownBlock } from '@slack/web-api'; + +export function toChatPostMessageArgs(options: { + channel: string; + payload: NotificationPayload; +}): ChatPostMessageArguments { + const { channel, payload } = options; + + const args: ChatPostMessageArguments = { + channel, + text: payload.title, + attachments: [ + { + color: getColor(payload.severity), + blocks: toSlackBlockKit(payload), + fallback: payload.title, + }, + ], + }; + + return args; +} + +export function toSlackBlockKit(payload: NotificationPayload): KnownBlock[] { + const { description, link, severity, topic } = payload; + return [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: description ?? 'No description provided', + }, + accessory: { + type: 'button', + text: { + type: 'plain_text', + text: 'View More', + }, + url: link ?? '', + action_id: 'button-action', + }, + }, + { + type: 'context', + elements: [ + { + type: 'plain_text', + text: `Severity: ${severity ?? 'normal'}`, + emoji: true, + }, + { + type: 'plain_text', + text: `Topic: ${topic ?? 'N/A'}`, + emoji: true, + }, + ], + }, + ]; +} + +function getColor(severity: NotificationSeverity | undefined) { + switch (severity) { + case 'critical': + return '#FF0000'; // Red + case 'high': + return '#FFA500'; // Orange + case 'low': + case 'normal': + default: + return '#00A699'; // Neutral color + } +} diff --git a/plugins/notifications-backend-module-slack/src/module.ts b/plugins/notifications-backend-module-slack/src/module.ts new file mode 100644 index 0000000000..cb096dabba --- /dev/null +++ b/plugins/notifications-backend-module-slack/src/module.ts @@ -0,0 +1,58 @@ +/* + * Copyright 2025 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { CatalogClient } from '@backstage/catalog-client'; +import { notificationsProcessingExtensionPoint } from '@backstage/plugin-notifications-node'; +import { SlackNotificationProcessor } from './lib/SlackNotificationProcessor'; + +/** + * The Slack notification processor for use with the notifications plugin. + * This allows sending of notifications via Slack DMs or to channels. + * + * @public + */ +export const notificationsModuleSlack = createBackendModule({ + pluginId: 'notifications', + moduleId: 'slack', + register(reg) { + reg.registerInit({ + deps: { + auth: coreServices.auth, + config: coreServices.rootConfig, + discovery: coreServices.discovery, + logger: coreServices.logger, + notifications: notificationsProcessingExtensionPoint, + }, + async init({ auth, config, discovery, logger, notifications }) { + const catalogClient = new CatalogClient({ + discoveryApi: discovery, + }); + + notifications.addProcessor( + SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogClient, + }), + ); + }, + }); + }, +}); diff --git a/yarn.lock b/yarn.lock index 648c69d5cc..0881f8546f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6779,6 +6779,33 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-notifications-backend-module-slack@workspace:plugins/notifications-backend-module-slack": + version: 0.0.0-use.local + resolution: "@backstage/plugin-notifications-backend-module-slack@workspace:plugins/notifications-backend-module-slack" + dependencies: + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-test-utils": "workspace:^" + "@backstage/catalog-client": "workspace:^" + "@backstage/catalog-model": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/config": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/plugin-catalog-node": "workspace:^" + "@backstage/plugin-notifications-common": "workspace:^" + "@backstage/plugin-notifications-node": "workspace:^" + "@backstage/test-utils": "workspace:^" + "@backstage/types": "workspace:^" + "@faker-js/faker": ^8.4.1 + "@opentelemetry/api": ^1.9.0 + "@slack/bolt": ^3.21.4 + "@slack/types": ^2.14.0 + "@slack/web-api": ^7.5.0 + dataloader: 2.2.2 + msw: ^2.2.14 + p-throttle: 4.1.1 + languageName: unknown + linkType: soft + "@backstage/plugin-notifications-backend@workspace:^, @backstage/plugin-notifications-backend@workspace:plugins/notifications-backend": version: 0.0.0-use.local resolution: "@backstage/plugin-notifications-backend@workspace:plugins/notifications-backend" @@ -9644,6 +9671,13 @@ __metadata: languageName: node linkType: hard +"@faker-js/faker@npm:^8.4.1": + version: 8.4.1 + resolution: "@faker-js/faker@npm:8.4.1" + checksum: d802d531f8929562715adc279cfec763c9a4bc596ec67b0ce43fd0ae61b285d2b0eec6f1f4aa852452a63721a842fe7e81926dce7bd92acca94b01e2a1f55f5a + languageName: node + linkType: hard + "@fastify/busboy@npm:^2.0.0": version: 2.1.1 resolution: "@fastify/busboy@npm:2.1.1" @@ -16403,6 +16437,121 @@ __metadata: languageName: node linkType: hard +"@slack/bolt@npm:^3.21.4": + version: 3.22.0 + resolution: "@slack/bolt@npm:3.22.0" + dependencies: + "@slack/logger": ^4.0.0 + "@slack/oauth": ^2.6.3 + "@slack/socket-mode": ^1.3.6 + "@slack/types": ^2.13.0 + "@slack/web-api": ^6.13.0 + "@types/express": ^4.16.1 + "@types/promise.allsettled": ^1.0.3 + "@types/tsscmp": ^1.0.0 + axios: ^1.7.4 + express: ^4.21.0 + path-to-regexp: ^8.1.0 + promise.allsettled: ^1.0.2 + raw-body: ^2.3.3 + tsscmp: ^1.0.6 + checksum: edd5c7cf658808effde87c936f19a0cc2b7d49ac97471651f2b1bb3db0074b92dc8ad3c9657577105d93c48df9ba16c382902c0d90082854cbbe86bfc7753827 + languageName: node + linkType: hard + +"@slack/logger@npm:^3.0.0": + version: 3.0.0 + resolution: "@slack/logger@npm:3.0.0" + dependencies: + "@types/node": ">=12.0.0" + checksum: 6512d0e9e4be47ea465705ab9b6e6901f36fa981da0d4a657fde649d452b567b351002049b5ee0a22569b5119bf6c2f61befd5b8022d878addb7a99c91b03389 + languageName: node + linkType: hard + +"@slack/logger@npm:^4.0.0": + version: 4.0.0 + resolution: "@slack/logger@npm:4.0.0" + dependencies: + "@types/node": ">=18.0.0" + checksum: dc79e9d2032c4bf9ce01d96cc72882f003dd376d036f172d4169662cfc2c9b384a80d5546b06021578dd473e7059f064303f0ba851eeb153387f2081a1e3062e + languageName: node + linkType: hard + +"@slack/oauth@npm:^2.6.3": + version: 2.6.3 + resolution: "@slack/oauth@npm:2.6.3" + dependencies: + "@slack/logger": ^3.0.0 + "@slack/web-api": ^6.12.1 + "@types/jsonwebtoken": ^8.3.7 + "@types/node": ">=12" + jsonwebtoken: ^9.0.0 + lodash.isstring: ^4.0.1 + checksum: 6b556da01bd2b026177b4074cd44bdeff00165fb4297ef8f350035ca79ababfff0c0993a297a46ab742bb97469c6c1c8f5790c328ecf6370290fe31014ba3c5e + languageName: node + linkType: hard + +"@slack/socket-mode@npm:^1.3.6": + version: 1.3.6 + resolution: "@slack/socket-mode@npm:1.3.6" + dependencies: + "@slack/logger": ^3.0.0 + "@slack/web-api": ^6.12.1 + "@types/node": ">=12.0.0" + "@types/ws": ^7.4.7 + eventemitter3: ^5 + finity: ^0.5.4 + ws: ^7.5.3 + checksum: a84c15a6d25a21f76258d1ccebeec1d78b0a0dac0b02ffdfcb3596e7acda5459e4b99a42207eab7e57bed7a2a1d85ac173adf5e07aa66949eac9cc9df3b43947 + languageName: node + linkType: hard + +"@slack/types@npm:^2.11.0, @slack/types@npm:^2.13.0, @slack/types@npm:^2.14.0, @slack/types@npm:^2.9.0": + version: 2.14.0 + resolution: "@slack/types@npm:2.14.0" + checksum: fbef74d50d0de8f16125f7178bd2e664a69eeefd827b09c6f78153957278fc4400049685c756076e7dbcabd04c22730ac783bcc5d36fd588c7749d35f02c2afd + languageName: node + linkType: hard + +"@slack/web-api@npm:^6.12.1, @slack/web-api@npm:^6.13.0": + version: 6.13.0 + resolution: "@slack/web-api@npm:6.13.0" + dependencies: + "@slack/logger": ^3.0.0 + "@slack/types": ^2.11.0 + "@types/is-stream": ^1.1.0 + "@types/node": ">=12.0.0" + axios: ^1.7.4 + eventemitter3: ^3.1.0 + form-data: ^2.5.0 + is-electron: 2.2.2 + is-stream: ^1.1.0 + p-queue: ^6.6.1 + p-retry: ^4.0.0 + checksum: 77f0d506bbb011ae43d322e5152e8b1ec2b88aa01256da6b3c9ff8ce106d2284f887cad2d9f044e0fe34dc865d60f2bce1c6bb5c4117150ff71a7ef341f5dfeb + languageName: node + linkType: hard + +"@slack/web-api@npm:^7.5.0": + version: 7.8.0 + resolution: "@slack/web-api@npm:7.8.0" + dependencies: + "@slack/logger": ^4.0.0 + "@slack/types": ^2.9.0 + "@types/node": ">=18.0.0" + "@types/retry": 0.12.0 + axios: ^1.7.8 + eventemitter3: ^5.0.1 + form-data: ^4.0.0 + is-electron: 2.2.2 + is-stream: ^2 + p-queue: ^6 + p-retry: ^4 + retry: ^0.13.1 + checksum: d76fcb6cfe8a8ebdaf71aaee7dfef54f3ce4fb5958f9f841bcba095097349f649c47e5e79adbaabbd4051fe0c8d6d96445adeeab3d67416c161ae20868f637f0 + languageName: node + linkType: hard + "@smithy/abort-controller@npm:^3.1.2, @smithy/abort-controller@npm:^3.1.9": version: 3.1.9 resolution: "@smithy/abort-controller@npm:3.1.9" @@ -19452,7 +19601,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:*, @types/express@npm:^4.17.21, @types/express@npm:^4.17.6": +"@types/express@npm:*, @types/express@npm:^4.16.1, @types/express@npm:^4.17.21, @types/express@npm:^4.17.6": version: 4.17.21 resolution: "@types/express@npm:4.17.21" dependencies: @@ -19614,6 +19763,15 @@ __metadata: languageName: node linkType: hard +"@types/is-stream@npm:^1.1.0": + version: 1.1.0 + resolution: "@types/is-stream@npm:1.1.0" + dependencies: + "@types/node": "*" + checksum: 23fcb06cd8adc0124d4c44071bd4b447c41f5e4c2eccb6166789c7fc0992b566e2e8b628a3800ff4472b686d9085adbec203925068bf72e350e085650e83adec + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.1 resolution: "@types/istanbul-lib-coverage@npm:2.0.1" @@ -19732,6 +19890,15 @@ __metadata: languageName: node linkType: hard +"@types/jsonwebtoken@npm:^8.3.7": + version: 8.5.9 + resolution: "@types/jsonwebtoken@npm:8.5.9" + dependencies: + "@types/node": "*" + checksum: 33815ab02d1371b423118316b7706d2f2ec03eeee5e1494be72da50425d2384e5e0a09ea193f7a5ab4b4f6a9c5847147305f50e965f3d927a95bdf8adb471b2a + languageName: node + linkType: hard + "@types/jsonwebtoken@npm:^9.0.0": version: 9.0.0 resolution: "@types/jsonwebtoken@npm:9.0.0" @@ -19940,7 +20107,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^22.0.0": +"@types/node@npm:*, @types/node@npm:>=12, @types/node@npm:>=12.0.0, @types/node@npm:>=13.7.0, @types/node@npm:>=18.0.0, @types/node@npm:^22.0.0": version: 22.13.10 resolution: "@types/node@npm:22.13.10" dependencies: @@ -20167,6 +20334,13 @@ __metadata: languageName: node linkType: hard +"@types/promise.allsettled@npm:^1.0.3": + version: 1.0.6 + resolution: "@types/promise.allsettled@npm:1.0.6" + checksum: 07dca8da25b49c0dc323201095552d86159483dc910dc61c345357c9c196b8498e6be4bf260cc2a9a539a725108df61b53db1d82723ed9886bb7c72fedd65f14 + languageName: node + linkType: hard + "@types/prop-types@npm:*, @types/prop-types@npm:^15.0.0, @types/prop-types@npm:^15.7.12, @types/prop-types@npm:^15.7.3": version: 15.7.14 resolution: "@types/prop-types@npm:15.7.14" @@ -20371,6 +20545,13 @@ __metadata: languageName: node linkType: hard +"@types/retry@npm:0.12.0": + version: 0.12.0 + resolution: "@types/retry@npm:0.12.0" + checksum: 61a072c7639f6e8126588bf1eb1ce8835f2cb9c2aba795c4491cf6310e013267b0c8488039857c261c387e9728c1b43205099223f160bb6a76b4374f741b5603 + languageName: node + linkType: hard + "@types/retry@npm:0.12.2": version: 0.12.2 resolution: "@types/retry@npm:0.12.2" @@ -20666,6 +20847,13 @@ __metadata: languageName: node linkType: hard +"@types/tsscmp@npm:^1.0.0": + version: 1.0.2 + resolution: "@types/tsscmp@npm:1.0.2" + checksum: c02c0bb9f14f550947fea9fa6f9f3c28e6b2d47a6d049a5450ed466fb0c8a685b6ff37d070d4c43d930a5affc9d828f5e16e35cde1e734de228ffd2df76ac2a8 + languageName: node + linkType: hard + "@types/unist@npm:*, @types/unist@npm:^2.0.0": version: 2.0.6 resolution: "@types/unist@npm:2.0.6" @@ -20742,6 +20930,15 @@ __metadata: languageName: node linkType: hard +"@types/ws@npm:^7.4.7": + version: 7.4.7 + resolution: "@types/ws@npm:7.4.7" + dependencies: + "@types/node": "*" + checksum: b4c9b8ad209620c9b21e78314ce4ff07515c0cadab9af101c1651e7bfb992d7fd933bd8b9c99d110738fd6db523ed15f82f29f50b45510288da72e964dedb1a3 + languageName: node + linkType: hard + "@types/xml-encryption@npm:^1.2.4": version: 1.2.4 resolution: "@types/xml-encryption@npm:1.2.4" @@ -22947,6 +23144,21 @@ __metadata: languageName: node linkType: hard +"array.prototype.map@npm:^1.0.5": + version: 1.0.8 + resolution: "array.prototype.map@npm:1.0.8" + dependencies: + call-bind: ^1.0.8 + call-bound: ^1.0.3 + define-properties: ^1.2.1 + es-abstract: ^1.23.6 + es-array-method-boxes-properly: ^1.0.0 + es-object-atoms: ^1.0.0 + is-string: ^1.1.1 + checksum: df321613636ec8461965d72421569ece78f269460535ced5ec88db9aaa4fc58a9f26e597d72e726f105c55fa4b4b6db0d3156489dc13dfbc7a098b4f1d17b5ab + languageName: node + linkType: hard + "array.prototype.tosorted@npm:^1.1.4": version: 1.1.4 resolution: "array.prototype.tosorted@npm:1.1.4" @@ -23301,7 +23513,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.0.0, axios@npm:^1.6.0, axios@npm:^1.7.4, axios@npm:^1.7.7": +"axios@npm:^1.0.0, axios@npm:^1.6.0, axios@npm:^1.7.4, axios@npm:^1.7.7, axios@npm:^1.7.8": version: 1.8.4 resolution: "axios@npm:1.8.4" dependencies: @@ -24345,13 +24557,13 @@ __metadata: languageName: node linkType: hard -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" +"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind-apply-helpers@npm:1.0.2" dependencies: es-errors: ^1.3.0 function-bind: ^1.1.2 - checksum: 3c55343261bb387c58a4762d15ad9d42053659a62681ec5eb50690c6b52a4a666302a01d557133ce6533e8bd04530ee3b209f23dd06c9577a1925556f8fcccdf + checksum: b2863d74fcf2a6948221f65d95b91b4b2d90cfe8927650b506141e669f7d5de65cea191bf788838bc40d13846b7886c5bc5c84ab96c3adbcf88ad69a72fcdc6b languageName: node linkType: hard @@ -26420,6 +26632,13 @@ __metadata: languageName: node linkType: hard +"dataloader@npm:2.2.2": + version: 2.2.2 + resolution: "dataloader@npm:2.2.2" + checksum: 4dabd247089c29f194e94d5434d504f99156c5c214a03463c20f3f17f40398d7e179edee69a27c16e315519ac8739042a810090087ae26449a0e685156a02c65 + languageName: node + linkType: hard + "dataloader@npm:^2.0.0, dataloader@npm:^2.2.2": version: 2.2.3 resolution: "dataloader@npm:2.2.3" @@ -27649,6 +27868,13 @@ __metadata: languageName: node linkType: hard +"es-array-method-boxes-properly@npm:^1.0.0": + version: 1.0.0 + resolution: "es-array-method-boxes-properly@npm:1.0.0" + checksum: 2537fcd1cecf187083890bc6f5236d3a26bf39237433587e5bf63392e88faae929dbba78ff0120681a3f6f81c23fe3816122982c160d63b38c95c830b633b826 + languageName: node + linkType: hard + "es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": version: 1.0.1 resolution: "es-define-property@npm:1.0.1" @@ -27663,6 +27889,23 @@ __metadata: languageName: node linkType: hard +"es-get-iterator@npm:^1.0.2": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + has-symbols: ^1.0.3 + is-arguments: ^1.1.1 + is-map: ^2.0.2 + is-set: ^2.0.2 + is-string: ^1.0.7 + isarray: ^2.0.5 + stop-iteration-iterator: ^1.0.0 + checksum: 8fa118da42667a01a7c7529f8a8cca514feeff243feec1ce0bb73baaa3514560bd09d2b3438873cf8a5aaec5d52da248131de153b28e2638a061b6e4df13267d + languageName: node + linkType: hard + "es-iterator-helpers@npm:^1.2.1": version: 1.2.1 resolution: "es-iterator-helpers@npm:1.2.1" @@ -27694,12 +27937,12 @@ __metadata: languageName: node linkType: hard -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" +"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": + version: 1.1.1 + resolution: "es-object-atoms@npm:1.1.1" dependencies: es-errors: ^1.3.0 - checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c + checksum: 214d3767287b12f36d3d7267ef342bbbe1e89f899cfd67040309fc65032372a8e60201410a99a1645f2f90c1912c8c49c8668066f6bdd954bcd614dda2e3da97 languageName: node linkType: hard @@ -28540,7 +28783,7 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:^5.0.1": +"eventemitter3@npm:^5, eventemitter3@npm:^5.0.1": version: 5.0.1 resolution: "eventemitter3@npm:5.0.1" checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8 @@ -28985,7 +29228,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.14.0, express@npm:^4.17.1, express@npm:^4.18.1, express@npm:^4.18.2, express@npm:^4.19.2, express@npm:^4.21.2": +"express@npm:^4.14.0, express@npm:^4.17.1, express@npm:^4.18.1, express@npm:^4.18.2, express@npm:^4.19.2, express@npm:^4.21.0, express@npm:^4.21.2": version: 4.21.2 resolution: "express@npm:4.21.2" dependencies: @@ -29546,6 +29789,13 @@ __metadata: languageName: node linkType: hard +"finity@npm:^0.5.4": + version: 0.5.4 + resolution: "finity@npm:0.5.4" + checksum: eeea74de356ba963231108c3f8e2de44b4114497389121d603f8c3e8316b8d0772ff06b731af08ef5d6ca6b0e3a0fffab452122eca48837a98a2f7e5548b6be2 + languageName: node + linkType: hard + "first-chunk-stream@npm:^2.0.0": version: 2.0.0 resolution: "first-chunk-stream@npm:2.0.0" @@ -30132,21 +30382,21 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6": - version: 1.2.6 - resolution: "get-intrinsic@npm:1.2.6" +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6": + version: 1.3.0 + resolution: "get-intrinsic@npm:1.3.0" dependencies: - call-bind-apply-helpers: ^1.0.1 - dunder-proto: ^1.0.0 + call-bind-apply-helpers: ^1.0.2 es-define-property: ^1.0.1 es-errors: ^1.3.0 - es-object-atoms: ^1.0.0 + es-object-atoms: ^1.1.1 function-bind: ^1.1.2 + get-proto: ^1.0.1 gopd: ^1.2.0 has-symbols: ^1.1.0 hasown: ^2.0.2 - math-intrinsics: ^1.0.0 - checksum: a7592a0b7f023a2e83c0121fa9449ca83780e370a5feeebe8452119474d148016e43b455049134ae7a683b9b11b93d3f65eac199a0ad452ab740d5f0c299de47 + math-intrinsics: ^1.1.0 + checksum: 301008e4482bb9a9cb49e132b88fee093bff373b4e6def8ba219b1e96b60158a6084f273ef5cafe832e42cd93462f4accb46a618d35fe59a2b507f2388c5b79d languageName: node linkType: hard @@ -30171,6 +30421,16 @@ __metadata: languageName: node linkType: hard +"get-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "get-proto@npm:1.0.1" + dependencies: + dunder-proto: ^1.0.1 + es-object-atoms: ^1.0.0 + checksum: 4fc96afdb58ced9a67558698b91433e6b037aaa6f1493af77498d7c85b141382cf223c0e5946f334fb328ee85dfe6edd06d218eaf09556f4bc4ec6005d7f5f7b + languageName: node + linkType: hard + "get-stdin@npm:^9.0.0": version: 9.0.0 resolution: "get-stdin@npm:9.0.0" @@ -32025,13 +32285,13 @@ __metadata: languageName: node linkType: hard -"is-arguments@npm:^1.0.4": - version: 1.1.1 - resolution: "is-arguments@npm:1.1.1" +"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": + version: 1.2.0 + resolution: "is-arguments@npm:1.2.0" dependencies: - call-bind: ^1.0.2 - has-tostringtag: ^1.0.0 - checksum: 7f02700ec2171b691ef3e4d0e3e6c0ba408e8434368504bb593d0d7c891c0dbfda6d19d30808b904a6cb1929bca648c061ba438c39f296c2a8ca083229c49f27 + call-bound: ^1.0.2 + has-tostringtag: ^1.0.2 + checksum: aae9307fedfe2e5be14aebd0f48a9eeedf6b8c8f5a0b66257b965146d1e94abdc3f08e3dce3b1d908e1fa23c70039a88810ee1d753905758b9b6eebbab0bafeb languageName: node linkType: hard @@ -32193,6 +32453,13 @@ __metadata: languageName: node linkType: hard +"is-electron@npm:2.2.2": + version: 2.2.2 + resolution: "is-electron@npm:2.2.2" + checksum: de5aa8bd8d72c96675b8d0f93fab4cc21f62be5440f65bc05c61338ca27bd851a64200f31f1bf9facbaa01b3dbfed7997b2186741d84b93b63e0aff1db6a9494 + languageName: node + linkType: hard + "is-elevated@npm:^3.0.0": version: 3.0.0 resolution: "is-elevated@npm:3.0.0" @@ -32323,7 +32590,7 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.3": +"is-map@npm:^2.0.2, is-map@npm:^2.0.3": version: 2.0.3 resolution: "is-map@npm:2.0.3" checksum: e6ce5f6380f32b141b3153e6ba9074892bbbbd655e92e7ba5ff195239777e767a976dcd4e22f864accaf30e53ebf961ab1995424aef91af68788f0591b7396cc @@ -32529,7 +32796,7 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.3": +"is-set@npm:^2.0.2, is-set@npm:^2.0.3": version: 2.0.3 resolution: "is-set@npm:2.0.3" checksum: 36e3f8c44bdbe9496c9689762cc4110f6a6a12b767c5d74c0398176aa2678d4467e3bf07595556f2dba897751bde1422480212b97d973c7b08a343100b0c0dfe @@ -32561,7 +32828,7 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^2.0.0, is-stream@npm:^2.0.1": +"is-stream@npm:^2, is-stream@npm:^2.0.0, is-stream@npm:^2.0.1": version: 2.0.1 resolution: "is-stream@npm:2.0.1" checksum: b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 @@ -32935,6 +33202,23 @@ __metadata: languageName: node linkType: hard +"iterate-iterator@npm:^1.0.1": + version: 1.0.2 + resolution: "iterate-iterator@npm:1.0.2" + checksum: 97b3ed4f2bebe038be57d03277879e406b2c537ceeeab7f82d4167f9a3cff872cc2cc5da3dc9920ff544ca247329d2a4d44121bb8ef8d0807a72176bdbc17c84 + languageName: node + linkType: hard + +"iterate-value@npm:^1.0.2": + version: 1.0.2 + resolution: "iterate-value@npm:1.0.2" + dependencies: + es-get-iterator: ^1.0.2 + iterate-iterator: ^1.0.1 + checksum: 446a4181657df1872e5020713206806757157db6ab375dee05eb4565b66e1244d7a99cd36ce06862261ad4bd059e66ba8192f62b5d1ff41d788c3b61953af6c3 + languageName: node + linkType: hard + "iterator.prototype@npm:^1.1.4": version: 1.1.4 resolution: "iterator.prototype@npm:1.1.4" @@ -35627,7 +35911,7 @@ __metadata: languageName: node linkType: hard -"math-intrinsics@npm:^1.0.0, math-intrinsics@npm:^1.1.0": +"math-intrinsics@npm:^1.1.0": version: 1.1.0 resolution: "math-intrinsics@npm:1.1.0" checksum: 0e513b29d120f478c85a70f49da0b8b19bc638975eca466f2eeae0071f3ad00454c621bf66e16dd435896c208e719fc91ad79bbfba4e400fe0b372e7c1c9c9a2 @@ -36973,7 +37257,7 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.0.0, msw@npm:^2.0.8": +"msw@npm:^2.0.0, msw@npm:^2.0.8, msw@npm:^2.2.14": version: 2.7.3 resolution: "msw@npm:2.7.3" dependencies: @@ -38458,7 +38742,7 @@ __metadata: languageName: node linkType: hard -"p-queue@npm:^6.6.2": +"p-queue@npm:^6, p-queue@npm:^6.6.1, p-queue@npm:^6.6.2": version: 6.6.2 resolution: "p-queue@npm:6.6.2" dependencies: @@ -38468,6 +38752,16 @@ __metadata: languageName: node linkType: hard +"p-retry@npm:^4, p-retry@npm:^4.0.0": + version: 4.6.2 + resolution: "p-retry@npm:4.6.2" + dependencies: + "@types/retry": 0.12.0 + retry: ^0.13.1 + checksum: 45c270bfddaffb4a895cea16cb760dcc72bdecb6cb45fef1971fa6ea2e91ddeafddefe01e444ac73e33b1b3d5d29fb0dd18a7effb294262437221ddc03ce0f2e + languageName: node + linkType: hard + "p-retry@npm:^6.2.0": version: 6.2.0 resolution: "p-retry@npm:6.2.0" @@ -38479,7 +38773,7 @@ __metadata: languageName: node linkType: hard -"p-throttle@npm:^4.1.1": +"p-throttle@npm:4.1.1, p-throttle@npm:^4.1.1": version: 4.1.1 resolution: "p-throttle@npm:4.1.1" checksum: fe8709f3c3b1da7c033479375c2c302e80c1a5d86449013afa7cd46d1dc210bc824a7e4a9d088e66d31987d00878c2b5491bb2fe76246d4d2fc9a1636f5f8298 @@ -40193,6 +40487,20 @@ __metadata: languageName: node linkType: hard +"promise.allsettled@npm:^1.0.2": + version: 1.0.7 + resolution: "promise.allsettled@npm:1.0.7" + dependencies: + array.prototype.map: ^1.0.5 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + iterate-value: ^1.0.2 + checksum: 96186392286e5ab9aef1a1a725c061c8cf268b6cf141f151daa3834bb8e1680f3b159af6536ce59cf80d4a6a5ad1d8371d05759980cc6c90d58800ddb0a7c119 + languageName: node + linkType: hard + "promise.series@npm:^0.2.0": version: 0.2.0 resolution: "promise.series@npm:0.2.0" @@ -40613,7 +40921,7 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.5.2, raw-body@npm:^2.4.1": +"raw-body@npm:2.5.2, raw-body@npm:^2.3.3, raw-body@npm:^2.4.1": version: 2.5.2 resolution: "raw-body@npm:2.5.2" dependencies: @@ -43876,6 +44184,16 @@ __metadata: languageName: node linkType: hard +"stop-iteration-iterator@npm:^1.0.0": + version: 1.1.0 + resolution: "stop-iteration-iterator@npm:1.1.0" + dependencies: + es-errors: ^1.3.0 + internal-slot: ^1.1.0 + checksum: be944489d8829fb3bdec1a1cc4a2142c6b6eb317305eeace1ece978d286d6997778afa1ae8cb3bd70e2b274b9aa8c69f93febb1e15b94b1359b11058f9d3c3a1 + languageName: node + linkType: hard + "stoppable@npm:^1.1.0": version: 1.1.0 resolution: "stoppable@npm:1.1.0" @@ -45518,7 +45836,7 @@ __metadata: languageName: node linkType: hard -"tsscmp@npm:1.0.6": +"tsscmp@npm:1.0.6, tsscmp@npm:^1.0.6": version: 1.0.6 resolution: "tsscmp@npm:1.0.6" checksum: 1512384def36bccc9125cabbd4c3b0e68608d7ee08127ceaa0b84a71797263f1a01c7f82fa69be8a3bd3c1396e2965d2f7b52d581d3a5eeaf3967fbc52e3b3bf @@ -47450,7 +47768,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7, ws@npm:^7.5.5": +"ws@npm:^7, ws@npm:^7.5.3, ws@npm:^7.5.5": version: 7.5.10 resolution: "ws@npm:7.5.10" peerDependencies: From 0e9f7fe269772ce46ca5c456e786c32675ec10d7 Mon Sep 17 00:00:00 2001 From: Jackson Chen Date: Wed, 26 Mar 2025 11:33:22 -0400 Subject: [PATCH 091/119] techdocs: update attachTechDocsAddonComponentData with idempotency Signed-off-by: Jackson Chen --- .changeset/common-parrots-wink.md | 5 +++++ plugins/techdocs-react/src/alpha.ts | 23 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .changeset/common-parrots-wink.md diff --git a/.changeset/common-parrots-wink.md b/.changeset/common-parrots-wink.md new file mode 100644 index 0000000000..7e3578771b --- /dev/null +++ b/.changeset/common-parrots-wink.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-react': patch +--- + +Fix catalog entity docs page not loading due to multiple addons data attachment in the New Frontend System. diff --git a/plugins/techdocs-react/src/alpha.ts b/plugins/techdocs-react/src/alpha.ts index 689ec41977..130479561a 100644 --- a/plugins/techdocs-react/src/alpha.ts +++ b/plugins/techdocs-react/src/alpha.ts @@ -13,8 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import React from 'react'; import { TechDocsAddonOptions } from './types'; -import { attachComponentData } from '@backstage/core-plugin-api'; +import { + attachComponentData, + getComponentData, +} from '@backstage/core-plugin-api'; import { ComponentType } from 'react'; import { getDataKeyByName, TECHDOCS_ADDONS_KEY } from './addons'; import { @@ -53,6 +57,19 @@ export const attachTechDocsAddonComponentData =

( techDocsAddon: ComponentType

, data: TechDocsAddonOptions, ) => { - attachComponentData(techDocsAddon, TECHDOCS_ADDONS_KEY, data); - attachComponentData(techDocsAddon, getDataKeyByName(data.name), true); + const element = React.createElement(techDocsAddon as ComponentType); + + const isDataAttached = getComponentData( + element, + TECHDOCS_ADDONS_KEY, + ); + if (!isDataAttached) { + attachComponentData(techDocsAddon, TECHDOCS_ADDONS_KEY, data); + } + + const dataKey = getDataKeyByName(data.name); + const isDataKeyAttached = getComponentData(element, dataKey); + if (!isDataKeyAttached) { + attachComponentData(techDocsAddon, dataKey, true); + } }; From dccbdd5a6b11246d7dd9c50f138a281615c5a7af Mon Sep 17 00:00:00 2001 From: Adam Kunicki Date: Wed, 26 Mar 2025 11:42:05 -0700 Subject: [PATCH 092/119] Support broadcast, address some review comments Signed-off-by: Adam Kunicki --- .../config.d.ts | 6 + .../package.json | 6 +- .../src/index.ts | 6 +- .../lib/SlackNotificationProcessor.test.ts | 294 +++++++++++------- .../src/lib/SlackNotificationProcessor.ts | 100 +++--- .../src/lib/constants.ts | 24 +- .../src/lib/util.ts | 12 +- 7 files changed, 270 insertions(+), 178 deletions(-) diff --git a/plugins/notifications-backend-module-slack/config.d.ts b/plugins/notifications-backend-module-slack/config.d.ts index f620f0e206..8cd450940e 100644 --- a/plugins/notifications-backend-module-slack/config.d.ts +++ b/plugins/notifications-backend-module-slack/config.d.ts @@ -22,6 +22,12 @@ export interface Config { * @visibility secret */ token?: string; + /** + * Broadcast notification receivers when receiver is set to config + * These can be Slack User IDs, Slack User Email addresses, Slack Channel + * Names, or Slack Channel IDs. Any valid identifier that chat.postMessage can accept. + */ + broadcastChannels?: string[]; }>; }; }; diff --git a/plugins/notifications-backend-module-slack/package.json b/plugins/notifications-backend-module-slack/package.json index 2bc7a8eb00..7254d3ba6d 100644 --- a/plugins/notifications-backend-module-slack/package.json +++ b/plugins/notifications-backend-module-slack/package.json @@ -46,8 +46,8 @@ "@slack/bolt": "^3.21.4", "@slack/types": "^2.14.0", "@slack/web-api": "^7.5.0", - "dataloader": "2.2.2", - "p-throttle": "4.1.1" + "dataloader": "^2.0.0", + "p-throttle": "^4.1.1" }, "devDependencies": { "@backstage/backend-test-utils": "workspace:^", @@ -55,7 +55,7 @@ "@backstage/plugin-catalog-node": "workspace:^", "@backstage/test-utils": "workspace:^", "@faker-js/faker": "^8.4.1", - "msw": "^2.2.14" + "msw": "^2.0.0" }, "configSchema": "config.d.ts" } diff --git a/plugins/notifications-backend-module-slack/src/index.ts b/plugins/notifications-backend-module-slack/src/index.ts index 14cde37d13..f8a9e248f7 100644 --- a/plugins/notifications-backend-module-slack/src/index.ts +++ b/plugins/notifications-backend-module-slack/src/index.ts @@ -20,9 +20,5 @@ * @packageDocumentation */ -export { - ANNOTATION_SLACK_CHANNEL_ID, - ANNOTATION_SLACK_CHANNEL_NAME, - ANNOTATION_SLACK_USER_ID, -} from './lib'; +export { ANNOTATION_SLACK_BOT_NOTIFY } from './lib'; export { notificationsModuleSlack as default } from './module'; diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts index 5396a71736..4c891ed3ab 100644 --- a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.test.ts @@ -63,7 +63,7 @@ const DEFAULT_ENTITIES_RESPONSE = { name: 'mock', namespace: 'default', annotations: { - 'slack.com/user-id': 'U12345678', + 'slack.com/bot-notify': 'U12345678', }, }, spec: { @@ -77,7 +77,7 @@ const DEFAULT_ENTITIES_RESPONSE = { name: 'mock', namespace: 'default', annotations: { - 'slack.com/channel-id': 'C12345678', + 'slack.com/bot-notify': 'C12345678', }, }, } as unknown as Entity, @@ -136,17 +136,12 @@ describe('SlackNotificationProcessor', () => { blocks: [ { type: 'section', - text: { - type: 'mrkdwn', - text: 'No description provided', - }, accessory: { type: 'button', text: { type: 'plain_text', text: 'View More', }, - url: '', action_id: 'button-action', }, }, @@ -172,114 +167,205 @@ describe('SlackNotificationProcessor', () => { }); }); - it('should send a notification to a user', async () => { - const slack = new WebClient(); + describe('when a user notification is sent directly', () => { + it('should send a notification to a user', async () => { + const slack = new WebClient(); - const processor = SlackNotificationProcessor.fromConfig(config, { - auth, - discovery, - logger, - catalog: catalogServiceMock({ - entities: DEFAULT_ENTITIES_RESPONSE.items, - }), - slack, - })[0]; + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; - await processor.postProcess( - { - origin: 'plugin', - id: '1234', - user: 'user:default/mock', - created: new Date(), - payload: { - title: 'notification', - link: '/catalog/user/default/jane.doe', - }, - }, - { - recipients: { type: 'entity', entityRef: 'user:default/mock' }, - payload: { title: 'notification' }, - }, - ); - - expect(slack.chat.postMessage).toHaveBeenCalledWith({ - channel: 'U12345678', - text: 'notification', - attachments: [ + await processor.postProcess( { - color: '#00A699', - blocks: [ - { - type: 'section', - text: { - type: 'mrkdwn', - text: 'No description provided', - }, - accessory: { - type: 'button', - text: { - type: 'plain_text', - text: 'View More', - }, - url: '', - action_id: 'button-action', - }, - }, - { - type: 'context', - elements: [ - { - type: 'plain_text', - text: 'Severity: normal', - emoji: true, - }, - { - type: 'plain_text', - text: 'Topic: N/A', - emoji: true, - }, - ], - }, - ], - fallback: 'notification', + origin: 'plugin', + id: '1234', + user: 'user:default/mock', + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, }, - ], + { + recipients: { type: 'entity', entityRef: 'user:default/mock' }, + payload: { title: 'notification' }, + }, + ); + + expect(slack.chat.postMessage).toHaveBeenCalledWith({ + channel: 'U12345678', + text: 'notification', + attachments: [ + { + color: '#00A699', + blocks: [ + { + type: 'section', + accessory: { + type: 'button', + text: { + type: 'plain_text', + text: 'View More', + }, + action_id: 'button-action', + }, + }, + { + type: 'context', + elements: [ + { + type: 'plain_text', + text: 'Severity: normal', + emoji: true, + }, + { + type: 'plain_text', + text: 'Topic: N/A', + emoji: true, + }, + ], + }, + ], + fallback: 'notification', + }, + ], + }); }); }); - it('should not send broadcast messages', async () => { - const slack = new WebClient(); - const processor = SlackNotificationProcessor.fromConfig(config, { - auth, - discovery, - logger, - catalog: catalogServiceMock({ - entities: DEFAULT_ENTITIES_RESPONSE.items, - }), - slack, - })[0]; + describe('when a user notification is expanded from a group', () => { + it('should not send a notification', async () => { + const slack = new WebClient(); - processor.processOptions({ - recipients: { type: 'broadcast' }, - payload: { title: 'notification' }, - }); - processor.postProcess( - { - origin: 'plugin', - id: '1234', - user: null, - created: new Date(), - payload: { - title: 'notification', - link: '/catalog/user/default/jane.doe', + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + await processor.postProcess( + { + origin: 'plugin', + id: '1234', + user: 'user:default/mock', + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, }, - }, - { + { + recipients: { type: 'entity', entityRef: 'group:default/group' }, + payload: { title: 'notification' }, + }, + ); + + expect(slack.chat.postMessage).not.toHaveBeenCalled(); + }); + }); + + describe('when broadcast channels are not configured', () => { + it('should not send broadcast messages', async () => { + const slack = new WebClient(); + + const processor = SlackNotificationProcessor.fromConfig(config, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + await processor.processOptions({ recipients: { type: 'broadcast' }, payload: { title: 'notification' }, - }, - ); + }); - expect(slack.chat.postMessage).not.toHaveBeenCalled(); + await processor.postProcess( + { + origin: 'plugin', + id: '1234', + user: null, + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, + }, + { + recipients: { type: 'broadcast' }, + payload: { title: 'notification' }, + }, + ); + expect(slack.chat.postMessage).not.toHaveBeenCalled(); + }); + }); + + describe('when broadcast channels are configured', () => { + it('should send broadcast messages', async () => { + const slack = new WebClient(); + const broadcastConfig = mockServices.rootConfig({ + data: { + app: { + baseUrl: 'https://example.org', + }, + notifications: { + processors: { + slack: [ + { + token: 'mock-token', + broadcastChannels: ['C12345678', 'D12345678'], + }, + ], + }, + }, + }, + }); + + const processor = SlackNotificationProcessor.fromConfig(broadcastConfig, { + auth, + discovery, + logger, + catalog: catalogServiceMock({ + entities: DEFAULT_ENTITIES_RESPONSE.items, + }), + slack, + })[0]; + + await processor.processOptions({ + recipients: { type: 'broadcast' }, + payload: { title: 'notification' }, + }); + + await processor.postProcess( + { + origin: 'plugin', + id: '1234', + user: null, + created: new Date(), + payload: { + title: 'notification', + link: '/catalog/user/default/jane.doe', + }, + }, + { + recipients: { type: 'broadcast' }, + payload: { title: 'notification' }, + }, + ); + expect(slack.chat.postMessage).toHaveBeenCalledTimes(2); + }); }); }); diff --git a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts index 225f2f20ae..3328c55408 100644 --- a/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts +++ b/plugins/notifications-backend-module-slack/src/lib/SlackNotificationProcessor.ts @@ -33,11 +33,7 @@ import { Counter, metrics } from '@opentelemetry/api'; import { ChatPostMessageArguments, WebClient } from '@slack/web-api'; import DataLoader from 'dataloader'; import pThrottle from 'p-throttle'; -import { - ANNOTATION_SLACK_CHANNEL_ID, - ANNOTATION_SLACK_CHANNEL_NAME, - ANNOTATION_SLACK_USER_ID, -} from './constants'; +import { ANNOTATION_SLACK_BOT_NOTIFY } from './constants'; import { toChatPostMessageArgs } from './util'; export class SlackNotificationProcessor implements NotificationProcessor { @@ -48,6 +44,7 @@ export class SlackNotificationProcessor implements NotificationProcessor { private readonly sendNotifications; private readonly messagesSent: Counter; private readonly messagesFailed: Counter; + private readonly broadcastChannels?: string[]; static fromConfig( config: Config, @@ -57,6 +54,7 @@ export class SlackNotificationProcessor implements NotificationProcessor { logger: LoggerService; catalog: CatalogApi; slack?: WebClient; + broadcastChannels?: string[]; }, ): SlackNotificationProcessor[] { const slackConfig = @@ -64,8 +62,10 @@ export class SlackNotificationProcessor implements NotificationProcessor { return slackConfig.map(c => { const token = c.getString('token'); const slack = options.slack ?? new WebClient(token); + const broadcastChannels = c.getOptionalStringArray('broadcastChannels'); return new SlackNotificationProcessor({ slack, + broadcastChannels, ...options, }); }); @@ -77,12 +77,14 @@ export class SlackNotificationProcessor implements NotificationProcessor { discovery: DiscoveryService; logger: LoggerService; catalog: CatalogApi; + broadcastChannels?: string[]; }) { - const { auth, catalog, logger, slack } = options; + const { auth, catalog, logger, slack, broadcastChannels } = options; this.logger = logger; this.catalog = catalog; this.auth = auth; this.slack = slack; + this.broadcastChannels = broadcastChannels; const meter = metrics.getMeter('default'); this.messagesSent = meter.createCounter( @@ -146,15 +148,14 @@ export class SlackNotificationProcessor implements NotificationProcessor { await Promise.all( entityRefs.map(async entityRef => { const compoundEntityRef = parseEntityRef(entityRef); - // skip users as they are sent direct messages, but allow all other entity kinds - // to have a channel id annotation. + // skip users as they are sent direct messages if (compoundEntityRef.kind === 'user') { return; } let channel; try { - channel = await this.getChannelId(entityRef); + channel = await this.getSlackNotificationTarget(entityRef); } catch (error) { this.logger.error( `Failed to get Slack channel for entity: ${ @@ -197,31 +198,50 @@ export class SlackNotificationProcessor implements NotificationProcessor { notification: Notification, options: NotificationSendOptions, ): Promise { - if (options.recipients.type === 'broadcast' || !notification.user) { + const destinations: string[] = []; + + // Handle broadcast case + if (notification.user === null) { + destinations.push(...(this.broadcastChannels ?? [])); + } else if (options.recipients.type === 'entity') { + // Handle user-specific notification + const entityRefs = [options.recipients.entityRef].flat(); + if (entityRefs.some(e => parseEntityRef(e).kind === 'group')) { + // We've already dispatched a slack channel message, so let's not send a DM. + return; + } + + const destination = await this.getSlackNotificationTarget( + notification.user, + ); + + if (!destination) { + this.logger.error( + `No slack.com/bot-notify annotation found for user: ${notification.user}`, + ); + return; + } + + destinations.push(destination); + } + + // If no destinations, nothing to do + if (destinations.length === 0) { return; } - const entityRefs = [options.recipients.entityRef].flat(); - if (entityRefs.some(e => parseEntityRef(e).kind === 'group')) { - // We've already dispatched a slack channel message, so let's not send a DM. - return; - } + // Prepare outbound messages + const outbound = destinations.map(channel => + toChatPostMessageArgs({ channel, payload: options.payload }), + ); - const destination = await this.getSlackUserId(notification.user); - if (!destination) { - this.logger.error(`No email found for user entity: ${notification.user}`); - return; - } - - const payload = toChatPostMessageArgs({ - channel: destination, - payload: options.payload, + // Log debug info + outbound.forEach(payload => { + this.logger.debug(`Sending notification: ${JSON.stringify(payload)}`); }); - this.logger.debug(`Sending DM notification: ${JSON.stringify(payload)}`); - - // batch it up - await this.sendNotifications([payload]); + // Send notifications + await this.sendNotifications(outbound); } async getEntities( @@ -235,11 +255,7 @@ export class SlackNotificationProcessor implements NotificationProcessor { const response = await this.catalog.getEntitiesByRefs( { entityRefs: entityRefs.slice(), - fields: [ - `metadata.annotations.${ANNOTATION_SLACK_CHANNEL_NAME}`, - `metadata.annotations.${ANNOTATION_SLACK_CHANNEL_ID}`, - `metadata.annotations.${ANNOTATION_SLACK_USER_ID}`, - ], + fields: [`metadata.annotations.${ANNOTATION_SLACK_BOT_NOTIFY}`], }, { token, @@ -249,16 +265,9 @@ export class SlackNotificationProcessor implements NotificationProcessor { return response.items; } - async getSlackUserId(entityRef: string): Promise { - const entityLoader = new DataLoader( - entityRefs => this.getEntities(entityRefs), - ); - const entity = await entityLoader.load(entityRef); - - return entity?.metadata?.annotations?.[ANNOTATION_SLACK_USER_ID]; - } - - async getChannelId(entityRef: string): Promise { + async getSlackNotificationTarget( + entityRef: string, + ): Promise { const entityLoader = new DataLoader( entityRefs => this.getEntities(entityRefs), ); @@ -269,10 +278,7 @@ export class SlackNotificationProcessor implements NotificationProcessor { throw new NotFoundError(`Entity not found: ${entityRef}`); } - return ( - entity?.metadata?.annotations?.[ANNOTATION_SLACK_CHANNEL_ID] || - entity?.metadata?.annotations?.[ANNOTATION_SLACK_CHANNEL_NAME] - ); + return entity?.metadata?.annotations?.[ANNOTATION_SLACK_BOT_NOTIFY]; } async sendNotification(args: ChatPostMessageArguments): Promise { diff --git a/plugins/notifications-backend-module-slack/src/lib/constants.ts b/plugins/notifications-backend-module-slack/src/lib/constants.ts index 24c1868d55..cdf052da7e 100644 --- a/plugins/notifications-backend-module-slack/src/lib/constants.ts +++ b/plugins/notifications-backend-module-slack/src/lib/constants.ts @@ -16,18 +16,14 @@ /** * @public - * The annotation key for the entity's Slack user ID + * The annotation key for the entity's Slack ID. This can be + * any valid chat.postMessage destination including: + * - A user ID (U12345678) + * - A channel ID (C12345678) + * - A DM ID (D12345678) + * - A group ID (S12345678) + * + * It can also be a user's email address or a channel name, + * however IDs are preferred. */ -export const ANNOTATION_SLACK_USER_ID = 'slack.com/user-id'; - -/** - * @public - * The annotation key for the entity's Slack channel name. - */ -export const ANNOTATION_SLACK_CHANNEL_NAME = 'slack.com/channel-name'; - -/** - * @public - * The annotation key for the entity's Slack channel ID. - */ -export const ANNOTATION_SLACK_CHANNEL_ID = 'slack.com/channel-id'; +export const ANNOTATION_SLACK_BOT_NOTIFY = 'slack.com/bot-notify'; diff --git a/plugins/notifications-backend-module-slack/src/lib/util.ts b/plugins/notifications-backend-module-slack/src/lib/util.ts index e39701d88a..5e2adbeec5 100644 --- a/plugins/notifications-backend-module-slack/src/lib/util.ts +++ b/plugins/notifications-backend-module-slack/src/lib/util.ts @@ -46,17 +46,19 @@ export function toSlackBlockKit(payload: NotificationPayload): KnownBlock[] { return [ { type: 'section', - text: { - type: 'mrkdwn', - text: description ?? 'No description provided', - }, + ...(description && { + text: { + type: 'mrkdwn', + text: description ?? 'No description provided', + }, + }), accessory: { type: 'button', text: { type: 'plain_text', text: 'View More', }, - url: link ?? '', + ...(link && { url: link }), action_id: 'button-action', }, }, From cc5f066fa57f892ef7cab5b0cff56d5a9155a648 Mon Sep 17 00:00:00 2001 From: Adam Kunicki Date: Wed, 26 Mar 2025 16:30:52 -0700 Subject: [PATCH 093/119] Update/move docs Signed-off-by: Adam Kunicki --- docs/notifications/processors.md | 43 +++++++++++++-- .../README.md | 53 +------------------ 2 files changed, 41 insertions(+), 55 deletions(-) diff --git a/docs/notifications/processors.md b/docs/notifications/processors.md index 2d7de61ba0..ad3e427364 100644 --- a/docs/notifications/processors.md +++ b/docs/notifications/processors.md @@ -108,7 +108,22 @@ See more information at +Multiple instances can be added in the `slack` array, allowing you to have multiple configurations if you need to send +messages to more than one Slack workspace. Org-Wide App installation is not currently supported. + +### Entity Requirements + +Entities must be annotated with the following annotation: + +- `slack.com/bot-notify` + +The value may be any Slack ID supported by [chat.postMessage](https://api.slack.com/methods/chat.postMessage), for example a user (U12345678), channel (C12345678), group, or direct message chat. + +It's also possible to use a user's email address or channel name, however IDs are recommended by Slack. +Private channels/chats must use an ID. + +### Observability + +The processor includes the following counter metrics if you are exporting metrics using OpenTelemetry: + +- `notifications.processors.slack.sent.count` - The number of messages sent +- `notifications.processors.slack.error.count` - The number of messages that failed to send diff --git a/plugins/notifications-backend-module-slack/README.md b/plugins/notifications-backend-module-slack/README.md index e64bac868c..f730ede78a 100644 --- a/plugins/notifications-backend-module-slack/README.md +++ b/plugins/notifications-backend-module-slack/README.md @@ -2,55 +2,4 @@ The Slack backend module for the notifications plugin. -## Getting Started - -### Module Installation - -Add the module to your backend: - -```ts -// packages/backend/src/index.ts -backend.add(import('@backstage/plugin-notifications-backend-module-slack')); -``` - -### Slack Configuration - -To use this you'll need to create a Slack App or use an existing one. It should have at least the following scopes: -`chat:write`, `users:read`, `im:write` (for direct message support). - -Additionally you may include scopes `chat:write.public` in order to send messages to public channels your app is not -a member of. - -These scopes are under OAuth & Permissions. You will also want to save the Bot User OAuth Token. This will be needed -in the following step to configure `app-config.yaml`. - -### Configure Backstage - -You'll now need to configure the Slack module in your `app-config.yaml`. - -```yaml -notifications: - processors: - slack: - - token: xoxb-XXXXXXXXX -``` - -Multiple instances can be added in the `slack` array, allowing you to have multiple configurations if you need to send -messages to more than one Slack workspace. Org-Wide App installation is not currently supported. - -### Entity Requirements - -Entities must be annotated with one of the following annotations: - -- `slack.com/user-id` for direct messages -- `slack.com/channel-name` for public channel messages -- `slack.com/channel-id` for public or private channel messages - -Slack prefers use of ID over name and `slack.com/channel-id` is the recommended annotation. - -### Observability - -The processor includes the following counter metrics if you are exporting metrics using OpenTelemetry: - -- `notifications.processors.slack.sent.count` - The number of messages sent -- `notifications.processors.slack.error.count` - The number of messages that failed to send +See [Built-in Processors](https://backstage.io/docs/notifications/processors/#built-in-processors) for detailed documentation From 2eaaf0bda07f13194044292dafc54a3aa0cba280 Mon Sep 17 00:00:00 2001 From: Adam Kunicki Date: Wed, 26 Mar 2025 16:34:29 -0700 Subject: [PATCH 094/119] Update lockfile Signed-off-by: Adam Kunicki --- yarn.lock | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0881f8546f..e15195cb62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6800,9 +6800,9 @@ __metadata: "@slack/bolt": ^3.21.4 "@slack/types": ^2.14.0 "@slack/web-api": ^7.5.0 - dataloader: 2.2.2 - msw: ^2.2.14 - p-throttle: 4.1.1 + dataloader: ^2.0.0 + msw: ^2.0.0 + p-throttle: ^4.1.1 languageName: unknown linkType: soft @@ -26632,13 +26632,6 @@ __metadata: languageName: node linkType: hard -"dataloader@npm:2.2.2": - version: 2.2.2 - resolution: "dataloader@npm:2.2.2" - checksum: 4dabd247089c29f194e94d5434d504f99156c5c214a03463c20f3f17f40398d7e179edee69a27c16e315519ac8739042a810090087ae26449a0e685156a02c65 - languageName: node - linkType: hard - "dataloader@npm:^2.0.0, dataloader@npm:^2.2.2": version: 2.2.3 resolution: "dataloader@npm:2.2.3" @@ -37257,7 +37250,7 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.0.0, msw@npm:^2.0.8, msw@npm:^2.2.14": +"msw@npm:^2.0.0, msw@npm:^2.0.8": version: 2.7.3 resolution: "msw@npm:2.7.3" dependencies: @@ -38773,7 +38766,7 @@ __metadata: languageName: node linkType: hard -"p-throttle@npm:4.1.1, p-throttle@npm:^4.1.1": +"p-throttle@npm:^4.1.1": version: 4.1.1 resolution: "p-throttle@npm:4.1.1" checksum: fe8709f3c3b1da7c033479375c2c302e80c1a5d86449013afa7cd46d1dc210bc824a7e4a9d088e66d31987d00878c2b5491bb2fe76246d4d2fc9a1636f5f8298 From 9c12a76c9e072cc2033ce3c7aeec433867da2e38 Mon Sep 17 00:00:00 2001 From: Andy Ladjadj Date: Thu, 27 Mar 2025 00:40:26 +0100 Subject: [PATCH 095/119] fix(techdocs): prevent to throw an error when the SCM provider is not supported (#29154) * fix(techdocs): prevent to throw error on undefined 'selection' Error TypeError Message Failed to execute 'containsNode' on 'Selection': parameter 1 is not of type 'Node'. Stack Trace TypeError: parameter 1 is not of type 'Node'. at https://backstage.mpi-internal.com/static/module-backstage.b2517ed5.js:618:1729 at ul (https://backstage.mpi-internal.com/static/module-react-dom.b4fe5cf3.js:16:24313) at Ct (https://backstage.mpi-internal.com/static/module-react-dom.b4fe5cf3.js:16:42455) at qs (https://backstage.mpi-internal.com/static/module-react-dom.b4fe5cf3.js:16:34578) at Ln (https://backstage.mpi-internal.com/static/module-react-dom.b4fe5cf3.js:24:1590) at MessagePort.Zn (https://backstage.mpi-internal.com/static/module-react-dom.b4fe5cf3.js:24:1980) Signed-off-by: Andy LADJADJ * doc: add changeset Signed-off-by: Andy LADJADJ * chore(techinsights-addon): doesn't load the component for unsuported repositories Signed-off-by: Andy LADJADJ * Update plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssueContent.tsx Co-authored-by: Thomas Cardonne Signed-off-by: Andy Ladjadj * Update plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssueContent.tsx Co-authored-by: Thomas Cardonne Signed-off-by: Andy Ladjadj * fix: doesn't test that selection contains feebackContainer Signed-off-by: Andy LADJADJ * ci: update the changeset Signed-off-by: Andy LADJADJ --------- Signed-off-by: Andy LADJADJ Signed-off-by: Andy Ladjadj Co-authored-by: Thomas Cardonne --- .changeset/unlucky-carrots-shave.md | 5 + .../src/ReportIssue/IssueLink.tsx | 5 +- .../src/ReportIssue/ReportIssue.test.tsx | 53 ++++++- .../src/ReportIssue/ReportIssue.tsx | 129 ++--------------- .../src/ReportIssue/ReportIssueContent.tsx | 133 ++++++++++++++++++ .../src/ReportIssue/constants.ts | 1 + 6 files changed, 203 insertions(+), 123 deletions(-) create mode 100644 .changeset/unlucky-carrots-shave.md create mode 100644 plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssueContent.tsx diff --git a/.changeset/unlucky-carrots-shave.md b/.changeset/unlucky-carrots-shave.md new file mode 100644 index 0000000000..e0b4c0128b --- /dev/null +++ b/.changeset/unlucky-carrots-shave.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-module-addons-contrib': patch +--- + +Fixed rendering issues in `ReportIssue` addon for unsupported repository types and improved shadow DOM event handling. The addon now properly prevents initialization when encountering unsupported repository types and correctly handles selection events within the shadow DOM. diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx index eb16476fa6..f0d9b194ce 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx @@ -48,10 +48,7 @@ const getIcon = ({ type }: Repository) => { }; const getName = ({ type }: Repository) => { - if (type === 'github') { - return 'Github'; - } - return 'Gitlab'; + return type.charAt(0).toLocaleUpperCase('en-US') + type.slice(1); }; const getUrl = (repository: Repository, template: ReportIssueTemplate) => { diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.test.tsx b/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.test.tsx index 459fa1b65e..97df773f76 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.test.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.test.tsx @@ -116,7 +116,7 @@ describe('ReportIssue', () => { it('renders gitlab link without exploding', async () => { byUrl.mockReturnValue({ type: 'gitlab' }); - const { shadowRoot, getByText } = + const { shadowRoot, getByText, queryByTestId } = await TechDocsAddonTester.buildAddonsInTechDocs([ , ]) @@ -164,6 +164,8 @@ describe('ReportIssue', () => { fireSelectionChangeEvent(window); await waitFor(() => { + expect(queryByTestId('report-issue-addon')).toBeInTheDocument(); + const link = getByText('Open new Gitlab issue'); expect(link).toHaveAttribute( 'href', @@ -180,7 +182,7 @@ describe('ReportIssue', () => { body: options.selection.toString().trim(), }); - const { shadowRoot, getByText } = + const { shadowRoot, getByText, queryByTestId } = await TechDocsAddonTester.buildAddonsInTechDocs([ , ]) @@ -228,6 +230,8 @@ describe('ReportIssue', () => { fireSelectionChangeEvent(window); await waitFor(() => { + expect(queryByTestId('report-issue-addon')).toBeInTheDocument(); + const link = getByText('Open new Gitlab issue'); expect(link).toHaveAttribute( 'href', @@ -235,4 +239,49 @@ describe('ReportIssue', () => { ); }); }); + + it('does not render report issue link for unsupported repository type', async () => { + byUrl.mockReturnValue({ type: 'gerrit', resource: 'gerrit.example.com' }); + + const { shadowRoot, getByText, queryByTestId } = + await TechDocsAddonTester.buildAddonsInTechDocs([ + , + ]) + .withDom( + + + +

+
+ +
+
+ + , + ) + .withApis([[scmIntegrationsApiRef, { byUrl }]]) + .renderWithEffects(); + + (shadowRoot as ShadowRoot & Pick).getSelection = + () => selection; + + await waitFor(() => { + expect(getByText('Edit page')).toBeInTheDocument(); + }); + + fireSelectionChangeEvent(window); + + await waitFor(() => { + expect(queryByTestId('report-issue-addon')).not.toBeInTheDocument(); + }); + }); }); diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.tsx b/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.tsx index a6d8021b9d..3a5511376c 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/ReportIssue.tsx @@ -14,39 +14,11 @@ * limitations under the License. */ -import React, { useState, useEffect } from 'react'; - -import { makeStyles, Portal, Paper } from '@material-ui/core'; - -import { useGitTemplate, useGitRepository } from './hooks'; +import React from 'react'; +import { useGitRepository } from './hooks'; import { ReportIssueTemplateBuilder } from './types'; -import { - PAGE_MAIN_CONTENT_SELECTOR, - PAGE_FEEDBACK_LINK_SELECTOR, - ADDON_FEEDBACK_CONTAINER_ID, - ADDON_FEEDBACK_CONTAINER_SELECTOR, -} from './constants'; -import { IssueLink } from './IssueLink'; - -import { - useShadowRootElements, - useShadowRootSelection, -} from '@backstage/plugin-techdocs-react'; - -const useStyles = makeStyles(theme => ({ - root: { - transform: 'translate(-100%, -100%)', - position: 'absolute', - padding: theme.spacing(1), - zIndex: theme.zIndex.tooltip, - background: theme.palette.common.white, - }, -})); - -type Style = { - top: string; - left: string; -}; +import { ADDON_ISSUE_REPO_TYPES_SUPPORTED } from './constants'; +import { ReportIssueAddonContent } from './ReportIssueContent'; /** * Props customizing the Addon. @@ -67,101 +39,24 @@ export type ReportIssueProps = { templateBuilder?: ReportIssueTemplateBuilder; }; -/** - * Show report issue button when text is highlighted - */ export const ReportIssueAddon = ({ debounceTime = 500, - templateBuilder: buildTemplate, + templateBuilder, }: ReportIssueProps) => { - const classes = useStyles(); - const [style, setStyle] = useState