From d996458580de4b63f9c07ebacac98626efab4125 Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 12:40:43 -0700 Subject: [PATCH 001/212] customize unregister entity menuitem Signed-off-by: sjeyaraman --- .../app/src/components/catalog/EntityPage.tsx | 15 ++++++- .../EntityContextMenu.test.tsx | 25 ++++++++++- .../EntityContextMenu/EntityContextMenu.tsx | 43 +++++++++++++------ .../components/EntityLayout/EntityLayout.tsx | 4 +- 4 files changed, 70 insertions(+), 17 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 799fe3e4d9..ab8c02c168 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -161,9 +161,22 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { ]; }, []); + type VisibleType = 'visible' | 'hidden' | 'disabled'; + + type contextMenuOptions = { + disableUnregister: boolean | VisibleType; + }; + + const options: contextMenuOptions = { + disableUnregister: false, + }; + return ( <> - + {props.children} { it('should call onUnregisterEntity on button click', async () => { const mockCallback = jest.fn(); - await render( { expect(mockCallback).toBeCalled(); }); + it('check Unregister entity button is disabled', async () => { + const mockCallback = jest.fn(); + + const { getByText } = await render( + {}} + />, + ); + + const button = await screen.findByTestId('menu-button'); + expect(button).toBeInTheDocument(); + fireEvent.click(button); + + const unregister = await screen.getByText('Unregister entity'); + expect(unregister).toBeInTheDocument(); + + const unregisterSpanItem = getByText(/Unregister entity/); + const unregisterMenuListItem = + unregisterSpanItem?.parentElement?.parentElement; + expect(unregisterMenuListItem).toHaveAttribute('aria-disabled'); + }); + it('should call onInspectEntity on button click', async () => { const mockCallback = jest.fn(); diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index 5664186ab1..955c42b95a 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -47,9 +47,11 @@ interface ExtraContextMenuItem { onClick: () => void; } +type VisibleType = 'visible' | 'hidden' | 'disabled'; + // unstable context menu option, eg: disable the unregister entity menu interface contextMenuOptions { - disableUnregister: boolean; + disableUnregister: boolean | VisibleType; } interface EntityContextMenuProps { @@ -98,11 +100,35 @@ export function EntityContextMenu(props: EntityContextMenuProps) { , ]; + const isBoolean = + typeof UNSTABLE_contextMenuOptions?.disableUnregister === 'boolean'; + const disableUnregister = (!unregisterPermission.allowed || - UNSTABLE_contextMenuOptions?.disableUnregister) ?? + (isBoolean + ? UNSTABLE_contextMenuOptions?.disableUnregister + : UNSTABLE_contextMenuOptions?.disableUnregister === 'disabled')) ?? false; + let unregisterButton = <>; + + if (UNSTABLE_contextMenuOptions?.disableUnregister !== 'hidden') { + unregisterButton = ( + { + onClose(); + onUnregisterEntity(); + }} + disabled={disableUnregister} + > + + + + + + ); + } + return ( <> {extraItems} - { - onClose(); - onUnregisterEntity(); - }} - disabled={disableUnregister} - > - - - - - + {unregisterButton} { onClose(); diff --git a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx index 693137fe21..4cbb72db5c 100644 --- a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx +++ b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx @@ -142,9 +142,11 @@ interface ExtraContextMenuItem { onClick: () => void; } +type VisibleType = 'visible' | 'hidden' | 'disabled'; + // unstable context menu option, eg: disable the unregister entity menu interface contextMenuOptions { - disableUnregister: boolean; + disableUnregister: boolean | VisibleType; } /** @public */ From 9083fae0885053988fed87d64c124f1a6e70ba47 Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 17:10:23 -0700 Subject: [PATCH 002/212] add-change-set Signed-off-by: sjeyaraman --- .changeset/cold-apples-film.md | 9 +++++++++ packages/app/src/components/catalog/EntityPage.tsx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-apples-film.md diff --git a/.changeset/cold-apples-film.md b/.changeset/cold-apples-film.md new file mode 100644 index 0000000000..d8c7ec283d --- /dev/null +++ b/.changeset/cold-apples-film.md @@ -0,0 +1,9 @@ +--- +'example-app': patch +'@backstage/plugin-catalog': patch +--- + +Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'. +With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. + +The boolean input for "unregister entity" will be deprecated later in favour of the above three options. diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index ab8c02c168..fc17ccf909 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -168,7 +168,7 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { }; const options: contextMenuOptions = { - disableUnregister: false, + disableUnregister: 'visible', }; return ( From 8ebc1dea21c221e5395945026d8de46b619aa358 Mon Sep 17 00:00:00 2001 From: Maximilian Ressel Date: Tue, 31 May 2022 16:08:50 +0200 Subject: [PATCH 003/212] Add allowedRepos Option and move Repo Field to own Component Signed-off-by: Maximilian Ressel --- .../fields/RepoUrlPicker/AzureRepoPicker.tsx | 15 +--- .../RepoUrlPicker/BitbucketRepoPicker.tsx | 15 +--- .../fields/RepoUrlPicker/GerritRepoPicker.tsx | 15 +--- .../fields/RepoUrlPicker/GithubRepoPicker.tsx | 15 +--- .../fields/RepoUrlPicker/GitlabRepoPicker.tsx | 18 +---- .../fields/RepoUrlPicker/RepoUrlPicker.tsx | 19 +++++ .../RepoUrlPicker/RepoUrlPickerRepoName.tsx | 77 +++++++++++++++++++ 7 files changed, 103 insertions(+), 71 deletions(-) create mode 100644 plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx index 0efadf4017..0246c67801 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx @@ -27,7 +27,7 @@ export const AzureRepoPicker = (props: { rawErrors: string[]; }) => { const { rawErrors, state, onChange } = props; - const { organization, repoName, owner } = state; + const { organization, owner } = state; return ( <> The Owner that this repo will belong to - 0 && !repoName} - > - Repository - onChange({ repoName: e.target.value })} - value={repoName} - /> - The name of the repository - ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.tsx index 64eb4b8dac..fc59398d94 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.tsx @@ -26,7 +26,7 @@ export const BitbucketRepoPicker = (props: { rawErrors: string[]; }) => { const { onChange, rawErrors, state } = props; - const { host, workspace, project, repoName } = state; + const { host, workspace, project } = state; return ( <> {host === 'bitbucket.org' && ( @@ -61,19 +61,6 @@ export const BitbucketRepoPicker = (props: { The Project that this repo will belong to - 0 && !repoName} - > - Repository - onChange({ repoName: e.target.value })} - value={repoName} - /> - The name of the repository - ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.tsx index 4cbc0859e8..f021948532 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.tsx @@ -26,7 +26,7 @@ export const GerritRepoPicker = (props: { rawErrors: string[]; }) => { const { onChange, rawErrors, state } = props; - const { workspace, repoName, owner } = state; + const { workspace, owner } = state; return ( <> - 0 && !repoName} - > - Repository - onChange({ repoName: e.target.value })} - value={repoName} - /> - The name of the repository - ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.tsx index 13b57cb449..ec59d89ef8 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.tsx @@ -32,7 +32,7 @@ export const GithubRepoPicker = (props: { ? allowedOwners.map(i => ({ label: i, value: i })) : [{ label: 'Loading...', value: 'loading' }]; - const { owner, repoName } = state; + const { owner } = state; return ( <> @@ -66,19 +66,6 @@ export const GithubRepoPicker = (props: { The organization, user or project that this repo will belong to - 0 && !repoName} - > - Repository - onChange({ repoName: e.target.value })} - value={repoName} - /> - The name of the repository - ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.tsx index e2052b792f..c628b364b9 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.tsx @@ -23,16 +23,17 @@ import { RepoUrlPickerState } from './types'; export const GitlabRepoPicker = (props: { allowedOwners?: string[]; + allowedRepos?: string[]; state: RepoUrlPickerState; onChange: (state: RepoUrlPickerState) => void; rawErrors: string[]; }) => { - const { allowedOwners = [], rawErrors, state, onChange } = props; + const { allowedOwners = [], state, onChange, rawErrors } = props; const ownerItems: SelectItem[] = allowedOwners ? allowedOwners.map(i => ({ label: i, value: i })) : [{ label: 'Loading...', value: 'loading' }]; - const { owner, repoName } = state; + const { owner } = state; return ( <> @@ -69,19 +70,6 @@ export const GitlabRepoPicker = (props: { namespaces in gitlab), that this repo will belong to - 0 && !repoName} - > - Repository - onChange({ repoName: e.target.value })} - value={repoName} - /> - The name of the repository - ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index 6f762933b6..b36b332d9e 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -26,6 +26,7 @@ import { BitbucketRepoPicker } from './BitbucketRepoPicker'; import { GerritRepoPicker } from './GerritRepoPicker'; import { FieldExtensionComponentProps } from '../../../extensions'; import { RepoUrlPickerHost } from './RepoUrlPickerHost'; +import { RepoUrlPickerRepoName } from './RepoUrlPickerRepoName'; import { parseRepoPickerUrl, serializeRepoPickerUrl } from './utils'; import { RepoUrlPickerState } from './types'; import useDebounce from 'react-use/lib/useDebounce'; @@ -40,6 +41,7 @@ import { useTemplateSecrets } from '../../secrets'; export interface RepoUrlPickerUiOptions { allowedHosts?: string[]; allowedOwners?: string[]; + allowedRepos?: string[]; requestUserCredentials?: { secretsKey: string; additionalScopes?: { @@ -76,6 +78,10 @@ export const RepoUrlPicker = ( () => uiSchema?.['ui:options']?.allowedOwners ?? [], [uiSchema], ); + const allowedRepos = useMemo( + () => uiSchema?.['ui:options']?.allowedRepos ?? [], + [uiSchema], + ); useEffect(() => { onChange(serializeRepoPickerUrl(state)); @@ -87,6 +93,11 @@ export const RepoUrlPicker = ( setState(prevState => ({ ...prevState, owner: allowedOwners[0] })); } }, [setState, allowedOwners]); + useEffect(() => { + if (allowedRepos.length === 1) { + setState(prevState => ({ ...prevState, repoName: allowedRepos[0] })); + } + }, [setState, allowedRepos]); const updateLocalState = useCallback( (newState: RepoUrlPickerState) => { @@ -179,6 +190,14 @@ export const RepoUrlPicker = ( onChange={updateLocalState} /> )} + + setState(prevState => ({ ...prevState, repoName })) + } + rawErrors={rawErrors} + /> ); }; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx new file mode 100644 index 0000000000..f2d68b08f3 --- /dev/null +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx @@ -0,0 +1,77 @@ +/* + * 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 React, { useEffect } from 'react'; +import { Select, SelectItem } from '@backstage/core-components'; +import FormControl from '@material-ui/core/FormControl'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import Input from '@material-ui/core/Input'; +import InputLabel from '@material-ui/core/InputLabel'; + +export const RepoUrlPickerRepoName = (props: { + repoName?: string; + allowedRepos?: string[]; + onChange: (host: string) => void; + rawErrors: string[]; +}) => { + const { repoName, allowedRepos, onChange, rawErrors } = props; + + useEffect(() => { + // If there is no repoName chosen currently + if (!repoName) { + // Set the first of the allowedRepos option if that available + if (allowedRepos?.length) { + onChange(allowedRepos[0]); + } + } + }, [allowedRepos, repoName, onChange]); + + const repoItems: SelectItem[] = allowedRepos + ? allowedRepos.map(i => ({ label: i, value: i })) + : [{ label: 'Loading...', value: 'loading' }]; + + return ( + <> + 0 && !repoName} + > + {allowedRepos?.length ? ( + onChange(String(e.target.value))} + value={repoName} + /> + + )} + The name of the repository + + + ); +}; From d8eb82f4474f04f413896deee1fccf2db20287d9 Mon Sep 17 00:00:00 2001 From: Maixmilian Ressel Date: Wed, 15 Jun 2022 16:46:57 +0200 Subject: [PATCH 004/212] Add changeset Signed-off-by: Maixmilian Ressel --- .changeset/hot-rice-sin.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/hot-rice-sin.md diff --git a/.changeset/hot-rice-sin.md b/.changeset/hot-rice-sin.md new file mode 100644 index 0000000000..5a7363bdc8 --- /dev/null +++ b/.changeset/hot-rice-sin.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +RepoUrlPicker: Add allowedRepos option and move repoName field to own component From 2de3fc32316cf7256633a5cbb1b7306ce5cc33cc Mon Sep 17 00:00:00 2001 From: Maixmilian Ressel Date: Wed, 15 Jun 2022 17:18:44 +0200 Subject: [PATCH 005/212] Add documentation for allowedOwners and allowedRepos Signed-off-by: Maixmilian Ressel --- .../software-templates/writing-templates.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 27e6e76817..4b11cc4990 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -320,6 +320,30 @@ The `allowedHosts` part should be set to where you wish to enable this template to publish to. And it can be any host that is listed in your `integrations` config in `app-config.yaml`. +Besides specifying `allowedHosts` you can also restrict the template to publish to +repositories owned by specific users/groups/namespaces by setting the `allowedOwners` +option. With the `allowedRepos` option you are able to narrow it down further to a +specific set of repository names. A full example could look like this: + +```yaml +- title: Choose a location + required: + - repoUrl + properties: + repoUrl: + title: Repository Location + type: string + ui:field: RepoUrlPicker + ui:options: + allowedHosts: + - github.com + allowedOwners: + - backstage + - someGithubUser + allowedRepos: + - backstage +``` + The `RepoUrlPicker` is a custom field that we provide part of the `plugin-scaffolder`. You can provide your own custom fields by [writing your own Custom Field Extensions](./writing-custom-field-extensions.md) From 9d8ec897eb3a7f64153513983d5ed69c96ba32a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Tresarrieu?= Date: Thu, 16 Jun 2022 20:22:27 +0200 Subject: [PATCH 006/212] feat(MarkdownContent): Expose `transformLinkUri` and `transformImageUri` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Tresarrieu --- .../MarkdownContent/MarkdownContent.test.tsx | 38 +++++++++++++++++++ .../MarkdownContent/MarkdownContent.tsx | 12 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx index 2e1550078f..9c08b83c40 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -62,4 +62,42 @@ describe('', () => { expect(fp2).toBeInTheDocument(); expect(rendered.getByText(');', { selector: 'span' })).toBeInTheDocument(); }); + + it('render MarkdownContent component with transformed link', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + { + return `${href}-modified`; + }} + />, + ), + ); + const fp1 = rendered.getByText('Title', { + selector: 'a', + }); + expect(fp1).toBeInTheDocument(); + expect(fp1.getAttribute('href')).toEqual( + 'https://backstage.io/link-modified', + ); + }); + + it('render MarkdownContent component with transformed image', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + { + return `https://example.com/blog/assets/6/header.png`; + }} + />, + ), + ); + const fp1 = rendered.getByAltText('Image'); + expect(fp1).toBeInTheDocument(); + expect(fp1.getAttribute('src')).toEqual( + 'https://example.com/blog/assets/6/header.png', + ); + }); }); diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index df4ad56776..4059482b79 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -68,6 +68,8 @@ type Props = { content: string; dialect?: 'gfm' | 'common-mark'; linkTarget?: Options['linkTarget']; + transformLinkUri?: Options['transformLinkUri']; + transformImageUri?: Options['transformImageUri']; }; const components: Options['components'] = { @@ -91,7 +93,13 @@ const components: Options['components'] = { * If you just want to render to plain [CommonMark](https://commonmark.org/), set the dialect to `'common-mark'` */ export function MarkdownContent(props: Props) { - const { content, dialect = 'gfm', linkTarget } = props; + const { + content, + dialect = 'gfm', + linkTarget, + transformLinkUri, + transformImageUri, + } = props; const classes = useStyles(); return ( ); } From 32204fa79454a1ef5907b6cd5616e022a14b335b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Tresarrieu?= Date: Thu, 16 Jun 2022 20:23:14 +0200 Subject: [PATCH 007/212] chore: add changeset file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Tresarrieu --- .changeset/cool-toys-flow.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cool-toys-flow.md diff --git a/.changeset/cool-toys-flow.md b/.changeset/cool-toys-flow.md new file mode 100644 index 0000000000..799bf3ace4 --- /dev/null +++ b/.changeset/cool-toys-flow.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': minor +--- + +Add `transformLinkUri` and `transformImageUri` to `MarkdownContent` From 874782422123e8b83f5ed428489e2fe10f24c859 Mon Sep 17 00:00:00 2001 From: planeiii Date: Thu, 16 Jun 2022 14:49:36 -0500 Subject: [PATCH 008/212] feat(jenkins-backend): add multiple branch support Signed-off-by: planeiii --- .changeset/many-vans-thank.md | 8 ++++++ .../src/service/jenkinsApi.test.ts | 28 +++++++++++++++++++ .../jenkins-backend/src/service/jenkinsApi.ts | 13 +++++---- plugins/jenkins/README.md | 7 +++-- 4 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 .changeset/many-vans-thank.md diff --git a/.changeset/many-vans-thank.md b/.changeset/many-vans-thank.md new file mode 100644 index 0000000000..942aa4cc7c --- /dev/null +++ b/.changeset/many-vans-thank.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-jenkins': patch +'@backstage/plugin-jenkins-backend': patch +--- + +--- + +feature: added support for multiple branches to the `JenkinsApi` diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.test.ts b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts index 29da414470..ad1a09a40f 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.test.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts @@ -134,6 +134,34 @@ describe('JenkinsApi', () => { }); expect(result).toHaveLength(1); }); + + it('supports multiple branches', async () => { + mockedJenkinsClient.job.get.mockResolvedValue(project); + + const result = await jenkinsApi.getProjects( + jenkinsInfo, + 'foo,bar,catpants', + ); + + expect(mockedJenkins).toHaveBeenCalledWith({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: `${jenkinsInfo.jobFullName}/foo`, + tree: expect.anything(), + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: `${jenkinsInfo.jobFullName}/bar`, + tree: expect.anything(), + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: `${jenkinsInfo.jobFullName}/catpants`, + tree: expect.anything(), + }); + expect(result).toHaveLength(1); + }); }); describe('augmented', () => { const projectWithScmActions: JenkinsProject = { diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts index 8069f57692..07469dc83a 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -75,13 +75,16 @@ export class JenkinsApiImpl { const projects: BackstageProject[] = []; if (branch) { - // we have been asked to filter to a single branch. // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. // TODO: extract a strategy interface for this - const job = await client.job.get({ - name: `${jenkinsInfo.jobFullName}/${branch}`, - tree: JenkinsApiImpl.jobTreeSpec.replace(/\s/g, ''), - }); + const job = await Promise.any( + branch.split(/,/g).map(name => + client.job.get({ + name: `${jenkinsInfo.jobFullName}/${name}`, + tree: JenkinsApiImpl.jobTreeSpec.replace(/\s/g, ''), + }), + ), + ); projects.push(this.augmentProject(job)); } else { // We aren't filtering diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index 80e39d2095..2a0ec451c8 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -19,7 +19,7 @@ yarn add --cwd packages/app @backstage/plugin-jenkins 3. Add the `EntityJenkinsContent` extension to the `CI/CD` page and `EntityLatestJenkinsRunCard` to the `overview` page in the app (or wherever you'd prefer): -Note that if you configured a custom JenkinsInfoProvider in step 2, you may need a custom isJenkinsAvailable. +Note that if you configured a custom JenkinsInfoProvider in step 2, you may need a custom isJenkinsAvailable. Also if you're transitioning to a new default branch name, you can pass multiple branch names as a comma-separated list and it will check for each branch name. ```tsx // In packages/app/src/components/catalog/EntityPage.tsx @@ -38,7 +38,10 @@ const serviceEntityPage = ( - + {/* ... */} From 7e35d62a13baef3aeafbe0d28cb9b02395234c40 Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 14:24:03 +0200 Subject: [PATCH 009/212] docs: custom tempalte actions clearly express that the builtin actions are replaced Signed-off-by: Vladimir Masarik --- docs/features/software-templates/writing-custom-actions.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 8e698e1a05..635a373eb3 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -9,8 +9,9 @@ by writing custom actions which can be used along side our [built-in actions](./builtin-actions.md). > Note: When adding custom actions, the actions array will **replace the -> built-in actions too**. To ensure you can continue to include the builtin -> actions, see below to include them during registration of your action. +> built-in actions too**. Meaning, you will no longer be able to use them. +> If you want to continue using the builtin actions, include them in the actions +> array when registering your custom actions, as seen below. ## Writing your Custom Action From 1ee1a02d676199a7425c774824661acade56db48 Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 14:26:56 +0200 Subject: [PATCH 010/212] docs: custom template actions update code exmaple Users don't need the container runner, and variables have to be passed in differently Signed-off-by: Vladimir Masarik --- .../writing-custom-actions.md | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 635a373eb3..abff0cf7c7 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -123,27 +123,32 @@ will set the available actions that the scaffolder has access to. ```ts import { createBuiltinActions } from '@backstage/plugin-scaffolder-backend'; import { ScmIntegrations } from '@backstage/integration'; +import { createNewFileAction } from './actions/custom'; -const integrations = ScmIntegrations.fromConfig(env.config); +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + const catalogClient = new CatalogClient({ discoveryApi: env.discovery }); + const integrations = ScmIntegrations.fromConfig(env.config); -const builtInActions = createBuiltinActions({ - containerRunner, - integrations, - catalogClient, - config: env.config, - reader: env.reader, -}); + const builtInActions = createBuiltinActions({ + integrations, + catalogClient, + config: env.config, + reader: env.reader, + }); + + const actions = [...builtInActions, createNewFileAction()]; -const actions = [...builtInActions, createNewFileAction()]; -return await createRouter({ - containerRunner, - catalogClient, - actions, - logger: env.logger, - config: env.config, - database: env.database, - reader: env.reader, -}); + return createRouter({ + actions, + catalogClient: catalogClient, + logger: env.logger, + config: env.config, + database: env.database, + reader: env.reader, + }); +} ``` ## List of custom action packages From 4ae8c4b0b76b20b04ca48dba6fbb33c1b20083fc Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 14:49:33 +0200 Subject: [PATCH 011/212] docs: Adding templates, add template as a file example Signed-off-by: Vladimir Masarik --- docs/features/software-templates/adding-templates.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/features/software-templates/adding-templates.md b/docs/features/software-templates/adding-templates.md index db765fc7ee..821e44b0ab 100644 --- a/docs/features/software-templates/adding-templates.md +++ b/docs/features/software-templates/adding-templates.md @@ -97,6 +97,8 @@ catalog: target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml rules: - allow: [Template] + - type: file + target: template.yaml # Backstage will expect the file to be in packages/backend/template.yaml ``` Or you can add the template using the `catalog-import` plugin, which unless From 7fc1f50f57ff01c24ccdddf43871bd02afe83760 Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 15:00:58 +0200 Subject: [PATCH 012/212] docs: Adding templates, added note for users that they need to refresh the location Othwise, backstage won't display the updated or newly added template, and it won't report any errors either. Signed-off-by: Vladimir Masarik --- docs/features/software-templates/adding-templates.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/features/software-templates/adding-templates.md b/docs/features/software-templates/adding-templates.md index 821e44b0ab..62604df1b7 100644 --- a/docs/features/software-templates/adding-templates.md +++ b/docs/features/software-templates/adding-templates.md @@ -86,6 +86,13 @@ contains more information about the required fields. Once we have a `template.yaml` ready, we can then add it to the software catalog for use by the scaffolder. +> Note: When you add or modify a template, you will need to refresh the location entity. +> Otherwise, Backstage won't display the template in the available templates, +> or it will keep showing the old template. You can refresh the location instance by +> going into `Catalog` web page, choosing `Locations` instead of `Components`, and selecting the correct location entity. +> From there, you can click on the refresh icon representing "Sheduled entity refresh" action. +> Afterwards, you should see your template updated. + You can add the template files to the catalog through [static location configuration](../software-catalog/configuration.md#static-location-configuration), for example: From a6321c9b9f6a9b78ee525c6af66f1ec5b98c6d6a Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 15:25:14 +0200 Subject: [PATCH 013/212] docs: writing templates, add examples of how to use values Add information on how to actually use the parameters from the UI in the actual code so that users can fully utilize the templating power of the default templating action. Signed-off-by: Vladimir Masarik --- .../software-templates/writing-templates.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index ff9962d8d4..5597916bee 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -485,6 +485,66 @@ the value of `firstName` from the parameters). This is great for passing the values from the form into different steps and reusing these input variables. These template strings preserve the type of the parameter. +The `${{ parameters.firstName }}` pattern will work only in the template file. +If you want to start using values provided from the UI in your code, you will have to use +the `${{ values.firstName }}` pattern. Additionally, you have to pass +the parameters from the UI to the input of the `fetch:template` step. + +```yaml +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +metadata: + name: v1beta3-demo + title: Test Action + description: scaffolder v1beta3 template demo +spec: + owner: backstage/techdocs-core + type: service + parameters: + - title: Fill in some steps + required: + - name + properties: + name: + title: Name + type: string + description: Unique name of your project + urlParameter: + title: URL endpoint + type: string + description: URL endpoint at which the component can be reached + default: "https://www.example.com" + enabledDB: + title: Enable Database + type: boolean + default: false + +... + + steps: + - id: fetch-base + name: Fetch Base + action: fetch:template + input: + url: ./template + values: + name: ${{ parameters.name }} + url: ${{ parameters.urlParameter }} + enabledDB: ${{ parameters.enabledDB }} +``` + +Afterwards, if you are using the builtin templating action, you can start using +the variables in your code. You can use also any other templating fuctions from +[Nunjucks](https://mozilla.github.io/nunjucks/templating.html#tags) as well. + +```bash +#!/bin/bash +echo "Hi my name is ${{ values.name }}, and you can fine me at ${{ values.url }}!" +{% if values.enabledDB %} +echo "You have enabled your database!" +{% endif %} +``` + As you can see above in the `Outputs` section, `actions` and `steps` can also output things. You can grab that output using `steps.$stepId.output.$property`. From e81be86682cee2a94c71aeaa593726b1a9dd190e Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 17 Jun 2022 16:01:37 +0200 Subject: [PATCH 014/212] docs: fix template typos Signed-off-by: Vladimir Masarik --- docs/features/software-templates/adding-templates.md | 2 +- docs/features/software-templates/writing-templates.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/software-templates/adding-templates.md b/docs/features/software-templates/adding-templates.md index 62604df1b7..e8176a688b 100644 --- a/docs/features/software-templates/adding-templates.md +++ b/docs/features/software-templates/adding-templates.md @@ -90,7 +90,7 @@ for use by the scaffolder. > Otherwise, Backstage won't display the template in the available templates, > or it will keep showing the old template. You can refresh the location instance by > going into `Catalog` web page, choosing `Locations` instead of `Components`, and selecting the correct location entity. -> From there, you can click on the refresh icon representing "Sheduled entity refresh" action. +> From there, you can click on the refresh icon representing "Scheduled entity refresh" action. > Afterwards, you should see your template updated. You can add the template files to the catalog through diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 5597916bee..3173a0500a 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -534,7 +534,7 @@ spec: ``` Afterwards, if you are using the builtin templating action, you can start using -the variables in your code. You can use also any other templating fuctions from +the variables in your code. You can use also any other templating functions from [Nunjucks](https://mozilla.github.io/nunjucks/templating.html#tags) as well. ```bash From ea07eb0bc8932ab68d7f1cc3d6bf2cae30655d91 Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Sat, 18 Jun 2022 14:02:10 +0100 Subject: [PATCH 015/212] feat: introduce github:repo:create github:repo:push scaffolder actions Signed-off-by: Marco Crivellaro --- .../actions/builtin/createBuiltinActions.ts | 39 +- .../builtin/github/githubRepoCreate.test.ts | 416 ++++++++++++++++++ .../builtin/github/githubRepoCreate.ts | 337 ++++++++++++++ .../builtin/github/githubRepoPush.test.ts | 400 +++++++++++++++++ .../actions/builtin/github/githubRepoPush.ts | 224 ++++++++++ .../actions/builtin/github/index.ts | 4 +- 6 files changed, 1405 insertions(+), 15 deletions(-) create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.test.ts create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts index 2ffbc09ce5..91f1e180d0 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts @@ -15,25 +15,34 @@ */ import { UrlReader } from '@backstage/backend-common'; -import { JsonObject } from '@backstage/types'; import { CatalogApi } from '@backstage/catalog-client'; -import { - GithubCredentialsProvider, - ScmIntegrations, - DefaultGithubCredentialsProvider, -} from '@backstage/integration'; import { Config } from '@backstage/config'; import { - createCatalogWriteAction, + DefaultGithubCredentialsProvider, + GithubCredentialsProvider, + ScmIntegrations, +} from '@backstage/integration'; +import { JsonObject } from '@backstage/types'; +import { createCatalogRegisterAction, + createCatalogWriteAction, } from './catalog'; +import { TemplateFilter } from '../../../lib'; +import { TemplateAction } from '../types'; import { createDebugLogAction } from './debug'; import { createFetchPlainAction, createFetchTemplateAction } from './fetch'; import { createFilesystemDeleteAction, createFilesystemRenameAction, } from './filesystem'; +import { + createGithubActionsDispatchAction, + createGithubIssuesLabelAction, + createGithubRepoCreateAction, + createGithubRepoPushAction, + createGithubWebhookAction, +} from './github'; import { createPublishAzureAction, createPublishBitbucketAction, @@ -45,13 +54,6 @@ import { createPublishGitlabAction, createPublishGitlabMergeRequestAction, } from './publish'; -import { - createGithubActionsDispatchAction, - createGithubWebhookAction, - createGithubIssuesLabelAction, -} from './github'; -import { TemplateFilter } from '../../../lib'; -import { TemplateAction } from '../types'; /** * The options passed to {@link createBuiltinActions} @@ -165,6 +167,15 @@ export const createBuiltinActions = ( integrations, githubCredentialsProvider, }), + createGithubRepoCreateAction({ + integrations, + githubCredentialsProvider, + }), + createGithubRepoPushAction({ + integrations, + config, + githubCredentialsProvider, + }), ]; return actions as TemplateAction[]; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts new file mode 100644 index 0000000000..0e7e907917 --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts @@ -0,0 +1,416 @@ +/* + * 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 { TemplateAction } from '../../types'; + +jest.mock('../helpers'); + +import { getVoidLogger } from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; +import { + DefaultGithubCredentialsProvider, + GithubCredentialsProvider, + ScmIntegrations, +} from '@backstage/integration'; +import { when } from 'jest-when'; +import { PassThrough } from 'stream'; +import { createGithubRepoCreateAction } from './githubRepoCreate'; + +const mockOctokit = { + rest: { + users: { + getByUsername: jest.fn(), + }, + repos: { + addCollaborator: jest.fn(), + createInOrg: jest.fn(), + createForAuthenticatedUser: jest.fn(), + replaceAllTopics: jest.fn(), + }, + teams: { + addOrUpdateRepoPermissionsInOrg: jest.fn(), + }, + }, +}; +jest.mock('octokit', () => ({ + Octokit: class { + constructor() { + return mockOctokit; + } + }, +})); + +describe('github:repo:create', () => { + const config = new ConfigReader({ + integrations: { + github: [ + { host: 'github.com', token: 'tokenlols' }, + { host: 'ghe.github.com' }, + ], + }, + }); + + const integrations = ScmIntegrations.fromConfig(config); + let githubCredentialsProvider: GithubCredentialsProvider; + let action: TemplateAction; + + const mockContext = { + input: { + repoUrl: 'github.com?repo=repo&owner=owner', + description: 'description', + repoVisibility: 'private' as const, + access: 'owner/blam', + }, + workspacePath: 'lol', + logger: getVoidLogger(), + logStream: new PassThrough(), + output: jest.fn(), + createTemporaryDirectory: jest.fn(), + }; + + beforeEach(() => { + jest.resetAllMocks(); + githubCredentialsProvider = + DefaultGithubCredentialsProvider.fromIntegrations(integrations); + action = createGithubRepoCreateAction({ + integrations, + githubCredentialsProvider, + }); + }); + + it('should call the githubApis with the correct values for createInOrg', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'Organization' }, + }); + + mockOctokit.rest.repos.createInOrg.mockResolvedValue({ data: {} }); + + await action.handler(mockContext); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + visibility: 'private', + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + repoVisibility: 'public', + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: false, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + visibility: 'public', + }); + }); + + it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: {}, + }); + + await action.handler(mockContext); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + repoVisibility: 'public', + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: false, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + }); + }); + + it('should add access for the team when it starts with the owner', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect( + mockOctokit.rest.teams.addOrUpdateRepoPermissionsInOrg, + ).toHaveBeenCalledWith({ + org: 'owner', + team_slug: 'blam', + owner: 'owner', + repo: 'repo', + permission: 'admin', + }); + }); + + it('should add outside collaborators when provided', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + access: 'outsidecollaborator', + }, + }); + + expect(mockOctokit.rest.repos.addCollaborator).toHaveBeenCalledWith({ + username: 'outsidecollaborator', + owner: 'owner', + repo: 'repo', + permission: 'admin', + }); + }); + + it('should add multiple collaborators when provided', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + collaborators: [ + { + access: 'pull', + user: 'robot-1', + }, + { + access: 'push', + team: 'robot-2', + }, + ], + }, + }); + + const commonProperties = { + owner: 'owner', + repo: 'repo', + }; + + expect(mockOctokit.rest.repos.addCollaborator).toHaveBeenCalledWith({ + ...commonProperties, + username: 'robot-1', + permission: 'pull', + }); + + expect( + mockOctokit.rest.teams.addOrUpdateRepoPermissionsInOrg, + ).toHaveBeenCalledWith({ + ...commonProperties, + org: 'owner', + team_slug: 'robot-2', + permission: 'push', + }); + }); + + it('should ignore failures when adding multiple collaborators', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + when(mockOctokit.rest.teams.addOrUpdateRepoPermissionsInOrg) + .calledWith({ + org: 'owner', + owner: 'owner', + repo: 'repo', + team_slug: 'robot-1', + permission: 'pull', + }) + .mockRejectedValueOnce(new Error('Something bad happened') as never); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + collaborators: [ + { + access: 'pull', + team: 'robot-1', + }, + { + access: 'push', + team: 'robot-2', + }, + ], + }, + }); + + expect( + mockOctokit.rest.teams.addOrUpdateRepoPermissionsInOrg.mock.calls[2], + ).toEqual([ + { + org: 'owner', + owner: 'owner', + repo: 'repo', + team_slug: 'robot-2', + permission: 'push', + }, + ]); + }); + + it('should add topics when provided', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + mockOctokit.rest.repos.replaceAllTopics.mockResolvedValue({ + data: { + names: ['node.js'], + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + topics: ['node.js'], + }, + }); + + expect(mockOctokit.rest.repos.replaceAllTopics).toHaveBeenCalledWith({ + owner: 'owner', + repo: 'repo', + names: ['node.js'], + }); + }); + + it('should lowercase topics when provided', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + mockOctokit.rest.repos.replaceAllTopics.mockResolvedValue({ + data: { + names: ['backstage'], + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + topics: ['BACKSTAGE'], + }, + }); + + expect(mockOctokit.rest.repos.replaceAllTopics).toHaveBeenCalledWith({ + owner: 'owner', + repo: 'repo', + names: ['backstage'], + }); + }); + + it('should call output with the remoteUrl', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect(mockContext.output).toHaveBeenCalledWith( + 'remoteUrl', + 'https://github.com/clone/url.git', + ); + }); +}); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts new file mode 100644 index 0000000000..494a47516c --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -0,0 +1,337 @@ +/* + * 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 { assertError, InputError } from '@backstage/errors'; +import { + GithubCredentialsProvider, + ScmIntegrationRegistry, +} from '@backstage/integration'; +import { Octokit } from 'octokit'; +import { createTemplateAction } from '../../createTemplateAction'; +import { parseRepoUrl } from '../publish/util'; +import { getOctokitOptions } from './helpers'; + +/** + * Creates a new action that initializes a git repository + * + * @public + */ +export function createGithubRepoCreateAction(options: { + integrations: ScmIntegrationRegistry; + githubCredentialsProvider?: GithubCredentialsProvider; +}) { + const { integrations, githubCredentialsProvider } = options; + + return createTemplateAction<{ + repoUrl: string; + description?: string; + access?: string; + deleteBranchOnMerge?: boolean; + gitAuthorName?: string; + gitAuthorEmail?: string; + allowRebaseMerge?: boolean; + allowSquashMerge?: boolean; + allowMergeCommit?: boolean; + requireCodeOwnerReviews?: boolean; + requiredStatusCheckContexts?: string[]; + repoVisibility?: 'private' | 'internal' | 'public'; + collaborators?: Array< + | { + user: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + | { + team: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + >; + token?: string; + topics?: string[]; + }>({ + id: 'github:repo:create', + description: 'Creates a GitHub repository.', + schema: { + input: { + type: 'object', + required: ['repoUrl'], + properties: { + repoUrl: { + title: 'Repository Location', + description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, + type: 'string', + }, + description: { + title: 'Repository Description', + type: 'string', + }, + access: { + title: 'Repository Access', + description: `Sets an admin collaborator on the repository. Can either be a user reference different from 'owner' in 'repoUrl' or team reference, eg. 'org/team-name'`, + type: 'string', + }, + requireCodeOwnerReviews: { + title: 'Require CODEOWNER Reviews?', + description: + 'Require an approved review in PR including files with a designated Code Owner', + type: 'boolean', + }, + requiredStatusCheckContexts: { + title: 'Required Status Check Contexts', + description: + 'The list of status checks to require in order to merge into this branch', + type: 'array', + items: { + type: 'string', + }, + }, + repoVisibility: { + title: 'Repository Visibility', + type: 'string', + enum: ['private', 'public', 'internal'], + }, + deleteBranchOnMerge: { + title: 'Delete Branch On Merge', + type: 'boolean', + description: `Delete the branch after merging the PR. The default value is 'false'`, + }, + gitAuthorName: { + title: 'Default Author Name', + type: 'string', + description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, + }, + gitAuthorEmail: { + title: 'Default Author Email', + type: 'string', + description: `Sets the default author email for the commit.`, + }, + allowMergeCommit: { + title: 'Allow Merge Commits', + type: 'boolean', + description: `Allow merge commits. The default value is 'true'`, + }, + allowSquashMerge: { + title: 'Allow Squash Merges', + type: 'boolean', + description: `Allow squash merges. The default value is 'true'`, + }, + allowRebaseMerge: { + title: 'Allow Rebase Merges', + type: 'boolean', + description: `Allow rebase merges. The default value is 'true'`, + }, + collaborators: { + title: 'Collaborators', + description: 'Provide additional users or teams with permissions', + type: 'array', + items: { + type: 'object', + additionalProperties: false, + required: ['access'], + properties: { + access: { + type: 'string', + description: 'The type of access for the user', + enum: ['push', 'pull', 'admin', 'maintain', 'triage'], + }, + user: { + type: 'string', + description: + 'The name of the user that will be added as a collaborator', + }, + team: { + type: 'string', + description: + 'The name of the team that will be added as a collaborator', + }, + }, + oneOf: [{ required: ['user'] }, { required: ['team'] }], + }, + }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The token to use for authorization to GitHub', + }, + topics: { + title: 'Topics', + type: 'array', + items: { + type: 'string', + }, + }, + }, + }, + output: { + type: 'object', + properties: { + remoteUrl: { + title: 'A URL to the repository with the provider', + type: 'string', + }, + repoContentsUrl: { + title: 'A URL to the root of the repository', + type: 'string', + }, + }, + }, + }, + async handler(ctx) { + const { + repoUrl, + description, + access, + repoVisibility = 'private', + deleteBranchOnMerge = false, + allowMergeCommit = true, + allowSquashMerge = true, + allowRebaseMerge = true, + collaborators, + topics, + token: providedToken, + } = ctx.input; + + const { owner, repo } = parseRepoUrl(repoUrl, integrations); + + if (!owner) { + throw new InputError('Invalid repository owner provided in repoUrl'); + } + + const octokitOptions = await getOctokitOptions({ + integrations, + credentialsProvider: githubCredentialsProvider, + token: providedToken, + repoUrl, + }); + + const client = new Octokit(octokitOptions); + + const user = await client.rest.users.getByUsername({ + username: owner, + }); + + const repoCreationPromise = + user.data.type === 'Organization' + ? client.rest.repos.createInOrg({ + name: repo, + org: owner, + private: repoVisibility === 'private', + visibility: repoVisibility, + description: description, + delete_branch_on_merge: deleteBranchOnMerge, + allow_merge_commit: allowMergeCommit, + allow_squash_merge: allowSquashMerge, + allow_rebase_merge: allowRebaseMerge, + }) + : client.rest.repos.createForAuthenticatedUser({ + name: repo, + private: repoVisibility === 'private', + description: description, + delete_branch_on_merge: deleteBranchOnMerge, + allow_merge_commit: allowMergeCommit, + allow_squash_merge: allowSquashMerge, + allow_rebase_merge: allowRebaseMerge, + }); + + let newRepo; + + try { + newRepo = (await repoCreationPromise).data; + } catch (e) { + assertError(e); + if (e.message === 'Resource not accessible by integration') { + ctx.logger.warn( + `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`, + ); + } + throw new Error( + `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`, + ); + } + + if (access?.startsWith(`${owner}/`)) { + const [, team] = access.split('/'); + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ + org: owner, + team_slug: team, + owner, + repo, + permission: 'admin', + }); + // No need to add access if it's the person who owns the personal account + } else if (access && access !== owner) { + await client.rest.repos.addCollaborator({ + owner, + repo, + username: access, + permission: 'admin', + }); + } + + if (collaborators) { + for (const collaborator of collaborators) { + try { + if ('user' in collaborator) { + await client.rest.repos.addCollaborator({ + owner, + repo, + username: collaborator.user, + permission: collaborator.access, + }); + } else if ('team' in collaborator) { + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ + org: owner, + team_slug: collaborator.team, + owner, + repo, + permission: collaborator.access, + }); + } + } catch (e) { + assertError(e); + const name = extractCollaboratorName(collaborator); + ctx.logger.warn( + `Skipping ${collaborator.access} access for ${name}, ${e.message}`, + ); + } + } + } + + if (topics) { + try { + await client.rest.repos.replaceAllTopics({ + owner, + repo, + names: topics.map(t => t.toLowerCase()), + }); + } catch (e) { + assertError(e); + ctx.logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`); + } + } + + const remoteUrl = newRepo.clone_url; + + ctx.output('remoteUrl', remoteUrl); + }, + }); +} + +function extractCollaboratorName( + collaborator: { user: string } | { team: string } | { username: string }, +) { + if ('username' in collaborator) return collaborator.username; + if ('user' in collaborator) return collaborator.user; + return collaborator.team; +} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.test.ts new file mode 100644 index 0000000000..f23e3dde9f --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.test.ts @@ -0,0 +1,400 @@ +/* + * 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 { TemplateAction } from '../../types'; + +jest.mock('../helpers'); + +import { getVoidLogger } from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; +import { + DefaultGithubCredentialsProvider, + GithubCredentialsProvider, + ScmIntegrations, +} from '@backstage/integration'; +import { PassThrough } from 'stream'; +import { + enableBranchProtectionOnDefaultRepoBranch, + initRepoAndPush, +} from '../helpers'; +import { createGithubRepoPushAction } from './githubRepoPush'; + +const mockOctokit = { + rest: { + repos: { + get: jest.fn(), + }, + }, +}; +jest.mock('octokit', () => ({ + Octokit: class { + constructor() { + return mockOctokit; + } + }, +})); + +describe('github:repo:push', () => { + const config = new ConfigReader({ + integrations: { + github: [ + { host: 'github.com', token: 'tokenlols' }, + { host: 'ghe.github.com' }, + ], + }, + }); + + const integrations = ScmIntegrations.fromConfig(config); + let githubCredentialsProvider: GithubCredentialsProvider; + let action: TemplateAction; + + const mockContext = { + input: { + repoUrl: 'github.com?repo=repository&owner=owner', + description: 'description', + repoVisibility: 'private' as const, + access: 'owner/blam', + }, + workspacePath: 'lol', + logger: getVoidLogger(), + logStream: new PassThrough(), + output: jest.fn(), + createTemporaryDirectory: jest.fn(), + }; + + beforeEach(() => { + jest.resetAllMocks(); + githubCredentialsProvider = + DefaultGithubCredentialsProvider.fromIntegrations(integrations); + action = createGithubRepoPushAction({ + integrations, + config, + githubCredentialsProvider, + }); + }); + + it('should call initRepoAndPush with the correct values', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect(initRepoAndPush).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + remoteUrl: 'https://github.com/clone/url.git', + defaultBranch: 'master', + auth: { username: 'x-access-token', password: 'tokenlols' }, + logger: mockContext.logger, + commitMessage: 'initial commit', + gitAuthorInfo: {}, + }); + }); + + it('should call initRepoAndPush with the correct defaultBranch main', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + defaultBranch: 'main', + }, + }); + + expect(initRepoAndPush).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + remoteUrl: 'https://github.com/clone/url.git', + defaultBranch: 'main', + auth: { username: 'x-access-token', password: 'tokenlols' }, + logger: mockContext.logger, + commitMessage: 'initial commit', + gitAuthorInfo: {}, + }); + }); + + it('should call initRepoAndPush with the configured defaultAuthor', async () => { + const customAuthorConfig = new ConfigReader({ + integrations: { + github: [ + { host: 'github.com', token: 'tokenlols' }, + { host: 'ghe.github.com' }, + ], + }, + scaffolder: { + defaultAuthor: { + name: 'Test', + email: 'example@example.com', + }, + }, + }); + + const customAuthorIntegrations = + ScmIntegrations.fromConfig(customAuthorConfig); + const customAuthorAction = createGithubRepoPushAction({ + integrations: customAuthorIntegrations, + config: customAuthorConfig, + githubCredentialsProvider, + }); + + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await customAuthorAction.handler(mockContext); + + expect(initRepoAndPush).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + remoteUrl: 'https://github.com/clone/url.git', + defaultBranch: 'master', + auth: { username: 'x-access-token', password: 'tokenlols' }, + logger: mockContext.logger, + commitMessage: 'initial commit', + gitAuthorInfo: { name: 'Test', email: 'example@example.com' }, + }); + }); + + it('should call initRepoAndPush with the configured defaultCommitMessage', async () => { + const customAuthorConfig = new ConfigReader({ + integrations: { + github: [ + { host: 'github.com', token: 'tokenlols' }, + { host: 'ghe.github.com' }, + ], + }, + scaffolder: { + defaultCommitMessage: 'Test commit message', + }, + }); + + const customAuthorIntegrations = + ScmIntegrations.fromConfig(customAuthorConfig); + const customAuthorAction = createGithubRepoPushAction({ + integrations: customAuthorIntegrations, + config: customAuthorConfig, + githubCredentialsProvider, + }); + + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await customAuthorAction.handler(mockContext); + + expect(initRepoAndPush).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + remoteUrl: 'https://github.com/clone/url.git', + defaultBranch: 'master', + auth: { username: 'x-access-token', password: 'tokenlols' }, + logger: mockContext.logger, + commitMessage: 'initial commit', + gitAuthorInfo: { email: undefined, name: undefined }, + }); + }); + + it('should call output with the remoteUrl and the repoContentsUrl', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect(mockContext.output).toHaveBeenCalledWith( + 'remoteUrl', + 'https://github.com/clone/url.git', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://github.com/html/url/blob/master', + ); + }); + + it('should use main as default branch', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + defaultBranch: 'main', + }, + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'remoteUrl', + 'https://github.com/clone/url.git', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://github.com/html/url/blob/main', + ); + }); + + it('should call enableBranchProtectionOnDefaultRepoBranch with the correct values of requireCodeOwnerReviews', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: false, + requiredStatusCheckContexts: [], + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + requireCodeOwnerReviews: true, + }, + }); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: true, + requiredStatusCheckContexts: [], + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + requireCodeOwnerReviews: false, + }, + }); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: false, + requiredStatusCheckContexts: [], + }); + }); + + it('should call enableBranchProtectionOnDefaultRepoBranch with the correct values of requiredStatusCheckContexts', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler(mockContext); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: false, + requiredStatusCheckContexts: [], + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + requiredStatusCheckContexts: ['statusCheck'], + }, + }); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: false, + requiredStatusCheckContexts: ['statusCheck'], + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + requiredStatusCheckContexts: [], + }, + }); + + expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ + owner: 'owner', + client: mockOctokit, + repoName: 'repository', + logger: mockContext.logger, + defaultBranch: 'master', + requireCodeOwnerReviews: false, + requiredStatusCheckContexts: [], + }); + }); + + it('should not call enableBranchProtectionOnDefaultRepoBranch with protectDefaultBranch disabled', async () => { + mockOctokit.rest.repos.get.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + protectDefaultBranch: false, + }, + }); + + expect(enableBranchProtectionOnDefaultRepoBranch).not.toHaveBeenCalled(); + }); +}); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts new file mode 100644 index 0000000000..cdf9a9b4e6 --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts @@ -0,0 +1,224 @@ +/* + * 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 { Config } from '@backstage/config'; +import { assertError, InputError } from '@backstage/errors'; +import { + GithubCredentialsProvider, + ScmIntegrationRegistry, +} from '@backstage/integration'; +import { Octokit } from 'octokit'; +import { createTemplateAction } from '../../createTemplateAction'; +import { + enableBranchProtectionOnDefaultRepoBranch, + initRepoAndPush, +} from '../helpers'; +import { getRepoSourceDirectory, parseRepoUrl } from '../publish/util'; +import { getOctokitOptions } from './helpers'; + +/** + * Creates a new action that initializes a git repository of the content in the workspace + * and publishes it to GitHub. + * + * @public + */ +export function createGithubRepoPushAction(options: { + integrations: ScmIntegrationRegistry; + config: Config; + githubCredentialsProvider?: GithubCredentialsProvider; +}) { + const { integrations, config, githubCredentialsProvider } = options; + + return createTemplateAction<{ + repoUrl: string; + description?: string; + defaultBranch?: string; + protectDefaultBranch?: boolean; + gitCommitMessage?: string; + gitAuthorName?: string; + gitAuthorEmail?: string; + requireCodeOwnerReviews?: boolean; + requiredStatusCheckContexts?: string[]; + sourcePath?: string; + token?: string; + }>({ + id: 'github:repo:push', + description: + 'Initializes a git repository of contents in workspace and publishes it to GitHub.', + schema: { + input: { + type: 'object', + required: ['repoUrl'], + properties: { + repoUrl: { + title: 'Repository Location', + description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, + type: 'string', + }, + requireCodeOwnerReviews: { + title: 'Require CODEOWNER Reviews?', + description: + 'Require an approved review in PR including files with a designated Code Owner', + type: 'boolean', + }, + requiredStatusCheckContexts: { + title: 'Required Status Check Contexts', + description: + 'The list of status checks to require in order to merge into this branch', + type: 'array', + items: { + type: 'string', + }, + }, + defaultBranch: { + title: 'Default Branch', + type: 'string', + description: `Sets the default branch on the repository. The default value is 'master'`, + }, + protectDefaultBranch: { + title: 'Protect Default Branch', + type: 'boolean', + description: `Protect the default branch after creating the repository. The default value is 'true'`, + }, + gitCommitMessage: { + title: 'Git Commit Message', + type: 'string', + description: `Sets the commit message on the repository. The default value is 'initial commit'`, + }, + gitAuthorName: { + title: 'Default Author Name', + type: 'string', + description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, + }, + gitAuthorEmail: { + title: 'Default Author Email', + type: 'string', + description: `Sets the default author email for the commit.`, + }, + sourcePath: { + title: 'Source Path', + description: + 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', + type: 'string', + }, + token: { + title: 'Authentication Token', + type: 'string', + description: 'The token to use for authorization to GitHub', + }, + topics: { + title: 'Topics', + type: 'array', + items: { + type: 'string', + }, + }, + }, + }, + output: { + type: 'object', + properties: { + remoteUrl: { + title: 'A URL to the repository with the provider', + type: 'string', + }, + repoContentsUrl: { + title: 'A URL to the root of the repository', + type: 'string', + }, + }, + }, + }, + async handler(ctx) { + const { + repoUrl, + defaultBranch = 'master', + protectDefaultBranch = true, + gitCommitMessage = 'initial commit', + gitAuthorName, + gitAuthorEmail, + requireCodeOwnerReviews = false, + requiredStatusCheckContexts = [], + token: providedToken, + } = ctx.input; + + const { owner, repo } = parseRepoUrl(repoUrl, integrations); + + if (!owner) { + throw new InputError('Invalid repository owner provided in repoUrl'); + } + + const octokitOptions = await getOctokitOptions({ + integrations, + credentialsProvider: githubCredentialsProvider, + token: providedToken, + repoUrl, + }); + + const client = new Octokit(octokitOptions); + + const targetRepo = await client.rest.repos.get({ owner, repo }); + + const remoteUrl = targetRepo.data.clone_url; + const repoContentsUrl = `${targetRepo.data.html_url}/blob/${defaultBranch}`; + + const gitAuthorInfo = { + name: gitAuthorName + ? gitAuthorName + : config.getOptionalString('scaffolder.defaultAuthor.name'), + email: gitAuthorEmail + ? gitAuthorEmail + : config.getOptionalString('scaffolder.defaultAuthor.email'), + }; + + await initRepoAndPush({ + dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), + remoteUrl, + defaultBranch, + auth: { + username: 'x-access-token', + password: octokitOptions.auth, + }, + logger: ctx.logger, + commitMessage: gitCommitMessage + ? gitCommitMessage + : config.getOptionalString('scaffolder.defaultCommitMessage'), + gitAuthorInfo, + }); + + if (protectDefaultBranch) { + try { + await enableBranchProtectionOnDefaultRepoBranch({ + owner, + client, + repoName: repo, + logger: ctx.logger, + defaultBranch, + requireCodeOwnerReviews, + requiredStatusCheckContexts, + }); + } catch (e) { + assertError(e); + ctx.logger.warn( + `Skipping: default branch protection on '${repo}', ${e.message}`, + ); + } + } + + ctx.output('remoteUrl', remoteUrl); + ctx.output('repoContentsUrl', repoContentsUrl); + }, + }); +} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/index.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/index.ts index c5788afc3a..6746aef37e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/index.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/index.ts @@ -15,5 +15,7 @@ */ export { createGithubActionsDispatchAction } from './githubActionsDispatch'; -export { createGithubWebhookAction } from './githubWebhook'; export { createGithubIssuesLabelAction } from './githubIssuesLabel'; +export { createGithubRepoCreateAction } from './githubRepoCreate'; +export { createGithubRepoPushAction } from './githubRepoPush'; +export { createGithubWebhookAction } from './githubWebhook'; From 2db07887cb8f37f47afd0626626425c56e4fd40b Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Sat, 18 Jun 2022 14:10:41 +0100 Subject: [PATCH 016/212] chore: changeset Signed-off-by: Marco Crivellaro --- .changeset/thirty-rivers-watch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/thirty-rivers-watch.md diff --git a/.changeset/thirty-rivers-watch.md b/.changeset/thirty-rivers-watch.md new file mode 100644 index 0000000000..d92343f365 --- /dev/null +++ b/.changeset/thirty-rivers-watch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Added two new scaffolder actions: `github:repo:create` and `github:repo:push` From 4e8787ac5755d9bcd2a4c7323ad2ea56d0b2b102 Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Sat, 18 Jun 2022 15:44:53 +0100 Subject: [PATCH 017/212] chore: api-report Signed-off-by: Marco Crivellaro --- plugins/scaffolder-backend/api-report.md | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 707b8e62ba..029000399b 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -168,6 +168,58 @@ export type CreateGithubPullRequestClientFactoryInput = { token?: string; }; +// @public +export function createGithubRepoCreateAction(options: { + integrations: ScmIntegrationRegistry; + githubCredentialsProvider?: GithubCredentialsProvider; +}): TemplateAction<{ + repoUrl: string; + description?: string | undefined; + access?: string | undefined; + deleteBranchOnMerge?: boolean | undefined; + gitAuthorName?: string | undefined; + gitAuthorEmail?: string | undefined; + allowRebaseMerge?: boolean | undefined; + allowSquashMerge?: boolean | undefined; + allowMergeCommit?: boolean | undefined; + requireCodeOwnerReviews?: boolean | undefined; + requiredStatusCheckContexts?: string[] | undefined; + repoVisibility?: 'internal' | 'private' | 'public' | undefined; + collaborators?: + | ( + | { + user: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + | { + team: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + )[] + | undefined; + token?: string | undefined; + topics?: string[] | undefined; +}>; + +// @public +export function createGithubRepoPushAction(options: { + integrations: ScmIntegrationRegistry; + config: Config; + githubCredentialsProvider?: GithubCredentialsProvider; +}): TemplateAction<{ + repoUrl: string; + description?: string | undefined; + defaultBranch?: string | undefined; + protectDefaultBranch?: boolean | undefined; + gitCommitMessage?: string | undefined; + gitAuthorName?: string | undefined; + gitAuthorEmail?: string | undefined; + requireCodeOwnerReviews?: boolean | undefined; + requiredStatusCheckContexts?: string[] | undefined; + sourcePath?: string | undefined; + token?: string | undefined; +}>; + // @public export function createGithubWebhookAction(options: { integrations: ScmIntegrationRegistry; From 411e8e60819013fbcf847ded2be8d577abf4fc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Tresarrieu?= Date: Mon, 20 Jun 2022 17:32:29 +0200 Subject: [PATCH 018/212] chore: add custom types for transform function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to avoid exposing complex types from our internal deps. Signed-off-by: Côme Tresarrieu --- .../MarkdownContent/MarkdownContent.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index 4059482b79..3052aff7d9 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -64,12 +64,23 @@ const useStyles = makeStyles( { name: 'BackstageMarkdownContent' }, ); +type TransformLink = ( + href: string, + // Complex type from internal react-markdown dep library (hast)[./node_modules/@types/hast/index.d.ts] + children: any[], + title: string | null, +) => string; + type Props = { content: string; dialect?: 'gfm' | 'common-mark'; - linkTarget?: Options['linkTarget']; - transformLinkUri?: Options['transformLinkUri']; - transformImageUri?: Options['transformImageUri']; + linkTarget?: React.HTMLAttributeAnchorTarget | TransformLink; + transformLinkUri?: TransformLink; + transformImageUri?: ( + src: string, + alt: string, + title: string | null, + ) => string; }; const components: Options['components'] = { From fccddd80fd865c959a459c9e20375dd4270c855e Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Mon, 20 Jun 2022 17:25:00 +0200 Subject: [PATCH 019/212] docs: fix prettier complaints Signed-off-by: Vladimir Masarik --- docs/features/software-templates/writing-custom-actions.md | 2 +- docs/features/software-templates/writing-templates.md | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index abff0cf7c7..a9e1d297f3 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -137,7 +137,7 @@ export default async function createPlugin( config: env.config, reader: env.reader, }); - + const actions = [...builtInActions, createNewFileAction()]; return createRouter({ diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 3173a0500a..40b735764c 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -513,14 +513,12 @@ spec: title: URL endpoint type: string description: URL endpoint at which the component can be reached - default: "https://www.example.com" + default: 'https://www.example.com' enabledDB: title: Enable Database type: boolean default: false - -... - + ... steps: - id: fetch-base name: Fetch Base From 87516675416340b2a7e3dc7c1749c1b62599b052 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:02:41 +0000 Subject: [PATCH 020/212] fix(deps): update dependency kafkajs to v2 Signed-off-by: Renovate Bot --- .changeset/renovate-149779d.md | 5 +++++ plugins/kafka-backend/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/renovate-149779d.md diff --git a/.changeset/renovate-149779d.md b/.changeset/renovate-149779d.md new file mode 100644 index 0000000000..58d764485e --- /dev/null +++ b/.changeset/renovate-149779d.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-kafka-backend': patch +--- + +Updated dependency `kafkajs` to `^2.0.0`. diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index b78c297586..ab9c515b69 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -42,7 +42,7 @@ "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", - "kafkajs": "^1.16.0-beta.6", + "kafkajs": "^2.0.0", "lodash": "^4.17.21", "winston": "^3.2.1" }, diff --git a/yarn.lock b/yarn.lock index 2b5e08220d..7036ba99a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16844,10 +16844,10 @@ jwt-decode@*, jwt-decode@^3.1.0: resolved "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59" integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A== -kafkajs@^1.16.0-beta.6: - version "1.16.0" - resolved "https://registry.npmjs.org/kafkajs/-/kafkajs-1.16.0.tgz#bfcc3ae2b69265ca8435b53a01ee9e8787b9fee5" - integrity sha512-+Rcfu2hyQ/jv5skqRY8xA7Ra+mmRkDAzCaLDYbkGtgsNKpzxPWiLbk8ub0dgr4EbWrN1Zb4BCXHUkD6+zYfdWg== +kafkajs@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/kafkajs/-/kafkajs-2.0.2.tgz#cdfc8f57aa4fd69f6d9ca1cce4ee89bbc2a3a1f9" + integrity sha512-g6CM3fAenofOjR1bfOAqeZUEaSGhNtBscNokybSdW1rmIKYNwBPC9xQzwulFJm36u/xcxXUiCl/L/qfslapihA== keyv-memcache@^1.2.5: version "1.2.9" From 679b32172eeddb53886f078efbb3de23eb4d308a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:03:17 +0000 Subject: [PATCH 021/212] fix(deps): update dependency knex to v2 Signed-off-by: Renovate Bot --- .changeset/renovate-7438bff.md | 16 ++++++++++++++++ packages/backend-common/package.json | 2 +- packages/backend-tasks/package.json | 2 +- packages/backend-test-utils/package.json | 2 +- plugins/app-backend/package.json | 2 +- plugins/auth-backend/package.json | 2 +- plugins/bazaar-backend/package.json | 2 +- plugins/catalog-backend/package.json | 2 +- plugins/code-coverage-backend/package.json | 2 +- plugins/scaffolder-backend/package.json | 2 +- plugins/search-backend-module-pg/package.json | 2 +- plugins/tech-insights-backend/package.json | 2 +- plugins/techdocs-backend/package.json | 2 +- yarn.lock | 8 ++++---- 14 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 .changeset/renovate-7438bff.md diff --git a/.changeset/renovate-7438bff.md b/.changeset/renovate-7438bff.md new file mode 100644 index 0000000000..43a4ac5016 --- /dev/null +++ b/.changeset/renovate-7438bff.md @@ -0,0 +1,16 @@ +--- +'@backstage/backend-common': patch +'@backstage/backend-tasks': patch +'@backstage/backend-test-utils': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-auth-backend': patch +'@backstage/plugin-bazaar-backend': patch +'@backstage/plugin-catalog-backend': patch +'@backstage/plugin-code-coverage-backend': patch +'@backstage/plugin-scaffolder-backend': patch +'@backstage/plugin-search-backend-module-pg': patch +'@backstage/plugin-tech-insights-backend': patch +'@backstage/plugin-techdocs-backend': patch +--- + +Updated dependency `knex` to `^2.0.0`. diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 9c459373ff..e8ebcb9ea2 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -65,7 +65,7 @@ "keyv": "^4.0.3", "keyv-memcache": "^1.2.5", "@keyv/redis": "^2.2.3", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "logform": "^2.3.2", "luxon": "^2.3.1", diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index f99baea1d5..2cbfd0b290 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -39,7 +39,7 @@ "@backstage/types": "^1.0.0", "@types/luxon": "^2.0.4", "cron": "^2.0.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "node-abort-controller": "^3.0.1", diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 56aa23bfd8..1dc7ddc821 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -38,7 +38,7 @@ "@backstage/cli": "^0.17.3-next.0", "@backstage/config": "^1.0.1", "better-sqlite3": "^7.5.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "msw": "^0.42.0", "mysql2": "^2.2.5", "pg": "^8.3.0", diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 173b15c80c..7a62720f8b 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -43,7 +43,7 @@ "express-promise-router": "^4.1.0", "fs-extra": "10.1.0", "helmet": "^5.0.2", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "winston": "^3.2.1", diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index c1fe319e3c..8403979f6f 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -53,7 +53,7 @@ "google-auth-library": "^8.0.0", "jose": "^4.6.0", "jwt-decode": "^3.1.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "minimatch": "^5.0.0", diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index c0769fe5b8..51b4a7786b 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -29,7 +29,7 @@ "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "winston": "^3.2.1", "yn": "^4.0.0" }, diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 61a8e68412..99037b09f7 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -55,7 +55,7 @@ "fs-extra": "10.1.0", "git-url-parse": "^11.6.0", "glob": "^7.1.6", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "node-fetch": "^2.6.7", diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 78b57974b9..d63fd88ad8 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -33,7 +33,7 @@ "express": "^4.17.1", "express-promise-router": "^4.1.0", "express-xml-bodyparser": "^0.3.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "uuid": "^8.3.2", "winston": "^3.2.1", "yn": "^4.0.0" diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index dba891bfa2..8531523034 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -59,7 +59,7 @@ "isbinaryfile": "^5.0.0", "isomorphic-git": "^1.8.0", "jsonschema": "^1.2.6", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "morgan": "^1.10.0", diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index cf072f5fe3..86c30f63d3 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -27,7 +27,7 @@ "@backstage/plugin-search-backend-node": "^0.6.3-next.0", "@backstage/plugin-search-common": "^0.3.5", "lodash": "^4.17.21", - "knex": "^1.0.2" + "knex": "^2.0.0" }, "devDependencies": { "@backstage/backend-test-utils": "^0.1.26-next.0", diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index 5461f22789..f0f9d0491a 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -45,7 +45,7 @@ "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "luxon": "^2.0.2", "semver": "^7.3.5", diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index bf29eeb9af..d42f34e1a4 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -49,7 +49,7 @@ "express": "^4.17.1", "express-promise-router": "^4.1.0", "fs-extra": "10.1.0", - "knex": "^1.0.2", + "knex": "^2.0.0", "lodash": "^4.17.21", "node-fetch": "^2.6.7", "p-limit": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 2b5e08220d..8d8b0acbc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16906,10 +16906,10 @@ kleur@^4.0.3, kleur@^4.1.4: resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d" integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA== -knex@^1.0.2: - version "1.0.7" - resolved "https://registry.npmjs.org/knex/-/knex-1.0.7.tgz#965f4490efc451b140aac4c5c6efa39fd877597b" - integrity sha512-89jxuRATt4qJMb9ZyyaKBy0pQ4d5h7eOFRqiNFnUvsgU+9WZ2eIaZKrAPG1+F3mgu5UloPUnkVE5Yo2sKZUs6Q== +knex@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/knex/-/knex-2.1.0.tgz#9348aace3a08ff5be26eb1c8e838416ddf1aa216" + integrity sha512-vVsnD6UJdSJy55TvCXfFF9syfwyXNxfE9mvr2hJL/4Obciy2EPGoqjDpgRSlMruHuPWDOeYAG25nyrGvU+jJog== dependencies: colorette "2.0.16" commander "^9.1.0" From 4764e30cc8db91835c8a0ba6e446463e42018d8c Mon Sep 17 00:00:00 2001 From: planeiii Date: Mon, 20 Jun 2022 11:54:09 -0500 Subject: [PATCH 022/212] chore: updated getProjects to accept arrays of branches Signed-off-by: planeiii --- .changeset/many-vans-thank.md | 2 -- .../jenkins-backend/src/service/jenkinsApi.test.ts | 14 +++++++------- plugins/jenkins-backend/src/service/jenkinsApi.ts | 8 ++++---- plugins/jenkins-backend/src/service/router.ts | 8 ++++---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.changeset/many-vans-thank.md b/.changeset/many-vans-thank.md index 942aa4cc7c..16f8c8a69b 100644 --- a/.changeset/many-vans-thank.md +++ b/.changeset/many-vans-thank.md @@ -3,6 +3,4 @@ '@backstage/plugin-jenkins-backend': patch --- ---- - feature: added support for multiple branches to the `JenkinsApi` diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.test.ts b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts index ad1a09a40f..bada5e1c29 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.test.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts @@ -118,10 +118,9 @@ describe('JenkinsApi', () => { it('standard github layout', async () => { mockedJenkinsClient.job.get.mockResolvedValueOnce(project); - const result = await jenkinsApi.getProjects( - jenkinsInfo, + const result = await jenkinsApi.getProjects(jenkinsInfo, [ 'testBranchName', - ); + ]); expect(mockedJenkins).toHaveBeenCalledWith({ baseUrl: jenkinsInfo.baseUrl, @@ -138,10 +137,11 @@ describe('JenkinsApi', () => { it('supports multiple branches', async () => { mockedJenkinsClient.job.get.mockResolvedValue(project); - const result = await jenkinsApi.getProjects( - jenkinsInfo, - 'foo,bar,catpants', - ); + const result = await jenkinsApi.getProjects(jenkinsInfo, [ + 'foo', + 'bar', + 'catpants', + ]); expect(mockedJenkins).toHaveBeenCalledWith({ baseUrl: jenkinsInfo.baseUrl, diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts index 07469dc83a..334be5dfa9 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -70,17 +70,17 @@ export class JenkinsApiImpl { * Get a list of projects for the given JenkinsInfo. * @see ../../../jenkins/src/api/JenkinsApi.ts#getProjects */ - async getProjects(jenkinsInfo: JenkinsInfo, branch?: string) { + async getProjects(jenkinsInfo: JenkinsInfo, branches?: string[]) { const client = await JenkinsApiImpl.getClient(jenkinsInfo); const projects: BackstageProject[] = []; - if (branch) { + if (branches) { // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. // TODO: extract a strategy interface for this const job = await Promise.any( - branch.split(/,/g).map(name => + branches.map(branch => client.job.get({ - name: `${jenkinsInfo.jobFullName}/${name}`, + name: `${jenkinsInfo.jobFullName}/${branch}`, tree: JenkinsApiImpl.jobTreeSpec.replace(/\s/g, ''), }), ), diff --git a/plugins/jenkins-backend/src/service/router.ts b/plugins/jenkins-backend/src/service/router.ts index 2c9e268165..b4c06314e1 100644 --- a/plugins/jenkins-backend/src/service/router.ts +++ b/plugins/jenkins-backend/src/service/router.ts @@ -64,12 +64,12 @@ export async function createRouter( request.header('authorization'), ); const branch = request.query.branch; - let branchStr: string | undefined; + let branches: string[] | undefined; if (branch === undefined) { - branchStr = undefined; + branches = undefined; } else if (typeof branch === 'string') { - branchStr = branch; + branches = branch.split(/,/g); } else { // this was passed in as something weird -> 400 // https://evanhahn.com/gotchas-with-express-query-parsing-and-how-to-avoid-them/ @@ -88,7 +88,7 @@ export async function createRouter( }, backstageToken: token, }); - const projects = await jenkinsApi.getProjects(jenkinsInfo, branchStr); + const projects = await jenkinsApi.getProjects(jenkinsInfo, branches); response.json({ projects: projects, From 2b74a8505985b68b31d90c3bbff614ebe27af157 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 21 Jun 2022 17:42:31 -0500 Subject: [PATCH 023/212] Added details about installing addons package Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- docs/features/techdocs/addons.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/features/techdocs/addons.md b/docs/features/techdocs/addons.md index 831729d093..33d97521d3 100644 --- a/docs/features/techdocs/addons.md +++ b/docs/features/techdocs/addons.md @@ -52,6 +52,8 @@ Addons are rendered in the order in which they are registered. ## Installing and using Addons +To start using Addons you need to add the `@backstage/plugin-techdocs-module-addons-contrib` package you your app, you can do that by running this command form the root of your project: `yarn add --cwd packages/app @backstage/plugin-techdocs-module-addons-contrib` + Addons can be installed and configured in much the same way as extensions for other Backstage plugins: by adding them underneath an extension registry component (``) under the route representing the TechDocs Reader From dabbb286f7e345f4c1d522a2cd40c1353a8a0952 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Wed, 22 Jun 2022 06:58:23 -0500 Subject: [PATCH 024/212] Corrected typos Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- docs/features/techdocs/addons.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/techdocs/addons.md b/docs/features/techdocs/addons.md index 33d97521d3..a4e1de7d4f 100644 --- a/docs/features/techdocs/addons.md +++ b/docs/features/techdocs/addons.md @@ -52,7 +52,7 @@ Addons are rendered in the order in which they are registered. ## Installing and using Addons -To start using Addons you need to add the `@backstage/plugin-techdocs-module-addons-contrib` package you your app, you can do that by running this command form the root of your project: `yarn add --cwd packages/app @backstage/plugin-techdocs-module-addons-contrib` +To start using Addons you need to add the `@backstage/plugin-techdocs-module-addons-contrib` package to your app. You can do that by running this command from the root of your project: `yarn add --cwd packages/app @backstage/plugin-techdocs-module-addons-contrib` Addons can be installed and configured in much the same way as extensions for other Backstage plugins: by adding them underneath an extension registry From e150231eb962bbe8616580ff3c6e1ab76c2cdfb6 Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Tue, 21 Jun 2022 14:23:08 +0100 Subject: [PATCH 025/212] refactor: DRY on input and output properties Signed-off-by: Marco Crivellaro --- .../builtin/github/githubRepoCreate.ts | 131 ++----------- .../actions/builtin/github/githubRepoPush.ts | 85 ++------- .../actions/builtin/github/inputProperties.ts | 161 ++++++++++++++++ .../builtin/github/outputProperties.ts | 27 +++ .../actions/builtin/publish/github.ts | 175 +++--------------- 5 files changed, 248 insertions(+), 331 deletions(-) create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/outputProperties.ts diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts index 494a47516c..a725602e07 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -22,6 +22,8 @@ import { Octokit } from 'octokit'; import { createTemplateAction } from '../../createTemplateAction'; import { parseRepoUrl } from '../publish/util'; import { getOctokitOptions } from './helpers'; +import * as inputProps from './inputProperties'; +import * as outputProps from './outputProperties'; /** * Creates a new action that initializes a git repository @@ -67,123 +69,26 @@ export function createGithubRepoCreateAction(options: { type: 'object', required: ['repoUrl'], properties: { - repoUrl: { - title: 'Repository Location', - description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, - type: 'string', - }, - description: { - title: 'Repository Description', - type: 'string', - }, - access: { - title: 'Repository Access', - description: `Sets an admin collaborator on the repository. Can either be a user reference different from 'owner' in 'repoUrl' or team reference, eg. 'org/team-name'`, - type: 'string', - }, - requireCodeOwnerReviews: { - title: 'Require CODEOWNER Reviews?', - description: - 'Require an approved review in PR including files with a designated Code Owner', - type: 'boolean', - }, - requiredStatusCheckContexts: { - title: 'Required Status Check Contexts', - description: - 'The list of status checks to require in order to merge into this branch', - type: 'array', - items: { - type: 'string', - }, - }, - repoVisibility: { - title: 'Repository Visibility', - type: 'string', - enum: ['private', 'public', 'internal'], - }, - deleteBranchOnMerge: { - title: 'Delete Branch On Merge', - type: 'boolean', - description: `Delete the branch after merging the PR. The default value is 'false'`, - }, - gitAuthorName: { - title: 'Default Author Name', - type: 'string', - description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, - }, - gitAuthorEmail: { - title: 'Default Author Email', - type: 'string', - description: `Sets the default author email for the commit.`, - }, - allowMergeCommit: { - title: 'Allow Merge Commits', - type: 'boolean', - description: `Allow merge commits. The default value is 'true'`, - }, - allowSquashMerge: { - title: 'Allow Squash Merges', - type: 'boolean', - description: `Allow squash merges. The default value is 'true'`, - }, - allowRebaseMerge: { - title: 'Allow Rebase Merges', - type: 'boolean', - description: `Allow rebase merges. The default value is 'true'`, - }, - collaborators: { - title: 'Collaborators', - description: 'Provide additional users or teams with permissions', - type: 'array', - items: { - type: 'object', - additionalProperties: false, - required: ['access'], - properties: { - access: { - type: 'string', - description: 'The type of access for the user', - enum: ['push', 'pull', 'admin', 'maintain', 'triage'], - }, - user: { - type: 'string', - description: - 'The name of the user that will be added as a collaborator', - }, - team: { - type: 'string', - description: - 'The name of the team that will be added as a collaborator', - }, - }, - oneOf: [{ required: ['user'] }, { required: ['team'] }], - }, - }, - token: { - title: 'Authentication Token', - type: 'string', - description: 'The token to use for authorization to GitHub', - }, - topics: { - title: 'Topics', - type: 'array', - items: { - type: 'string', - }, - }, + repoUrl: inputProps.repoUrl, + description: inputProps.description, + access: inputProps.access, + requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews, + requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts, + repoVisibility: inputProps.repoVisibility, + deleteBranchOnMerge: inputProps.deleteBranchOnMerge, + allowMergeCommit: inputProps.allowMergeCommit, + allowSquashMerge: inputProps.allowSquashMerge, + allowRebaseMerge: inputProps.allowRebaseMerge, + collaborators: inputProps.collaborators, + token: inputProps.token, + topics: inputProps.topics, }, }, output: { type: 'object', properties: { - remoteUrl: { - title: 'A URL to the repository with the provider', - type: 'string', - }, - repoContentsUrl: { - title: 'A URL to the root of the repository', - type: 'string', - }, + remoteUrl: outputProps.remoteUrl, + repoContentsUrl: outputProps.repoContentsUrl, }, }, }, @@ -212,7 +117,7 @@ export function createGithubRepoCreateAction(options: { integrations, credentialsProvider: githubCredentialsProvider, token: providedToken, - repoUrl, + repoUrl: repoUrl, }); const client = new Octokit(octokitOptions); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts index cdf9a9b4e6..df9f5463fe 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts @@ -27,6 +27,8 @@ import { } from '../helpers'; import { getRepoSourceDirectory, parseRepoUrl } from '../publish/util'; import { getOctokitOptions } from './helpers'; +import * as inputProps from './inputProperties'; +import * as outputProps from './outputProperties'; /** * Creates a new action that initializes a git repository of the content in the workspace @@ -62,82 +64,23 @@ export function createGithubRepoPushAction(options: { type: 'object', required: ['repoUrl'], properties: { - repoUrl: { - title: 'Repository Location', - description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, - type: 'string', - }, - requireCodeOwnerReviews: { - title: 'Require CODEOWNER Reviews?', - description: - 'Require an approved review in PR including files with a designated Code Owner', - type: 'boolean', - }, - requiredStatusCheckContexts: { - title: 'Required Status Check Contexts', - description: - 'The list of status checks to require in order to merge into this branch', - type: 'array', - items: { - type: 'string', - }, - }, - defaultBranch: { - title: 'Default Branch', - type: 'string', - description: `Sets the default branch on the repository. The default value is 'master'`, - }, - protectDefaultBranch: { - title: 'Protect Default Branch', - type: 'boolean', - description: `Protect the default branch after creating the repository. The default value is 'true'`, - }, - gitCommitMessage: { - title: 'Git Commit Message', - type: 'string', - description: `Sets the commit message on the repository. The default value is 'initial commit'`, - }, - gitAuthorName: { - title: 'Default Author Name', - type: 'string', - description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, - }, - gitAuthorEmail: { - title: 'Default Author Email', - type: 'string', - description: `Sets the default author email for the commit.`, - }, - sourcePath: { - title: 'Source Path', - description: - 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', - type: 'string', - }, - token: { - title: 'Authentication Token', - type: 'string', - description: 'The token to use for authorization to GitHub', - }, - topics: { - title: 'Topics', - type: 'array', - items: { - type: 'string', - }, - }, + repoUrl: inputProps.repoUrl, + requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews, + requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts, + defaultBranch: inputProps.defaultBranch, + protectDefaultBranch: inputProps.protectDefaultBranch, + gitCommitMessage: inputProps.gitCommitMessage, + gitAuthorName: inputProps.gitAuthorName, + gitAuthorEmail: inputProps.gitAuthorEmail, + sourcePath: inputProps.sourcePath, + token: inputProps.token, }, }, output: { type: 'object', properties: { - remoteUrl: { - title: 'A URL to the repository with the provider', - type: 'string', - }, - repoContentsUrl: { - title: 'A URL to the root of the repository', - type: 'string', - }, + remoteUrl: outputProps.remoteUrl, + repoContentsUrl: outputProps.repoContentsUrl, }, }, }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts new file mode 100644 index 0000000000..0aad402f1f --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts @@ -0,0 +1,161 @@ +/* + * 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. + */ + +const repoUrl = { + title: 'Repository Location', + description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, + type: 'string', +}; +const description = { + title: 'Repository Description', + type: 'string', +}; +const access = { + title: 'Repository Access', + description: `Sets an admin collaborator on the repository. Can either be a user reference different from 'owner' in 'repoUrl' or team reference, eg. 'org/team-name'`, + type: 'string', +}; +const requireCodeOwnerReviews = { + title: 'Require CODEOWNER Reviews?', + description: + 'Require an approved review in PR including files with a designated Code Owner', + type: 'boolean', +}; +const requiredStatusCheckContexts = { + title: 'Required Status Check Contexts', + description: + 'The list of status checks to require in order to merge into this branch', + type: 'array', + items: { + type: 'string', + }, +}; +const repoVisibility = { + title: 'Repository Visibility', + type: 'string', + enum: ['private', 'public', 'internal'], +}; +const deleteBranchOnMerge = { + title: 'Delete Branch On Merge', + type: 'boolean', + description: `Delete the branch after merging the PR. The default value is 'false'`, +}; +const gitAuthorName = { + title: 'Default Author Name', + type: 'string', + description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, +}; +const gitAuthorEmail = { + title: 'Default Author Email', + type: 'string', + description: `Sets the default author email for the commit.`, +}; +const allowMergeCommit = { + title: 'Allow Merge Commits', + type: 'boolean', + description: `Allow merge commits. The default value is 'true'`, +}; +const allowSquashMerge = { + title: 'Allow Squash Merges', + type: 'boolean', + description: `Allow squash merges. The default value is 'true'`, +}; +const allowRebaseMerge = { + title: 'Allow Rebase Merges', + type: 'boolean', + description: `Allow rebase merges. The default value is 'true'`, +}; +const collaborators = { + title: 'Collaborators', + description: 'Provide additional users or teams with permissions', + type: 'array', + items: { + type: 'object', + additionalProperties: false, + required: ['access'], + properties: { + access: { + type: 'string', + description: 'The type of access for the user', + enum: ['push', 'pull', 'admin', 'maintain', 'triage'], + }, + user: { + type: 'string', + description: + 'The name of the user that will be added as a collaborator', + }, + team: { + type: 'string', + description: + 'The name of the team that will be added as a collaborator', + }, + }, + oneOf: [{ required: ['user'] }, { required: ['team'] }], + }, +}; +const token = { + title: 'Authentication Token', + type: 'string', + description: 'The token to use for authorization to GitHub', +}; +const topics = { + title: 'Topics', + type: 'array', + items: { + type: 'string', + }, +}; +const defaultBranch = { + title: 'Default Branch', + type: 'string', + description: `Sets the default branch on the repository. The default value is 'master'`, +}; +const protectDefaultBranch = { + title: 'Protect Default Branch', + type: 'boolean', + description: `Protect the default branch after creating the repository. The default value is 'true'`, +}; +const gitCommitMessage = { + title: 'Git Commit Message', + type: 'string', + description: `Sets the commit message on the repository. The default value is 'initial commit'`, +}; +const sourcePath = { + title: 'Source Path', + description: + 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', + type: 'string', +}; + +export { access }; +export { allowMergeCommit }; +export { allowRebaseMerge }; +export { allowSquashMerge }; +export { collaborators }; +export { defaultBranch }; +export { deleteBranchOnMerge }; +export { description }; +export { gitAuthorEmail }; +export { gitAuthorName }; +export { gitCommitMessage }; +export { protectDefaultBranch }; +export { repoUrl }; +export { repoVisibility }; +export { requireCodeOwnerReviews }; +export { requiredStatusCheckContexts }; +export { sourcePath }; +export { token }; +export { topics }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/outputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/outputProperties.ts new file mode 100644 index 0000000000..d5d6eb108f --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/outputProperties.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +const remoteUrl = { + title: 'A URL to the repository with the provider', + type: 'string', +}; +const repoContentsUrl = { + title: 'A URL to the root of the repository', + type: 'string', +}; + +export { remoteUrl }; +export { repoContentsUrl }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index d9a7112fc9..145827702d 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -13,20 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { Config } from '@backstage/config'; +import { assertError, InputError } from '@backstage/errors'; import { GithubCredentialsProvider, ScmIntegrationRegistry, } from '@backstage/integration'; +import { Octokit } from 'octokit'; +import { createTemplateAction } from '../../createTemplateAction'; +import { getOctokitOptions } from '../github/helpers'; +import * as inputProps from '../github/inputProperties'; +import * as outputProps from '../github/outputProperties'; import { enableBranchProtectionOnDefaultRepoBranch, initRepoAndPush, } from '../helpers'; import { getRepoSourceDirectory, parseRepoUrl } from './util'; -import { createTemplateAction } from '../../createTemplateAction'; -import { Config } from '@backstage/config'; -import { assertError, InputError } from '@backstage/errors'; -import { getOctokitOptions } from '../github/helpers'; -import { Octokit } from 'octokit'; /** * Creates a new action that initializes a git repository of the content in the workspace @@ -84,153 +86,32 @@ export function createPublishGithubAction(options: { type: 'object', required: ['repoUrl'], properties: { - repoUrl: { - title: 'Repository Location', - description: `Accepts the format 'github.com?repo=reponame&owner=owner' where 'reponame' is the new repository name and 'owner' is an organization or username`, - type: 'string', - }, - description: { - title: 'Repository Description', - type: 'string', - }, - access: { - title: 'Repository Access', - description: `Sets an admin collaborator on the repository. Can either be a user reference different from 'owner' in 'repoUrl' or team reference, eg. 'org/team-name'`, - type: 'string', - }, - requireCodeOwnerReviews: { - title: 'Require CODEOWNER Reviews?', - description: - 'Require an approved review in PR including files with a designated Code Owner', - type: 'boolean', - }, - requiredStatusCheckContexts: { - title: 'Required Status Check Contexts', - description: - 'The list of status checks to require in order to merge into this branch', - type: 'array', - items: { - type: 'string', - }, - }, - repoVisibility: { - title: 'Repository Visibility', - type: 'string', - enum: ['private', 'public', 'internal'], - }, - defaultBranch: { - title: 'Default Branch', - type: 'string', - description: `Sets the default branch on the repository. The default value is 'master'`, - }, - protectDefaultBranch: { - title: 'Protect Default Branch', - type: 'boolean', - description: `Protect the default branch after creating the repository. The default value is 'true'`, - }, - deleteBranchOnMerge: { - title: 'Delete Branch On Merge', - type: 'boolean', - description: `Delete the branch after merging the PR. The default value is 'false'`, - }, - gitCommitMessage: { - title: 'Git Commit Message', - type: 'string', - description: `Sets the commit message on the repository. The default value is 'initial commit'`, - }, - gitAuthorName: { - title: 'Default Author Name', - type: 'string', - description: `Sets the default author name for the commit. The default value is 'Scaffolder'`, - }, - gitAuthorEmail: { - title: 'Default Author Email', - type: 'string', - description: `Sets the default author email for the commit.`, - }, - allowMergeCommit: { - title: 'Allow Merge Commits', - type: 'boolean', - description: `Allow merge commits. The default value is 'true'`, - }, - allowSquashMerge: { - title: 'Allow Squash Merges', - type: 'boolean', - description: `Allow squash merges. The default value is 'true'`, - }, - allowRebaseMerge: { - title: 'Allow Rebase Merges', - type: 'boolean', - description: `Allow rebase merges. The default value is 'true'`, - }, - sourcePath: { - title: 'Source Path', - description: - 'Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.', - type: 'string', - }, - collaborators: { - title: 'Collaborators', - description: 'Provide additional users or teams with permissions', - type: 'array', - items: { - type: 'object', - additionalProperties: false, - required: ['access'], - properties: { - access: { - type: 'string', - description: 'The type of access for the user', - enum: ['push', 'pull', 'admin', 'maintain', 'triage'], - }, - user: { - type: 'string', - description: - 'The name of the user that will be added as a collaborator', - }, - username: { - type: 'string', - description: - 'Deprecated. Use the `team` or `user` field instead.', - }, - team: { - type: 'string', - description: - 'The name of the team that will be added as a collaborator', - }, - }, - oneOf: [ - { required: ['user'] }, - { required: ['username'] }, - { required: ['team'] }, - ], - }, - }, - token: { - title: 'Authentication Token', - type: 'string', - description: 'The token to use for authorization to GitHub', - }, - topics: { - title: 'Topics', - type: 'array', - items: { - type: 'string', - }, - }, + repoUrl: inputProps.repoUrl, + description: inputProps.description, + access: inputProps.access, + requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews, + requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts, + repoVisibility: inputProps.repoVisibility, + defaultBranch: inputProps.defaultBranch, + protectDefaultBranch: inputProps.protectDefaultBranch, + deleteBranchOnMerge: inputProps.deleteBranchOnMerge, + gitCommitMessage: inputProps.gitCommitMessage, + gitAuthorName: inputProps.gitAuthorName, + gitAuthorEmail: inputProps.gitAuthorEmail, + allowMergeCommit: inputProps.allowMergeCommit, + allowSquashMerge: inputProps.allowSquashMerge, + allowRebaseMerge: inputProps.allowRebaseMerge, + sourcePath: inputProps.sourcePath, + collaborators: inputProps.collaborators, + token: inputProps.token, + topics: inputProps.topics, }, }, output: { type: 'object', properties: { - remoteUrl: { - title: 'A URL to the repository with the provider', - type: 'string', - }, - repoContentsUrl: { - title: 'A URL to the root of the repository', - type: 'string', - }, + remoteUrl: outputProps.remoteUrl, + repoContentsUrl: outputProps.repoContentsUrl, }, }, }, From 4271cc7ecced991ce8e5498330e414325a239b64 Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Wed, 22 Jun 2022 11:02:42 +0100 Subject: [PATCH 026/212] refactor repo create, repo push Signed-off-by: Marco Crivellaro --- .../builtin/github/githubRepoCreate.ts | 149 ++-------- .../actions/builtin/github/githubRepoPush.ts | 66 ++--- .../actions/builtin/github/helpers.ts | 221 ++++++++++++++- .../src/scaffolder/actions/builtin/helpers.ts | 18 +- .../actions/builtin/publish/github.ts | 266 ++++++------------ 5 files changed, 369 insertions(+), 351 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts index a725602e07..1e92d91a64 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { assertError, InputError } from '@backstage/errors'; +import { InputError } from '@backstage/errors'; import { GithubCredentialsProvider, ScmIntegrationRegistry, @@ -21,7 +21,10 @@ import { import { Octokit } from 'octokit'; import { createTemplateAction } from '../../createTemplateAction'; import { parseRepoUrl } from '../publish/util'; -import { getOctokitOptions } from './helpers'; +import { + createGithubRepoWithCollaboratorsAndTopics, + getOctokitOptions, +} from './helpers'; import * as inputProps from './inputProperties'; import * as outputProps from './outputProperties'; @@ -58,6 +61,11 @@ export function createGithubRepoCreateAction(options: { team: string; access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; } + | { + /** @deprecated This field is deprecated in favor of team */ + username: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } >; token?: string; topics?: string[]; @@ -107,136 +115,37 @@ export function createGithubRepoCreateAction(options: { token: providedToken, } = ctx.input; - const { owner, repo } = parseRepoUrl(repoUrl, integrations); - - if (!owner) { - throw new InputError('Invalid repository owner provided in repoUrl'); - } - const octokitOptions = await getOctokitOptions({ integrations, credentialsProvider: githubCredentialsProvider, token: providedToken, repoUrl: repoUrl, }); - const client = new Octokit(octokitOptions); - const user = await client.rest.users.getByUsername({ - username: owner, - }); + const { owner, repo } = parseRepoUrl(repoUrl, integrations); - const repoCreationPromise = - user.data.type === 'Organization' - ? client.rest.repos.createInOrg({ - name: repo, - org: owner, - private: repoVisibility === 'private', - visibility: repoVisibility, - description: description, - delete_branch_on_merge: deleteBranchOnMerge, - allow_merge_commit: allowMergeCommit, - allow_squash_merge: allowSquashMerge, - allow_rebase_merge: allowRebaseMerge, - }) - : client.rest.repos.createForAuthenticatedUser({ - name: repo, - private: repoVisibility === 'private', - description: description, - delete_branch_on_merge: deleteBranchOnMerge, - allow_merge_commit: allowMergeCommit, - allow_squash_merge: allowSquashMerge, - allow_rebase_merge: allowRebaseMerge, - }); - - let newRepo; - - try { - newRepo = (await repoCreationPromise).data; - } catch (e) { - assertError(e); - if (e.message === 'Resource not accessible by integration') { - ctx.logger.warn( - `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`, - ); - } - throw new Error( - `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`, - ); + if (!owner) { + throw new InputError('Invalid repository owner provided in repoUrl'); } - if (access?.startsWith(`${owner}/`)) { - const [, team] = access.split('/'); - await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ - org: owner, - team_slug: team, - owner, - repo, - permission: 'admin', - }); - // No need to add access if it's the person who owns the personal account - } else if (access && access !== owner) { - await client.rest.repos.addCollaborator({ - owner, - repo, - username: access, - permission: 'admin', - }); - } + const newRepo = await createGithubRepoWithCollaboratorsAndTopics( + client, + repo, + owner, + repoVisibility, + description, + deleteBranchOnMerge, + allowMergeCommit, + allowSquashMerge, + allowRebaseMerge, + access, + collaborators, + topics, + ctx.logger, + ); - if (collaborators) { - for (const collaborator of collaborators) { - try { - if ('user' in collaborator) { - await client.rest.repos.addCollaborator({ - owner, - repo, - username: collaborator.user, - permission: collaborator.access, - }); - } else if ('team' in collaborator) { - await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ - org: owner, - team_slug: collaborator.team, - owner, - repo, - permission: collaborator.access, - }); - } - } catch (e) { - assertError(e); - const name = extractCollaboratorName(collaborator); - ctx.logger.warn( - `Skipping ${collaborator.access} access for ${name}, ${e.message}`, - ); - } - } - } - - if (topics) { - try { - await client.rest.repos.replaceAllTopics({ - owner, - repo, - names: topics.map(t => t.toLowerCase()), - }); - } catch (e) { - assertError(e); - ctx.logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`); - } - } - - const remoteUrl = newRepo.clone_url; - - ctx.output('remoteUrl', remoteUrl); + ctx.output('remoteUrl', newRepo.clone_url); }, }); } - -function extractCollaboratorName( - collaborator: { user: string } | { team: string } | { username: string }, -) { - if ('username' in collaborator) return collaborator.username; - if ('user' in collaborator) return collaborator.user; - return collaborator.team; -} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts index df9f5463fe..942ebe578d 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoPush.ts @@ -14,19 +14,15 @@ * limitations under the License. */ import { Config } from '@backstage/config'; -import { assertError, InputError } from '@backstage/errors'; +import { InputError } from '@backstage/errors'; import { GithubCredentialsProvider, ScmIntegrationRegistry, } from '@backstage/integration'; import { Octokit } from 'octokit'; import { createTemplateAction } from '../../createTemplateAction'; -import { - enableBranchProtectionOnDefaultRepoBranch, - initRepoAndPush, -} from '../helpers'; -import { getRepoSourceDirectory, parseRepoUrl } from '../publish/util'; -import { getOctokitOptions } from './helpers'; +import { parseRepoUrl } from '../publish/util'; +import { getOctokitOptions, initRepoPushAndProtect } from './helpers'; import * as inputProps from './inputProperties'; import * as outputProps from './outputProperties'; @@ -117,48 +113,24 @@ export function createGithubRepoPushAction(options: { const remoteUrl = targetRepo.data.clone_url; const repoContentsUrl = `${targetRepo.data.html_url}/blob/${defaultBranch}`; - const gitAuthorInfo = { - name: gitAuthorName - ? gitAuthorName - : config.getOptionalString('scaffolder.defaultAuthor.name'), - email: gitAuthorEmail - ? gitAuthorEmail - : config.getOptionalString('scaffolder.defaultAuthor.email'), - }; - - await initRepoAndPush({ - dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), + await initRepoPushAndProtect( remoteUrl, + octokitOptions.auth, + ctx.workspacePath, + ctx.input.sourcePath, defaultBranch, - auth: { - username: 'x-access-token', - password: octokitOptions.auth, - }, - logger: ctx.logger, - commitMessage: gitCommitMessage - ? gitCommitMessage - : config.getOptionalString('scaffolder.defaultCommitMessage'), - gitAuthorInfo, - }); - - if (protectDefaultBranch) { - try { - await enableBranchProtectionOnDefaultRepoBranch({ - owner, - client, - repoName: repo, - logger: ctx.logger, - defaultBranch, - requireCodeOwnerReviews, - requiredStatusCheckContexts, - }); - } catch (e) { - assertError(e); - ctx.logger.warn( - `Skipping: default branch protection on '${repo}', ${e.message}`, - ); - } - } + protectDefaultBranch, + owner, + client, + repo, + requireCodeOwnerReviews, + requiredStatusCheckContexts, + config, + ctx.logger, + gitCommitMessage, + gitAuthorName, + gitAuthorEmail, + ); ctx.output('remoteUrl', remoteUrl); ctx.output('repoContentsUrl', repoContentsUrl); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts index 29997e5843..c8f508e4c0 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts @@ -13,14 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { InputError } from '@backstage/errors'; +import { Config } from '@backstage/config'; +import { assertError, InputError } from '@backstage/errors'; import { DefaultGithubCredentialsProvider, GithubCredentialsProvider, ScmIntegrationRegistry, } from '@backstage/integration'; import { OctokitOptions } from '@octokit/core/dist-types/types'; -import { parseRepoUrl } from '../publish/util'; +import { Octokit } from 'octokit'; +import { Logger } from 'winston'; +import { + enableBranchProtectionOnDefaultRepoBranch, + initRepoAndPush, +} from '../helpers'; +import { getRepoSourceDirectory, parseRepoUrl } from '../publish/util'; const DEFAULT_TIMEOUT_MS = 60_000; @@ -83,3 +90,213 @@ export async function getOctokitOptions(options: { previews: ['nebula-preview'], }; } + +export async function createGithubRepoWithCollaboratorsAndTopics( + client: Octokit, + repo: string, + owner: string, + repoVisibility: 'private' | 'internal' | 'public', + description: string | undefined, + deleteBranchOnMerge: boolean, + allowMergeCommit: boolean, + allowSquashMerge: boolean, + allowRebaseMerge: boolean, + access: string | undefined, + collaborators: + | ( + | { + user: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + | { + team: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + | { + /** @deprecated This field is deprecated in favor of team */ + username: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } + )[] + | undefined, + topics: string[] | undefined, + logger: Logger, +) { + const user = await client.rest.users.getByUsername({ + username: owner, + }); + + const repoCreationPromise = + user.data.type === 'Organization' + ? client.rest.repos.createInOrg({ + name: repo, + org: owner, + private: repoVisibility === 'private', + visibility: repoVisibility, + description: description, + delete_branch_on_merge: deleteBranchOnMerge, + allow_merge_commit: allowMergeCommit, + allow_squash_merge: allowSquashMerge, + allow_rebase_merge: allowRebaseMerge, + }) + : client.rest.repos.createForAuthenticatedUser({ + name: repo, + private: repoVisibility === 'private', + description: description, + delete_branch_on_merge: deleteBranchOnMerge, + allow_merge_commit: allowMergeCommit, + allow_squash_merge: allowSquashMerge, + allow_rebase_merge: allowRebaseMerge, + }); + + let newRepo; + + try { + newRepo = (await repoCreationPromise).data; + } catch (e) { + assertError(e); + if (e.message === 'Resource not accessible by integration') { + logger.warn( + `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`, + ); + } + throw new Error( + `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`, + ); + } + + if (access?.startsWith(`${owner}/`)) { + const [, team] = access.split('/'); + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ + org: owner, + team_slug: team, + owner, + repo, + permission: 'admin', + }); + // No need to add access if it's the person who owns the personal account + } else if (access && access !== owner) { + await client.rest.repos.addCollaborator({ + owner, + repo, + username: access, + permission: 'admin', + }); + } + + if (collaborators) { + for (const collaborator of collaborators) { + try { + if ('user' in collaborator) { + await client.rest.repos.addCollaborator({ + owner, + repo, + username: collaborator.user, + permission: collaborator.access, + }); + } else if ('team' in collaborator) { + await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ + org: owner, + team_slug: collaborator.team, + owner, + repo, + permission: collaborator.access, + }); + } + } catch (e) { + assertError(e); + const name = extractCollaboratorName(collaborator); + logger.warn( + `Skipping ${collaborator.access} access for ${name}, ${e.message}`, + ); + } + } + } + + if (topics) { + try { + await client.rest.repos.replaceAllTopics({ + owner, + repo, + names: topics.map(t => t.toLowerCase()), + }); + } catch (e) { + assertError(e); + logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`); + } + } + + return newRepo; +} + +export async function initRepoPushAndProtect( + remoteUrl: string, + password: string, + workspacePath: string, + sourcePath: string | undefined, + defaultBranch: string, + protectDefaultBranch: boolean, + owner: string, + client: Octokit, + repo: string, + requireCodeOwnerReviews: boolean, + requiredStatusCheckContexts: string[], + config: Config, + logger: any, + gitCommitMessage?: string, + gitAuthorName?: string, + gitAuthorEmail?: string, +) { + const gitAuthorInfo = { + name: gitAuthorName + ? gitAuthorName + : config.getOptionalString('scaffolder.defaultAuthor.name'), + email: gitAuthorEmail + ? gitAuthorEmail + : config.getOptionalString('scaffolder.defaultAuthor.email'), + }; + + const commitMessage = gitCommitMessage + ? gitCommitMessage + : config.getOptionalString('scaffolder.defaultCommitMessage'); + + await initRepoAndPush({ + dir: getRepoSourceDirectory(workspacePath, sourcePath), + remoteUrl, + defaultBranch, + auth: { + username: 'x-access-token', + password, + }, + logger, + commitMessage, + gitAuthorInfo, + }); + + if (protectDefaultBranch) { + try { + await enableBranchProtectionOnDefaultRepoBranch({ + owner, + client, + repoName: repo, + logger, + defaultBranch, + requireCodeOwnerReviews, + requiredStatusCheckContexts, + }); + } catch (e) { + assertError(e); + logger.warn( + `Skipping: default branch protection on '${repo}', ${e.message}`, + ); + } + } +} + +function extractCollaboratorName( + collaborator: { user: string } | { team: string } | { username: string }, +) { + if ('username' in collaborator) return collaborator.username; + if ('user' in collaborator) return collaborator.user; + return collaborator.team; +} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts index 529a504cba..8753d44041 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/helpers.ts @@ -14,12 +14,13 @@ * limitations under the License. */ -import { SpawnOptionsWithoutStdio, spawn } from 'child_process'; +import { Git } from '@backstage/backend-common'; +import { Config } from '@backstage/config'; +import { assertError } from '@backstage/errors'; +import { spawn, SpawnOptionsWithoutStdio } from 'child_process'; +import { Octokit } from 'octokit'; import { PassThrough, Writable } from 'stream'; import { Logger } from 'winston'; -import { Git } from '@backstage/backend-common'; -import { Octokit } from 'octokit'; -import { assertError } from '@backstage/errors'; /** @public */ export type RunCommandOptions = { @@ -200,3 +201,12 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({ await tryOnce(); } }; + +export function getGitCommitMessage( + gitCommitMessage: string | undefined, + config: Config, +): string | undefined { + return gitCommitMessage + ? gitCommitMessage + : config.getOptionalString('scaffolder.defaultCommitMessage'); +} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 145827702d..87219ac1e6 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -14,22 +14,21 @@ * limitations under the License. */ import { Config } from '@backstage/config'; -import { assertError, InputError } from '@backstage/errors'; +import { InputError } from '@backstage/errors'; import { GithubCredentialsProvider, ScmIntegrationRegistry, } from '@backstage/integration'; import { Octokit } from 'octokit'; import { createTemplateAction } from '../../createTemplateAction'; -import { getOctokitOptions } from '../github/helpers'; +import { + createGithubRepoWithCollaboratorsAndTopics, + getOctokitOptions, + initRepoPushAndProtect, +} from '../github/helpers'; import * as inputProps from '../github/inputProperties'; import * as outputProps from '../github/outputProperties'; -import { - enableBranchProtectionOnDefaultRepoBranch, - initRepoAndPush, -} from '../helpers'; -import { getRepoSourceDirectory, parseRepoUrl } from './util'; - +import { parseRepoUrl } from './util'; /** * Creates a new action that initializes a git repository of the content in the workspace * and publishes it to GitHub. @@ -137,192 +136,103 @@ export function createPublishGithubAction(options: { token: providedToken, } = ctx.input; + const octokitOptions = await getOctokitOptions({ + integrations, + credentialsProvider: githubCredentialsProvider, + token: providedToken, + repoUrl: repoUrl, + }); + const client = new Octokit(octokitOptions); + const { owner, repo } = parseRepoUrl(repoUrl, integrations); if (!owner) { throw new InputError('Invalid repository owner provided in repoUrl'); } - const octokitOptions = await getOctokitOptions({ - integrations, - credentialsProvider: githubCredentialsProvider, - token: providedToken, - repoUrl, - }); - - const client = new Octokit(octokitOptions); - - const user = await client.rest.users.getByUsername({ - username: owner, - }); - - const repoCreationPromise = - user.data.type === 'Organization' - ? client.rest.repos.createInOrg({ - name: repo, - org: owner, - private: repoVisibility === 'private', - visibility: repoVisibility, - description: description, - delete_branch_on_merge: deleteBranchOnMerge, - allow_merge_commit: allowMergeCommit, - allow_squash_merge: allowSquashMerge, - allow_rebase_merge: allowRebaseMerge, - }) - : client.rest.repos.createForAuthenticatedUser({ - name: repo, - private: repoVisibility === 'private', - description: description, - delete_branch_on_merge: deleteBranchOnMerge, - allow_merge_commit: allowMergeCommit, - allow_squash_merge: allowSquashMerge, - allow_rebase_merge: allowRebaseMerge, - }); - - let newRepo; - - try { - newRepo = (await repoCreationPromise).data; - } catch (e) { - assertError(e); - if (e.message === 'Resource not accessible by integration') { - ctx.logger.warn( - `The GitHub app or token provided may not have the required permissions to create the ${user.data.type} repository ${owner}/${repo}.`, - ); - } - throw new Error( - `Failed to create the ${user.data.type} repository ${owner}/${repo}, ${e.message}`, - ); - } - - if (access?.startsWith(`${owner}/`)) { - const [, team] = access.split('/'); - await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ - org: owner, - team_slug: team, - owner, - repo, - permission: 'admin', - }); - // No need to add access if it's the person who owns the personal account - } else if (access && access !== owner) { - await client.rest.repos.addCollaborator({ - owner, - repo, - username: access, - permission: 'admin', - }); - } - - if (collaborators) { - for (const collaborator of collaborators) { - try { - if ('user' in collaborator) { - await client.rest.repos.addCollaborator({ - owner, - repo, - username: collaborator.user, - permission: collaborator.access, - }); - } else if ('username' in collaborator) { - ctx.logger.warn( - 'The field `username` is deprecated in favor of `team` and will be removed in the future.', - ); - await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ - org: owner, - team_slug: collaborator.username, - owner, - repo, - permission: collaborator.access, - }); - } else if ('team' in collaborator) { - await client.rest.teams.addOrUpdateRepoPermissionsInOrg({ - org: owner, - team_slug: collaborator.team, - owner, - repo, - permission: collaborator.access, - }); - } - } catch (e) { - assertError(e); - const name = extractCollaboratorName(collaborator); - ctx.logger.warn( - `Skipping ${collaborator.access} access for ${name}, ${e.message}`, - ); - } - } - } - - if (topics) { - try { - await client.rest.repos.replaceAllTopics({ - owner, - repo, - names: topics.map(t => t.toLowerCase()), - }); - } catch (e) { - assertError(e); - ctx.logger.warn(`Skipping topics ${topics.join(' ')}, ${e.message}`); - } - } + const newRepo = await createGithubRepoWithCollaboratorsAndTopics( + client, + repo, + owner, + repoVisibility, + description, + deleteBranchOnMerge, + allowMergeCommit, + allowSquashMerge, + allowRebaseMerge, + access, + collaborators, + topics, + ctx.logger, + ); const remoteUrl = newRepo.clone_url; const repoContentsUrl = `${newRepo.html_url}/blob/${defaultBranch}`; - const gitAuthorInfo = { - name: gitAuthorName - ? gitAuthorName - : config.getOptionalString('scaffolder.defaultAuthor.name'), - email: gitAuthorEmail - ? gitAuthorEmail - : config.getOptionalString('scaffolder.defaultAuthor.email'), - }; + // const gitAuthorInfo = { + // name: gitAuthorName + // ? gitAuthorName + // : config.getOptionalString('scaffolder.defaultAuthor.name'), + // email: gitAuthorEmail + // ? gitAuthorEmail + // : config.getOptionalString('scaffolder.defaultAuthor.email'), + // }; - await initRepoAndPush({ - dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), + // await initRepoAndPush({ + // dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), + // remoteUrl, + // defaultBranch, + // auth: { + // username: 'x-access-token', + // password: octokitOptions.auth, + // }, + // logger: ctx.logger, + // commitMessage: gitCommitMessage + // ? gitCommitMessage + // : config.getOptionalString('scaffolder.defaultCommitMessage'), + // gitAuthorInfo, + // }); + + // if (protectDefaultBranch) { + // try { + // await enableBranchProtectionOnDefaultRepoBranch({ + // owner, + // client, + // repoName: newRepo.name, + // logger: ctx.logger, + // defaultBranch, + // requireCodeOwnerReviews, + // requiredStatusCheckContexts, + // }); + // } catch (e) { + // assertError(e); + // ctx.logger.warn( + // `Skipping: default branch protection on '${newRepo.name}', ${e.message}`, + // ); + // } + // } + + await initRepoPushAndProtect( remoteUrl, + octokitOptions.auth, + ctx.workspacePath, + ctx.input.sourcePath, defaultBranch, - auth: { - username: 'x-access-token', - password: octokitOptions.auth, - }, - logger: ctx.logger, - commitMessage: gitCommitMessage - ? gitCommitMessage - : config.getOptionalString('scaffolder.defaultCommitMessage'), - gitAuthorInfo, - }); - - if (protectDefaultBranch) { - try { - await enableBranchProtectionOnDefaultRepoBranch({ - owner, - client, - repoName: newRepo.name, - logger: ctx.logger, - defaultBranch, - requireCodeOwnerReviews, - requiredStatusCheckContexts, - }); - } catch (e) { - assertError(e); - ctx.logger.warn( - `Skipping: default branch protection on '${newRepo.name}', ${e.message}`, - ); - } - } + protectDefaultBranch, + owner, + client, + repo, + requireCodeOwnerReviews, + requiredStatusCheckContexts, + config, + ctx.logger, + gitCommitMessage, + gitAuthorName, + gitAuthorEmail, + ); ctx.output('remoteUrl', remoteUrl); ctx.output('repoContentsUrl', repoContentsUrl); }, }); } - -function extractCollaboratorName( - collaborator: { user: string } | { team: string } | { username: string }, -) { - if ('username' in collaborator) return collaborator.username; - if ('user' in collaborator) return collaborator.user; - return collaborator.team; -} From 4345479092e7609c32787f30d6c6530ed30c0e1b Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Wed, 22 Jun 2022 13:43:44 +0100 Subject: [PATCH 027/212] chore: fix tests Signed-off-by: Marco Crivellaro --- .../actions/builtin/publish/github.test.ts | 28 ++++++------ .../actions/builtin/publish/github.ts | 43 ------------------- 2 files changed, 14 insertions(+), 57 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts index ff20d1014b..036c5d66ee 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts @@ -18,20 +18,20 @@ import { TemplateAction } from '../../types'; jest.mock('../helpers'); -import { createPublishGithubAction } from './github'; +import { getVoidLogger } from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; import { - ScmIntegrations, DefaultGithubCredentialsProvider, GithubCredentialsProvider, + ScmIntegrations, } from '@backstage/integration'; -import { ConfigReader } from '@backstage/config'; -import { getVoidLogger } from '@backstage/backend-common'; +import { when } from 'jest-when'; import { PassThrough } from 'stream'; import { enableBranchProtectionOnDefaultRepoBranch, initRepoAndPush, } from '../helpers'; -import { when } from 'jest-when'; +import { createPublishGithubAction } from './github'; const mockOctokit = { rest: { @@ -609,7 +609,7 @@ describe('publish:github', () => { mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { - name: 'repository', + name: 'repo', }, }); @@ -618,7 +618,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: false, @@ -636,7 +636,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: true, @@ -654,7 +654,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: false, @@ -669,7 +669,7 @@ describe('publish:github', () => { mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { - name: 'repository', + name: 'repo', }, }); @@ -678,7 +678,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: false, @@ -696,7 +696,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: false, @@ -714,7 +714,7 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).toHaveBeenCalledWith({ owner: 'owner', client: mockOctokit, - repoName: 'repository', + repoName: 'repo', logger: mockContext.logger, defaultBranch: 'master', requireCodeOwnerReviews: false, @@ -729,7 +729,7 @@ describe('publish:github', () => { mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ data: { - name: 'repository', + name: 'repo', }, }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 87219ac1e6..0815a2cd00 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -169,49 +169,6 @@ export function createPublishGithubAction(options: { const remoteUrl = newRepo.clone_url; const repoContentsUrl = `${newRepo.html_url}/blob/${defaultBranch}`; - // const gitAuthorInfo = { - // name: gitAuthorName - // ? gitAuthorName - // : config.getOptionalString('scaffolder.defaultAuthor.name'), - // email: gitAuthorEmail - // ? gitAuthorEmail - // : config.getOptionalString('scaffolder.defaultAuthor.email'), - // }; - - // await initRepoAndPush({ - // dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath), - // remoteUrl, - // defaultBranch, - // auth: { - // username: 'x-access-token', - // password: octokitOptions.auth, - // }, - // logger: ctx.logger, - // commitMessage: gitCommitMessage - // ? gitCommitMessage - // : config.getOptionalString('scaffolder.defaultCommitMessage'), - // gitAuthorInfo, - // }); - - // if (protectDefaultBranch) { - // try { - // await enableBranchProtectionOnDefaultRepoBranch({ - // owner, - // client, - // repoName: newRepo.name, - // logger: ctx.logger, - // defaultBranch, - // requireCodeOwnerReviews, - // requiredStatusCheckContexts, - // }); - // } catch (e) { - // assertError(e); - // ctx.logger.warn( - // `Skipping: default branch protection on '${newRepo.name}', ${e.message}`, - // ); - // } - // } - await initRepoPushAndProtect( remoteUrl, octokitOptions.auth, From b15904a3675ff1726a504a76e6f585eb0fe9becf Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Wed, 22 Jun 2022 14:44:03 +0100 Subject: [PATCH 028/212] chore: api-report update Signed-off-by: Marco Crivellaro --- plugins/scaffolder-backend/api-report.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 029000399b..a4693125d9 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -195,6 +195,10 @@ export function createGithubRepoCreateAction(options: { team: string; access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; } + | { + username: string; + access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + } )[] | undefined; token?: string | undefined; From 119f075cd8bbedae665fb9d8bfe224c4d7974f0f Mon Sep 17 00:00:00 2001 From: planeiii Date: Wed, 22 Jun 2022 10:12:28 -0500 Subject: [PATCH 029/212] chore: added Promise.any polyfill for Node v14 Signed-off-by: planeiii --- .../jenkins-backend/src/service/jenkinsApi.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts index 334be5dfa9..8de2609037 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -30,6 +30,23 @@ import { import { jenkinsExecutePermission } from '@backstage/plugin-jenkins-common'; import { NotAllowedError } from '@backstage/errors'; +// polyfill Promise.any for Node v14 +const anyPromise = (any => { + if (any) { + // bind is required by tsc + return any.bind(Promise); + } + + // reverse promise resolution (rejects become resolves and visa versa) + const reverse = (promise: Promise) => + new Promise((resolve, reject) => + Promise.resolve(promise).then(reject, resolve), + ); + + return (iterable: Promise[]) => + reverse(Promise.all([...iterable].map(reverse))); +})(Promise.any); + export class JenkinsApiImpl { private static readonly lastBuildTreeSpec = `lastBuild[ number, @@ -77,7 +94,7 @@ export class JenkinsApiImpl { if (branches) { // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. // TODO: extract a strategy interface for this - const job = await Promise.any( + const job = await anyPromise( branches.map(branch => client.job.get({ name: `${jenkinsInfo.jobFullName}/${branch}`, From 7ee4abdcc90b0d36d5728997cf3fd014c8acfadc Mon Sep 17 00:00:00 2001 From: "denis.fortin" Date: Fri, 17 Jun 2022 17:04:40 +0200 Subject: [PATCH 030/212] fix(vault-plugin): display full secret name relative to the secret path Only secret name was displayed in the table. It could be a problem when secret path has multiple subpath containing secrets with the same name. Displaying the relative path from secret path configured in the entity annotation allows to differentiate the secrets in this case. Signed-off-by: denis.fortin --- .changeset/moody-crabs-march.md | 6 ++++++ plugins/vault-backend/src/service/vaultApi.test.ts | 2 ++ plugins/vault-backend/src/service/vaultApi.ts | 2 ++ plugins/vault/dev/index.tsx | 2 ++ plugins/vault/src/api.test.ts | 2 ++ plugins/vault/src/api.ts | 1 + .../components/EntityVaultTable/EntityVaultTable.test.tsx | 2 ++ .../src/components/EntityVaultTable/EntityVaultTable.tsx | 2 +- 8 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .changeset/moody-crabs-march.md diff --git a/.changeset/moody-crabs-march.md b/.changeset/moody-crabs-march.md new file mode 100644 index 0000000000..3d7bc2d290 --- /dev/null +++ b/.changeset/moody-crabs-march.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-vault': minor +'@backstage/plugin-vault-backend': minor +--- + +Added a path notion in addition to secret name to allow to differentiate secrets in subpaths diff --git a/plugins/vault-backend/src/service/vaultApi.test.ts b/plugins/vault-backend/src/service/vaultApi.test.ts index 5a29633933..a407138e1e 100644 --- a/plugins/vault-backend/src/service/vaultApi.test.ts +++ b/plugins/vault-backend/src/service/vaultApi.test.ts @@ -46,11 +46,13 @@ describe('VaultApi', () => { const mockSecretsResult: VaultSecret[] = [ { name: 'secret::one', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::one`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::one`, }, { name: 'secret::two', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::two`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::two`, }, diff --git a/plugins/vault-backend/src/service/vaultApi.ts b/plugins/vault-backend/src/service/vaultApi.ts index 0623780654..5fc8c78149 100644 --- a/plugins/vault-backend/src/service/vaultApi.ts +++ b/plugins/vault-backend/src/service/vaultApi.ts @@ -34,6 +34,7 @@ export type VaultSecretList = { */ export type VaultSecret = { name: string; + path: string; showUrl: string; editUrl: string; }; @@ -131,6 +132,7 @@ export class VaultClient implements VaultApi { } else { secrets.push({ name: secret, + path: secretPath, editUrl: `${this.vaultConfig.baseUrl}/ui/vault/secrets/${this.vaultConfig.secretEngine}/edit/${secretPath}/${secret}`, showUrl: `${this.vaultConfig.baseUrl}/ui/vault/secrets/${this.vaultConfig.secretEngine}/show/${secretPath}/${secret}`, }); diff --git a/plugins/vault/dev/index.tsx b/plugins/vault/dev/index.tsx index f5056cd057..8d902e14c5 100644 --- a/plugins/vault/dev/index.tsx +++ b/plugins/vault/dev/index.tsx @@ -45,11 +45,13 @@ const mockedApi: VaultApi = { return [ { name: 'a::b', + path: '', editUrl: 'https://example.com', showUrl: 'https://example.com', }, { name: 'c::d', + path: '', editUrl: 'https://example.com', showUrl: 'https://example.com', }, diff --git a/plugins/vault/src/api.test.ts b/plugins/vault/src/api.test.ts index 70c6a553df..fb52cfbfdc 100644 --- a/plugins/vault/src/api.test.ts +++ b/plugins/vault/src/api.test.ts @@ -30,11 +30,13 @@ describe('api', () => { const mockSecretsResult: VaultSecret[] = [ { name: 'secret::one', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::one`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::one`, }, { name: 'secret::two', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::two`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::two`, }, diff --git a/plugins/vault/src/api.ts b/plugins/vault/src/api.ts index 74b212429f..ce51b4fcf9 100644 --- a/plugins/vault/src/api.ts +++ b/plugins/vault/src/api.ts @@ -21,6 +21,7 @@ export const vaultApiRef = createApiRef({ export type VaultSecret = { name: string; + path: string; showUrl: string; editUrl: string; }; diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.test.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.test.tsx index f2b181562a..c063166dbf 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.test.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.test.tsx @@ -71,11 +71,13 @@ describe('EntityVaultTable', () => { const mockSecretsResult: VaultSecret[] = [ { name: 'secret::one', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::one`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::one`, }, { name: 'secret::two', + path: 'test/success', editUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/edit/test/success/secret::two`, showUrl: `${mockBaseUrl}/ui/vault/secrets/secrets/show/test/success/secret::two`, }, diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx index 197c82c5b8..fddfc8ef25 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx @@ -49,7 +49,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { const data = (value || []).map(secret => { return { - secret: secret.name, + secret: `${secret.path.replace(secretPath + "/", "")}/${secret.name}`, view: ( Date: Thu, 16 Jun 2022 16:04:05 -0500 Subject: [PATCH 031/212] Add LimitRanges as Default Objects Signed-off-by: Salomon Moreno --- .changeset/eight-suits-fail.md | 6 ++++++ plugins/kubernetes-backend/api-report.md | 1 + .../src/service/KubernetesFanOutHandler.ts | 6 ++++++ plugins/kubernetes-backend/src/types/types.ts | 1 + plugins/kubernetes-common/api-report.md | 12 ++++++++++++ plugins/kubernetes-common/src/types.ts | 7 +++++++ 6 files changed, 33 insertions(+) create mode 100644 .changeset/eight-suits-fail.md diff --git a/.changeset/eight-suits-fail.md b/.changeset/eight-suits-fail.md new file mode 100644 index 0000000000..742154da91 --- /dev/null +++ b/.changeset/eight-suits-fail.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-kubernetes-backend': patch +'@backstage/plugin-kubernetes-common': patch +--- + +Fixed the lack of `limitranges` as part of the Default Objects to fetch from the kubernetes api diff --git a/plugins/kubernetes-backend/api-report.md b/plugins/kubernetes-backend/api-report.md index 41748f240b..adc8fb503f 100644 --- a/plugins/kubernetes-backend/api-report.md +++ b/plugins/kubernetes-backend/api-report.md @@ -214,6 +214,7 @@ export type KubernetesObjectTypes = | 'services' | 'configmaps' | 'deployments' + | 'limitranges' | 'replicasets' | 'horizontalpodautoscalers' | 'jobs' diff --git a/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts b/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts index ac2ffaf2ed..67748e1506 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts @@ -70,6 +70,12 @@ export const DEFAULT_OBJECTS: ObjectToFetch[] = [ plural: 'configmaps', objectType: 'configmaps', }, + { + group: '', + apiVersion: 'v1', + plural: 'limitranges', + objectType: 'limitranges', + }, { group: 'apps', apiVersion: 'v1', diff --git a/plugins/kubernetes-backend/src/types/types.ts b/plugins/kubernetes-backend/src/types/types.ts index 6302a49fa5..0826c4158c 100644 --- a/plugins/kubernetes-backend/src/types/types.ts +++ b/plugins/kubernetes-backend/src/types/types.ts @@ -101,6 +101,7 @@ export type KubernetesObjectTypes = | 'services' | 'configmaps' | 'deployments' + | 'limitranges' | 'replicasets' | 'horizontalpodautoscalers' | 'jobs' diff --git a/plugins/kubernetes-common/api-report.md b/plugins/kubernetes-common/api-report.md index d59db7422f..2ca33d1a97 100644 --- a/plugins/kubernetes-common/api-report.md +++ b/plugins/kubernetes-common/api-report.md @@ -11,6 +11,7 @@ import { V1Deployment } from '@kubernetes/client-node'; import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { V1Ingress } from '@kubernetes/client-node'; import { V1Job } from '@kubernetes/client-node'; +import { V1LimitRange } from '@kubernetes/client-node'; import { V1Pod } from '@kubernetes/client-node'; import { V1ReplicaSet } from '@kubernetes/client-node'; import { V1Service } from '@kubernetes/client-node'; @@ -131,6 +132,7 @@ export type FetchResponse = | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse + | LimitRangeFetchReponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse @@ -212,6 +214,16 @@ export interface KubernetesRequestBody { entity: Entity; } +// Warning: (ae-missing-release-tag) "LimitRangeFetchReponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface LimitRangeFetchReponse { + // (undocumented) + resources: Array; + // (undocumented) + type: 'limitranges'; +} + // Warning: (ae-missing-release-tag) "ObjectsByEntityResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/kubernetes-common/src/types.ts b/plugins/kubernetes-common/src/types.ts index 68fbe09301..9b8b790c79 100644 --- a/plugins/kubernetes-common/src/types.ts +++ b/plugins/kubernetes-common/src/types.ts @@ -22,6 +22,7 @@ import { V1HorizontalPodAutoscaler, V1Ingress, V1Job, + V1LimitRange, V1Pod, V1ReplicaSet, V1Service, @@ -97,6 +98,7 @@ export type FetchResponse = | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse + | LimitRangeFetchReponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse @@ -130,6 +132,11 @@ export interface ReplicaSetsFetchResponse { resources: Array; } +export interface LimitRangeFetchReponse { + type: 'limitranges'; + resources: Array; +} + export interface HorizontalPodAutoscalersFetchResponse { type: 'horizontalpodautoscalers'; resources: Array; From e271183fe7176c86dc3266a4128051751366b8e6 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:54:24 -0500 Subject: [PATCH 032/212] Added example for custom reader page Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- docs/features/techdocs/addons.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/features/techdocs/addons.md b/docs/features/techdocs/addons.md index a4e1de7d4f..fe1058b2ca 100644 --- a/docs/features/techdocs/addons.md +++ b/docs/features/techdocs/addons.md @@ -76,6 +76,18 @@ import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; ; ``` +If you are using a custom [TechDocs reader page](./how-to-guides.md#how-to-customize-the-techdocs-reader-page) your setup will be very similar, here's an example: + +```ts +}> + + + {/* Other addons can be added here. */} + + {techDocsPage} // This is your custom TechDocs reader page + +``` + The process for configuring Addons on the documentation tab on the entity page is very similar; instead of adding the `` registry under a ``, you'd add it as a child of ``: From ff4f56eb4954f8eeac98d50d0e65852c943a9462 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Sat, 12 Mar 2022 11:17:28 -0600 Subject: [PATCH 033/212] Removed properties from BackstagePaletteAdditions Signed-off-by: Andre Wanlin --- .changeset/serious-houses-watch.md | 29 +++++++++++++++++++++++++++++ packages/theme/api-report.md | 4 ---- packages/theme/src/themes.ts | 8 -------- packages/theme/src/types.ts | 4 ---- 4 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .changeset/serious-houses-watch.md diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md new file mode 100644 index 0000000000..5bfcbc5050 --- /dev/null +++ b/.changeset/serious-houses-watch.md @@ -0,0 +1,29 @@ +--- +'@backstage/theme': patch +--- + +Removed the following unused properties from BackstagePaletteAdditions under the `bursts` property: + +```ts +slackChannelText: string; +backgroundColor: { + default: string; +}; +``` + +If these were being used you can add them back to your custom theme, for example like this: + +```diff + bursts: { + fontColor: '#FEFEFE', ++ slackChannelText: '#ddd', ++ backgroundColor: { ++ default: '#7C3699', ++ }, + gradient: { + linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', + }, +}, +``` + +The [Customize the look-and-feel of your App](https://backstage.io/docs/getting-started/app-custom-theme) documentation has more details on creating and using a custom theme. diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index 772e868635..043d7d37ac 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -53,10 +53,6 @@ export type BackstagePaletteAdditions = { }; bursts: { fontColor: string; - slackChannelText: string; - backgroundColor: { - default: string; - }; gradient: { linear: string; }; diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index b048c70fec..e5551f7796 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -39,10 +39,6 @@ export const lightTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', - slackChannelText: '#ddd', - backgroundColor: { - default: '#7C3699', - }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, @@ -116,10 +112,6 @@ export const darkTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', - slackChannelText: '#ddd', - backgroundColor: { - default: '#7C3699', - }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index b921154005..ec71e6d090 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -65,10 +65,6 @@ export type BackstagePaletteAdditions = { }; bursts: { fontColor: string; - slackChannelText: string; - backgroundColor: { - default: string; - }; gradient: { linear: string; }; From e591c242efdd034900857c41c1aa8ed6844336c0 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Tue, 15 Mar 2022 14:30:01 -0500 Subject: [PATCH 034/212] Suggested changes Signed-off-by: Andre Wanlin --- .changeset/serious-houses-watch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index 5bfcbc5050..4da1466c1f 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -1,8 +1,8 @@ --- -'@backstage/theme': patch +'@backstage/theme': minor --- -Removed the following unused properties from BackstagePaletteAdditions under the `bursts` property: +**BREAKING**: Removed the following unused properties from BackstagePaletteAdditions under the `bursts` property: ```ts slackChannelText: string; From d348095890005273faecfdf8325727490715ea90 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 28 Mar 2022 12:44:56 -0500 Subject: [PATCH 035/212] Changes based on feedback Signed-off-by: Andre Wanlin --- .changeset/serious-houses-watch.md | 28 ++----------------- .../src/layout/ItemCard/ItemCardHeader.tsx | 2 +- packages/theme/src/pageTheme.ts | 2 ++ packages/theme/src/themes.ts | 8 ++++++ packages/theme/src/types.ts | 7 +++++ 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index 4da1466c1f..07c4e9eaf6 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -1,29 +1,5 @@ --- -'@backstage/theme': minor +'@backstage/theme': patch --- -**BREAKING**: Removed the following unused properties from BackstagePaletteAdditions under the `bursts` property: - -```ts -slackChannelText: string; -backgroundColor: { - default: string; -}; -``` - -If these were being used you can add them back to your custom theme, for example like this: - -```diff - bursts: { - fontColor: '#FEFEFE', -+ slackChannelText: '#ddd', -+ backgroundColor: { -+ default: '#7C3699', -+ }, - gradient: { - linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', - }, -}, -``` - -The [Customize the look-and-feel of your App](https://backstage.io/docs/getting-started/app-custom-theme) documentation has more details on creating and using a custom theme. +**DEPRECIATED**: The `bursts` object from BackstagePaletteAdditions has been depreciated and will be removed in a future release diff --git a/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx b/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx index a34d773ce3..d9443ffc9a 100644 --- a/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx +++ b/packages/core-components/src/layout/ItemCard/ItemCardHeader.tsx @@ -27,7 +27,7 @@ const styles = (theme: BackstageTheme) => root: { color: theme.palette.common.white, padding: theme.spacing(2, 2, 3), - backgroundImage: theme.palette.bursts.gradient.linear, + backgroundImage: theme.getPageTheme({ themeId: 'card' }).backgroundImage, backgroundPosition: 0, backgroundSize: 'inherit', }, diff --git a/packages/theme/src/pageTheme.ts b/packages/theme/src/pageTheme.ts index ae81dc8534..1a5ea75394 100644 --- a/packages/theme/src/pageTheme.ts +++ b/packages/theme/src/pageTheme.ts @@ -52,6 +52,7 @@ export const colorVariants: Record = { eveningSea: ['#00FFF2', '#035355'], teal: ['#005B4B'], pinkSea: ['#C8077A', '#C2297D'], + greens: ['#4BB8A5', '#187656'], }; /** @@ -86,4 +87,5 @@ export const pageTheme: Record = { other: genPageTheme(colorVariants.darkGrey, shapes.wave), app: genPageTheme(colorVariants.toastyOrange, shapes.wave), apis: genPageTheme(colorVariants.teal, shapes.wave2), + card: genPageTheme(colorVariants.greens, shapes.wave), }; diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index e5551f7796..b048c70fec 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -39,6 +39,10 @@ export const lightTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', + slackChannelText: '#ddd', + backgroundColor: { + default: '#7C3699', + }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, @@ -112,6 +116,10 @@ export const darkTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', + slackChannelText: '#ddd', + backgroundColor: { + default: '#7C3699', + }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index ec71e6d090..566bffb2e4 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -63,8 +63,15 @@ export type BackstagePaletteAdditions = { tabbar: { indicator: string; }; + /** + * @deprecated The entire `bursts` section will be removed in a future release + */ bursts: { fontColor: string; + slackChannelText: string; + backgroundColor: { + default: string; + }; gradient: { linear: string; }; From 4de88868b909a7a7c57262b96dd3f0b1dcb09741 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 4 Apr 2022 07:59:37 -0500 Subject: [PATCH 036/212] Fixed MobileSidebar Signed-off-by: Andre Wanlin --- packages/core-components/src/layout/Sidebar/MobileSidebar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-components/src/layout/Sidebar/MobileSidebar.tsx b/packages/core-components/src/layout/Sidebar/MobileSidebar.tsx index b51e3cbc0d..c85e6d11f2 100644 --- a/packages/core-components/src/layout/Sidebar/MobileSidebar.tsx +++ b/packages/core-components/src/layout/Sidebar/MobileSidebar.tsx @@ -85,14 +85,14 @@ const useStyles = makeStyles( overlayHeader: { display: 'flex', - color: theme.palette.bursts.fontColor, + color: theme.palette.text.primary, alignItems: 'center', justifyContent: 'space-between', padding: theme.spacing(2, 3), }, overlayHeaderClose: { - color: theme.palette.bursts.fontColor, + color: theme.palette.text.primary, }, marginMobileSidebar: props => ({ From 322195ee4dcb92ca1cde6c2b5b19f466cade3b4b Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 4 Apr 2022 08:04:35 -0500 Subject: [PATCH 037/212] Updated API Report Signed-off-by: Andre Wanlin --- packages/theme/api-report.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index 043d7d37ac..772e868635 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -53,6 +53,10 @@ export type BackstagePaletteAdditions = { }; bursts: { fontColor: string; + slackChannelText: string; + backgroundColor: { + default: string; + }; gradient: { linear: string; }; From 4298a0dc49aeac21a3709f982a0a67a78574fb70 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Sat, 18 Jun 2022 16:18:36 -0500 Subject: [PATCH 038/212] Changes based on feedback Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/serious-houses-watch.md | 2 +- .../src/layout/Header/Header.tsx | 8 ++-- packages/theme/src/pageTheme.ts | 47 +++++++++++++------ packages/theme/src/types.ts | 1 + .../EntityContextMenu/EntityContextMenu.tsx | 2 +- .../OwnershipCard/OwnershipCard.stories.tsx | 16 +++---- 6 files changed, 48 insertions(+), 28 deletions(-) diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index 07c4e9eaf6..d3f82850f0 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -2,4 +2,4 @@ '@backstage/theme': patch --- -**DEPRECIATED**: The `bursts` object from BackstagePaletteAdditions has been depreciated and will be removed in a future release +**DEPRECATED**: The `bursts` object from `BackstagePaletteAdditions` has been depreciated and will be removed in a future release diff --git a/packages/core-components/src/layout/Header/Header.tsx b/packages/core-components/src/layout/Header/Header.tsx index bb4d19b949..2bb0bc6f6a 100644 --- a/packages/core-components/src/layout/Header/Header.tsx +++ b/packages/core-components/src/layout/Header/Header.tsx @@ -65,13 +65,13 @@ const useStyles = makeStyles( width: 'auto', }, title: { - color: theme.palette.bursts.fontColor, + color: theme.page.fontColor, wordBreak: 'break-word', fontSize: theme.typography.h3.fontSize, marginBottom: 0, }, subtitle: { - color: theme.palette.bursts.fontColor, + color: theme.page.fontColor, opacity: 0.8, display: 'inline-block', // prevents margin collapse of adjacent siblings marginTop: theme.spacing(1), @@ -82,10 +82,10 @@ const useStyles = makeStyles( fontSize: 11, opacity: 0.8, marginBottom: theme.spacing(1), - color: theme.palette.bursts.fontColor, + color: theme.page.fontColor, }, breadcrumb: { - color: theme.palette.bursts.fontColor, + color: theme.page.fontColor, }, breadcrumbType: { fontSize: 'inherit', diff --git a/packages/theme/src/pageTheme.ts b/packages/theme/src/pageTheme.ts index 1a5ea75394..9d9e07fc93 100644 --- a/packages/theme/src/pageTheme.ts +++ b/packages/theme/src/pageTheme.ts @@ -64,12 +64,25 @@ export const colorVariants: Record = { * As the background shapes and colors are decorative, we place them onto the * page as a css background-image instead of an html element of its own. */ -export function genPageTheme(colors: string[], shape: string): PageTheme { - const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors; +export function genPageTheme(options: { + colors: string[]; + shape: string; + fontColor?: string; +}): PageTheme { + const gradientColors = + options.colors.length === 1 + ? [options.colors[0], options.colors[0]] + : options.colors; const gradient = `linear-gradient(90deg, ${gradientColors.join(', ')})`; - const backgroundImage = `${shape}, ${gradient}`; + const backgroundImage = `${options.shape}, ${gradient}`; + const fontColor = options.fontColor ?? '#FFFFFF'; - return { colors, shape, backgroundImage }; + return { + colors: options.colors, + shape: options.shape, + backgroundImage: backgroundImage, + fontColor: fontColor, + }; } /** @@ -78,14 +91,20 @@ export function genPageTheme(colors: string[], shape: string): PageTheme { * @public */ export const pageTheme: Record = { - home: genPageTheme(colorVariants.teal, shapes.wave), - documentation: genPageTheme(colorVariants.pinkSea, shapes.wave2), - tool: genPageTheme(colorVariants.purpleSky, shapes.round), - service: genPageTheme(colorVariants.marineBlue, shapes.wave), - website: genPageTheme(colorVariants.veryBlue, shapes.wave), - library: genPageTheme(colorVariants.rubyRed, shapes.wave), - other: genPageTheme(colorVariants.darkGrey, shapes.wave), - app: genPageTheme(colorVariants.toastyOrange, shapes.wave), - apis: genPageTheme(colorVariants.teal, shapes.wave2), - card: genPageTheme(colorVariants.greens, shapes.wave), + home: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave }), + documentation: genPageTheme({ + colors: colorVariants.pinkSea, + shape: shapes.wave2, + }), + tool: genPageTheme({ colors: colorVariants.purpleSky, shape: shapes.round }), + service: genPageTheme({ + colors: colorVariants.marineBlue, + shape: shapes.wave, + }), + website: genPageTheme({ colors: colorVariants.veryBlue, shape: shapes.wave }), + library: genPageTheme({ colors: colorVariants.rubyRed, shape: shapes.wave }), + other: genPageTheme({ colors: colorVariants.darkGrey, shape: shapes.wave }), + app: genPageTheme({ colors: colorVariants.toastyOrange, shape: shapes.wave }), + apis: genPageTheme({ colors: colorVariants.teal, shape: shapes.wave2 }), + card: genPageTheme({ colors: colorVariants.greens, shape: shapes.wave }), }; diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index 566bffb2e4..96b7c54f9b 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -164,4 +164,5 @@ export type PageTheme = { colors: string[]; shape: string; backgroundImage: string; + fontColor: string; }; diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index db50eeab84..fc2ec8d864 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -40,7 +40,7 @@ const useStyles = makeStyles( (theme: BackstageTheme) => { return { button: { - color: theme.palette.bursts.fontColor, + color: theme.page.fontColor, }, }; }, diff --git a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx index c07815f39e..fc050feb2a 100644 --- a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx +++ b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx @@ -110,14 +110,14 @@ const monochromeTheme = (outer: BackstageTheme) => ...outer, defaultPageTheme: 'home', pageTheme: { - home: genPageTheme(['#444'], shapes.wave2), - documentation: genPageTheme(['#474747'], shapes.wave2), - tool: genPageTheme(['#222'], shapes.wave2), - service: genPageTheme(['#aaa'], shapes.wave2), - website: genPageTheme(['#0e0e0e'], shapes.wave2), - library: genPageTheme(['#9d9d9d'], shapes.wave2), - other: genPageTheme(['#aaa'], shapes.wave2), - app: genPageTheme(['#666'], shapes.wave2), + home: genPageTheme({ colors: ['#444'], shape: shapes.wave2 }), + documentation: genPageTheme({ colors: ['#474747'], shape: shapes.wave2 }), + tool: genPageTheme({ colors: ['#222'], shape: shapes.wave2 }), + service: genPageTheme({ colors: ['#aaa'], shape: shapes.wave2 }), + website: genPageTheme({ colors: ['#0e0e0e'], shape: shapes.wave2 }), + library: genPageTheme({ colors: ['#9d9d9d'], shape: shapes.wave2 }), + other: genPageTheme({ colors: ['#aaa'], shape: shapes.wave2 }), + app: genPageTheme({ colors: ['#666'], shape: shapes.wave2 }), }, }); From 593c0c0d3b2f64d74ad80879117d50262f964886 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Sat, 12 Mar 2022 11:17:28 -0600 Subject: [PATCH 039/212] Removed properties from BackstagePaletteAdditions Signed-off-by: Andre Wanlin --- packages/theme/api-report.md | 4 ---- packages/theme/src/themes.ts | 8 -------- packages/theme/src/types.ts | 4 ---- 3 files changed, 16 deletions(-) diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index 772e868635..043d7d37ac 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -53,10 +53,6 @@ export type BackstagePaletteAdditions = { }; bursts: { fontColor: string; - slackChannelText: string; - backgroundColor: { - default: string; - }; gradient: { linear: string; }; diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index b048c70fec..e5551f7796 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -39,10 +39,6 @@ export const lightTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', - slackChannelText: '#ddd', - backgroundColor: { - default: '#7C3699', - }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, @@ -116,10 +112,6 @@ export const darkTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', - slackChannelText: '#ddd', - backgroundColor: { - default: '#7C3699', - }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index 96b7c54f9b..ed7e9fdd25 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -68,10 +68,6 @@ export type BackstagePaletteAdditions = { */ bursts: { fontColor: string; - slackChannelText: string; - backgroundColor: { - default: string; - }; gradient: { linear: string; }; From 1fa7f7448e89499dae91abd86387e0da86c4ae1c Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Tue, 15 Mar 2022 14:30:01 -0500 Subject: [PATCH 040/212] Suggested changes Signed-off-by: Andre Wanlin --- .changeset/serious-houses-watch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index d3f82850f0..08979a5012 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -1,5 +1,5 @@ --- -'@backstage/theme': patch +'@backstage/theme': minor --- **DEPRECATED**: The `bursts` object from `BackstagePaletteAdditions` has been depreciated and will be removed in a future release From e1dbedbefca85fe709549bd91cf4d2c30f76c523 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 28 Mar 2022 12:44:56 -0500 Subject: [PATCH 041/212] Changes based on feedback Signed-off-by: Andre Wanlin --- .changeset/serious-houses-watch.md | 2 +- packages/theme/src/themes.ts | 8 ++++++++ packages/theme/src/types.ts | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index 08979a5012..d3f82850f0 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -1,5 +1,5 @@ --- -'@backstage/theme': minor +'@backstage/theme': patch --- **DEPRECATED**: The `bursts` object from `BackstagePaletteAdditions` has been depreciated and will be removed in a future release diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index e5551f7796..b048c70fec 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -39,6 +39,10 @@ export const lightTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', + slackChannelText: '#ddd', + backgroundColor: { + default: '#7C3699', + }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, @@ -112,6 +116,10 @@ export const darkTheme = createTheme({ }, bursts: { fontColor: '#FEFEFE', + slackChannelText: '#ddd', + backgroundColor: { + default: '#7C3699', + }, gradient: { linear: 'linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)', }, diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index ed7e9fdd25..96b7c54f9b 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -68,6 +68,10 @@ export type BackstagePaletteAdditions = { */ bursts: { fontColor: string; + slackChannelText: string; + backgroundColor: { + default: string; + }; gradient: { linear: string; }; From 6e20959b5a3fdc8e0a2297dcc7235df60239bd02 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Mon, 4 Apr 2022 08:04:35 -0500 Subject: [PATCH 042/212] Updated API Report Signed-off-by: Andre Wanlin --- packages/theme/api-report.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index 043d7d37ac..772e868635 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -53,6 +53,10 @@ export type BackstagePaletteAdditions = { }; bursts: { fontColor: string; + slackChannelText: string; + backgroundColor: { + default: string; + }; gradient: { linear: string; }; From 385389d23c68aee51abe47159908107b6d02ba21 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Mon, 20 Jun 2022 14:23:17 -0500 Subject: [PATCH 043/212] Latest feedback updates Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/great-roses-pump.md | 2 +- .changeset/serious-houses-watch.md | 2 ++ .changeset/tricky-ravens-visit.md | 6 ++++++ packages/theme/api-report.md | 9 ++++++++- packages/theme/src/pageTheme.ts | 20 ++++++++++---------- 5 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 .changeset/tricky-ravens-visit.md diff --git a/.changeset/great-roses-pump.md b/.changeset/great-roses-pump.md index 16a49bd464..0e15d186d4 100644 --- a/.changeset/great-roses-pump.md +++ b/.changeset/great-roses-pump.md @@ -4,7 +4,7 @@ Previously, the color of the Entity Context Menu (in the Entity Page Header) was hardcoded as `white`. -This was an issue for themes that use a header with a white background. By default, the color of the icon is now `theme.palette.bursts.fontColor`. +This was an issue for themes that use a header with a white background. By default, the color of the icon is now `theme.page.fontColor`. It can now also be overridden in the theme, which is only necessary if the header title, subtitle and three-dots icon need to have different colors. For example: diff --git a/.changeset/serious-houses-watch.md b/.changeset/serious-houses-watch.md index d3f82850f0..63d5253bcb 100644 --- a/.changeset/serious-houses-watch.md +++ b/.changeset/serious-houses-watch.md @@ -3,3 +3,5 @@ --- **DEPRECATED**: The `bursts` object from `BackstagePaletteAdditions` has been depreciated and will be removed in a future release + +The `genPageTheme` function now includes an optional options object with an optional `fontColor` which defaults to white if not provided. diff --git a/.changeset/tricky-ravens-visit.md b/.changeset/tricky-ravens-visit.md new file mode 100644 index 0000000000..8500c9b64e --- /dev/null +++ b/.changeset/tricky-ravens-visit.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-catalog': patch +--- + +Updated to remove usage of the `bursts` object in the theme palette diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index 772e868635..92958c9c7e 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -116,7 +116,13 @@ export function createThemeOverrides(theme: BackstageTheme): Overrides; export const darkTheme: BackstageTheme; // @public -export function genPageTheme(colors: string[], shape: string): PageTheme; +export function genPageTheme(props: { + colors: string[]; + shape: string; + options?: { + fontColor?: string; + }; +}): PageTheme; // @public export const lightTheme: BackstageTheme; @@ -126,6 +132,7 @@ export type PageTheme = { colors: string[]; shape: string; backgroundImage: string; + fontColor: string; }; // @public diff --git a/packages/theme/src/pageTheme.ts b/packages/theme/src/pageTheme.ts index 9d9e07fc93..5b5eb24be9 100644 --- a/packages/theme/src/pageTheme.ts +++ b/packages/theme/src/pageTheme.ts @@ -64,22 +64,22 @@ export const colorVariants: Record = { * As the background shapes and colors are decorative, we place them onto the * page as a css background-image instead of an html element of its own. */ -export function genPageTheme(options: { +export function genPageTheme(props: { colors: string[]; shape: string; - fontColor?: string; + options?: { + fontColor?: string; + }; }): PageTheme { - const gradientColors = - options.colors.length === 1 - ? [options.colors[0], options.colors[0]] - : options.colors; + const { colors, shape, options } = props; + const gradientColors = colors.length === 1 ? [colors[0], colors[0]] : colors; const gradient = `linear-gradient(90deg, ${gradientColors.join(', ')})`; - const backgroundImage = `${options.shape}, ${gradient}`; - const fontColor = options.fontColor ?? '#FFFFFF'; + const backgroundImage = `${shape}, ${gradient}`; + const fontColor = options?.fontColor ?? '#FFFFFF'; return { - colors: options.colors, - shape: options.shape, + colors: colors, + shape: shape, backgroundImage: backgroundImage, fontColor: fontColor, }; From f281ad17c002b8ea8d9d96580548f40902212965 Mon Sep 17 00:00:00 2001 From: Tim Hansen Date: Fri, 27 May 2022 11:28:57 -0600 Subject: [PATCH 044/212] Build default Docker image on release Signed-off-by: Tim Hansen --- .changeset/blue-monkeys-explain.md | 6 ++ .github/workflows/deploy_docker-image.yml | 89 +++++++++++++++++++++ .github/workflows/deploy_packages.yml | 9 ++- .github/workflows/sync_release-manifest.yml | 13 ++- packages/create-app/src/createApp.ts | 8 ++ scripts/create-release-tag.js | 21 +---- 6 files changed, 117 insertions(+), 29 deletions(-) create mode 100644 .changeset/blue-monkeys-explain.md create mode 100644 .github/workflows/deploy_docker-image.yml diff --git a/.changeset/blue-monkeys-explain.md b/.changeset/blue-monkeys-explain.md new file mode 100644 index 0000000000..69382ff11d --- /dev/null +++ b/.changeset/blue-monkeys-explain.md @@ -0,0 +1,6 @@ +--- +'@backstage/create-app': patch +--- + +Adds the ability to define the Backstage app name using a `BACKSTAGE_APP_NAME` +environment variable when running `create-app`. diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml new file mode 100644 index 0000000000..b0a2bc5286 --- /dev/null +++ b/.github/workflows/deploy_docker-image.yml @@ -0,0 +1,89 @@ +name: Build and push Docker Hub image +on: + repository_dispatch: + types: [release-published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: backstage + ref: v${{ github.event.client_payload.version }} + + - name: setup-node + uses: actions/setup-node@v1 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org/ + + # Beginning of yarn setup, keep in sync between all workflows. + # TODO(Rugvip): move this to composite action once all features we use are supported + - name: use node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org/ # Needed for auth + + # Cache every node_modules folder inside the monorepo + - name: cache all node_modules + id: cache-modules + uses: actions/cache@v2 + with: + path: '**/node_modules' + # We use both yarn.lock and package.json as cache keys to ensure that + # changes to local monorepo packages bust the cache. + key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} + + # If we get a cache hit for node_modules, there's no need to bring in the global + # yarn cache or run yarn install, as all dependencies will be installed already. + + - name: find location of global yarn cache + id: yarn-cache + if: steps.cache-modules.outputs.cache-hit != 'true' + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: cache global yarn cache + uses: actions/cache@v2 + if: steps.cache-modules.outputs.cache-hit != 'true' + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: yarn install + if: steps.cache-modules.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + # End of yarn setup + + - name: create-app + run: yarn backstage-create-app + working-directory: ./packages/create-app + env: + BACKSTAGE_APP_NAME: example-app + + - name: yarn build + run: yarn build + working-directory: ./packages/create-app/example-app + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: './packages/create-app/example-app' + file: ./packages/create-app/example-app/packages/backend/Dockerfile + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backstage:${{ github.event.client_payload.version }} + cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/backstage:buildcache + cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/backstage:buildcache,mode=max diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index b63507df0c..29a3c8d80d 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -209,7 +209,7 @@ jobs: # Grabs the version in the root package.json and creates a tag on GitHub - name: Create a release tag id: create_tag - run: node scripts/create-release-tag.js --dispatch-workflows + run: node scripts/create-release-tag.js env: GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} @@ -219,6 +219,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} + - name: Dispatch repository event + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} + event-type: release-published + client-payload: '{"version": "${{ steps.create_tag.outputs.version }}"}' + # Notify everyone about this great new release :D - name: Discord notification uses: Ilshidur/action-discord@0.3.2 diff --git a/.github/workflows/sync_release-manifest.yml b/.github/workflows/sync_release-manifest.yml index 816a3e632f..8cf6991aaf 100644 --- a/.github/workflows/sync_release-manifest.yml +++ b/.github/workflows/sync_release-manifest.yml @@ -1,10 +1,7 @@ name: Sync Release Manifest on: - workflow_dispatch: - inputs: - version: - description: Version number, without any 'v' prefix - required: true + repository_dispatch: + types: [release-published] jobs: create-new-version: @@ -23,7 +20,7 @@ jobs: with: path: backstage # 'v' prefix is added here for the tag, we keep it out of the manifest logic - ref: v${{ github.event.inputs.version }} + ref: v${{ github.event.client_payload.version }} # Checkout backstage/versions into /backstage/versions, which is where store the output - name: Checkout versions @@ -44,10 +41,10 @@ jobs: cd backstage mkdir -p scripts wget -O scripts/assemble-manifest.js https://raw.githubusercontent.com/backstage/backstage/master/scripts/assemble-manifest.js - node scripts/assemble-manifest.js ${{ github.event.inputs.version }} + node scripts/assemble-manifest.js ${{ github.event.client_payload.version }} cd versions git add . - git commit -am "${{ github.event.inputs.version }}" + git commit -am "${{ github.event.client_payload.version }}" git push - name: Dispatch update-helper update diff --git a/packages/create-app/src/createApp.ts b/packages/create-app/src/createApp.ts index 824d1d967e..7cf589e5f8 100644 --- a/packages/create-app/src/createApp.ts +++ b/packages/create-app/src/createApp.ts @@ -49,6 +49,14 @@ export default async (opts: OptionValues): Promise => { } return true; }, + when: (a: Answers) => { + const envName = process.env.BACKSTAGE_APP_NAME; + if (envName) { + a.name = envName; + return false; + } + return true; + }, }, ]); diff --git a/scripts/create-release-tag.js b/scripts/create-release-tag.js index 637467f285..a2706c578f 100755 --- a/scripts/create-release-tag.js +++ b/scripts/create-release-tag.js @@ -57,22 +57,7 @@ async function createGitTag(octokit, commitSha, tagName) { } } -async function dispatchReleaseWorkflows(octokit, releaseVersion) { - console.log('Dispatching release manifest sync'); - await octokit.actions.createWorkflowDispatch({ - owner: 'backstage', - repo: 'backstage', - workflow_id: 'sync_release-manifest.yml', - ref: 'master', - inputs: { - version: releaseVersion, - }, - }); -} - async function main() { - const shouldDispatch = process.argv.includes('--dispatch-workflows'); - if (!process.env.GITHUB_SHA) { throw new Error('GITHUB_SHA is not set'); } @@ -90,11 +75,7 @@ async function main() { await createGitTag(octokit, commitSha, tagName); console.log(`::set-output name=tag_name::${tagName}`); - - if (shouldDispatch) { - console.log(`Dispatching release workflows for ${tagName}`); - await dispatchReleaseWorkflows(octokit, releaseVersion); - } + console.log(`::set-output name=version::${releaseVersion}`); } main().catch(error => { From 381a44edce53db61cc44ba4f964f48225a56d0ad Mon Sep 17 00:00:00 2001 From: Tim Hansen Date: Mon, 30 May 2022 15:12:54 -0600 Subject: [PATCH 045/212] npx, remove Docker cache Signed-off-by: Tim Hansen --- .github/workflows/deploy_docker-image.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml index b0a2bc5286..13269ce4d7 100644 --- a/.github/workflows/deploy_docker-image.yml +++ b/.github/workflows/deploy_docker-image.yml @@ -60,8 +60,7 @@ jobs: # End of yarn setup - name: create-app - run: yarn backstage-create-app - working-directory: ./packages/create-app + run: npx @backstage/create-app env: BACKSTAGE_APP_NAME: example-app @@ -85,5 +84,3 @@ jobs: file: ./packages/create-app/example-app/packages/backend/Dockerfile push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backstage:${{ github.event.client_payload.version }} - cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/backstage:buildcache - cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/backstage:buildcache,mode=max From 0f300f1e82d3d66936e88912b3814e87dfb8d1a3 Mon Sep 17 00:00:00 2001 From: Tim Hansen Date: Thu, 23 Jun 2022 13:28:13 -0600 Subject: [PATCH 046/212] Use GitHub container registry Signed-off-by: Tim Hansen --- .github/workflows/deploy_docker-image.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml index 13269ce4d7..6cb97d1a9e 100644 --- a/.github/workflows/deploy_docker-image.yml +++ b/.github/workflows/deploy_docker-image.yml @@ -66,13 +66,14 @@ jobs: - name: yarn build run: yarn build - working-directory: ./packages/create-app/example-app + working-directory: ./example-app - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -80,7 +81,9 @@ jobs: - name: Build and push uses: docker/build-push-action@v2 with: - context: './packages/create-app/example-app' - file: ./packages/create-app/example-app/packages/backend/Dockerfile + context: './example-app' + file: ./example-app/packages/backend/Dockerfile push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backstage:${{ github.event.client_payload.version }} + tags: | + ghcr.io/${{ github.repository_owner }}/backstage:latest + ghcr.io/${{ github.repository_owner }}/backstage:${{ github.event.client_payload.version }} From 4baf8a4ece338045f3a2ad919242661919cc5b14 Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Tue, 3 May 2022 15:40:24 +0100 Subject: [PATCH 047/212] Update GitLab MR Action to allow source branch to be deleted on merge Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .changeset/old-onions-hear.md | 5 +++++ .../actions/builtin/publish/gitlabMergeRequest.ts | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .changeset/old-onions-hear.md diff --git a/.changeset/old-onions-hear.md b/.changeset/old-onions-hear.md new file mode 100644 index 0000000000..82dcc09190 --- /dev/null +++ b/.changeset/old-onions-hear.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Update GitLab Merge Request Action to allow source branch to be deleted diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index f717a7a0c6..fe94f5ae53 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -42,6 +42,7 @@ export const createPublishGitlabMergeRequestAction = (options: { token?: string; /** @deprecated Use projectPath instead */ projectid?: string; + removeSourceBranch?: boolean; }>({ id: 'publish:gitlab:merge-request', schema: { @@ -85,6 +86,12 @@ export const createPublishGitlabMergeRequestAction = (options: { type: 'string', description: 'The token to use for authorization to GitLab', }, + removeSourceBranch: { + title: 'Delete source branch', + type: 'boolean', + description: + 'Option to delete source branch once the MR has been merged. Default: false', + }, }, }, output: { @@ -187,7 +194,10 @@ export const createPublishGitlabMergeRequestAction = (options: { destinationBranch, String(defaultBranch), ctx.input.title, - { description: ctx.input.description }, + { + description: ctx.input.description, + removeSourceBranch: ctx.input.removeSourceBranch, + }, ).then((mergeRequest: { web_url: string }) => { return mergeRequest.web_url; }); From 5b99da51d9d0b090938e6224384ac2096680f83c Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Wed, 18 May 2022 08:43:42 +0100 Subject: [PATCH 048/212] Add api-report.md file Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- plugins/scaffolder-backend/api-report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 707b8e62ba..b0f831fc8c 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -345,6 +345,7 @@ export const createPublishGitlabMergeRequestAction: (options: { targetPath: string; token?: string | undefined; projectid?: string | undefined; + removeSourceBranch?: boolean | undefined; }>; // @public From f560f836ca57429505092834f55a8a38ce48f44d Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Wed, 18 May 2022 09:56:48 +0100 Subject: [PATCH 049/212] Update removeSourceBranch option to cater for when not set Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .../scaffolder/actions/builtin/publish/gitlabMergeRequest.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index fe94f5ae53..b1d5b35fa3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -196,7 +196,9 @@ export const createPublishGitlabMergeRequestAction = (options: { ctx.input.title, { description: ctx.input.description, - removeSourceBranch: ctx.input.removeSourceBranch, + removeSourceBranch: ctx.input.removeSourceBranch + ? ctx.input.removeSourceBranch + : false, }, ).then((mergeRequest: { web_url: string }) => { return mergeRequest.web_url; From 08a27a58ad4110b3f18cf4f932072be3dae5e983 Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Tue, 24 May 2022 10:56:10 +0100 Subject: [PATCH 050/212] Add gitlab MR test file Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .../publish/gitlabMergeRequest.test.ts | 219 ++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts new file mode 100644 index 0000000000..cf2bc57514 --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts @@ -0,0 +1,219 @@ +/* + * 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. + */ + +// * 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 { getRootLogger } from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; +import { ScmIntegrations } from '@backstage/integration'; +import mockFs from 'mock-fs'; +import os from 'os'; +import { resolve as resolvePath } from 'path'; +import { Writable } from 'stream'; +import { TemplateAction } from '../../types'; +import { createPublishGitlabMergeRequestAction } from './gitlabMergeRequest'; + +const root = os.platform() === 'win32' ? 'C:\\root' : '/root'; +const workspacePath = resolvePath(root, 'my-workspace'); + +const mockGitlabClient = { + Namespaces: { + show: jest.fn(), + }, + Branches: { + create: jest.fn(), + }, + Commits: { + create: jest.fn(), + }, + MergeRequests: { + create: jest.fn(async (_: any) => { + return { + default_branch: 'main', + }; + }), + }, + Projects: { + create: jest.fn(), + show: jest.fn(async (_: any) => { + return { + default_branch: 'main', + }; + }), + }, + Users: { + current: jest.fn(), + }, +}; + +jest.mock('@gitbeaker/node', () => ({ + Gitlab: class { + constructor() { + return mockGitlabClient; + } + }, +})); + +describe('createGitLabMergeRequest', () => { + let instance: TemplateAction; + + beforeEach(() => { + const config = new ConfigReader({ + integrations: { + gitlab: [ + { + host: 'gitlab.com', + token: 'token', + apiBaseUrl: 'https://api.gitlab.com', + }, + { + host: 'hosted.gitlab.com', + apiBaseUrl: 'https://api.hosted.gitlab.com', + }, + ], + }, + }); + + const integrations = ScmIntegrations.fromConfig(config); + instance = createPublishGitlabMergeRequestAction({ integrations }); + }); + + afterEach(() => { + mockFs.restore(); + }); + + describe('createGitLabMergeRequestWithoutRemoveBranch', () => { + it('removeSourceBranch is false by default when not passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'This MR is really good', + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'main', + 'Create my new MR', + { description: 'This MR is really good', removeSourceBranch: false }, + ); + }); + }); + + describe('createGitLabMergeRequestWithRemoveBranch', () => { + it('removeSourceBranch is true when true is passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'MR description', + removeSourceBranch: true, + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'main', + 'Create my new MR', + { description: 'MR description', removeSourceBranch: true }, + ); + }); + + it('removeSourceBranch is false when false is passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'other MR description', + removeSourceBranch: false, + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'main', + 'Create my new MR', + { + description: 'other MR description', + removeSourceBranch: false, + }, + ); + }); + }); +}); From b4149fc0a361ac80d655a2eae164a8dbbe0989d1 Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Fri, 27 May 2022 15:21:26 +0100 Subject: [PATCH 051/212] Add config and tests for new gitlab actions update and delete Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .changeset/old-onions-hear.md | 2 +- plugins/scaffolder-backend/api-report.md | 1 + .../publish/gitlabMergeRequest.test.ts | 175 ++++++++++++++++++ .../builtin/publish/gitlabMergeRequest.ts | 7 + 4 files changed, 184 insertions(+), 1 deletion(-) diff --git a/.changeset/old-onions-hear.md b/.changeset/old-onions-hear.md index 82dcc09190..febf2c2bf6 100644 --- a/.changeset/old-onions-hear.md +++ b/.changeset/old-onions-hear.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-backend': minor --- -Update GitLab Merge Request Action to allow source branch to be deleted +Update GitLab Merge Request Action to allow source branch to be deleted & configure additional gitlab actions: update and delete diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index b0f831fc8c..742293da30 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -346,6 +346,7 @@ export const createPublishGitlabMergeRequestAction: (options: { token?: string | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; + gitlabAction?: 'update' | 'create' | 'delete' | undefined; }>; // @public diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts index cf2bc57514..889b8b862c 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts @@ -79,6 +79,20 @@ jest.mock('@gitbeaker/node', () => ({ }, })); +jest.mock('globby', () => + jest.fn(async (_: any) => { + return ['foo/bar5']; + }), +); + +jest.mock('fs-extra', () => { + return { + readFile: jest.fn(async (_: any) => { + return Buffer.from('some content'); + }), + }; +}); + describe('createGitLabMergeRequest', () => { let instance: TemplateAction; @@ -216,4 +230,165 @@ describe('createGitLabMergeRequest', () => { ); }); }); + + describe('createGitLabMergeRequestWithoutGitlabAction', () => { + it('gitlabAction is create by default when not passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'This MR is really good', + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'Create my new MR', + [ + { + action: 'create', + filePath: 'foo/bar5', + content: 'some content', + }, + ], + ); + }); + }); + + describe('createGitLabMergeRequestWithGitlabAction', () => { + it('gitlabAction is create when create is passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'MR description', + gitlabAction: 'create', + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'Create my new MR', + [ + { + action: 'create', + filePath: 'foo/bar5', + content: 'some content', + }, + ], + ); + }); + + it('gitlabAction is update when update is passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'MR description', + gitlabAction: 'update', + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'Create my new MR', + [ + { + action: 'update', + filePath: 'foo/bar5', + content: 'some content', + }, + ], + ); + }); + + it('gitlabAction is delete when delete is passed in options', async () => { + const input = { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + title: 'Create my new MR', + branchName: 'new-mr', + description: 'other MR description', + gitlabAction: 'delete', + draft: true, + }; + mockFs({ + [workspacePath]: { + source: { 'foo.txt': 'Hello there!' }, + irrelevant: { 'bar.txt': 'Nothing to see here' }, + }, + }); + + const ctx = { + createTemporaryDirectory: jest.fn(), + output: jest.fn(), + logger: getRootLogger(), + logStream: new Writable(), + input, + workspacePath, + }; + await instance.handler(ctx); + + expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( + undefined, + 'new-mr', + 'Create my new MR', + [ + { + action: 'delete', + filePath: 'foo/bar5', + }, + ], + ); + }); + }); }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index b1d5b35fa3..7e0949454b 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -43,6 +43,7 @@ export const createPublishGitlabMergeRequestAction = (options: { /** @deprecated Use projectPath instead */ projectid?: string; removeSourceBranch?: boolean; + gitlabAction?: 'create' | 'update' | 'delete'; }>({ id: 'publish:gitlab:merge-request', schema: { @@ -92,6 +93,12 @@ export const createPublishGitlabMergeRequestAction = (options: { description: 'Option to delete source branch once the MR has been merged. Default: false', }, + gitlabAction: { + title: 'GitLab Action', + type: 'string', + description: + 'Option to configure gitlab action. Options are: create (by default), update and delete', + }, }, }, output: { From c8e8a164b7744d6d4a990f21ea89863d2a5f9ce1 Mon Sep 17 00:00:00 2001 From: Aisha Saini Date: Wed, 15 Jun 2022 15:57:41 +0100 Subject: [PATCH 052/212] Remove gitlab action changes from PR Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .changeset/old-onions-hear.md | 2 +- plugins/scaffolder-backend/api-report.md | 1 - .../actions/builtin/publish/gitlabMergeRequest.ts | 7 ------- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.changeset/old-onions-hear.md b/.changeset/old-onions-hear.md index febf2c2bf6..82dcc09190 100644 --- a/.changeset/old-onions-hear.md +++ b/.changeset/old-onions-hear.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-backend': minor --- -Update GitLab Merge Request Action to allow source branch to be deleted & configure additional gitlab actions: update and delete +Update GitLab Merge Request Action to allow source branch to be deleted diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 742293da30..b0f831fc8c 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -346,7 +346,6 @@ export const createPublishGitlabMergeRequestAction: (options: { token?: string | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; - gitlabAction?: 'update' | 'create' | 'delete' | undefined; }>; // @public diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts index 7e0949454b..b1d5b35fa3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.ts @@ -43,7 +43,6 @@ export const createPublishGitlabMergeRequestAction = (options: { /** @deprecated Use projectPath instead */ projectid?: string; removeSourceBranch?: boolean; - gitlabAction?: 'create' | 'update' | 'delete'; }>({ id: 'publish:gitlab:merge-request', schema: { @@ -93,12 +92,6 @@ export const createPublishGitlabMergeRequestAction = (options: { description: 'Option to delete source branch once the MR has been merged. Default: false', }, - gitlabAction: { - title: 'GitLab Action', - type: 'string', - description: - 'Option to configure gitlab action. Options are: create (by default), update and delete', - }, }, }, output: { From 3c09270d2deffa67106cbe2dab584d50907aa3a4 Mon Sep 17 00:00:00 2001 From: asaini1 Date: Fri, 24 Jun 2022 11:49:41 +0100 Subject: [PATCH 053/212] Update tests Signed-off-by: Aisha Saini Signed-off-by: asaini1 --- .../publish/gitlabMergeRequest.test.ts | 184 +----------------- 1 file changed, 6 insertions(+), 178 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts index 889b8b862c..7fe01921d1 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts @@ -79,20 +79,6 @@ jest.mock('@gitbeaker/node', () => ({ }, })); -jest.mock('globby', () => - jest.fn(async (_: any) => { - return ['foo/bar5']; - }), -); - -jest.mock('fs-extra', () => { - return { - readFile: jest.fn(async (_: any) => { - return Buffer.from('some content'); - }), - }; -}); - describe('createGitLabMergeRequest', () => { let instance: TemplateAction; @@ -129,6 +115,7 @@ describe('createGitLabMergeRequest', () => { branchName: 'new-mr', description: 'This MR is really good', draft: true, + targetPath: 'Subdirectory', }; mockFs({ [workspacePath]: { @@ -147,7 +134,7 @@ describe('createGitLabMergeRequest', () => { await instance.handler(ctx); expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( - undefined, + 'owner/repo', 'new-mr', 'main', 'Create my new MR', @@ -165,6 +152,7 @@ describe('createGitLabMergeRequest', () => { description: 'MR description', removeSourceBranch: true, draft: true, + targetPath: 'Subdirectory', }; mockFs({ [workspacePath]: { @@ -184,7 +172,7 @@ describe('createGitLabMergeRequest', () => { await instance.handler(ctx); expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( - undefined, + 'owner/repo', 'new-mr', 'main', 'Create my new MR', @@ -200,6 +188,7 @@ describe('createGitLabMergeRequest', () => { description: 'other MR description', removeSourceBranch: false, draft: true, + targetPath: 'Subdirectory', }; mockFs({ [workspacePath]: { @@ -219,7 +208,7 @@ describe('createGitLabMergeRequest', () => { await instance.handler(ctx); expect(mockGitlabClient.MergeRequests.create).toHaveBeenCalledWith( - undefined, + 'owner/repo', 'new-mr', 'main', 'Create my new MR', @@ -230,165 +219,4 @@ describe('createGitLabMergeRequest', () => { ); }); }); - - describe('createGitLabMergeRequestWithoutGitlabAction', () => { - it('gitlabAction is create by default when not passed in options', async () => { - const input = { - repoUrl: 'gitlab.com?repo=repo&owner=owner', - title: 'Create my new MR', - branchName: 'new-mr', - description: 'This MR is really good', - draft: true, - }; - mockFs({ - [workspacePath]: { - source: { 'foo.txt': 'Hello there!' }, - irrelevant: { 'bar.txt': 'Nothing to see here' }, - }, - }); - const ctx = { - createTemporaryDirectory: jest.fn(), - output: jest.fn(), - logger: getRootLogger(), - logStream: new Writable(), - input, - workspacePath, - }; - await instance.handler(ctx); - - expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( - undefined, - 'new-mr', - 'Create my new MR', - [ - { - action: 'create', - filePath: 'foo/bar5', - content: 'some content', - }, - ], - ); - }); - }); - - describe('createGitLabMergeRequestWithGitlabAction', () => { - it('gitlabAction is create when create is passed in options', async () => { - const input = { - repoUrl: 'gitlab.com?repo=repo&owner=owner', - title: 'Create my new MR', - branchName: 'new-mr', - description: 'MR description', - gitlabAction: 'create', - draft: true, - }; - mockFs({ - [workspacePath]: { - source: { 'foo.txt': 'Hello there!' }, - irrelevant: { 'bar.txt': 'Nothing to see here' }, - }, - }); - - const ctx = { - createTemporaryDirectory: jest.fn(), - output: jest.fn(), - logger: getRootLogger(), - logStream: new Writable(), - input, - workspacePath, - }; - await instance.handler(ctx); - - expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( - undefined, - 'new-mr', - 'Create my new MR', - [ - { - action: 'create', - filePath: 'foo/bar5', - content: 'some content', - }, - ], - ); - }); - - it('gitlabAction is update when update is passed in options', async () => { - const input = { - repoUrl: 'gitlab.com?repo=repo&owner=owner', - title: 'Create my new MR', - branchName: 'new-mr', - description: 'MR description', - gitlabAction: 'update', - draft: true, - }; - mockFs({ - [workspacePath]: { - source: { 'foo.txt': 'Hello there!' }, - irrelevant: { 'bar.txt': 'Nothing to see here' }, - }, - }); - - const ctx = { - createTemporaryDirectory: jest.fn(), - output: jest.fn(), - logger: getRootLogger(), - logStream: new Writable(), - input, - workspacePath, - }; - await instance.handler(ctx); - - expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( - undefined, - 'new-mr', - 'Create my new MR', - [ - { - action: 'update', - filePath: 'foo/bar5', - content: 'some content', - }, - ], - ); - }); - - it('gitlabAction is delete when delete is passed in options', async () => { - const input = { - repoUrl: 'gitlab.com?repo=repo&owner=owner', - title: 'Create my new MR', - branchName: 'new-mr', - description: 'other MR description', - gitlabAction: 'delete', - draft: true, - }; - mockFs({ - [workspacePath]: { - source: { 'foo.txt': 'Hello there!' }, - irrelevant: { 'bar.txt': 'Nothing to see here' }, - }, - }); - - const ctx = { - createTemporaryDirectory: jest.fn(), - output: jest.fn(), - logger: getRootLogger(), - logStream: new Writable(), - input, - workspacePath, - }; - await instance.handler(ctx); - - expect(mockGitlabClient.Commits.create).toHaveBeenCalledWith( - undefined, - 'new-mr', - 'Create my new MR', - [ - { - action: 'delete', - filePath: 'foo/bar5', - }, - ], - ); - }); - }); }); From be26d95141bd883874f9f4f787da50bcb385251e Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Mon, 20 Jun 2022 12:19:11 -0500 Subject: [PATCH 054/212] Added EntityAdvancedPicker Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/wicked-ladybugs-argue.md | 43 +++++ plugins/catalog-react/api-report.md | 27 ++++ .../EntityAdvancedPicker.test.tsx | 152 ++++++++++++++++++ .../EntityAdvancedPicker.tsx | 109 +++++++++++++ .../components/EntityAdvancedPicker/index.ts | 17 ++ plugins/catalog-react/src/components/index.ts | 1 + plugins/catalog-react/src/filters.test.ts | 55 ++++++- plugins/catalog-react/src/filters.ts | 31 +++- .../src/hooks/useEntityListProvider.tsx | 4 + .../src/overridableComponents.ts | 2 + .../CatalogPage/DefaultCatalogPage.tsx | 2 + 11 files changed, 440 insertions(+), 3 deletions(-) create mode 100644 .changeset/wicked-ladybugs-argue.md create mode 100644 plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx create mode 100644 plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx create mode 100644 plugins/catalog-react/src/components/EntityAdvancedPicker/index.ts diff --git a/.changeset/wicked-ladybugs-argue.md b/.changeset/wicked-ladybugs-argue.md new file mode 100644 index 0000000000..d75f250689 --- /dev/null +++ b/.changeset/wicked-ladybugs-argue.md @@ -0,0 +1,43 @@ +--- +'@backstage/plugin-catalog': patch +'@backstage/plugin-catalog-react': patch +--- + +Added new `EntityAdvancedPicker` that will filter for entities with orphans and/or errors. + +If you are using the default Catalog page this picker will be added automatically. For those who have customized their Catalog page you'll need to add this manually by doing something like this: + +```diff +... +import { + CatalogFilterLayout, + EntityTypePicker, + UserListPicker, + EntityTagPicker ++ EntityAdvancedPicker, +} from '@backstage/plugin-catalog-react'; +... +export const CustomCatalogPage = ({ + columns, + actions, + initiallySelectedFilter = 'owned', +}: CatalogPageProps) => { + return ( + ... + + + + + + ... +}; +``` diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 285ecafd70..7f3d7a5f3c 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -78,8 +78,12 @@ export type CatalogReactComponentsNameToClassKey = { CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey; CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey; CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey; + CatalogReactEntityAdvancedPicker: CatalogReactEntityAdvancedPickerClassKey; }; +// @public (undocumented) +export type CatalogReactEntityAdvancedPickerClassKey = 'input'; + // @public (undocumented) export type CatalogReactEntityLifecyclePickerClassKey = 'input'; @@ -137,8 +141,22 @@ export type DefaultEntityFilters = { lifecycles?: EntityLifecycleFilter; tags?: EntityTagFilter; text?: EntityTextFilter; + orphan?: EntityOrphanFilter; + error?: EntityErrorFilter; }; +// @public (undocumented) +export const EntityAdvancedPicker: () => JSX.Element; + +// @public +export class EntityErrorFilter implements EntityFilter { + constructor(values: string[]); + // (undocumented) + filterEntity(entity: Entity): boolean; + // (undocumented) + readonly values: string[]; +} + // @public (undocumented) export type EntityFilter = { getCatalogFilters?: () => Record< @@ -222,6 +240,15 @@ export type EntityLoadingStatus = { refresh?: VoidFunction; }; +// @public +export class EntityOrphanFilter implements EntityFilter { + constructor(values: string[]); + // (undocumented) + filterEntity(entity: Entity): boolean; + // (undocumented) + readonly values: string[]; +} + // @public export class EntityOwnerFilter implements EntityFilter { constructor(values: string[]); diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx new file mode 100644 index 0000000000..8964038d42 --- /dev/null +++ b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx @@ -0,0 +1,152 @@ +/* + * 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 { Entity } from '@backstage/catalog-model'; +import { fireEvent, render } from '@testing-library/react'; +import React from 'react'; +import { EntityErrorFilter, EntityOrphanFilter } from '../../filters'; +import { MockEntityListContextProvider } from '../../testUtils/providers'; +import { EntityAdvancedPicker } from './EntityAdvancedPicker'; + +const orphanAnnotation: Record = {}; +orphanAnnotation['backstage.io/orphan'] = 'true'; + +const sampleEntities: Entity[] = [ + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'valid-component', + }, + }, + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'orphan-component', + annotations: orphanAnnotation, + }, + }, + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'error-component', + tags: ['Invalid Tag'], + }, + }, +]; + +describe('', () => { + it('renders all advanced options', () => { + const rendered = render( + + + , + ); + expect(rendered.getByText('Advanced')).toBeInTheDocument(); + + fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + expect(rendered.getByText('Is Orphan')).toBeInTheDocument(); + expect(rendered.getByText('Has Error')).toBeInTheDocument(); + }); + + it('adds orphan to orphan filter', () => { + const updateFilters = jest.fn(); + const rendered = render( + + + , + ); + + fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByText('Is Orphan')); + expect(updateFilters).toHaveBeenCalledWith({ + orphan: new EntityOrphanFilter(['true']), + }); + }); + + it('adds error to error filter', () => { + const updateFilters = jest.fn(); + const rendered = render( + + + , + ); + + fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByText('Has Error')); + expect(updateFilters).toHaveBeenCalledWith({ + error: new EntityErrorFilter(['true']), + }); + }); + + it('remove orphan from orphan filter', () => { + const updateFilters = jest.fn(); + const rendered = render( + + + , + ); + + fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByText('Is Orphan')); + expect(updateFilters).toHaveBeenCalledWith({ + orphan: undefined, + }); + }); + + it('remove error from error filter', () => { + const updateFilters = jest.fn(); + const rendered = render( + + + , + ); + + fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByText('Has Error')); + expect(updateFilters).toHaveBeenCalledWith({ + error: undefined, + }); + }); +}); diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx new file mode 100644 index 0000000000..9a813540f1 --- /dev/null +++ b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx @@ -0,0 +1,109 @@ +/* + * 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 { EntityErrorFilter, EntityOrphanFilter } from '../../filters'; +import { + Box, + Checkbox, + FormControlLabel, + makeStyles, + TextField, + Typography, +} from '@material-ui/core'; +import CheckBoxIcon from '@material-ui/icons/CheckBox'; +import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; +import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import React, { useState } from 'react'; +import { useEntityList } from '../../hooks'; +import { Autocomplete } from '@material-ui/lab'; + +/** @public */ +export type CatalogReactEntityAdvancedPickerClassKey = 'input'; + +const useStyles = makeStyles( + { + input: {}, + }, + { + name: 'CatalogReactEntityAdvancedPicker', + }, +); + +const icon = ; +const checkedIcon = ; + +/** @public */ +export const EntityAdvancedPicker = () => { + const classes = useStyles(); + const { updateFilters } = useEntityList(); + + const [selectedAdvancedItems, setSelectedAdvancedItems] = useState( + [], + ); + + function orphanChange(value: string) { + updateFilters({ + orphan: value === 'true' ? new EntityOrphanFilter([value]) : undefined, + }); + } + + function errorChange(value: string) { + updateFilters({ + error: value === 'true' ? new EntityErrorFilter([value]) : undefined, + }); + } + + const availableAdvancedItems = ['Is Orphan', 'Has Error']; + + return ( + + + Advanced + { + setSelectedAdvancedItems(value); + orphanChange(value.includes('Is Orphan') ? 'true' : 'false'); + errorChange(value.includes('Has Error') ? 'true' : 'false'); + }} + renderOption={(option, { selected }) => ( + + } + label={option} + /> + )} + size="small" + popupIcon={} + renderInput={params => ( + + )} + /> + + + ); +}; diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/index.ts b/plugins/catalog-react/src/components/EntityAdvancedPicker/index.ts new file mode 100644 index 0000000000..160793f7f6 --- /dev/null +++ b/plugins/catalog-react/src/components/EntityAdvancedPicker/index.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ +export { EntityAdvancedPicker } from './EntityAdvancedPicker'; +export type { CatalogReactEntityAdvancedPickerClassKey } from './EntityAdvancedPicker'; diff --git a/plugins/catalog-react/src/components/index.ts b/plugins/catalog-react/src/components/index.ts index 7a26a72bf9..c495722243 100644 --- a/plugins/catalog-react/src/components/index.ts +++ b/plugins/catalog-react/src/components/index.ts @@ -27,3 +27,4 @@ export * from './FavoriteEntity'; export * from './InspectEntityDialog'; export * from './UnregisterEntityDialog'; export * from './UserListPicker'; +export * from './EntityAdvancedPicker'; diff --git a/plugins/catalog-react/src/filters.test.ts b/plugins/catalog-react/src/filters.test.ts index ba31e21122..430bfb1360 100644 --- a/plugins/catalog-react/src/filters.test.ts +++ b/plugins/catalog-react/src/filters.test.ts @@ -14,9 +14,13 @@ * limitations under the License. */ -import { Entity } from '@backstage/catalog-model'; +import { AlphaEntity, Entity } from '@backstage/catalog-model'; import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; -import { EntityTextFilter } from './filters'; +import { + EntityErrorFilter, + EntityOrphanFilter, + EntityTextFilter, +} from './filters'; const entities: Entity[] = [ { @@ -91,3 +95,50 @@ describe('EntityTextFilter', () => { expect(filter.filterEntity(entities[1])).toBeTruthy(); }); }); + +describe('EntityOrphanFilter', () => { + const orphanAnnotation: Record = {}; + orphanAnnotation['backstage.io/orphan'] = 'true'; + + const orphan: Entity = { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'orphaned-service', + annotations: orphanAnnotation, + }, + }; + + it('should find orphans', () => { + const filter = new EntityOrphanFilter(['true']); + expect(filter.filterEntity(orphan)).toBeTruthy(); + expect(filter.filterEntity(entities[1])).toBeFalsy(); + }); +}); + +describe('EntityErrorFilter', () => { + const error: AlphaEntity = { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'service-with-error', + tags: ['Invalid Tag'], + }, + status: { + items: [ + { + type: 'invalid-tag', + level: 'error', + message: 'Tag is not valid', + error: undefined, + }, + ], + }, + }; + + it('should find errors', () => { + const filter = new EntityErrorFilter(['true']); + expect(filter.filterEntity(error)).toBeTruthy(); + expect(filter.filterEntity(entities[1])).toBeFalsy(); + }); +}); diff --git a/plugins/catalog-react/src/filters.ts b/plugins/catalog-react/src/filters.ts index 9fb057a01c..efd23552e9 100644 --- a/plugins/catalog-react/src/filters.ts +++ b/plugins/catalog-react/src/filters.ts @@ -14,7 +14,11 @@ * limitations under the License. */ -import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model'; +import { + AlphaEntity, + Entity, + RELATION_OWNED_BY, +} from '@backstage/catalog-model'; import { humanizeEntityRef } from './components/EntityRefLink'; import { EntityFilter, UserListFilterKind } from './types'; import { getEntityRelations } from './utils'; @@ -159,3 +163,28 @@ export class UserListFilter implements EntityFilter { return this.value; } } + +/** + * Filters entities based if it is an orphan or not. + * @public + */ +export class EntityOrphanFilter implements EntityFilter { + constructor(readonly values: string[]) {} + filterEntity(entity: Entity): boolean { + const orphan = entity.metadata.annotations?.['backstage.io/orphan']; + return orphan !== undefined && this.values.includes(orphan); + } +} + +/** + * Filters entities based on if it has errors or not. + * @public + */ +export class EntityErrorFilter implements EntityFilter { + constructor(readonly values: string[]) {} + filterEntity(entity: Entity): boolean { + const error = + ((entity as AlphaEntity)?.status?.items?.length as number) > 0; + return error !== undefined && this.values.includes(error.toString()); + } +} diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx index ccac475ae8..089701d8b4 100644 --- a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx +++ b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx @@ -31,8 +31,10 @@ import useDebounce from 'react-use/lib/useDebounce'; import useMountedState from 'react-use/lib/useMountedState'; import { catalogApiRef } from '../api'; import { + EntityErrorFilter, EntityKindFilter, EntityLifecycleFilter, + EntityOrphanFilter, EntityOwnerFilter, EntityTagFilter, EntityTextFilter, @@ -52,6 +54,8 @@ export type DefaultEntityFilters = { lifecycles?: EntityLifecycleFilter; tags?: EntityTagFilter; text?: EntityTextFilter; + orphan?: EntityOrphanFilter; + error?: EntityErrorFilter; }; /** @public */ diff --git a/plugins/catalog-react/src/overridableComponents.ts b/plugins/catalog-react/src/overridableComponents.ts index 1e654988e4..b06d832481 100644 --- a/plugins/catalog-react/src/overridableComponents.ts +++ b/plugins/catalog-react/src/overridableComponents.ts @@ -22,6 +22,7 @@ import { CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactEntityOwnerPickerClassKey, + CatalogReactEntityAdvancedPickerClassKey, } from './components'; /** @public */ @@ -31,6 +32,7 @@ export type CatalogReactComponentsNameToClassKey = { CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey; CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey; CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey; + CatalogReactEntityAdvancedPicker: CatalogReactEntityAdvancedPickerClassKey; }; /** @public */ diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index 5250dcec0d..0e84fc00de 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -28,6 +28,7 @@ import { CatalogFilterLayout, EntityLifecyclePicker, EntityListProvider, + EntityAdvancedPicker, EntityOwnerPicker, EntityTagPicker, EntityTypePicker, @@ -84,6 +85,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) { + Date: Tue, 21 Jun 2022 16:35:04 -0500 Subject: [PATCH 055/212] Refactored based on PR feedback Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- plugins/catalog-react/api-report.md | 8 ++++---- .../EntityAdvancedPicker.test.tsx | 4 ++-- .../EntityAdvancedPicker/EntityAdvancedPicker.tsx | 12 ++++++------ plugins/catalog-react/src/filters.test.ts | 4 ++-- plugins/catalog-react/src/filters.ts | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 7f3d7a5f3c..61c1eb4592 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -150,11 +150,11 @@ export const EntityAdvancedPicker: () => JSX.Element; // @public export class EntityErrorFilter implements EntityFilter { - constructor(values: string[]); + constructor(value: boolean); // (undocumented) filterEntity(entity: Entity): boolean; // (undocumented) - readonly values: string[]; + readonly value: boolean; } // @public (undocumented) @@ -242,11 +242,11 @@ export type EntityLoadingStatus = { // @public export class EntityOrphanFilter implements EntityFilter { - constructor(values: string[]); + constructor(value: boolean); // (undocumented) filterEntity(entity: Entity): boolean; // (undocumented) - readonly values: string[]; + readonly value: boolean; } // @public diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx index 8964038d42..c139c66505 100644 --- a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx @@ -83,7 +83,7 @@ describe('', () => { fireEvent.click(rendered.getByTestId('advanced-picker-expand')); fireEvent.click(rendered.getByText('Is Orphan')); expect(updateFilters).toHaveBeenCalledWith({ - orphan: new EntityOrphanFilter(['true']), + orphan: new EntityOrphanFilter(true), }); }); @@ -104,7 +104,7 @@ describe('', () => { fireEvent.click(rendered.getByTestId('advanced-picker-expand')); fireEvent.click(rendered.getByText('Has Error')); expect(updateFilters).toHaveBeenCalledWith({ - error: new EntityErrorFilter(['true']), + error: new EntityErrorFilter(true), }); }); diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx index 9a813540f1..e3be9be3c5 100644 --- a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx +++ b/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx @@ -54,15 +54,15 @@ export const EntityAdvancedPicker = () => { [], ); - function orphanChange(value: string) { + function orphanChange(value: boolean) { updateFilters({ - orphan: value === 'true' ? new EntityOrphanFilter([value]) : undefined, + orphan: value ? new EntityOrphanFilter(value) : undefined, }); } - function errorChange(value: string) { + function errorChange(value: boolean) { updateFilters({ - error: value === 'true' ? new EntityErrorFilter([value]) : undefined, + error: value ? new EntityErrorFilter(value) : undefined, }); } @@ -78,8 +78,8 @@ export const EntityAdvancedPicker = () => { value={selectedAdvancedItems} onChange={(_: object, value: string[]) => { setSelectedAdvancedItems(value); - orphanChange(value.includes('Is Orphan') ? 'true' : 'false'); - errorChange(value.includes('Has Error') ? 'true' : 'false'); + orphanChange(value.includes('Is Orphan')); + errorChange(value.includes('Has Error')); }} renderOption={(option, { selected }) => ( { }; it('should find orphans', () => { - const filter = new EntityOrphanFilter(['true']); + const filter = new EntityOrphanFilter(true); expect(filter.filterEntity(orphan)).toBeTruthy(); expect(filter.filterEntity(entities[1])).toBeFalsy(); }); @@ -137,7 +137,7 @@ describe('EntityErrorFilter', () => { }; it('should find errors', () => { - const filter = new EntityErrorFilter(['true']); + const filter = new EntityErrorFilter(true); expect(filter.filterEntity(error)).toBeTruthy(); expect(filter.filterEntity(entities[1])).toBeFalsy(); }); diff --git a/plugins/catalog-react/src/filters.ts b/plugins/catalog-react/src/filters.ts index efd23552e9..a828015f0e 100644 --- a/plugins/catalog-react/src/filters.ts +++ b/plugins/catalog-react/src/filters.ts @@ -169,10 +169,10 @@ export class UserListFilter implements EntityFilter { * @public */ export class EntityOrphanFilter implements EntityFilter { - constructor(readonly values: string[]) {} + constructor(readonly value: boolean) {} filterEntity(entity: Entity): boolean { const orphan = entity.metadata.annotations?.['backstage.io/orphan']; - return orphan !== undefined && this.values.includes(orphan); + return orphan !== undefined && this.value.toString() === orphan; } } @@ -181,10 +181,10 @@ export class EntityOrphanFilter implements EntityFilter { * @public */ export class EntityErrorFilter implements EntityFilter { - constructor(readonly values: string[]) {} + constructor(readonly value: boolean) {} filterEntity(entity: Entity): boolean { const error = ((entity as AlphaEntity)?.status?.items?.length as number) > 0; - return error !== undefined && this.values.includes(error.toString()); + return error !== undefined && this.value === error; } } From 5395ab9ebb3a3b32e10da138b2792a0163b20a23 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Fri, 24 Jun 2022 08:05:15 -0500 Subject: [PATCH 056/212] Renamed picker Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/wicked-ladybugs-argue.md | 6 ++-- plugins/catalog-react/api-report.md | 14 +++++----- .../EntityProcessingStatusPicker.test.tsx} | 28 +++++++++---------- .../EntityProcessingStatusPicker.tsx} | 12 ++++---- .../index.ts | 4 +-- plugins/catalog-react/src/components/index.ts | 2 +- .../src/overridableComponents.ts | 4 +-- .../CatalogPage/DefaultCatalogPage.tsx | 4 +-- 8 files changed, 38 insertions(+), 36 deletions(-) rename plugins/catalog-react/src/components/{EntityAdvancedPicker/EntityAdvancedPicker.test.tsx => EntityProcessingStatusPicker/EntityProcessingStatusPicker.test.tsx} (81%) rename plugins/catalog-react/src/components/{EntityAdvancedPicker/EntityAdvancedPicker.tsx => EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx} (89%) rename plugins/catalog-react/src/components/{EntityAdvancedPicker => EntityProcessingStatusPicker}/index.ts (73%) diff --git a/.changeset/wicked-ladybugs-argue.md b/.changeset/wicked-ladybugs-argue.md index d75f250689..9a36cf17cb 100644 --- a/.changeset/wicked-ladybugs-argue.md +++ b/.changeset/wicked-ladybugs-argue.md @@ -3,7 +3,7 @@ '@backstage/plugin-catalog-react': patch --- -Added new `EntityAdvancedPicker` that will filter for entities with orphans and/or errors. +Added new `EntityProcessingStatusPicker` that will filter for entities with orphans and/or errors. If you are using the default Catalog page this picker will be added automatically. For those who have customized their Catalog page you'll need to add this manually by doing something like this: @@ -14,7 +14,7 @@ import { EntityTypePicker, UserListPicker, EntityTagPicker -+ EntityAdvancedPicker, ++ EntityProcessingStatusPicker, } from '@backstage/plugin-catalog-react'; ... export const CustomCatalogPage = ({ @@ -31,7 +31,7 @@ export const CustomCatalogPage = ({ -+ ++ diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 61c1eb4592..5232c49150 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -78,18 +78,18 @@ export type CatalogReactComponentsNameToClassKey = { CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey; CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey; CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey; - CatalogReactEntityAdvancedPicker: CatalogReactEntityAdvancedPickerClassKey; + CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey; }; -// @public (undocumented) -export type CatalogReactEntityAdvancedPickerClassKey = 'input'; - // @public (undocumented) export type CatalogReactEntityLifecyclePickerClassKey = 'input'; // @public (undocumented) export type CatalogReactEntityOwnerPickerClassKey = 'input'; +// @public (undocumented) +export type CatalogReactEntityProcessingStatusPickerClassKey = 'input'; + // @public (undocumented) export type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input'; @@ -145,9 +145,6 @@ export type DefaultEntityFilters = { error?: EntityErrorFilter; }; -// @public (undocumented) -export const EntityAdvancedPicker: () => JSX.Element; - // @public export class EntityErrorFilter implements EntityFilter { constructor(value: boolean); @@ -263,6 +260,9 @@ export class EntityOwnerFilter implements EntityFilter { // @public (undocumented) export const EntityOwnerPicker: () => JSX.Element | null; +// @public (undocumented) +export const EntityProcessingStatusPicker: () => JSX.Element; + // @public export const EntityProvider: (props: EntityProviderProps) => JSX.Element; diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.test.tsx similarity index 81% rename from plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx rename to plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.test.tsx index c139c66505..8e90e04148 100644 --- a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.test.tsx @@ -19,7 +19,7 @@ import { fireEvent, render } from '@testing-library/react'; import React from 'react'; import { EntityErrorFilter, EntityOrphanFilter } from '../../filters'; import { MockEntityListContextProvider } from '../../testUtils/providers'; -import { EntityAdvancedPicker } from './EntityAdvancedPicker'; +import { EntityProcessingStatusPicker } from './EntityProcessingStatusPicker'; const orphanAnnotation: Record = {}; orphanAnnotation['backstage.io/orphan'] = 'true'; @@ -50,18 +50,18 @@ const sampleEntities: Entity[] = [ }, ]; -describe('', () => { - it('renders all advanced options', () => { +describe('', () => { + it('renders all processing status options', () => { const rendered = render( - + , ); - expect(rendered.getByText('Advanced')).toBeInTheDocument(); + expect(rendered.getByText('Processing Status')).toBeInTheDocument(); - fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByTestId('processing-status-picker-expand')); expect(rendered.getByText('Is Orphan')).toBeInTheDocument(); expect(rendered.getByText('Has Error')).toBeInTheDocument(); }); @@ -76,11 +76,11 @@ describe('', () => { updateFilters, }} > - + , ); - fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByTestId('processing-status-picker-expand')); fireEvent.click(rendered.getByText('Is Orphan')); expect(updateFilters).toHaveBeenCalledWith({ orphan: new EntityOrphanFilter(true), @@ -97,11 +97,11 @@ describe('', () => { updateFilters, }} > - + , ); - fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByTestId('processing-status-picker-expand')); fireEvent.click(rendered.getByText('Has Error')); expect(updateFilters).toHaveBeenCalledWith({ error: new EntityErrorFilter(true), @@ -118,11 +118,11 @@ describe('', () => { updateFilters, }} > - + , ); - fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByTestId('processing-status-picker-expand')); fireEvent.click(rendered.getByText('Is Orphan')); expect(updateFilters).toHaveBeenCalledWith({ orphan: undefined, @@ -139,11 +139,11 @@ describe('', () => { updateFilters, }} > - + , ); - fireEvent.click(rendered.getByTestId('advanced-picker-expand')); + fireEvent.click(rendered.getByTestId('processing-status-picker-expand')); fireEvent.click(rendered.getByText('Has Error')); expect(updateFilters).toHaveBeenCalledWith({ error: undefined, diff --git a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx similarity index 89% rename from plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx rename to plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx index e3be9be3c5..3fe3b60e25 100644 --- a/plugins/catalog-react/src/components/EntityAdvancedPicker/EntityAdvancedPicker.tsx +++ b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx @@ -31,14 +31,14 @@ import { useEntityList } from '../../hooks'; import { Autocomplete } from '@material-ui/lab'; /** @public */ -export type CatalogReactEntityAdvancedPickerClassKey = 'input'; +export type CatalogReactEntityProcessingStatusPickerClassKey = 'input'; const useStyles = makeStyles( { input: {}, }, { - name: 'CatalogReactEntityAdvancedPicker', + name: 'CatalogReactEntityProcessingStatusPickerPicker', }, ); @@ -46,7 +46,7 @@ const icon = ; const checkedIcon = ; /** @public */ -export const EntityAdvancedPicker = () => { +export const EntityProcessingStatusPicker = () => { const classes = useStyles(); const { updateFilters } = useEntityList(); @@ -71,7 +71,7 @@ export const EntityAdvancedPicker = () => { return ( - Advanced + Processing Status { /> )} size="small" - popupIcon={} + popupIcon={ + + } renderInput={params => ( - + Date: Fri, 24 Jun 2022 08:56:30 -0500 Subject: [PATCH 057/212] chore: added types to Promise.any polyfill Signed-off-by: planeiii --- plugins/jenkins-backend/src/service/jenkinsApi.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts index 8de2609037..eaeff9096c 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -38,13 +38,18 @@ const anyPromise = (any => { } // reverse promise resolution (rejects become resolves and visa versa) - const reverse = (promise: Promise) => - new Promise((resolve, reject) => + const reverse = (promise: Promise): Promise => + new Promise((resolve, reject) => Promise.resolve(promise).then(reject, resolve), ); - return (iterable: Promise[]) => - reverse(Promise.all([...iterable].map(reverse))); + return ( + iterable: Iterable>, + ): Promise => + Promise.all([...iterable].map(reverse)).then( + results => reverse(Promise.resolve(results[0])), + reverse, + ); })(Promise.any); export class JenkinsApiImpl { From 888731df92e6264a8f3325b8a4550bd2f76c7d7a Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 12:40:43 -0700 Subject: [PATCH 058/212] customize unregister entity menuitem Signed-off-by: sjeyaraman --- .../app/src/components/catalog/EntityPage.tsx | 15 ++++++- .../EntityContextMenu.test.tsx | 25 ++++++++++- .../EntityContextMenu/EntityContextMenu.tsx | 43 +++++++++++++------ .../components/EntityLayout/EntityLayout.tsx | 4 +- 4 files changed, 70 insertions(+), 17 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 1958aabd2e..4318e68e74 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -165,9 +165,22 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { ]; }, []); + type VisibleType = 'visible' | 'hidden' | 'disabled'; + + type contextMenuOptions = { + disableUnregister: boolean | VisibleType; + }; + + const options: contextMenuOptions = { + disableUnregister: false, + }; + return ( <> - + {props.children} { it('should call onUnregisterEntity on button click', async () => { const mockCallback = jest.fn(); - await render( { expect(mockCallback).toBeCalled(); }); + it('check Unregister entity button is disabled', async () => { + const mockCallback = jest.fn(); + + const { getByText } = await render( + {}} + />, + ); + + const button = await screen.findByTestId('menu-button'); + expect(button).toBeInTheDocument(); + fireEvent.click(button); + + const unregister = await screen.getByText('Unregister entity'); + expect(unregister).toBeInTheDocument(); + + const unregisterSpanItem = getByText(/Unregister entity/); + const unregisterMenuListItem = + unregisterSpanItem?.parentElement?.parentElement; + expect(unregisterMenuListItem).toHaveAttribute('aria-disabled'); + }); + it('should call onInspectEntity on button click', async () => { const mockCallback = jest.fn(); diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index db50eeab84..0a5e2e1bfe 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -55,9 +55,11 @@ interface ExtraContextMenuItem { onClick: () => void; } +type VisibleType = 'visible' | 'hidden' | 'disabled'; + // unstable context menu option, eg: disable the unregister entity menu interface contextMenuOptions { - disableUnregister: boolean; + disableUnregister: boolean | VisibleType; } interface EntityContextMenuProps { @@ -106,11 +108,35 @@ export function EntityContextMenu(props: EntityContextMenuProps) { , ]; + const isBoolean = + typeof UNSTABLE_contextMenuOptions?.disableUnregister === 'boolean'; + const disableUnregister = (!unregisterPermission.allowed || - UNSTABLE_contextMenuOptions?.disableUnregister) ?? + (isBoolean + ? UNSTABLE_contextMenuOptions?.disableUnregister + : UNSTABLE_contextMenuOptions?.disableUnregister === 'disabled')) ?? false; + let unregisterButton = <>; + + if (UNSTABLE_contextMenuOptions?.disableUnregister !== 'hidden') { + unregisterButton = ( + { + onClose(); + onUnregisterEntity(); + }} + disabled={disableUnregister} + > + + + + + + ); + } + return ( <> {extraItems} - { - onClose(); - onUnregisterEntity(); - }} - disabled={disableUnregister} - > - - - - - + {unregisterButton} { onClose(); diff --git a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx index 693137fe21..4cbb72db5c 100644 --- a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx +++ b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx @@ -142,9 +142,11 @@ interface ExtraContextMenuItem { onClick: () => void; } +type VisibleType = 'visible' | 'hidden' | 'disabled'; + // unstable context menu option, eg: disable the unregister entity menu interface contextMenuOptions { - disableUnregister: boolean; + disableUnregister: boolean | VisibleType; } /** @public */ From 06905f4ed0499034c24e276e156520043c53348b Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 17:10:23 -0700 Subject: [PATCH 059/212] add-change-set Signed-off-by: sjeyaraman --- .changeset/cold-apples-film.md | 9 +++++++++ packages/app/src/components/catalog/EntityPage.tsx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-apples-film.md diff --git a/.changeset/cold-apples-film.md b/.changeset/cold-apples-film.md new file mode 100644 index 0000000000..d8c7ec283d --- /dev/null +++ b/.changeset/cold-apples-film.md @@ -0,0 +1,9 @@ +--- +'example-app': patch +'@backstage/plugin-catalog': patch +--- + +Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'. +With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. + +The boolean input for "unregister entity" will be deprecated later in favour of the above three options. diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 4318e68e74..24ca1b900b 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -172,7 +172,7 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { }; const options: contextMenuOptions = { - disableUnregister: false, + disableUnregister: 'visible', }; return ( From 258057a4b91ccfb3077790df48d5eba40f735b30 Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Fri, 24 Jun 2022 14:45:13 -0700 Subject: [PATCH 060/212] refactor-unregister-entity Signed-off-by: sjeyaraman --- ...cold-apples-film.md => thick-cats-kiss.md} | 4 +- .../app/src/components/catalog/EntityPage.tsx | 9 +-- .../EntityContextMenu.test.tsx | 24 ------ .../EntityContextMenu/EntityContextMenu.tsx | 49 +++--------- .../UnregisterEntity.test.tsx | 80 +++++++++++++++++++ .../EntityContextMenu/UnregisterEntity.tsx | 72 +++++++++++++++++ .../components/EntityLayout/EntityLayout.tsx | 6 +- .../src/components/EntityLayout/index.ts | 6 +- 8 files changed, 173 insertions(+), 77 deletions(-) rename .changeset/{cold-apples-film.md => thick-cats-kiss.md} (62%) create mode 100644 plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.test.tsx create mode 100644 plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.tsx diff --git a/.changeset/cold-apples-film.md b/.changeset/thick-cats-kiss.md similarity index 62% rename from .changeset/cold-apples-film.md rename to .changeset/thick-cats-kiss.md index d8c7ec283d..8817115ec3 100644 --- a/.changeset/cold-apples-film.md +++ b/.changeset/thick-cats-kiss.md @@ -1,9 +1,7 @@ --- -'example-app': patch '@backstage/plugin-catalog': patch --- -Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'. -With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. +Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'.With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. The boolean input for "unregister entity" will be deprecated later in favour of the above three options. diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 24ca1b900b..c2ae001060 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -43,6 +43,7 @@ import { } from '@backstage/plugin-azure-devops'; import { EntityBadgesDialog } from '@backstage/plugin-badges'; import { + EntityContextMenuOptions, EntityAboutCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, @@ -165,13 +166,7 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { ]; }, []); - type VisibleType = 'visible' | 'hidden' | 'disabled'; - - type contextMenuOptions = { - disableUnregister: boolean | VisibleType; - }; - - const options: contextMenuOptions = { + const options: EntityContextMenuOptions = { disableUnregister: 'visible', }; diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx index 9906cd9c12..5d995828e6 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx @@ -60,30 +60,6 @@ describe('ComponentContextMenu', () => { expect(mockCallback).toBeCalled(); }); - it('check Unregister entity button is disabled', async () => { - const mockCallback = jest.fn(); - - const { getByText } = await render( - {}} - />, - ); - - const button = await screen.findByTestId('menu-button'); - expect(button).toBeInTheDocument(); - fireEvent.click(button); - - const unregister = await screen.getByText('Unregister entity'); - expect(unregister).toBeInTheDocument(); - - const unregisterSpanItem = getByText(/Unregister entity/); - const unregisterMenuListItem = - unregisterSpanItem?.parentElement?.parentElement; - expect(unregisterMenuListItem).toHaveAttribute('aria-disabled'); - }); - it('should call onInspectEntity on button click', async () => { const mockCallback = jest.fn(); diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index 0a5e2e1bfe..94df8dac29 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -24,7 +24,6 @@ import { Popover, } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; -import CancelIcon from '@material-ui/icons/Cancel'; import BugReportIcon from '@material-ui/icons/BugReport'; import MoreVert from '@material-ui/icons/MoreVert'; import React, { useState } from 'react'; @@ -32,6 +31,8 @@ import { IconComponent } from '@backstage/core-plugin-api'; import { useEntityPermission } from '@backstage/plugin-catalog-react'; import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common'; import { BackstageTheme } from '@backstage/theme'; +import { UnregisterEntity, UnregisterEntityOptions } from './UnregisterEntity'; + /** @public */ export type EntityContextMenuClassKey = 'button'; @@ -55,16 +56,9 @@ interface ExtraContextMenuItem { onClick: () => void; } -type VisibleType = 'visible' | 'hidden' | 'disabled'; - -// unstable context menu option, eg: disable the unregister entity menu -interface contextMenuOptions { - disableUnregister: boolean | VisibleType; -} - interface EntityContextMenuProps { UNSTABLE_extraContextMenuItems?: ExtraContextMenuItem[]; - UNSTABLE_contextMenuOptions?: contextMenuOptions; + UNSTABLE_contextMenuOptions?: UnregisterEntityOptions; onUnregisterEntity: () => void; onInspectEntity: () => void; } @@ -81,6 +75,7 @@ export function EntityContextMenu(props: EntityContextMenuProps) { const unregisterPermission = useEntityPermission( catalogEntityDeletePermission, ); + const isAllowed = unregisterPermission.allowed; const onOpen = (event: React.SyntheticEvent) => { setAnchorEl(event.currentTarget); @@ -108,35 +103,6 @@ export function EntityContextMenu(props: EntityContextMenuProps) { , ]; - const isBoolean = - typeof UNSTABLE_contextMenuOptions?.disableUnregister === 'boolean'; - - const disableUnregister = - (!unregisterPermission.allowed || - (isBoolean - ? UNSTABLE_contextMenuOptions?.disableUnregister - : UNSTABLE_contextMenuOptions?.disableUnregister === 'disabled')) ?? - false; - - let unregisterButton = <>; - - if (UNSTABLE_contextMenuOptions?.disableUnregister !== 'hidden') { - unregisterButton = ( - { - onClose(); - onUnregisterEntity(); - }} - disabled={disableUnregister} - > - - - - - - ); - } - return ( <> {extraItems} - {unregisterButton} + { onClose(); diff --git a/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.test.tsx b/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.test.tsx new file mode 100644 index 0000000000..70b75c7bae --- /dev/null +++ b/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.test.tsx @@ -0,0 +1,80 @@ +/* + * 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. + */ + +import { EntityProvider } from '@backstage/plugin-catalog-react'; +import { permissionApiRef } from '@backstage/plugin-permission-react'; +import { + MockPermissionApi, + renderInTestApp, + TestApiProvider, +} from '@backstage/test-utils'; +import { fireEvent, screen } from '@testing-library/react'; +import * as React from 'react'; +import { UnregisterEntity } from './UnregisterEntity'; + +const mockPermissionApi = new MockPermissionApi(); + +function render(children: React.ReactNode) { + return renderInTestApp( + + + , + ); +} + +describe('ComponentContextMenu', () => { + it('should call onUnregisterEntity on button click', async () => { + const mockCallback = jest.fn(); + await render( + {}} + />, + ); + + const unregister = await screen.findByText('Unregister entity'); + expect(unregister).toBeInTheDocument(); + fireEvent.click(unregister); + + expect(mockCallback).toBeCalled(); + }); + + it('check Unregister entity button is disabled', async () => { + const mockCallback = jest.fn(); + + const { getByText } = await render( + {}} + />, + ); + + const unregister = await screen.getByText('Unregister entity'); + expect(unregister).toBeInTheDocument(); + + const unregisterSpanItem = getByText(/Unregister entity/); + const unregisterMenuListItem = + unregisterSpanItem?.parentElement?.parentElement; + expect(unregisterMenuListItem).toHaveAttribute('aria-disabled'); + }); +}); diff --git a/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.tsx b/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.tsx new file mode 100644 index 0000000000..05044bf935 --- /dev/null +++ b/plugins/catalog/src/components/EntityContextMenu/UnregisterEntity.tsx @@ -0,0 +1,72 @@ +/* + * 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. + */ + +import React from 'react'; +import { ListItemIcon, ListItemText, MenuItem } from '@material-ui/core'; +import CancelIcon from '@material-ui/icons/Cancel'; + +type VisibleType = 'visible' | 'hidden' | 'disable'; + +export type UnregisterEntityOptions = { + disableUnregister: boolean | VisibleType; +}; + +interface UnregisterEntityProps { + unregisterEntityOptions?: UnregisterEntityOptions; + isUnregisterAllowed: boolean; + onUnregisterEntity: () => void; + onClose: () => void; +} + +export function UnregisterEntity(props: UnregisterEntityProps) { + const { + unregisterEntityOptions, + isUnregisterAllowed, + onUnregisterEntity, + onClose, + } = props; + + const isBoolean = + typeof unregisterEntityOptions?.disableUnregister === 'boolean'; + + const isDisabled = + (!isUnregisterAllowed || + (isBoolean + ? !!unregisterEntityOptions?.disableUnregister + : unregisterEntityOptions?.disableUnregister === 'disable')) ?? + false; + + let unregisterButton = <>; + + if (unregisterEntityOptions?.disableUnregister !== 'hidden') { + unregisterButton = ( + { + onClose(); + onUnregisterEntity(); + }} + disabled={isDisabled} + > + + + + + + ); + } + + return <>{unregisterButton}; +} diff --git a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx index 4cbb72db5c..5d82b5ccab 100644 --- a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx +++ b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx @@ -142,17 +142,17 @@ interface ExtraContextMenuItem { onClick: () => void; } -type VisibleType = 'visible' | 'hidden' | 'disabled'; +type VisibleType = 'visible' | 'hidden' | 'disable'; // unstable context menu option, eg: disable the unregister entity menu -interface contextMenuOptions { +export interface EntityContextMenuOptions { disableUnregister: boolean | VisibleType; } /** @public */ export interface EntityLayoutProps { UNSTABLE_extraContextMenuItems?: ExtraContextMenuItem[]; - UNSTABLE_contextMenuOptions?: contextMenuOptions; + UNSTABLE_contextMenuOptions?: EntityContextMenuOptions; children?: React.ReactNode; NotFoundComponent?: React.ReactNode; } diff --git a/plugins/catalog/src/components/EntityLayout/index.ts b/plugins/catalog/src/components/EntityLayout/index.ts index 251d213637..73a58dfddc 100644 --- a/plugins/catalog/src/components/EntityLayout/index.ts +++ b/plugins/catalog/src/components/EntityLayout/index.ts @@ -15,4 +15,8 @@ */ export { EntityLayout } from './EntityLayout'; -export type { EntityLayoutProps, EntityLayoutRouteProps } from './EntityLayout'; +export type { + EntityLayoutProps, + EntityLayoutRouteProps, + EntityContextMenuOptions, +} from './EntityLayout'; From 79b5110b99b520733dc00779558426ad7b3c941a Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Fri, 24 Jun 2022 15:09:54 -0700 Subject: [PATCH 061/212] fix-tsc Signed-off-by: sjeyaraman --- .../src/components/EntityContextMenu/EntityContextMenu.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx index 9906cd9c12..0e981bb1fc 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx @@ -65,7 +65,7 @@ describe('ComponentContextMenu', () => { const { getByText } = await render( {}} />, From 4cc81372f819b03596497a768d5448cf78f44891 Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 23 Jun 2022 10:39:12 +1000 Subject: [PATCH 062/212] Add a DefaultParentEntityPolicy. It's useful to have an entity policy to set a parent for unparented groups. This can be used to build a groups hierarchy with a single root parent group without having to make changes to every group entity in the catalog. Signed-off-by: James Peach --- .changeset/proud-toys-return.md | 5 ++ packages/catalog-model/api-report.md | 7 ++ .../DefaultParentEntityPolicy.test.ts | 71 +++++++++++++++++++ .../policies/DefaultParentEntityPolicy.ts | 68 ++++++++++++++++++ .../src/entity/policies/index.ts | 1 + 5 files changed, 152 insertions(+) create mode 100644 .changeset/proud-toys-return.md create mode 100644 packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts create mode 100644 packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts diff --git a/.changeset/proud-toys-return.md b/.changeset/proud-toys-return.md new file mode 100644 index 0000000000..c2a713a5c5 --- /dev/null +++ b/.changeset/proud-toys-return.md @@ -0,0 +1,5 @@ +--- +'@backstage/catalog-model': patch +--- + +Introduced DefaultParentEntityPolicy to set a default group entity parent. diff --git a/packages/catalog-model/api-report.md b/packages/catalog-model/api-report.md index 3eeb054174..eb8bf9af93 100644 --- a/packages/catalog-model/api-report.md +++ b/packages/catalog-model/api-report.md @@ -108,6 +108,13 @@ export class DefaultNamespaceEntityPolicy implements EntityPolicy { enforce(entity: Entity): Promise; } +// @public +export class DefaultParentEntityPolicy implements EntityPolicy { + constructor(parent: string); + // (undocumented) + enforce(entity: Entity): Promise; +} + // @public interface DomainEntityV1alpha1 extends Entity { // (undocumented) diff --git a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts b/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts new file mode 100644 index 0000000000..de7c332d17 --- /dev/null +++ b/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts @@ -0,0 +1,71 @@ +/* + * 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 { UserEntity, GroupEntity } from '../../kinds'; +import { DefaultParentEntityPolicy } from './DefaultParentEntityPolicy'; + +describe('DefaultParentEntityPolicy', () => { + it('should ignore non-group entities', async () => { + const p = new DefaultParentEntityPolicy('name'); + const u: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { name: 'n' }, + spec: { profile: {}, memberOf: ['c'] }, + }; + const result = await p.enforce(u); + expect(result).toEqual({ + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { name: 'n' }, + spec: { profile: {}, memberOf: ['c'] }, + }); + }); + + it('should parent group entities', async () => { + const p = new DefaultParentEntityPolicy('name'); + const g: GroupEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { name: 'n' }, + spec: { type: 'foo', children: [] }, + }; + const result = await p.enforce(g); + expect(result).toEqual({ + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { name: 'n' }, + spec: { type: 'foo', parent: 'group:default/name', children: [] }, + }); + }); + + it('should not replace existing parents', async () => { + const p = new DefaultParentEntityPolicy('namespace/name'); + const g: GroupEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { name: 'n' }, + spec: { type: 'foo', parent: 'group:something/else', children: [] }, + }; + const result = await p.enforce(g); + expect(result).toEqual({ + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { name: 'n' }, + spec: { type: 'foo', parent: 'group:something/else', children: [] }, + }); + }); +}); diff --git a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts b/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts new file mode 100644 index 0000000000..b5a001b1f9 --- /dev/null +++ b/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts @@ -0,0 +1,68 @@ +/* + * 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 { Entity } from '../Entity'; +import { GroupEntity } from '../../kinds'; +import { EntityPolicy } from './types'; +import { DEFAULT_NAMESPACE } from '../constants'; +import { parseEntityRef, stringifyEntityRef } from '../ref'; + +/** + * DefaultParentPolicy is an EntityPolicy that updates group entities + * with a parent of last resort. This ensures that, while we preserve + * any existing group hierarchies, we can guarantee that there is a + * single global root of the group hierarchy. + * + * @public + */ +export class DefaultParentEntityPolicy implements EntityPolicy { + private readonly parentRef: string; + + constructor(parentEntityRef: string) { + const { kind, namespace, name } = parseEntityRef(parentEntityRef, { + defaultKind: 'Group', + defaultNamespace: DEFAULT_NAMESPACE, + }); + + if (kind.toLocaleUpperCase('en-US') !== 'GROUP') { + throw new TypeError('group parent must be a group'); + } + + this.parentRef = stringifyEntityRef({ + kind: kind, + namespace: namespace, + name: name, + }); + } + + async enforce(entity: Entity): Promise { + if (entity.kind !== 'Group') { + return entity; + } + + const group = entity as GroupEntity; + if (group.spec.parent) { + return group; + } + + // Avoid making the parent entity it's own parent. + if (stringifyEntityRef(group) !== this.parentRef) { + group.spec.parent = this.parentRef; + } + + return group; + } +} diff --git a/packages/catalog-model/src/entity/policies/index.ts b/packages/catalog-model/src/entity/policies/index.ts index ae14007d80..c35a214727 100644 --- a/packages/catalog-model/src/entity/policies/index.ts +++ b/packages/catalog-model/src/entity/policies/index.ts @@ -15,6 +15,7 @@ */ export { DefaultNamespaceEntityPolicy } from './DefaultNamespaceEntityPolicy'; +export { DefaultParentEntityPolicy } from './DefaultParentEntityPolicy'; export { FieldFormatEntityPolicy } from './FieldFormatEntityPolicy'; export { NoForeignRootFieldsEntityPolicy } from './NoForeignRootFieldsEntityPolicy'; export { SchemaValidEntityPolicy } from './SchemaValidEntityPolicy'; From 70de933e56739a231c0462fd570d52630aed55ce Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 12:40:43 -0700 Subject: [PATCH 063/212] customize unregister entity menuitem Signed-off-by: sjeyaraman --- .../EntityContextMenu.test.tsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx index 5d995828e6..9906cd9c12 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx @@ -60,6 +60,30 @@ describe('ComponentContextMenu', () => { expect(mockCallback).toBeCalled(); }); + it('check Unregister entity button is disabled', async () => { + const mockCallback = jest.fn(); + + const { getByText } = await render( + {}} + />, + ); + + const button = await screen.findByTestId('menu-button'); + expect(button).toBeInTheDocument(); + fireEvent.click(button); + + const unregister = await screen.getByText('Unregister entity'); + expect(unregister).toBeInTheDocument(); + + const unregisterSpanItem = getByText(/Unregister entity/); + const unregisterMenuListItem = + unregisterSpanItem?.parentElement?.parentElement; + expect(unregisterMenuListItem).toHaveAttribute('aria-disabled'); + }); + it('should call onInspectEntity on button click', async () => { const mockCallback = jest.fn(); From ff5b2f99477bc530a66d3a2f05e6a0472794ba56 Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Sun, 5 Jun 2022 17:10:23 -0700 Subject: [PATCH 064/212] add-change-set Signed-off-by: sjeyaraman --- .changeset/cold-apples-film.md | 9 +++++++++ packages/app/src/components/catalog/EntityPage.tsx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-apples-film.md diff --git a/.changeset/cold-apples-film.md b/.changeset/cold-apples-film.md new file mode 100644 index 0000000000..d8c7ec283d --- /dev/null +++ b/.changeset/cold-apples-film.md @@ -0,0 +1,9 @@ +--- +'example-app': patch +'@backstage/plugin-catalog': patch +--- + +Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'. +With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. + +The boolean input for "unregister entity" will be deprecated later in favour of the above three options. diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index c2ae001060..743dea29e4 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -165,7 +165,7 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { }, ]; }, []); - + const options: EntityContextMenuOptions = { disableUnregister: 'visible', }; From ba8b7f594045bf49748cd801d777f5a4161b2e9b Mon Sep 17 00:00:00 2001 From: sjeyaraman Date: Fri, 24 Jun 2022 15:09:54 -0700 Subject: [PATCH 065/212] fix-tsc Signed-off-by: sjeyaraman --- .../src/components/EntityContextMenu/EntityContextMenu.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx index 9906cd9c12..0e981bb1fc 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.test.tsx @@ -65,7 +65,7 @@ describe('ComponentContextMenu', () => { const { getByText } = await render( {}} />, From 03019695a3e8f4c7931b989d4eda20e3edde4f24 Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Wed, 8 Jun 2022 16:52:48 +0200 Subject: [PATCH 066/212] Add special classes to identify entity page headers and tabs. Use that to make sure the sidebars in docs do not scroll beyond them Signed-off-by: Raghunandan --- .../src/components/TabbedLayout/RoutedTabs.tsx | 1 + .../src/layout/Header/Header.tsx | 4 +++- .../src/layout/HeaderTabs/HeaderTabs.tsx | 4 +++- .../components/EntityLayout/EntityLayout.tsx | 1 + .../TechDocsReaderPageContent/dom.tsx | 18 +++++++++++++++++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx b/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx index 5debafd3f8..027d63e1a0 100644 --- a/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx +++ b/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx @@ -80,6 +80,7 @@ export function RoutedTabs(props: { routes: SubRoute[] }) { tabs={headerTabs} selectedIndex={index} onChange={onTabChange} + className="entity-page-tabs" /> diff --git a/packages/core-components/src/layout/Header/Header.tsx b/packages/core-components/src/layout/Header/Header.tsx index bb4d19b949..cb47550b6e 100644 --- a/packages/core-components/src/layout/Header/Header.tsx +++ b/packages/core-components/src/layout/Header/Header.tsx @@ -113,6 +113,7 @@ type Props = { tooltip?: string; type?: string; typeLink?: string; + className: string | ''; }; type TypeFragmentProps = { @@ -208,6 +209,7 @@ export function Header(props: PropsWithChildren) { tooltip, type, typeLink, + className, } = props; const classes = useStyles(); const configApi = useApi(configApiRef); @@ -220,7 +222,7 @@ export function Header(props: PropsWithChildren) { return ( <> -
+
void; selectedIndex?: number; + className: string | ''; }; /** @@ -76,7 +77,7 @@ type HeaderTabsProps = { * */ export function HeaderTabs(props: HeaderTabsProps) { - const { tabs, onChange, selectedIndex } = props; + const { tabs, onChange, selectedIndex, className } = props; const [selectedTab, setSelectedTab] = useState(selectedIndex ?? 0); const styles = useStyles(); @@ -104,6 +105,7 @@ export function HeaderTabs(props: HeaderTabsProps) { aria-label="scrollable auto tabs example" onChange={handleChange} value={selectedTab} + className={className} > {tabs.map((tab, index) => ( { title={} pageTitleOverride={headerTitle} type={headerType} + className="entity-page-header" > {entity && ( <> diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx index 9f561bfcd3..497a3e1e5f 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx @@ -81,9 +81,25 @@ export const useTechDocsReaderDom = ( if (isMobileMedia) { element.style.top = '0px'; } else { - const domTop = dom.getBoundingClientRect().top ?? 0; + // Docs shown in entity pages should consider the entity tabs and multiple paddings at the top + const entityPageHeader = document.querySelector( + '.entity-page-header', + ); + const entityPageTabs = + document.querySelector('.entity-page-tabs'); + const entityPageHeaderTop = + entityPageHeader?.getBoundingClientRect().height ?? 0; + const entityPageTabsTop = + entityPageTabs?.getBoundingClientRect().height ?? 0; + + let domTop = dom.getBoundingClientRect().top ?? 0; const tabs = dom.querySelector('.md-container > .md-tabs'); const tabsHeight = tabs?.getBoundingClientRect().height ?? 0; + + // In entity pages the sidebars should stop at the tabs + if (domTop < entityPageHeaderTop + entityPageTabsTop) { + domTop = entityPageHeaderTop + entityPageTabsTop; + } element.style.top = `${Math.max(domTop, 0) + tabsHeight}px`; } From b49cc12d957f8dc173303beb15a137e0f6305e97 Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Wed, 8 Jun 2022 16:58:20 +0200 Subject: [PATCH 067/212] reorder code + fix comments Signed-off-by: Raghunandan --- .../components/TechDocsReaderPageContent/dom.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx index 497a3e1e5f..0503a91a3d 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx @@ -81,7 +81,12 @@ export const useTechDocsReaderDom = ( if (isMobileMedia) { element.style.top = '0px'; } else { - // Docs shown in entity pages should consider the entity tabs and multiple paddings at the top + let domTop = dom.getBoundingClientRect().top ?? 0; + const tabs = dom.querySelector('.md-container > .md-tabs'); + const tabsHeight = tabs?.getBoundingClientRect().height ?? 0; + + // When docs are shown in entity pages this method to reposition the sidebars on scroll + // do not consider the header and tabs. const entityPageHeader = document.querySelector( '.entity-page-header', ); @@ -92,11 +97,7 @@ export const useTechDocsReaderDom = ( const entityPageTabsTop = entityPageTabs?.getBoundingClientRect().height ?? 0; - let domTop = dom.getBoundingClientRect().top ?? 0; - const tabs = dom.querySelector('.md-container > .md-tabs'); - const tabsHeight = tabs?.getBoundingClientRect().height ?? 0; - - // In entity pages the sidebars should stop at the tabs + // the sidebars should not scroll beyond the total height of the header and tabs if (domTop < entityPageHeaderTop + entityPageTabsTop) { domTop = entityPageHeaderTop + entityPageTabsTop; } From 05e68b0b3f63f14601912dc3236d0771620173ab Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Wed, 8 Jun 2022 17:15:54 +0200 Subject: [PATCH 068/212] Header & HeaderTabs components: make className prop optional Signed-off-by: Raghunandan --- packages/core-components/src/layout/Header/Header.tsx | 2 +- packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-components/src/layout/Header/Header.tsx b/packages/core-components/src/layout/Header/Header.tsx index cb47550b6e..4b7d59d3c2 100644 --- a/packages/core-components/src/layout/Header/Header.tsx +++ b/packages/core-components/src/layout/Header/Header.tsx @@ -113,7 +113,7 @@ type Props = { tooltip?: string; type?: string; typeLink?: string; - className: string | ''; + className?: string | ''; }; type TypeFragmentProps = { diff --git a/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx index 794f26d44f..2e6d6213fc 100644 --- a/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx +++ b/packages/core-components/src/layout/HeaderTabs/HeaderTabs.tsx @@ -67,7 +67,7 @@ type HeaderTabsProps = { tabs: Tab[]; onChange?: (index: number) => void; selectedIndex?: number; - className: string | ''; + className?: string | ''; }; /** From 7739141ab2452ee8ca3a2198d981e12325f502dc Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Mon, 13 Jun 2022 23:26:05 +0200 Subject: [PATCH 069/212] Add changeset Signed-off-by: Raghunandan --- .changeset/techdocs-sixty-mugs-hug.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/techdocs-sixty-mugs-hug.md diff --git a/.changeset/techdocs-sixty-mugs-hug.md b/.changeset/techdocs-sixty-mugs-hug.md new file mode 100644 index 0000000000..05c03a0b98 --- /dev/null +++ b/.changeset/techdocs-sixty-mugs-hug.md @@ -0,0 +1,7 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-techdocs': patch +--- + +Fix: When docs are shown in an entity page under the docs tab the sidebars start overlapping with the header and tabs in the page when you scroll the documentation content. From 823ae416c5e29e6f7a9b259ef5fdf401f4911bcf Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Sun, 26 Jun 2022 10:56:32 +0200 Subject: [PATCH 070/212] Fix scroll issue within techdocs reader instead of adding special classes to entity page components Signed-off-by: Raghunandan --- .../components/TabbedLayout/RoutedTabs.tsx | 1 - .../src/layout/Header/Header.tsx | 4 +--- .../src/layout/HeaderTabs/HeaderTabs.tsx | 4 +--- .../components/EntityLayout/EntityLayout.tsx | 1 - .../TechDocsReaderPage/TechDocsReaderPage.tsx | 22 ++++++++++--------- .../TechDocsReaderPageContent/dom.tsx | 19 +++++----------- 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx b/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx index 027d63e1a0..5debafd3f8 100644 --- a/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx +++ b/packages/core-components/src/components/TabbedLayout/RoutedTabs.tsx @@ -80,7 +80,6 @@ export function RoutedTabs(props: { routes: SubRoute[] }) { tabs={headerTabs} selectedIndex={index} onChange={onTabChange} - className="entity-page-tabs" /> diff --git a/packages/core-components/src/layout/Header/Header.tsx b/packages/core-components/src/layout/Header/Header.tsx index 4b7d59d3c2..bb4d19b949 100644 --- a/packages/core-components/src/layout/Header/Header.tsx +++ b/packages/core-components/src/layout/Header/Header.tsx @@ -113,7 +113,6 @@ type Props = { tooltip?: string; type?: string; typeLink?: string; - className?: string | ''; }; type TypeFragmentProps = { @@ -209,7 +208,6 @@ export function Header(props: PropsWithChildren) { tooltip, type, typeLink, - className, } = props; const classes = useStyles(); const configApi = useApi(configApiRef); @@ -222,7 +220,7 @@ export function Header(props: PropsWithChildren) { return ( <> -
+
void; selectedIndex?: number; - className?: string | ''; }; /** @@ -77,7 +76,7 @@ type HeaderTabsProps = { * */ export function HeaderTabs(props: HeaderTabsProps) { - const { tabs, onChange, selectedIndex, className } = props; + const { tabs, onChange, selectedIndex } = props; const [selectedTab, setSelectedTab] = useState(selectedIndex ?? 0); const styles = useStyles(); @@ -105,7 +104,6 @@ export function HeaderTabs(props: HeaderTabsProps) { aria-label="scrollable auto tabs example" onChange={handleChange} value={selectedTab} - className={className} > {tabs.map((tab, index) => ( { title={} pageTitleOverride={headerTitle} type={headerType} - className="entity-page-header" > {entity && ( <> diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx index 6885957002..9f69dcb8d8 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx @@ -106,16 +106,18 @@ export const TechDocsReaderPage = (props: TechDocsReaderPageProps) => { return ( {({ metadata, entityMetadata, onReady }) => ( - - {children instanceof Function - ? children({ - entityRef, - techdocsMetadataValue: metadata.value, - entityMetadataValue: entityMetadata.value, - onReady, - }) - : children} - +
+ + {children instanceof Function + ? children({ + entityRef, + techdocsMetadataValue: metadata.value, + entityMetadataValue: entityMetadata.value, + onReady, + }) + : children} + +
)}
); diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx index 0503a91a3d..76b07c9d32 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/dom.tsx @@ -81,25 +81,16 @@ export const useTechDocsReaderDom = ( if (isMobileMedia) { element.style.top = '0px'; } else { + const page = document?.querySelector('.techdocs-reader-page'); + const pageTop = page?.getBoundingClientRect().top ?? 0; let domTop = dom.getBoundingClientRect().top ?? 0; + const tabs = dom.querySelector('.md-container > .md-tabs'); const tabsHeight = tabs?.getBoundingClientRect().height ?? 0; - // When docs are shown in entity pages this method to reposition the sidebars on scroll - // do not consider the header and tabs. - const entityPageHeader = document.querySelector( - '.entity-page-header', - ); - const entityPageTabs = - document.querySelector('.entity-page-tabs'); - const entityPageHeaderTop = - entityPageHeader?.getBoundingClientRect().height ?? 0; - const entityPageTabsTop = - entityPageTabs?.getBoundingClientRect().height ?? 0; - // the sidebars should not scroll beyond the total height of the header and tabs - if (domTop < entityPageHeaderTop + entityPageTabsTop) { - domTop = entityPageHeaderTop + entityPageTabsTop; + if (domTop < pageTop) { + domTop = pageTop; } element.style.top = `${Math.max(domTop, 0) + tabsHeight}px`; } From ca9ff1eaac33fbdb3764421996808c90899f3627 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Wed, 15 Jun 2022 11:05:17 +0200 Subject: [PATCH 071/212] Loosen elasticsearch client version and add opensearch dependencies Signed-off-by: Eric Peterson --- .../package.json | 5 +-- yarn.lock | 32 ++++++++++++------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 99339ef99c..72a74d3ec8 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -23,11 +23,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@acuris/aws-es-connection": "^2.2.0", "@backstage/config": "^1.0.1", "@backstage/plugin-search-backend-node": "^0.6.3-next.0", "@backstage/plugin-search-common": "^0.3.5", - "@elastic/elasticsearch": "7.13.0", + "@elastic/elasticsearch": "^7.13.0", + "@opensearch-project/opensearch": "^1.1.0", + "aws-os-connection": "^0.1.0", "aws-sdk": "^2.948.0", "elastic-builder": "^2.16.0", "lodash": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index c1eaefe398..b7495a0891 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,6 @@ # yarn lockfile v1 -"@acuris/aws-es-connection@^2.2.0": - version "2.3.0" - resolved "https://registry.npmjs.org/@acuris/aws-es-connection/-/aws-es-connection-2.3.0.tgz#bfa736163bdfe2e7fc12f8529eead949fb4e73fe" - integrity sha512-k8jSkdNwpSPty7oautGaJXoAzzPjP7WKbmaAE9i+vJrKWg9n2UtjesHeDhOAPzV9MG8EzXofGozYjaLdeTP+Ug== - dependencies: - aws4 "^1.11.0" - "@ampproject/remapping@^2.1.0": version "2.1.2" resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz#4edca94973ded9630d20101cd8559cedb8d8bd34" @@ -2079,10 +2072,10 @@ find-my-way "^4.3.3" into-stream "^6.0.0" -"@elastic/elasticsearch@7.13.0": - version "7.13.0" - resolved "https://registry.npmjs.org/@elastic/elasticsearch/-/elasticsearch-7.13.0.tgz#6dcf511dfa91187e22c81e54f41f4bd0fd96b4d6" - integrity sha512-WgwLWo2p9P2tdqzBGX9fHeG8p5IOTXprXNTECQG2mJ7z9n93N5AFBJpEw4d35tWWeCWi9jI13A2wzQZH7XZ/xw== +"@elastic/elasticsearch@^7.13.0": + version "7.17.0" + resolved "https://registry.npmjs.org/@elastic/elasticsearch/-/elasticsearch-7.17.0.tgz#589fb219234cf1b0da23744e82b1d25e2fe9a797" + integrity sha512-5QLPCjd0uLmLj1lSuKSThjNpq39f6NmlTy9ROLFwG5gjyTgpwSqufDeYG/Fm43Xs05uF7WcscoO7eguI3HuuYA== dependencies: debug "^4.3.1" hpagent "^0.1.1" @@ -5127,6 +5120,16 @@ rxjs "7.5.5" tslib "2.0.3" +"@opensearch-project/opensearch@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@opensearch-project/opensearch/-/opensearch-1.1.0.tgz#8b3c8b4cbcea01755ba092d2997bf0b4ca7f22f7" + integrity sha512-1TDw92JL8rD1b2QGluqBsIBLIiD5SGciIpz4qkrGAe9tcdfQ1ptub5e677rhWl35UULSjr6hP8M6HmISZ/M5HQ== + dependencies: + debug "^4.3.1" + hpagent "^0.1.1" + ms "^2.1.3" + secure-json-parse "^2.4.0" + "@opentelemetry/api@^1.0.1": version "1.0.4" resolved "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz#a167e46c10d05a07ab299fc518793b0cff8f6924" @@ -8250,6 +8253,13 @@ available-typed-arrays@^1.0.2: dependencies: array-filter "^1.0.0" +aws-os-connection@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/aws-os-connection/-/aws-os-connection-0.1.0.tgz#02c1be08cf63448c5bdc9d47b03b7ad3222b662c" + integrity sha512-WBN2S/5zgzfPpEiOTEW7IPJX+hlq+AQeAVKK4AL/Th0SfRRKu6a46i4aZKovQslBkKnmcSFvy+mHSJ299N8YWA== + dependencies: + aws4 "^1.11.0" + aws-sdk-mock@^5.2.1: version "5.7.0" resolved "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-5.7.0.tgz#b2a9454c78d008186c3f1a460b79cdb9cc9dfdc4" From 68b7739aab632dbce8437589c0c274c773048119 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Wed, 15 Jun 2022 11:07:07 +0200 Subject: [PATCH 072/212] Refactor Elasticsearch client calls into client wrapper and break out types Signed-off-by: Eric Peterson --- .../api-report.md | 273 ++++++++++++++---- .../src/engines/ElasticSearchClientOptions.ts | 128 ++++++-- .../src/engines/ElasticSearchClientWrapper.ts | 209 ++++++++++++++ .../engines/ElasticSearchSearchEngine.test.ts | 15 +- .../src/engines/ElasticSearchSearchEngine.ts | 58 +--- .../ElasticSearchSearchEngineIndexer.test.ts | 6 +- .../ElasticSearchSearchEngineIndexer.ts | 55 ++-- .../src/engines/index.ts | 18 +- .../src/engines/types.ts | 46 +++ .../src/index.ts | 11 +- 10 files changed, 659 insertions(+), 160 deletions(-) create mode 100644 plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts create mode 100644 plugins/search-backend-module-elasticsearch/src/engines/types.ts diff --git a/plugins/search-backend-module-elasticsearch/api-report.md b/plugins/search-backend-module-elasticsearch/api-report.md index 04b7f96f93..eed2b1b10a 100644 --- a/plugins/search-backend-module-elasticsearch/api-report.md +++ b/plugins/search-backend-module-elasticsearch/api-report.md @@ -5,60 +5,27 @@ ```ts /// +import { ApiResponse } from '@opensearch-project/opensearch'; import { BatchSearchEngineIndexer } from '@backstage/plugin-search-backend-node'; -import { Client } from '@elastic/elasticsearch'; +import { BulkHelper } from '@opensearch-project/opensearch/lib/Helpers'; +import { BulkStats } from '@opensearch-project/opensearch/lib/Helpers'; import { Config } from '@backstage/config'; import type { ConnectionOptions } from 'tls'; import { IndexableDocument } from '@backstage/plugin-search-common'; import { IndexableResultSet } from '@backstage/plugin-search-common'; import { Logger } from 'winston'; +import { Readable } from 'stream'; import { SearchEngine } from '@backstage/plugin-search-common'; import { SearchQuery } from '@backstage/plugin-search-common'; - -// @public (undocumented) -export interface ElasticSearchAgentOptions { - // (undocumented) - keepAlive?: boolean; - // (undocumented) - keepAliveMsecs?: number; - // (undocumented) - maxFreeSockets?: number; - // (undocumented) - maxSockets?: number; -} - -// @public (undocumented) -export type ElasticSearchAuth = - | { - username: string; - password: string; - } - | { - apiKey: - | string - | { - id: string; - api_key: string; - }; - }; +import { TransportRequestPromise } from '@opensearch-project/opensearch/lib/Transport'; // @public -export interface ElasticSearchClientOptions { +export interface BaseElasticSearchClientOptions { // (undocumented) agent?: ElasticSearchAgentOptions | ((opts?: any) => unknown) | false; // (undocumented) - auth?: ElasticSearchAuth; - // (undocumented) - cloud?: { - id: string; - username?: string; - password?: string; - }; - // (undocumented) compression?: 'gzip'; // (undocumented) - Connection?: ElasticSearchConnectionConstructor; - // (undocumented) disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor'; // (undocumented) enableMetaHeader?: boolean; @@ -69,28 +36,14 @@ export interface ElasticSearchClientOptions { // (undocumented) name?: string | symbol; // (undocumented) - node?: - | string - | string[] - | ElasticSearchNodeOptions - | ElasticSearchNodeOptions[]; - // (undocumented) nodeFilter?: (connection: any) => boolean; // (undocumented) - nodes?: - | string - | string[] - | ElasticSearchNodeOptions - | ElasticSearchNodeOptions[]; - // (undocumented) nodeSelector?: ((connections: any[]) => any) | string; // (undocumented) opaqueIdPrefix?: string; // (undocumented) pingTimeout?: number; // (undocumented) - provider?: 'aws' | 'elastic'; - // (undocumented) proxy?: string | URL; // (undocumented) requestTimeout?: number; @@ -112,6 +65,118 @@ export interface ElasticSearchClientOptions { Transport?: ElasticSearchTransportConstructor; } +// @public (undocumented) +export interface ElasticSearchAgentOptions { + // (undocumented) + keepAlive?: boolean; + // (undocumented) + keepAliveMsecs?: number; + // (undocumented) + maxFreeSockets?: number; + // (undocumented) + maxSockets?: number; +} + +// @public (undocumented) +export type ElasticSearchAliasAction = + | { + remove: { + index: any; + alias: any; + }; + add?: undefined; + } + | { + add: { + indices: any; + alias: any; + index?: undefined; + }; + remove?: undefined; + } + | { + add: { + index: any; + alias: any; + indices?: undefined; + }; + remove?: undefined; + } + | undefined; + +// @public (undocumented) +export type ElasticSearchAuth = + | OpenSearchAuth + | { + apiKey: + | string + | { + id: string; + api_key: string; + }; + }; + +// @public +export type ElasticSearchClientOptions = + | ElasticSearchElasticSearchClientOptions + | OpenSearchElasticSearchClientOptions; + +// @public +export class ElasticSearchClientWrapper { + // (undocumented) + bulk(bulkOptions: { + datasource: Readable; + onDocument: () => ElasticSearchIndexAction; + refreshOnCompletion?: string | boolean; + }): BulkHelper; + // (undocumented) + createIndex({ + index, + }: { + index: string; + }): TransportRequestPromise, unknown>>; + // (undocumented) + deleteIndex({ + index, + }: { + index: string | string[]; + }): TransportRequestPromise, unknown>>; + // (undocumented) + static fromClientOptions( + options: ElasticSearchClientOptions, + ): ElasticSearchClientWrapper; + // (undocumented) + getAliases({ + aliases, + }: { + aliases: string[]; + }): TransportRequestPromise, unknown>>; + // (undocumented) + indexExists({ + index, + }: { + index: string | string[]; + }): TransportRequestPromise>; + // (undocumented) + putIndexTemplate( + template: ElasticSearchCustomIndexTemplate, + ): TransportRequestPromise, unknown>>; + // (undocumented) + search({ + index, + body, + }: { + index: string | string[]; + body: Object; + }): TransportRequestPromise, unknown>>; + // (undocumented) + updateAliases({ + actions, + }: { + actions: ElasticSearchAliasAction[]; + }): TransportRequestPromise, unknown>>; +} + // @public export type ElasticSearchConcreteQuery = { documentTypes?: string[]; @@ -150,6 +215,35 @@ export type ElasticSearchCustomIndexTemplateBody = { template?: Record; }; +// @public +export interface ElasticSearchElasticSearchClientOptions + extends BaseElasticSearchClientOptions { + // (undocumented) + auth?: ElasticSearchAuth; + // (undocumented) + cloud?: { + id: string; + username?: string; + password?: string; + }; + // (undocumented) + Connection?: ElasticSearchConnectionConstructor; + // (undocumented) + node?: + | string + | string[] + | ElasticSearchNodeOptions + | ElasticSearchNodeOptions[]; + // (undocumented) + nodes?: + | string + | string[] + | ElasticSearchNodeOptions + | ElasticSearchNodeOptions[]; + // (undocumented) + provider?: 'elastic'; +} + // @public (undocumented) export type ElasticSearchHighlightConfig = { fragmentDelimiter: string; @@ -166,6 +260,14 @@ export type ElasticSearchHighlightOptions = { numFragments?: number; }; +// @public (undocumented) +export type ElasticSearchIndexAction = { + index: { + _index: string; + [key: string]: any; + }; +}; + // @public (undocumented) export interface ElasticSearchNodeOptions { // (undocumented) @@ -258,7 +360,7 @@ export type ElasticSearchSearchEngineIndexerOptions = { indexSeparator: string; alias: string; logger: Logger; - elasticSearchClient: Client; + elasticSearchClientWrapper: ElasticSearchClientWrapper; }; // @public (undocumented) @@ -273,4 +375,67 @@ export interface ElasticSearchTransportConstructor { DEFAULT: string; }; } + +// @public +export const isOpenSearchCompatible: ( + opts: ElasticSearchClientOptions, +) => opts is OpenSearchElasticSearchClientOptions; + +// @public (undocumented) +export type OpenSearchAuth = { + username: string; + password: string; +}; + +// @public (undocumented) +export interface OpenSearchConnectionConstructor { + // (undocumented) + new (opts?: any): any; + // (undocumented) + roles: { + MASTER: string; + DATA: string; + INGEST: string; + }; + // (undocumented) + statuses: { + ALIVE: string; + DEAD: string; + }; +} + +// @public +export interface OpenSearchElasticSearchClientOptions + extends BaseElasticSearchClientOptions { + // (undocumented) + auth?: OpenSearchAuth; + // (undocumented) + connection?: OpenSearchConnectionConstructor; + // (undocumented) + node?: string | string[] | OpenSearchNodeOptions | OpenSearchNodeOptions[]; + // (undocumented) + nodes?: string | string[] | OpenSearchNodeOptions | OpenSearchNodeOptions[]; + // (undocumented) + provider?: 'aws'; +} + +// @public (undocumented) +export interface OpenSearchNodeOptions { + // (undocumented) + agent?: ElasticSearchAgentOptions; + // (undocumented) + headers?: Record; + // (undocumented) + id?: string; + // (undocumented) + roles?: { + master: boolean; + data: boolean; + ingest: boolean; + }; + // (undocumented) + ssl?: ConnectionOptions; + // (undocumented) + url: URL; +} ``` diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientOptions.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientOptions.ts index c5d1f11b0c..74523020db 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientOptions.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientOptions.ts @@ -16,17 +16,60 @@ import type { ConnectionOptions as TLSConnectionOptions } from 'tls'; /** - * Options used to configure the `@elastic/elasticsearch` client and - * are what will be passed as an argument to the - * {@link ElasticSearchSearchEngine.newClient} method - * - * They are drawn from the `ClientOptions` class of `@elastic/elasticsearch`, - * but are maintained separately so that this interface is not coupled to + * Typeguard to differentiate ElasticSearch client options which are compatible + * with OpenSearch vs. ElasticSearch clients. Useful when calling the + * {@link ElasticSearchSearchEngine.newClient} method. * * @public */ -export interface ElasticSearchClientOptions { - provider?: 'aws' | 'elastic'; +export const isOpenSearchCompatible = ( + opts: ElasticSearchClientOptions, +): opts is OpenSearchElasticSearchClientOptions => { + return opts?.provider === 'aws'; +}; + +/** + * Options used to configure the `@elastic/elasticsearch` client or the + * `@opensearch-project/opensearch` client, depending on the given config. It + * will be passed as an argument to the + * {@link ElasticSearchSearchEngine.newClient} method. + * + * @public + */ +export type ElasticSearchClientOptions = + | ElasticSearchElasticSearchClientOptions + | OpenSearchElasticSearchClientOptions; + +/** + * Options used to configure the `@opensearch-project/opensearch` client. + * + * They are drawn from the `ClientOptions` class of `@opensearch-project/opensearch`, + * but are maintained separately so that this interface is not coupled to it. + * + * @public + */ +export interface OpenSearchElasticSearchClientOptions + extends BaseElasticSearchClientOptions { + provider?: 'aws'; + auth?: OpenSearchAuth; + connection?: OpenSearchConnectionConstructor; + node?: string | string[] | OpenSearchNodeOptions | OpenSearchNodeOptions[]; + nodes?: string | string[] | OpenSearchNodeOptions | OpenSearchNodeOptions[]; +} + +/** + * Options used to configure the `@elastic/elasticsearch` client. + * + * They are drawn from the `ClientOptions` class of `@elastic/elasticsearch`, + * but are maintained separately so that this interface is not coupled to it. + * + * @public + */ +export interface ElasticSearchElasticSearchClientOptions + extends BaseElasticSearchClientOptions { + provider?: 'elastic'; + auth?: ElasticSearchAuth; + Connection?: ElasticSearchConnectionConstructor; node?: | string | string[] @@ -37,8 +80,21 @@ export interface ElasticSearchClientOptions { | string[] | ElasticSearchNodeOptions | ElasticSearchNodeOptions[]; + cloud?: { + id: string; + username?: string; + password?: string; + }; +} + +/** + * Base client options that are shared across `@opensearch-project/opensearch` + * and `@elastic/elasticsearch` clients. + * + * @public + */ +export interface BaseElasticSearchClientOptions { Transport?: ElasticSearchTransportConstructor; - Connection?: ElasticSearchConnectionConstructor; maxRetries?: number; requestTimeout?: number; pingTimeout?: number; @@ -56,25 +112,24 @@ export interface ElasticSearchClientOptions { headers?: Record; opaqueIdPrefix?: string; name?: string | symbol; - auth?: ElasticSearchAuth; proxy?: string | URL; enableMetaHeader?: boolean; - cloud?: { - id: string; - username?: string; - password?: string; - }; disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor'; } +/** + * @public + */ +export type OpenSearchAuth = { + username: string; + password: string; +}; + /** * @public */ export type ElasticSearchAuth = - | { - username: string; - password: string; - } + | OpenSearchAuth | { apiKey: | string @@ -101,6 +156,22 @@ export interface ElasticSearchNodeOptions { }; } +/** + * @public + */ +export interface OpenSearchNodeOptions { + url: URL; + id?: string; + agent?: ElasticSearchAgentOptions; + ssl?: TLSConnectionOptions; + headers?: Record; + roles?: { + master: boolean; + data: boolean; + ingest: boolean; + }; +} + /** * @public */ @@ -127,6 +198,23 @@ export interface ElasticSearchConnectionConstructor { ML: string; }; } + +/** + * @public + */ +export interface OpenSearchConnectionConstructor { + new (opts?: any): any; + statuses: { + ALIVE: string; + DEAD: string; + }; + roles: { + MASTER: string; + DATA: string; + INGEST: string; + }; +} + /** * @public */ @@ -139,3 +227,5 @@ export interface ElasticSearchTransportConstructor { DEFAULT: string; }; } + +// todo(iamEAP) implement canary types to ensure we remain compatible through upgrades. diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts new file mode 100644 index 0000000000..bcf67e091c --- /dev/null +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts @@ -0,0 +1,209 @@ +/* + * 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 { Client as ElasticSearchClient } from '@elastic/elasticsearch'; +import { Client as OpenSearchClient } from '@opensearch-project/opensearch'; +import { Readable } from 'stream'; +import { + ElasticSearchClientOptions, + isOpenSearchCompatible, +} from './ElasticSearchClientOptions'; +import { ElasticSearchCustomIndexTemplate } from './types'; + +/** + * @public + */ +export type ElasticSearchAliasAction = + | { + remove: { index: any; alias: any }; + add?: undefined; + } + | { + add: { indices: any; alias: any; index?: undefined }; + remove?: undefined; + } + | { + add: { index: any; alias: any; indices?: undefined }; + remove?: undefined; + } + | undefined; + +/** + * @public + */ +export type ElasticSearchIndexAction = { + index: { + _index: string; + [key: string]: any; + }; +}; + +/** + * A wrapper class that exposes logical methods that are conditionally fired + * against either a configured Elasticsearch client or a configured Opensearch + * client. + * + * This is necessary because, despite its intention to be API-compatible, the + * opensearch client does not support API key-based authentication. This is + * also the sanest way to accomplish this while making typescript happy. + * + * In the future, if the differences between implementations become + * unmaintainably divergent, we should split out the Opensearch and + * Elasticsearch search engine implementations. + * + * @public + */ +export class ElasticSearchClientWrapper { + private readonly elasticSearchClient: ElasticSearchClient | undefined; + private readonly openSearchClient: OpenSearchClient | undefined; + + private constructor({ + openSearchClient, + elasticSearchClient, + }: { + openSearchClient?: OpenSearchClient; + elasticSearchClient?: ElasticSearchClient; + }) { + this.openSearchClient = openSearchClient; + this.elasticSearchClient = elasticSearchClient; + } + + static fromClientOptions(options: ElasticSearchClientOptions) { + if (isOpenSearchCompatible(options)) { + return new ElasticSearchClientWrapper({ + openSearchClient: new OpenSearchClient(options), + }); + } + + return new ElasticSearchClientWrapper({ + elasticSearchClient: new ElasticSearchClient(options), + }); + } + + search({ index, body }: { index: string | string[]; body: Object }) { + if (this.openSearchClient) { + return this.openSearchClient.search({ index, body }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.search({ index, body }); + } + + throw new Error('No client defined'); + } + + bulk(bulkOptions: { + datasource: Readable; + onDocument: () => ElasticSearchIndexAction; + refreshOnCompletion?: string | boolean; + }) { + if (this.openSearchClient) { + return this.openSearchClient.helpers.bulk(bulkOptions); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.helpers.bulk(bulkOptions); + } + + throw new Error('No client defined'); + } + + putIndexTemplate(template: ElasticSearchCustomIndexTemplate) { + if (this.openSearchClient) { + return this.openSearchClient.indices.putIndexTemplate(template); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.indices.putIndexTemplate(template); + } + + throw new Error('No client defined'); + } + + indexExists({ index }: { index: string | string[] }) { + if (this.openSearchClient) { + return this.openSearchClient.indices.exists({ index }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.indices.exists({ index }); + } + + throw new Error('No client defined'); + } + + deleteIndex({ index }: { index: string | string[] }) { + if (this.openSearchClient) { + return this.openSearchClient.indices.delete({ index }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.indices.delete({ index }); + } + + throw new Error('No client defined'); + } + + createIndex({ index }: { index: string }) { + if (this.openSearchClient) { + return this.openSearchClient.indices.create({ index }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.indices.create({ index }); + } + + throw new Error('No client defined'); + } + + getAliases({ aliases }: { aliases: string[] }) { + if (this.openSearchClient) { + return this.openSearchClient.cat.aliases({ + format: 'json', + name: aliases, + }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.cat.aliases({ + format: 'json', + name: aliases, + }); + } + + throw new Error('No client defined'); + } + + updateAliases({ actions }: { actions: ElasticSearchAliasAction[] }) { + const filteredActions = actions.filter(Boolean); + if (this.openSearchClient) { + return this.openSearchClient.indices.updateAliases({ + body: { + actions: filteredActions, + }, + }); + } + + if (this.elasticSearchClient) { + return this.elasticSearchClient.indices.updateAliases({ + body: { + actions: filteredActions, + }, + }); + } + + throw new Error('No client defined'); + } +} diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.test.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.test.ts index 7892b731ed..cc88f456b6 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.test.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.test.ts @@ -16,8 +16,9 @@ import { getVoidLogger } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; -import { Client, errors } from '@elastic/elasticsearch'; +import { errors } from '@elastic/elasticsearch'; import Mock from '@elastic/elasticsearch-mock'; +import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper'; import { ElasticSearchConcreteQuery, decodePageCursor, @@ -70,7 +71,7 @@ const customIndexTemplate = { describe('ElasticSearchSearchEngine', () => { let testSearchEngine: ElasticSearchSearchEngine; let inspectableSearchEngine: ElasticSearchSearchEngineForTranslatorTests; - let client: Client; + let clientWrapper: ElasticSearchClientWrapper; beforeEach(() => { testSearchEngine = new ElasticSearchSearchEngine( @@ -86,7 +87,7 @@ describe('ElasticSearchSearchEngine', () => { getVoidLogger(), ); // eslint-disable-next-line dot-notation - client = testSearchEngine['elasticSearchClient']; + clientWrapper = testSearchEngine['elasticSearchClientWrapper']; }); describe('custom index template', () => { @@ -686,7 +687,7 @@ describe('ElasticSearchSearchEngine', () => { }); it('should handle index/search type filtering correctly', async () => { - const elasticSearchQuerySpy = jest.spyOn(client, 'search'); + const elasticSearchQuerySpy = jest.spyOn(clientWrapper, 'search'); await testSearchEngine.query({ term: 'testTerm', filters: {}, @@ -725,7 +726,7 @@ describe('ElasticSearchSearchEngine', () => { }); it('should create matchAll query if no term defined', async () => { - const elasticSearchQuerySpy = jest.spyOn(client, 'search'); + const elasticSearchQuerySpy = jest.spyOn(clientWrapper, 'search'); await testSearchEngine.query({ term: '', filters: {}, @@ -759,7 +760,7 @@ describe('ElasticSearchSearchEngine', () => { }); it('should query only specified indices if defined', async () => { - const elasticSearchQuerySpy = jest.spyOn(client, 'search'); + const elasticSearchQuerySpy = jest.spyOn(clientWrapper, 'search'); await testSearchEngine.query({ term: '', filters: {}, @@ -809,7 +810,7 @@ describe('ElasticSearchSearchEngine', () => { type: 'test-index', indexPrefix: '', indexSeparator: '-index__', - elasticSearchClient: client, + elasticSearchClientWrapper: clientWrapper, }), ); expect(indexerMock.on).toHaveBeenCalledWith( diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts index 31112e3446..62c72ccd09 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - awsGetCredentials, - createAWSConnection, -} from '@acuris/aws-es-connection'; +import { awsGetCredentials, createAWSConnection } from 'aws-os-connection'; import { Config } from '@backstage/config'; import { IndexableDocument, @@ -26,47 +23,17 @@ import { SearchEngine, SearchQuery, } from '@backstage/plugin-search-common'; -import { Client } from '@elastic/elasticsearch'; import esb from 'elastic-builder'; import { isEmpty, isNaN as nan, isNumber } from 'lodash'; import { v4 as uuid } from 'uuid'; import { Logger } from 'winston'; -import type { ElasticSearchClientOptions } from './ElasticSearchClientOptions'; +import { ElasticSearchClientOptions } from './ElasticSearchClientOptions'; import { ElasticSearchSearchEngineIndexer } from './ElasticSearchSearchEngineIndexer'; +import { ElasticSearchCustomIndexTemplate } from './types'; +import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper'; export type { ElasticSearchClientOptions }; -/** - * Elasticsearch specific index template - * @public - */ -export type ElasticSearchCustomIndexTemplate = { - name: string; - body: ElasticSearchCustomIndexTemplateBody; -}; - -/** - * Elasticsearch specific index template body - * @public - */ -export type ElasticSearchCustomIndexTemplateBody = { - /** - * Array of wildcard (*) expressions used to match the names of data streams and indices during creation. - */ - index_patterns: string[]; - /** - * An ordered list of component template names. - * Component templates are merged in the order specified, - * meaning that the last component template specified has the highest precedence. - */ - composed_of?: string[]; - /** - * See available properties of template - * https://www.elastic.co/guide/en/elasticsearch/reference/7.15/indices-put-template.html#put-index-template-api-request-body - */ - template?: Record; -}; - /** * Search query that the elasticsearch engine understands. * @public @@ -143,7 +110,7 @@ function isBlank(str: string) { * @public */ export class ElasticSearchSearchEngine implements SearchEngine { - private readonly elasticSearchClient: Client; + private readonly elasticSearchClientWrapper: ElasticSearchClientWrapper; private readonly highlightOptions: ElasticSearchHighlightConfig; constructor( @@ -153,7 +120,8 @@ export class ElasticSearchSearchEngine implements SearchEngine { private readonly logger: Logger, highlightOptions?: ElasticSearchHighlightOptions, ) { - this.elasticSearchClient = this.newClient(options => new Client(options)); + this.elasticSearchClientWrapper = + ElasticSearchClientWrapper.fromClientOptions(elasticSearchClientOptions); const uuidTag = uuid(); this.highlightOptions = { preTag: `<${uuidTag}>`, @@ -177,7 +145,7 @@ export class ElasticSearchSearchEngine implements SearchEngine { if (options.provider === 'elastic') { logger.info('Initializing Elastic.co ElasticSearch search engine.'); } else if (options.provider === 'aws') { - logger.info('Initializing AWS ElasticSearch search engine.'); + logger.info('Initializing AWS OpenSearch search engine.'); } else { logger.info('Initializing ElasticSearch search engine.'); } @@ -269,7 +237,7 @@ export class ElasticSearchSearchEngine implements SearchEngine { async setIndexTemplate(template: ElasticSearchCustomIndexTemplate) { try { - await this.elasticSearchClient.indices.putIndexTemplate(template); + await this.elasticSearchClientWrapper.putIndexTemplate(template); this.logger.info('Custom index template set'); } catch (error) { this.logger.error(`Unable to set custom index template: ${error}`); @@ -284,7 +252,7 @@ export class ElasticSearchSearchEngine implements SearchEngine { indexPrefix: this.indexPrefix, indexSeparator: this.indexSeparator, alias, - elasticSearchClient: this.elasticSearchClient, + elasticSearchClientWrapper: this.elasticSearchClientWrapper, logger: this.logger, }); @@ -292,13 +260,13 @@ export class ElasticSearchSearchEngine implements SearchEngine { indexer.on('error', async e => { this.logger.error(`Failed to index documents for type ${type}`, e); try { - const response = await this.elasticSearchClient.indices.exists({ + const response = await this.elasticSearchClientWrapper.indexExists({ index: indexer.indexName, }); const indexCreated = response.body; if (indexCreated) { this.logger.info(`Removing created index ${indexer.indexName}`); - await this.elasticSearchClient.indices.delete({ + await this.elasticSearchClientWrapper.deleteIndex({ index: indexer.indexName, }); } @@ -319,7 +287,7 @@ export class ElasticSearchSearchEngine implements SearchEngine { ? documentTypes.map(it => this.constructSearchAlias(it)) : this.constructSearchAlias('*'); try { - const result = await this.elasticSearchClient.search({ + const result = await this.elasticSearchClientWrapper.search({ index: queryIndices, body: elasticSearchQuery, }); diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.test.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.test.ts index 4e0e8e229f..eff056c3f4 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.test.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.test.ts @@ -16,13 +16,13 @@ import { getVoidLogger } from '@backstage/backend-common'; import { TestPipeline } from '@backstage/plugin-search-backend-node'; -import { Client } from '@elastic/elasticsearch'; import Mock from '@elastic/elasticsearch-mock'; import { range } from 'lodash'; +import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper'; import { ElasticSearchSearchEngineIndexer } from './ElasticSearchSearchEngineIndexer'; const mock = new Mock(); -const client = new Client({ +const clientWrapper = ElasticSearchClientWrapper.fromClientOptions({ node: 'http://localhost:9200', Connection: mock.getConnection(), }); @@ -43,7 +43,7 @@ describe('ElasticSearchSearchEngineIndexer', () => { indexSeparator: '-index__', alias: 'some-type-index__search', logger: getVoidLogger(), - elasticSearchClient: client, + elasticSearchClientWrapper: clientWrapper, }); // Set up all requisite Elastic mocks. diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.ts index fd16d0c963..87a4472a15 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngineIndexer.ts @@ -16,9 +16,9 @@ import { BatchSearchEngineIndexer } from '@backstage/plugin-search-backend-node'; import { IndexableDocument } from '@backstage/plugin-search-common'; -import { Client } from '@elastic/elasticsearch'; import { Readable } from 'stream'; import { Logger } from 'winston'; +import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper'; /** * Options for instansiate ElasticSearchSearchEngineIndexer @@ -30,7 +30,7 @@ export type ElasticSearchSearchEngineIndexerOptions = { indexSeparator: string; alias: string; logger: Logger; - elasticSearchClient: Client; + elasticSearchClientWrapper: ElasticSearchClientWrapper; }; function duration(startTimestamp: [number, number]): string { @@ -57,7 +57,7 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { private readonly removableAlias: string; private readonly logger: Logger; private readonly sourceStream: Readable; - private readonly elasticSearchClient: Client; + private readonly elasticSearchClientWrapper: ElasticSearchClientWrapper; private bulkResult: Promise; constructor(options: ElasticSearchSearchEngineIndexerOptions) { @@ -70,7 +70,7 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { this.indexName = this.constructIndexName(`${Date.now()}`); this.alias = options.alias; this.removableAlias = `${this.alias}_removable`; - this.elasticSearchClient = options.elasticSearchClient; + this.elasticSearchClientWrapper = options.elasticSearchClientWrapper; // The ES client bulk helper supports stream-based indexing, but we have to // supply the stream directly to it at instantiation-time. We can't supply @@ -83,7 +83,7 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { // Keep a reference to the ES Bulk helper so that we can know when all // documents have been successfully written to ES. - this.bulkResult = this.elasticSearchClient.helpers.bulk({ + this.bulkResult = this.elasticSearchClientWrapper.bulk({ datasource: this.sourceStream, onDocument() { that.processed++; @@ -98,16 +98,15 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { async initialize(): Promise { this.logger.info(`Started indexing documents for index ${this.type}`); - const aliases = await this.elasticSearchClient.cat.aliases({ - format: 'json', - name: [this.alias, this.removableAlias], + const aliases = await this.elasticSearchClientWrapper.getAliases({ + aliases: [this.alias, this.removableAlias], }); this.removableIndices = [ ...new Set(aliases.body.map((r: Record) => r.index)), ] as string[]; - await this.elasticSearchClient.indices.create({ + await this.elasticSearchClientWrapper.createIndex({ index: this.indexName, }); } @@ -140,25 +139,23 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { )}`, result, ); - await this.elasticSearchClient.indices.updateAliases({ - body: { - actions: [ - { - remove: { index: this.constructIndexName('*'), alias: this.alias }, - }, - this.removableIndices.length - ? { - add: { - indices: this.removableIndices, - alias: this.removableAlias, - }, - } - : undefined, - { - add: { index: this.indexName, alias: this.alias }, - }, - ].filter(Boolean), - }, + await this.elasticSearchClientWrapper.updateAliases({ + actions: [ + { + remove: { index: this.constructIndexName('*'), alias: this.alias }, + }, + this.removableIndices.length + ? { + add: { + indices: this.removableIndices, + alias: this.removableAlias, + }, + } + : undefined, + { + add: { index: this.indexName, alias: this.alias }, + }, + ].filter(Boolean), }); // If any indices are removable, remove them. Do not bubble up this error, @@ -166,7 +163,7 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer { if (this.removableIndices.length) { this.logger.info('Removing stale search indices', this.removableIndices); try { - await this.elasticSearchClient.indices.delete({ + await this.elasticSearchClientWrapper.deleteIndex({ index: this.removableIndices, }); } catch (e) { diff --git a/plugins/search-backend-module-elasticsearch/src/engines/index.ts b/plugins/search-backend-module-elasticsearch/src/engines/index.ts index 8ac86970a1..8c3b9e3c6d 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/index.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/index.ts @@ -15,13 +15,25 @@ */ export { ElasticSearchSearchEngine } from './ElasticSearchSearchEngine'; +export { isOpenSearchCompatible } from './ElasticSearchClientOptions'; export type { + BaseElasticSearchClientOptions, ElasticSearchAgentOptions, ElasticSearchConnectionConstructor, + ElasticSearchElasticSearchClientOptions, ElasticSearchTransportConstructor, ElasticSearchNodeOptions, ElasticSearchAuth, + OpenSearchAuth, + OpenSearchConnectionConstructor, + OpenSearchElasticSearchClientOptions, + OpenSearchNodeOptions, } from './ElasticSearchClientOptions'; +export type { + ElasticSearchAliasAction, + ElasticSearchClientWrapper, + ElasticSearchIndexAction, +} from './ElasticSearchClientWrapper'; export type { ElasticSearchConcreteQuery, ElasticSearchClientOptions, @@ -30,10 +42,12 @@ export type { ElasticSearchQueryTranslator, ElasticSearchQueryTranslatorOptions, ElasticSearchOptions, - ElasticSearchCustomIndexTemplate, - ElasticSearchCustomIndexTemplateBody, } from './ElasticSearchSearchEngine'; export type { ElasticSearchSearchEngineIndexer, ElasticSearchSearchEngineIndexerOptions, } from './ElasticSearchSearchEngineIndexer'; +export type { + ElasticSearchCustomIndexTemplate, + ElasticSearchCustomIndexTemplateBody, +} from './types'; diff --git a/plugins/search-backend-module-elasticsearch/src/engines/types.ts b/plugins/search-backend-module-elasticsearch/src/engines/types.ts new file mode 100644 index 0000000000..a83e8b09b6 --- /dev/null +++ b/plugins/search-backend-module-elasticsearch/src/engines/types.ts @@ -0,0 +1,46 @@ +/* + * 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. + */ + +/** + * Elasticsearch specific index template + * @public + */ +export type ElasticSearchCustomIndexTemplate = { + name: string; + body: ElasticSearchCustomIndexTemplateBody; +}; + +/** + * Elasticsearch specific index template body + * @public + */ +export type ElasticSearchCustomIndexTemplateBody = { + /** + * Array of wildcard (*) expressions used to match the names of data streams and indices during creation. + */ + index_patterns: string[]; + /** + * An ordered list of component template names. + * Component templates are merged in the order specified, + * meaning that the last component template specified has the highest precedence. + */ + composed_of?: string[]; + /** + * See available properties of template + * https://www.elastic.co/guide/en/elasticsearch/reference/7.15/indices-put-template.html#put-index-template-api-request-body + */ + template?: Record; +}; diff --git a/plugins/search-backend-module-elasticsearch/src/index.ts b/plugins/search-backend-module-elasticsearch/src/index.ts index adf7fa43f2..cb4f62098a 100644 --- a/plugins/search-backend-module-elasticsearch/src/index.ts +++ b/plugins/search-backend-module-elasticsearch/src/index.ts @@ -20,13 +20,18 @@ * @packageDocumentation */ -export { ElasticSearchSearchEngine } from './engines'; +export { ElasticSearchSearchEngine, isOpenSearchCompatible } from './engines'; export type { + BaseElasticSearchClientOptions, ElasticSearchAgentOptions, + ElasticSearchAliasAction, + ElasticSearchClientWrapper, ElasticSearchConcreteQuery, ElasticSearchClientOptions, + ElasticSearchElasticSearchClientOptions, ElasticSearchHighlightConfig, ElasticSearchHighlightOptions, + ElasticSearchIndexAction, ElasticSearchQueryTranslator, ElasticSearchQueryTranslatorOptions, ElasticSearchConnectionConstructor, @@ -38,4 +43,8 @@ export type { ElasticSearchSearchEngineIndexerOptions, ElasticSearchCustomIndexTemplate, ElasticSearchCustomIndexTemplateBody, + OpenSearchAuth, + OpenSearchConnectionConstructor, + OpenSearchElasticSearchClientOptions, + OpenSearchNodeOptions, } from './engines'; From c5af773757b771226820834bb449302bfcae4ff1 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Wed, 15 Jun 2022 12:07:44 +0200 Subject: [PATCH 073/212] Note the (technically) breaking change and update docs. Signed-off-by: Eric Peterson --- .changeset/search-lightning-cult.md | 24 ++++++++++++++++++++++++ docs/features/search/search-engines.md | 21 ++++++++++++++++----- 2 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .changeset/search-lightning-cult.md diff --git a/.changeset/search-lightning-cult.md b/.changeset/search-lightning-cult.md new file mode 100644 index 0000000000..79cd256e77 --- /dev/null +++ b/.changeset/search-lightning-cult.md @@ -0,0 +1,24 @@ +--- +'@backstage/plugin-search-backend-module-elasticsearch': minor +--- + +**BREAKING**: In order to remain interoperable with all currently supported +deployments of Elasticsearch, this package will now conditionally use either +the `@elastic/elasticsearch` or `@opensearch-project/opensearch` client when +communicating with your deployed cluster. + +If you do not rely on types exported from this package, or if you do not make +use of the `createElasticSearchClientOptions` or `newClient` methods on the +`ElasticSearchSearchEngine` class, then upgrading to this version should not +require any further action on your part. Everything will continue to work as it +always has. + +If you _do_ rely on either of the above methods or any underlying types, some +changes may be needed to your custom code. A type guard is now exported by this +package (`isOpenSearchCompatible(options)`), which you may use to help clarify +which client options are compatible with which client constructors. + +If you are using this package with the `search.elasticsearch.provider` set to +`aws`, and you are making use of the `newClient` method in particular, you may +wish to start using the `@opensearch-project/opensearch` client in your custom +code. diff --git a/docs/features/search/search-engines.md b/docs/features/search/search-engines.md index 9bb8b8c343..a5ff780c8a 100644 --- a/docs/features/search/search-engines.md +++ b/docs/features/search/search-engines.md @@ -80,15 +80,16 @@ const searchEngine = await ElasticSearchSearchEngine.initialize({ const indexBuilder = new IndexBuilder({ logger: env.logger, searchEngine }); ``` -For the engine to be available, your backend package needs a dependency into +For the engine to be available, your backend package needs a dependency on package `@backstage/plugin-search-backend-module-elasticsearch`. ElasticSearch needs some additional configuration before it is ready to use within your instance. The configuration options are documented in the [configuration schema definition file.](https://github.com/backstage/backstage/blob/master/plugins/search-backend-module-elasticsearch/config.d.ts) -The underlying functionality is using official ElasticSearch client version 7.x, -meaning that ElasticSearch version 7 is the only one confirmed to be supported. +The underlying functionality uses either the official ElasticSearch client +version 7.x (meaning that ElasticSearch version 7 is the only one confirmed to +be supported), or the OpenSearch client, when the `aws` provider is configured. Should you need to create your own bespoke search experiences that require more than just a query translator (such as faceted search or Relay pagination), you @@ -97,9 +98,19 @@ search clients. The version of the client need not be the same as one used internally by the elastic search engine plugin. For example: ```typescript -import { Client } from '@elastic/elastic-search'; +import { isOpenSearchCompatible } from '@backstage/plugin-search-backend-module-elasticsearch'; +import { Client as ElasticClient } from '@elastic/elastic-search'; +import { Client as OpenSearchClient } from '@opensearch-project/opensearch'; -const client = searchEngine.newClient(options => new Client(options)); +const client = searchEngine.newClient(options => { + // In reality, you would only import / instantiate one of the following, but + // for illustrative purposes, here are both: + if (isOpenSearchCompatible(options)) { + return new OpenSearchClient(options); + } else { + return new ElasticClient(options); + } +}); ``` #### Set custom index template From 7a90b62aad3eb4fd65b560c67ba7f46ef23a489c Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Thu, 16 Jun 2022 12:51:53 +0200 Subject: [PATCH 074/212] Test the new client wrapper. Signed-off-by: Eric Peterson --- .../package.json | 3 +- .../ElasticSearchClientWrapper.test.ts | 337 ++++++++++++++++++ .../src/engines/ElasticSearchSearchEngine.ts | 2 +- yarn.lock | 9 + 4 files changed, 349 insertions(+), 2 deletions(-) create mode 100644 plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.test.ts diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 72a74d3ec8..0bfc0902de 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -38,7 +38,8 @@ "devDependencies": { "@backstage/backend-common": "^0.14.1-next.0", "@backstage/cli": "^0.17.3-next.0", - "@elastic/elasticsearch-mock": "^1.0.0" + "@elastic/elasticsearch-mock": "^1.0.0", + "@short.io/opensearch-mock": "^0.3.1" }, "files": [ "dist", diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.test.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.test.ts new file mode 100644 index 0000000000..5bd8bb30b0 --- /dev/null +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.test.ts @@ -0,0 +1,337 @@ +/* + * 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 { ConfigReader } from '@backstage/config'; +import { Client as ElasticSearchClient } from '@elastic/elasticsearch'; +import { Client as OpenSearchClient } from '@opensearch-project/opensearch'; +import Mock from '@short.io/opensearch-mock'; +import { Readable } from 'stream'; + +import { ElasticSearchClientWrapper } from './ElasticSearchClientWrapper'; +import { + createElasticSearchClientOptions, + ElasticSearchClientOptions, +} from './ElasticSearchSearchEngine'; + +jest.mock('@elastic/elasticsearch', () => ({ + ...jest.requireActual('@elastic/elasticsearch'), + Client: jest.fn().mockReturnValue({ + search: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + cat: { + aliases: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + }, + helpers: { + bulk: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + }, + indices: { + create: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + delete: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + exists: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + putIndexTemplate: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + updateAliases: jest + .fn() + .mockImplementation(async args => ({ client: 'es', args })), + }, + }), +})); + +jest.mock('@opensearch-project/opensearch', () => ({ + ...jest.requireActual('@opensearch-project/opensearch'), + Client: jest.fn().mockReturnValue({ + search: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + cat: { + aliases: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + }, + helpers: { + bulk: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + }, + indices: { + create: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + delete: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + exists: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + putIndexTemplate: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + updateAliases: jest + .fn() + .mockImplementation(async args => ({ client: 'os', args })), + }, + }), +})); + +describe('ElasticSearchClientWrapper', () => { + describe('elasticSearchClient', () => { + let esOptions: ElasticSearchClientOptions; + + beforeEach(async () => { + esOptions = await createElasticSearchClientOptions( + new ConfigReader({ + node: 'http://localhost:9200', + }), + ); + jest.clearAllMocks(); + }); + + it('instantiation', () => { + ElasticSearchClientWrapper.fromClientOptions(esOptions); + expect(ElasticSearchClient).toHaveBeenCalledWith(esOptions); + }); + + it('search', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const searchInput = { index: 'xyz', body: { eg: 'etc' } }; + const result = (await wrapper.search(searchInput)) as any; + + // Should call the ElasticSearch client's search with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(searchInput); + }); + + it('bulk', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const bulkInput = { + datasource: Readable.from([{}]), + onDocument() { + return { index: { _index: 'xyz' } }; + }, + refreshCompletion: 'xyz', + }; + const result = (await wrapper.bulk(bulkInput)) as any; + + // Should call the ElasticSearch client's bulk helper with expected input + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(bulkInput); + }); + + it('putIndexTemplate', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const indexTemplate = { name: 'xyz', body: { index_patterns: ['*'] } }; + const result = (await wrapper.putIndexTemplate(indexTemplate)) as any; + + // Should call the ElasticSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(indexTemplate); + }); + + it('indexExists', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.indexExists(input)) as any; + + // Should call the ElasticSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(input); + }); + + it('deleteIndex', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.deleteIndex(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(input); + }); + + it('createIndex', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.createIndex(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual(input); + }); + + it('getAliases', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const input = { aliases: ['xyz'] }; + const result = (await wrapper.getAliases(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual({ + format: 'json', + name: input.aliases, + }); + }); + + it('updateAliases', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(esOptions); + + const input = { actions: [{ remove: { index: 'xyz', alias: 'abc' } }] }; + const result = (await wrapper.updateAliases(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('es'); + expect(result.args).toStrictEqual({ + body: { actions: input.actions }, + }); + }); + }); + + describe('openSearchClient', () => { + const mock = new Mock(); + let osOptions: ElasticSearchClientOptions; + + beforeEach(() => { + osOptions = { + provider: 'aws', + node: 'https://my-es-cluster.eu-west-1.es.amazonaws.com', + connection: mock.getConnection(), + }; + + jest.clearAllMocks(); + }); + + it('instantiation', () => { + ElasticSearchClientWrapper.fromClientOptions(osOptions); + expect(OpenSearchClient).toHaveBeenCalledWith(osOptions); + }); + + it('search', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const searchInput = { index: 'xyz', body: { eg: 'etc' } }; + const result = (await wrapper.search(searchInput)) as any; + + // Should call the OpenSearch client's search with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(searchInput); + }); + + it('bulk', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const bulkInput = { + datasource: Readable.from([{}]), + onDocument() { + return { index: { _index: 'xyz' } }; + }, + refreshCompletion: 'xyz', + }; + const result = (await wrapper.bulk(bulkInput)) as any; + + // Should call the OpenSearch client's bulk helper with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(bulkInput); + }); + + it('putIndexTemplate', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const indexTemplate = { name: 'xyz', body: { index_patterns: ['*'] } }; + const result = (await wrapper.putIndexTemplate(indexTemplate)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(indexTemplate); + }); + + it('indexExists', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.indexExists(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(input); + }); + + it('deleteIndex', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.deleteIndex(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(input); + }); + + it('createIndex', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const input = { index: 'xyz' }; + const result = (await wrapper.createIndex(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual(input); + }); + + it('getAliases', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const input = { aliases: ['xyz'] }; + const result = (await wrapper.getAliases(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual({ + format: 'json', + name: input.aliases, + }); + }); + + it('updateAliases', async () => { + const wrapper = ElasticSearchClientWrapper.fromClientOptions(osOptions); + + const input = { actions: [{ remove: { index: 'xyz', alias: 'abc' } }] }; + const result = (await wrapper.updateAliases(input)) as any; + + // Should call the OpenSearch client with expected input. + expect(result.client).toBe('os'); + expect(result.args).toStrictEqual({ + body: { actions: input.actions }, + }); + }); + }); +}); diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts index 62c72ccd09..4fa0d4e110 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchSearchEngine.ts @@ -366,7 +366,7 @@ export function encodePageCursor({ page }: { page: number }): string { return Buffer.from(`${page}`, 'utf-8').toString('base64'); } -async function createElasticSearchClientOptions( +export async function createElasticSearchClientOptions( config?: Config, ): Promise { if (!config) { diff --git a/yarn.lock b/yarn.lock index b7495a0891..3b8ba69288 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5423,6 +5423,15 @@ dependencies: any-observable "^0.3.0" +"@short.io/opensearch-mock@^0.3.1": + version "0.3.1" + resolved "https://registry.npmjs.org/@short.io/opensearch-mock/-/opensearch-mock-0.3.1.tgz#41678404b94342ac60263a8df590f9b1efa80622" + integrity sha512-gwLTzxJrZNGVQNn+FHLhpw7at3jHb6tNczq2hvFPJ3C3nLaCBRkbP2IQHrIDzklLBVFV83Ug0Xgs73A5o9eLtg== + dependencies: + fast-deep-equal "^3.1.3" + find-my-way "^4.3.3" + into-stream "^6.0.0" + "@sideway/address@^4.1.0": version "4.1.1" resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.1.tgz#9e321e74310963fdf8eebfbee09c7bd69972de4d" From 69c6e4751e9146f09c576c2cffc401e2d5eb0379 Mon Sep 17 00:00:00 2001 From: df11 Date: Mon, 27 Jun 2022 14:32:09 +0200 Subject: [PATCH 075/212] Update links title Signed-off-by: denis.fortin --- .../src/components/EntityVaultTable/EntityVaultTable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx index 5e369ff6d0..85035c04d9 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx @@ -58,7 +58,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { view: ( @@ -67,7 +67,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { edit: ( From af3a08dba51ebb569ba858ff51c299f9b917aea4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:36:56 +0000 Subject: [PATCH 076/212] chore(deps): update JamesIves/github-pages-deploy-action action to v4.3.4 Signed-off-by: Renovate Bot --- .github/workflows/deploy_microsite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_microsite.yml b/.github/workflows/deploy_microsite.yml index d0f8dc1e79..ffada71523 100644 --- a/.github/workflows/deploy_microsite.yml +++ b/.github/workflows/deploy_microsite.yml @@ -55,7 +55,7 @@ jobs: run: ls microsite/build/backstage && ls microsite/build/backstage/storybook - name: Deploy both microsite and storybook to gh-pages - uses: JamesIves/github-pages-deploy-action@v4.3.3 + uses: JamesIves/github-pages-deploy-action@v4.3.4 with: branch: gh-pages folder: microsite/build/backstage From eded24fc8c2bb1a65dd849740427ea22925b2dac Mon Sep 17 00:00:00 2001 From: asaini1 Date: Mon, 27 Jun 2022 14:01:53 +0100 Subject: [PATCH 077/212] Remove duplicate license Signed-off-by: asaini1 --- .../builtin/publish/gitlabMergeRequest.test.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts index 7fe01921d1..987e360617 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/gitlabMergeRequest.test.ts @@ -13,21 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -// * 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 { getRootLogger } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { ScmIntegrations } from '@backstage/integration'; From 0a432a3ffea9a95f1d4a082e98dfd58f64e4b94c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:36:15 +0000 Subject: [PATCH 078/212] chore(deps): update dependency canvas to v2.9.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 345aa3d510..a187c10bf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9245,9 +9245,9 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001286: integrity sha512-5v7LFQU4Sb/qvkz7JcZkvtSH1Ko+1x2kgo3ocdBeMGZSOFpuE1kkm0kpTwLtWeFrw5qw08ulLxJjVIXIS8MkiQ== canvas@^2.6.1: - version "2.9.1" - resolved "https://registry.npmjs.org/canvas/-/canvas-2.9.1.tgz#58ec841cba36cef0675bc7a74ebd1561f0b476b0" - integrity sha512-vSQti1uG/2gjv3x6QLOZw7TctfufaerTWbVe+NSduHxxLGB+qf3kFgQ6n66DSnuoINtVUjrLLIK2R+lxrBG07A== + version "2.9.3" + resolved "https://registry.npmjs.org/canvas/-/canvas-2.9.3.tgz#8723c4f970442d4cdcedba5221579f9660a58bdb" + integrity sha512-WOUM7ghii5TV2rbhaZkh1youv/vW1/Canev6Yx6BG2W+1S07w8jKZqKkPnbiPpQEDsnJdN8ouDd7OvQEGXDcUw== dependencies: "@mapbox/node-pre-gyp" "^1.0.0" nan "^2.15.0" From 801d606909605fb0fd3f85854435992e481321ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 27 Jun 2022 15:58:39 +0200 Subject: [PATCH 079/212] improve auth token parsing in the scaffolder backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/forty-seals-complain.md | 5 +++ .../scaffolder-backend/src/service/router.ts | 42 ++++++++++++++----- 2 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 .changeset/forty-seals-complain.md diff --git a/.changeset/forty-seals-complain.md b/.changeset/forty-seals-complain.md new file mode 100644 index 0000000000..b2435b2d3a --- /dev/null +++ b/.changeset/forty-seals-complain.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +Improve error messaging when passing in malformed auth diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 4919d2e5f9..2abb730250 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -23,13 +23,14 @@ import { } from '@backstage/catalog-model'; import { Entity } from '@backstage/catalog-model'; import { Config, JsonObject } from '@backstage/config'; -import { InputError, NotFoundError } from '@backstage/errors'; +import { InputError, NotFoundError, stringifyError } from '@backstage/errors'; import { ScmIntegrations } from '@backstage/integration'; import { TemplateEntityV1beta3, TaskSpec, templateEntityV1beta3Validator, } from '@backstage/plugin-scaffolder-common'; +import { JsonValue } from '@backstage/types'; import express from 'express'; import Router from 'express-promise-router'; import { validate } from 'jsonschema'; @@ -431,17 +432,36 @@ function parseBearerToken(header?: string): { token?: string; entityRef?: string; } { - const token = header?.match(/Bearer\s+(\S+)/i)?.[1]; + if (!header) { + return {}; + } - if (!token) return {}; + try { + const token = header.match(/^Bearer\s(\S+\.\S+\.\S+)$/i)?.[1]; + if (!token) { + throw new TypeError('Expected Bearer with JWT'); + } - const [_header, rawPayload, _signature] = token.split('.'); - const payload: { sub: string } = JSON.parse( - Buffer.from(rawPayload, 'base64').toString(), - ); + const [_header, rawPayload, _signature] = token.split('.'); + const payload: JsonValue = JSON.parse( + Buffer.from(rawPayload, 'base64').toString(), + ); - return { - entityRef: payload.sub, - token, - }; + if ( + typeof payload !== 'object' || + payload === null || + Array.isArray(payload) + ) { + throw new TypeError('Malformed JWT payload'); + } + + const sub = payload.sub; + if (typeof sub !== 'string') { + throw new TypeError('Expected string sub claim'); + } + + return { entityRef: sub, token }; + } catch (e) { + throw new InputError(`Invalid authorization header: ${stringifyError(e)}`); + } } From 9c4e5cdee9d343e6f660a86d6978a29362e10fd6 Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Thu, 23 Jun 2022 13:08:05 -0500 Subject: [PATCH 080/212] Allow specifying JWT token key algorithm Signed-off-by: Fabio Torchetti --- plugins/auth-backend/src/service/router.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 50577ece53..ecd7f725a6 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -44,6 +44,7 @@ export interface RouterOptions { config: Config; discovery: PluginEndpointDiscovery; tokenManager: TokenManager; + tokenKeyAlgorithm?: string; providerFactories?: ProviderFactories; } @@ -56,6 +57,7 @@ export async function createRouter( discovery, database, tokenManager, + tokenKeyAlgorithm, providerFactories, } = options; const router = Router(); @@ -71,6 +73,7 @@ export async function createRouter( keyStore, keyDurationSeconds, logger: logger.child({ component: 'token-factory' }), + algorithm: tokenKeyAlgorithm, }); const catalogApi = new CatalogClient({ discoveryApi: discovery }); From b1c7792e6a2c268edf2770895329c7d056e3642c Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Thu, 23 Jun 2022 13:14:46 -0500 Subject: [PATCH 081/212] Add documentation for new option Signed-off-by: Fabio Torchetti --- plugins/auth-backend/src/service/router.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index ecd7f725a6..2f78f68d7d 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -44,6 +44,14 @@ export interface RouterOptions { config: Config; discovery: PluginEndpointDiscovery; tokenManager: TokenManager; + /** + * The algorithm to be used when signing the JWT token. + * + * @defaultValue `ES256` + * + * @remarks + * This is passed to {@link TokenFactory| the token factory}. + */ tokenKeyAlgorithm?: string; providerFactories?: ProviderFactories; } From c7358cdbc5f1fffd862ef966088a06144a2e5792 Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Thu, 23 Jun 2022 14:29:18 -0500 Subject: [PATCH 082/212] Remove docs for the moment Signed-off-by: Fabio Torchetti --- plugins/auth-backend/api-report.md | 2 ++ plugins/auth-backend/src/service/router.ts | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 9e567cc6ab..96ca640479 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -650,6 +650,8 @@ export interface RouterOptions { // (undocumented) providerFactories?: ProviderFactories; // (undocumented) + tokenKeyAlgorithm?: string; + // (undocumented) tokenManager: TokenManager; } diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 2f78f68d7d..ecd7f725a6 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -44,14 +44,6 @@ export interface RouterOptions { config: Config; discovery: PluginEndpointDiscovery; tokenManager: TokenManager; - /** - * The algorithm to be used when signing the JWT token. - * - * @defaultValue `ES256` - * - * @remarks - * This is passed to {@link TokenFactory| the token factory}. - */ tokenKeyAlgorithm?: string; providerFactories?: ProviderFactories; } From f2cf79d62e2ddda2a981780973c330e4ade68eef Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Thu, 23 Jun 2022 14:34:26 -0500 Subject: [PATCH 083/212] Added changeset Signed-off-by: Fabio Torchetti --- .changeset/plenty-clouds-guess.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/plenty-clouds-guess.md diff --git a/.changeset/plenty-clouds-guess.md b/.changeset/plenty-clouds-guess.md new file mode 100644 index 0000000000..9ef7d00463 --- /dev/null +++ b/.changeset/plenty-clouds-guess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Added an option for the auth backend router to select the algorithm for the JWT token signing keys From 61edb857042f9006404baf2616632a2e2116030d Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Mon, 27 Jun 2022 10:07:59 -0500 Subject: [PATCH 084/212] Naming chnage; fix release size Signed-off-by: Fabio Torchetti --- .changeset/plenty-clouds-guess.md | 2 +- plugins/auth-backend/src/service/router.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.changeset/plenty-clouds-guess.md b/.changeset/plenty-clouds-guess.md index 9ef7d00463..cc56bd604d 100644 --- a/.changeset/plenty-clouds-guess.md +++ b/.changeset/plenty-clouds-guess.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend': minor +'@backstage/plugin-auth-backend': patch --- Added an option for the auth backend router to select the algorithm for the JWT token signing keys diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index ecd7f725a6..2232eeaa81 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -44,7 +44,7 @@ export interface RouterOptions { config: Config; discovery: PluginEndpointDiscovery; tokenManager: TokenManager; - tokenKeyAlgorithm?: string; + tokenFactoryAlgorithm?: string; providerFactories?: ProviderFactories; } @@ -57,7 +57,7 @@ export async function createRouter( discovery, database, tokenManager, - tokenKeyAlgorithm, + tokenFactoryAlgorithm, providerFactories, } = options; const router = Router(); @@ -73,7 +73,7 @@ export async function createRouter( keyStore, keyDurationSeconds, logger: logger.child({ component: 'token-factory' }), - algorithm: tokenKeyAlgorithm, + algorithm: tokenFactoryAlgorithm, }); const catalogApi = new CatalogClient({ discoveryApi: discovery }); From 2a50ed04e0c0bf134e95fa3481dc182b5c788fe0 Mon Sep 17 00:00:00 2001 From: Fabio Torchetti Date: Mon, 27 Jun 2022 10:42:05 -0500 Subject: [PATCH 085/212] Rebuild docs for api-report.md Signed-off-by: Fabio Torchetti --- plugins/auth-backend/api-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 96ca640479..d216545bd4 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -650,7 +650,7 @@ export interface RouterOptions { // (undocumented) providerFactories?: ProviderFactories; // (undocumented) - tokenKeyAlgorithm?: string; + tokenFactoryAlgorithm?: string; // (undocumented) tokenManager: TokenManager; } From dbb507eb02e9cd9a2b26cf8e297771e67ecf032a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 18:25:04 +0000 Subject: [PATCH 086/212] chore(deps): update dependency lint-staged to v13.0.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b038eb72df..4782e2562d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17158,9 +17158,9 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^13.0.0: - version "13.0.2" - resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.2.tgz#35a1c57130e9ad5b1dea784972a40777ba433dd5" - integrity sha512-qQLfLTh9z34eMzfEHENC+QBskZfxjomrf+snF3xJ4BzilORbD989NLqQ00ughsF/A+PT41e87+WsMFabf9++pQ== + version "13.0.3" + resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz#d7cdf03a3830b327a2b63c6aec953d71d9dc48c6" + integrity sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug== dependencies: cli-truncate "^3.1.0" colorette "^2.0.17" From 7bf1cebe998ac35f7130937eb973d760ca1db94d Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Tue, 28 Jun 2022 20:58:50 +1200 Subject: [PATCH 087/212] adding VFNZ usage details for backstage Signed-off-by: Ankit Gupta --- ADOPTERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index 0e2ab7da06..b72da367b1 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -185,3 +185,4 @@ _If you're using Backstage in your organization, please try to add your company | [Clarivate](https://www.clarivate.com) | [Gabriele Carteni](mailto:gabriele.carteni@clarivate.com) | We are building our Developer Portal using Backstage to have a better control over our software ecosystem, integrate SDLC tools and promote best practices | | [Cho Tot](https://www.chotot.com) | [Chotot Team](mailto:sre@chotot.vn) | Internal developer portal, service catalog with CI/CD tools. | | [William Hill](https://www.williamhillgroup.com/) | [Pat Mills](mailto:pat.mills@williamhill.com), [Nathan Flynn](mailto:nflynn@williamhill.co.uk), and [Nishkarsh Raj](mailto:nishkarsh.raj@williamhill.co.uk) | William Hill are leveraging Backstage to build our Engineering Portal. Our mission is to centralize the software catalog inventory to enable service discoverability, reduce the onboarding time for new Engineers, provide a single pane of glass to accelerate Developer Productivity and Save Engineers time. Our aspiration is to create an InnerSource community focussed on organization-wide patterns that are re-usable and can be self-served with the Scaffolder. | +| [Vodafone NewZealand Limited](https://vodafone.co.nz) | [Ankit Gupta](mailto:ankit.gupta@vodafone.nz), [DevOps COE](mailto:devopstooling@vodafone.nz) | Vodafone NZ are leveraging Backstage to build centralised and self service Engineering Portal. Our mission is to standardised Pipeline templates across the Engineering teams, One shop stop to create the pipelines and repository with a template approach which reduces creation part from days to minutes and no wait time for developers. A unified view for Azure DevOps pipeline, Azure Repo pull requests, Deployment status from Azure RedHat Openshift-ArgoCD and SonarQube Security and code quality scans report on a single pan to provide a streamlined view for all microservices across the app stack. | From b5170119fcc0d40f2e1089e522b9062f120e2a56 Mon Sep 17 00:00:00 2001 From: "denis.fortin" Date: Tue, 28 Jun 2022 11:04:41 +0200 Subject: [PATCH 088/212] fix(vault-plugin): code factorization Signed-off-by: denis.fortin --- .changeset/moody-crabs-march.md | 4 ++-- .../EntityVaultTable/EntityVaultTable.tsx | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.changeset/moody-crabs-march.md b/.changeset/moody-crabs-march.md index 3d7bc2d290..f3ae24629a 100644 --- a/.changeset/moody-crabs-march.md +++ b/.changeset/moody-crabs-march.md @@ -1,6 +1,6 @@ --- -'@backstage/plugin-vault': minor -'@backstage/plugin-vault-backend': minor +'@backstage/plugin-vault': patch +'@backstage/plugin-vault-backend': patch --- Added a path notion in addition to secret name to allow to differentiate secrets in subpaths diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx index 85035c04d9..5923a4db6b 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx @@ -32,6 +32,13 @@ export const vaultSecretPath = (entity: Entity) => { return { secretPath }; }; +function getSecretRelativeName( + secretPath: string, + secret: VaultSecret, +): string { + return `${secret.path.replace(`${secretPath}/`, '')}/${secret.name}`; +} + export const EntityVaultTable = ({ entity }: { entity: Entity }) => { const vaultApi = useApi(vaultApiRef); const { secretPath } = vaultSecretPath(entity); @@ -54,11 +61,11 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { const data = (value || []).map(secret => { return { - secret: `${secret.path.replace(secretPath + "/", "")}/${secret.name}`, + secret: getSecretRelativeName(secretPath, secret), view: ( @@ -67,7 +74,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { edit: ( From 3a266e67448baaed7beb7741c762ad791be8ad53 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 28 Jun 2022 11:14:47 +0200 Subject: [PATCH 089/212] chore: fixing the test Signed-off-by: blam --- .../HeaderWorldClock/HeaderWorldClock.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx index 3611f47787..97a35aad60 100644 --- a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx +++ b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx @@ -89,6 +89,8 @@ describe('HeaderWorldClock with invalid Time Zone', () => { describe('HeaderWorldClock with custom Time Format', () => { it('uses 24hr clock from custom Time Format', async () => { + jest.useFakeTimers().setSystemTime(new Date('2022-06-28T09:10:13.502Z')); + const clockConfigs: ClockConfig[] = [ { label: 'UTC', @@ -111,7 +113,7 @@ describe('HeaderWorldClock with custom Time Format', () => { , ); - const currentTime = `${new Date().getHours()}:${new Date().getMinutes()}`; + const currentTime = `09:10`; expect(rendered.getByText(currentTime)).toBeInTheDocument(); }); }); From 18bc7fb24e27a317ae41fecd0e873f8eaa1af27f Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 28 Jun 2022 11:17:49 +0200 Subject: [PATCH 090/212] chore: remove the needless var i Signed-off-by: blam --- .../HeaderWorldClock/HeaderWorldClock.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx index 97a35aad60..db92fbb89f 100644 --- a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx +++ b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx @@ -113,7 +113,6 @@ describe('HeaderWorldClock with custom Time Format', () => { , ); - const currentTime = `09:10`; - expect(rendered.getByText(currentTime)).toBeInTheDocument(); + expect(rendered.getByText('09:10')).toBeInTheDocument(); }); }); From c92deffe399a07cb369109b9250550f6e5f0f6d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jun 2022 09:27:36 +0000 Subject: [PATCH 091/212] Version Packages (next) --- .changeset/create-app-1656408352.md | 5 + .changeset/pre.json | 31 +- docs/releases/v1.4.0-next.1-changelog.md | 1474 +++++++++++++++++ package.json | 2 +- packages/app-defaults/CHANGELOG.md | 9 + packages/app-defaults/package.json | 12 +- packages/app/CHANGELOG.md | 57 + packages/app/package.json | 106 +- packages/backend-common/CHANGELOG.md | 10 + packages/backend-common/package.json | 12 +- packages/backend-tasks/CHANGELOG.md | 8 + packages/backend-tasks/package.json | 10 +- packages/backend-test-utils/CHANGELOG.md | 8 + packages/backend-test-utils/package.json | 8 +- packages/backend/CHANGELOG.md | 34 + packages/backend/package.json | 58 +- packages/catalog-client/CHANGELOG.md | 8 + packages/catalog-client/package.json | 8 +- packages/catalog-model/CHANGELOG.md | 8 + packages/catalog-model/package.json | 6 +- packages/cli/CHANGELOG.md | 28 + packages/cli/package.json | 16 +- packages/config-loader/CHANGELOG.md | 7 + packages/config-loader/package.json | 4 +- packages/core-app-api/package.json | 4 +- packages/core-components/CHANGELOG.md | 10 + packages/core-components/package.json | 10 +- packages/core-plugin-api/package.json | 4 +- packages/create-app/CHANGELOG.md | 6 + packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 13 + packages/dev-utils/package.json | 18 +- packages/e2e-test/package.json | 2 +- packages/errors/CHANGELOG.md | 8 + packages/errors/package.json | 4 +- packages/integration-react/CHANGELOG.md | 9 + packages/integration-react/package.json | 14 +- packages/integration/CHANGELOG.md | 7 + packages/integration/package.json | 10 +- .../techdocs-cli-embedded-app/CHANGELOG.md | 15 + .../techdocs-cli-embedded-app/package.json | 22 +- packages/techdocs-cli/CHANGELOG.md | 10 + packages/techdocs-cli/package.json | 10 +- packages/test-utils/CHANGELOG.md | 9 + packages/test-utils/package.json | 10 +- packages/theme/CHANGELOG.md | 6 + packages/theme/package.json | 4 +- packages/types/package.json | 2 +- packages/version-bridge/package.json | 2 +- plugins/adr-backend/CHANGELOG.md | 13 + plugins/adr-backend/package.json | 18 +- plugins/adr-common/CHANGELOG.md | 9 + plugins/adr-common/package.json | 10 +- plugins/adr/CHANGELOG.md | 13 + plugins/adr/package.json | 22 +- plugins/airbrake-backend/package.json | 4 +- plugins/airbrake/CHANGELOG.md | 12 + plugins/airbrake/package.json | 22 +- plugins/allure/CHANGELOG.md | 10 + plugins/allure/package.json | 16 +- plugins/analytics-module-ga/CHANGELOG.md | 8 + plugins/analytics-module-ga/package.json | 12 +- plugins/apache-airflow/CHANGELOG.md | 11 + plugins/apache-airflow/package.json | 10 +- .../package.json | 2 +- plugins/api-docs/CHANGELOG.md | 11 + plugins/api-docs/package.json | 18 +- plugins/app-backend/CHANGELOG.md | 8 + plugins/app-backend/package.json | 10 +- plugins/auth-backend/CHANGELOG.md | 22 + plugins/auth-backend/package.json | 16 +- plugins/auth-node/CHANGELOG.md | 8 + plugins/auth-node/package.json | 8 +- plugins/azure-devops-backend/package.json | 4 +- plugins/azure-devops-common/package.json | 2 +- plugins/azure-devops/CHANGELOG.md | 11 + plugins/azure-devops/package.json | 18 +- plugins/badges-backend/CHANGELOG.md | 10 + plugins/badges-backend/package.json | 12 +- plugins/badges/CHANGELOG.md | 11 + plugins/badges/package.json | 18 +- plugins/bazaar-backend/package.json | 6 +- plugins/bazaar/CHANGELOG.md | 12 + plugins/bazaar/package.json | 18 +- plugins/bitbucket-cloud-common/package.json | 4 +- plugins/bitrise/CHANGELOG.md | 10 + plugins/bitrise/package.json | 16 +- .../catalog-backend-module-aws/CHANGELOG.md | 12 + .../catalog-backend-module-aws/package.json | 16 +- .../catalog-backend-module-azure/CHANGELOG.md | 12 + .../catalog-backend-module-azure/package.json | 18 +- .../package.json | 12 +- .../CHANGELOG.md | 11 + .../package.json | 16 +- .../CHANGELOG.md | 12 + .../package.json | 18 +- .../CHANGELOG.md | 12 + .../package.json | 18 +- .../CHANGELOG.md | 24 + .../package.json | 18 +- .../catalog-backend-module-ldap/CHANGELOG.md | 11 + .../catalog-backend-module-ldap/package.json | 12 +- .../package.json | 12 +- .../CHANGELOG.md | 17 + .../package.json | 14 +- plugins/catalog-backend/CHANGELOG.md | 16 + plugins/catalog-backend/package.json | 28 +- plugins/catalog-common/CHANGELOG.md | 8 + plugins/catalog-common/package.json | 8 +- plugins/catalog-graph/CHANGELOG.md | 11 + plugins/catalog-graph/package.json | 20 +- plugins/catalog-graphql/package.json | 6 +- plugins/catalog-import/CHANGELOG.md | 13 + plugins/catalog-import/package.json | 22 +- plugins/catalog-react/CHANGELOG.md | 15 + plugins/catalog-react/package.json | 26 +- plugins/catalog/CHANGELOG.md | 17 + plugins/catalog/package.json | 30 +- .../package.json | 4 +- plugins/circleci/CHANGELOG.md | 10 + plugins/circleci/package.json | 16 +- plugins/cloudbuild/CHANGELOG.md | 10 + plugins/cloudbuild/package.json | 16 +- plugins/code-climate/CHANGELOG.md | 10 + plugins/code-climate/package.json | 16 +- plugins/code-coverage-backend/CHANGELOG.md | 11 + plugins/code-coverage-backend/package.json | 14 +- plugins/code-coverage/CHANGELOG.md | 11 + plugins/code-coverage/package.json | 18 +- plugins/codescene/CHANGELOG.md | 9 + plugins/codescene/package.json | 14 +- plugins/config-schema/CHANGELOG.md | 9 + plugins/config-schema/package.json | 14 +- plugins/cost-insights/CHANGELOG.md | 9 + plugins/cost-insights/package.json | 14 +- plugins/dynatrace/CHANGELOG.md | 9 + plugins/dynatrace/package.json | 14 +- .../example-todo-list-backend/CHANGELOG.md | 9 + .../example-todo-list-backend/package.json | 10 +- plugins/example-todo-list-common/CHANGELOG.md | 7 + plugins/example-todo-list-common/package.json | 10 +- plugins/example-todo-list/CHANGELOG.md | 8 + plugins/example-todo-list/package.json | 12 +- plugins/explore-react/package.json | 6 +- plugins/explore/CHANGELOG.md | 10 + plugins/explore/package.json | 16 +- plugins/firehydrant/CHANGELOG.md | 9 + plugins/firehydrant/package.json | 14 +- plugins/fossa/CHANGELOG.md | 11 + plugins/fossa/package.json | 18 +- plugins/gcalendar/CHANGELOG.md | 9 + plugins/gcalendar/package.json | 14 +- plugins/gcp-projects/CHANGELOG.md | 8 + plugins/gcp-projects/package.json | 12 +- plugins/git-release-manager/CHANGELOG.md | 9 + plugins/git-release-manager/package.json | 14 +- plugins/github-actions/CHANGELOG.md | 11 + plugins/github-actions/package.json | 18 +- plugins/github-deployments/CHANGELOG.md | 13 + plugins/github-deployments/package.json | 22 +- .../github-pull-requests-board/CHANGELOG.md | 11 + .../github-pull-requests-board/package.json | 18 +- plugins/gitops-profiles/CHANGELOG.md | 8 + plugins/gitops-profiles/package.json | 12 +- plugins/gocd/CHANGELOG.md | 11 + plugins/gocd/package.json | 18 +- plugins/graphiql/CHANGELOG.md | 8 + plugins/graphiql/package.json | 12 +- plugins/graphql-backend/package.json | 4 +- plugins/home/CHANGELOG.md | 34 + plugins/home/package.json | 18 +- plugins/ilert/CHANGELOG.md | 11 + plugins/ilert/package.json | 18 +- plugins/jenkins-backend/CHANGELOG.md | 13 + plugins/jenkins-backend/package.json | 18 +- plugins/jenkins-common/CHANGELOG.md | 8 + plugins/jenkins-common/package.json | 8 +- plugins/jenkins/CHANGELOG.md | 12 + plugins/jenkins/package.json | 20 +- plugins/kafka-backend/CHANGELOG.md | 9 + plugins/kafka-backend/package.json | 10 +- plugins/kafka/CHANGELOG.md | 10 + plugins/kafka/package.json | 16 +- plugins/kubernetes-backend/CHANGELOG.md | 9 + plugins/kubernetes-backend/package.json | 10 +- plugins/kubernetes-common/package.json | 4 +- plugins/kubernetes/CHANGELOG.md | 10 + plugins/kubernetes/package.json | 16 +- plugins/lighthouse/CHANGELOG.md | 10 + plugins/lighthouse/package.json | 16 +- plugins/newrelic-dashboard/CHANGELOG.md | 10 + plugins/newrelic-dashboard/package.json | 14 +- plugins/newrelic/CHANGELOG.md | 8 + plugins/newrelic/package.json | 12 +- plugins/org/CHANGELOG.md | 11 + plugins/org/package.json | 18 +- plugins/pagerduty/CHANGELOG.md | 11 + plugins/pagerduty/package.json | 18 +- plugins/periskop-backend/package.json | 4 +- plugins/periskop/CHANGELOG.md | 11 + plugins/periskop/package.json | 18 +- plugins/permission-backend/CHANGELOG.md | 11 + plugins/permission-backend/package.json | 14 +- plugins/permission-common/CHANGELOG.md | 7 + plugins/permission-common/package.json | 6 +- plugins/permission-node/CHANGELOG.md | 10 + plugins/permission-node/package.json | 12 +- plugins/permission-react/CHANGELOG.md | 7 + plugins/permission-react/package.json | 8 +- plugins/proxy-backend/package.json | 4 +- plugins/rollbar-backend/package.json | 6 +- plugins/rollbar/CHANGELOG.md | 10 + plugins/rollbar/package.json | 16 +- .../CHANGELOG.md | 10 + .../package.json | 12 +- .../CHANGELOG.md | 10 + .../package.json | 12 +- plugins/scaffolder-backend/CHANGELOG.md | 13 + plugins/scaffolder-backend/package.json | 18 +- plugins/scaffolder-common/package.json | 4 +- plugins/scaffolder/CHANGELOG.md | 16 + plugins/scaffolder/package.json | 30 +- .../CHANGELOG.md | 31 + .../package.json | 10 +- plugins/search-backend-module-pg/CHANGELOG.md | 9 + plugins/search-backend-module-pg/package.json | 12 +- plugins/search-backend-node/CHANGELOG.md | 11 + plugins/search-backend-node/package.json | 16 +- plugins/search-backend/CHANGELOG.md | 13 + plugins/search-backend/package.json | 18 +- plugins/search-common/CHANGELOG.md | 7 + plugins/search-common/package.json | 6 +- plugins/search-react/CHANGELOG.md | 9 + plugins/search-react/package.json | 10 +- plugins/search/CHANGELOG.md | 23 + plugins/search/package.json | 22 +- plugins/sentry/CHANGELOG.md | 10 + plugins/sentry/package.json | 16 +- plugins/shortcuts/CHANGELOG.md | 8 + plugins/shortcuts/package.json | 12 +- plugins/sonarqube/CHANGELOG.md | 10 + plugins/sonarqube/package.json | 16 +- plugins/splunk-on-call/CHANGELOG.md | 10 + plugins/splunk-on-call/package.json | 16 +- plugins/stack-overflow-backend/CHANGELOG.md | 8 + plugins/stack-overflow-backend/package.json | 4 +- plugins/stack-overflow/CHANGELOG.md | 11 + plugins/stack-overflow/package.json | 16 +- .../CHANGELOG.md | 8 + .../package.json | 8 +- plugins/tech-insights-backend/CHANGELOG.md | 11 + plugins/tech-insights-backend/package.json | 16 +- plugins/tech-insights-common/package.json | 2 +- plugins/tech-insights-node/package.json | 4 +- plugins/tech-insights/CHANGELOG.md | 11 + plugins/tech-insights/package.json | 18 +- plugins/tech-radar/CHANGELOG.md | 8 + plugins/tech-radar/package.json | 12 +- .../techdocs-addons-test-utils/CHANGELOG.md | 13 + .../techdocs-addons-test-utils/package.json | 20 +- plugins/techdocs-backend/CHANGELOG.md | 20 + plugins/techdocs-backend/package.json | 26 +- .../CHANGELOG.md | 10 + .../package.json | 18 +- plugins/techdocs-node/CHANGELOG.md | 16 + plugins/techdocs-node/package.json | 14 +- plugins/techdocs-react/package.json | 8 +- plugins/techdocs/CHANGELOG.md | 16 + plugins/techdocs/package.json | 26 +- plugins/todo-backend/CHANGELOG.md | 11 + plugins/todo-backend/package.json | 14 +- plugins/todo/CHANGELOG.md | 11 + plugins/todo/package.json | 18 +- plugins/user-settings/CHANGELOG.md | 8 + plugins/user-settings/package.json | 12 +- plugins/vault-backend/CHANGELOG.md | 10 + plugins/vault-backend/package.json | 12 +- plugins/vault/CHANGELOG.md | 11 + plugins/vault/package.json | 18 +- plugins/xcmetrics/CHANGELOG.md | 9 + plugins/xcmetrics/package.json | 14 +- yarn.lock | 180 +- 282 files changed, 4153 insertions(+), 1115 deletions(-) create mode 100644 .changeset/create-app-1656408352.md create mode 100644 docs/releases/v1.4.0-next.1-changelog.md create mode 100644 plugins/catalog-backend-module-openapi/CHANGELOG.md diff --git a/.changeset/create-app-1656408352.md b/.changeset/create-app-1656408352.md new file mode 100644 index 0000000000..b50d431d4b --- /dev/null +++ b/.changeset/create-app-1656408352.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Bumped create-app version. diff --git a/.changeset/pre.json b/.changeset/pre.json index 6ea515cda8..2bba491efc 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -157,38 +157,67 @@ "@backstage/plugin-vault": "0.1.0", "@backstage/plugin-vault-backend": "0.1.0", "@backstage/plugin-xcmetrics": "0.2.26", - "@backstage/plugin-api-docs-module-protoc-gen-doc": "0.0.0" + "@backstage/plugin-api-docs-module-protoc-gen-doc": "0.0.0", + "@backstage/plugin-catalog-backend-module-openapi": "0.0.0" }, "changesets": [ "beige-horses-scream", "breezy-poems-grab", "breezy-seas-exist", + "bright-balloons-hide", + "calm-experts-buy", "chilled-mirrors-grab", + "create-app-1656408352", "curly-candles-battle", "curvy-weeks-matter", "eleven-mice-collect", + "forty-seals-complain", "great-roses-pump", + "green-actors-argue", + "happy-boxes-melt", "large-kangaroos-poke", + "lemon-goats-obey", + "metal-singers-matter", "modern-ducks-lay", "nasty-zoos-cross", "nervous-humans-sip", + "plenty-clouds-guess", "polite-eagles-invite", + "popular-pots-yell", + "pretty-masks-live", "purple-beans-march", + "quiet-pens-notice", "red-games-decide", + "renovate-4b5ff24", "renovate-9454dab", "rude-llamas-lie", + "search-lightning-cult", + "search-turtles-itch", + "serious-zebras-joke", "shaggy-melons-drive", + "sharp-numbers-taste", "sharp-planes-turn", + "shiny-turkeys-doubt", "short-olives-train", + "shy-cameras-develop", + "silent-coats-brake", + "silver-needles-unite", "smooth-sheep-hide", + "strange-tables-flash", "strange-trains-collect", + "strong-lies-explain", "sweet-plants-sparkle", "tame-guests-wave", + "techdocs-eyes-sit", "techdocs-gorgeous-plants-sniff", + "techdocs-sheep-talk", "techdocs-the-whole-pulse", "thick-radios-drive", + "twelve-candles-jump", + "two-crews-accept", "unlucky-stingrays-juggle", "weak-bananas-deliver", + "weak-llamas-repeat", "wet-dolphins-act", "wicked-icons-grin" ] diff --git a/docs/releases/v1.4.0-next.1-changelog.md b/docs/releases/v1.4.0-next.1-changelog.md new file mode 100644 index 0000000000..0780178d4d --- /dev/null +++ b/docs/releases/v1.4.0-next.1-changelog.md @@ -0,0 +1,1474 @@ +# Release v1.4.0-next.1 + +## @backstage/cli@0.18.0-next.1 + +### Minor Changes + +- 96a82d9791: **BREAKING**: Removed the following deprecated package commands: + + - `app:build` - Use `package build` instead + - `app:serve` - Use `package start` instead + - `backend:build` - Use `package build` instead + - `backend:bundle` - Use `package build` instead + - `backend:dev` - Use `package start` instead + - `plugin:build` - Use `package build` instead + - `plugin:serve` - Use `package start` instead + - `build` - Use `package build` instead + - `lint` - Use `package lint` instead + - `prepack` - Use `package prepack` instead + - `postpack` - Use `package postpack` instead + + In order to replace these you need to have [migrated to using package roles](https://backstage.io/docs/tutorials/package-role-migration). + +### Patch Changes + +- 86640214f0: Upgrade `@rollup/plugin-node-resolve` to `^13.0.6` +- e661242844: Updated dependency `run-script-webpack-plugin` to `^0.1.0`. +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/config-loader@1.1.3-next.0 + +## @backstage/errors@1.1.0-next.0 + +### Minor Changes + +- 6d61b44466: The `ResponseError.fromResponse` now accepts a more narrow response type, in order to avoid incompatibilities between different fetch implementations. + + The `response` property of `ResponseError` has also been narrowed to a new `ConsumedResponse` type that omits all the properties for consuming the body of the response. This is not considered a breaking change as it was always an error to try to consume the body of the response. + +## @backstage/plugin-apache-airflow@0.2.0-next.1 + +### Minor Changes + +- 01f976ea72: Exposed DagTableComponent as standalone component + added a prop to get only select DAGs instead of the full list + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + +## @backstage/plugin-auth-backend@0.15.0-next.1 + +### Minor Changes + +- 9d4040777e: **BREAKING**: Removed all directly exported auth provider factories, option types, and sign-in resolvers. For example: `AwsAlbProviderOptions`, `bitbucketUserIdSignInResolver`, `createGithubProvider`. These are all still accessible via the `providers` export. For example, use `providers.github.create()` rather than `createGithubProvider()`, and `providers.bitbucket.resolvers.userIdMatchingUserEntityAnnotation()` rather than `bitbucketUserIdSignInResolver`. + + **BREAKING**: Removed the exported `AuthProviderFactoryOptions` type as well as the deprecated option fields of the `AuthProviderFactory` callback. This includes the `tokenManager`, `tokenIssuer`, `discovery`, and `catalogApi` fields. Existing usage of these should be replaced with the new utilities in the `resolverContext` field. The deprecated `TokenIssuer` type is now also removed, since it is no longer used. + + **BREAKING**: Removed `getEntityClaims`, use `getDefaultOwnershipEntityRefs` instead. + + **DEPRECATION**: Deprecated `AtlassianAuthProvider` as it was unintentionally exported. + +### Patch Changes + +- f2cf79d62e: Added an option for the auth backend router to select the algorithm for the JWT token signing keys +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.0-next.0 + +### Minor Changes + +- 67503d159e: Add basic OpenAPI \\$ref support. + + For more information see [here](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend-module-openapi). + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-search-backend-module-elasticsearch@0.2.0-next.1 + +### Minor Changes + +- c5af773757: **BREAKING**: In order to remain interoperable with all currently supported + deployments of Elasticsearch, this package will now conditionally use either + the `@elastic/elasticsearch` or `@opensearch-project/opensearch` client when + communicating with your deployed cluster. + + If you do not rely on types exported from this package, or if you do not make + use of the `createElasticSearchClientOptions` or `newClient` methods on the + `ElasticSearchSearchEngine` class, then upgrading to this version should not + require any further action on your part. Everything will continue to work as it + always has. + + If you _do_ rely on either of the above methods or any underlying types, some + changes may be needed to your custom code. A type guard is now exported by this + package (`isOpenSearchCompatible(options)`), which you may use to help clarify + which client options are compatible with which client constructors. + + If you are using this package with the `search.elasticsearch.provider` set to + `aws`, and you are making use of the `newClient` method in particular, you may + wish to start using the `@opensearch-project/opensearch` client in your custom + code. + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-techdocs-backend@1.2.0-next.1 + +### Minor Changes + +- 860765ff45: Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory` + +### Patch Changes + +- 726577958f: Add sample headings on the documented component homepage. +- Updated dependencies + - @backstage/plugin-techdocs-node@1.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-techdocs-node@1.2.0-next.1 + +### Minor Changes + +- 860765ff45: Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory` + +### Patch Changes + +- a5d73da942: Fix the flag parsing for `legacyCopyReadmeMdToIndexMd` in `techdocs-cli generate` command, and decouple it's logic from the `techdocs-ref` flag. +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/app-defaults@1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + +## @backstage/backend-common@0.14.1-next.1 + +### Patch Changes + +- 0fc57887e8: Improve plural handling in logging output for secrets +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/config-loader@1.1.3-next.0 + +## @backstage/backend-tasks@0.3.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/backend-test-utils@0.1.26-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.18.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + +## @backstage/catalog-client@1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/catalog-model@1.1.0-next.1 + +### Patch Changes + +- f1dcc6f3c6: Added type predicates for all entity types, e.g. isUserEntity +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + +## @backstage/config-loader@1.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + +## @backstage/core-components@0.9.6-next.1 + +### Patch Changes + +- 3c440ea77e: Change BackstageIconLinkVertical style to use pallette instead of explicit color +- 7e115d42f9: Support displaying subtitle text in `SidebarSubmenuItem` +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + +## @backstage/create-app@0.4.29-next.1 + +### Patch Changes + +- Bumped create-app version. + +## @backstage/dev-utils@1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/integration@1.2.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + +## @backstage/integration-react@1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + +## @techdocs/cli@1.1.3-next.1 + +### Patch Changes + +- a5d73da942: Fix the flag parsing for `legacyCopyReadmeMdToIndexMd` in `techdocs-cli generate` command, and decouple it's logic from the `techdocs-ref` flag. +- Updated dependencies + - @backstage/plugin-techdocs-node@1.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + +## @backstage/test-utils@1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + +## @backstage/theme@0.2.16-next.0 + +### Patch Changes + +- 4c09c09102: Adds optional `htmlFontSize` property and also sets typography design tokens for h5 and h6 in base theme. + +## @backstage/plugin-adr@0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-adr-common@0.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + +## @backstage/plugin-adr-backend@0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-adr-common@0.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-adr-common@0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-airbrake@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/dev-utils@1.0.4-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-allure@0.1.23-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-analytics-module-ga@0.1.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-api-docs@0.8.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-app-backend@0.3.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/config-loader@1.1.3-next.0 + +## @backstage/plugin-auth-node@0.2.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/plugin-azure-devops@0.1.23-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-badges@0.2.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-badges-backend@0.1.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + +## @backstage/plugin-bazaar@0.1.22-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-bitrise@0.1.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-catalog@1.3.1-next.1 + +### Patch Changes + +- f1dcc6f3c6: Use entity type predicates from catalog-model +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + +## @backstage/plugin-catalog-backend@1.2.1-next.1 + +### Patch Changes + +- f1dcc6f3c6: Use entity type predicates from catalog-model +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-catalog-backend-module-aws@0.1.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-azure@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-github@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.5-next.1 + +### Patch Changes + +- 49ff472c0b: Add the possibility in the `GitlabDiscoveryEntityProvider` to scan the whole project instead of concrete groups. For that, use a configuration like this one, where the group parameter is omitted (not mandatory anymore): + + ```yaml + catalog: + providers: + gitlab: + yourProviderId: + host: gitlab-host # Identifies one of the hosts set up in the integrations + branch: main # Optional. Uses `master` as default + entityFilename: catalog-info.yaml # Optional. Defaults to `catalog-info.yaml` + ``` + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.1-next.1 + +### Patch Changes + +- fbfbff6bf7: Add possibility to resolve relations by RDN, in addition to UUID and DN +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + +## @backstage/plugin-catalog-common@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-catalog-graph@0.2.19-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-catalog-import@0.8.10-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-catalog-react@1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + +## @backstage/plugin-circleci@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-cloudbuild@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-code-climate@0.1.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-code-coverage@0.1.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-code-coverage-backend@0.1.32-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-codescene@0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-config-schema@0.1.30-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-cost-insights@0.11.29-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-dynatrace@0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-explore@0.3.38-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-firehydrant@0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-fossa@0.2.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-gcalendar@0.3.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-gcp-projects@0.3.26-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-git-release-manager@0.3.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-github-actions@0.5.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-github-deployments@0.1.38-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-github-pull-requests-board@0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-gitops-profiles@0.3.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-gocd@0.1.13-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-graphiql@0.2.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-home@0.4.23-next.1 + +### Patch Changes + +- a46e317a75: Added support for customizing the time format used in the `HeaderWorldClock` component + + Here's an example of how this can be used in the `HomePage.tsx` found in `\packages\app\src\components\home` to change the clock to be in the 24hr time format: + + ```diff + +const timeFormat: Intl.DateTimeFormatOptions = { + + hour: '2-digit', + + minute: '2-digit', + + hour12: false, + +}; + + export const homePage = ( + +
} pageTitleOverride="Home"> + + +
+ + + + + + ``` + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-stack-overflow@0.1.3-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-ilert@0.1.33-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-jenkins@0.7.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-jenkins-common@0.1.6-next.0 + +## @backstage/plugin-jenkins-backend@0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-jenkins-common@0.1.6-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + +## @backstage/plugin-jenkins-common@0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + +## @backstage/plugin-kafka@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-kafka-backend@0.2.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/plugin-kubernetes@0.6.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-kubernetes-backend@0.7.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/plugin-lighthouse@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-newrelic@0.3.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-newrelic-dashboard@0.1.15-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-org@0.5.7-next.1 + +### Patch Changes + +- 1e984b11fc: Render namespaces for teams with subtitles in `MyGroupsSidebarItem` +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-pagerduty@0.5.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-periskop@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-permission-backend@0.5.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + +## @backstage/plugin-permission-common@0.6.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + +## @backstage/plugin-permission-node@0.6.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + +## @backstage/plugin-permission-react@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + +## @backstage/plugin-rollbar@0.4.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-scaffolder@1.4.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-permission-react@0.4.3-next.0 + +## @backstage/plugin-scaffolder-backend@1.4.0-next.1 + +### Patch Changes + +- 801d606909: Improve error messaging when passing in malformed auth +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-search@0.9.1-next.1 + +### Patch Changes + +- 509c4092f0: To allow people to use a global search context in the search modal, the code for the search modal has been changed to only create a local search context if there is no parent context already defined. + + If you want to continue using a local context even if you define a global one, you will have to wrap the modal in a new local context manually: + + ```tsx + + + + ``` + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + +## @backstage/plugin-search-backend@0.5.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-search-backend-module-pg@0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-search-backend-node@0.6.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-search-common@0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + +## @backstage/plugin-search-react@0.2.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-sentry@0.3.45-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-shortcuts@0.2.8-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-sonarqube@0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-splunk-on-call@0.3.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-stack-overflow@0.1.3-next.1 + +### Patch Changes + +- 52b4f796e3: app-config is now picked up properly. +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/plugin-home@0.4.23-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-stack-overflow-backend@0.1.3-next.0 + +### Patch Changes + +- 52b4f796e3: app-config is now picked up properly. +- Updated dependencies + - @backstage/plugin-search-common@0.3.6-next.0 + +## @backstage/plugin-tech-insights@0.2.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-tech-insights-backend@0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/catalog-client@1.0.4-next.1 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + +## @backstage/plugin-tech-radar@0.5.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-techdocs@1.2.1-next.1 + +### Patch Changes + +- 726577958f: Remove the 60% factor from the font size calculation of headers to use the exact size defined in BackstageTheme. +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-search-react@0.2.2-next.1 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + +## @backstage/plugin-todo@0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-todo-backend@0.1.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + +## @backstage/plugin-user-settings@0.4.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @backstage/plugin-vault@0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + +## @backstage/plugin-vault-backend@0.2.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/backend-test-utils@0.1.26-next.1 + +## @backstage/plugin-xcmetrics@0.2.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + +## example-app@0.2.73-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/plugin-apache-airflow@0.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-search@0.9.1-next.1 + - @backstage/plugin-org@0.5.7-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/plugin-home@0.4.23-next.1 + - @backstage/plugin-stack-overflow@0.1.3-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-airbrake@0.3.7-next.1 + - @backstage/plugin-api-docs@0.8.7-next.1 + - @backstage/plugin-azure-devops@0.1.23-next.1 + - @backstage/plugin-badges@0.2.31-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-graph@0.2.19-next.1 + - @backstage/plugin-catalog-import@0.8.10-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-circleci@0.3.7-next.1 + - @backstage/plugin-cloudbuild@0.3.7-next.1 + - @backstage/plugin-code-coverage@0.1.34-next.1 + - @backstage/plugin-cost-insights@0.11.29-next.1 + - @backstage/plugin-dynatrace@0.1.1-next.1 + - @backstage/plugin-explore@0.3.38-next.1 + - @backstage/plugin-gcalendar@0.3.3-next.1 + - @backstage/plugin-gcp-projects@0.3.26-next.1 + - @backstage/plugin-github-actions@0.5.7-next.1 + - @backstage/plugin-gocd@0.1.13-next.1 + - @backstage/plugin-graphiql@0.2.39-next.1 + - @backstage/plugin-jenkins@0.7.6-next.1 + - @backstage/plugin-kafka@0.3.7-next.1 + - @backstage/plugin-kubernetes@0.6.7-next.1 + - @backstage/plugin-lighthouse@0.3.7-next.1 + - @backstage/plugin-newrelic@0.3.25-next.1 + - @backstage/plugin-newrelic-dashboard@0.1.15-next.1 + - @backstage/plugin-pagerduty@0.5.0-next.1 + - @backstage/plugin-permission-react@0.4.3-next.0 + - @backstage/plugin-rollbar@0.4.7-next.1 + - @backstage/plugin-scaffolder@1.4.0-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-sentry@0.3.45-next.1 + - @backstage/plugin-shortcuts@0.2.8-next.1 + - @backstage/plugin-tech-insights@0.2.3-next.1 + - @backstage/plugin-tech-radar@0.5.14-next.1 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.2-next.1 + - @backstage/plugin-todo@0.2.9-next.1 + - @backstage/plugin-user-settings@0.4.6-next.1 + - @backstage/plugin-search-react@0.2.2-next.1 + +## example-backend@0.2.73-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/plugin-auth-backend@0.15.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-search-backend-module-elasticsearch@0.2.0-next.1 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/plugin-techdocs-backend@1.2.0-next.1 + - example-app@0.2.73-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-app-backend@0.3.34-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-badges-backend@0.1.28-next.1 + - @backstage/plugin-code-coverage-backend@0.1.32-next.1 + - @backstage/plugin-jenkins-backend@0.1.24-next.1 + - @backstage/plugin-kafka-backend@0.2.27-next.1 + - @backstage/plugin-kubernetes-backend@0.7.0-next.1 + - @backstage/plugin-permission-backend@0.5.9-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.2-next.1 + - @backstage/plugin-search-backend@0.5.4-next.1 + - @backstage/plugin-search-backend-module-pg@0.3.5-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-tech-insights-backend@0.4.2-next.1 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.18-next.1 + - @backstage/plugin-todo-backend@0.1.31-next.1 + +## techdocs-cli-embedded-app@0.2.72-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + +## @internal/plugin-todo-list@1.0.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + +## @internal/plugin-todo-list-backend@1.0.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + +## @internal/plugin-todo-list-common@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 diff --git a/package.json b/package.json index 823db687d3..89a49c11fd 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@types/react": "^17", "@types/react-dom": "^17" }, - "version": "1.4.0-next.0", + "version": "1.4.0-next.1", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.17.11", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 929e53e248..3da536ef7f 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/app-defaults +## 1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + ## 1.0.4-next.0 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 92de05204d..82534354a0 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "1.0.4-next.0", + "version": "1.0.4-next.1", "private": false, "publishConfig": { "access": "public", @@ -33,11 +33,11 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-app-api": "^1.0.4-next.0", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-permission-react": "^0.4.2", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-permission-react": "^0.4.3-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "react-router-dom": "6.0.0-beta.0" @@ -46,8 +46,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@types/jest": "^26.0.7", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 119200eca6..a4cc7735dd 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,62 @@ # example-app +## 0.2.73-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/plugin-apache-airflow@0.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-search@0.9.1-next.1 + - @backstage/plugin-org@0.5.7-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/plugin-home@0.4.23-next.1 + - @backstage/plugin-stack-overflow@0.1.3-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-airbrake@0.3.7-next.1 + - @backstage/plugin-api-docs@0.8.7-next.1 + - @backstage/plugin-azure-devops@0.1.23-next.1 + - @backstage/plugin-badges@0.2.31-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-graph@0.2.19-next.1 + - @backstage/plugin-catalog-import@0.8.10-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-circleci@0.3.7-next.1 + - @backstage/plugin-cloudbuild@0.3.7-next.1 + - @backstage/plugin-code-coverage@0.1.34-next.1 + - @backstage/plugin-cost-insights@0.11.29-next.1 + - @backstage/plugin-dynatrace@0.1.1-next.1 + - @backstage/plugin-explore@0.3.38-next.1 + - @backstage/plugin-gcalendar@0.3.3-next.1 + - @backstage/plugin-gcp-projects@0.3.26-next.1 + - @backstage/plugin-github-actions@0.5.7-next.1 + - @backstage/plugin-gocd@0.1.13-next.1 + - @backstage/plugin-graphiql@0.2.39-next.1 + - @backstage/plugin-jenkins@0.7.6-next.1 + - @backstage/plugin-kafka@0.3.7-next.1 + - @backstage/plugin-kubernetes@0.6.7-next.1 + - @backstage/plugin-lighthouse@0.3.7-next.1 + - @backstage/plugin-newrelic@0.3.25-next.1 + - @backstage/plugin-newrelic-dashboard@0.1.15-next.1 + - @backstage/plugin-pagerduty@0.5.0-next.1 + - @backstage/plugin-permission-react@0.4.3-next.0 + - @backstage/plugin-rollbar@0.4.7-next.1 + - @backstage/plugin-scaffolder@1.4.0-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-sentry@0.3.45-next.1 + - @backstage/plugin-shortcuts@0.2.8-next.1 + - @backstage/plugin-tech-insights@0.2.3-next.1 + - @backstage/plugin-tech-radar@0.5.14-next.1 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.2-next.1 + - @backstage/plugin-todo@0.2.9-next.1 + - @backstage/plugin-user-settings@0.4.6-next.1 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 0.2.73-next.0 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 9c43f03f49..4ba50b13c7 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,67 +1,67 @@ { "name": "example-app", - "version": "0.2.73-next.0", + "version": "0.2.73-next.1", "private": true, "backstage": { "role": "frontend" }, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/app-defaults": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/cli": "^0.18.0-next.1", "@backstage/config": "^1.0.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-airbrake": "^0.3.7-next.0", - "@backstage/plugin-api-docs": "^0.8.7-next.0", - "@backstage/plugin-azure-devops": "^0.1.23-next.0", - "@backstage/plugin-apache-airflow": "^0.1.15-next.0", - "@backstage/plugin-badges": "^0.2.31-next.0", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-catalog-graph": "^0.2.19-next.0", - "@backstage/plugin-catalog-import": "^0.8.10-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-circleci": "^0.3.7-next.0", - "@backstage/plugin-cloudbuild": "^0.3.7-next.0", - "@backstage/plugin-code-coverage": "^0.1.34-next.0", - "@backstage/plugin-cost-insights": "^0.11.29-next.0", - "@backstage/plugin-dynatrace": "^0.1.1-next.0", - "@backstage/plugin-explore": "^0.3.38-next.0", - "@backstage/plugin-gcalendar": "^0.3.3-next.0", - "@backstage/plugin-gcp-projects": "^0.3.26-next.0", - "@backstage/plugin-github-actions": "^0.5.7-next.0", - "@backstage/plugin-gocd": "^0.1.13-next.0", - "@backstage/plugin-graphiql": "^0.2.39-next.0", - "@backstage/plugin-home": "^0.4.23-next.0", - "@backstage/plugin-jenkins": "^0.7.6-next.0", - "@backstage/plugin-kafka": "^0.3.7-next.0", - "@backstage/plugin-kubernetes": "^0.6.7-next.0", - "@backstage/plugin-lighthouse": "^0.3.7-next.0", - "@backstage/plugin-newrelic": "^0.3.25-next.0", - "@backstage/plugin-newrelic-dashboard": "^0.1.15-next.0", - "@backstage/plugin-org": "^0.5.7-next.0", - "@backstage/plugin-pagerduty": "0.5.0-next.0", - "@backstage/plugin-permission-react": "^0.4.2", - "@backstage/plugin-rollbar": "^0.4.7-next.0", - "@backstage/plugin-scaffolder": "^1.4.0-next.0", - "@backstage/plugin-search": "^0.9.1-next.0", - "@backstage/plugin-search-react": "^0.2.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-sentry": "^0.3.45-next.0", - "@backstage/plugin-shortcuts": "^0.2.8-next.0", - "@backstage/plugin-stack-overflow": "^0.1.3-next.0", - "@backstage/plugin-tech-radar": "^0.5.14-next.0", - "@backstage/plugin-techdocs": "^1.2.1-next.0", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-airbrake": "^0.3.7-next.1", + "@backstage/plugin-api-docs": "^0.8.7-next.1", + "@backstage/plugin-azure-devops": "^0.1.23-next.1", + "@backstage/plugin-apache-airflow": "^0.2.0-next.1", + "@backstage/plugin-badges": "^0.2.31-next.1", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-catalog-graph": "^0.2.19-next.1", + "@backstage/plugin-catalog-import": "^0.8.10-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-circleci": "^0.3.7-next.1", + "@backstage/plugin-cloudbuild": "^0.3.7-next.1", + "@backstage/plugin-code-coverage": "^0.1.34-next.1", + "@backstage/plugin-cost-insights": "^0.11.29-next.1", + "@backstage/plugin-dynatrace": "^0.1.1-next.1", + "@backstage/plugin-explore": "^0.3.38-next.1", + "@backstage/plugin-gcalendar": "^0.3.3-next.1", + "@backstage/plugin-gcp-projects": "^0.3.26-next.1", + "@backstage/plugin-github-actions": "^0.5.7-next.1", + "@backstage/plugin-gocd": "^0.1.13-next.1", + "@backstage/plugin-graphiql": "^0.2.39-next.1", + "@backstage/plugin-home": "^0.4.23-next.1", + "@backstage/plugin-jenkins": "^0.7.6-next.1", + "@backstage/plugin-kafka": "^0.3.7-next.1", + "@backstage/plugin-kubernetes": "^0.6.7-next.1", + "@backstage/plugin-lighthouse": "^0.3.7-next.1", + "@backstage/plugin-newrelic": "^0.3.25-next.1", + "@backstage/plugin-newrelic-dashboard": "^0.1.15-next.1", + "@backstage/plugin-org": "^0.5.7-next.1", + "@backstage/plugin-pagerduty": "0.5.0-next.1", + "@backstage/plugin-permission-react": "^0.4.3-next.0", + "@backstage/plugin-rollbar": "^0.4.7-next.1", + "@backstage/plugin-scaffolder": "^1.4.0-next.1", + "@backstage/plugin-search": "^0.9.1-next.1", + "@backstage/plugin-search-react": "^0.2.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-sentry": "^0.3.45-next.1", + "@backstage/plugin-shortcuts": "^0.2.8-next.1", + "@backstage/plugin-stack-overflow": "^0.1.3-next.1", + "@backstage/plugin-tech-radar": "^0.5.14-next.1", + "@backstage/plugin-techdocs": "^1.2.1-next.1", "@backstage/plugin-techdocs-react": "^1.0.2-next.0", - "@backstage/plugin-techdocs-module-addons-contrib": "^1.0.2-next.0", - "@backstage/plugin-todo": "^0.2.9-next.0", - "@backstage/plugin-user-settings": "^0.4.6-next.0", - "@backstage/plugin-tech-insights": "^0.2.3-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-techdocs-module-addons-contrib": "^1.0.2-next.1", + "@backstage/plugin-todo": "^0.2.9-next.1", + "@backstage/plugin-user-settings": "^0.4.6-next.1", + "@backstage/plugin-tech-insights": "^0.2.3-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -81,7 +81,7 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@rjsf/core": "^3.2.1", "@testing-library/cypress": "^8.0.2", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 92b3271ec0..3ba1b38e78 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/backend-common +## 0.14.1-next.1 + +### Patch Changes + +- 0fc57887e8: Improve plural handling in logging output for secrets +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/config-loader@1.1.3-next.0 + ## 0.14.1-next.0 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 9c459373ff..ca88a9d190 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.14.1-next.0", + "version": "0.14.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -36,9 +36,9 @@ "dependencies": { "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/config-loader": "^1.1.2", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/config-loader": "^1.1.3-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", "@backstage/types": "^1.0.0", "@google-cloud/storage": "^6.0.0", "@manypkg/get-packages": "^1.1.3", @@ -91,8 +91,8 @@ } }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/archiver": "^5.1.0", "@types/base64-stream": "^1.0.2", "@types/compression": "^1.7.0", diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index b73abb2d5a..5b5232e1fb 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/backend-tasks +## 0.3.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + ## 0.3.3-next.0 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index f99baea1d5..8d69f2ce7c 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.3.3-next.0", + "version": "0.3.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -33,9 +33,9 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/types": "^1.0.0", "@types/luxon": "^2.0.4", "cron": "^2.0.0", @@ -48,8 +48,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/cron": "^2.0.0", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index a9da9b0a3c..63868083d7 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/backend-test-utils +## 0.1.26-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.18.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + ## 0.1.26-next.0 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 56aa23bfd8..7335447797 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.26-next.0", + "version": "0.1.26-next.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -34,8 +34,8 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/cli": "^0.18.0-next.1", "@backstage/config": "^1.0.1", "better-sqlite3": "^7.5.0", "knex": "^1.0.2", @@ -46,7 +46,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 3dfde23cae..f692b3b6c3 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,39 @@ # example-backend +## 0.2.73-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/plugin-auth-backend@0.15.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-search-backend-module-elasticsearch@0.2.0-next.1 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/plugin-techdocs-backend@1.2.0-next.1 + - example-app@0.2.73-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-app-backend@0.3.34-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-badges-backend@0.1.28-next.1 + - @backstage/plugin-code-coverage-backend@0.1.32-next.1 + - @backstage/plugin-jenkins-backend@0.1.24-next.1 + - @backstage/plugin-kafka-backend@0.2.27-next.1 + - @backstage/plugin-kubernetes-backend@0.7.0-next.1 + - @backstage/plugin-permission-backend@0.5.9-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.2-next.1 + - @backstage/plugin-search-backend@0.5.4-next.1 + - @backstage/plugin-search-backend-module-pg@0.3.5-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-tech-insights-backend@0.4.2-next.1 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.18-next.1 + - @backstage/plugin-todo-backend@0.1.31-next.1 + ## 0.2.73-next.0 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 0023a169bf..1cb0e1405a 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.73-next.0", + "version": "0.2.73-next.1", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,39 +26,39 @@ "build-image": "docker build ../.. -f Dockerfile --tag example-backend" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-app-backend": "^0.3.34-next.0", - "@backstage/plugin-auth-backend": "^0.14.2-next.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-app-backend": "^0.3.34-next.1", + "@backstage/plugin-auth-backend": "^0.15.0-next.1", + "@backstage/plugin-auth-node": "^0.2.3-next.1", "@backstage/plugin-azure-devops-backend": "^0.3.13-next.0", - "@backstage/plugin-badges-backend": "^0.1.28-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", - "@backstage/plugin-code-coverage-backend": "^0.1.32-next.0", + "@backstage/plugin-badges-backend": "^0.1.28-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", + "@backstage/plugin-code-coverage-backend": "^0.1.32-next.1", "@backstage/plugin-graphql-backend": "^0.1.24-next.0", - "@backstage/plugin-jenkins-backend": "^0.1.24-next.0", - "@backstage/plugin-kubernetes-backend": "^0.7.0-next.0", - "@backstage/plugin-kafka-backend": "^0.2.27-next.0", - "@backstage/plugin-permission-backend": "^0.5.9-next.0", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-node": "^0.6.3-next.0", + "@backstage/plugin-jenkins-backend": "^0.1.24-next.1", + "@backstage/plugin-kubernetes-backend": "^0.7.0-next.1", + "@backstage/plugin-kafka-backend": "^0.2.27-next.1", + "@backstage/plugin-permission-backend": "^0.5.9-next.1", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-node": "^0.6.3-next.1", "@backstage/plugin-proxy-backend": "^0.2.28-next.0", "@backstage/plugin-rollbar-backend": "^0.1.31-next.0", - "@backstage/plugin-scaffolder-backend": "^1.4.0-next.0", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.4.2-next.0", - "@backstage/plugin-search-backend": "^0.5.4-next.0", - "@backstage/plugin-search-backend-node": "^0.6.3-next.0", - "@backstage/plugin-search-backend-module-elasticsearch": "^0.1.6-next.0", - "@backstage/plugin-search-backend-module-pg": "^0.3.5-next.0", - "@backstage/plugin-techdocs-backend": "^1.1.3-next.0", - "@backstage/plugin-tech-insights-backend": "^0.4.2-next.0", + "@backstage/plugin-scaffolder-backend": "^1.4.0-next.1", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.4.2-next.1", + "@backstage/plugin-search-backend": "^0.5.4-next.1", + "@backstage/plugin-search-backend-node": "^0.6.3-next.1", + "@backstage/plugin-search-backend-module-elasticsearch": "^0.2.0-next.1", + "@backstage/plugin-search-backend-module-pg": "^0.3.5-next.1", + "@backstage/plugin-techdocs-backend": "^1.2.0-next.1", + "@backstage/plugin-tech-insights-backend": "^0.4.2-next.1", "@backstage/plugin-tech-insights-node": "^0.3.2-next.0", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.18-next.0", - "@backstage/plugin-todo-backend": "^0.1.31-next.0", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.18-next.1", + "@backstage/plugin-todo-backend": "^0.1.31-next.1", "@gitbeaker/node": "^35.1.0", "@octokit/rest": "^18.5.3", "better-sqlite3": "^7.5.0", @@ -75,7 +75,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 8ea70b67be..0b0d29b940 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/catalog-client +## 1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + ## 1.0.4-next.0 ### Patch Changes diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index 893b057e37..05075d14dc 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-client", "description": "An isomorphic client for the catalog backend", - "version": "1.0.4-next.0", + "version": "1.0.4-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/errors": "^1.0.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/errors": "^1.1.0-next.0", "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "msw": "^0.42.0" }, diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md index 6501c32409..78f7a1207c 100644 --- a/packages/catalog-model/CHANGELOG.md +++ b/packages/catalog-model/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/catalog-model +## 1.1.0-next.1 + +### Patch Changes + +- f1dcc6f3c6: Added type predicates for all entity types, e.g. isUserEntity +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + ## 1.1.0-next.0 ### Minor Changes diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index ba2521b927..91d3f74a66 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-model", "description": "Types and validators that help describe the model of a Backstage Catalog", - "version": "1.1.0-next.0", + "version": "1.1.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/types": "^1.0.0", "ajv": "^8.10.0", "json-schema": "^0.4.0", @@ -43,7 +43,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "@types/json-schema": "^7.0.5", "@types/lodash": "^4.14.151", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index dbceb46db1..227ad4b772 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/cli +## 0.18.0-next.1 + +### Minor Changes + +- 96a82d9791: **BREAKING**: Removed the following deprecated package commands: + + - `app:build` - Use `package build` instead + - `app:serve` - Use `package start` instead + - `backend:build` - Use `package build` instead + - `backend:bundle` - Use `package build` instead + - `backend:dev` - Use `package start` instead + - `plugin:build` - Use `package build` instead + - `plugin:serve` - Use `package start` instead + - `build` - Use `package build` instead + - `lint` - Use `package lint` instead + - `prepack` - Use `package prepack` instead + - `postpack` - Use `package postpack` instead + + In order to replace these you need to have [migrated to using package roles](https://backstage.io/docs/tutorials/package-role-migration). + +### Patch Changes + +- 86640214f0: Upgrade `@rollup/plugin-node-resolve` to `^13.0.6` +- e661242844: Updated dependency `run-script-webpack-plugin` to `^0.1.0`. +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/config-loader@1.1.3-next.0 + ## 0.17.3-next.0 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 42e8953d1e..6653744a33 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.17.3-next.0", + "version": "0.18.0-next.1", "private": false, "publishConfig": { "access": "public" @@ -33,8 +33,8 @@ "dependencies": { "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/config-loader": "^1.1.2", - "@backstage/errors": "^1.0.0", + "@backstage/config-loader": "^1.1.3-next.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/release-manifests": "^0.0.4", "@backstage/types": "^1.0.0", "@hot-loader/react-dom-v16": "npm:@hot-loader/react-dom@^16.0.2", @@ -126,14 +126,14 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@types/diff": "^5.0.0", "@types/express": "^4.17.6", "@types/fs-extra": "^9.0.1", diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index d9228aa091..af297b1112 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/config-loader +## 1.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + ## 1.1.2 ### Patch Changes diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 3448b336b7..3a02afde9b 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "1.1.2", + "version": "1.1.3-next.0", "private": false, "publishConfig": { "access": "public", @@ -36,7 +36,7 @@ "dependencies": { "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/types": "^1.0.0", "@types/json-schema": "^7.0.6", "ajv": "^8.10.0", diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index be95a344fa..624a9259e9 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -49,8 +49,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index ccccade63d..cf1c6305d4 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-components +## 0.9.6-next.1 + +### Patch Changes + +- 3c440ea77e: Change BackstageIconLinkVertical style to use pallette instead of explicit color +- 7e115d42f9: Support displaying subtitle text in `SidebarSubmenuItem` +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + ## 0.9.6-next.0 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index f4b4f55089..aeea26c17b 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.9.6-next.0", + "version": "0.9.6-next.1", "private": false, "publishConfig": { "access": "public", @@ -35,8 +35,8 @@ "dependencies": { "@backstage/config": "^1.0.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/theme": "^0.2.16-next.0", "@backstage/version-bridge": "^1.0.1", "@material-table/core": "^3.1.0", "@material-ui/core": "^4.12.2", @@ -80,8 +80,8 @@ }, "devDependencies": { "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/cli": "^0.17.3-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 5f468dba51..eb17f75285 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -46,9 +46,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 77d36048ba..9ec1859289 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/create-app +## 0.4.29-next.1 + +### Patch Changes + +- Bumped create-app version. + ## 0.4.29-next.0 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index d67e7c6f54..381e975729 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.29-next.0", + "version": "0.4.29-next.1", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 26aa5ce212..907c9f757d 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/dev-utils +## 1.0.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 1.0.4-next.0 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 8835aea7c6..c15e60d423 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "1.0.4-next.0", + "version": "1.0.4-next.1", "private": false, "publishConfig": { "access": "public", @@ -33,15 +33,15 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/app-defaults": "^1.0.4-next.0", + "@backstage/app-defaults": "^1.0.4-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@testing-library/jest-dom": "^5.10.1", @@ -59,7 +59,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "@types/node": "^16.0.0" }, diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 2de60f4db8..09ed0c3a48 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@backstage/cli-common": "^0.1.9-next.0", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@types/fs-extra": "^9.0.1", "@types/node": "^16.11.26", "@types/puppeteer": "^5.4.4", diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index 20f938370b..b7d912f5ab 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/errors +## 1.1.0-next.0 + +### Minor Changes + +- 6d61b44466: The `ResponseError.fromResponse` now accepts a more narrow response type, in order to avoid incompatibilities between different fetch implementations. + + The `response` property of `ResponseError` has also been narrowed to a new `ConsumedResponse` type that omits all the properties for consuming the body of the response. This is not considered a breaking change as it was always an error to try to consume the body of the response. + ## 1.0.0 ### Major Changes diff --git a/packages/errors/package.json b/packages/errors/package.json index 849c451e84..01f1137eeb 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/errors", "description": "Common utilities for error handling within Backstage", - "version": "1.0.0", + "version": "1.1.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,7 +38,7 @@ "serialize-error": "^8.0.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7" }, "files": [ diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 30326e1205..102fc3ea75 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/integration-react +## 1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + ## 1.1.2-next.0 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index ea87dfc724..6a0cfe3041 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "1.1.2-next.0", + "version": "1.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,10 +25,10 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -38,9 +38,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 9a9b679b19..3db1b7c7b9 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/integration +## 1.2.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + ## 1.2.2-next.0 ### Patch Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index f103d63bbb..190031e473 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration", "description": "Helpers for managing integrations towards external systems", - "version": "1.2.2-next.0", + "version": "1.2.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "cross-fetch": "^3.1.5", "git-url-parse": "^11.6.0", "@octokit/rest": "^18.5.3", @@ -43,9 +43,9 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/config-loader": "^1.1.2", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/config-loader": "^1.1.3-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@types/jest": "^26.0.7", "@types/luxon": "^2.0.4", "msw": "^0.42.0" diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index b6ce6d4a97..29a53625fc 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,20 @@ # techdocs-cli-embedded-app +## 0.2.72-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/app-defaults@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + ## 0.2.72-next.0 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 959be03e52..fa4ec8a38c 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,25 +1,25 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.72-next.0", + "version": "0.2.72-next.1", "private": true, "backstage": { "role": "frontend" }, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/app-defaults": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/cli": "^0.18.0-next.1", "@backstage/config": "^1.0.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/plugin-techdocs": "^1.2.1-next.0", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/plugin-techdocs": "^1.2.1-next.1", "@backstage/plugin-techdocs-react": "^1.0.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "history": "^5.0.0", @@ -30,7 +30,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index aa1870d5da..3e66248276 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,15 @@ # @techdocs/cli +## 1.1.3-next.1 + +### Patch Changes + +- a5d73da942: Fix the flag parsing for `legacyCopyReadmeMdToIndexMd` in `techdocs-cli generate` command, and decouple it's logic from the `techdocs-ref` flag. +- Updated dependencies + - @backstage/plugin-techdocs-node@1.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + ## 1.1.3-next.0 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 7f556a8dd7..00e254d10f 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.1.3-next.0", + "version": "1.1.3-next.1", "private": false, "publishConfig": { "access": "public" @@ -37,7 +37,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", @@ -62,11 +62,11 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/plugin-techdocs-node": "^1.1.3-next.0", + "@backstage/plugin-techdocs-node": "^1.2.0-next.1", "@types/dockerode": "^3.3.0", "commander": "^9.1.0", "dockerode": "^3.3.1", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index 56bcd3ec62..adbb3cd7ac 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/test-utils +## 1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + ## 1.1.2-next.0 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 17886b76ce..1dfa7faf43 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "1.1.2-next.0", + "version": "1.1.2-next.1", "private": false, "publishConfig": { "access": "public", @@ -36,9 +36,9 @@ "@backstage/config": "^1.0.1", "@backstage/core-app-api": "^1.0.4-next.0", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-react": "^0.4.2", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-react": "^0.4.3-next.0", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.11.2", @@ -55,7 +55,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "msw": "^0.42.0" diff --git a/packages/theme/CHANGELOG.md b/packages/theme/CHANGELOG.md index 5c3e8cf5d6..15e9eb68cd 100644 --- a/packages/theme/CHANGELOG.md +++ b/packages/theme/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/theme +## 0.2.16-next.0 + +### Patch Changes + +- 4c09c09102: Adds optional `htmlFontSize` property and also sets typography design tokens for h5 and h6 in base theme. + ## 0.2.15 ### Patch Changes diff --git a/packages/theme/package.json b/packages/theme/package.json index 0e4d26fbea..a3ff37538c 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/theme", "description": "material-ui theme for use with Backstage.", - "version": "0.2.15", + "version": "0.2.16-next.0", "private": false, "publishConfig": { "access": "public", @@ -36,7 +36,7 @@ "@material-ui/core": "^4.12.2" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/packages/types/package.json b/packages/types/package.json index 9d26ee25e7..d1410631bd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -34,7 +34,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/zen-observable": "^0.8.0", "zen-observable": "^0.8.15" }, diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index 357350bef7..4b9ce2ed11 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -37,7 +37,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0" diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index 8262032252..15a0519010 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-adr-backend +## 0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-adr-common@0.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index 7ed696a650..1a42f7ff03 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,14 +29,14 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-adr-common": "^0.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-adr-common": "^0.1.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", "luxon": "^2.0.2", "marked": "^4.0.14", "winston": "^3.2.1", @@ -44,7 +44,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/marked": "^4.0.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3", diff --git a/plugins/adr-common/CHANGELOG.md b/plugins/adr-common/CHANGELOG.md index 07bbac4e8e..e07697118c 100644 --- a/plugins/adr-common/CHANGELOG.md +++ b/plugins/adr-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-adr-common +## 0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index fee09a03e1..a0567fb5b8 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-adr-common", "description": "Common functionalities for the adr plugin", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,12 +30,12 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-search-common": "^0.3.5" + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/adr/CHANGELOG.md b/plugins/adr/CHANGELOG.md index 7d0e47a5f1..fc8b859ec5 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-adr +## 0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-adr-common@0.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/adr/package.json b/plugins/adr/package.json index 4bff140277..60a3c594e5 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,14 +22,14 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-adr-common": "^0.1.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-search-react": "^0.2.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-adr-common": "^0.1.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-search-react": "^0.2.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index 979137cbff..da6cdcbfef 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -22,7 +22,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@types/express": "*", "express": "^4.17.1", @@ -33,7 +33,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index b1a86b6e22..f8b683bf5a 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-airbrake +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/dev-utils@1.0.4-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 755e99c522..00554efeee 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,13 +23,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/app-defaults": "^1.0.4-next.0", - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/app-defaults": "^1.0.4-next.1", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index 06f84b5f42..d1cce9b7ef 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-allure +## 0.1.23-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.23-next.0 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 2499a70f28..a576aa8f9b 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.23-next.0", + "version": "0.1.23-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,11 +25,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index d9fe0e6c0d..23f583473d 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-analytics-module-ga +## 0.1.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.1.18-next.0 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 0b137d5a44..e7bae29f51 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.18-next.0", + "version": "0.1.18-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 73c1c2ae18..a27c58192e 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-apache-airflow +## 0.2.0-next.1 + +### Minor Changes + +- 01f976ea72: Exposed DagTableComponent as standalone component + added a prop to get only select DAGs instead of the full list + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + ## 0.1.15-next.0 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 63f444075e..a880942750 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.1.15-next.0", + "version": "0.2.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/api-docs-module-protoc-gen-doc/package.json b/plugins/api-docs-module-protoc-gen-doc/package.json index 2ce03b5803..00409845d0 100644 --- a/plugins/api-docs-module-protoc-gen-doc/package.json +++ b/plugins/api-docs-module-protoc-gen-doc/package.json @@ -37,7 +37,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@testing-library/jest-dom": "^5.16.4", "@types/react": "^16.13.1 || ^17.0.0" }, diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index f5998235ca..b4ebf48607 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-api-docs +## 0.8.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.8.7-next.0 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 9db7530f84..8b4f80fa3f 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.8.7-next.0", + "version": "0.8.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ }, "dependencies": { "@asyncapi/react-component": "1.0.0-next.38", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index aa3baa77da..cf84f54fb0 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-app-backend +## 0.3.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/config-loader@1.1.3-next.0 + ## 0.3.34-next.0 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 173b15c80c..9277e60485 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.34-next.0", + "version": "0.3.34-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,8 +33,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/config-loader": "^1.1.2", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/config-loader": "^1.1.3-next.0", "@backstage/config": "^1.0.1", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", @@ -50,8 +50,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@backstage/types": "^1.0.0", "@types/supertest": "^2.0.8", "mock-fs": "^5.1.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 00c8669c4d..4b0da94dad 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-auth-backend +## 0.15.0-next.1 + +### Minor Changes + +- 9d4040777e: **BREAKING**: Removed all directly exported auth provider factories, option types, and sign-in resolvers. For example: `AwsAlbProviderOptions`, `bitbucketUserIdSignInResolver`, `createGithubProvider`. These are all still accessible via the `providers` export. For example, use `providers.github.create()` rather than `createGithubProvider()`, and `providers.bitbucket.resolvers.userIdMatchingUserEntityAnnotation()` rather than `bitbucketUserIdSignInResolver`. + + **BREAKING**: Removed the exported `AuthProviderFactoryOptions` type as well as the deprecated option fields of the `AuthProviderFactory` callback. This includes the `tokenManager`, `tokenIssuer`, `discovery`, and `catalogApi` fields. Existing usage of these should be replaced with the new utilities in the `resolverContext` field. The deprecated `TokenIssuer` type is now also removed, since it is no longer used. + + **BREAKING**: Removed `getEntityClaims`, use `getDefaultOwnershipEntityRefs` instead. + + **DEPRECATION**: Deprecated `AtlassianAuthProvider` as it was unintentionally exported. + +### Patch Changes + +- f2cf79d62e: Added an option for the auth backend router to select the algorithm for the JWT token signing keys +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + ## 0.14.2-next.0 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index c1fe319e3c..3b7ac26295 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.14.2-next.0", + "version": "0.15.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-auth-node": "^0.2.3-next.0", - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/types": "^1.0.0", "@google-cloud/firestore": "^5.0.2", "@types/express": "^4.17.6", @@ -76,8 +76,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index 68fef0b00d..43bf44ac8e 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-node +## 0.2.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + ## 0.2.3-next.0 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index bac48aa559..ad67eefefc 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.2.3-next.0", + "version": "0.2.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,15 +23,15 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "jose": "^4.6.0", "node-fetch": "^2.6.7", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "lodash": "^4.17.21", "msw": "^0.42.0", "uuid": "^8.0.0" diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index d0fd5eaf80..2126bfced7 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -23,7 +23,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@backstage/plugin-azure-devops-common": "^0.2.3", "@types/express": "^4.17.6", @@ -35,7 +35,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.42.0" diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index 2e39961ca8..f0f137ac52 100644 --- a/plugins/azure-devops-common/package.json +++ b/plugins/azure-devops-common/package.json @@ -32,7 +32,7 @@ "clean": "backstage-cli package clean" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 297dc81883..32b7ee5a25 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-azure-devops +## 0.1.23-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.23-next.0 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 5375737866..d96ccbea29 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.1.23-next.0", + "version": "0.1.23-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,13 +30,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/plugin-azure-devops-common": "^0.2.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 6f69cf8662..02729eb7c8 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-badges-backend +## 0.1.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + ## 0.1.28-next.0 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index b7a727c3b0..26a11c98b1 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.28-next.0", + "version": "0.1.28-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@types/express": "^4.17.6", "badge-maker": "^3.3.0", "cors": "^2.8.5", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 0d789f0f3d..41d41c9855 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges +## 0.2.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.2.31-next.0 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index c12aedee98..2b58487932 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.31-next.0", + "version": "0.2.31-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,12 +30,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index c0769fe5b8..a329db4f9a 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -23,8 +23,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-test-utils": "^0.1.26-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-test-utils": "^0.1.26-next.1", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index 577b50f11e..864a5eb017 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-bazaar +## 0.1.22-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/cli@0.18.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.22-next.0 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 5f16d8a9bc..bbc5919e12 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.22-next.0", + "version": "0.1.22-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,13 +24,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/cli": "^0.17.3-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@date-io/luxon": "1.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -47,8 +47,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.1.5" }, diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index 46ec37791c..c84303fece 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -28,11 +28,11 @@ "update-models": "yarn refresh-schema && yarn generate-models && yarn reduce-models" }, "dependencies": { - "@backstage/integration": "^1.2.2-next.0", + "@backstage/integration": "^1.2.2-next.1", "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@openapitools/openapi-generator-cli": "^2.4.26", "msw": "^0.42.0", "ts-morph": "^15.0.0" diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 86662fdeba..0ef9d10bea 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bitrise +## 0.1.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.34-next.0 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index a42a513fbf..f8f96be603 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.34-next.0", + "version": "0.1.34-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index 28bd008062..2f200dd9b1 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.1.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.7-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index 1a825a397d..c768bbe9e4 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", "description": "A Backstage catalog backend module that helps integrate towards AWS", - "version": "0.1.7-next.0", + "version": "0.1.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "aws-sdk": "^2.840.0", "lodash": "^4.17.21", @@ -48,7 +48,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151", "aws-sdk-mock": "^5.2.1", "yaml": "^1.9.2" diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index b39064e4e5..f9c2eeb6ce 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 3e244dc913..4cb1639a36 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", "description": "A Backstage catalog backend module that helps integrate towards Azure", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.42.0", @@ -48,8 +48,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index d55e8d9c8f..663c0b37fe 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -33,18 +33,18 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-tasks": "^0.3.3-next.0", + "@backstage/backend-tasks": "^0.3.3-next.1", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/integration": "^1.2.2-next.1", "@backstage/plugin-bitbucket-cloud-common": "^0.1.1-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "msw": "^0.42.0" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md index 225e2cda88..a920827973 100644 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket +## 0.2.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.2.1-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index d7df9542a6..56b0c16eec 100644 --- a/plugins/catalog-backend-module-bitbucket/package.json +++ b/plugins/catalog-backend-module-bitbucket/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket", - "version": "0.2.1-next.0", + "version": "0.2.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", "@backstage/plugin-bitbucket-cloud-common": "^0.1.1-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.42.0", @@ -47,8 +47,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index 483ff47997..c55973d568 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 0668a2858b..dd4c07c044 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,13 +28,13 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "fs-extra": "10.1.0", "msw": "^0.42.0", "node-fetch": "^2.6.7", @@ -42,8 +42,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/fs-extra": "^9.0.1" }, "files": [ diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index b97a043aba..42aa26afdf 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-github +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index c3adbbf212..ffe8e38e32 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-github", "description": "A Backstage catalog backend module that helps integrate towards GitHub", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "@octokit/graphql": "^4.5.8", "lodash": "^4.17.21", @@ -49,8 +49,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index 343b2b9d7b..95fa6ddbda 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.1.5-next.1 + +### Patch Changes + +- 49ff472c0b: Add the possibility in the `GitlabDiscoveryEntityProvider` to scan the whole project instead of concrete groups. For that, use a configuration like this one, where the group parameter is omitted (not mandatory anymore): + + ```yaml + catalog: + providers: + gitlab: + yourProviderId: + host: gitlab-host # Identifies one of the hosts set up in the integrations + branch: main # Optional. Uses `master` as default + entityFilename: catalog-info.yaml # Optional. Defaults to `catalog-info.yaml` + ``` + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index 8d39a8dc05..a4240119e3 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", "description": "A Backstage catalog backend module that helps integrate towards GitLab", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.42.0", @@ -48,8 +48,8 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151", "@types/uuid": "^8.0.0" }, diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 3afb99dc79..e906e40631 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.1-next.1 + +### Patch Changes + +- fbfbff6bf7: Add possibility to resolve relations by RDN, in addition to UUID and DN +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/backend-tasks@0.3.3-next.1 + ## 0.5.1-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index a8c28018f2..7232ea24c3 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend module that helps integrate towards LDAP", - "version": "0.5.1-next.0", + "version": "0.5.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,11 +33,11 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/types": "^1.0.0", "@types/ldapjs": "^2.2.0", "ldapjs": "^2.2.0", @@ -46,7 +46,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index e2e75af446..cf777d982c 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -34,10 +34,10 @@ }, "dependencies": { "@azure/msal-node": "^1.1.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -48,9 +48,9 @@ "qs": "^6.9.4" }, "devDependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151", "msw": "^0.42.0" }, diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md new file mode 100644 index 0000000000..d98f5a95d0 --- /dev/null +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -0,0 +1,17 @@ +# @backstage/plugin-catalog-backend-module-openapi + +## 0.1.0-next.0 + +### Minor Changes + +- 67503d159e: Add basic OpenAPI \$ref support. + + For more information see [here](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend-module-openapi). + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/integration@1.2.2-next.1 diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 1c99618ff8..e2b3407bc0 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", - "version": "0.0.0", + "version": "0.1.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,17 +34,17 @@ }, "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "winston": "^3.2.1", "yaml": "^2.1.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "openapi-types": "^11.0.1" }, "files": [ diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 84f80243fd..7d58cfda6e 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend +## 1.2.1-next.1 + +### Patch Changes + +- f1dcc6f3c6: Use entity type predicates from catalog-model +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 1.2.1-next.0 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 61a8e68412..5cef11c8d4 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "1.2.1-next.0", + "version": "1.2.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,17 +34,17 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-node": "^0.6.3-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-node": "^0.6.3-next.1", "@backstage/plugin-scaffolder-common": "^1.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", "codeowners-utils": "^1.0.2", @@ -68,10 +68,10 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-search-backend-node": "0.6.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-search-backend-node": "0.6.3-next.1", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/lodash": "^4.14.151", diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index 72002894c4..7fa70e5859 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-common +## 1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 3adb442c3e..82c0d72855 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "1.0.3", + "version": "1.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-search-common": "^0.3.5" + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-search-common": "^0.3.6-next.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist", diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 5ce0a2d31b..235434ff66 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-graph +## 0.2.19-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.2.19-next.0 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 786f284628..e2d8af6f46 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.19-next.0", + "version": "0.2.19-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,12 +24,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -45,11 +45,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@backstage/types": "^1.0.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 411ae5ec17..c1ca2f9fa6 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -34,7 +34,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", "@backstage/types": "^1.0.0", "apollo-server": "^3.0.0", @@ -46,8 +46,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@graphql-codegen/cli": "^2.3.1", "@graphql-codegen/graphql-modules-preset": "^2.3.2", "@graphql-codegen/typescript": "^2.4.2", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index 1240ab1fc4..6c306635e1 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-import +## 0.8.10-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.8.10-next.0 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 527faad4b3..d170bf54f2 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.8.10-next.0", + "version": "0.8.10-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,15 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -60,10 +60,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 8b396ca878..fb5bcc81c3 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-react +## 1.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-react@0.4.3-next.0 + ## 1.1.2-next.0 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index a525a0af50..a28b8219be 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "1.1.2-next.0", + "version": "1.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,16 +34,16 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-react": "^0.4.2", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-react": "^0.4.3-next.0", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", "@material-ui/core": "^4.12.2", @@ -63,11 +63,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", "@backstage/plugin-scaffolder-common": "^1.1.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index cc64ccd3ee..21e30517e2 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog +## 1.3.1-next.1 + +### Patch Changes + +- f1dcc6f3c6: Use entity type predicates from catalog-model +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 1.3.1-next.0 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 786083356a..0dd7836c02 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "1.3.1-next.0", + "version": "1.3.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,17 +34,17 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-search-react": "^0.2.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-search-react": "^0.2.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -61,11 +61,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/plugin-permission-react": "^0.4.2", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/plugin-permission-react": "^0.4.3-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index 3f6d9d6731..749c77d1c5 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -35,10 +35,10 @@ "luxon": "^2.0.2", "p-limit": "^4.0.0", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/catalog-model": "^1.1.0-next.0" + "@backstage/catalog-model": "^1.1.0-next.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index 1c1b551102..2d5bee3a89 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-circleci +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 789c6f5668..3873b6fd03 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,11 +35,11 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -55,10 +55,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index d31721fee7..6c0f361fdc 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cloudbuild +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index b95a6253cc..874fb69017 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index 407aacb6e2..c882f5a2c0 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-climate +## 0.1.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.7-next.0 ### Patch Changes diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 2bb8e7aaf2..a9542e0f72 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-code-climate", - "version": "0.1.7-next.0", + "version": "0.1.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,11 +23,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index b354cd364a..b813d32776 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-coverage-backend +## 0.1.32-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.32-next.0 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 78b57974b9..fcd5a0cf5d 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.1.32-next.0", + "version": "0.1.32-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,12 +23,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -39,7 +39,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.42.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 90fef2528b..b3199f207b 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-coverage +## 0.1.34-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.34-next.0 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index 793fc61ee0..b7d7723277 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.1.34-next.0", + "version": "0.1.34-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,13 +24,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/codescene/CHANGELOG.md b/plugins/codescene/CHANGELOG.md index 17a14cd3a9..4f0944ff34 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-codescene +## 0.1.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 41190404cb..0b06850594 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.9.10", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.57", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 3943ec30c5..99a23391d6 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-config-schema +## 0.1.30-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + ## 0.1.30-next.0 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index d806bf6d70..59b8780987 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.30-next.0", + "version": "0.1.30-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,10 +25,10 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -41,10 +41,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 1c51ec6050..734cf0cfa0 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-cost-insights +## 0.11.29-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.11.29-next.0 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 6ea67d5425..e2555d961f 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.11.29-next.0", + "version": "0.11.29-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -60,10 +60,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index a7a17ce678..d6cb7f6f56 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-dynatrace +## 0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.1.1-next.0 ### Patch Changes diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index 018d3fdb19..4983e7bf83 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "0.1.1-next.0", + "version": "0.1.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,10 +22,10 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index 17b2afc9ec..4609c6c4ea 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @internal/plugin-todo-list-backend +## 1.0.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + ## 1.0.3-next.0 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index de8a1638ad..e91cbf3bf3 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.3-next.0", + "version": "1.0.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", "@types/express": "^4.17.6", "cross-fetch": "^3.1.5", "express": "^4.17.1", @@ -36,7 +36,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", "msw": "^0.42.0", diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index 564b1f57eb..ba6a7bcf3d 100644 --- a/plugins/example-todo-list-common/CHANGELOG.md +++ b/plugins/example-todo-list-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @internal/plugin-todo-list-common +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 1.0.2 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index fce0a05714..c19c0d0485 100644 --- a/plugins/example-todo-list-common/package.json +++ b/plugins/example-todo-list-common/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-common", - "version": "1.0.2", + "version": "1.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,13 +23,13 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/plugin-permission-common": "^0.6.2" + "@backstage/plugin-permission-common": "^0.6.3-next.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@types/node": "^16.11.26", "msw": "^0.42.0", "cross-fetch": "^3.1.5" diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index f33b659b7e..64c2ec4995 100644 --- a/plugins/example-todo-list/CHANGELOG.md +++ b/plugins/example-todo-list/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-todo-list +## 1.0.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 1.0.3-next.0 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index 7764d7c2cb..68d6e89d56 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list", - "version": "1.0.3-next.0", + "version": "1.0.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -36,10 +36,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 021365d056..164f449da7 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -36,9 +36,9 @@ "@backstage/core-plugin-api": "^1.0.3" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 895dd9b0ab..70ae5ba3a4 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-explore +## 0.3.38-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.38-next.0 ### Patch Changes diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 4290cf668c..c8f8be82f0 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.38-next.0", + "version": "0.3.38-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@backstage/plugin-explore-react": "^0.0.18", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 6b02c041dc..09b9373dbe 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-firehydrant +## 0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.24-next.0 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 2574e28871..2ad2366295 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.24-next.0", + "version": "0.1.24-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,10 +25,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index e3710b1d3e..8c361a38f3 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-fossa +## 0.2.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.2.39-next.0 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index c286f8fd82..876de5965c 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.39-next.0", + "version": "0.2.39-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,12 +35,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/gcalendar/CHANGELOG.md b/plugins/gcalendar/CHANGELOG.md index 7c6db3657b..bb548b86cb 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcalendar +## 0.3.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + ## 0.3.3-next.0 ### Patch Changes diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index 77dfc8af18..9acc0cb3f5 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.3-next.0", + "version": "0.3.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,10 +22,10 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index 4420fb00cc..24a8fbe415 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gcp-projects +## 0.3.26-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.3.26-next.0 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index fa1aa611bd..3e3a9067aa 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.26-next.0", + "version": "0.3.26-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -47,10 +47,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index c4a44de3c8..13e16cd353 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-git-release-manager +## 0.3.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + ## 0.3.20-next.0 ### Patch Changes diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 2d6bf1ec73..b25a95a156 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.20-next.0", + "version": "0.3.20-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,10 +24,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 01e47f8e49..ab347c1b77 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-github-actions +## 0.5.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.5.7-next.0 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 16122a2d12..989847df6e 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.5.7-next.0", + "version": "0.5.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,12 +36,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -55,10 +55,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 1ba6a113a5..3dc6a89f93 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-github-deployments +## 0.1.38-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.38-next.0 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index dd537c4b21..5fc366522e 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.38-next.0", + "version": "0.1.38-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,14 +24,14 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/github-pull-requests-board/CHANGELOG.md b/plugins/github-pull-requests-board/CHANGELOG.md index 483329f784..4e8ba70b9a 100644 --- a/plugins/github-pull-requests-board/CHANGELOG.md +++ b/plugins/github-pull-requests-board/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-github-pull-requests-board +## 0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.1-next.0 ### Patch Changes diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index 6f12e656ca..77caa4129f 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-pull-requests-board", "description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team", - "version": "0.1.1-next.0", + "version": "0.1.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,12 +35,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -49,9 +49,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 611f5dab40..7ad6421f53 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gitops-profiles +## 0.3.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.3.25-next.0 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 3246b5edb7..5a60b9c68e 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.25-next.0", + "version": "0.3.25-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,9 +35,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index 9c37f08aad..9a1f0c40c7 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-gocd +## 0.1.13-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.13-next.0 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 25af6a6d4d..a2a8f99983 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.13-next.0", + "version": "0.1.13-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,12 +31,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index 8fb1c85078..ca98c30b8c 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-graphiql +## 0.2.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.2.39-next.0 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 9d933da2e1..7049ca1317 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.39-next.0", + "version": "0.2.39-next.1", "private": false, "publishConfig": { "access": "public", @@ -34,9 +34,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 6293b17f4f..887718d415 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -34,7 +34,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@backstage/plugin-catalog-graphql": "^0.3.11-next.0", "@graphql-tools/schema": "^8.3.1", @@ -51,7 +51,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", "supertest": "^6.1.3" diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index a5069b9352..f185b92193 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-home +## 0.4.23-next.1 + +### Patch Changes + +- a46e317a75: Added support for customizing the time format used in the `HeaderWorldClock` component + + Here's an example of how this can be used in the `HomePage.tsx` found in `\packages\app\src\components\home` to change the clock to be in the 24hr time format: + + ```diff + +const timeFormat: Intl.DateTimeFormatOptions = { + + hour: '2-digit', + + minute: '2-digit', + + hour12: false, + +}; + + export const homePage = ( + +
} pageTitleOverride="Home"> + + +
+ + + + + + ``` + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/plugin-stack-overflow@0.1.3-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.4.23-next.0 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index c3ec2f3a51..57fe69590a 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.23-next.0", + "version": "0.4.23-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-stack-overflow": "^0.1.3-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-stack-overflow": "^0.1.3-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index f6845ac116..bc5bd32d10 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-ilert +## 0.1.33-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.33-next.0 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index 69a1728b76..8a14e8f3de 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.33-next.0", + "version": "0.1.33-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,12 +24,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@date-io/luxon": "1.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index ff91e37269..6a326c10cc 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-jenkins-backend +## 0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-jenkins-common@0.1.6-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 0.1.24-next.0 ### Patch Changes diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index ac78d61831..e6c5d22e53 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.24-next.0", + "version": "0.1.24-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,14 +25,14 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", - "@backstage/plugin-jenkins-common": "^0.1.5", - "@backstage/plugin-permission-common": "^0.6.2", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", + "@backstage/plugin-jenkins-common": "^0.1.6-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -41,7 +41,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", diff --git a/plugins/jenkins-common/CHANGELOG.md b/plugins/jenkins-common/CHANGELOG.md index 53cf222e5a..ea0afcde79 100644 --- a/plugins/jenkins-common/CHANGELOG.md +++ b/plugins/jenkins-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-jenkins-common +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/jenkins-common/package.json b/plugins/jenkins-common/package.json index 78d9cf2532..d6520cd085 100644 --- a/plugins/jenkins-common/package.json +++ b/plugins/jenkins-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins-common", - "version": "0.1.5", + "version": "0.1.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,11 +22,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2" + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 4519ba9e78..65680ea7c4 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-jenkins +## 0.7.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-jenkins-common@0.1.6-next.0 + ## 0.7.6-next.0 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 586fcf04dd..e7a20b9046 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.7.6-next.0", + "version": "0.7.6-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,13 +35,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-jenkins-common": "^0.1.5", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-jenkins-common": "^0.1.6-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -54,10 +54,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index 9a912b07ef..ef7514bdee 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-kafka-backend +## 0.2.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + ## 0.2.27-next.0 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index b78c297586..37c34733a0 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.27-next.0", + "version": "0.2.27-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -47,7 +47,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest-when": "^3.5.0", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index 06d84866f6..b7139b7e8c 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kafka +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 18dfdc05fc..3da853574f 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index a3747e47aa..e20634eb16 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-kubernetes-backend +## 0.7.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + ## 0.7.0-next.0 ### Minor Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 5ee2dfbc61..048d025bff 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.7.0-next.0", + "version": "0.7.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,10 +36,10 @@ }, "dependencies": { "@azure/identity": "^2.0.4", - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/plugin-kubernetes-common": "^0.4.0-next.0", "@google-cloud/container": "^4.0.0", "@kubernetes/client-node": "^0.16.0", @@ -61,7 +61,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/aws4": "^1.5.1", "aws-sdk-mock": "^5.2.1", "supertest": "^6.1.3" diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index 6b576f79ca..e109139f74 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -38,11 +38,11 @@ "url": "https://github.com/backstage/backstage/issues" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@kubernetes/client-node": "^0.16.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "jest": { "roots": [ diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index 3765441a95..4312cf5776 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kubernetes +## 0.6.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.6.7-next.0 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 1bc3b47f3c..35e685382d 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.6.7-next.0", + "version": "0.6.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@backstage/plugin-kubernetes-common": "^0.4.0-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@kubernetes/client-node": "^0.16.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index f3dc92b790..837bf0c598 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-lighthouse +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 2dc5aa5f04..8a1f484a35 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,12 +35,12 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -51,10 +51,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index b10750b453..ea33fd1444 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-newrelic-dashboard +## 0.1.15-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.15-next.0 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 969853a9dc..b488db090c 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.1.15-next.0", + "version": "0.1.15-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,19 +23,19 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5" diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 7753c672c8..6134eee42e 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-newrelic +## 0.3.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.3.25-next.0 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 7c67d63436..bb5a4d14ef 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.25-next.0", + "version": "0.3.25-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,9 +35,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -47,10 +47,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 0432f9ef45..5cbc78f41c 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-org +## 0.5.7-next.1 + +### Patch Changes + +- 1e984b11fc: Render namespaces for teams with subtitles in `MyGroupsSidebarItem` +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.5.7-next.0 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index 33d9f6da7f..f6927f7a28 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.5.7-next.0", + "version": "0.5.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,11 +29,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -48,11 +48,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 5222d06b45..43254df1ad 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-pagerduty +## 0.5.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.5.0-next.0 ### Minor Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 0c81aba5ad..63e6d0b951 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.5.0-next.0", + "version": "0.5.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index bc27a76e81..cb08e57f4d 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -24,7 +24,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@types/express": "*", "cross-fetch": "^3.0.6", @@ -35,7 +35,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", "supertest": "^6.1.6" diff --git a/plugins/periskop/CHANGELOG.md b/plugins/periskop/CHANGELOG.md index eb82d4cbac..0a167ae1be 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-periskop +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index b5c72b52fe..5918b0c45b 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,12 +25,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -42,10 +42,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 3c86015f00..e2b2cedb19 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-permission-backend +## 0.5.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + ## 0.5.9-next.0 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 69762f67de..cfc0ff899a 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.9-next.0", + "version": "0.5.9-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-node": "^0.6.3-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-node": "^0.6.3-next.1", "@types/express": "*", "dataloader": "^2.0.0", "express": "^4.17.1", @@ -39,7 +39,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index b578c1e8fb..769887f86e 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-permission-common +## 0.6.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.0-next.0 + ## 0.6.2 ### Patch Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index 3988bc0ded..4cf00f71bf 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-common", "description": "Isomorphic types and client for Backstage permissions and authorization", - "version": "0.6.2", + "version": "0.6.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { @@ -42,13 +42,13 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "cross-fetch": "^3.1.5", "uuid": "^8.0.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "msw": "^0.42.0" } diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 190dfbdbb5..d412a981eb 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-node +## 0.6.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 0.6.3-next.0 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index b6ef506197..f8f077cdc0 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.6.3-next.0", + "version": "0.6.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,18 +33,18 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", - "@backstage/plugin-permission-common": "^0.6.2", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", + "@backstage/plugin-permission-common": "^0.6.3-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", "supertest": "^6.1.3" diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index cd991549bd..aa6f06a45c 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-permission-react +## 0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 0.4.2 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index 98f1200881..f0dcc88de0 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.4.2", + "version": "0.4.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "dependencies": { "@backstage/config": "^1.0.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2", + "@backstage/plugin-permission-common": "^0.6.3-next.0", "cross-fetch": "^3.1.5", "react-router": "6.0.0-beta.0", "react-use": "^17.2.4", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@types/jest": "^26.0.7" diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 12a265516b..7eba901c54 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -32,7 +32,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -46,7 +46,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index bcea34e3c4..718e0ccff5 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -34,7 +34,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "camelcase-keys": "^7.0.1", @@ -50,8 +50,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", "supertest": "^6.1.3" diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index 67288eb5f0..44baedce85 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-rollbar +## 0.4.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.4.7-next.0 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index c75896f622..9e6079c548 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.4.7-next.0", + "version": "0.4.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,11 +35,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 199920e449..2bf18ee3a8 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + ## 0.2.9-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index b6e7a04b64..0420599cec 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.2.9-next.0", + "version": "0.2.9-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-scaffolder-backend": "^1.4.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-scaffolder-backend": "^1.4.0-next.1", "@backstage/config": "^1.0.1", "@backstage/types": "^1.0.0", "command-exists": "^1.2.9", @@ -35,7 +35,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index d5967d3c5f..1a1d249fd3 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.4.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + ## 0.4.2-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 2223c4787e..e42f34b762 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.4.2-next.0", + "version": "0.4.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,17 +24,17 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/plugin-scaffolder-backend": "^1.4.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/plugin-scaffolder-backend": "^1.4.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", "@backstage/types": "^1.0.0", "command-exists": "^1.2.9", "fs-extra": "^10.0.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index ba7ffe278c..b2ac690d5c 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend +## 1.4.0-next.1 + +### Patch Changes + +- 801d606909: Improve error messaging when passing in malformed auth +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-catalog-backend@1.2.1-next.1 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + ## 1.4.0-next.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index dba891bfa2..5cb901d766 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "1.4.0-next.0", + "version": "1.4.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,13 +34,13 @@ "build:assets": "node scripts/build-nunjucks.js" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-backend": "^1.2.1-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-backend": "^1.2.1-next.1", "@backstage/plugin-scaffolder-common": "^1.1.2-next.0", "@backstage/types": "^1.0.0", "@gitbeaker/core": "^35.6.0", @@ -76,8 +76,8 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index 06d178caf3..09503d0be6 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -39,10 +39,10 @@ "url": "https://github.com/backstage/backstage/issues" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" } } diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 715c2136f8..7492ceb582 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-scaffolder +## 1.4.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-permission-react@0.4.3-next.0 + ## 1.4.0-next.0 ### Minor Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 2c81ef7162..09c02ec969 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "1.4.0-next.0", + "version": "1.4.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,19 +35,19 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-permission-react": "^0.4.2", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-permission-react": "^0.4.3-next.0", "@backstage/plugin-scaffolder-common": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@codemirror/language": "^6.0.0", "@codemirror/legacy-modes": "^6.1.0", @@ -80,11 +80,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/search-backend-module-elasticsearch/CHANGELOG.md b/plugins/search-backend-module-elasticsearch/CHANGELOG.md index 72b81689dd..eadb4e5c8b 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 0.2.0-next.1 + +### Minor Changes + +- c5af773757: **BREAKING**: In order to remain interoperable with all currently supported + deployments of Elasticsearch, this package will now conditionally use either + the `@elastic/elasticsearch` or `@opensearch-project/opensearch` client when + communicating with your deployed cluster. + + If you do not rely on types exported from this package, or if you do not make + use of the `createElasticSearchClientOptions` or `newClient` methods on the + `ElasticSearchSearchEngine` class, then upgrading to this version should not + require any further action on your part. Everything will continue to work as it + always has. + + If you _do_ rely on either of the above methods or any underlying types, some + changes may be needed to your custom code. A type guard is now exported by this + package (`isOpenSearchCompatible(options)`), which you may use to help clarify + which client options are compatible with which client constructors. + + If you are using this package with the `search.elasticsearch.provider` set to + `aws`, and you are making use of the `newClient` method in particular, you may + wish to start using the `@opensearch-project/opensearch` client in your custom + code. + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.1.6-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 0bfc0902de..b12a87c37d 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-elasticsearch", "description": "A module for the search backend that implements search using ElasticSearch", - "version": "0.1.6-next.0", + "version": "0.2.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/plugin-search-backend-node": "^0.6.3-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/plugin-search-backend-node": "^0.6.3-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@elastic/elasticsearch": "^7.13.0", "@opensearch-project/opensearch": "^1.1.0", "aws-os-connection": "^0.1.0", @@ -36,8 +36,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/cli": "^0.18.0-next.1", "@elastic/elasticsearch-mock": "^1.0.0", "@short.io/opensearch-mock": "^0.3.1" }, diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index 054c477cfb..370339d9af 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend-module-pg +## 0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.3.5-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index cf072f5fe3..35d3d841f3 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-pg", "description": "A module for the search backend that implements search using PostgreSQL", - "version": "0.3.5-next.0", + "version": "0.3.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,15 +23,15 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/plugin-search-backend-node": "^0.6.3-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/plugin-search-backend-node": "^0.6.3-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", "lodash": "^4.17.21", "knex": "^1.0.2" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0" + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist", diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index 366cf55e6e..d1b631fd53 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-search-backend-node +## 0.6.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.6.3-next.0 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 0db5793549..47d613c160 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-node", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", - "version": "0.6.3-next.0", + "version": "0.6.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,12 +23,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@types/lunr": "^2.3.3", "lodash": "^4.17.21", "lunr": "^2.3.9", @@ -38,8 +38,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/ndjson": "^2.0.1" }, "files": [ diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index 9640805095..c779dbef3a 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-search-backend +## 0.5.4-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/plugin-auth-node@0.2.3-next.1 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-permission-node@0.6.3-next.1 + - @backstage/plugin-search-backend-node@0.6.3-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.5.4-next.0 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index bd2cc3ecb6..3e2e429b5a 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "0.5.4-next.0", + "version": "0.5.4-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,14 +23,14 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-auth-node": "^0.2.3-next.0", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-permission-node": "^0.6.3-next.0", - "@backstage/plugin-search-backend-node": "^0.6.3-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-auth-node": "^0.2.3-next.1", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-permission-node": "^0.6.3-next.1", + "@backstage/plugin-search-backend-node": "^0.6.3-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", "dataloader": "^2.0.0", @@ -43,7 +43,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search-common/CHANGELOG.md b/plugins/search-common/CHANGELOG.md index 53a8afb0bf..3623d21e93 100644 --- a/plugins/search-common/CHANGELOG.md +++ b/plugins/search-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-search-common +## 0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.3-next.0 + ## 0.3.5 ### Patch Changes diff --git a/plugins/search-common/package.json b/plugins/search-common/package.json index 86005e8756..65152206e2 100644 --- a/plugins/search-common/package.json +++ b/plugins/search-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-common", "description": "Common functionalities for Search, to be shared between various search-enabled plugins", - "version": "0.3.5", + "version": "0.3.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -40,10 +40,10 @@ }, "dependencies": { "@backstage/types": "^1.0.0", - "@backstage/plugin-permission-common": "^0.6.2" + "@backstage/plugin-permission-common": "^0.6.3-next.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "jest": { "roots": [ diff --git a/plugins/search-react/CHANGELOG.md b/plugins/search-react/CHANGELOG.md index 0d203f1c06..6ae54e736a 100644 --- a/plugins/search-react/CHANGELOG.md +++ b/plugins/search-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-react +## 0.2.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.2.2-next.0 ### Patch Changes diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index 925804ea52..2cc8782758 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-react", - "version": "0.2.2-next.0", + "version": "0.2.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", "@backstage/version-bridge": "^1.0.1", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,7 +49,7 @@ }, "devDependencies": { "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", "@testing-library/jest-dom": "^5.10.1", diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 985b7807c3..0c7f749f82 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/plugin-search +## 0.9.1-next.1 + +### Patch Changes + +- 509c4092f0: To allow people to use a global search context in the search modal, the code for the search modal has been changed to only create a local search context if there is no parent context already defined. + + If you want to continue using a local context even if you define a global one, you will have to wrap the modal in a new local context manually: + + ```tsx + + + + ``` + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 0.9.1-next.0 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index 196b09a874..e0fb5447f7 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "0.9.1-next.0", + "version": "0.9.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,15 +33,15 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-search-react": "^0.2.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-search-react": "^0.2.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", "@material-ui/core": "^4.12.2", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index 7a87d94aa6..eed3d21aa7 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-sentry +## 0.3.45-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.45-next.0 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index aaa008b368..f40a8d8178 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.3.45-next.0", + "version": "0.3.45-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,11 +35,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-table/core": "^3.1.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index 6343bf2b58..d65296efd7 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-shortcuts +## 0.2.8-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.2.8-next.0 ### Patch Changes diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index 651cbf64e1..54b3867df7 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.2.8-next.0", + "version": "0.2.8-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 01b09623e4..9a4f9aa752 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-sonarqube +## 0.3.7-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.7-next.0 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 6deb2cbebd..94888e1d95 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.3.7-next.0", + "version": "0.3.7-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,11 +36,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index d7f227a116..87a26d4d58 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-splunk-on-call +## 0.3.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.3.31-next.0 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index ca97ebca34..46443585cc 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.31-next.0", + "version": "0.3.31-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -51,10 +51,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/stack-overflow-backend/CHANGELOG.md b/plugins/stack-overflow-backend/CHANGELOG.md index 9f3a2d98a3..6c19f2bfe4 100644 --- a/plugins/stack-overflow-backend/CHANGELOG.md +++ b/plugins/stack-overflow-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-stack-overflow-backend +## 0.1.3-next.0 + +### Patch Changes + +- 52b4f796e3: app-config is now picked up properly. +- Updated dependencies + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index 083ab18b42..07cdbfb242 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow-backend", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@backstage/config": "^1.0.1", "qs": "^6.9.4", "cross-fetch": "^3.1.5", diff --git a/plugins/stack-overflow/CHANGELOG.md b/plugins/stack-overflow/CHANGELOG.md index 0b0845b7b6..097d8507a2 100644 --- a/plugins/stack-overflow/CHANGELOG.md +++ b/plugins/stack-overflow/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-stack-overflow +## 0.1.3-next.1 + +### Patch Changes + +- 52b4f796e3: app-config is now picked up properly. +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/plugin-home@0.4.23-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 0.1.3-next.0 ### Patch Changes diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index 793e42881d..f08db4618c 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow", - "version": "0.1.3-next.0", + "version": "0.1.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-home": "^0.4.23-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/theme": "^0.2.15", + "@backstage/plugin-home": "^0.4.23-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@testing-library/jest-dom": "^5.10.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 3911f2111f..4be66cb389 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + ## 0.1.18-next.0 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index c1d9b020e6..d0b3626ac5 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.18-next.0", + "version": "0.1.18-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/plugin-tech-insights-common": "^0.2.4", "@backstage/plugin-tech-insights-node": "^0.3.2-next.0", "ajv": "^8.10.0", @@ -46,7 +46,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index 41b303b5ca..ff5a703be2 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-insights-backend +## 0.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/catalog-client@1.0.4-next.1 + ## 0.4.2-next.0 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index 5461f22789..a5e180e715 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.4.2-next.0", + "version": "0.4.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@backstage/plugin-tech-insights-common": "^0.2.4", "@backstage/plugin-tech-insights-node": "^0.3.2-next.0", "@types/express": "^4.17.6", @@ -54,8 +54,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "@types/semver": "^7.3.8", "supertest": "^6.1.3", diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index 5d6bc49611..14ec147bb9 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -38,7 +38,7 @@ "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index f4e53ca987..3139865ddf 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -33,7 +33,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", + "@backstage/backend-common": "^0.14.1-next.1", "@backstage/config": "^1.0.1", "@backstage/plugin-tech-insights-common": "^0.2.4", "@backstage/types": "^1.0.0", @@ -42,7 +42,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0" + "@backstage/cli": "^0.18.0-next.1" }, "files": [ "dist" diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index 3a900ddda9..1948f639fe 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-insights +## 0.2.3-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.2.3-next.0 ### Patch Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index bcf8037b5d..6b628b04d7 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.2.3-next.0", + "version": "0.2.3-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,13 +28,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", "@backstage/plugin-tech-insights-common": "^0.2.4", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -47,10 +47,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index 96455c64b1..464c51f5b5 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-radar +## 0.5.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.5.14-next.0 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index 4bd4462cd1..87efc6ed36 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.14-next.0", + "version": "0.5.14-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/techdocs-addons-test-utils/CHANGELOG.md b/plugins/techdocs-addons-test-utils/CHANGELOG.md index 711a426a6a..43bb307fe2 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/plugin-catalog@1.3.1-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-techdocs@1.2.1-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/test-utils@1.1.2-next.1 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 1.0.2-next.0 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index 0debd31d49..58e4ec8657 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.2-next.0", + "version": "1.0.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,16 +32,16 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-app-api": "^1.0.4-next.0", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog": "^1.3.1-next.0", - "@backstage/plugin-search-react": "^0.2.2-next.0", - "@backstage/plugin-techdocs": "^1.2.1-next.0", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog": "^1.3.1-next.1", + "@backstage/plugin-search-react": "^0.2.2-next.1", + "@backstage/plugin-techdocs": "^1.2.1-next.1", "@backstage/plugin-techdocs-react": "^1.0.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -56,8 +56,8 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/dev-utils": "^1.0.4-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index b8bdde8fca..3222ee1c2a 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-techdocs-backend +## 1.2.0-next.1 + +### Minor Changes + +- 860765ff45: Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory` + +### Patch Changes + +- 726577958f: Add sample headings on the documented component homepage. +- Updated dependencies + - @backstage/plugin-techdocs-node@1.2.0-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-catalog-common@1.0.4-next.0 + - @backstage/plugin-permission-common@0.6.3-next.0 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 1.1.3-next.0 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index bf29eeb9af..5a96f3ab42 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "1.1.3-next.0", + "version": "1.2.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,16 +34,16 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-catalog-common": "^1.0.3", - "@backstage/plugin-permission-common": "^0.6.2", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-techdocs-node": "^1.1.3-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-catalog-common": "^1.0.4-next.0", + "@backstage/plugin-permission-common": "^0.6.3-next.0", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-techdocs-node": "^1.2.0-next.1", "@types/express": "^4.17.6", "dockerode": "^3.3.1", "express": "^4.17.1", @@ -56,9 +56,9 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.26-next.0", - "@backstage/cli": "^0.17.3-next.0", - "@backstage/plugin-search-backend-node": "0.6.3-next.0", + "@backstage/backend-test-utils": "^0.1.26-next.1", + "@backstage/cli": "^0.18.0-next.1", + "@backstage/plugin-search-backend-node": "0.6.3-next.1", "@types/dockerode": "^3.3.0", "msw": "^0.42.0", "supertest": "^6.1.3" diff --git a/plugins/techdocs-module-addons-contrib/CHANGELOG.md b/plugins/techdocs-module-addons-contrib/CHANGELOG.md index 1a1d9812bb..2f2626f925 100644 --- a/plugins/techdocs-module-addons-contrib/CHANGELOG.md +++ b/plugins/techdocs-module-addons-contrib/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-techdocs-module-addons-contrib +## 1.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + ## 1.0.2-next.0 ### Patch Changes diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index 864262b773..5e21bff816 100644 --- a/plugins/techdocs-module-addons-contrib/package.json +++ b/plugins/techdocs-module-addons-contrib/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-module-addons-contrib", "description": "Plugin module for contributed TechDocs Addons", - "version": "1.0.2-next.0", + "version": "1.0.2-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/integration-react": "^1.1.2-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/integration-react": "^1.1.2-next.1", "@backstage/plugin-techdocs-react": "^1.0.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -51,11 +51,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/plugin-techdocs-addons-test-utils": "^1.0.2-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/plugin-techdocs-addons-test-utils": "^1.0.2-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index 8a99e3a036..be88fd74b1 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs-node +## 1.2.0-next.1 + +### Minor Changes + +- 860765ff45: Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory` + +### Patch Changes + +- a5d73da942: Fix the flag parsing for `legacyCopyReadmeMdToIndexMd` in `techdocs-cli generate` command, and decouple it's logic from the `techdocs-ref` flag. +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + ## 1.1.3-next.0 ### Patch Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index 8d9e493d05..89e8d3c56c 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-node", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "1.1.3-next.0", + "version": "1.2.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -42,12 +42,12 @@ "dependencies": { "@azure/identity": "^2.0.1", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", "@google-cloud/storage": "^6.0.0", "@trendyol-js/openstack-swift-sdk": "^0.0.5", "@types/express": "^4.17.6", @@ -64,7 +64,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json index 698cff4c84..7209bab004 100644 --- a/plugins/techdocs-react/package.json +++ b/plugins/techdocs-react/package.json @@ -35,8 +35,8 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", "@backstage/version-bridge": "^1.0.1", "@material-ui/core": "^4.12.2", @@ -56,8 +56,8 @@ "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", - "@backstage/test-utils": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15" + "@backstage/test-utils": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0" }, "files": [ "alpha", diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index b7367c4ee5..7d8fb30bbb 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs +## 1.2.1-next.1 + +### Patch Changes + +- 726577958f: Remove the 60% factor from the font size calculation of headers to use the exact size defined in BackstageTheme. +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/integration@1.2.2-next.1 + - @backstage/integration-react@1.1.2-next.1 + - @backstage/plugin-catalog-react@1.1.2-next.1 + - @backstage/plugin-search-common@0.3.6-next.0 + - @backstage/plugin-search-react@0.2.2-next.1 + ## 1.2.1-next.0 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 9890173851..612b6a4b9e 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "1.2.1-next.0", + "version": "1.2.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,18 +35,18 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", - "@backstage/integration-react": "^1.1.2-next.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/plugin-search-common": "^0.3.5", - "@backstage/plugin-search-react": "^0.2.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", + "@backstage/integration-react": "^1.1.2-next.1", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/plugin-search-common": "^0.3.6-next.0", + "@backstage/plugin-search-react": "^0.2.2-next.1", "@backstage/plugin-techdocs-react": "^1.0.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -67,10 +67,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index e2cec9e01e..005a900f20 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-todo-backend +## 0.1.31-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/catalog-client@1.0.4-next.1 + - @backstage/integration@1.2.2-next.1 + ## 0.1.31-next.0 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index 97053da997..e1214f8dc1 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo-backend", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", - "version": "0.1.31-next.0", + "version": "0.1.31-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,12 +29,12 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/catalog-client": "^1.0.4-next.0", - "@backstage/catalog-model": "^1.1.0-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/catalog-client": "^1.0.4-next.1", + "@backstage/catalog-model": "^1.1.0-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.2.2-next.0", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/integration": "^1.2.2-next.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -43,7 +43,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/supertest": "^2.0.8", "msw": "^0.42.0", "supertest": "^6.1.3" diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index a1ef01aea5..5f0d94f1d1 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-todo +## 0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.2.9-next.0 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 0e17b6ef10..e5e4dcd103 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo", "description": "A Backstage plugin that lets you browse TODO comments in your source code", - "version": "0.2.9-next.0", + "version": "0.2.9-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,12 +30,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 1fcdc650d1..783871bef8 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-user-settings +## 0.4.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/theme@0.2.16-next.0 + ## 0.4.6-next.0 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index e186e2539d..ba2b02d067 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.4.6-next.0", + "version": "0.4.6-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/theme": "^0.2.15", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/vault-backend/CHANGELOG.md b/plugins/vault-backend/CHANGELOG.md index 5c12ada8f5..d47d46870d 100644 --- a/plugins/vault-backend/CHANGELOG.md +++ b/plugins/vault-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-vault-backend +## 0.2.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.14.1-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/backend-tasks@0.3.3-next.1 + - @backstage/backend-test-utils@0.1.26-next.1 + ## 0.2.0-next.0 ### Minor Changes diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index 490a19be6d..9996c521f7 100644 --- a/plugins/vault-backend/package.json +++ b/plugins/vault-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault-backend", "description": "A Backstage backend plugin that integrates towards Vault", - "version": "0.2.0-next.0", + "version": "0.2.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.14.1-next.0", - "@backstage/backend-tasks": "^0.3.3-next.0", - "@backstage/backend-test-utils": "^0.1.26-next.0", + "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/backend-tasks": "^0.3.3-next.1", + "@backstage/backend-test-utils": "^0.1.26-next.1", "@backstage/config": "^1.0.1", - "@backstage/errors": "^1.0.0", + "@backstage/errors": "^1.1.0-next.0", "@types/express": "*", "compression": "^1.7.4", "cors": "^2.8.5", @@ -51,7 +51,7 @@ "yn": "^5.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@types/compression": "^1.7.2", "@types/supertest": "^2.0.8", "msw": "^0.42.0", diff --git a/plugins/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md index 3b371bf5b9..af82aedff4 100644 --- a/plugins/vault/CHANGELOG.md +++ b/plugins/vault/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-vault +## 0.1.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/catalog-model@1.1.0-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + - @backstage/plugin-catalog-react@1.1.2-next.1 + ## 0.1.1-next.0 ### Patch Changes diff --git a/plugins/vault/package.json b/plugins/vault/package.json index 01b3182641..8c0fd85fdd 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault", "description": "A Backstage plugin that integrates towards Vault", - "version": "0.1.1-next.0", + "version": "0.1.1-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,12 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/catalog-model": "^1.1.0-next.0", - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/catalog-model": "^1.1.0-next.1", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/plugin-catalog-react": "^1.1.2-next.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.2-next.1", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.57", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 3e1e1ad9c2..94179d1e6b 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-xcmetrics +## 0.2.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.9.6-next.1 + - @backstage/errors@1.1.0-next.0 + - @backstage/theme@0.2.16-next.0 + ## 0.2.27-next.0 ### Patch Changes diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index 1ab1c9f844..572502f68b 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.27-next.0", + "version": "0.2.27-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,10 +24,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.9.6-next.0", + "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/errors": "^1.0.0", - "@backstage/theme": "^0.2.15", + "@backstage/errors": "^1.1.0-next.0", + "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.17.3-next.0", + "@backstage/cli": "^0.18.0-next.1", "@backstage/core-app-api": "^1.0.4-next.0", - "@backstage/dev-utils": "^1.0.4-next.0", - "@backstage/test-utils": "^1.1.2-next.0", + "@backstage/dev-utils": "^1.0.4-next.1", + "@backstage/test-utils": "^1.1.2-next.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/yarn.lock b/yarn.lock index b038eb72df..52cc4b6630 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1595,6 +1595,15 @@ zen-observable "^0.8.15" zod "^3.11.6" +"@backstage/errors@^1.0.0": + version "1.0.0" + resolved "https://registry.npmjs.org/@backstage/errors/-/errors-1.0.0.tgz#08ebf53afdeaca32362955ea8551e8ffa0bb3cd7" + integrity sha512-2SpjdhH9ZOQ4RGEeu3/A7ARkl/1E9E6uBGQZ2DZOU4azTK1UZG/HE1KBMOThp3jL/8is2vOIJZLBA3r3DxLfVw== + dependencies: + "@backstage/types" "^1.0.0" + cross-fetch "^3.1.5" + serialize-error "^8.0.1" + "@backstage/integration-react@^1.0.0": version "1.1.1" resolved "https://registry.npmjs.org/@backstage/integration-react/-/integration-react-1.1.1.tgz#936fd1441c47709fa8825360ea14ada26046b910" @@ -1624,6 +1633,14 @@ lodash "^4.17.21" luxon "^2.0.2" +"@backstage/plugin-catalog-common@^1.0.3": + version "1.0.3" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-common/-/plugin-catalog-common-1.0.3.tgz#96b1de2847fec0533c49ee19f93781777eedfd0d" + integrity sha512-Sf5IQocTRQaTh9ofZUy4/szWwDl5Eek6odKVx6v33jrMot5i3grybOELrVM3/Kgcr+5/ixSSopgQPUFO/T9KBA== + dependencies: + "@backstage/plugin-permission-common" "^0.6.2" + "@backstage/plugin-search-common" "^0.3.5" + "@backstage/plugin-catalog-react@^1.0.0", "@backstage/plugin-catalog-react@^1.1.1": version "1.1.1" resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-1.1.1.tgz#0441bcf1291349ad355ff51e28245d7ea26a3e01" @@ -1672,6 +1689,38 @@ react-router "6.0.0-beta.0" react-use "^17.2.4" +"@backstage/plugin-permission-common@^0.6.2": + version "0.6.2" + resolved "https://registry.npmjs.org/@backstage/plugin-permission-common/-/plugin-permission-common-0.6.2.tgz#2ab5cf3d8a4a3394edc0d552719df4f34804bfbb" + integrity sha512-tbKjm0xw6stoaFzeWL59XRz/yEEXxnBMgm3ioNbh0Qdbj44z8KivjkDjWPovI5DW6x0jFxzLQYCNMlZxOpqL6A== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/errors" "^1.0.0" + cross-fetch "^3.1.5" + uuid "^8.0.0" + zod "^3.11.6" + +"@backstage/plugin-permission-react@^0.4.2": + version "0.4.2" + resolved "https://registry.npmjs.org/@backstage/plugin-permission-react/-/plugin-permission-react-0.4.2.tgz#efc39619617e5800a68728871b87c772a0861711" + integrity sha512-isofTbK1gFgLTgr51efbFO0jWOkhQwzErL24pwY6gFVKnz7Z53AfGv1lHabxAWnNhEyTzLPMA/7s7lKuKEtOXw== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/core-plugin-api" "^1.0.3" + "@backstage/plugin-permission-common" "^0.6.2" + cross-fetch "^3.1.5" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + swr "^1.1.2" + +"@backstage/plugin-search-common@^0.3.5": + version "0.3.5" + resolved "https://registry.npmjs.org/@backstage/plugin-search-common/-/plugin-search-common-0.3.5.tgz#6a374541f2bd7d9545e29abbaecc70e7ad1b5ea3" + integrity sha512-sq7IDjCLrgZQHBFi+lFVkna3lLRA5eldiTbit/rCUCO4Eq52lWdQHLrQAhsyuObmIWHDh6R2lp2qoL6aAC2AOg== + dependencies: + "@backstage/plugin-permission-common" "^0.6.2" + "@backstage/types" "^1.0.0" + "@backstage/plugin-stack-overflow@^0.1.2": version "0.1.2" resolved "https://registry.npmjs.org/@backstage/plugin-stack-overflow/-/plugin-stack-overflow-0.1.2.tgz#bc140bb22d239a7106f91ea1d4c637551dc91ca5" @@ -1691,6 +1740,13 @@ qs "^6.9.4" react-use "^17.2.4" +"@backstage/theme@^0.2.15", "@backstage/theme@^0.2.6", "@backstage/theme@^0.2.7", "@backstage/theme@^0.2.9": + version "0.2.15" + resolved "https://registry.npmjs.org/@backstage/theme/-/theme-0.2.15.tgz#478491c9bca9dca85d5af08767ba512eabcd3669" + integrity sha512-Srl5q0X47tFofw6wuElkUqtlbYSfA3J3zlfN6jcQF4801mTrFRw+pVxZmrdxayt4gUzCN+me3mO7tij6F6xQUQ== + dependencies: + "@material-ui/core" "^4.12.2" + "@balena/dockerignore@^1.0.2": version "1.0.2" resolved "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" @@ -12521,63 +12577,63 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" "example-app@link:packages/app": - version "0.2.73-next.0" + version "0.2.73-next.1" dependencies: - "@backstage/app-defaults" "^1.0.4-next.0" - "@backstage/catalog-model" "^1.1.0-next.0" - "@backstage/cli" "^0.17.3-next.0" + "@backstage/app-defaults" "^1.0.4-next.1" + "@backstage/catalog-model" "^1.1.0-next.1" + "@backstage/cli" "^0.18.0-next.1" "@backstage/config" "^1.0.1" "@backstage/core-app-api" "^1.0.4-next.0" - "@backstage/core-components" "^0.9.6-next.0" + "@backstage/core-components" "^0.9.6-next.1" "@backstage/core-plugin-api" "^1.0.3" - "@backstage/integration-react" "^1.1.2-next.0" - "@backstage/plugin-airbrake" "^0.3.7-next.0" - "@backstage/plugin-apache-airflow" "^0.1.15-next.0" - "@backstage/plugin-api-docs" "^0.8.7-next.0" - "@backstage/plugin-azure-devops" "^0.1.23-next.0" - "@backstage/plugin-badges" "^0.2.31-next.0" - "@backstage/plugin-catalog" "^1.3.1-next.0" - "@backstage/plugin-catalog-common" "^1.0.3" - "@backstage/plugin-catalog-graph" "^0.2.19-next.0" - "@backstage/plugin-catalog-import" "^0.8.10-next.0" - "@backstage/plugin-catalog-react" "^1.1.2-next.0" - "@backstage/plugin-circleci" "^0.3.7-next.0" - "@backstage/plugin-cloudbuild" "^0.3.7-next.0" - "@backstage/plugin-code-coverage" "^0.1.34-next.0" - "@backstage/plugin-cost-insights" "^0.11.29-next.0" - "@backstage/plugin-dynatrace" "^0.1.1-next.0" - "@backstage/plugin-explore" "^0.3.38-next.0" - "@backstage/plugin-gcalendar" "^0.3.3-next.0" - "@backstage/plugin-gcp-projects" "^0.3.26-next.0" - "@backstage/plugin-github-actions" "^0.5.7-next.0" - "@backstage/plugin-gocd" "^0.1.13-next.0" - "@backstage/plugin-graphiql" "^0.2.39-next.0" - "@backstage/plugin-home" "^0.4.23-next.0" - "@backstage/plugin-jenkins" "^0.7.6-next.0" - "@backstage/plugin-kafka" "^0.3.7-next.0" - "@backstage/plugin-kubernetes" "^0.6.7-next.0" - "@backstage/plugin-lighthouse" "^0.3.7-next.0" - "@backstage/plugin-newrelic" "^0.3.25-next.0" - "@backstage/plugin-newrelic-dashboard" "^0.1.15-next.0" - "@backstage/plugin-org" "^0.5.7-next.0" - "@backstage/plugin-pagerduty" "0.5.0-next.0" - "@backstage/plugin-permission-react" "^0.4.2" - "@backstage/plugin-rollbar" "^0.4.7-next.0" - "@backstage/plugin-scaffolder" "^1.4.0-next.0" - "@backstage/plugin-search" "^0.9.1-next.0" - "@backstage/plugin-search-common" "^0.3.5" - "@backstage/plugin-search-react" "^0.2.2-next.0" - "@backstage/plugin-sentry" "^0.3.45-next.0" - "@backstage/plugin-shortcuts" "^0.2.8-next.0" - "@backstage/plugin-stack-overflow" "^0.1.3-next.0" - "@backstage/plugin-tech-insights" "^0.2.3-next.0" - "@backstage/plugin-tech-radar" "^0.5.14-next.0" - "@backstage/plugin-techdocs" "^1.2.1-next.0" - "@backstage/plugin-techdocs-module-addons-contrib" "^1.0.2-next.0" + "@backstage/integration-react" "^1.1.2-next.1" + "@backstage/plugin-airbrake" "^0.3.7-next.1" + "@backstage/plugin-apache-airflow" "^0.2.0-next.1" + "@backstage/plugin-api-docs" "^0.8.7-next.1" + "@backstage/plugin-azure-devops" "^0.1.23-next.1" + "@backstage/plugin-badges" "^0.2.31-next.1" + "@backstage/plugin-catalog" "^1.3.1-next.1" + "@backstage/plugin-catalog-common" "^1.0.4-next.0" + "@backstage/plugin-catalog-graph" "^0.2.19-next.1" + "@backstage/plugin-catalog-import" "^0.8.10-next.1" + "@backstage/plugin-catalog-react" "^1.1.2-next.1" + "@backstage/plugin-circleci" "^0.3.7-next.1" + "@backstage/plugin-cloudbuild" "^0.3.7-next.1" + "@backstage/plugin-code-coverage" "^0.1.34-next.1" + "@backstage/plugin-cost-insights" "^0.11.29-next.1" + "@backstage/plugin-dynatrace" "^0.1.1-next.1" + "@backstage/plugin-explore" "^0.3.38-next.1" + "@backstage/plugin-gcalendar" "^0.3.3-next.1" + "@backstage/plugin-gcp-projects" "^0.3.26-next.1" + "@backstage/plugin-github-actions" "^0.5.7-next.1" + "@backstage/plugin-gocd" "^0.1.13-next.1" + "@backstage/plugin-graphiql" "^0.2.39-next.1" + "@backstage/plugin-home" "^0.4.23-next.1" + "@backstage/plugin-jenkins" "^0.7.6-next.1" + "@backstage/plugin-kafka" "^0.3.7-next.1" + "@backstage/plugin-kubernetes" "^0.6.7-next.1" + "@backstage/plugin-lighthouse" "^0.3.7-next.1" + "@backstage/plugin-newrelic" "^0.3.25-next.1" + "@backstage/plugin-newrelic-dashboard" "^0.1.15-next.1" + "@backstage/plugin-org" "^0.5.7-next.1" + "@backstage/plugin-pagerduty" "0.5.0-next.1" + "@backstage/plugin-permission-react" "^0.4.3-next.0" + "@backstage/plugin-rollbar" "^0.4.7-next.1" + "@backstage/plugin-scaffolder" "^1.4.0-next.1" + "@backstage/plugin-search" "^0.9.1-next.1" + "@backstage/plugin-search-common" "^0.3.6-next.0" + "@backstage/plugin-search-react" "^0.2.2-next.1" + "@backstage/plugin-sentry" "^0.3.45-next.1" + "@backstage/plugin-shortcuts" "^0.2.8-next.1" + "@backstage/plugin-stack-overflow" "^0.1.3-next.1" + "@backstage/plugin-tech-insights" "^0.2.3-next.1" + "@backstage/plugin-tech-radar" "^0.5.14-next.1" + "@backstage/plugin-techdocs" "^1.2.1-next.1" + "@backstage/plugin-techdocs-module-addons-contrib" "^1.0.2-next.1" "@backstage/plugin-techdocs-react" "^1.0.2-next.0" - "@backstage/plugin-todo" "^0.2.9-next.0" - "@backstage/plugin-user-settings" "^0.4.6-next.0" - "@backstage/theme" "^0.2.15" + "@backstage/plugin-todo" "^0.2.9-next.1" + "@backstage/plugin-user-settings" "^0.4.6-next.1" + "@backstage/theme" "^0.2.16-next.0" "@material-ui/core" "^4.12.2" "@material-ui/icons" "^4.9.1" "@material-ui/lab" "4.0.0-alpha.57" @@ -24452,21 +24508,21 @@ tdigest@^0.1.1: bintrees "1.0.1" "techdocs-cli-embedded-app@link:packages/techdocs-cli-embedded-app": - version "0.2.72-next.0" + version "0.2.72-next.1" dependencies: - "@backstage/app-defaults" "^1.0.4-next.0" - "@backstage/catalog-model" "^1.1.0-next.0" - "@backstage/cli" "^0.17.3-next.0" + "@backstage/app-defaults" "^1.0.4-next.1" + "@backstage/catalog-model" "^1.1.0-next.1" + "@backstage/cli" "^0.18.0-next.1" "@backstage/config" "^1.0.1" "@backstage/core-app-api" "^1.0.4-next.0" - "@backstage/core-components" "^0.9.6-next.0" + "@backstage/core-components" "^0.9.6-next.1" "@backstage/core-plugin-api" "^1.0.3" - "@backstage/integration-react" "^1.1.2-next.0" - "@backstage/plugin-catalog" "^1.3.1-next.0" - "@backstage/plugin-techdocs" "^1.2.1-next.0" + "@backstage/integration-react" "^1.1.2-next.1" + "@backstage/plugin-catalog" "^1.3.1-next.1" + "@backstage/plugin-techdocs" "^1.2.1-next.1" "@backstage/plugin-techdocs-react" "^1.0.2-next.0" - "@backstage/test-utils" "^1.1.2-next.0" - "@backstage/theme" "^0.2.15" + "@backstage/test-utils" "^1.1.2-next.1" + "@backstage/theme" "^0.2.16-next.0" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" history "^5.0.0" From d1994e7ed11de5cf2c5cc6e3b764aefeceaf997f Mon Sep 17 00:00:00 2001 From: "denis.fortin" Date: Tue, 28 Jun 2022 11:43:16 +0200 Subject: [PATCH 092/212] fix(vault-plugin): rework Signed-off-by: denis.fortin --- .changeset/moody-crabs-march.md | 2 +- .../EntityVaultTable/EntityVaultTable.tsx | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.changeset/moody-crabs-march.md b/.changeset/moody-crabs-march.md index f3ae24629a..b5ddf12ffa 100644 --- a/.changeset/moody-crabs-march.md +++ b/.changeset/moody-crabs-march.md @@ -3,4 +3,4 @@ '@backstage/plugin-vault-backend': patch --- -Added a path notion in addition to secret name to allow to differentiate secrets in subpaths +Added a path notion in addition to secret name to allow to differentiate secrets in sub-paths diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx index 5923a4db6b..efc345b07f 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx @@ -32,13 +32,6 @@ export const vaultSecretPath = (entity: Entity) => { return { secretPath }; }; -function getSecretRelativeName( - secretPath: string, - secret: VaultSecret, -): string { - return `${secret.path.replace(`${secretPath}/`, '')}/${secret.name}`; -} - export const EntityVaultTable = ({ entity }: { entity: Entity }) => { const vaultApi = useApi(vaultApiRef); const { secretPath } = vaultSecretPath(entity); @@ -60,12 +53,16 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { ]; const data = (value || []).map(secret => { + const secretName = `${secret.path.replace(`${secretPath}/`, '')}/${ + secret.name + }`; + return { - secret: getSecretRelativeName(secretPath, secret), + secret: secretName, view: ( @@ -74,7 +71,7 @@ export const EntityVaultTable = ({ entity }: { entity: Entity }) => { edit: ( From 14146703e5bb5389316e006c30afadf8f7f5a4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Aym=C3=A0?= Date: Tue, 28 Jun 2022 12:59:32 +0200 Subject: [PATCH 093/212] Add allowArbitraryValues in OwnedEntityPicker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joan Aymà --- .changeset/weak-jeans-cry.md | 5 +++++ .../fields/OwnedEntityPicker/OwnedEntityPicker.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/weak-jeans-cry.md diff --git a/.changeset/weak-jeans-cry.md b/.changeset/weak-jeans-cry.md new file mode 100644 index 0000000000..7be5c50279 --- /dev/null +++ b/.changeset/weak-jeans-cry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Add allowArbitraryValues to ui:options in OwnedEntityPicker uiSchema, similar to allowArbitraryValues in EntityPicker diff --git a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx index 8e3590e8bf..d176c0ec59 100644 --- a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx @@ -60,6 +60,8 @@ export const OwnedEntityPicker = ( const allowedKinds = uiSchema['ui:options']?.allowedKinds; const defaultKind = uiSchema['ui:options']?.defaultKind; + const allowArbitraryValues = + uiSchema['ui:options']?.allowArbitraryValues ?? true; const { ownedEntities, loading } = useOwnedEntities(allowedKinds); const entityRefs = ownedEntities?.items @@ -83,7 +85,7 @@ export const OwnedEntityPicker = ( onChange={onSelect} options={entityRefs || []} autoSelect - freeSolo + freeSolo={allowArbitraryValues} renderInput={params => ( Date: Tue, 28 Jun 2022 11:01:10 +0000 Subject: [PATCH 094/212] chore(deps): update dependency nodemon to v2.0.18 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 52cc4b6630..a4d732961e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19204,9 +19204,9 @@ node-releases@^2.0.1: integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== nodemon@^2.0.2: - version "2.0.16" - resolved "https://registry.npmjs.org/nodemon/-/nodemon-2.0.16.tgz#d71b31bfdb226c25de34afea53486c8ef225fdef" - integrity sha512-zsrcaOfTWRuUzBn3P44RDliLlp263Z/76FPoHFr3cFFkOz0lTPAcIw8dCzfdVIx/t3AtDYCZRCDkoCojJqaG3w== + version "2.0.18" + resolved "https://registry.npmjs.org/nodemon/-/nodemon-2.0.18.tgz#0f5a3aa7b4587f2626e6f01369deba89cb0462a2" + integrity sha512-uAvrKipi2zAz8E7nkSz4qW4F4zd5fs2wNGsTx+xXlP8KXqd9ucE0vY9wankOsPboeDyuUGN9vsXGV1pLn80l/A== dependencies: chokidar "^3.5.2" debug "^3.2.7" From 2674a4148fad04c0ae957a5d83b4cafdc6005414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Aym=C3=A0?= Date: Tue, 28 Jun 2022 13:30:37 +0200 Subject: [PATCH 095/212] add allowArbitraryValues to OwnedEntityPicker ui:options list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joan Aymà --- .../components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx index d176c0ec59..a280ebad6a 100644 --- a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx @@ -37,6 +37,7 @@ import { FieldExtensionComponentProps } from '../../../extensions'; export interface OwnedEntityPickerUiOptions { allowedKinds?: string[]; defaultKind?: string; + allowArbitraryValues?: boolean; } /** From 67e32e15500c665fb44de1d5197ceb72f5c1c202 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:37:34 +0000 Subject: [PATCH 096/212] fix(deps): update dependency @rollup/plugin-commonjs to v22.0.1 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a4d732961e..bcc192f64f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5382,9 +5382,9 @@ react-use "^17.2.4" "@rollup/plugin-commonjs@^22.0.0": - version "22.0.0" - resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz#f4d87016e2fbf187a593ab9f46626fe05b59e8bd" - integrity sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ== + version "22.0.1" + resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.1.tgz#f7cb777d20de3eeeaf994f39080115c336bef810" + integrity sha512-dGfEZvdjDHObBiP5IvwTKMVeq/tBZGMBHZFMdIV1ClMM/YoWS34xrHFGfag9SN2ZtMgNZRFruqvxZQEa70O6nQ== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" From b8ca2f4f2e82a75341d309e95af4346ef3268ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Aym=C3=A0?= Date: Tue, 28 Jun 2022 13:40:53 +0200 Subject: [PATCH 097/212] update changeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joan Aymà --- .changeset/weak-jeans-cry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/weak-jeans-cry.md b/.changeset/weak-jeans-cry.md index 7be5c50279..79f419e3db 100644 --- a/.changeset/weak-jeans-cry.md +++ b/.changeset/weak-jeans-cry.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder': patch --- -Add allowArbitraryValues to ui:options in OwnedEntityPicker uiSchema, similar to allowArbitraryValues in EntityPicker +Add `allowArbitraryValues` to `ui:options` in `OwnedEntityPicker`, similar to `allowArbitraryValues` in `EntityPicker` From 9ddaeb014c1322738d5cbd857af607bc28c7be62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Aym=C3=A0?= Date: Tue, 28 Jun 2022 14:42:49 +0200 Subject: [PATCH 098/212] update api-reports for allowArbitraryValues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joan Aymà --- plugins/scaffolder/api-report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 9ffca426ac..c20cd0eb67 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -153,6 +153,8 @@ export const OwnedEntityPickerFieldExtension: FieldExtensionComponent< // @public export interface OwnedEntityPickerUiOptions { + // (undocumented) + allowArbitraryValues?: boolean; // (undocumented) allowedKinds?: string[]; // (undocumented) From 5a36f20cc655ea5b4e42646fd7808d059e027680 Mon Sep 17 00:00:00 2001 From: planeiii Date: Tue, 28 Jun 2022 09:07:28 -0500 Subject: [PATCH 099/212] chore: added standards-compliant Promise.any implementation Signed-off-by: planeiii --- plugins/jenkins-backend/package.json | 1 + .../jenkins-backend/src/service/jenkinsApi.ts | 28 ++++--------------- yarn.lock | 5 ++++ 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index 1ab98c3255..46e9ed78a0 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -37,6 +37,7 @@ "express": "^4.17.1", "express-promise-router": "^4.1.0", "jenkins": "^0.28.1", + "promise-any-polyfill": "^1.0.1", "winston": "^3.2.1", "yn": "^4.0.0" }, diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts index eaeff9096c..ae2fa0f7b5 100644 --- a/plugins/jenkins-backend/src/service/jenkinsApi.ts +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -30,27 +30,11 @@ import { import { jenkinsExecutePermission } from '@backstage/plugin-jenkins-common'; import { NotAllowedError } from '@backstage/errors'; -// polyfill Promise.any for Node v14 -const anyPromise = (any => { - if (any) { - // bind is required by tsc - return any.bind(Promise); - } - - // reverse promise resolution (rejects become resolves and visa versa) - const reverse = (promise: Promise): Promise => - new Promise((resolve, reject) => - Promise.resolve(promise).then(reject, resolve), - ); - - return ( - iterable: Iterable>, - ): Promise => - Promise.all([...iterable].map(reverse)).then( - results => reverse(Promise.resolve(results[0])), - reverse, - ); -})(Promise.any); +if (!Promise.any) { + (async () => { + await import('promise-any-polyfill'); + })(); +} export class JenkinsApiImpl { private static readonly lastBuildTreeSpec = `lastBuild[ @@ -99,7 +83,7 @@ export class JenkinsApiImpl { if (branches) { // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. // TODO: extract a strategy interface for this - const job = await anyPromise( + const job = await Promise.any( branches.map(branch => client.job.get({ name: `${jenkinsInfo.jobFullName}/${branch}`, diff --git a/yarn.lock b/yarn.lock index bd2b1ff7bc..8d7fe5fa30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20902,6 +20902,11 @@ promise-all-reject-late@^1.0.0: resolved "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== +promise-any-polyfill@^1.0.1: + version "1.0.1" + resolved "https://artifactory.thousandeyes.com/artifactory/api/npm/npm/promise-any-polyfill/-/promise-any-polyfill-1.0.1.tgz#563872dd0abd370bfa8039e63980469b4b8b0d53" + integrity sha1-Vjhy3Qq9Nwv6gDnmOYBGm0uLDVM= + promise-call-limit@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz#4bdee03aeb85674385ca934da7114e9bcd3c6e24" From 652c64684e3aa54127457c12b7a61e0350a0dc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 28 Jun 2022 16:18:32 +0200 Subject: [PATCH 100/212] Use the custom cron action for DCO and renovate merges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Patrik Oldsberg Co-authored-by: blam Co-authored-by: Johan Haals Signed-off-by: Fredrik Adelöw --- .../automate_merge_renovate_prs.yaml | 85 ------------------- .github/workflows/cron.yml | 11 +++ .github/workflows/verify_dco.yaml | 65 -------------- 3 files changed, 11 insertions(+), 150 deletions(-) delete mode 100644 .github/workflows/automate_merge_renovate_prs.yaml create mode 100644 .github/workflows/cron.yml delete mode 100644 .github/workflows/verify_dco.yaml diff --git a/.github/workflows/automate_merge_renovate_prs.yaml b/.github/workflows/automate_merge_renovate_prs.yaml deleted file mode 100644 index 8de488cf05..0000000000 --- a/.github/workflows/automate_merge_renovate_prs.yaml +++ /dev/null @@ -1,85 +0,0 @@ -name: Automate Merge Renovate PRs - -on: - workflow_dispatch: - schedule: - - cron: '*/10 * * * *' - -jobs: - diff: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v6 - with: - script: | - const owner = "backstage"; - const repo = "backstage"; - const query = `{ - repository(owner: "backstage", name: "backstage") { - pullRequests(labels: ["dependencies"], last: 10, states: [OPEN]) { - nodes { - title - author { - login - } - number - mergeable - files(first: 1) { - nodes { - path - } - } - changedFiles - commits(last: 1) { - nodes { - commit { - statusCheckRollup { - state - } - } - } - } - reviewDecision - reviews(first: 10) { - nodes { - author { - login - } - } - } - } - } - } - }`; - - const date = new Date(); - if (date.getDay() === 2) { - console.log("Skipping auto merge because Tuesday is release day"); - return; - } - - const r = await github.graphql(query); - const mergable = r.repository.pullRequests.nodes.filter( - (pr) => - pr.author.login === "renovate" && - pr.mergeable === "MERGEABLE" && - pr.changedFiles === 1 && - pr.files.nodes[0].path.split("/").slice(-1)[0] === "yarn.lock" && - pr.commits.nodes[0].commit.statusCheckRollup.state === "SUCCESS" && - pr.reviewDecision === "APPROVED" - ); - - if (mergable.length === 0) { - console.log("no mergable PRs"); - return; - } - - for (const pr of mergable) { - console.log(`Merging #${pr.number} - ${pr.title}`); - await github.rest.pulls.merge({ - owner, - repo, - pull_number: pr.number, - }); - await new Promise((r) => setTimeout(r, 2000)); - } diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 0000000000..394d726fef --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,11 @@ +name: Cron +on: + workflow_dispatch: + schedule: + - cron: '*/5 * * * *' + +jobs: + cron: + runs-on: ubuntu-latest + steps: + - uses: backstage/actions/cron@v0.1.3 diff --git a/.github/workflows/verify_dco.yaml b/.github/workflows/verify_dco.yaml deleted file mode 100644 index 2094327d23..0000000000 --- a/.github/workflows/verify_dco.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Verify DCO -on: - schedule: - - cron: '*/15 * * * *' - -jobs: - dco-helper: - runs-on: ubuntu-latest - steps: - - name: Verify DCO status for open pull requests - uses: actions/github-script@v6 - with: - script: | - const owner = "backstage"; - const repo = "backstage"; - const pulls = await github.paginate(github.rest.pulls.list, { - state: "open", - owner, - repo, - }); - - for (const pull of pulls) { - // Pick out the PRs that have the DCO check - const checks = await github.rest.checks.listForRef({ - owner, - repo, - ref: pull.head.sha, - check_name: "DCO", - status: "completed", - }); - // Skip if there are no checks - if (!checks.data.check_runs.length) { - continue; - } - // Skip if the conclusion is not action_required - if (checks.data.check_runs[0].conclusion !== "action_required") { - console.log(`No checks found for PR #${pull.number}, skipping`); - continue; - } - - const comments = await github.paginate(github.rest.issues.listComments, { - owner, - repo, - issue_number: pull.number, - }); - if (comments.find((c) => - c.user.login === "github-actions[bot]" && - c.body.includes("") - ) - ) { - console.log(`already commented on PR #${pull.number}, skipping`); - continue; - } - console.log(`creating comment on PR #${pull.number}`); - const body = ` - Thanks for the contribution! - All commits need to be DCO signed before they are reviewed. Please refer to the the [DCO section in CONTRIBUTING.md](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) or the [DCO](${checks.data.check_runs[0].html_url}) status for more info. - `; - await github.rest.issues.createComment({ - repo, - owner, - issue_number: pull.number, - body, - }); - } From 31bcb855954142b7a8b150b79ceaec8c807151ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Tresarrieu?= Date: Tue, 28 Jun 2022 16:23:39 +0200 Subject: [PATCH 101/212] chore: simplify `TransformLink` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Tresarrieu --- .../src/components/MarkdownContent/MarkdownContent.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index 3052aff7d9..98d5af278f 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -64,12 +64,7 @@ const useStyles = makeStyles( { name: 'BackstageMarkdownContent' }, ); -type TransformLink = ( - href: string, - // Complex type from internal react-markdown dep library (hast)[./node_modules/@types/hast/index.d.ts] - children: any[], - title: string | null, -) => string; +type TransformLink = (href: string) => string; type Props = { content: string; From 7187adfadd7d06498e015f3ac26eaaf5ebc8c01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 28 Jun 2022 16:28:43 +0200 Subject: [PATCH 102/212] update cron thing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .github/workflows/cron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 394d726fef..52a68a7d90 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,4 +8,4 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.1.3 + - uses: backstage/actions/cron@v0.1.4 From 8451856b2c5da091628049d0c81fcb4cf25bd8f9 Mon Sep 17 00:00:00 2001 From: "denis.fortin" Date: Tue, 28 Jun 2022 17:45:50 +0200 Subject: [PATCH 103/212] add api-report.md files Signed-off-by: denis.fortin --- plugins/vault-backend/api-report.md | 1 + plugins/vault/api-report.md | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/vault-backend/api-report.md b/plugins/vault-backend/api-report.md index 9f738b15e9..d2e9e1b177 100644 --- a/plugins/vault-backend/api-report.md +++ b/plugins/vault-backend/api-report.md @@ -70,6 +70,7 @@ export interface VaultEnvironment { // @public export type VaultSecret = { name: string; + path: string; showUrl: string; editUrl: string; }; diff --git a/plugins/vault/api-report.md b/plugins/vault/api-report.md index f6fa8d1269..b347989800 100644 --- a/plugins/vault/api-report.md +++ b/plugins/vault/api-report.md @@ -32,6 +32,7 @@ export const vaultPlugin: BackstagePlugin<{}, {}>; // @public export type VaultSecret = { name: string; + path: string; showUrl: string; editUrl: string; }; From 61813aff256d261363b666238f8749232993553e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Tresarrieu?= Date: Tue, 28 Jun 2022 17:52:51 +0200 Subject: [PATCH 104/212] chore: simplify types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Tresarrieu --- .../components/MarkdownContent/MarkdownContent.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index 98d5af278f..0e5aedda90 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -64,18 +64,12 @@ const useStyles = makeStyles( { name: 'BackstageMarkdownContent' }, ); -type TransformLink = (href: string) => string; - type Props = { content: string; dialect?: 'gfm' | 'common-mark'; - linkTarget?: React.HTMLAttributeAnchorTarget | TransformLink; - transformLinkUri?: TransformLink; - transformImageUri?: ( - src: string, - alt: string, - title: string | null, - ) => string; + linkTarget?: Options['linkTarget']; + transformLinkUri?: (href: string) => string; + transformImageUri?: (href: string) => string; }; const components: Options['components'] = { From beda85068a52f4de6465fd94a0b4d52032c9cc66 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:04:49 +0000 Subject: [PATCH 105/212] fix(deps): update dependency @yarnpkg/parsers to v3.0.0-rc.10 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bcc192f64f..ab98dea287 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7563,9 +7563,9 @@ integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== "@yarnpkg/parsers@^3.0.0-rc.4": - version "3.0.0-rc.9" - resolved "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.9.tgz#2d284e4e0c79b1c4e410465e217fa303d98b7be3" - integrity sha512-JMBE+6OJoNN9AXBzZ72u22/t9M25K8KgUWZIjvk8CU/NsE/m946l8D7SqMhbi3ZaUfYa5QitqCqVWTTFtysGJQ== + version "3.0.0-rc.10" + resolved "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.10.tgz#cbbb9970d396fd274911ef0f8204d52132394271" + integrity sha512-TZxyre59hLjWQ0FcakvEl2a+PTArDJ2VYC3e3xjec+OpTuQSK7333VscpiT2UJKJPDUGrYq1Z1LDpnIYv4nHLw== dependencies: js-yaml "^3.10.0" tslib "^1.13.0" From 7d99a0428cd2ac3fa8f5c33cfa69b4adfd38ffca Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:05:44 +0000 Subject: [PATCH 106/212] fix(deps): update dependency octokit to v1.8.1 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bcc192f64f..242b94954f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19636,9 +19636,9 @@ octokit-plugin-create-pull-request@^3.10.0: "@octokit/types" "^6.8.2" octokit@^1.7.1: - version "1.8.0" - resolved "https://registry.npmjs.org/octokit/-/octokit-1.8.0.tgz#c2ea6ace083b3be1d594aa7eb2e05fccd14e7ca5" - integrity sha512-HtArk9ttGy5effKNiaqKCirR6VSZoYjqgLgvVm/1mSRR4WYmww5DHjLnZlCbvj8+DwBLLLduJ3XnX/SPCCcp6A== + version "1.8.1" + resolved "https://registry.npmjs.org/octokit/-/octokit-1.8.1.tgz#399b0032e89e058084a1a1922e40a02e87d4cd61" + integrity sha512-xBLKFIivbl7wnLwxzLYuDO/JDNYxdyxoSjFrl/QMrY/fwGGQYYklvKUDTUyGMU0aXPrQtJ0IZnG3BXpCkDQzWg== dependencies: "@octokit/app" "^12.0.4" "@octokit/core" "^3.5.1" From e558a1ba5d6e1b4e96902bc2d7f854c639ece84e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:20:05 +0000 Subject: [PATCH 107/212] fix(deps): update dependency core-js to v3.23.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index be0c6fab68..51c44941a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10360,9 +10360,9 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.10: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.4.1, core-js@^3.6.5: - version "3.23.2" - resolved "https://registry.npmjs.org/core-js/-/core-js-3.23.2.tgz#e07a60ca8b14dd129cabdc3d2551baf5a01c76f0" - integrity sha512-ELJOWxNrJfOH/WK4VJ3Qd+fOqZuOuDNDJz0xG6Bt4mGg2eO/UT9CljCrbqDGovjLKUrGajEEBcoTOc0w+yBYeQ== + version "3.23.3" + resolved "https://registry.npmjs.org/core-js/-/core-js-3.23.3.tgz#3b977612b15da6da0c9cc4aec487e8d24f371112" + integrity sha512-oAKwkj9xcWNBAvGbT//WiCdOMpb9XQG92/Fe3ABFM/R16BsHgePG00mFOgKf7IsCtfj8tA1kHtf/VwErhriz5Q== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" From b548fb778222cd41cadcf043e9fabbeea080b6c6 Mon Sep 17 00:00:00 2001 From: Patrick Schilling Date: Tue, 28 Jun 2022 14:28:08 -0500 Subject: [PATCH 108/212] Update documentation of readonly mode to clarify what functionality is disallowed Signed-off-by: Patrick Schilling --- docs/features/software-catalog/configuration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/features/software-catalog/configuration.md b/docs/features/software-catalog/configuration.md index 849823a59e..5abd266099 100644 --- a/docs/features/software-catalog/configuration.md +++ b/docs/features/software-catalog/configuration.md @@ -106,8 +106,7 @@ with [Static Location Configuration](#static-location-configuration) or a discovery processor like [GitHub Discovery](../../integrations/github/discovery.md). To enforce usage of processors to locate entities we can configure the catalog into `readonly` mode. -This configuration disables the mutating backend catalog APIs and disallows -users from registering new entities at run-time. +This configuration disables registering and deleting locations with the catalog APIs. ```yaml catalog: @@ -117,6 +116,8 @@ catalog: > **Note that any plugin relying on the catalog API for creating, updating and > deleting entities will not work in this mode.** +Deleting an entity by UUID, `DELETE /entities/by-uid/:uid`, is allowed when using this mode. It may be rediscovered as noted in [explicit deletion](life-of-an-entity.md#explicit-deletion). + A common use case for this configuration is when organizations have a remote source that should be mirrored into Backstage. To make Backstage a mirror of this remote source, users cannot also register new entities with e.g. the From 068d5a8a7d5bbb28a2a91d7ecc97563fdd56aba7 Mon Sep 17 00:00:00 2001 From: Henrique Date: Tue, 28 Jun 2022 21:14:23 -0300 Subject: [PATCH 109/212] add new adopter Signed-off-by: Henrique --- ADOPTERS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ADOPTERS.md b/ADOPTERS.md index b72da367b1..5263fa1287 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -186,3 +186,5 @@ _If you're using Backstage in your organization, please try to add your company | [Cho Tot](https://www.chotot.com) | [Chotot Team](mailto:sre@chotot.vn) | Internal developer portal, service catalog with CI/CD tools. | | [William Hill](https://www.williamhillgroup.com/) | [Pat Mills](mailto:pat.mills@williamhill.com), [Nathan Flynn](mailto:nflynn@williamhill.co.uk), and [Nishkarsh Raj](mailto:nishkarsh.raj@williamhill.co.uk) | William Hill are leveraging Backstage to build our Engineering Portal. Our mission is to centralize the software catalog inventory to enable service discoverability, reduce the onboarding time for new Engineers, provide a single pane of glass to accelerate Developer Productivity and Save Engineers time. Our aspiration is to create an InnerSource community focussed on organization-wide patterns that are re-usable and can be self-served with the Scaffolder. | | [Vodafone NewZealand Limited](https://vodafone.co.nz) | [Ankit Gupta](mailto:ankit.gupta@vodafone.nz), [DevOps COE](mailto:devopstooling@vodafone.nz) | Vodafone NZ are leveraging Backstage to build centralised and self service Engineering Portal. Our mission is to standardised Pipeline templates across the Engineering teams, One shop stop to create the pipelines and repository with a template approach which reduces creation part from days to minutes and no wait time for developers. A unified view for Azure DevOps pipeline, Azure Repo pull requests, Deployment status from Azure RedHat Openshift-ArgoCD and SonarQube Security and code quality scans report on a single pan to provide a streamlined view for all microservices across the app stack. | +| [Coamo](http://www.coamo.com.br) | [@holiiveira](https://github.com/holiiveira), [@gpxlnx](https://github.com/gpxlnx) | We're starting to use it as the main tool of a DevOps platform. Our goal is to provide software templates, centralize our software catalog enabling efficient service discovery, and make it easy to manage the entire software ecosystem in one place. + | \ No newline at end of file From 79639013b5c2290688efdda6be839ba54c9403ea Mon Sep 17 00:00:00 2001 From: Nikolas Skoufis Date: Wed, 29 Jun 2022 17:38:41 +1000 Subject: [PATCH 110/212] Explain how to enable techdocs cache For dummies like me, it took me a while to figure out that even if you have configured the backend cache, the TechDocs cache is not enabled until you set a value for the TTL. My interpretation was that it was just configured by default, and the fact that a default value for ttl seems to appear here points to that as well. This change hopes to make this explicit, to avoid others spinning their wheels like I have. Signed-off-by: Nikolas Skoufis --- docs/features/techdocs/configuration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/features/techdocs/configuration.md b/docs/features/techdocs/configuration.md index 9440d9a824..8a54d76ed0 100644 --- a/docs/features/techdocs/configuration.md +++ b/docs/features/techdocs/configuration.md @@ -160,7 +160,8 @@ techdocs: # techdocs.cache is optional, and is only recommended when you've configured # an external techdocs.publisher.type above. Also requires backend.cache to - # be configured with a valid cache store. + # be configured with a valid cache store. Configure techdocs.cache.ttl to + # enable caching of techdocs assets. cache: # Represents the number of milliseconds a statically built asset should # stay cached. Cache invalidation is handled automatically by the frontend, From 11ed544460a65d26b64999ef671033b68247bf02 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 08:14:18 +0000 Subject: [PATCH 111/212] fix(deps): update dependency eslint-plugin-react to v7.30.1 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 51c44941a6..f6fc38951f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12353,9 +12353,9 @@ eslint-plugin-react-hooks@^4.3.0: integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== eslint-plugin-react@^7.28.0: - version "7.30.0" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz#8e7b1b2934b8426ac067a0febade1b13bd7064e3" - integrity sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A== + version "7.30.1" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.1.tgz#2be4ab23ce09b5949c6631413ba64b2810fd3e22" + integrity sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg== dependencies: array-includes "^3.1.5" array.prototype.flatmap "^1.3.0" From 33fe809fbc1e51193ad26f98e2d815b0a783eaa7 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 10:24:47 +0200 Subject: [PATCH 112/212] chore: make the required changes to get the build to pass, and implement review feedback Signed-off-by: blam --- .changeset/proud-toys-return.md | 4 ++-- packages/catalog-model/api-report.md | 14 +++++++------- ...t.ts => GroupDefaultParentEntityPolicy.test.ts} | 10 +++++----- ...Policy.ts => GroupDefaultParentEntityPolicy.ts} | 2 +- .../catalog-model/src/entity/policies/index.ts | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) rename packages/catalog-model/src/entity/policies/{DefaultParentEntityPolicy.test.ts => GroupDefaultParentEntityPolicy.test.ts} (86%) rename packages/catalog-model/src/entity/policies/{DefaultParentEntityPolicy.ts => GroupDefaultParentEntityPolicy.ts} (96%) diff --git a/.changeset/proud-toys-return.md b/.changeset/proud-toys-return.md index c2a713a5c5..f93e6ef4a8 100644 --- a/.changeset/proud-toys-return.md +++ b/.changeset/proud-toys-return.md @@ -1,5 +1,5 @@ --- -'@backstage/catalog-model': patch +'@backstage/catalog-model': minor --- -Introduced DefaultParentEntityPolicy to set a default group entity parent. +Introduced `GroupDefaultParentEntityPolicy` to set a default group entity parent. diff --git a/packages/catalog-model/api-report.md b/packages/catalog-model/api-report.md index eb8bf9af93..9b9136fc3c 100644 --- a/packages/catalog-model/api-report.md +++ b/packages/catalog-model/api-report.md @@ -108,13 +108,6 @@ export class DefaultNamespaceEntityPolicy implements EntityPolicy { enforce(entity: Entity): Promise; } -// @public -export class DefaultParentEntityPolicy implements EntityPolicy { - constructor(parent: string); - // (undocumented) - enforce(entity: Entity): Promise; -} - // @public interface DomainEntityV1alpha1 extends Entity { // (undocumented) @@ -237,6 +230,13 @@ export function getEntitySourceLocation(entity: Entity): { target: string; }; +// @public +export class GroupDefaultParentEntityPolicy implements EntityPolicy { + constructor(parentEntityRef: string); + // (undocumented) + enforce(entity: Entity): Promise; +} + // @public interface GroupEntityV1alpha1 extends Entity { // (undocumented) diff --git a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts b/packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.test.ts similarity index 86% rename from packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts rename to packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.test.ts index de7c332d17..d5eb6145c2 100644 --- a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.test.ts +++ b/packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.test.ts @@ -15,11 +15,11 @@ */ import { UserEntity, GroupEntity } from '../../kinds'; -import { DefaultParentEntityPolicy } from './DefaultParentEntityPolicy'; +import { GroupDefaultParentEntityPolicy } from './GroupDefaultParentEntityPolicy'; -describe('DefaultParentEntityPolicy', () => { +describe('GroupDefaultParentEntityPolicy', () => { it('should ignore non-group entities', async () => { - const p = new DefaultParentEntityPolicy('name'); + const p = new GroupDefaultParentEntityPolicy('name'); const u: UserEntity = { apiVersion: 'backstage.io/v1alpha1', kind: 'User', @@ -36,7 +36,7 @@ describe('DefaultParentEntityPolicy', () => { }); it('should parent group entities', async () => { - const p = new DefaultParentEntityPolicy('name'); + const p = new GroupDefaultParentEntityPolicy('name'); const g: GroupEntity = { apiVersion: 'backstage.io/v1alpha1', kind: 'Group', @@ -53,7 +53,7 @@ describe('DefaultParentEntityPolicy', () => { }); it('should not replace existing parents', async () => { - const p = new DefaultParentEntityPolicy('namespace/name'); + const p = new GroupDefaultParentEntityPolicy('namespace/name'); const g: GroupEntity = { apiVersion: 'backstage.io/v1alpha1', kind: 'Group', diff --git a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts b/packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.ts similarity index 96% rename from packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts rename to packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.ts index b5a001b1f9..8eb0aef757 100644 --- a/packages/catalog-model/src/entity/policies/DefaultParentEntityPolicy.ts +++ b/packages/catalog-model/src/entity/policies/GroupDefaultParentEntityPolicy.ts @@ -28,7 +28,7 @@ import { parseEntityRef, stringifyEntityRef } from '../ref'; * * @public */ -export class DefaultParentEntityPolicy implements EntityPolicy { +export class GroupDefaultParentEntityPolicy implements EntityPolicy { private readonly parentRef: string; constructor(parentEntityRef: string) { diff --git a/packages/catalog-model/src/entity/policies/index.ts b/packages/catalog-model/src/entity/policies/index.ts index c35a214727..d5740c0955 100644 --- a/packages/catalog-model/src/entity/policies/index.ts +++ b/packages/catalog-model/src/entity/policies/index.ts @@ -15,7 +15,7 @@ */ export { DefaultNamespaceEntityPolicy } from './DefaultNamespaceEntityPolicy'; -export { DefaultParentEntityPolicy } from './DefaultParentEntityPolicy'; +export { GroupDefaultParentEntityPolicy } from './GroupDefaultParentEntityPolicy'; export { FieldFormatEntityPolicy } from './FieldFormatEntityPolicy'; export { NoForeignRootFieldsEntityPolicy } from './NoForeignRootFieldsEntityPolicy'; export { SchemaValidEntityPolicy } from './SchemaValidEntityPolicy'; From 3a1732170961387a490911fb1408a3d23293c03b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 08:29:05 +0000 Subject: [PATCH 113/212] fix(deps): update dependency jose to v4.8.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bfe05be8f6..e4133ddb4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16411,9 +16411,9 @@ jose@^4.1.4: integrity sha512-GFcVFQwYQKbQTUOo2JlpFGXTkgBw26uzDsRMD2q1WgSKNSnpKS9Ug7bdQ8dS+p4sZHNH6iRPu6WK2jLIjspaMA== jose@^4.6.0: - version "4.8.1" - resolved "https://registry.npmjs.org/jose/-/jose-4.8.1.tgz#dc7c2660b115ba29b44880e588c5ac313c158247" - integrity sha512-+/hpTbRcCw9YC0TOfN1W47pej4a9lRmltdOVdRLz5FP5UvUq3CenhXjQK7u/8NdMIIShMXYAh9VLPhc7TjhvFw== + version "4.8.3" + resolved "https://registry.npmjs.org/jose/-/jose-4.8.3.tgz#5a754fb4aa5f2806608d083f438e6916b11087da" + integrity sha512-7rySkpW78d8LBp4YU70Wb7+OTgE3OwAALNVZxhoIhp4Kscp+p/fBkdpxGAMKxvCAMV4QfXBU9m6l9nX/vGwd2g== joycon@^3.0.1: version "3.1.0" From 14d5eca8d36e4377916d629e1091367f6bb04c5e Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 10:46:32 +0200 Subject: [PATCH 114/212] chore: fixing typings Signed-off-by: blam --- packages/backend-common/src/database/DatabaseManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-common/src/database/DatabaseManager.ts b/packages/backend-common/src/database/DatabaseManager.ts index 503945e594..004e7d13cd 100644 --- a/packages/backend-common/src/database/DatabaseManager.ts +++ b/packages/backend-common/src/database/DatabaseManager.ts @@ -251,7 +251,7 @@ export class DatabaseManager { // include base connection if client type has not been overridden ...(overridden ? {} : baseConnection), ...connection, - }; + } as Partial; } /** From 3a23a90f552b1f5a61f8b85ece3652e97dc9b67b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 09:11:40 +0000 Subject: [PATCH 115/212] fix(deps): update dependency openid-client to v5.1.7 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d75769b88d..42b442ca1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19749,9 +19749,9 @@ openid-client@^4.1.1: oidc-token-hash "^5.0.1" openid-client@^5.1.3: - version "5.1.6" - resolved "https://registry.npmjs.org/openid-client/-/openid-client-5.1.6.tgz#e5eb2032ecfdcfc108660b5c525910a14e352f11" - integrity sha512-HTFaXWdUHvLFw4GaEMgC0jXYBgpjgzQQNHW1pZsSqJorSgrXzxJ+4u/LWCGaClDEse5HLjXRV+zU5Bn3OefiZw== + version "5.1.7" + resolved "https://registry.npmjs.org/openid-client/-/openid-client-5.1.7.tgz#deb16847c610075716be1ec679068b04db16f065" + integrity sha512-VNtf/q+fv2Jiqi0ViLVmN3gGMSHF+YUGW6baKA/naoPKkKw4JdvghaP/kXQ/bzRRDWk6VmpCYDcR934UdDs8ug== dependencies: jose "^4.1.4" lru-cache "^6.0.0" From da9a0ea31f4f519801418d9fa8e5e172f88752e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:30:32 +0000 Subject: [PATCH 116/212] fix(deps): update dependency @maxim_mazurok/gapi.client.calendar to v3.0.20220624 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 336a93c5fd..990f5d8aed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4358,9 +4358,9 @@ react-is "^16.8.0 || ^17.0.0" "@maxim_mazurok/gapi.client.calendar@^3.0.20220408": - version "3.0.20220617" - resolved "https://registry.npmjs.org/@maxim_mazurok/gapi.client.calendar/-/gapi.client.calendar-3.0.20220617.tgz#140bbfd2caa1770fedbdaec4182eb43684f2d876" - integrity sha512-Vek5Y655GUi4RmUs3cNLfo/KQeReEuvcViJ0KYHl28KmC2Pqmxb4V2YIUhsH7BGVyq84cTIT59qHSirB919Prw== + version "3.0.20220624" + resolved "https://registry.npmjs.org/@maxim_mazurok/gapi.client.calendar/-/gapi.client.calendar-3.0.20220624.tgz#17817142e348ce811415dfb111299fbdac2450a0" + integrity sha512-5+x4A6l8GY+dojvXUBQGc0Y4JOm9lBY1YZfCAEEZPjBcXkx0vs/CenPnmAu/fwQgGSrQLipxFV+pS6RL3L28mg== dependencies: "@types/gapi.client" "*" From e117caf22864d26ff63d249d93050fc224968bf1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:31:38 +0000 Subject: [PATCH 117/212] chore(deps): update dependency cypress to v10.3.0 Signed-off-by: Renovate Bot --- cypress/yarn.lock | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/yarn.lock b/cypress/yarn.lock index 1ccce4ea24..991d2d8562 100644 --- a/cypress/yarn.lock +++ b/cypress/yarn.lock @@ -304,9 +304,9 @@ cross-spawn@^7.0.0: which "^2.0.1" cypress@^10.0.0: - version "10.2.0" - resolved "https://registry.npmjs.org/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a" - integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA== + version "10.3.0" + resolved "https://registry.npmjs.org/cypress/-/cypress-10.3.0.tgz#fae8d32f0822fcfb938e79c7c31ef344794336ae" + integrity sha512-txkQWKzvBVnWdCuKs5Xc08gjpO89W2Dom2wpZgT9zWZT5jXxqPIxqP/NC1YArtkpmp3fN5HW8aDjYBizHLUFvg== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" diff --git a/yarn.lock b/yarn.lock index 336a93c5fd..565947d185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10822,9 +10822,9 @@ cypress-plugin-snapshots@^1.4.4: unidiff "1.0.2" cypress@^10.0.0: - version "10.2.0" - resolved "https://registry.npmjs.org/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a" - integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA== + version "10.3.0" + resolved "https://registry.npmjs.org/cypress/-/cypress-10.3.0.tgz#fae8d32f0822fcfb938e79c7c31ef344794336ae" + integrity sha512-txkQWKzvBVnWdCuKs5Xc08gjpO89W2Dom2wpZgT9zWZT5jXxqPIxqP/NC1YArtkpmp3fN5HW8aDjYBizHLUFvg== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" From e9fd938ede557879a08d5a406fe9ef9256787b45 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 14:56:02 +0200 Subject: [PATCH 118/212] scripts/api-extractor: generate API reports for CLI packages Signed-off-by: Patrik Oldsberg --- scripts/api-extractor.ts | 293 +++++++++++++++++++++++++++++++++++---- 1 file changed, 268 insertions(+), 25 deletions(-) diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 2ca7aef17f..9331edc9a2 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -23,7 +23,7 @@ import { dirname, join, } from 'path'; -import { spawnSync } from 'child_process'; +import { spawnSync, execFile } from 'child_process'; import prettier from 'prettier'; import fs from 'fs-extra'; import { @@ -197,18 +197,6 @@ ApiReportGenerator.generateReviewFileContent = const PACKAGE_ROOTS = ['packages', 'plugins']; -const SKIPPED_PACKAGES = [ - join('packages', 'app'), - join('packages', 'backend'), - join('packages', 'cli'), - join('packages', 'codemods'), - join('packages', 'create-app'), - join('packages', 'e2e-test'), - join('packages', 'techdocs-cli-embedded-app'), - join('packages', 'storybook'), - join('packages', 'techdocs-cli'), -]; - const ALLOW_WARNINGS = [ 'packages/core-components', 'plugins/allure', @@ -303,9 +291,6 @@ async function findSpecificPackageDirs(unresolvedPackageDirs: string[]) { if (!packageDir) { throw new Error(`'${unresolvedPackageDir}' is not a valid package path`); } - if (SKIPPED_PACKAGES.includes(packageDir)) { - throw new Error(`'${packageDir}' does not have an API report`); - } packageDirs.push(packageDir); } @@ -328,9 +313,7 @@ async function findPackageDirs() { continue; } - if (!SKIPPED_PACKAGES.includes(packageDir)) { - packageDirs.push(packageDir); - } + packageDirs.push(packageDir); } } @@ -1065,6 +1048,251 @@ async function buildDocs({ documenter.generateFiles(); } +async function categorizePackageDirs(projectRoot, packageDirs) { + const dirs = packageDirs.slice(); + const tsPackageDirs = new Array(); + const cliPackageDirs = new Array(); + + await Promise.all( + Array(10) + .fill(0) + .map(async () => { + for (;;) { + const dir = dirs.pop(); + if (!dir) { + return; + } + + const pkgJson = await fs + .readJson(resolvePath(projectRoot, dir, 'package.json')) + .catch(error => { + if (error.code === 'ENOENT') { + return undefined; + } + throw error; + }); + const role = pkgJson?.backstage?.role; + if (!role) { + throw new Error(`No backstage.role in ${dir}/package.json`); + } + if (role === 'cli') { + cliPackageDirs.push(dir); + } else if (role !== 'frontend' && role !== 'backend') { + tsPackageDirs.push(dir); + } + } + }), + ); + + return { tsPackageDirs, cliPackageDirs }; +} + +function createBinRunner(cwd: string, path: string) { + return async (...command: string[]) => + new Promise((resolve, reject) => { + execFile( + 'node', + [path, ...command], + { + cwd, + shell: true, + timeout: 5000, + }, + (err, stdout, stderr) => { + if (err) { + reject(err); + } else if (stderr) { + reject(stderr); + } else { + resolve(stdout); + } + }, + ); + }); +} + +function parseHelpPage(helpPageContent: string) { + const [, usage] = helpPageContent.match(/^\s*Usage: (.*)$/im) ?? []; + const lines = helpPageContent.split(/\r?\n/); + + let options = new Array(); + let commands = new Array(); + + while (lines.length > 0) { + while (lines.length > 0 && !lines[0].endsWith(':')) { + lines.shift(); + } + if (lines.length > 0) { + // Start of a new section, e.g. "Options:" + const sectionName = lines.shift(); + // Take lines until we hit the next section or the end + const sectionEndIndex = lines.findIndex( + line => line && !line.match(/^\s/), + ); + const sectionLines = lines.slice(0, sectionEndIndex); + lines.splice(0, sectionLines.length); + + // Trim away documentation + const sectionItems = sectionLines + .map(line => line.match(/^\s{1,8}(.*?)\s\s+/)?.[1]) + .filter(Boolean); + + if (sectionName.toLocaleLowerCase('en-US') === 'options:') { + options = sectionItems; + } else if (sectionName.toLocaleLowerCase('en-US') === 'commands:') { + commands = sectionItems; + } else { + throw new Error(`Unknown CLI section: ${sectionName}`); + } + } + } + + return { + usage, + options, + commands, + }; +} + +// Represents the help page os a CLI command +interface CliHelpPage { + // Path of commands to reach this page + path: string[]; + // Parsed content + usage: string | undefined; + options: string[]; + commands: string[]; +} + +async function exploreCliHelpPages( + run: (...args: string[]) => Promise, +): Promise { + const helpPages = new Array(); + + async function exploreHelpPage(...path: string[]) { + const content = await run(...path, '--help'); + const parsed = parseHelpPage(content); + helpPages.push({ path, ...parsed }); + + await Promise.all( + parsed.commands.map(async fullCommand => { + const command = fullCommand.split(/[|\s]/)[0]; + if (command !== 'help') { + await exploreHelpPage(...path, command); + } + }), + ); + } + + await exploreHelpPage(); + + helpPages.sort((a, b) => a.path.join(' ').localeCompare(b.path.join(' '))); + + return helpPages; +} + +// The API model for a CLI entry point +interface CliModel { + name: string; + helpPages: CliHelpPage[]; +} + +function generateCliReport(name: string, models: CliModel[]): string { + const content = [ + `## CLI Report file for "${name}"`, + '', + '> Do not edit this file. It is a report generated by `yarn build:api-reports`', + '', + ]; + + for (const model of models) { + for (const helpPage of model.helpPages) { + content.push( + `### \`${[model.name, ...helpPage.path].join(' ')}\``, + '', + '```', + `Usage: ${helpPage.usage ?? ''}`, + ); + + if (helpPage.options.length > 0) { + content.push('', 'Options:', ...helpPage.options.map(l => ` ${l}`)); + } + + if (helpPage.commands.length > 0) { + content.push('', 'Commands:', ...helpPage.commands.map(l => ` ${l}`)); + } + content.push('```', ''); + } + } + + return content.join('\n'); +} + +interface CliExtractionOptions { + projectRoot: string; + packageDirs: string[]; + isLocalBuild: boolean; +} + +async function runCliExtraction({ + projectRoot, + packageDirs, + isLocalBuild, +}: CliExtractionOptions) { + for (const packageDir of packageDirs) { + console.log(`## Processing ${packageDir}`); + const fullDir = resolvePath(projectRoot, packageDir); + const pkgJson = await fs.readJson(resolvePath(fullDir, 'package.json')); + + if (!pkgJson.bin) { + throw new Error(`CLI Package in ${packageDir} has no bin field`); + } + const models = new Array(); + for (const [name, path] of Object.entries(pkgJson.bin)) { + const run = createBinRunner(fullDir, path); + const helpPages = await exploreCliHelpPages(run); + models.push({ name, helpPages }); + } + + const report = generateCliReport(pkgJson.name, models); + + const reportPath = resolvePath(fullDir, 'cli-report.md'); + const existingReport = await fs + .readFile(reportPath, 'utf8') + .catch(error => { + if (error.code === 'ENOENT') { + return undefined; + } + throw error; + }); + + if (existingReport !== report) { + if (isLocalBuild) { + console.warn(`CLI report changed for ${packageDir}`); + await fs.writeFile(reportPath, report); + } else { + logApiReportInstructions(); + + if (existingReport) { + console.log(''); + console.log( + `The conflicting file is ${relativePath( + projectRoot, + reportPath, + )}, expecting the following content:`, + ); + console.log(''); + + console.log(report); + + logApiReportInstructions(); + } + throw new Error(`CLI report changed for ${packageDir}, `); + } + } + } +} + async function main() { const projectRoot = resolvePath(__dirname, '..'); const isCiBuild = process.argv.includes('--ci'); @@ -1121,13 +1349,28 @@ async function main() { const packageDirs = selectedPackageDirs ?? (await findPackageDirs()); - console.log('# Generating package API reports'); - await runApiExtraction({ + const { tsPackageDirs, cliPackageDirs } = await categorizePackageDirs( + projectRoot, packageDirs, - outputDir: tmpDir, - isLocalBuild: !isCiBuild, - tsconfigFilePath, - }); + ); + + if (tsPackageDirs.length > 0) { + console.log('# Generating package API reports'); + await runApiExtraction({ + packageDirs: tsPackageDirs, + outputDir: tmpDir, + isLocalBuild: !isCiBuild, + tsconfigFilePath, + }); + } + if (cliPackageDirs.length > 0) { + console.log('# Generating package CLI reports'); + await runCliExtraction({ + projectRoot, + packageDirs: cliPackageDirs, + isLocalBuild: !isCiBuild, + }); + } if (isDocsBuild) { console.log('# Generating package documentation'); From 0bc7eb1642bfdf799a0b9c9a9c8d5ab4fcd1a179 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 14:56:38 +0200 Subject: [PATCH 119/212] generate API reports for CLI packages Signed-off-by: Patrik Oldsberg --- packages/cli/cli-report.md | 425 ++++++++++++++++++++++++++++ packages/codemods/cli-report.md | 61 ++++ packages/create-app/cli-report.md | 15 + packages/e2e-test/cli-report.md | 26 ++ packages/techdocs-cli/cli-report.md | 117 ++++++++ 5 files changed, 644 insertions(+) create mode 100644 packages/cli/cli-report.md create mode 100644 packages/codemods/cli-report.md create mode 100644 packages/create-app/cli-report.md create mode 100644 packages/e2e-test/cli-report.md create mode 100644 packages/techdocs-cli/cli-report.md diff --git a/packages/cli/cli-report.md b/packages/cli/cli-report.md new file mode 100644 index 0000000000..04f034cee1 --- /dev/null +++ b/packages/cli/cli-report.md @@ -0,0 +1,425 @@ +## CLI Report file for "@backstage/cli" + +> Do not edit this file. It is a report generated by `yarn build:api-reports` + +### `backstage-cli` + +``` +Usage: backstage-cli [options] [command] + +Options: + -V, --version + -h, --help + +Commands: + create [options] + create-plugin [options] + plugin:diff [options] + test + config:docs [options] + config:print [options] + config:check [options] + config:schema [options] + repo [command] + package [command] + migrate [command] + versions:bump [options] + versions:check [options] + clean + build-workspace [packages...] + create-github-app + info + help [command] +``` + +### `backstage-cli build-workspace` + +``` +Usage: backstage-cli build-workspace [options] [packages...] + +Options: + -h, --help +``` + +### `backstage-cli clean` + +``` +Usage: backstage-cli clean [options] + +Options: + -h, --help +``` + +### `backstage-cli config:check` + +``` +Usage: backstage-cli config:check [options] + +Options: + --package + --lax + --frontend + --deprecated + --config + -h, --help +``` + +### `backstage-cli config:docs` + +``` +Usage: backstage-cli config:docs [options] + +Options: + --package + -h, --help +``` + +### `backstage-cli config:print` + +``` +Usage: backstage-cli config:print [options] + +Options: + --package + --lax + --frontend + --with-secrets + --format + --config + -h, --help +``` + +### `backstage-cli config:schema` + +``` +Usage: backstage-cli config:schema [options] + +Options: + --package + --format + -h, --help +``` + +### `backstage-cli create` + +``` +Usage: backstage-cli create [options] + +Options: + --select + --option = + --scope + --npm-registry + --no-private + -h, --help +``` + +### `backstage-cli create-github-app` + +``` +Usage: backstage-cli create-github-app [options] + +Options: + -h, --help +``` + +### `backstage-cli create-plugin` + +``` +Usage: backstage-cli create-plugin [options] + +Options: + --backend + --scope + --npm-registry + --no-private + -h, --help +``` + +### `backstage-cli info` + +``` +Usage: backstage-cli info [options] + +Options: + -h, --help +``` + +### `backstage-cli migrate` + +``` +Usage: backstage-cli migrate [options] [command] [command] + +Options: + -h, --help + +Commands: + package-roles + package-scripts + package-lint-configs + help [command] +``` + +### `backstage-cli migrate package-lint-configs` + +``` +Usage: backstage-cli migrate package-lint-configs [options] + +Options: + -h, --help +``` + +### `backstage-cli migrate package-roles` + +``` +Usage: backstage-cli migrate package-roles [options] + +Options: + -h, --help +``` + +### `backstage-cli migrate package-scripts` + +``` +Usage: backstage-cli migrate package-scripts [options] + +Options: + -h, --help +``` + +### `backstage-cli package` + +``` +Usage: backstage-cli package [options] [command] [command] + +Options: + -h, --help + +Commands: + start [options] + build [options] + lint [options] [directories...] + test + clean + prepack + postpack + help [command] +``` + +### `backstage-cli package build` + +``` +Usage: backstage-cli package build [options] + +Options: + --role + --minify + --experimental-type-build + --skip-build-dependencies + --stats + --config + -h, --help +``` + +### `backstage-cli package clean` + +``` +Usage: backstage-cli package clean [options] + +Options: + -h, --help +``` + +### `backstage-cli package lint` + +``` +Usage: backstage-cli package lint [options] [directories...] + +Options: + --format + --fix + -h, --help +``` + +### `backstage-cli package postpack` + +``` +Usage: backstage-cli package postpack [options] + +Options: + -h, --help +``` + +### `backstage-cli package prepack` + +``` +Usage: backstage-cli package prepack [options] + +Options: + -h, --help +``` + +### `backstage-cli package start` + +``` +Usage: backstage-cli package start [options] + +Options: + --config + --role + --check + --inspect + --inspect-brk + -h, --help +``` + +### `backstage-cli package test` + +``` +Usage: backstage-cli [--config=] [TestPathPattern] + +Options: + -h, --help + -v, --version + --all + --automock + -b, --bail + --cache + --cacheDirectory + --changedFilesWithAncestor + --changedSince + --ci + --clearCache + --clearMocks + --collectCoverage + --collectCoverageFrom + --collectCoverageOnlyFrom + --color + --colors + -c, --config + --coverage + --coverageDirectory + --coveragePathIgnorePatterns + --coverageProvider + --coverageReporters + --coverageThreshold + --debug + --detectLeaks + --detectOpenHandles + --env + --errorOnDeprecated + -e, --expand + --filter + --findRelatedTests + --forceExit +``` + +### `backstage-cli plugin:diff` + +``` +Usage: backstage-cli plugin:diff [options] + +Options: + --check + --yes + -h, --help +``` + +### `backstage-cli repo` + +``` +Usage: backstage-cli repo [options] [command] [command] + +Options: + -h, --help + +Commands: + build [options] + lint [options] + help [command] +``` + +### `backstage-cli repo build` + +``` +Usage: backstage-cli repo build [options] + +Options: + --all + --since + -h, --help +``` + +### `backstage-cli repo lint` + +``` +Usage: backstage-cli repo lint [options] + +Options: + --format + --since + --fix + -h, --help +``` + +### `backstage-cli test` + +``` +Usage: backstage-cli [--config=] [TestPathPattern] + +Options: + -h, --help + -v, --version + --all + --automock + -b, --bail + --cache + --cacheDirectory + --changedFilesWithAncestor + --changedSince + --ci + --clearCache + --clearMocks + --collectCoverage + --collectCoverageFrom + --collectCoverageOnlyFrom + --color + --colors + -c, --config + --coverage + --coverageDirectory + --coveragePathIgnorePatterns + --coverageProvider + --coverageReporters + --coverageThreshold + --debug + --detectLeaks + --detectOpenHandles + --env + --errorOnDeprecated + -e, --expand + --filter + --findRelatedTests + --forceExit +``` + +### `backstage-cli versions:bump` + +``` +Usage: backstage-cli versions:bump [options] + +Options: + --pattern + --release + -h, --help +``` + +### `backstage-cli versions:check` + +``` +Usage: backstage-cli versions:check [options] + +Options: + --fix + -h, --help +``` diff --git a/packages/codemods/cli-report.md b/packages/codemods/cli-report.md new file mode 100644 index 0000000000..57d2198141 --- /dev/null +++ b/packages/codemods/cli-report.md @@ -0,0 +1,61 @@ +## CLI Report file for "@backstage/codemods" + +> Do not edit this file. It is a report generated by `yarn build:api-reports` + +### `backstage-codemods` + +``` +Usage: backstage-codemods [options] [command] + +Options: + -V, --version + -h, --help + +Commands: + apply [target-dirs...] + list + help [command] +``` + +### `backstage-codemods apply` + +``` +Usage: backstage-codemods apply [options] [command] [target-dirs...] + +Options: + -h, --help + +Commands: + core-imports [options] [target-dirs...] + extension-names [options] [target-dirs...] + help [command] +``` + +### `backstage-codemods apply core-imports` + +``` +Usage: backstage-codemods apply core-imports [options] [target-dirs...] + +Options: + -d, --dry + -h, --help +``` + +### `backstage-codemods apply extension-names` + +``` +Usage: backstage-codemods apply extension-names [options] [target-dirs...] + +Options: + -d, --dry + -h, --help +``` + +### `backstage-codemods list` + +``` +Usage: backstage-codemods list [options] + +Options: + -h, --help +``` diff --git a/packages/create-app/cli-report.md b/packages/create-app/cli-report.md new file mode 100644 index 0000000000..1244432c6a --- /dev/null +++ b/packages/create-app/cli-report.md @@ -0,0 +1,15 @@ +## CLI Report file for "@backstage/create-app" + +> Do not edit this file. It is a report generated by `yarn build:api-reports` + +### `backstage-create-app` + +``` +Usage: backstage-create-app [options] + +Options: + -V, --version + --path [directory] + --skip-install + -h, --help +``` diff --git a/packages/e2e-test/cli-report.md b/packages/e2e-test/cli-report.md new file mode 100644 index 0000000000..3a3912b8fc --- /dev/null +++ b/packages/e2e-test/cli-report.md @@ -0,0 +1,26 @@ +## CLI Report file for "e2e-test" + +> Do not edit this file. It is a report generated by `yarn build:api-reports` + +### `e2e-test` + +``` +Usage: e2e-test [options] [command] + +Options: + -V, --version + -h, --help + +Commands: + run + help [command] +``` + +### `e2e-test run` + +``` +Usage: e2e-test run [options] + +Options: + -h, --help +``` diff --git a/packages/techdocs-cli/cli-report.md b/packages/techdocs-cli/cli-report.md new file mode 100644 index 0000000000..64b5e9c090 --- /dev/null +++ b/packages/techdocs-cli/cli-report.md @@ -0,0 +1,117 @@ +## CLI Report file for "@techdocs/cli" + +> Do not edit this file. It is a report generated by `yarn build:api-reports` + +### `techdocs-cli` + +``` +Usage: techdocs-cli [options] [command] + +Options: + -V, --version + -h, --help + +Commands: + generate|build [options] + migrate [options] + publish [options] + serve:mkdocs [options] + serve [options] + help [command] +``` + +### `techdocs-cli generate` + +``` +Usage: techdocs-cli generate|build [options] + +Options: + --source-dir + --output-dir + --docker-image + --no-pull + --no-docker + --techdocs-ref + --etag + -v --verbose + --omitTechdocsCoreMkdocsPlugin + --legacyCopyReadmeMdToIndexMd + -h, --help +``` + +### `techdocs-cli migrate` + +``` +Usage: techdocs-cli migrate [options] + +Options: + --publisher-type + --storage-name + --azureAccountName + --azureAccountKey + --awsRoleArn + --awsEndpoint + --awsS3ForcePathStyle + --awsBucketRootPath + --osCredentialId + --osSecret + --osAuthUrl + --osSwiftUrl + --removeOriginal + --concurrency + -v --verbose + -h, --help +``` + +### `techdocs-cli publish` + +``` +Usage: techdocs-cli publish [options] + +Options: + --publisher-type + --storage-name + --entity + --legacyUseCaseSensitiveTripletPaths + --azureAccountName + --azureAccountKey + --awsRoleArn + --awsEndpoint + --awsS3sse + --awsS3ForcePathStyle + --osCredentialId + --osSecret + --osAuthUrl + --osSwiftUrl + --gcsBucketRootPath + --directory + -h, --help +``` + +### `techdocs-cli serve` + +``` +Usage: techdocs-cli serve [options] + +Options: + -i, --docker-image + --docker-entrypoint + --no-docker + --mkdocs-port + -v --verbose + -h, --help +``` + +### `techdocs-cli serve:mkdocs` + +``` +Usage: techdocs-cli serve:mkdocs [options] + +Options: + -i, --docker-image + --docker-entrypoint + --no-docker + -p, --port + -v --verbose + -h, --help +``` From bbf005fb55f15f51b808fcade0479f6cd96af873 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 16:20:43 +0200 Subject: [PATCH 120/212] scripts/generate-changeset-feedback: ignore cli-report.md Signed-off-by: Patrik Oldsberg --- scripts/generate-changeset-feedback.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-changeset-feedback.js b/scripts/generate-changeset-feedback.js index b614459a0e..b34147798d 100644 --- a/scripts/generate-changeset-feedback.js +++ b/scripts/generate-changeset-feedback.js @@ -42,7 +42,7 @@ function isPublishedPath(path) { return false; } // API report changes by themselves don't count - if (path === 'api-report.md') { + if (path === 'api-report.md' || path === 'cli-report.md') { return false; } // Lint changes don't count From 130ad3f34e6774c315157ec53e641c7d8d218602 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 16:24:28 +0200 Subject: [PATCH 121/212] .prettierignore: add cli-report.md Signed-off-by: Patrik Oldsberg --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 393c35fdbe..8f1fae0456 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,6 +5,7 @@ coverage *.hbs templates api-report.md +cli-report.md plugins/scaffolder-backend/sample-templates .vscode dist-types From 480dae16c815a5e8eece4bdd0246aec41a03a797 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 16:43:50 +0200 Subject: [PATCH 122/212] scripts/api-extractor: better error reporting for cli errors Signed-off-by: Patrik Oldsberg --- scripts/api-extractor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 9331edc9a2..bd3dac2ee8 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -1100,9 +1100,9 @@ function createBinRunner(cwd: string, path: string) { }, (err, stdout, stderr) => { if (err) { - reject(err); + reject(new Error(`${err.message}\n${stderr}`)); } else if (stderr) { - reject(stderr); + reject(new Error(`Command printed error output: ${stderr}`)); } else { resolve(stdout); } From c1f4ad85d58e13c9322af81241fa2e8fefafcef3 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Jun 2022 16:44:17 +0200 Subject: [PATCH 123/212] scripts/api-extractor: increase cli exec timeout and buffer size Signed-off-by: Patrik Oldsberg --- scripts/api-extractor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index bd3dac2ee8..cfa2fe270e 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -1096,7 +1096,8 @@ function createBinRunner(cwd: string, path: string) { { cwd, shell: true, - timeout: 5000, + timeout: 30000, + maxBuffer: 1024 * 1024, }, (err, stdout, stderr) => { if (err) { From 4235353f463734e42bf3aaf13c91ebc451167705 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 13:37:09 +0200 Subject: [PATCH 124/212] chore: remove duplicate changeset Signed-off-by: blam --- .changeset/cold-apples-film.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .changeset/cold-apples-film.md diff --git a/.changeset/cold-apples-film.md b/.changeset/cold-apples-film.md deleted file mode 100644 index d8c7ec283d..0000000000 --- a/.changeset/cold-apples-film.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'example-app': patch -'@backstage/plugin-catalog': patch ---- - -Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'. -With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled. - -The boolean input for "unregister entity" will be deprecated later in favour of the above three options. From 6ecafa9d3b7fb251339eee77c10311778b949bbb Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 13:41:17 +0200 Subject: [PATCH 125/212] chore: make pretty Signed-off-by: blam --- packages/app/src/components/catalog/EntityPage.tsx | 2 +- .../src/components/EntityContextMenu/EntityContextMenu.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 743dea29e4..c2ae001060 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -165,7 +165,7 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { }, ]; }, []); - + const options: EntityContextMenuOptions = { disableUnregister: 'visible', }; diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index 94df8dac29..e37362a1e3 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -33,7 +33,6 @@ import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common' import { BackstageTheme } from '@backstage/theme'; import { UnregisterEntity, UnregisterEntityOptions } from './UnregisterEntity'; - /** @public */ export type EntityContextMenuClassKey = 'button'; From 9d0db13c2245566ae49e0f223a7cfc5306894de8 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 13:48:17 +0200 Subject: [PATCH 126/212] chore: dont export them as they're part of the unstable API, just reference inline for now Signed-off-by: blam --- packages/app/src/components/catalog/EntityPage.tsx | 9 +++------ plugins/catalog/api-report.md | 4 ++-- .../catalog/src/components/EntityLayout/EntityLayout.tsx | 3 ++- plugins/catalog/src/components/EntityLayout/index.ts | 6 +----- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index c2ae001060..155dc071ff 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -43,7 +43,6 @@ import { } from '@backstage/plugin-azure-devops'; import { EntityBadgesDialog } from '@backstage/plugin-badges'; import { - EntityContextMenuOptions, EntityAboutCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, @@ -166,15 +165,13 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => { ]; }, []); - const options: EntityContextMenuOptions = { - disableUnregister: 'visible', - }; - return ( <> {props.children} diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 0d2d611412..61dc503f2d 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -259,10 +259,10 @@ export interface EntityLayoutProps { children?: React_2.ReactNode; // (undocumented) NotFoundComponent?: React_2.ReactNode; - // Warning: (ae-forgotten-export) The symbol "contextMenuOptions" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "EntityContextMenuOptions" needs to be exported by the entry point index.d.ts // // (undocumented) - UNSTABLE_contextMenuOptions?: contextMenuOptions; + UNSTABLE_contextMenuOptions?: EntityContextMenuOptions; // Warning: (ae-forgotten-export) The symbol "ExtraContextMenuItem" needs to be exported by the entry point index.d.ts // // (undocumented) diff --git a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx index 5d82b5ccab..2295034905 100644 --- a/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx +++ b/plugins/catalog/src/components/EntityLayout/EntityLayout.tsx @@ -144,8 +144,9 @@ interface ExtraContextMenuItem { type VisibleType = 'visible' | 'hidden' | 'disable'; +// NOTE(blam): Intentionally not exported at this point, since it's part of // unstable context menu option, eg: disable the unregister entity menu -export interface EntityContextMenuOptions { +interface EntityContextMenuOptions { disableUnregister: boolean | VisibleType; } diff --git a/plugins/catalog/src/components/EntityLayout/index.ts b/plugins/catalog/src/components/EntityLayout/index.ts index 73a58dfddc..251d213637 100644 --- a/plugins/catalog/src/components/EntityLayout/index.ts +++ b/plugins/catalog/src/components/EntityLayout/index.ts @@ -15,8 +15,4 @@ */ export { EntityLayout } from './EntityLayout'; -export type { - EntityLayoutProps, - EntityLayoutRouteProps, - EntityContextMenuOptions, -} from './EntityLayout'; +export type { EntityLayoutProps, EntityLayoutRouteProps } from './EntityLayout'; From ec21ff386552d9d9ada70f37717bda1cb7c22ace Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 13:53:05 +0200 Subject: [PATCH 127/212] chore: only need one changeset Signed-off-by: blam --- .changeset/techdocs-sixty-mugs-hug.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.changeset/techdocs-sixty-mugs-hug.md b/.changeset/techdocs-sixty-mugs-hug.md index 05c03a0b98..a1a9e815a1 100644 --- a/.changeset/techdocs-sixty-mugs-hug.md +++ b/.changeset/techdocs-sixty-mugs-hug.md @@ -1,6 +1,4 @@ --- -'@backstage/core-components': patch -'@backstage/plugin-catalog': patch '@backstage/plugin-techdocs': patch --- From ed45ee23fad91db57903ea167d600a495af2ff79 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 14:21:57 +0200 Subject: [PATCH 128/212] chore: added some simple tests Signed-off-by: blam --- .../RepoUrlPickerRepoName.test.tsx | 76 +++++++++++++++++++ .../RepoUrlPicker/RepoUrlPickerRepoName.tsx | 2 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.test.tsx diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.test.tsx new file mode 100644 index 0000000000..4c392d646c --- /dev/null +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.test.tsx @@ -0,0 +1,76 @@ +/* + * 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 React from 'react'; +import { RepoUrlPickerRepoName } from './RepoUrlPickerRepoName'; +import { render, fireEvent } from '@testing-library/react'; + +describe('RepoUrlPickerRepoName', () => { + it('should call onChange with the first allowed repo if there is none set already', async () => { + const onChange = jest.fn(); + + render( + , + ); + + expect(onChange).toHaveBeenCalledWith('foo'); + }); + + it('should render a dropdown of all the options', async () => { + const allowedRepos = ['foo', 'bar']; + + const onChange = jest.fn(); + + const { getByRole } = render( + , + ); + + const select = getByRole('combobox'); + await fireEvent.click(select); + + for (const option of allowedRepos) { + const element = getByRole('option', { name: option }); + expect(element).toBeVisible(); + } + }); + + it('should render a normal text area when no options are passed', async () => { + const onChange = jest.fn(); + + const { getByRole } = render( + , + ); + + const textArea = getByRole('textbox'); + + expect(textArea).toBeVisible(); + + fireEvent.change(textArea, { target: { value: 'foo' } }); + + expect(onChange).toHaveBeenCalledWith('foo'); + }); +}); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx index f2d68b08f3..1393b1902e 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerRepoName.tsx @@ -54,7 +54,7 @@ export const RepoUrlPickerRepoName = (props: { native label="Repositories Available" onChange={selected => - onChange(String(Array.isArray(selected) ? selected[0] : selected)) + String(Array.isArray(selected) ? selected[0] : selected) } disabled={allowedRepos.length === 1} selected={repoName} From ce7abf314bedcdb39b5cd859e2d9c75c78b7170e Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 14:24:33 +0200 Subject: [PATCH 129/212] chore: updating the changeset Signed-off-by: blam --- .changeset/hot-rice-sin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/hot-rice-sin.md b/.changeset/hot-rice-sin.md index 5a7363bdc8..5a3d6fdb7a 100644 --- a/.changeset/hot-rice-sin.md +++ b/.changeset/hot-rice-sin.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-scaffolder': patch +'@backstage/plugin-scaffolder': minor --- -RepoUrlPicker: Add allowedRepos option and move repoName field to own component +Add `allowedRepos` `ui:option` to `RepoUrlPicker` component, and move `repoName` field to own component From 975d20c8c99c5198346504bcb3df251ce4f9273f Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 14:55:00 +0200 Subject: [PATCH 130/212] chore: added another option to the repoUrlPicker for the api-rports Signed-off-by: blam --- plugins/scaffolder/api-report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 9ffca426ac..d2805b460e 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -193,6 +193,8 @@ export interface RepoUrlPickerUiOptions { // (undocumented) allowedOwners?: string[]; // (undocumented) + allowedRepos?: string[]; + // (undocumented) requestUserCredentials?: { secretsKey: string; additionalScopes?: { From 982f7814b13f31330c7337c1f693f5a075ea849c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 29 Jun 2022 15:01:16 +0200 Subject: [PATCH 131/212] Use the custom PR action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Patrik Oldsberg Co-authored-by: Johan Haals Signed-off-by: Fredrik Adelöw --- .github/workflows/pr.yaml | 14 +++++++ .../workflows/sync_approve_renovate_pr.yaml | 37 ------------------- 2 files changed, 14 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/pr.yaml delete mode 100644 .github/workflows/sync_approve_renovate_pr.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000000..0d4fd01ca5 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,14 @@ +name: PR +on: + pull_request_target: + +jobs: + generate-changeset: + runs-on: ubuntu-latest + + if: github.repository == 'backstage/backstage' + steps: + - name: PR sync + uses: backstage/actions/pr-sync@v0.1.6 + with: + github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} diff --git a/.github/workflows/sync_approve_renovate_pr.yaml b/.github/workflows/sync_approve_renovate_pr.yaml deleted file mode 100644 index 2d25bea223..0000000000 --- a/.github/workflows/sync_approve_renovate_pr.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Approve renovate lock file changes -on: - pull_request_target: - paths: - - '.github/workflows/sync_renovate-changesets.yml' - - '**/yarn.lock' - -jobs: - generate-changeset: - runs-on: ubuntu-latest - if: github.actor == 'renovate[bot]' && github.repository == 'backstage/backstage' - steps: - - name: Approve - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} - script: | - const owner = 'backstage'; - const repo = 'backstage'; - - const r = await github.rest.pulls.listFiles({ - owner, - repo, - pull_number: context.issue.number, - }); - - if (r.data.some((f) => f.filename.split('/').slice(-1)[0] !== 'yarn.lock')) { - console.log('skipping approval since some files are not yarn.lock'); - return; - } - - await github.rest.pulls.createReview({ - owner, - repo, - pull_number: context.issue.number, - event: 'APPROVE' - }) From 45f621e22fdf8a2160e0a6982a589dd4a21fdf76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 13:08:10 +0000 Subject: [PATCH 132/212] fix(deps): update dependency @google-cloud/storage to v6.2.1 Signed-off-by: Renovate Bot --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3c55fd5053..62ce9848df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2305,10 +2305,10 @@ arrify "^2.0.0" extend "^3.0.2" -"@google-cloud/projectify@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.0.1.tgz#13350ee609346435c795bbfe133a08dfeab78d65" - integrity sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ== +"@google-cloud/projectify@^3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-3.0.0.tgz#302b25f55f674854dce65c2532d98919b118a408" + integrity sha512-HRkZsNmjScY6Li8/kb70wjGlDDyLkVk3KvoEo9uIoxSjYLJasGiCch9+PqRVDOCGUFvEIqyogl+BeqILL4OJHA== "@google-cloud/promisify@^3.0.0": version "3.0.0" @@ -2316,12 +2316,12 @@ integrity sha512-91ArYvRgXWb73YvEOBMmOcJc0bDRs5yiVHnqkwoG0f3nm7nZuipllz6e7BvFESBvjkDTBC0zMD8QxedUwNLc1A== "@google-cloud/storage@^6.0.0": - version "6.1.0" - resolved "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.1.0.tgz#f882a969c5637ff445764d7b172f68fd0d9e63f8" - integrity sha512-zqZwzpRWCJuPne7x9Vc2H79zANl0uh9bNPGis0xAuC88ZEvBXfQqYCAVyiL1YIxi7rf51l8wy9vBr1pONMfxxA== + version "6.2.1" + resolved "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.2.1.tgz#6f02e44d907e2fcb2b80aeea5cc6e5575dfeefcc" + integrity sha512-obLGOFCp25rpRn4CZvZqQkSHhY+dBrK7IjDdFpF5gOXVxE40ilr287uikiGPjflVFbgNwO2qhioJNqMzxoqHZg== dependencies: "@google-cloud/paginator" "^3.0.7" - "@google-cloud/projectify" "^2.0.0" + "@google-cloud/projectify" "^3.0.0" "@google-cloud/promisify" "^3.0.0" abort-controller "^3.0.0" arrify "^2.0.0" From 4ef64446717b824dc63a182fe8fd46fc4dbfeacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 29 Jun 2022 15:19:22 +0200 Subject: [PATCH 133/212] Use the custom issue action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Patrik Oldsberg Co-authored-by: Johan Haals Signed-off-by: Fredrik Adelöw --- .github/workflows/cron.yml | 2 +- .github/workflows/issue.yaml | 13 +++++++++ .github/workflows/pr.yaml | 4 +-- .github/workflows/sync_issue-labels.yml | 38 ------------------------- 4 files changed, 16 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/issue.yaml delete mode 100644 .github/workflows/sync_issue-labels.yml diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 52a68a7d90..4d1ba7fc0e 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,4 +8,4 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.1.4 + - uses: backstage/actions/cron@v0.1.8 diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml new file mode 100644 index 0000000000..972f90795c --- /dev/null +++ b/.github/workflows/issue.yaml @@ -0,0 +1,13 @@ +name: Issue +on: + issues: + types: [opened] + +jobs: + sync: + runs-on: ubuntu-latest + + if: github.repository == 'backstage/backstage' + steps: + - name: Issue sync + uses: backstage/actions/issue-sync@v0.1.8 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0d4fd01ca5..01254a53a8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -3,12 +3,12 @@ on: pull_request_target: jobs: - generate-changeset: + sync: runs-on: ubuntu-latest if: github.repository == 'backstage/backstage' steps: - name: PR sync - uses: backstage/actions/pr-sync@v0.1.6 + uses: backstage/actions/pr-sync@v0.1.8 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} diff --git a/.github/workflows/sync_issue-labels.yml b/.github/workflows/sync_issue-labels.yml deleted file mode 100644 index 91b5f79f5d..0000000000 --- a/.github/workflows/sync_issue-labels.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Sync Issue Labels -on: - issues: - types: [opened] -jobs: - label-issue: - runs-on: ubuntu-latest - if: github.repository == 'backstage/backstage' - steps: - - name: View context attributes - uses: actions/github-script@v6 - with: - script: | - const keywords = { - 'techdocs|tech-docs|tech docs': 'docs-like-code', - 'search': 'search', - 'catalog': 'catalog', - 'scaffolder': 'scaffolder', - }; - - const labels = Object.entries(keywords) - .map(([regexp, label]) => { - if (new RegExp(regexp, 'gi').test(context.payload.issue.title)) { - return label; - } - }) - .filter(Boolean); - - if(!labels.length) { - return; - } - - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels - }); From 2dae0427cfa37a7bbb22fd2604fa789091bd4ac5 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 29 Jun 2022 15:37:40 +0200 Subject: [PATCH 134/212] chore: removing the failing tests that have been replaced with the other functionality Signed-off-by: blam --- .../RepoUrlPicker/AzureRepoPicker.test.tsx | 19 ++------------- .../BitbucketRepoPicker.test.tsx | 23 ++----------------- .../RepoUrlPicker/GerritRepoPicker.test.tsx | 19 --------------- .../RepoUrlPicker/GithubRepoPicker.test.tsx | 20 ---------------- .../RepoUrlPicker/GitlabRepoPicker.test.tsx | 20 ---------------- 5 files changed, 4 insertions(+), 97 deletions(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.test.tsx index ffcf2920c1..eb77240d33 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.test.tsx @@ -19,14 +19,14 @@ import { AzureRepoPicker } from './AzureRepoPicker'; import { render, fireEvent } from '@testing-library/react'; describe('AzureRepoPicker', () => { - it('renders the three input fields', async () => { + it('renders the two input fields', async () => { const { getAllByRole } = render( , ); const allInputs = getAllByRole('textbox'); - expect(allInputs).toHaveLength(3); + expect(allInputs).toHaveLength(2); }); describe('org field', () => { @@ -58,19 +58,4 @@ describe('AzureRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ owner: 'owner' }); }); }); - - describe('repoName field', () => { - it('calls onChange when the repoName changes', () => { - const onChange = jest.fn(); - const { getAllByRole } = render( - , - ); - - const repoNameInput = getAllByRole('textbox')[2]; - - fireEvent.change(repoNameInput, { target: { value: 'repoName' } }); - - expect(onChange).toHaveBeenCalledWith({ repoName: 'repoName' }); - }); - }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.test.tsx index 17fe656006..0ced19a596 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/BitbucketRepoPicker.test.tsx @@ -26,7 +26,7 @@ describe('BitbucketRepoPicker', () => { , ); - expect(getAllByRole('textbox')).toHaveLength(3); + expect(getAllByRole('textbox')).toHaveLength(2); expect(getAllByRole('textbox')[0]).toHaveValue('lolsWorkspace'); }); @@ -39,7 +39,7 @@ describe('BitbucketRepoPicker', () => { , ); - expect(getAllByRole('textbox')).toHaveLength(2); + expect(getAllByRole('textbox')).toHaveLength(1); }); describe('workspace field', () => { it('calls onChange when the workspace changes', () => { @@ -78,23 +78,4 @@ describe('BitbucketRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ project: 'test-project' }); }); }); - - describe('repoName field', () => { - it('calls onChange when the repoName changes', () => { - const onChange = jest.fn(); - const { getAllByRole } = render( - , - ); - - const repoNameInput = getAllByRole('textbox')[2]; - - fireEvent.change(repoNameInput, { target: { value: 'test-repo' } }); - - expect(onChange).toHaveBeenCalledWith({ repoName: 'test-repo' }); - }); - }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.test.tsx index edc6732588..66f0a234be 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GerritRepoPicker.test.tsx @@ -56,23 +56,4 @@ describe('BitbucketRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ workspace: 'test-parent' }); }); }); - - describe('repoName field', () => { - it('calls onChange when the repoName changes', () => { - const onChange = jest.fn(); - const { getAllByRole } = render( - , - ); - - const repoNameInput = getAllByRole('textbox')[2]; - - fireEvent.change(repoNameInput, { target: { value: 'test-repo' } }); - - expect(onChange).toHaveBeenCalledWith({ repoName: 'test-repo' }); - }); - }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.test.tsx index 2c80c40c22..63bc5b8013 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GithubRepoPicker.test.tsx @@ -84,24 +84,4 @@ describe('GithubRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ owner: 'my-mock-owner' }); }); }); - - describe('repo name', () => { - it('should render free text field for input of repo name', () => { - const onChange = jest.fn(); - const { getAllByRole } = render( - , - ); - - const repoNameField = getAllByRole('textbox')[1]; - fireEvent.change(repoNameField, { - target: { value: 'my-mock-repo-name' }, - }); - - expect(onChange).toHaveBeenCalledWith({ repoName: 'my-mock-repo-name' }); - }); - }); }); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx index 49a91c116e..ad5c7f765e 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/GitlabRepoPicker.test.tsx @@ -84,24 +84,4 @@ describe('GitlabRepoPicker', () => { expect(onChange).toHaveBeenCalledWith({ owner: 'my-mock-owner' }); }); }); - - describe('repo name', () => { - it('should render free text field for input of repo name', () => { - const onChange = jest.fn(); - const { getAllByRole } = render( - , - ); - - const repoNameField = getAllByRole('textbox')[1]; - fireEvent.change(repoNameField, { - target: { value: 'my-mock-repo-name' }, - }); - - expect(onChange).toHaveBeenCalledWith({ repoName: 'my-mock-repo-name' }); - }); - }); }); From 1e909bb45c21aff5f76653822df6e6210b5fb398 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 14:16:42 +0000 Subject: [PATCH 135/212] fix(deps): update dependency aws-sdk to v2.1164.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 62ce9848df..8274265d7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8335,9 +8335,9 @@ aws-sdk-mock@^5.2.1: traverse "^0.6.6" aws-sdk@^2.1122.0, aws-sdk@^2.840.0, aws-sdk@^2.948.0: - version "2.1159.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1159.0.tgz#64d585ac608d58e6ff62678be71a4c4ca61ca5dc" - integrity sha512-zm3k/ufwZnkWc6M+HDz00CWuILot4L9kJ5VJsuDS9fwsT9To6k91Y1njCtIV4tcgcXvUru0Sbm4D0w5bc2847A== + version "2.1164.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1164.0.tgz#050ce644ed9993582bd02151bf3ac9d9ebc143f5" + integrity sha512-q/M9E68WabF22G8d8lFgo3NH+9RooYswSY9VG6zqN16C19RRm2sGThp8Sxtz/WUK98BAsxSnkLW1ksmy3BsP7Q== dependencies: buffer "4.9.2" events "1.1.1" From 2454cf3188c30539aac4babd6553b97eac3d1e76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 14:17:32 +0000 Subject: [PATCH 136/212] fix(deps): update dependency cronstrue to v2.11.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 62ce9848df..8ea15abce5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10478,9 +10478,9 @@ cron@^2.0.0: luxon "^1.23.x" cronstrue@^2.2.0: - version "2.10.0" - resolved "https://registry.npmjs.org/cronstrue/-/cronstrue-2.10.0.tgz#9b57e9acc18eb44ebe9be5dc993753fd7d6d8e56" - integrity sha512-WCCaKuuzjZJl/xTaJiK2KB2lhHqAz+cTAHgSiZQc/pNnF2XUSZX0FBfxAG0qa9CogToNoQw7pEBJExc77QnFBQ== + version "2.11.0" + resolved "https://registry.npmjs.org/cronstrue/-/cronstrue-2.11.0.tgz#18ff1b95a836b9b4e06854f796db2dc8fa98ce41" + integrity sha512-iIBCSis5yqtFYWtJAmNOiwDveFWWIn+8uV5UYuPHYu/Aeu5CSSJepSbaHMyfc+pPFgnsCcGzfPQEo7LSGmWbTg== cross-env@^7.0.0: version "7.0.3" From 6e5be0ca68580b0177e6af5515c4eb13a86efb3e Mon Sep 17 00:00:00 2001 From: Francesco Corti Date: Wed, 29 Jun 2022 16:34:36 +0200 Subject: [PATCH 137/212] Roadmap update for Q3 2022. Signed-off-by: Francesco Corti --- docs/overview/roadmap.md | 79 +++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/docs/overview/roadmap.md b/docs/overview/roadmap.md index 727000728f..18af070382 100644 --- a/docs/overview/roadmap.md +++ b/docs/overview/roadmap.md @@ -15,9 +15,9 @@ work"](#future-work). With "next" we mean features planned for release within the ongoing quarter from April through June 2022. With "future" we mean features on the radar, but not yet scheduled. -| [What's next](#whats-next) | [Future work](#future-work) | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| [Ease of onboarding](#ease-of-onboarding)
[Backstage Search 1.0](#search-1.0)
[TechDocs Addon Framework](#techdocs-addon-framework)
[Backend Services (initial)](#backend-services-initial)
[Backstage Security Audit](#backstage-security-audit)
[SIGs for contributors](#sigs-for-contributors) | Security Plan (and Strategy)
Composable Homepage 1.0
GraphQL
Telemetry
Improved UX design | +| [What's next](#whats-next) | [Future work](#future-work) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | +| [Backstage Search 1.0](#search-1.0)
[Backend Services (MVP)](#backend-services-mvp)
[Backstage Security Audit](#backstage-security-audit)
[Backstage Threat Model](#backstage-threat-model)
[TechDocs Addon Framework](techDocs-addon-framework)
[Software Catalog pagination](#software-catalog-pagination)
[More SIGs](#more-sigs) | Ease of onboarding
Composable Homepage 1.0
Creator experience
GraphQL
Telemetry | The long-term roadmap (12 - 36 months) is not detailed in the public roadmap. Third-party contributions are also not currently included in the roadmap. Let us @@ -30,47 +30,22 @@ The feature set below is planned for the ongoing quarter, and grouped by theme. The list order doesn't necessarily reflect priority, and the development/release cycle will vary based on maintainer schedules. -### Ease of onboarding - -A faster (with less development) and easier setup of a proof-of-concept -deployment, as part of the onboarding experience, has been a common and loud -suggestion from new adopters as well as analysts looking at Backstage. - -With this initiative we plan to start facing this important topic with the most -commonly used and challenging tasks. More in particular we plan to reduce the -effort required to go from zero to production in installing and customizing -Backstage, as well as reducing the effort required to populate the Software -Catalog. - -More iterations will be required in the following quarters, but this will be a -good improvement in the onboarding experience, especially for the benefit of new -adopters. - ### Backstage Search 1.0 Fix the few remaining issues to get Backstage Search platform up to 1.0. For more information, see the [Backstage Search documentation and roadmap page](https://backstage.io/docs/features/search/search-overview). -### TechDocs Addon Framework - -Addons are TechDocs features that are added on top of the base docs-like-code experience. An example would be a feature that showed comments on the page. We plan to add an Addon framework and open source a selection of the Addons that we use internally at Spotify. We encourage the Backstage community to add further Addons. - -For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons) - -For general information about TechDocs including roadmap, see [here](https://backstage.io/docs/features/techdocs/techdocs-overview). - -### Backend Services (initial) +### Backend Services (MVP) To better scale and maintain the Backstage instances, a backend services system is planned to be introduced as part of the software architecture. This layer of backend services will help in decoupling the various modules (e.g. Catalog and Scaffolder) from the frontend experience. -In this quarter we plan to start designing the new architecture, together with -the first experimentation and development of the software components. +After the experimentation and design happened in the past quarter, soon we plan to release a first version to start providing the first benefits to adopters and developers. ### Backstage Security Audit -This is the continuation of the initiative started in the previous quarter. This +This is the continuation of the initiative started in the previous quarters. This quarter will see the publication of the report describing the outcome of the audit, together the first fixes and the development of some of the changes required to address the vulnerabilities. @@ -84,12 +59,34 @@ initiative. This initiative is done together with, and with the support of, the [Cloud Native Computing Foundation (CNCF)](https://www.cncf.io/). -### SIGs for contributors +### Backstage Threat Model -The request to better coordinate the increasing number of contributions coming -from the various adopters' developers is loud and clear. We think that the -community is mature enough to start launching the SIGs (Special Interest Groups) -following the successful model of Kubernetes. +This is another (relevant) initiative planned to make Backstage a secure product for the adopters. The goals of this initiative are: + +1. Understand where security investment and attention is needed. +2. Guide the upcoming security audit. +3. Communicate expectations to Backstage adopters and inform and attract security researchers. + +The planned artifacts are: + +- Concise high level threat model that will be included as part of the Backstage security documentation. +- Granular threat model created in conjunction with the security audit to inform further security investment areas for Backstage. + +### TechDocs Addon Framework + +Addons are TechDocs features that are added on top of the base docs-like-code experience. An example would be a feature that showed comments on the page. We plan to add an Addon framework and open source a selection of the Addons that we use internally at Spotify. We encourage the Backstage community to add further Addons. + +For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons) + +For general information about TechDocs including roadmap, see [here](https://backstage.io/docs/features/techdocs/techdocs-overview). + +### Software Catalog pagination + +Today adopters with a big catalog (with several thousands of software components) might not have an ideal end-user experience when viewing the `/catalog` page. The issue is related to how the entities are fetched by the frontend. In order to provide a better end-user experience the pagination of the catalog’s entities needs to be enforced. Some experimentations are already completed but in this quarter we plan to continue, and hopefully complete, this relevant enhancement. + +### More SIGs + +In the last quarter we launched the [Catalog SIG (Special Interest Group)](https://github.com/backstage/community/tree/main/sigs/sig-catalog) to better coordinate the increasing number of contributions to the project. We think that this is the proper path to follow to engage more with the contributors. For this reason we will launch other SIGs dedicated to the most interesting topics for the community. ## Future work @@ -97,18 +94,16 @@ The following feature list doesn't represent a commitment to develop, and the list order doesn't reflect any priority or importance, but these features are on the maintainers' radar, with clear interest expressed by the community. -- **Security Plan (and Strategy):** The purpose of the Security Strategy is to - move another step along the path to maturing the platform, setting the - expectations of any adopters from a security standpoint. +- **Ease of onboarding:** A faster (with less development) and easier setup of Backstage and the most relevant/adopted plugins. - **Composable Homepage 1.0:** Driving this to 1.0 by adding some composable components. +- **Creator experience:** Provide a better Backstage user experience through + visual guidelines and templates, especially navigation across plug-ins and + portal functionalities. - **[GraphQL](https://graphql.org/) support:** Introduce the ability to query Backstage backend services with a standard query language for APIs. - **Telemetry:** To efficiently generate logging and metrics in such a way that adopters can get insights so that Backstage can be monitored and improved. -- **Improved UX design:** Provide a better Backstage user experience through - visual guidelines and templates, especially navigation across plug-ins and - portal functionalities. ## How to influence the roadmap From 7ecaf0067de5daa1fa2382331e5175a633d0e100 Mon Sep 17 00:00:00 2001 From: Ke Ma Date: Wed, 29 Jun 2022 16:42:58 +0200 Subject: [PATCH 138/212] fix header style so that EntityContextMenu is in correct shape Signed-off-by: codermango --- packages/core-components/src/layout/Header/Header.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core-components/src/layout/Header/Header.tsx b/packages/core-components/src/layout/Header/Header.tsx index bb4d19b949..a32d116b56 100644 --- a/packages/core-components/src/layout/Header/Header.tsx +++ b/packages/core-components/src/layout/Header/Header.tsx @@ -63,6 +63,7 @@ const useStyles = makeStyles( }, rightItemsBox: { width: 'auto', + alignItems: 'center', }, title: { color: theme.palette.bursts.fontColor, From b4b711bcc2c1e93b5851799ab596bababbf5f856 Mon Sep 17 00:00:00 2001 From: codermango Date: Wed, 29 Jun 2022 16:51:26 +0200 Subject: [PATCH 139/212] add changeset Signed-off-by: codermango --- .changeset/five-fireants-run.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/five-fireants-run.md diff --git a/.changeset/five-fireants-run.md b/.changeset/five-fireants-run.md new file mode 100644 index 0000000000..a18ba2b8d2 --- /dev/null +++ b/.changeset/five-fireants-run.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': minor +--- + +Fix the EntityLayout header style so that EntityContextMenu button can display in correct shape when user hover on it From bdc77d8cb61e1f578decef2d01d3cc0dd9476b5a Mon Sep 17 00:00:00 2001 From: codermango Date: Wed, 29 Jun 2022 17:18:16 +0200 Subject: [PATCH 140/212] fix changeset Signed-off-by: codermango --- .changeset/five-fireants-run.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/five-fireants-run.md b/.changeset/five-fireants-run.md index a18ba2b8d2..589d46cc81 100644 --- a/.changeset/five-fireants-run.md +++ b/.changeset/five-fireants-run.md @@ -1,5 +1,5 @@ --- -'@backstage/core-components': minor +'@backstage/core-components': patch --- Fix the EntityLayout header style so that EntityContextMenu button can display in correct shape when user hover on it From bb5f171472e0c948526fe13910c65b1635b50a1e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 16:19:23 +0000 Subject: [PATCH 141/212] chore(deps): update dependency @graphql-codegen/cli to v2.6.3 Signed-off-by: Renovate Bot --- yarn.lock | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..ccb89c56bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2364,9 +2364,9 @@ meros "^1.1.4" "@graphql-codegen/cli@^2.3.1": - version "2.6.2" - resolved "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.6.2.tgz#a9aa4656141ee0998cae8c7ad7d0bf9ca8e0c9ae" - integrity sha512-UO75msoVgvLEvfjCezM09cQQqp32+mR8Ma1ACsBpr7nroFvHbgcu2ulx1cMovg4sxDBCsvd9Eq/xOOMpARUxtw== + version "2.6.3" + resolved "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.6.3.tgz#80d6f0324bcf9a375b9a1d5e998fcd62b3bace66" + integrity sha512-gxtKbe6LlBhGqDISZldCMcGaV1rSTS4D836clSR52kBY7UBhZZcDOcNZM0zDJDFGpjHtwuL9p0Kb4w9HRXYfew== dependencies: "@graphql-codegen/core" "2.5.1" "@graphql-codegen/plugin-helpers" "^2.4.1" @@ -2387,24 +2387,18 @@ common-tags "^1.8.0" cosmiconfig "^7.0.0" debounce "^1.2.0" - dependency-graph "^0.11.0" detect-indent "^6.0.0" - glob "^7.1.6" - globby "^11.0.4" graphql-config "^4.1.0" inquirer "^8.0.0" is-glob "^4.0.1" json-to-pretty-yaml "^1.2.2" - latest-version "5.1.0" + latest-version "^6.0.0" listr "^0.14.3" listr-update-renderer "^0.5.0" log-symbols "^4.0.0" - minimatch "^4.0.0" mkdirp "^1.0.4" string-env-interpolation "^1.0.1" ts-log "^2.2.3" - tslib "~2.3.0" - valid-url "^1.0.9" wrap-ansi "^7.0.0" yaml "^1.10.0" yargs "^17.0.0" @@ -14075,7 +14069,7 @@ got@11.8.3: p-cancelable "^2.0.0" responselike "^2.0.0" -got@^11.8.0: +got@^11.8.0, got@^11.8.2: version "11.8.5" resolved "https://registry.npmjs.org/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== @@ -17051,13 +17045,20 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "~0.3.2" -latest-version@5.1.0, latest-version@^5.1.0: +latest-version@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== dependencies: package-json "^6.3.0" +latest-version@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/latest-version/-/latest-version-6.0.0.tgz#469fb95f1d588b38436c1ec8fec947b99ed268c7" + integrity sha512-zfTuGx4PwpoSJ1mABs58AkM6qMzu49LZ7LT5JHprKvpGpQ+cYtfSibi3tLLrH4z7UylYU42rfBdwN8YgqbTljA== + dependencies: + package-json "^7.0.0" + lazy-ass@1.6.0, lazy-ass@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" @@ -18681,13 +18682,6 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^4.0.0: - version "4.2.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== - dependencies: - brace-expansion "^1.1.7" - minimist-options@4.1.0, minimist-options@^4.0.2: version "4.1.0" resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -20012,6 +20006,16 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" +package-json@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/package-json/-/package-json-7.0.0.tgz#1355416e50a5c1b8f1a6f471197a3650d21186bf" + integrity sha512-CHJqc94AA8YfSLHGQT3DbvSIuE12NLFekpM4n7LRrAd3dOJtA911+4xe9q6nC3/jcKraq7nNS9VxgtT0KC+diA== + dependencies: + got "^11.8.2" + registry-auth-token "^4.0.0" + registry-url "^5.0.0" + semver "^7.3.5" + packet-reader@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" @@ -25678,11 +25682,6 @@ v8-to-istanbul@^8.1.0: convert-source-map "^1.6.0" source-map "^0.7.3" -valid-url@^1.0.9: - version "1.0.9" - resolved "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" - integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= - validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" From f6b6fb7165bec17359a9bd344980daad2bf518a8 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 29 Jun 2022 18:35:59 +0200 Subject: [PATCH 142/212] cli: blocking IO for test --help Signed-off-by: Patrik Oldsberg --- .changeset/smart-elephants-knock.md | 5 +++++ packages/cli/src/commands/test.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/smart-elephants-knock.md diff --git a/.changeset/smart-elephants-knock.md b/.changeset/smart-elephants-knock.md new file mode 100644 index 0000000000..7aed10a71e --- /dev/null +++ b/.changeset/smart-elephants-knock.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The `test` command now ensures that all IO is flushed before exiting when printing `--help`. diff --git a/packages/cli/src/commands/test.ts b/packages/cli/src/commands/test.ts index f1bfcc356b..88769aec1a 100644 --- a/packages/cli/src/commands/test.ts +++ b/packages/cli/src/commands/test.ts @@ -78,6 +78,10 @@ export default async (_opts: OptionValues, cmd: Command) => { process.env.TZ = 'UTC'; } + if (args.includes('--help')) { + (process.stdout as any)._handle.setBlocking(true); + } + // eslint-disable-next-line jest/no-jest-import await require('jest').run(args); }; From c1f6fcb2e9716dd3def7acfbb179f4e8154f24e3 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 29 Jun 2022 18:42:36 +0200 Subject: [PATCH 143/212] cli: update cli report Signed-off-by: Patrik Oldsberg --- packages/cli/cli-report.md | 138 +++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/packages/cli/cli-report.md b/packages/cli/cli-report.md index 04f034cee1..8c678d885e 100644 --- a/packages/cli/cli-report.md +++ b/packages/cli/cli-report.md @@ -312,6 +312,75 @@ Options: --filter --findRelatedTests --forceExit + --globalSetup + --globalTeardown + --globals + --haste + --init + --injectGlobals + --json + --lastCommit + --listTests + --logHeapUsage + --maxConcurrency + -w, --maxWorkers + --moduleDirectories + --moduleFileExtensions + --moduleNameMapper + --modulePathIgnorePatterns + --modulePaths + --noStackTrace + --notify + --notifyMode + -o, --onlyChanged + -f, --onlyFailures + --outputFile + --passWithNoTests + --preset + --prettierPath + --projects + --reporters + --resetMocks + --resetModules + --resolver + --restoreMocks + --rootDir + --roots + -i, --runInBand + --runTestsByPath + --runner + --selectProjects + --setupFiles + --setupFilesAfterEnv + --showConfig + --silent + --skipFilter + --snapshotSerializers + --testEnvironment + --testEnvironmentOptions + --testFailureExitCode + --testLocationInResults + --testMatch + -t, --testNamePattern + --testPathIgnorePatterns + --testPathPattern + --testRegex + --testResultsProcessor + --testRunner + --testSequencer + --testTimeout + --testURL + --timers + --transform + --transformIgnorePatterns + --unmockedModulePathPatterns + -u, --updateSnapshot + --useStderr + --verbose + --watch + --watchAll + --watchPathIgnorePatterns + --watchman ``` ### `backstage-cli plugin:diff` @@ -401,6 +470,75 @@ Options: --filter --findRelatedTests --forceExit + --globalSetup + --globalTeardown + --globals + --haste + --init + --injectGlobals + --json + --lastCommit + --listTests + --logHeapUsage + --maxConcurrency + -w, --maxWorkers + --moduleDirectories + --moduleFileExtensions + --moduleNameMapper + --modulePathIgnorePatterns + --modulePaths + --noStackTrace + --notify + --notifyMode + -o, --onlyChanged + -f, --onlyFailures + --outputFile + --passWithNoTests + --preset + --prettierPath + --projects + --reporters + --resetMocks + --resetModules + --resolver + --restoreMocks + --rootDir + --roots + -i, --runInBand + --runTestsByPath + --runner + --selectProjects + --setupFiles + --setupFilesAfterEnv + --showConfig + --silent + --skipFilter + --snapshotSerializers + --testEnvironment + --testEnvironmentOptions + --testFailureExitCode + --testLocationInResults + --testMatch + -t, --testNamePattern + --testPathIgnorePatterns + --testPathPattern + --testRegex + --testResultsProcessor + --testRunner + --testSequencer + --testTimeout + --testURL + --timers + --transform + --transformIgnorePatterns + --unmockedModulePathPatterns + -u, --updateSnapshot + --useStderr + --verbose + --watch + --watchAll + --watchPathIgnorePatterns + --watchman ``` ### `backstage-cli versions:bump` From 396111dd05cd7de573c2b37a434f5d46d8b6779c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 29 Jun 2022 16:25:18 +0200 Subject: [PATCH 144/212] workflows: use latest version of cron action with app auth Signed-off-by: Patrik Oldsberg --- .github/workflows/cron.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 4d1ba7fc0e..e2144a56c1 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,4 +8,8 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.1.8 + - uses: backstage/actions/cron@v0.1.12 + with: + app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} + private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} + installation-id: ${{ secrets.BACKSTAGE_GOALIE_INSTALLATION_ID }} From 48df40d383592cff0b8982e624656e7edcafba66 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 18:55:35 +0000 Subject: [PATCH 145/212] fix(deps): update dependency aws-sdk to v2.1165.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..bd30071ed1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8335,9 +8335,9 @@ aws-sdk-mock@^5.2.1: traverse "^0.6.6" aws-sdk@^2.1122.0, aws-sdk@^2.840.0, aws-sdk@^2.948.0: - version "2.1164.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1164.0.tgz#050ce644ed9993582bd02151bf3ac9d9ebc143f5" - integrity sha512-q/M9E68WabF22G8d8lFgo3NH+9RooYswSY9VG6zqN16C19RRm2sGThp8Sxtz/WUK98BAsxSnkLW1ksmy3BsP7Q== + version "2.1165.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1165.0.tgz#4da669d1e9020344cef75d961882f52a7931a379" + integrity sha512-2oVkSuXsLeErt+H4M2OGIz4p1LPS+QRfY2WnW4QKMndASOcvHKZTfzuY8jmc9ZnDGyguiGdT3idYU8KpNg0sGw== dependencies: buffer "4.9.2" events "1.1.1" From 9b1120cf9073fc7ee19dedd89e6eb6f62a05b761 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 18:57:06 +0000 Subject: [PATCH 146/212] fix(deps): update dependency eslint-plugin-jsx-a11y to v6.6.0 Signed-off-by: Renovate Bot --- yarn.lock | 56 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..d56540762a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1457,7 +1457,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.15.4", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.17.7" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.7.tgz#a5f3328dc41ff39d803f311cfe17703418cf9825" integrity sha512-L6rvG9GDxaLgFjg41K+5Yv9OMrU98sWe+Ykmc6FDJW/+vYZMhdOMKkISgzptMaERHvS2Y2lw9MDRm2gHhlQQoA== @@ -1471,6 +1471,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.18.3": + version "7.18.6" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" + integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" @@ -8118,7 +8125,7 @@ array-ify@^1.0.0: resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-includes@^3.1.2, array-includes@^3.1.3, array-includes@^3.1.4: +array-includes@^3.1.2, array-includes@^3.1.4: version "3.1.4" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== @@ -8359,10 +8366,10 @@ aws4@^1.11.0, aws4@^1.8.0: resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axe-core@^4.3.5: - version "4.3.5" - resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.3.5.tgz#78d6911ba317a8262bfee292aeafcc1e04b49cc5" - integrity sha512-WKTW1+xAzhMS5dJsxWkliixlO/PqC4VhmO9T4juNYcaTg9jzWiJsou6m5pxWYGfigWbwzJWeFY6z47a+4neRXA== +axe-core@^4.4.2: + version "4.4.2" + resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz#dcf7fb6dea866166c3eab33d68208afe4d5f670c" + integrity sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA== axios-cached-dns-resolve@0.5.2: version "0.5.2" @@ -11089,10 +11096,10 @@ dagre@^0.8.5: graphlib "^2.1.8" lodash "^4.17.15" -damerau-levenshtein@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz#64368003512a1a6992593741a09a9d31a836f55d" - integrity sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw== +damerau-levenshtein@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" + integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== dargs@^7.0.0: version "7.0.0" @@ -12308,22 +12315,23 @@ eslint-plugin-jest@^26.1.2: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsx-a11y@^6.5.1: - version "6.5.1" - resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8" - integrity sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g== + version "6.6.0" + resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.6.0.tgz#2c5ac12e013eb98337b9aa261c3b355275cc6415" + integrity sha512-kTeLuIzpNhXL2CwLlc8AHI0aFRwWHcg483yepO9VQiHzM9bZwJdzTkzBszbuPrbgGmq2rlX/FaT2fJQsjUSHsw== dependencies: - "@babel/runtime" "^7.16.3" + "@babel/runtime" "^7.18.3" aria-query "^4.2.2" - array-includes "^3.1.4" + array-includes "^3.1.5" ast-types-flow "^0.0.7" - axe-core "^4.3.5" + axe-core "^4.4.2" axobject-query "^2.2.0" - damerau-levenshtein "^1.0.7" + damerau-levenshtein "^1.0.8" emoji-regex "^9.2.2" has "^1.0.3" - jsx-ast-utils "^3.2.1" + jsx-ast-utils "^3.3.1" language-tags "^1.0.5" - minimatch "^3.0.4" + minimatch "^3.1.2" + semver "^6.3.0" eslint-plugin-monorepo@^0.3.2: version "0.3.2" @@ -16885,12 +16893,12 @@ jss@~10.8.2: array-includes "^3.1.2" object.assign "^4.1.2" -jsx-ast-utils@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz#720b97bfe7d901b927d87c3773637ae8ea48781b" - integrity sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA== +jsx-ast-utils@^3.3.1: + version "3.3.1" + resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.1.tgz#a3e0f1cb7e230954eab4dcbce9f6288a78f8ba44" + integrity sha512-pxrjmNpeRw5wwVeWyEAk7QJu2GnBO3uzPFmHCKJJFPKK2Cy0cWL23krGtLdnMmbIi6/FjlrQpPyfQI19ByPOhQ== dependencies: - array-includes "^3.1.3" + array-includes "^3.1.5" object.assign "^4.1.2" just-diff-apply@^4.0.1: From a0258a9587c7c3fcf724236a16da380ade5787cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 21:55:58 +0000 Subject: [PATCH 147/212] chore(deps): update dependency @types/node to v16.11.42 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..450ec3b541 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6653,9 +6653,9 @@ integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A== "@types/node@^16.0.0", "@types/node@^16.11.26", "@types/node@^16.9.2": - version "16.11.41" - resolved "https://registry.npmjs.org/@types/node/-/node-16.11.41.tgz#88eb485b1bfdb4c224d878b7832239536aa2f813" - integrity sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ== + version "16.11.42" + resolved "https://registry.npmjs.org/@types/node/-/node-16.11.42.tgz#d2a75c58e9b0902b82dc54bd4c13f8ef12bd1020" + integrity sha512-iwLrPOopPy6V3E+1yHTpJea3bdsNso0b0utLOJJwaa/PLzqBt3GZl3stMcakc/gr89SfcNk2ki3z7Gvue9hYGQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" From 26a38b60b3b88a92d3064e26a6e1c897a1d49f33 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Jun 2022 21:56:42 +0000 Subject: [PATCH 148/212] fix(deps): update dependency @google-cloud/storage to v6.2.2 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..aa881dc838 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2316,9 +2316,9 @@ integrity sha512-91ArYvRgXWb73YvEOBMmOcJc0bDRs5yiVHnqkwoG0f3nm7nZuipllz6e7BvFESBvjkDTBC0zMD8QxedUwNLc1A== "@google-cloud/storage@^6.0.0": - version "6.2.1" - resolved "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.2.1.tgz#6f02e44d907e2fcb2b80aeea5cc6e5575dfeefcc" - integrity sha512-obLGOFCp25rpRn4CZvZqQkSHhY+dBrK7IjDdFpF5gOXVxE40ilr287uikiGPjflVFbgNwO2qhioJNqMzxoqHZg== + version "6.2.2" + resolved "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.2.2.tgz#1fd3ee85e5fea55a9696c98769d097b28ff4d775" + integrity sha512-KhAOxmGfmELKKn6cdvgGfAi/YBLi19hI1jX3QI7xQmbeajSFMgUKrIPbbyfMIxQPOEQ9vG0MQX1uganlA/HTRA== dependencies: "@google-cloud/paginator" "^3.0.7" "@google-cloud/projectify" "^3.0.0" From 34f4b938e304584654cc98c348bfd30b737d69f6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 01:08:24 +0000 Subject: [PATCH 149/212] fix(deps): update dependency npm-packlist to v5.1.1 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3cb38cc83b..7b7bb1ba45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19355,9 +19355,9 @@ npm-packlist@^3.0.0: npm-normalize-package-bin "^1.0.1" npm-packlist@^5.0.0, npm-packlist@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.0.tgz#f3fd52903a021009913a133732022132eb355ce7" - integrity sha512-a04sqF6FbkyOAFA19AA0e94gS7Et5T2/IMj3VOT9nOF2RaRdVPQ1Q17Fb/HaDRFs+gbC7HOmhVZ29adpWgmDZg== + version "5.1.1" + resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" + integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw== dependencies: glob "^8.0.1" ignore-walk "^5.0.1" From 4ae70086df3700d24e9e8028e0b22a9946a75b72 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 07:36:33 +0000 Subject: [PATCH 150/212] chore(deps): update dependency esbuild to v0.14.48 Signed-off-by: Renovate Bot --- yarn.lock | 206 +++++++++++++++++++++++++++--------------------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/yarn.lock b/yarn.lock index 450ec3b541..5584ec9b1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12048,75 +12048,75 @@ es6-error@^4.1.1: resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -esbuild-android-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.47.tgz#ef95b42c67bcf4268c869153fa3ad1466c4cea6b" - integrity sha512-R13Bd9+tqLVFndncMHssZrPWe6/0Kpv2/dt4aA69soX4PRxlzsVpCvoJeFE8sOEoeVEiBkI0myjlkDodXlHa0g== +esbuild-android-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.48.tgz#7e6394a0e517f738641385aaf553c7e4fb6d1ae3" + integrity sha512-3aMjboap/kqwCUpGWIjsk20TtxVoKck8/4Tu19rubh7t5Ra0Yrpg30Mt1QXXlipOazrEceGeWurXKeFJgkPOUg== -esbuild-android-arm64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.47.tgz#4ebd7ce9fb250b4695faa3ee46fd3b0754ecd9e6" - integrity sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ== +esbuild-android-arm64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.48.tgz#6877566be0f82dd5a43030c0007d06ece7f7c02f" + integrity sha512-vptI3K0wGALiDq+EvRuZotZrJqkYkN5282iAfcffjI5lmGG9G1ta/CIVauhY42MBXwEgDJkweiDcDMRLzBZC4g== -esbuild-darwin-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.47.tgz#e0da6c244f497192f951807f003f6a423ed23188" - integrity sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA== +esbuild-darwin-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.48.tgz#ea3caddb707d88f844b1aa1dea5ff3b0a71ef1fd" + integrity sha512-gGQZa4+hab2Va/Zww94YbshLuWteyKGD3+EsVon8EWTWhnHFRm5N9NbALNbwi/7hQ/hM1Zm4FuHg+k6BLsl5UA== -esbuild-darwin-arm64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.47.tgz#cd40fd49a672fca581ed202834239dfe540a9028" - integrity sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw== +esbuild-darwin-arm64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.48.tgz#4e5eaab54df66cc319b76a2ac0e8af4e6f0d9c2f" + integrity sha512-bFjnNEXjhZT+IZ8RvRGNJthLWNHV5JkCtuOFOnjvo5pC0sk2/QVk0Qc06g2PV3J0TcU6kaPC3RN9yy9w2PSLEA== -esbuild-freebsd-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.47.tgz#8da6a14c095b29c01fc8087a16cb7906debc2d67" - integrity sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ== +esbuild-freebsd-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.48.tgz#47b5abc7426eae66861490ffbb380acc67af5b15" + integrity sha512-1NOlwRxmOsnPcWOGTB10JKAkYSb2nue0oM1AfHWunW/mv3wERfJmnYlGzL3UAOIUXZqW8GeA2mv+QGwq7DToqA== -esbuild-freebsd-arm64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.47.tgz#ad31f9c92817ff8f33fd253af7ab5122dc1b83f6" - integrity sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ== +esbuild-freebsd-arm64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.48.tgz#e8c54c8637cd44feed967ea12338b0a4da3a7b11" + integrity sha512-gXqKdO8wabVcYtluAbikDH2jhXp+Klq5oCD5qbVyUG6tFiGhrC9oczKq3vIrrtwcxDQqK6+HDYK8Zrd4bCA9Gw== -esbuild-linux-32@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.47.tgz#de085e4db2e692ea30c71208ccc23fdcf5196c58" - integrity sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw== +esbuild-linux-32@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.48.tgz#229cf3246de2b7937c3ac13fac622d4d7a1344c5" + integrity sha512-ghGyDfS289z/LReZQUuuKq9KlTiTspxL8SITBFQFAFRA/IkIvDpnZnCAKTCjGXAmUqroMQfKJXMxyjJA69c/nQ== -esbuild-linux-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.47.tgz#2a9321bbccb01f01b04cebfcfccbabeba3658ba1" - integrity sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw== +esbuild-linux-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.48.tgz#7c0e7226c02c42aacc5656c36977493dc1e96c4f" + integrity sha512-vni3p/gppLMVZLghI7oMqbOZdGmLbbKR23XFARKnszCIBpEMEDxOMNIKPmMItQrmH/iJrL1z8Jt2nynY0bE1ug== -esbuild-linux-arm64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.47.tgz#b9da7b6fc4b0ca7a13363a0c5b7bb927e4bc535a" - integrity sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw== +esbuild-linux-arm64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.48.tgz#0af1eda474b5c6cc0cace8235b74d0cb8fcf57a7" + integrity sha512-3CFsOlpoxlKPRevEHq8aAntgYGYkE1N9yRYAcPyng/p4Wyx0tPR5SBYsxLKcgPB9mR8chHEhtWYz6EZ+H199Zw== -esbuild-linux-arm@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.47.tgz#56fec2a09b9561c337059d4af53625142aded853" - integrity sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA== +esbuild-linux-arm@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.48.tgz#de4d1fa6b77cdcd00e2bb43dd0801e4680f0ab52" + integrity sha512-+VfSV7Akh1XUiDNXgqgY1cUP1i2vjI+BmlyXRfVz5AfV3jbpde8JTs5Q9sYgaoq5cWfuKfoZB/QkGOI+QcL1Tw== -esbuild-linux-mips64le@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.47.tgz#9db21561f8f22ed79ef2aedb7bbef082b46cf823" - integrity sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg== +esbuild-linux-mips64le@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.48.tgz#822c1778495f7868e990d4da47ad7281df28fd15" + integrity sha512-cs0uOiRlPp6ymknDnjajCgvDMSsLw5mST2UXh+ZIrXTj2Ifyf2aAP3Iw4DiqgnyYLV2O/v/yWBJx+WfmKEpNLA== -esbuild-linux-ppc64le@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.47.tgz#dc3a3da321222b11e96e50efafec9d2de408198b" - integrity sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w== +esbuild-linux-ppc64le@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.48.tgz#55de0a9ec4a48fedfe82a63e083164d001709447" + integrity sha512-+2F0vJMkuI0Wie/wcSPDCqXvSFEELH7Jubxb7mpWrA/4NpT+/byjxDz0gG6R1WJoeDefcrMfpBx4GFNN1JQorQ== -esbuild-linux-riscv64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.47.tgz#9bd6dcd3dca6c0357084ecd06e1d2d4bf105335f" - integrity sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g== +esbuild-linux-riscv64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.48.tgz#cd2b7381880b2f4b21a5a598fb673492120f18a5" + integrity sha512-BmaK/GfEE+5F2/QDrIXteFGKnVHGxlnK9MjdVKMTfvtmudjY3k2t8NtlY4qemKSizc+QwyombGWTBDc76rxePA== -esbuild-linux-s390x@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.47.tgz#a458af939b52f2cd32fc561410d441a51f69d41f" - integrity sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw== +esbuild-linux-s390x@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.48.tgz#4b319eca2a5c64637fc7397ffbd9671719cdb6bf" + integrity sha512-tndw/0B9jiCL+KWKo0TSMaUm5UWBLsfCKVdbfMlb3d5LeV9WbijZ8Ordia8SAYv38VSJWOEt6eDCdOx8LqkC4g== esbuild-loader@^2.18.0: version "2.19.0" @@ -12130,61 +12130,61 @@ esbuild-loader@^2.18.0: tapable "^2.2.0" webpack-sources "^2.2.0" -esbuild-netbsd-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.47.tgz#6388e785d7e7e4420cb01348d7483ab511b16aa8" - integrity sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ== +esbuild-netbsd-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.48.tgz#c27cde8b5cb55dcc227943a18ab078fb98d0adbf" + integrity sha512-V9hgXfwf/T901Lr1wkOfoevtyNkrxmMcRHyticybBUHookznipMOHoF41Al68QBsqBxnITCEpjjd4yAos7z9Tw== -esbuild-openbsd-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.47.tgz#309af806db561aa886c445344d1aacab850dbdc5" - integrity sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw== +esbuild-openbsd-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.48.tgz#af5ab2d1cb41f09064bba9465fc8bf1309150df1" + integrity sha512-+IHf4JcbnnBl4T52egorXMatil/za0awqzg2Vy6FBgPcBpisDWT2sVz/tNdrK9kAqj+GZG/jZdrOkj7wsrNTKA== -esbuild-sunos-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.47.tgz#3f19612dcdb89ba6c65283a7ff6e16f8afbf8aaa" - integrity sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ== +esbuild-sunos-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.48.tgz#db3ae20526055cf6fd5c4582676233814603ac54" + integrity sha512-77m8bsr5wOpOWbGi9KSqDphcq6dFeJyun8TA+12JW/GAjyfTwVtOnN8DOt6DSPUfEV+ltVMNqtXUeTeMAxl5KA== -esbuild-windows-32@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.47.tgz#a92d279c8458d5dc319abcfeb30aa49e8f2e6f7f" - integrity sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ== +esbuild-windows-32@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.48.tgz#021ffceb0a3f83078262870da88a912293c57475" + integrity sha512-EPgRuTPP8vK9maxpTGDe5lSoIBHGKO/AuxDncg5O3NkrPeLNdvvK8oywB0zGaAZXxYWfNNSHskvvDgmfVTguhg== -esbuild-windows-64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.47.tgz#2564c3fcf0c23d701edb71af8c52d3be4cec5f8a" - integrity sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ== +esbuild-windows-64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.48.tgz#a4d3407b580f9faac51f61eec095fa985fb3fee4" + integrity sha512-YmpXjdT1q0b8ictSdGwH3M8VCoqPpK1/UArze3X199w6u8hUx3V8BhAi1WjbsfDYRBanVVtduAhh2sirImtAvA== -esbuild-windows-arm64@0.14.47: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.47.tgz#86d9db1a22d83360f726ac5fba41c2f625db6878" - integrity sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ== +esbuild-windows-arm64@0.14.48: + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.48.tgz#762c0562127d8b09bfb70a3c816460742dd82880" + integrity sha512-HHaOMCsCXp0rz5BT2crTka6MPWVno121NKApsGs/OIW5QC0ggC69YMGs1aJct9/9FSUF4A1xNE/cLvgB5svR4g== esbuild@^0.14.1, esbuild@^0.14.10, esbuild@^0.14.39: - version "0.14.47" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.47.tgz#0d6415f6bd8eb9e73a58f7f9ae04c5276cda0e4d" - integrity sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA== + version "0.14.48" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.14.48.tgz#da5d8d25cd2d940c45ea0cfecdca727f7aee2b85" + integrity sha512-w6N1Yn5MtqK2U1/WZTX9ZqUVb8IOLZkZ5AdHkT6x3cHDMVsYWC7WPdiLmx19w3i4Rwzy5LqsEMtVihG3e4rFzA== optionalDependencies: - esbuild-android-64 "0.14.47" - esbuild-android-arm64 "0.14.47" - esbuild-darwin-64 "0.14.47" - esbuild-darwin-arm64 "0.14.47" - esbuild-freebsd-64 "0.14.47" - esbuild-freebsd-arm64 "0.14.47" - esbuild-linux-32 "0.14.47" - esbuild-linux-64 "0.14.47" - esbuild-linux-arm "0.14.47" - esbuild-linux-arm64 "0.14.47" - esbuild-linux-mips64le "0.14.47" - esbuild-linux-ppc64le "0.14.47" - esbuild-linux-riscv64 "0.14.47" - esbuild-linux-s390x "0.14.47" - esbuild-netbsd-64 "0.14.47" - esbuild-openbsd-64 "0.14.47" - esbuild-sunos-64 "0.14.47" - esbuild-windows-32 "0.14.47" - esbuild-windows-64 "0.14.47" - esbuild-windows-arm64 "0.14.47" + esbuild-android-64 "0.14.48" + esbuild-android-arm64 "0.14.48" + esbuild-darwin-64 "0.14.48" + esbuild-darwin-arm64 "0.14.48" + esbuild-freebsd-64 "0.14.48" + esbuild-freebsd-arm64 "0.14.48" + esbuild-linux-32 "0.14.48" + esbuild-linux-64 "0.14.48" + esbuild-linux-arm "0.14.48" + esbuild-linux-arm64 "0.14.48" + esbuild-linux-mips64le "0.14.48" + esbuild-linux-ppc64le "0.14.48" + esbuild-linux-riscv64 "0.14.48" + esbuild-linux-s390x "0.14.48" + esbuild-netbsd-64 "0.14.48" + esbuild-openbsd-64 "0.14.48" + esbuild-sunos-64 "0.14.48" + esbuild-windows-32 "0.14.48" + esbuild-windows-64 "0.14.48" + esbuild-windows-arm64 "0.14.48" escalade@^3.1.1: version "3.1.1" From ddf30fbd8acc1dee9b5473fd41079ad46be89d3a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 07:50:46 +0000 Subject: [PATCH 151/212] fix(deps): update dependency @uiw/react-codemirror to v4.9.5 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1e60c65663..6e03b9eade 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7402,9 +7402,9 @@ eslint-visitor-keys "^3.0.0" "@uiw/react-codemirror@^4.9.3": - version "4.9.4" - resolved "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.9.4.tgz#4643201f279fed103f2cf15df9431931fe4e9f15" - integrity sha512-IsC5xDevpIeLMzHQQwT2W40gFFIdKeT1T0DHjzzai+s5SIrMlGe3QSHWeC1wSO7FtfNxFpFlTYMGJm5JwUviMA== + version "4.9.5" + resolved "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.9.5.tgz#0f66c09dfc355baef5a7020f206da8db90bae223" + integrity sha512-KHgP/PII9Gv4iEUzbdO95qpSSPy27iSHzxQ01mBPWC4UvzuA0eQY2h64gzi/ld68esbKMGYoevgOBPCRJwNN1A== dependencies: "@babel/runtime" ">=7.11.0" "@codemirror/theme-one-dark" "^6.0.0" From e6ed8153ccc4414a29abddf36f041ae3b004310f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 29 Jun 2022 21:11:19 +0200 Subject: [PATCH 152/212] workflows: switch to common composite action for yarn install Signed-off-by: Patrik Oldsberg --- .github/workflows/ci.yml | 35 ++------------ .github/workflows/deploy_nightly.yml | 24 ++-------- .github/workflows/deploy_packages.yml | 48 +++---------------- .github/workflows/sync_code-formatting.yml | 24 ++-------- .github/workflows/sync_snyk-github-issues.yml | 24 ++-------- .github/workflows/verify_e2e-linux.yml | 26 ++-------- .github/workflows/verify_storybook.yml | 34 ++++--------- .github/workflows/verify_windows.yml | 14 +----- 8 files changed, 33 insertions(+), 196 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0718c8a8b9..c9fc151fb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,45 +64,16 @@ jobs: - name: fetch branch master run: git fetch origin master - # Beginning of yarn setup, keep in sync between all workflows. - # TODO(Rugvip): move this to composite action once all features we use are supported - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - # Cache every node_modules folder inside the monorepo - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - # We use both yarn.lock and package.json as cache keys to ensure that - # changes to local monorepo packages bust the cache. - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - # If we get a cache hit for node_modules, there's no need to bring in the global - # yarn cache or run yarn install, as all dependencies will be installed already. - - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: yarn install - if: steps.cache-modules.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: check for yarn.lock changes id: yarn-lock diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index c90894bce4..97b3f45954 100644 --- a/.github/workflows/deploy_nightly.yml +++ b/.github/workflows/deploy_nightly.yml @@ -20,33 +20,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} # No verification done here, only build & publish. If the master branch # is broken we will see that from those builds, but we still want to push nightly diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index b63507df0c..529c7a4286 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -61,33 +61,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: Fetch previous commit for release check run: git fetch origin '${{ github.event.before }}' @@ -157,33 +139,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: build type declarations run: yarn tsc:full diff --git a/.github/workflows/sync_code-formatting.yml b/.github/workflows/sync_code-formatting.yml index b6fce0e68d..6ea6bc5de6 100644 --- a/.github/workflows/sync_code-formatting.yml +++ b/.github/workflows/sync_code-formatting.yml @@ -14,33 +14,15 @@ jobs: # Fetch changes to previous commit - required for 'only_changed' in Prettier action fetch-depth: 0 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: Run Prettier on ADOPTERS.md uses: creyD/prettier_action@v4.2 diff --git a/.github/workflows/sync_snyk-github-issues.yml b/.github/workflows/sync_snyk-github-issues.yml index e45a36c8e8..9daf85ffa6 100644 --- a/.github/workflows/sync_snyk-github-issues.yml +++ b/.github/workflows/sync_snyk-github-issues.yml @@ -16,33 +16,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: Create Snyk report uses: snyk/actions/node@master diff --git a/.github/workflows/verify_e2e-linux.yml b/.github/workflows/verify_e2e-linux.yml index 884d8bf172..0fe18b345e 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -40,35 +40,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: setup chrome - uses: browser-actions/setup-chrome@latest - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: yarn install - run: yarn install --frozen-lockfile - # End of yarn setup + uses: backstage/actions/yarn-install@v0.2.1 + with: + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - run: yarn tsc - run: yarn backstage-cli repo build diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index a13aa3ae71..7bbbac8a40 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -17,44 +17,30 @@ on: jobs: chromatic: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [16.x] + steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Required to retrieve git history - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: cache all node_modules - id: cache-modules - uses: actions/cache@v3 + - name: yarn install + uses: backstage/actions/yarn-install@v0.2.1 with: - path: '**/node_modules' - key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }} - - name: find location of global yarn cache - id: yarn-cache - if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - if: steps.cache-modules.outputs.cache-hit != 'true' - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: top-level install - run: yarn install --frozen-lockfile - + cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: storybook yarn install run: yarn install --frozen-lockfile working-directory: storybook - # End of yarn setup - run: yarn build-storybook diff --git a/.github/workflows/verify_windows.yml b/.github/workflows/verify_windows.yml index bb8aa9e5aa..e286d42c7e 100644 --- a/.github/workflows/verify_windows.yml +++ b/.github/workflows/verify_windows.yml @@ -26,25 +26,15 @@ jobs: steps: - uses: actions/checkout@v3 - # Beginning of yarn setup, keep in sync between all workflows, see ci.yml - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - - name: find location of global yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v3 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + + # Windows file operation slowness means there's no point caching this - name: yarn install run: yarn install --frozen-lockfile - # End of yarn setup - name: lint run: yarn backstage-cli repo lint From ec5a609dedf08568175a5ae494a596ccbede8877 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 08:05:55 +0000 Subject: [PATCH 153/212] fix(deps): update dependency webpack-dev-server to v4.9.3 Signed-off-by: Renovate Bot --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1e60c65663..c069f8a2d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10142,10 +10142,10 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== consola@^2.15.0: version "2.15.3" @@ -25930,9 +25930,9 @@ webpack-dev-middleware@^5.3.1: schema-utils "^4.0.0" webpack-dev-server@^4.7.3: - version "4.9.2" - resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.2.tgz#c188db28c7bff12f87deda2a5595679ebbc3c9bc" - integrity sha512-H95Ns95dP24ZsEzO6G9iT+PNw4Q7ltll1GfJHV4fKphuHWgKFzGHWi4alTlTnpk1SPPk41X+l2RB7rLfIhnB9Q== + version "4.9.3" + resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz#2360a5d6d532acb5410a668417ad549ee3b8a3c9" + integrity sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -25946,7 +25946,7 @@ webpack-dev-server@^4.7.3: chokidar "^3.5.3" colorette "^2.0.10" compression "^1.7.4" - connect-history-api-fallback "^1.6.0" + connect-history-api-fallback "^2.0.0" default-gateway "^6.0.3" express "^4.17.3" graceful-fs "^4.2.6" From a581804805a721ce21fe03246aafe3e8b6632ed8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 08:06:06 +0000 Subject: [PATCH 154/212] chore(deps): update backstage/actions action to v0.2.1 Signed-off-by: Renovate Bot --- .github/workflows/cron.yml | 2 +- .github/workflows/issue.yaml | 2 +- .github/workflows/pr.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index e2144a56c1..85d7786cf7 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,7 +8,7 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.1.12 + - uses: backstage/actions/cron@v0.2.1 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml index 972f90795c..5fa11b839f 100644 --- a/.github/workflows/issue.yaml +++ b/.github/workflows/issue.yaml @@ -10,4 +10,4 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: Issue sync - uses: backstage/actions/issue-sync@v0.1.8 + uses: backstage/actions/issue-sync@v0.2.1 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 01254a53a8..e65240ac1b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,6 +9,6 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: PR sync - uses: backstage/actions/pr-sync@v0.1.8 + uses: backstage/actions/pr-sync@v0.2.1 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} From 948d675442ab62fdd72bd9b54d3ac0f7bb38a25d Mon Sep 17 00:00:00 2001 From: sblausten Date: Wed, 29 Jun 2022 17:19:34 +0200 Subject: [PATCH 155/212] Allow FactRetrieverRegistry to be passed in to context builder for more flexibility Signed-off-by: sblausten --- .../techInsightsContextBuilder.test.ts | 74 +++++++++++++++++++ .../src/service/techInsightsContextBuilder.ts | 18 ++++- 2 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts new file mode 100644 index 0000000000..d9aee6d1d3 --- /dev/null +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -0,0 +1,74 @@ +/* + * 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 { buildTechInsightsContext } from './techInsightsContextBuilder'; +import { + DatabaseManager, + getVoidLogger, + PluginDatabaseManager, + ServerTokenManager, +} from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; +import { TaskScheduler } from '@backstage/backend-tasks'; +import { FactRetrieverRegistry } from './fact/FactRetrieverRegistry'; + +jest.mock('./fact/FactRetrieverRegistry'); + +describe('buildTechInsightsContext', () => { + const pluginDatabase = {} as PluginDatabaseManager; + const manager = {} as DatabaseManager; + const discoveryMock = { + getBaseUrl: (_: string) => Promise.resolve('http://mock.url'), + getExternalBaseUrl: (_: string) => Promise.resolve('http://mock.url'), + }; + const scheduler = new TaskScheduler(manager, getVoidLogger()).forPlugin( + 'tech-insights', + ); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('constructs the default FactRetrieverRegistry if factRetrievers but no factRetrieverRegistry are passed in', () => { + buildTechInsightsContext({ + database: pluginDatabase, + logger: getVoidLogger(), + factRetrievers: [], + scheduler: scheduler, + config: ConfigReader.fromConfigs([]), + discovery: discoveryMock, + tokenManager: ServerTokenManager.noop(), + }); + + expect(FactRetrieverRegistry).toHaveBeenCalledTimes(1); + }); + + it('uses factRetrieverRegistry implementation instead of the default FactRetrieverRegistry if it is passed in', () => { + const factRetrieverRegistryMock = {} as FactRetrieverRegistry; + + buildTechInsightsContext({ + database: pluginDatabase, + logger: getVoidLogger(), + factRetrievers: [], + factRetrieverRegistry: factRetrieverRegistryMock, + scheduler: scheduler, + config: ConfigReader.fromConfigs([]), + discovery: discoveryMock, + tokenManager: ServerTokenManager.noop(), + }); + + expect(FactRetrieverRegistry).not.toHaveBeenCalled(); + }); +}); diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index e22bfbd253..418c406784 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -52,13 +52,15 @@ export interface TechInsightsOptions< * A collection of FactRetrieverRegistrations. * Used to register FactRetrievers and their schemas and schedule an execution loop for them. */ - factRetrievers: FactRetrieverRegistration[]; + factRetrievers?: FactRetrieverRegistration[]; /** * Optional factory exposing a `construct` method to initialize a FactChecker implementation */ factCheckerFactory?: FactCheckerFactory; + factRetrieverRegistry?: FactRetrieverRegistry; + logger: Logger; config: Config; discovery: PluginEndpointDiscovery; @@ -109,7 +111,19 @@ export const buildTechInsightsContext = async < tokenManager, } = options; - const factRetrieverRegistry = new FactRetrieverRegistry(factRetrievers); + const buildFactRetrieverRegistry = () => { + if (!options.factRetrieverRegistry) { + if (!factRetrievers) { + throw new Error( + 'Failed to build FactRetrieverRegistry because no factRetrievers found', + ); + } + return new FactRetrieverRegistry(factRetrievers); + } + return options.factRetrieverRegistry; + }; + + const factRetrieverRegistry = buildFactRetrieverRegistry(); const persistenceContext = await initializePersistenceContext( await database.getClient(), From f3d530bbe6ab5328059f49326bd3471ab7a9862b Mon Sep 17 00:00:00 2001 From: sblausten Date: Wed, 29 Jun 2022 18:01:31 +0200 Subject: [PATCH 156/212] Use new interface Signed-off-by: sblausten --- .../src/service/fact/FactRetrieverRegistry.ts | 13 +++++++++++-- .../src/service/techInsightsContextBuilder.ts | 9 ++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts index b122f52f0a..a8317db1d2 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts @@ -21,8 +21,17 @@ import { } from '@backstage/plugin-tech-insights-node'; import { ConflictError, NotFoundError } from '@backstage/errors'; -export class FactRetrieverRegistry { - private readonly retrievers = new Map(); +export interface FactRetrieverRegistryInterface { + readonly retrievers: Map; + register(registration: FactRetrieverRegistration): void; + get(retrieverReference: string): FactRetrieverRegistration; + listRetrievers(): FactRetriever[]; + listRegistrations(): FactRetrieverRegistration[]; + getSchemas(): FactSchema[]; +} + +export class FactRetrieverRegistry implements FactRetrieverRegistryInterface { + readonly retrievers = new Map(); constructor(retrievers: FactRetrieverRegistration[]) { retrievers.forEach(it => { diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 418c406784..1314ee5dbd 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -16,7 +16,10 @@ import { FactRetrieverEngine } from './fact/FactRetrieverEngine'; import { Logger } from 'winston'; -import { FactRetrieverRegistry } from './fact/FactRetrieverRegistry'; +import { + FactRetrieverRegistry, + FactRetrieverRegistryInterface, +} from './fact/FactRetrieverRegistry'; import { Config } from '@backstage/config'; import { PluginDatabaseManager, @@ -59,7 +62,7 @@ export interface TechInsightsOptions< */ factCheckerFactory?: FactCheckerFactory; - factRetrieverRegistry?: FactRetrieverRegistry; + factRetrieverRegistry?: FactRetrieverRegistryInterface; logger: Logger; config: Config; @@ -111,7 +114,7 @@ export const buildTechInsightsContext = async < tokenManager, } = options; - const buildFactRetrieverRegistry = () => { + const buildFactRetrieverRegistry = (): FactRetrieverRegistryInterface => { if (!options.factRetrieverRegistry) { if (!factRetrievers) { throw new Error( From 9120fb3056fdd49ae0e19b2381e4f0e3542af4a0 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 10:06:01 +0200 Subject: [PATCH 157/212] Refactor naming Signed-off-by: sblausten --- plugins/tech-insights-backend/src/index.ts | 1 + .../src/service/fact/FactRetrieverRegistry.ts | 4 ++-- .../src/service/techInsightsContextBuilder.test.ts | 10 +++++----- .../src/service/techInsightsContextBuilder.ts | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/plugins/tech-insights-backend/src/index.ts b/plugins/tech-insights-backend/src/index.ts index 82fda47367..66180b1006 100644 --- a/plugins/tech-insights-backend/src/index.ts +++ b/plugins/tech-insights-backend/src/index.ts @@ -25,5 +25,6 @@ export type { export type { PersistenceContext } from './service/persistence/persistenceContext'; export { createFactRetrieverRegistration } from './service/fact/createFactRetriever'; +export type { FactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; export type { FactRetrieverRegistrationOptions } from './service/fact/createFactRetriever'; export * from './service/fact/factRetrievers'; diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts index a8317db1d2..29099201ce 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts @@ -21,7 +21,7 @@ import { } from '@backstage/plugin-tech-insights-node'; import { ConflictError, NotFoundError } from '@backstage/errors'; -export interface FactRetrieverRegistryInterface { +export interface FactRetrieverRegistry { readonly retrievers: Map; register(registration: FactRetrieverRegistration): void; get(retrieverReference: string): FactRetrieverRegistration; @@ -30,7 +30,7 @@ export interface FactRetrieverRegistryInterface { getSchemas(): FactSchema[]; } -export class FactRetrieverRegistry implements FactRetrieverRegistryInterface { +export class DefaultFactRetrieverRegistry implements FactRetrieverRegistry { readonly retrievers = new Map(); constructor(retrievers: FactRetrieverRegistration[]) { diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index d9aee6d1d3..d2660880b8 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -22,7 +22,7 @@ import { } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { TaskScheduler } from '@backstage/backend-tasks'; -import { FactRetrieverRegistry } from './fact/FactRetrieverRegistry'; +import { DefaultFactRetrieverRegistry } from './fact/FactRetrieverRegistry'; jest.mock('./fact/FactRetrieverRegistry'); @@ -41,7 +41,7 @@ describe('buildTechInsightsContext', () => { jest.clearAllMocks(); }); - it('constructs the default FactRetrieverRegistry if factRetrievers but no factRetrieverRegistry are passed in', () => { + it('constructs the default FactRetrieverRegistry if factRetrievers but no factRetrieverRegistry are passed', () => { buildTechInsightsContext({ database: pluginDatabase, logger: getVoidLogger(), @@ -52,11 +52,11 @@ describe('buildTechInsightsContext', () => { tokenManager: ServerTokenManager.noop(), }); - expect(FactRetrieverRegistry).toHaveBeenCalledTimes(1); + expect(DefaultFactRetrieverRegistry).toHaveBeenCalledTimes(1); }); it('uses factRetrieverRegistry implementation instead of the default FactRetrieverRegistry if it is passed in', () => { - const factRetrieverRegistryMock = {} as FactRetrieverRegistry; + const factRetrieverRegistryMock = {} as DefaultFactRetrieverRegistry; buildTechInsightsContext({ database: pluginDatabase, @@ -69,6 +69,6 @@ describe('buildTechInsightsContext', () => { tokenManager: ServerTokenManager.noop(), }); - expect(FactRetrieverRegistry).not.toHaveBeenCalled(); + expect(DefaultFactRetrieverRegistry).not.toHaveBeenCalled(); }); }); diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 1314ee5dbd..b194fb6b69 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -17,8 +17,8 @@ import { FactRetrieverEngine } from './fact/FactRetrieverEngine'; import { Logger } from 'winston'; import { + DefaultFactRetrieverRegistry, FactRetrieverRegistry, - FactRetrieverRegistryInterface, } from './fact/FactRetrieverRegistry'; import { Config } from '@backstage/config'; import { @@ -62,7 +62,7 @@ export interface TechInsightsOptions< */ factCheckerFactory?: FactCheckerFactory; - factRetrieverRegistry?: FactRetrieverRegistryInterface; + factRetrieverRegistry?: FactRetrieverRegistry; logger: Logger; config: Config; @@ -114,14 +114,14 @@ export const buildTechInsightsContext = async < tokenManager, } = options; - const buildFactRetrieverRegistry = (): FactRetrieverRegistryInterface => { + const buildFactRetrieverRegistry = (): FactRetrieverRegistry => { if (!options.factRetrieverRegistry) { if (!factRetrievers) { throw new Error( 'Failed to build FactRetrieverRegistry because no factRetrievers found', ); } - return new FactRetrieverRegistry(factRetrievers); + return new DefaultFactRetrieverRegistry(factRetrievers); } return options.factRetrieverRegistry; }; From 818fa28d71e12bb5397038f54690fb3d05bff66d Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 10:11:09 +0200 Subject: [PATCH 158/212] Add Changeset Signed-off-by: sblausten --- .changeset/eighty-windows-brush.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eighty-windows-brush.md diff --git a/.changeset/eighty-windows-brush.md b/.changeset/eighty-windows-brush.md new file mode 100644 index 0000000000..e66a0e1574 --- /dev/null +++ b/.changeset/eighty-windows-brush.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend': minor +--- + +Make FactRetrieverRegistry injectable to overrider default implementation From ef2196cb524bf6b356a5e8c183bff5c19d5a36e2 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 10:19:19 +0200 Subject: [PATCH 159/212] Fix grammer in changeset and export default registry also Signed-off-by: sblausten --- .changeset/eighty-windows-brush.md | 2 +- plugins/tech-insights-backend/src/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/eighty-windows-brush.md b/.changeset/eighty-windows-brush.md index e66a0e1574..61a09fb663 100644 --- a/.changeset/eighty-windows-brush.md +++ b/.changeset/eighty-windows-brush.md @@ -2,4 +2,4 @@ '@backstage/plugin-tech-insights-backend': minor --- -Make FactRetrieverRegistry injectable to overrider default implementation +Make FactRetrieverRegistry injectable to override default implementation diff --git a/plugins/tech-insights-backend/src/index.ts b/plugins/tech-insights-backend/src/index.ts index 66180b1006..7ab9246f9a 100644 --- a/plugins/tech-insights-backend/src/index.ts +++ b/plugins/tech-insights-backend/src/index.ts @@ -26,5 +26,6 @@ export type { export type { PersistenceContext } from './service/persistence/persistenceContext'; export { createFactRetrieverRegistration } from './service/fact/createFactRetriever'; export type { FactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; +export { DefaultFactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; export type { FactRetrieverRegistrationOptions } from './service/fact/createFactRetriever'; export * from './service/fact/factRetrievers'; From 38d46bfe02b9aaec0459b1027fbb3e04ee5f8992 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 08:21:22 +0000 Subject: [PATCH 160/212] fix(deps): update dependency eslint-webpack-plugin to v3.2.0 Signed-off-by: Renovate Bot --- yarn.lock | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index bcd803a1e7..886d7cb6b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6213,7 +6213,7 @@ "@types/eslint" "*" "@types/estree" "*" -"@types/eslint@*", "@types/eslint@^7.28.2": +"@types/eslint@*": version "7.29.0" resolved "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz#e56ddc8e542815272720bb0b4ccc2aff9c3e1c78" integrity sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng== @@ -6221,6 +6221,14 @@ "@types/estree" "*" "@types/json-schema" "*" +"@types/eslint@^7.29.0 || ^8.4.1": + version "8.4.3" + resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz#5c92815a3838b1985c90034cd85f26f59d9d0ece" + integrity sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + "@types/estree@*", "@types/estree@^0.0.51": version "0.0.51" resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" @@ -12408,15 +12416,15 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint-webpack-plugin@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.1.1.tgz#83dad2395e5f572d6f4d919eedaa9cf902890fcb" - integrity sha512-xSucskTN9tOkfW7so4EaiFIkulWLXwCB/15H917lR6pTv0Zot6/fetFucmENRb7J5whVSFKIvwnrnsa78SG2yg== + version "3.2.0" + resolved "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz#1978cdb9edc461e4b0195a20da950cf57988347c" + integrity sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w== dependencies: - "@types/eslint" "^7.28.2" - jest-worker "^27.3.1" - micromatch "^4.0.4" + "@types/eslint" "^7.29.0 || ^8.4.1" + jest-worker "^28.0.2" + micromatch "^4.0.5" normalize-path "^3.0.0" - schema-utils "^3.1.1" + schema-utils "^4.0.0" eslint@^8.6.0: version "8.18.0" @@ -16344,7 +16352,7 @@ jest-when@^3.1.0: resolved "https://registry.npmjs.org/jest-when/-/jest-when-3.5.1.tgz#33ab6f923661cf878cd08fe9df64b507934603db" integrity sha512-o+HiaIVCg1IC95sMDKHU9G5v5N5l3UHqXvJpf0PgAMThZeQo4Hf5Sgoj+wpCBRGg4/KtzSAZZZEKNiLqE0i4eQ== -jest-worker@^27.3.1, jest-worker@^27.4.5, jest-worker@^27.5.1: +jest-worker@^27.4.5, jest-worker@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== @@ -16353,6 +16361,15 @@ jest-worker@^27.3.1, jest-worker@^27.4.5, jest-worker@^27.5.1: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^28.0.2: + version "28.1.1" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz#3480c73247171dfd01eda77200f0063ab6a3bf28" + integrity sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" From 8e40830f9005b43f80271d74024c5a5d802f3cd4 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 10:42:16 +0200 Subject: [PATCH 161/212] Fix Vale check Signed-off-by: sblausten --- .changeset/eighty-windows-brush.md | 2 +- plugins/tech-insights-backend/src/index.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.changeset/eighty-windows-brush.md b/.changeset/eighty-windows-brush.md index 61a09fb663..753b53fbb4 100644 --- a/.changeset/eighty-windows-brush.md +++ b/.changeset/eighty-windows-brush.md @@ -2,4 +2,4 @@ '@backstage/plugin-tech-insights-backend': minor --- -Make FactRetrieverRegistry injectable to override default implementation +Allow FactRetrieverRegistry to be injected into buildTechInsightsContext so that we can override default registry implementation. diff --git a/plugins/tech-insights-backend/src/index.ts b/plugins/tech-insights-backend/src/index.ts index 7ab9246f9a..66180b1006 100644 --- a/plugins/tech-insights-backend/src/index.ts +++ b/plugins/tech-insights-backend/src/index.ts @@ -26,6 +26,5 @@ export type { export type { PersistenceContext } from './service/persistence/persistenceContext'; export { createFactRetrieverRegistration } from './service/fact/createFactRetriever'; export type { FactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; -export { DefaultFactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; export type { FactRetrieverRegistrationOptions } from './service/fact/createFactRetriever'; export * from './service/fact/factRetrievers'; From 3c84892796c7cdacc4dffc281d131055fb1e58a8 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 11:07:32 +0200 Subject: [PATCH 162/212] Add documentation Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index b194fb6b69..1e3eabfb8b 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -52,8 +52,10 @@ export interface TechInsightsOptions< CheckResultType extends CheckResult, > { /** - * A collection of FactRetrieverRegistrations. + * Optional collection of FactRetrieverRegistrations. * Used to register FactRetrievers and their schemas and schedule an execution loop for them. + * + * Not needed if passing in your own FactRetrieverRegistry implementation */ factRetrievers?: FactRetrieverRegistration[]; @@ -62,6 +64,11 @@ export interface TechInsightsOptions< */ factCheckerFactory?: FactCheckerFactory; + /** + * Optional FactRetrieverRegistry implementation that replaces the default one. + * + * If passing this in you don't need to pass in factRetrievers also. + */ factRetrieverRegistry?: FactRetrieverRegistry; logger: Logger; From 156bb8ffba1bb933d6a1681d45f4d1420ec1f309 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 11:50:26 +0200 Subject: [PATCH 163/212] Add clearer documentation Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 1e3eabfb8b..008acf192d 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -52,10 +52,10 @@ export interface TechInsightsOptions< CheckResultType extends CheckResult, > { /** - * Optional collection of FactRetrieverRegistrations. + * Optional collection of FactRetrieverRegistrations (required if no factRetrieverRegistry passed in). * Used to register FactRetrievers and their schemas and schedule an execution loop for them. * - * Not needed if passing in your own FactRetrieverRegistry implementation + * Not needed if passing in your own FactRetrieverRegistry implementation. Required otherwise. */ factRetrievers?: FactRetrieverRegistration[]; From 0b36b9cb0beef252a11f2d2bcd24fdd07b785eda Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 12:24:50 +0200 Subject: [PATCH 164/212] Adds api report Signed-off-by: sblausten --- plugins/tech-insights-backend/api-report.md | 20 ++++++++++++++++++- .../src/service/fact/FactRetrieverRegistry.ts | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/plugins/tech-insights-backend/api-report.md b/plugins/tech-insights-backend/api-report.md index 9fee3be281..32d45f8afd 100644 --- a/plugins/tech-insights-backend/api-report.md +++ b/plugins/tech-insights-backend/api-report.md @@ -11,6 +11,7 @@ import { FactCheckerFactory } from '@backstage/plugin-tech-insights-node'; import { FactLifecycle } from '@backstage/plugin-tech-insights-node'; import { FactRetriever } from '@backstage/plugin-tech-insights-node'; import { FactRetrieverRegistration } from '@backstage/plugin-tech-insights-node'; +import { FactSchema } from '@backstage/plugin-tech-insights-node'; import { Logger } from 'winston'; import { PluginDatabaseManager } from '@backstage/backend-common'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; @@ -51,6 +52,22 @@ export type FactRetrieverRegistrationOptions = { lifecycle?: FactLifecycle; }; +// @public (undocumented) +export interface FactRetrieverRegistry { + // (undocumented) + get(retrieverReference: string): FactRetrieverRegistration; + // (undocumented) + getSchemas(): FactSchema[]; + // (undocumented) + listRegistrations(): FactRetrieverRegistration[]; + // (undocumented) + listRetrievers(): FactRetriever[]; + // (undocumented) + register(registration: FactRetrieverRegistration): void; + // (undocumented) + readonly retrievers: Map; +} + // @public export type PersistenceContext = { techInsightsStore: TechInsightsStore; @@ -91,7 +108,8 @@ export interface TechInsightsOptions< // (undocumented) discovery: PluginEndpointDiscovery; factCheckerFactory?: FactCheckerFactory; - factRetrievers: FactRetrieverRegistration[]; + factRetrieverRegistry?: FactRetrieverRegistry; + factRetrievers?: FactRetrieverRegistration[]; // (undocumented) logger: Logger; // (undocumented) diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts index 29099201ce..504d561f17 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts @@ -21,6 +21,10 @@ import { } from '@backstage/plugin-tech-insights-node'; import { ConflictError, NotFoundError } from '@backstage/errors'; +/** + * @public + * + */ export interface FactRetrieverRegistry { readonly retrievers: Map; register(registration: FactRetrieverRegistration): void; From 331b68025874aa47cf04468edd534ce39cd0233b Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 12:46:49 +0200 Subject: [PATCH 165/212] Fix test mock Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index d2660880b8..ef9484369a 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -23,11 +23,20 @@ import { import { ConfigReader } from '@backstage/config'; import { TaskScheduler } from '@backstage/backend-tasks'; import { DefaultFactRetrieverRegistry } from './fact/FactRetrieverRegistry'; +import { Knex } from 'knex'; jest.mock('./fact/FactRetrieverRegistry'); describe('buildTechInsightsContext', () => { - const pluginDatabase = {} as PluginDatabaseManager; + const pluginDatabase: PluginDatabaseManager = { + getClient: () => { + return Promise.resolve({ + migrate: { + latest: () => {}, + }, + }) as unknown as Promise; + }, + }; const manager = {} as DatabaseManager; const discoveryMock = { getBaseUrl: (_: string) => Promise.resolve('http://mock.url'), From 90b3bc0a20da4fd874ed29a1a8340a428881adc3 Mon Sep 17 00:00:00 2001 From: David Rubio Vidal Date: Thu, 30 Jun 2022 12:52:34 +0200 Subject: [PATCH 166/212] chore: update early adopters for DAZN Signed-off-by: David Rubio Vidal --- ADOPTERS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index b72da367b1..15432ab24c 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -36,7 +36,7 @@ _If you're using Backstage in your organization, please try to add your company | [PagerDuty](https://www.pagerduty.com/) | [Mark Shaw](https://github.com/markshawtoronto) | Developer portal, initially focused on software templates and tech-docs. | | [MoonShiner](https://moonshiner.at) | [Fabian Hippmann](https://github.com/FabianHippmann) | Developer portal - helps us keep track of our customer projects, onboard new developers & improve our development process 🌕🚀🧑‍🚀 | | [FundApps](https://www.fundapps.co/) | [Elliot Greenwood](https://github.com/egnwd) | Developer Portal - A place for us to keep track of our projects and documentation for all services and processes | -| [DAZN](https://dazn.com/) | [Lou Bichard](https://twitter.com/loujaybee), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com), [Kamil Wolny](https://github.com/mrwolny) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). | +| [DAZN](https://dazn.com/) | [David Rubio Vidal](https://github.com/davidrv87), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com), [Kamil Wolny](https://github.com/mrwolny) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). | | [HelloFresh](https://www.hellofresh.de/) | [@iammuho](https://github.com/iammuho), [@ElenaForester](https://github.com/ElenaForester), [@diegomarangoni](https://github.com/diegomarangoni) | Our developer portal at HelloFresh - Spread across an organisation of 500+ engineers globally. | | [FactSet](https://www.factset.com/) | [@kuangp](https://github.com/kuangp) | Developer portal to provide discoverability to all internal components, APIs, documentation, and scaffold templates with integrations to our internal infrastructure tools. | | [Workrise](https://www.workrise.com/) | [Michael Rode](https://github.com/michaelrode) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. | From f90371a6bb5e09ac951683e63be06592a150a8c9 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 12:58:36 +0200 Subject: [PATCH 167/212] Fix test mock Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index ef9484369a..ef3ce98690 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -37,7 +37,10 @@ describe('buildTechInsightsContext', () => { }) as unknown as Promise; }, }; - const manager = {} as DatabaseManager; + const databaseManager: Partial = { + forPlugin: () => pluginDatabase, + }; + const manager = databaseManager as DatabaseManager; const discoveryMock = { getBaseUrl: (_: string) => Promise.resolve('http://mock.url'), getExternalBaseUrl: (_: string) => Promise.resolve('http://mock.url'), From 5dedcb541e77639ac8d9b752e22f720239a7faad Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 13:21:23 +0200 Subject: [PATCH 168/212] Mock out engine Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index ef3ce98690..46d1e61e22 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -26,6 +26,11 @@ import { DefaultFactRetrieverRegistry } from './fact/FactRetrieverRegistry'; import { Knex } from 'knex'; jest.mock('./fact/FactRetrieverRegistry'); +jest.mock('./fact/FactRetrieverEngine', () => ({ + create: jest.fn().mockResolvedValue({ + schedule: jest.fn(), + }), +})); describe('buildTechInsightsContext', () => { const pluginDatabase: PluginDatabaseManager = { From 516f506e4443ec443276377d304ae1f771b95c0a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 11:30:32 +0000 Subject: [PATCH 169/212] chore(deps): update dependency @graphql-codegen/cli to v2.6.4 Signed-off-by: Renovate Bot --- yarn.lock | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/yarn.lock b/yarn.lock index bcd803a1e7..3b66d66d79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2371,9 +2371,9 @@ meros "^1.1.4" "@graphql-codegen/cli@^2.3.1": - version "2.6.3" - resolved "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.6.3.tgz#80d6f0324bcf9a375b9a1d5e998fcd62b3bace66" - integrity sha512-gxtKbe6LlBhGqDISZldCMcGaV1rSTS4D836clSR52kBY7UBhZZcDOcNZM0zDJDFGpjHtwuL9p0Kb4w9HRXYfew== + version "2.6.4" + resolved "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.6.4.tgz#2fbcd3917cb96ae08c54a865fbcc0393e66abc17" + integrity sha512-VNK5l4lRXOs3uueKkN4YKhO7ZldXaPw/6dZo4BnAzH2ip9XDroNJ0n+ESkbhSBd1bH6wVk3iCIzBfJOnfcsAcg== dependencies: "@graphql-codegen/core" "2.5.1" "@graphql-codegen/plugin-helpers" "^2.4.1" @@ -2399,7 +2399,7 @@ inquirer "^8.0.0" is-glob "^4.0.1" json-to-pretty-yaml "^1.2.2" - latest-version "^6.0.0" + latest-version "5.1.0" listr "^0.14.3" listr-update-renderer "^0.5.0" log-symbols "^4.0.0" @@ -14077,7 +14077,7 @@ got@11.8.3: p-cancelable "^2.0.0" responselike "^2.0.0" -got@^11.8.0, got@^11.8.2: +got@^11.8.0: version "11.8.5" resolved "https://registry.npmjs.org/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== @@ -17053,20 +17053,13 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "~0.3.2" -latest-version@^5.1.0: +latest-version@5.1.0, latest-version@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== dependencies: package-json "^6.3.0" -latest-version@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/latest-version/-/latest-version-6.0.0.tgz#469fb95f1d588b38436c1ec8fec947b99ed268c7" - integrity sha512-zfTuGx4PwpoSJ1mABs58AkM6qMzu49LZ7LT5JHprKvpGpQ+cYtfSibi3tLLrH4z7UylYU42rfBdwN8YgqbTljA== - dependencies: - package-json "^7.0.0" - lazy-ass@1.6.0, lazy-ass@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" @@ -20014,16 +20007,6 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -package-json@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/package-json/-/package-json-7.0.0.tgz#1355416e50a5c1b8f1a6f471197a3650d21186bf" - integrity sha512-CHJqc94AA8YfSLHGQT3DbvSIuE12NLFekpM4n7LRrAd3dOJtA911+4xe9q6nC3/jcKraq7nNS9VxgtT0KC+diA== - dependencies: - got "^11.8.2" - registry-auth-token "^4.0.0" - registry-url "^5.0.0" - semver "^7.3.5" - packet-reader@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" From bf0284f4313c2e401140b61ecb5bc8fc6d1f4afd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 11:44:13 +0000 Subject: [PATCH 170/212] fix(deps): update dependency @codemirror/language to v6.2.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 98689d74a2..319a959e84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1989,9 +1989,9 @@ "@lezer/common" "^1.0.0" "@codemirror/language@^6.0.0": - version "6.1.0" - resolved "https://registry.npmjs.org/@codemirror/language/-/language-6.1.0.tgz#7686f0ecafd958c35332c3cc2aa3d564fd33dc44" - integrity sha512-CeqY80nvUFrJcXcBW115aNi06D0PS8NSW6nuJRSwbrYFkE0SfJnPfyLGrcM90AV95lqg5+4xUi99BCmzNaPGJg== + version "6.2.0" + resolved "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz#f8d103927bb61346e93781b1ca7d3f4ac3c9280b" + integrity sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA== dependencies: "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" From e18e86adfe3bea1bb56f01575bd774f56f346216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 30 Jun 2022 13:45:32 +0200 Subject: [PATCH 171/212] fixup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/overview/roadmap.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/overview/roadmap.md b/docs/overview/roadmap.md index 18af070382..df242ed172 100644 --- a/docs/overview/roadmap.md +++ b/docs/overview/roadmap.md @@ -15,9 +15,9 @@ work"](#future-work). With "next" we mean features planned for release within the ongoing quarter from April through June 2022. With "future" we mean features on the radar, but not yet scheduled. -| [What's next](#whats-next) | [Future work](#future-work) | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | -| [Backstage Search 1.0](#search-1.0)
[Backend Services (MVP)](#backend-services-mvp)
[Backstage Security Audit](#backstage-security-audit)
[Backstage Threat Model](#backstage-threat-model)
[TechDocs Addon Framework](techDocs-addon-framework)
[Software Catalog pagination](#software-catalog-pagination)
[More SIGs](#more-sigs) | Ease of onboarding
Composable Homepage 1.0
Creator experience
GraphQL
Telemetry | +| [What's next](#whats-next) | [Future work](#future-work) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| [Backstage Search 1.0](#search-1.0)
[Backend Services (MVP)](#backend-services-mvp)
[Backstage Security Audit](#backstage-security-audit)
[Backstage Threat Model](#backstage-threat-model)
[TechDocs Addon Framework](#techdocs-addon-framework)
[Software Catalog pagination](#software-catalog-pagination)
[More SIGs](#more-sigs) | Ease of onboarding
Composable Homepage 1.0
Creator experience
GraphQL
Telemetry | The long-term roadmap (12 - 36 months) is not detailed in the public roadmap. Third-party contributions are also not currently included in the roadmap. Let us @@ -63,9 +63,9 @@ Native Computing Foundation (CNCF)](https://www.cncf.io/). This is another (relevant) initiative planned to make Backstage a secure product for the adopters. The goals of this initiative are: -1. Understand where security investment and attention is needed. -2. Guide the upcoming security audit. -3. Communicate expectations to Backstage adopters and inform and attract security researchers. +1. Understand where security investment and attention is needed. +2. Guide the upcoming security audit. +3. Communicate expectations to Backstage adopters and inform and attract security researchers. The planned artifacts are: @@ -76,13 +76,13 @@ The planned artifacts are: Addons are TechDocs features that are added on top of the base docs-like-code experience. An example would be a feature that showed comments on the page. We plan to add an Addon framework and open source a selection of the Addons that we use internally at Spotify. We encourage the Backstage community to add further Addons. -For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons) +For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons). For general information about TechDocs including roadmap, see [here](https://backstage.io/docs/features/techdocs/techdocs-overview). ### Software Catalog pagination -Today adopters with a big catalog (with several thousands of software components) might not have an ideal end-user experience when viewing the `/catalog` page. The issue is related to how the entities are fetched by the frontend. In order to provide a better end-user experience the pagination of the catalog’s entities needs to be enforced. Some experimentations are already completed but in this quarter we plan to continue, and hopefully complete, this relevant enhancement. +Today adopters with a big catalog (with several thousands of software components) might not have an ideal end-user experience when viewing the `/catalog` page. The issue is related to how the entities are fetched by the frontend. In order to provide a better end-user experience the pagination of the catalog’s entities needs to be enforced. Some experimentation is already completed but in this quarter we plan to continue, and hopefully complete, this relevant enhancement. ### More SIGs @@ -94,7 +94,8 @@ The following feature list doesn't represent a commitment to develop, and the list order doesn't reflect any priority or importance, but these features are on the maintainers' radar, with clear interest expressed by the community. -- **Ease of onboarding:** A faster (with less development) and easier setup of Backstage and the most relevant/adopted plugins. +- **Ease of onboarding:** A faster (with less development) and easier setup of + Backstage and the most relevant/adopted plugins. - **Composable Homepage 1.0:** Driving this to 1.0 by adding some composable components. - **Creator experience:** Provide a better Backstage user experience through From 27b526e377cc3ecbcbb6dd775813559b3da2c2a3 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 30 Jun 2022 13:48:11 +0200 Subject: [PATCH 172/212] chore: updating adopter notice Signed-off-by: blam --- ADOPTERS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index bb9b7fe077..2f47f22f90 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -1,6 +1,8 @@ # Adopters -_If you're using Backstage in your organization, please try to add your company name to this list. This really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact._ +_If you're using Backstage in your organization, please try to add your company name to this list. It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact._ +_You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKikB) or by editing this file after following the [CONTRIBUTING.md](./CONTRIBUTING.md)._ + | Organization | Contact | Description of Use | |-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -187,4 +189,4 @@ _If you're using Backstage in your organization, please try to add your company | [William Hill](https://www.williamhillgroup.com/) | [Pat Mills](mailto:pat.mills@williamhill.com), [Nathan Flynn](mailto:nflynn@williamhill.co.uk), and [Nishkarsh Raj](mailto:nishkarsh.raj@williamhill.co.uk) | William Hill are leveraging Backstage to build our Engineering Portal. Our mission is to centralize the software catalog inventory to enable service discoverability, reduce the onboarding time for new Engineers, provide a single pane of glass to accelerate Developer Productivity and Save Engineers time. Our aspiration is to create an InnerSource community focussed on organization-wide patterns that are re-usable and can be self-served with the Scaffolder. | | [Vodafone NewZealand Limited](https://vodafone.co.nz) | [Ankit Gupta](mailto:ankit.gupta@vodafone.nz), [DevOps COE](mailto:devopstooling@vodafone.nz) | Vodafone NZ are leveraging Backstage to build centralised and self service Engineering Portal. Our mission is to standardised Pipeline templates across the Engineering teams, One shop stop to create the pipelines and repository with a template approach which reduces creation part from days to minutes and no wait time for developers. A unified view for Azure DevOps pipeline, Azure Repo pull requests, Deployment status from Azure RedHat Openshift-ArgoCD and SonarQube Security and code quality scans report on a single pan to provide a streamlined view for all microservices across the app stack. | | [Coamo](http://www.coamo.com.br) | [@holiiveira](https://github.com/holiiveira), [@gpxlnx](https://github.com/gpxlnx) | We're starting to use it as the main tool of a DevOps platform. Our goal is to provide software templates, centralize our software catalog enabling efficient service discovery, and make it easy to manage the entire software ecosystem in one place. - | \ No newline at end of file + | From c86c0019ea6a42597d03a42589fbb9c578f9a8ee Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 30 Jun 2022 13:49:22 +0200 Subject: [PATCH 173/212] chore: updating contributing Signed-off-by: blam --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eb60bc48e0..1afbf072fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,9 +58,9 @@ If you are proposing a feature: - Remember that this is a volunteer-driven project, and that contributions are welcome :) -### Add your company to ADOPTERS +### Add your company to `ADOPTERS` -Have you started using Backstage? Adding your company to [ADOPTERS](ADOPTERS.md) really helps the project. +Have you started using Backstage? Adding your company to [ADOPTERS](ADOPTERS.md) really helps the project, you can do this by filling out this [Adopter form](https://form.typeform.com/to/zcOaKikB). ## Get Started! From d5f3f64a8896af63aaf9b00c84e1c74f2094b287 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 30 Jun 2022 13:54:31 +0200 Subject: [PATCH 174/212] workflows: bump cron to 0.2.2 Signed-off-by: Patrik Oldsberg --- .github/workflows/cron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 85d7786cf7..ca21c1c283 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,7 +8,7 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.2.1 + - uses: backstage/actions/cron@v0.2.2 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} From c3b35b911be2ae9c3a884a3ab554813a09d2e931 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:35:46 +0000 Subject: [PATCH 175/212] chore(deps): update backstage/actions action to v0.2.2 Signed-off-by: Renovate Bot --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy_nightly.yml | 2 +- .github/workflows/deploy_packages.yml | 4 ++-- .github/workflows/issue.yaml | 2 +- .github/workflows/pr.yaml | 2 +- .github/workflows/sync_code-formatting.yml | 2 +- .github/workflows/sync_snyk-github-issues.yml | 2 +- .github/workflows/verify_e2e-linux.yml | 2 +- .github/workflows/verify_storybook.yml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9fc151fb1..95ec35c795 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index 97b3f45954..e8b48ee2fe 100644 --- a/.github/workflows/deploy_nightly.yml +++ b/.github/workflows/deploy_nightly.yml @@ -26,7 +26,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 529c7a4286..fd8ae58e3c 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -67,7 +67,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -145,7 +145,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml index 5fa11b839f..8e7955645d 100644 --- a/.github/workflows/issue.yaml +++ b/.github/workflows/issue.yaml @@ -10,4 +10,4 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: Issue sync - uses: backstage/actions/issue-sync@v0.2.1 + uses: backstage/actions/issue-sync@v0.2.2 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e65240ac1b..92bd759e36 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,6 +9,6 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: PR sync - uses: backstage/actions/pr-sync@v0.2.1 + uses: backstage/actions/pr-sync@v0.2.2 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} diff --git a/.github/workflows/sync_code-formatting.yml b/.github/workflows/sync_code-formatting.yml index 6ea6bc5de6..565f0e9df2 100644 --- a/.github/workflows/sync_code-formatting.yml +++ b/.github/workflows/sync_code-formatting.yml @@ -20,7 +20,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/sync_snyk-github-issues.yml b/.github/workflows/sync_snyk-github-issues.yml index 9daf85ffa6..77c192edae 100644 --- a/.github/workflows/sync_snyk-github-issues.yml +++ b/.github/workflows/sync_snyk-github-issues.yml @@ -22,7 +22,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/verify_e2e-linux.yml b/.github/workflows/verify_e2e-linux.yml index 0fe18b345e..724e220ecb 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -46,7 +46,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index 7bbbac8a40..4ade8e1924 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -35,7 +35,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.2.1 + uses: backstage/actions/yarn-install@v0.2.2 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: storybook yarn install From 374a5049e3c9bdde21d12c22869d5be8761ca46a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:37:31 +0000 Subject: [PATCH 176/212] fix(deps): update dependency @react-hookz/web to v14.4.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 319a959e84..d64acad3a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5263,9 +5263,9 @@ "@react-hookz/deep-equal" "^1.0.1" "@react-hookz/web@^14.0.0": - version "14.3.0" - resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.3.0.tgz#ccfcfa65aa1e56ca5a3b258a9bd987e0daa67bae" - integrity sha512-lmZ9rAoHbBFZo0v72cjHMCY/hz9Wp6WQd/Kx53A+HumxkAaJT3AuBkd9jJgrtdsNiHdG0IEr93/oOza3+G6kVA== + version "14.4.0" + resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.4.0.tgz#8c5003d2ee243e4f628ca7f69a6975a4c1a84713" + integrity sha512-MZUeiC/xCg30yBVfV3LS4gtQUngVb/r0xhaeGKk+Bx5ZaJOhHQ8kuduXP13RmbzpehJk2e1TL0oZsTofzT7QJQ== dependencies: "@react-hookz/deep-equal" "^1.0.2" From 423e3d8e957606438755a7c712e7c8450d4b91ea Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Fri, 17 Jun 2022 19:51:40 -0500 Subject: [PATCH 177/212] Highlight PG search results Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/metal-windows-share.md | 5 ++++ .../search-backend-module-pg/api-report.md | 6 ++++- plugins/search-backend-module-pg/package.json | 3 ++- .../src/PgSearchEngine/PgSearchEngine.test.ts | 15 +++++++++++ .../src/PgSearchEngine/PgSearchEngine.ts | 18 ++++++++++++- .../database/DatabaseDocumentStore.test.ts | 26 +++++++++++++++++-- .../src/database/DatabaseDocumentStore.ts | 10 +++++-- .../src/database/types.ts | 3 +++ 8 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 .changeset/metal-windows-share.md diff --git a/.changeset/metal-windows-share.md b/.changeset/metal-windows-share.md new file mode 100644 index 0000000000..4fc568986a --- /dev/null +++ b/.changeset/metal-windows-share.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-backend-module-pg': patch +--- + +Added support for highlighting matched terms in search result data diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index 71ceac996e..6a8b68a042 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -43,7 +43,7 @@ export class DatabaseDocumentStore implements DatabaseStore { // (undocumented) query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit }: PgSearchQuery, + { types, pgTerm, fields, offset, limit, preTag, postTag }: PgSearchQuery, ): Promise; // (undocumented) static supported(knex: Knex): Promise; @@ -134,6 +134,10 @@ export interface PgSearchQuery { // (undocumented) pgTerm?: string; // (undocumented) + postTag: string; + // (undocumented) + preTag: string; + // (undocumented) types?: string[]; } diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index fb8cd4afc4..7809f9dd06 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -27,7 +27,8 @@ "@backstage/plugin-search-backend-node": "^0.6.3-next.1", "@backstage/plugin-search-common": "^0.3.6-next.0", "lodash": "^4.17.21", - "knex": "^2.0.0" + "knex": "^2.0.0", + "uuid": "^8.3.2" }, "devDependencies": { "@backstage/backend-test-utils": "^0.1.26-next.1", diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts index 3ed002567e..5f3bc3c5d8 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts @@ -158,6 +158,11 @@ describe('PgSearchEngine', () => { location: 'location-1', }, type: 'my-type', + highlight: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + }, }, ]); @@ -199,6 +204,11 @@ describe('PgSearchEngine', () => { location: `location-${i}`, }, type: 'my-type', + highlight: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + }, })), ); @@ -240,6 +250,11 @@ describe('PgSearchEngine', () => { location: `location-${i}`, }, type: 'my-type', + highlight: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + }, })) .slice(25), ); diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index bf98c58de9..77aa003c5d 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -26,6 +26,7 @@ import { DatabaseStore, PgSearchQuery, } from '../database'; +import { v4 as uuid } from 'uuid'; export type ConcretePgSearchQuery = { pgQuery: PgSearchQuery; @@ -53,6 +54,7 @@ export class PgSearchEngine implements SearchEngine { const offset = page * pageSize; // We request more result to know whether there is another page const limit = pageSize + 1; + const uuidTag = uuid(); return { pgQuery: { @@ -66,6 +68,8 @@ export class PgSearchEngine implements SearchEngine { types: query.types, offset, limit, + preTag: `<${uuidTag}>`, + postTag: ``, }, pageSize, }; @@ -106,10 +110,22 @@ export class PgSearchEngine implements SearchEngine { : undefined; const results = pageRows.map( - ({ type, document }, index): IndexableResult => ({ + ({ type, document, highlight }, index): IndexableResult => ({ type, document, rank: page * pageSize + index + 1, + highlight: { + preTag: pgQuery.preTag, + postTag: pgQuery.postTag, + fields: highlight + ? { + text: highlight.text, + title: highlight.title, + location: highlight.location, + path: '', + } + : {}, + }, }), ); diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts index b973c2e14f..e2303d90b2 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts @@ -220,7 +220,13 @@ describe('DatabaseDocumentStore', () => { }); const rows = await store.transaction(tx => - store.query(tx, { pgTerm: 'Hello & World', offset: 1, limit: 1 }), + store.query(tx, { + pgTerm: 'Hello & World', + offset: 1, + limit: 1, + preTag: '', + postTag: '', + }), ); expect(rows).toEqual([ @@ -261,7 +267,13 @@ describe('DatabaseDocumentStore', () => { }); const rows = await store.transaction(tx => - store.query(tx, { pgTerm: 'Hello & World', offset: 0, limit: 25 }), + store.query(tx, { + pgTerm: 'Hello & World', + offset: 0, + limit: 25, + preTag: '', + postTag: '', + }), ); expect(rows).toEqual([ @@ -322,6 +334,8 @@ describe('DatabaseDocumentStore', () => { types: ['my-type'], offset: 0, limit: 25, + preTag: '', + postTag: '', }), ); @@ -375,6 +389,8 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this' }, offset: 0, limit: 25, + preTag: '', + postTag: '', }), ); @@ -429,6 +445,8 @@ describe('DatabaseDocumentStore', () => { fields: { myField: ['this', 'that'] }, offset: 0, limit: 25, + preTag: '', + postTag: '', }), ); @@ -490,6 +508,8 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this', otherField: 'another' }, offset: 0, limit: 25, + preTag: '', + postTag: '', }), ); @@ -539,6 +559,8 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this' }, offset: 0, limit: 25, + preTag: '', + postTag: '', }), ); diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts index 33b2d0c0d6..3a1ec128ef 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts @@ -132,10 +132,11 @@ export class DatabaseDocumentStore implements DatabaseStore { async query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit }: PgSearchQuery, + { types, pgTerm, fields, offset, limit, preTag, postTag }: PgSearchQuery, ): Promise { // Builds a query like: - // SELECT ts_rank_cd(body, query) AS rank, type, document + // SELECT ts_rank_cd(body, query) AS rank, type, document, + // ts_headline('english', document, query) AS highlight // FROM documents, to_tsquery('english', 'consent') query // WHERE query @@ body AND (document @> '{"kind": "API"}') // ORDER BY rank DESC @@ -173,6 +174,11 @@ export class DatabaseDocumentStore implements DatabaseStore { if (pgTerm) { query .select(tx.raw('ts_rank_cd(body, query) AS "rank"')) + .select( + tx.raw( + `ts_headline(\'english\', document, query, 'StartSel=${preTag}, StopSel=${postTag}') as "highlight"`, + ), + ) .orderBy('rank', 'desc'); } else { query.select(tx.raw('1 as rank')); diff --git a/plugins/search-backend-module-pg/src/database/types.ts b/plugins/search-backend-module-pg/src/database/types.ts index 7e87658745..23679d100f 100644 --- a/plugins/search-backend-module-pg/src/database/types.ts +++ b/plugins/search-backend-module-pg/src/database/types.ts @@ -22,6 +22,8 @@ export interface PgSearchQuery { pgTerm?: string; offset: number; limit: number; + preTag: string; + postTag: string; } export interface DatabaseStore { @@ -49,4 +51,5 @@ export interface RawDocumentRow { export interface DocumentResultRow { document: IndexableDocument; type: string; + highlight: IndexableDocument; } From d43228a1832118dfa2b1e60c6e37c9d8c6568dc5 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Sat, 18 Jun 2022 07:39:23 -0500 Subject: [PATCH 178/212] Refactored to support config with options Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- packages/backend/src/plugins/search.ts | 5 +- plugins/search-backend-module-pg/config.d.ts | 62 +++++++++++++++++++ plugins/search-backend-module-pg/package.json | 7 ++- .../src/PgSearchEngine/PgSearchEngine.test.ts | 57 ++++++++++++----- .../src/PgSearchEngine/PgSearchEngine.ts | 42 ++++++++++--- .../database/DatabaseDocumentStore.test.ts | 34 +++++----- .../src/database/DatabaseDocumentStore.ts | 11 +++- .../src/database/types.ts | 4 +- plugins/search-backend-module-pg/src/types.ts | 40 ++++++++++++ 9 files changed, 216 insertions(+), 46 deletions(-) create mode 100644 plugins/search-backend-module-pg/config.d.ts create mode 100644 plugins/search-backend-module-pg/src/types.ts diff --git a/packages/backend/src/plugins/search.ts b/packages/backend/src/plugins/search.ts index a0ea83ab61..db92d79d71 100644 --- a/packages/backend/src/plugins/search.ts +++ b/packages/backend/src/plugins/search.ts @@ -39,7 +39,10 @@ async function createSearchEngine( } if (await PgSearchEngine.supported(env.database)) { - return await PgSearchEngine.from({ database: env.database }); + return await PgSearchEngine.from({ + database: env.database, + config: env.config, + }); } return new LunrSearchEngine({ logger: env.logger }); diff --git a/plugins/search-backend-module-pg/config.d.ts b/plugins/search-backend-module-pg/config.d.ts new file mode 100644 index 0000000000..6cdda27156 --- /dev/null +++ b/plugins/search-backend-module-pg/config.d.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +export interface Config { + /** Configuration options for the search plugin */ + search?: { + /** + * Options for PG + */ + pg?: { + /** + * Options for configuring highlight settings + * See https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-HEADLINE + */ + highlightOptions?: { + /** + * Used to enable to disable the highlight feature. The default value is true + */ + useHighlight?: boolean; + /** + * Used to set the longest headlines to output. The default value is 35. + */ + maxWords?: number; + /** + * Used to set the shortest headlines to output. The default value is 15. + */ + minWords?: number; + /** + * Words of this length or less will be dropped at the start and end of a headline, unless they are query terms. + * The default value of three (3) eliminates common English articles. + */ + shortWord?: number; + /** + * If true the whole document will be used as the headline, ignoring the preceding three parameters. The default is false. + */ + highlightAll?: boolean; + /** + * maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. + * A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details). + */ + maxFragments?: number; + /** + * Delimiter string used to concatenate fragments. Defaults to " ... ". + */ + fragmentDelimiter?: string; + }; + }; + }; +} diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 7809f9dd06..16367b9ef1 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -24,6 +24,7 @@ }, "dependencies": { "@backstage/backend-common": "^0.14.1-next.1", + "@backstage/config": "^1.0.1", "@backstage/plugin-search-backend-node": "^0.6.3-next.1", "@backstage/plugin-search-common": "^0.3.6-next.0", "lodash": "^4.17.21", @@ -36,6 +37,8 @@ }, "files": [ "dist", - "migrations" - ] + "migrations", + "config.d.ts" + ], + "configSchema": "config.d.ts" } diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts index 5f3bc3c5d8..1d0e31757f 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts @@ -14,6 +14,7 @@ * limitations under the License. */ import { DatabaseStore } from '../database'; +import { PgSearchHighlightConfig } from '../types'; import { ConcretePgSearchQuery, decodePageCursor, @@ -22,6 +23,18 @@ import { } from './PgSearchEngine'; import { PgSearchEngineIndexer } from './PgSearchEngineIndexer'; +const highlightOptions: PgSearchHighlightConfig = { + preTag: '', + postTag: '', + useHighlight: false, + maxWords: 35, + minWords: 15, + shortWord: 3, + highlightAll: false, + maxFragments: 0, + fragmentDelimiter: ' ... ', +}; + jest.mock('./PgSearchEngineIndexer', () => ({ PgSearchEngineIndexer: jest .fn() @@ -65,10 +78,13 @@ describe('PgSearchEngine', () => { }); it('should pass page cursor', async () => { - const actualTranslatedQuery = searchEngine.translator({ - term: 'Hello', - pageCursor: 'MQ==', - }); + const actualTranslatedQuery = searchEngine.translator( + { + term: 'Hello', + pageCursor: 'MQ==', + }, + highlightOptions, + ); expect(actualTranslatedQuery).toMatchObject({ pgQuery: { @@ -81,9 +97,12 @@ describe('PgSearchEngine', () => { }); it('should return translated query term', async () => { - const actualTranslatedQuery = searchEngine.translator({ - term: 'Hello World', - }); + const actualTranslatedQuery = searchEngine.translator( + { + term: 'Hello World', + }, + highlightOptions, + ); expect(actualTranslatedQuery).toMatchObject({ pgQuery: { @@ -96,10 +115,13 @@ describe('PgSearchEngine', () => { }); it('should sanitize query term', async () => { - const actualTranslatedQuery = searchEngine.translator({ - term: 'H&e|l!l*o W\0o(r)l:d', - pageCursor: '', - }) as ConcretePgSearchQuery; + const actualTranslatedQuery = searchEngine.translator( + { + term: 'H&e|l!l*o W\0o(r)l:d', + pageCursor: '', + }, + highlightOptions, + ) as ConcretePgSearchQuery; expect(actualTranslatedQuery).toMatchObject({ pgQuery: { @@ -110,11 +132,14 @@ describe('PgSearchEngine', () => { }); it('should return translated query with filters', async () => { - const actualTranslatedQuery = searchEngine.translator({ - term: 'testTerm', - filters: { kind: 'testKind' }, - types: ['my-filter'], - }); + const actualTranslatedQuery = searchEngine.translator( + { + term: 'testTerm', + filters: { kind: 'testKind' }, + types: ['my-filter'], + }, + highlightOptions, + ); expect(actualTranslatedQuery).toMatchObject({ pgQuery: { diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index 77aa003c5d..764e530435 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -27,6 +27,8 @@ import { PgSearchQuery, } from '../database'; import { v4 as uuid } from 'uuid'; +import { Config } from '@backstage/config'; +import { PgSearchHighlightConfig, PgSearchHighlightOptions } from '../types'; export type ConcretePgSearchQuery = { pgQuery: PgSearchQuery; @@ -34,13 +36,36 @@ export type ConcretePgSearchQuery = { }; export class PgSearchEngine implements SearchEngine { - constructor(private readonly databaseStore: DatabaseStore) {} + private readonly highlightOptions: PgSearchHighlightConfig; + + constructor( + private readonly databaseStore: DatabaseStore, + highlightOptions?: PgSearchHighlightOptions, + ) { + const uuidTag = uuid(); + this.highlightOptions = { + preTag: `<${uuidTag}>`, + postTag: ``, + useHighlight: false, + maxWords: 35, + minWords: 15, + shortWord: 3, + highlightAll: false, + maxFragments: 0, + fragmentDelimiter: ' ... ', + ...highlightOptions, + }; + } static async from(options: { database: PluginDatabaseManager; + config: Config; }): Promise { return new PgSearchEngine( await DatabaseDocumentStore.create(await options.database.getClient()), + options.config.getOptional( + 'search.pg.highlightOptions', + ), ); } @@ -48,13 +73,15 @@ export class PgSearchEngine implements SearchEngine { return await DatabaseDocumentStore.supported(await database.getClient()); } - translator(query: SearchQuery): ConcretePgSearchQuery { + translator( + query: SearchQuery, + options: PgSearchHighlightConfig, + ): ConcretePgSearchQuery { const pageSize = 25; const { page } = decodePageCursor(query.pageCursor); const offset = page * pageSize; // We request more result to know whether there is another page const limit = pageSize + 1; - const uuidTag = uuid(); return { pgQuery: { @@ -68,8 +95,7 @@ export class PgSearchEngine implements SearchEngine { types: query.types, offset, limit, - preTag: `<${uuidTag}>`, - postTag: ``, + options, }, pageSize, }; @@ -90,7 +116,7 @@ export class PgSearchEngine implements SearchEngine { } async query(query: SearchQuery): Promise { - const { pgQuery, pageSize } = this.translator(query); + const { pgQuery, pageSize } = this.translator(query, this.highlightOptions); const rows = await this.databaseStore.transaction(async tx => this.databaseStore.query(tx, pgQuery), @@ -115,8 +141,8 @@ export class PgSearchEngine implements SearchEngine { document, rank: page * pageSize + index + 1, highlight: { - preTag: pgQuery.preTag, - postTag: pgQuery.postTag, + preTag: pgQuery.options.preTag, + postTag: pgQuery.options.postTag, fields: highlight ? { text: highlight.text, diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts index e2303d90b2..693a3ea3c0 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts @@ -15,8 +15,21 @@ */ import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; import { IndexableDocument } from '@backstage/plugin-search-common'; +import { PgSearchHighlightConfig } from '../types'; import { DatabaseDocumentStore } from './DatabaseDocumentStore'; +const highlightOptions: PgSearchHighlightConfig = { + preTag: '', + postTag: '', + useHighlight: false, + maxWords: 35, + minWords: 15, + shortWord: 3, + highlightAll: false, + maxFragments: 0, + fragmentDelimiter: ' ... ', +}; + describe('DatabaseDocumentStore', () => { describe('unsupported', () => { const databases = TestDatabases.create({ @@ -224,8 +237,7 @@ describe('DatabaseDocumentStore', () => { pgTerm: 'Hello & World', offset: 1, limit: 1, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -271,8 +283,7 @@ describe('DatabaseDocumentStore', () => { pgTerm: 'Hello & World', offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -334,8 +345,7 @@ describe('DatabaseDocumentStore', () => { types: ['my-type'], offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -389,8 +399,7 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this' }, offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -445,8 +454,7 @@ describe('DatabaseDocumentStore', () => { fields: { myField: ['this', 'that'] }, offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -508,8 +516,7 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this', otherField: 'another' }, offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); @@ -559,8 +566,7 @@ describe('DatabaseDocumentStore', () => { fields: { myField: 'this' }, offset: 0, limit: 25, - preTag: '', - postTag: '', + options: highlightOptions, }), ); diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts index 3a1ec128ef..1695db3cf5 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts @@ -132,7 +132,7 @@ export class DatabaseDocumentStore implements DatabaseStore { async query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit, preTag, postTag }: PgSearchQuery, + { types, pgTerm, fields, offset, limit, options }: PgSearchQuery, ): Promise { // Builds a query like: // SELECT ts_rank_cd(body, query) AS rank, type, document, @@ -171,15 +171,20 @@ export class DatabaseDocumentStore implements DatabaseStore { query.select('type', 'document'); - if (pgTerm) { + if (pgTerm && options.useHighlight) { + const headlineOptions = `MaxWords=${options.maxWords}, MinWords=${options.minWords}, ShortWord=${options.shortWord}, HighlightAll=${options.highlightAll}, MaxFragments=${options.maxFragments}, FragmentDelimiter=${options.fragmentDelimiter}, StartSel=${options.preTag}, StopSel=${options.postTag}`; query .select(tx.raw('ts_rank_cd(body, query) AS "rank"')) .select( tx.raw( - `ts_headline(\'english\', document, query, 'StartSel=${preTag}, StopSel=${postTag}') as "highlight"`, + `ts_headline(\'english\', document, query, '${headlineOptions}') as "highlight"`, ), ) .orderBy('rank', 'desc'); + } else if (pgTerm && !options.useHighlight) { + query + .select(tx.raw('ts_rank_cd(body, query) AS "rank"')) + .orderBy('rank', 'desc'); } else { query.select(tx.raw('1 as rank')); } diff --git a/plugins/search-backend-module-pg/src/database/types.ts b/plugins/search-backend-module-pg/src/database/types.ts index 23679d100f..d572eba146 100644 --- a/plugins/search-backend-module-pg/src/database/types.ts +++ b/plugins/search-backend-module-pg/src/database/types.ts @@ -15,6 +15,7 @@ */ import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; +import { PgSearchHighlightConfig } from '../types'; export interface PgSearchQuery { fields?: Record; @@ -22,8 +23,7 @@ export interface PgSearchQuery { pgTerm?: string; offset: number; limit: number; - preTag: string; - postTag: string; + options: PgSearchHighlightConfig; } export interface DatabaseStore { diff --git a/plugins/search-backend-module-pg/src/types.ts b/plugins/search-backend-module-pg/src/types.ts new file mode 100644 index 0000000000..9ad56b9b12 --- /dev/null +++ b/plugins/search-backend-module-pg/src/types.ts @@ -0,0 +1,40 @@ +/* + * 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. + */ + +export type PgSearchHighlightOptions = { + useHighlight?: boolean; + maxWords?: number; + minWords?: number; + shortWord?: number; + highlightAll?: boolean; + maxFragments?: number; + fragmentDelimiter?: string; +}; + +/** + * @public + */ +export type PgSearchHighlightConfig = { + useHighlight: boolean; + maxWords: number; + minWords: number; + shortWord: number; + highlightAll: boolean; + maxFragments: number; + fragmentDelimiter: string; + preTag: string; + postTag: string; +}; From b69dd94766690fab7443b6f7af701ddc2f16bf72 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:29:54 -0500 Subject: [PATCH 179/212] Fixed failing tests Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .../src/PgSearchEngine/PgSearchEngine.test.ts | 48 +++++++++++++++++-- .../src/PgSearchEngine/PgSearchEngine.ts | 2 +- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts index 1d0e31757f..c1ed730053 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts @@ -26,7 +26,7 @@ import { PgSearchEngineIndexer } from './PgSearchEngineIndexer'; const highlightOptions: PgSearchHighlightConfig = { preTag: '', postTag: '', - useHighlight: false, + useHighlight: true, maxWords: 35, minWords: 15, shortWord: 3, @@ -35,6 +35,8 @@ const highlightOptions: PgSearchHighlightConfig = { fragmentDelimiter: ' ... ', }; +jest.mock('uuid', () => ({ v4: () => 'tag' })); + jest.mock('./PgSearchEngineIndexer', () => ({ PgSearchEngineIndexer: jest .fn() @@ -71,10 +73,13 @@ describe('PgSearchEngine', () => { filters: {}, }); - expect(translatorSpy).toHaveBeenCalledWith({ - term: 'testTerm', - filters: {}, - }); + expect(translatorSpy).toHaveBeenCalledWith( + { + term: 'testTerm', + filters: {}, + }, + highlightOptions, + ); }); it('should pass page cursor', async () => { @@ -205,6 +210,16 @@ describe('PgSearchEngine', () => { }, type: 'my-type', rank: 1, + highlight: { + preTag: '', + postTag: '', + fields: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + path: '', + }, + }, }, ], nextPageCursor: undefined, @@ -214,6 +229,7 @@ describe('PgSearchEngine', () => { pgTerm: '("Hello" | "Hello":*)&("World" | "World":*)', offset: 0, limit: 26, + options: highlightOptions, }); }); @@ -252,6 +268,16 @@ describe('PgSearchEngine', () => { }, type: 'my-type', rank: i + 1, + highlight: { + preTag: '', + postTag: '', + fields: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + path: '', + }, + }, })), nextPageCursor: 'MQ==', }); @@ -260,6 +286,7 @@ describe('PgSearchEngine', () => { pgTerm: '("Hello" | "Hello":*)&("World" | "World":*)', offset: 0, limit: 26, + options: highlightOptions, }); }); @@ -300,6 +327,16 @@ describe('PgSearchEngine', () => { }, type: 'my-type', rank: i + 1, + highlight: { + preTag: '', + postTag: '', + fields: { + title: 'Hello World', + text: 'Lorem Ipsum', + location: 'location-1', + path: '', + }, + }, })) .slice(25), previousPageCursor: 'MA==', @@ -309,6 +346,7 @@ describe('PgSearchEngine', () => { pgTerm: '("Hello" | "Hello":*)&("World" | "World":*)', offset: 25, limit: 26, + options: highlightOptions, }); }); }); diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index 764e530435..d0c1571991 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -46,7 +46,7 @@ export class PgSearchEngine implements SearchEngine { this.highlightOptions = { preTag: `<${uuidTag}>`, postTag: ``, - useHighlight: false, + useHighlight: true, maxWords: 35, minWords: 15, shortWord: 3, From fe664999df0312348f7d17745bbe22f13e8d96a0 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:48:34 -0500 Subject: [PATCH 180/212] Added documentation about optional config Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- plugins/search-backend-module-pg/README.md | 28 ++++++++++++++++++++ plugins/search-backend-module-pg/config.d.ts | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/plugins/search-backend-module-pg/README.md b/plugins/search-backend-module-pg/README.md index d3f98132aa..49804a927c 100644 --- a/plugins/search-backend-module-pg/README.md +++ b/plugins/search-backend-module-pg/README.md @@ -14,3 +14,31 @@ other plugins. See [Backstage documentation](https://backstage.io/docs/features/search/search-engines#postgres) for details on how to setup Postgres based search for your Backstage instance. + +## Optional Configuration + +The following is an example of the optional configuration that can be applied when using Postgres as the search backend. Currently this is mostly for just the highlight feature: + +```yaml +search: + pg: + highlightOptions: + useHighlight: true # Used to enable to disable the highlight feature. The default value is true + maxWord: 35 # Used to set the longest headlines to output. The default value is 35. + minWord: 15 # Used to set the shortest headlines to output. The default value is 15. + shortWord: 3 # Words of this length or less will be dropped at the start and end of a headline, unless they are query terms. The default value of three (3) eliminates common English articles. + highlightAll: false # If true the whole document will be used as the headline, ignoring the preceding three parameters. The default is false. + maxFragments: 0 # Maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details). + fragmentDelimiter: ' ... ' # Delimiter string used to concatenate fragments. Defaults to " ... ". +``` + +**Note:** the highlight search term feature uses `ts_headline` which has been known to potentially impact performance. You only need this minimal config to disable it should you have issues: + +```yaml +search: + pg: + highlightOptions: + useHighlight: false +``` + +The Postgres documentation on [Highlighting Results](https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-HEADLINE) has more details. diff --git a/plugins/search-backend-module-pg/config.d.ts b/plugins/search-backend-module-pg/config.d.ts index 6cdda27156..7367b770bc 100644 --- a/plugins/search-backend-module-pg/config.d.ts +++ b/plugins/search-backend-module-pg/config.d.ts @@ -48,7 +48,7 @@ export interface Config { */ highlightAll?: boolean; /** - * maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. + * Maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. * A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details). */ maxFragments?: number; From a678795d252c01b3101b1ab56bd04533081f4bf1 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:54:28 -0500 Subject: [PATCH 181/212] Updated api-report Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .../search-backend-module-pg/api-report.md | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index 6a8b68a042..23e261ca4d 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -4,6 +4,7 @@ ```ts import { BatchSearchEngineIndexer } from '@backstage/plugin-search-backend-node'; +import { Config } from '@backstage/config'; import { IndexableDocument } from '@backstage/plugin-search-common'; import { IndexableResultSet } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; @@ -43,7 +44,7 @@ export class DatabaseDocumentStore implements DatabaseStore { // (undocumented) query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit, preTag, postTag }: PgSearchQuery, + { types, pgTerm, fields, offset, limit, options }: PgSearchQuery, ): Promise; // (undocumented) static supported(knex: Knex): Promise; @@ -80,10 +81,15 @@ export interface DatabaseStore { // // @public (undocumented) export class PgSearchEngine implements SearchEngine { - constructor(databaseStore: DatabaseStore); + // Warning: (ae-forgotten-export) The symbol "PgSearchHighlightOptions" needs to be exported by the entry point index.d.ts + constructor( + databaseStore: DatabaseStore, + highlightOptions?: PgSearchHighlightOptions, + ); // (undocumented) static from(options: { database: PluginDatabaseManager; + config: Config; }): Promise; // (undocumented) getIndexer(type: string): Promise; @@ -95,8 +101,13 @@ export class PgSearchEngine implements SearchEngine { ): void; // (undocumented) static supported(database: PluginDatabaseManager): Promise; + // Warning: (ae-forgotten-export) The symbol "PgSearchHighlightConfig" needs to be exported by the entry point index.d.ts + // // (undocumented) - translator(query: SearchQuery): ConcretePgSearchQuery; + translator( + query: SearchQuery, + options: PgSearchHighlightConfig, + ): ConcretePgSearchQuery; } // Warning: (ae-missing-release-tag) "PgSearchEngineIndexer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -132,12 +143,10 @@ export interface PgSearchQuery { // (undocumented) offset: number; // (undocumented) + options: PgSearchHighlightConfig; + // (undocumented) pgTerm?: string; // (undocumented) - postTag: string; - // (undocumented) - preTag: string; - // (undocumented) types?: string[]; } From 90aca31689a7ed778804a21013191dd59790cb81 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:29:45 -0500 Subject: [PATCH 182/212] Refactored config/options based on feedback Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- packages/backend/src/plugins/search.ts | 2 +- .../src/PgSearchEngine/PgSearchEngine.test.ts | 14 ++++-- .../src/PgSearchEngine/PgSearchEngine.ts | 50 +++++++++++-------- .../database/DatabaseDocumentStore.test.ts | 4 +- .../src/database/DatabaseDocumentStore.ts | 3 +- .../src/database/types.ts | 4 +- plugins/search-backend-module-pg/src/index.ts | 1 + plugins/search-backend-module-pg/src/types.ts | 29 ++++++----- 8 files changed, 65 insertions(+), 42 deletions(-) diff --git a/packages/backend/src/plugins/search.ts b/packages/backend/src/plugins/search.ts index db92d79d71..51ab665026 100644 --- a/packages/backend/src/plugins/search.ts +++ b/packages/backend/src/plugins/search.ts @@ -39,7 +39,7 @@ async function createSearchEngine( } if (await PgSearchEngine.supported(env.database)) { - return await PgSearchEngine.from({ + return await PgSearchEngine.fromConfig({ database: env.database, config: env.config, }); diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts index c1ed730053..5ad9d12897 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { ConfigReader } from '@backstage/config'; import { DatabaseStore } from '../database'; -import { PgSearchHighlightConfig } from '../types'; +import { PgSearchHighlightOptions } from '../types'; import { ConcretePgSearchQuery, decodePageCursor, @@ -23,7 +24,7 @@ import { } from './PgSearchEngine'; import { PgSearchEngineIndexer } from './PgSearchEngineIndexer'; -const highlightOptions: PgSearchHighlightConfig = { +const highlightOptions: PgSearchHighlightOptions = { preTag: '', postTag: '', useHighlight: true, @@ -47,6 +48,13 @@ describe('PgSearchEngine', () => { const tx: any = {} as any; let searchEngine: PgSearchEngine; let database: jest.Mocked; + const config = { + search: { + pg: { + highlightOptions, + }, + }, + }; beforeEach(() => { database = { @@ -57,7 +65,7 @@ describe('PgSearchEngine', () => { completeInsert: jest.fn(), prepareInsert: jest.fn(), }; - searchEngine = new PgSearchEngine(database); + searchEngine = new PgSearchEngine(database, new ConfigReader(config)); }); describe('translator', () => { diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index d0c1571991..b6e57552ba 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -28,7 +28,7 @@ import { } from '../database'; import { v4 as uuid } from 'uuid'; import { Config } from '@backstage/config'; -import { PgSearchHighlightConfig, PgSearchHighlightOptions } from '../types'; +import { PgSearchHighlightOptions, PgSearchOptions } from '../types'; export type ConcretePgSearchQuery = { pgQuery: PgSearchQuery; @@ -36,36 +36,46 @@ export type ConcretePgSearchQuery = { }; export class PgSearchEngine implements SearchEngine { - private readonly highlightOptions: PgSearchHighlightConfig; - - constructor( - private readonly databaseStore: DatabaseStore, - highlightOptions?: PgSearchHighlightOptions, - ) { + private readonly highlightOptions: PgSearchHighlightOptions; + constructor(private readonly databaseStore: DatabaseStore, config: Config) { const uuidTag = uuid(); - this.highlightOptions = { + const highlightConfig = config.getOptionalConfig( + 'search.pg.highlightOptions', + ); + + const highlightOptions: PgSearchHighlightOptions = { preTag: `<${uuidTag}>`, postTag: ``, - useHighlight: true, - maxWords: 35, - minWords: 15, - shortWord: 3, - highlightAll: false, - maxFragments: 0, - fragmentDelimiter: ' ... ', - ...highlightOptions, + useHighlight: highlightConfig?.getOptionalBoolean('useHighlight') ?? true, + maxWords: highlightConfig?.getOptionalNumber('maxWords') ?? 35, + minWords: highlightConfig?.getOptionalNumber('minWords') ?? 15, + shortWord: highlightConfig?.getOptionalNumber('shortWord') ?? 3, + highlightAll: + highlightConfig?.getOptionalBoolean('highlightAll') ?? false, + maxFragments: highlightConfig?.getOptionalNumber('maxFragments') ?? 0, + fragmentDelimiter: + highlightConfig?.getOptionalString('fragmentDelimiter') ?? ' ... ', }; + this.highlightOptions = highlightOptions; } + /** + * @deprecated This will be removed in a future release, please us fromConfig instead + */ static async from(options: { database: PluginDatabaseManager; config: Config; }): Promise { return new PgSearchEngine( await DatabaseDocumentStore.create(await options.database.getClient()), - options.config.getOptional( - 'search.pg.highlightOptions', - ), + options.config, + ); + } + + static async fromConfig({ config, database }: PgSearchOptions) { + return new PgSearchEngine( + await DatabaseDocumentStore.create(await database.getClient()), + config, ); } @@ -75,7 +85,7 @@ export class PgSearchEngine implements SearchEngine { translator( query: SearchQuery, - options: PgSearchHighlightConfig, + options: PgSearchHighlightOptions, ): ConcretePgSearchQuery { const pageSize = 25; const { page } = decodePageCursor(query.pageCursor); diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts index 693a3ea3c0..f4b3e6fb0b 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts @@ -15,10 +15,10 @@ */ import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; import { IndexableDocument } from '@backstage/plugin-search-common'; -import { PgSearchHighlightConfig } from '../types'; +import { PgSearchHighlightOptions } from '../types'; import { DatabaseDocumentStore } from './DatabaseDocumentStore'; -const highlightOptions: PgSearchHighlightConfig = { +const highlightOptions: PgSearchHighlightOptions = { preTag: '', postTag: '', useHighlight: false, diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts index 1695db3cf5..040145f7b8 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts @@ -132,8 +132,9 @@ export class DatabaseDocumentStore implements DatabaseStore { async query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit, options }: PgSearchQuery, + searchQuery: PgSearchQuery, ): Promise { + const { types, pgTerm, fields, offset, limit, options } = searchQuery; // Builds a query like: // SELECT ts_rank_cd(body, query) AS rank, type, document, // ts_headline('english', document, query) AS highlight diff --git a/plugins/search-backend-module-pg/src/database/types.ts b/plugins/search-backend-module-pg/src/database/types.ts index d572eba146..43bda32050 100644 --- a/plugins/search-backend-module-pg/src/database/types.ts +++ b/plugins/search-backend-module-pg/src/database/types.ts @@ -15,7 +15,7 @@ */ import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; -import { PgSearchHighlightConfig } from '../types'; +import { PgSearchHighlightOptions } from '../types'; export interface PgSearchQuery { fields?: Record; @@ -23,7 +23,7 @@ export interface PgSearchQuery { pgTerm?: string; offset: number; limit: number; - options: PgSearchHighlightConfig; + options: PgSearchHighlightOptions; } export interface DatabaseStore { diff --git a/plugins/search-backend-module-pg/src/index.ts b/plugins/search-backend-module-pg/src/index.ts index fbc52735dd..4cb54f9676 100644 --- a/plugins/search-backend-module-pg/src/index.ts +++ b/plugins/search-backend-module-pg/src/index.ts @@ -22,3 +22,4 @@ export * from './database'; export * from './PgSearchEngine'; +export type { PgSearchHighlightOptions } from './types'; diff --git a/plugins/search-backend-module-pg/src/types.ts b/plugins/search-backend-module-pg/src/types.ts index 9ad56b9b12..5e32c69e7a 100644 --- a/plugins/search-backend-module-pg/src/types.ts +++ b/plugins/search-backend-module-pg/src/types.ts @@ -14,6 +14,22 @@ * limitations under the License. */ +import { PluginDatabaseManager } from '@backstage/backend-common'; +import { Config } from '@backstage/config'; + +/** + * Options to instantiate PgSearchEngine + * @public + */ +export type PgSearchOptions = { + config: Config; + database: PluginDatabaseManager; +}; + +/** + * Options for highlighting search terms + * @public + */ export type PgSearchHighlightOptions = { useHighlight?: boolean; maxWords?: number; @@ -22,19 +38,6 @@ export type PgSearchHighlightOptions = { highlightAll?: boolean; maxFragments?: number; fragmentDelimiter?: string; -}; - -/** - * @public - */ -export type PgSearchHighlightConfig = { - useHighlight: boolean; - maxWords: number; - minWords: number; - shortWord: number; - highlightAll: boolean; - maxFragments: number; - fragmentDelimiter: string; preTag: string; postTag: string; }; From 8803c2f2dfc2fbea04cf8fe604cf1b8b0af1c7d2 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:57:55 -0500 Subject: [PATCH 183/212] Updated changeset and api-report Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/metal-windows-share.md | 2 + .../search-backend-module-pg/api-report.md | 40 ++++++++++++++----- plugins/search-backend-module-pg/src/index.ts | 2 +- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.changeset/metal-windows-share.md b/.changeset/metal-windows-share.md index 4fc568986a..0c5e6bb26e 100644 --- a/.changeset/metal-windows-share.md +++ b/.changeset/metal-windows-share.md @@ -2,4 +2,6 @@ '@backstage/plugin-search-backend-module-pg': patch --- +**DEPRECATED**: `PgSearchEngine` static `from` has been depracated and will be removed in a future release. Use static `fromConfig` method to instantiate. + Added support for highlighting matched terms in search result data diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index 23e261ca4d..0d03a83d34 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -44,7 +44,7 @@ export class DatabaseDocumentStore implements DatabaseStore { // (undocumented) query( tx: Knex.Transaction, - { types, pgTerm, fields, offset, limit, options }: PgSearchQuery, + searchQuery: PgSearchQuery, ): Promise; // (undocumented) static supported(knex: Knex): Promise; @@ -81,17 +81,18 @@ export interface DatabaseStore { // // @public (undocumented) export class PgSearchEngine implements SearchEngine { - // Warning: (ae-forgotten-export) The symbol "PgSearchHighlightOptions" needs to be exported by the entry point index.d.ts - constructor( - databaseStore: DatabaseStore, - highlightOptions?: PgSearchHighlightOptions, - ); - // (undocumented) + constructor(databaseStore: DatabaseStore, config: Config); + // @deprecated (undocumented) static from(options: { database: PluginDatabaseManager; config: Config; }): Promise; // (undocumented) + static fromConfig({ + config, + database, + }: PgSearchOptions): Promise; + // (undocumented) getIndexer(type: string): Promise; // (undocumented) query(query: SearchQuery): Promise; @@ -101,12 +102,10 @@ export class PgSearchEngine implements SearchEngine { ): void; // (undocumented) static supported(database: PluginDatabaseManager): Promise; - // Warning: (ae-forgotten-export) The symbol "PgSearchHighlightConfig" needs to be exported by the entry point index.d.ts - // // (undocumented) translator( query: SearchQuery, - options: PgSearchHighlightConfig, + options: PgSearchHighlightOptions, ): ConcretePgSearchQuery; } @@ -132,6 +131,25 @@ export type PgSearchEngineIndexerOptions = { databaseStore: DatabaseStore; }; +// @public +export type PgSearchHighlightOptions = { + useHighlight?: boolean; + maxWords?: number; + minWords?: number; + shortWord?: number; + highlightAll?: boolean; + maxFragments?: number; + fragmentDelimiter?: string; + preTag: string; + postTag: string; +}; + +// @public +export type PgSearchOptions = { + config: Config; + database: PluginDatabaseManager; +}; + // Warning: (ae-missing-release-tag) "PgSearchQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -143,7 +161,7 @@ export interface PgSearchQuery { // (undocumented) offset: number; // (undocumented) - options: PgSearchHighlightConfig; + options: PgSearchHighlightOptions; // (undocumented) pgTerm?: string; // (undocumented) diff --git a/plugins/search-backend-module-pg/src/index.ts b/plugins/search-backend-module-pg/src/index.ts index 4cb54f9676..86184d1e4e 100644 --- a/plugins/search-backend-module-pg/src/index.ts +++ b/plugins/search-backend-module-pg/src/index.ts @@ -22,4 +22,4 @@ export * from './database'; export * from './PgSearchEngine'; -export type { PgSearchHighlightOptions } from './types'; +export type { PgSearchOptions, PgSearchHighlightOptions } from './types'; From cb62dd8a8a716a75add3388997cfb1bee2dd5d65 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 21 Jun 2022 15:12:51 -0500 Subject: [PATCH 184/212] Fixed typo in changeset Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/metal-windows-share.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/metal-windows-share.md b/.changeset/metal-windows-share.md index 0c5e6bb26e..b4443a620f 100644 --- a/.changeset/metal-windows-share.md +++ b/.changeset/metal-windows-share.md @@ -2,6 +2,6 @@ '@backstage/plugin-search-backend-module-pg': patch --- -**DEPRECATED**: `PgSearchEngine` static `from` has been depracated and will be removed in a future release. Use static `fromConfig` method to instantiate. +**DEPRECATED**: `PgSearchEngine` static `from` has been deprecated and will be removed in a future release. Use static `fromConfig` method to instantiate. Added support for highlighting matched terms in search result data From a45d796451ca35984d1ed76e6221644e5c144981 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:03:12 -0500 Subject: [PATCH 185/212] Refactored types based on feedback Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .../search-backend-module-pg/api-report.md | 21 ++++--- .../src/PgSearchEngine/PgSearchEngine.test.ts | 12 ++-- .../src/PgSearchEngine/PgSearchEngine.ts | 59 ++++++++++++++++--- .../src/PgSearchEngine/index.ts | 8 ++- .../database/DatabaseDocumentStore.test.ts | 2 +- .../src/database/types.ts | 2 +- plugins/search-backend-module-pg/src/index.ts | 1 - plugins/search-backend-module-pg/src/types.ts | 43 -------------- 8 files changed, 81 insertions(+), 67 deletions(-) delete mode 100644 plugins/search-backend-module-pg/src/types.ts diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index 0d03a83d34..cd47df837c 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -12,9 +12,7 @@ import { PluginDatabaseManager } from '@backstage/backend-common'; import { SearchEngine } from '@backstage/plugin-search-backend-node'; import { SearchQuery } from '@backstage/plugin-search-common'; -// Warning: (ae-missing-release-tag) "ConcretePgSearchQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type ConcretePgSearchQuery = { pgQuery: PgSearchQuery; pageSize: number; @@ -97,15 +95,13 @@ export class PgSearchEngine implements SearchEngine { // (undocumented) query(query: SearchQuery): Promise; // (undocumented) - setTranslator( - translator: (query: SearchQuery) => ConcretePgSearchQuery, - ): void; + setTranslator(translator: PgSearchQueryTranslator): void; // (undocumented) static supported(database: PluginDatabaseManager): Promise; // (undocumented) translator( query: SearchQuery, - options: PgSearchHighlightOptions, + options: PgSearchQueryTranslatorOptions, ): ConcretePgSearchQuery; } @@ -168,6 +164,17 @@ export interface PgSearchQuery { types?: string[]; } +// @public +export type PgSearchQueryTranslator = ( + query: SearchQuery, + options: PgSearchQueryTranslatorOptions, +) => ConcretePgSearchQuery; + +// @public +export type PgSearchQueryTranslatorOptions = { + highlightOptions: PgSearchHighlightOptions; +}; + // Warning: (ae-missing-release-tag) "RawDocumentRow" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts index 5ad9d12897..23f8983074 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.test.ts @@ -15,12 +15,12 @@ */ import { ConfigReader } from '@backstage/config'; import { DatabaseStore } from '../database'; -import { PgSearchHighlightOptions } from '../types'; import { ConcretePgSearchQuery, decodePageCursor, encodePageCursor, PgSearchEngine, + PgSearchHighlightOptions, } from './PgSearchEngine'; import { PgSearchEngineIndexer } from './PgSearchEngineIndexer'; @@ -86,7 +86,7 @@ describe('PgSearchEngine', () => { term: 'testTerm', filters: {}, }, - highlightOptions, + { highlightOptions }, ); }); @@ -96,7 +96,7 @@ describe('PgSearchEngine', () => { term: 'Hello', pageCursor: 'MQ==', }, - highlightOptions, + { highlightOptions }, ); expect(actualTranslatedQuery).toMatchObject({ @@ -114,7 +114,7 @@ describe('PgSearchEngine', () => { { term: 'Hello World', }, - highlightOptions, + { highlightOptions }, ); expect(actualTranslatedQuery).toMatchObject({ @@ -133,7 +133,7 @@ describe('PgSearchEngine', () => { term: 'H&e|l!l*o W\0o(r)l:d', pageCursor: '', }, - highlightOptions, + { highlightOptions }, ) as ConcretePgSearchQuery; expect(actualTranslatedQuery).toMatchObject({ @@ -151,7 +151,7 @@ describe('PgSearchEngine', () => { filters: { kind: 'testKind' }, types: ['my-filter'], }, - highlightOptions, + { highlightOptions }, ); expect(actualTranslatedQuery).toMatchObject({ diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index b6e57552ba..3f4d419fab 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -28,13 +28,58 @@ import { } from '../database'; import { v4 as uuid } from 'uuid'; import { Config } from '@backstage/config'; -import { PgSearchHighlightOptions, PgSearchOptions } from '../types'; +/** + * Search query that the Postgres search engine understands. + * @public + */ export type ConcretePgSearchQuery = { pgQuery: PgSearchQuery; pageSize: number; }; +/** + * Options available for the Postgres specific query translator. + * @public + */ +export type PgSearchQueryTranslatorOptions = { + highlightOptions: PgSearchHighlightOptions; +}; + +/** + * Postgres specific query translator. + * @public + */ +export type PgSearchQueryTranslator = ( + query: SearchQuery, + options: PgSearchQueryTranslatorOptions, +) => ConcretePgSearchQuery; + +/** + * Options to instantiate PgSearchEngine + * @public + */ +export type PgSearchOptions = { + config: Config; + database: PluginDatabaseManager; +}; + +/** + * Options for highlighting search terms + * @public + */ +export type PgSearchHighlightOptions = { + useHighlight?: boolean; + maxWords?: number; + minWords?: number; + shortWord?: number; + highlightAll?: boolean; + maxFragments?: number; + fragmentDelimiter?: string; + preTag: string; + postTag: string; +}; + export class PgSearchEngine implements SearchEngine { private readonly highlightOptions: PgSearchHighlightOptions; constructor(private readonly databaseStore: DatabaseStore, config: Config) { @@ -85,7 +130,7 @@ export class PgSearchEngine implements SearchEngine { translator( query: SearchQuery, - options: PgSearchHighlightOptions, + options: PgSearchQueryTranslatorOptions, ): ConcretePgSearchQuery { const pageSize = 25; const { page } = decodePageCursor(query.pageCursor); @@ -105,15 +150,13 @@ export class PgSearchEngine implements SearchEngine { types: query.types, offset, limit, - options, + options: options.highlightOptions, }, pageSize, }; } - setTranslator( - translator: (query: SearchQuery) => ConcretePgSearchQuery, - ): void { + setTranslator(translator: PgSearchQueryTranslator) { this.translator = translator; } @@ -126,7 +169,9 @@ export class PgSearchEngine implements SearchEngine { } async query(query: SearchQuery): Promise { - const { pgQuery, pageSize } = this.translator(query, this.highlightOptions); + const { pgQuery, pageSize } = this.translator(query, { + highlightOptions: this.highlightOptions, + }); const rows = await this.databaseStore.transaction(async tx => this.databaseStore.query(tx, pgQuery), diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts index 7f8e297648..e9ea04e5c4 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts @@ -14,7 +14,13 @@ * limitations under the License. */ export { PgSearchEngine } from './PgSearchEngine'; -export type { ConcretePgSearchQuery } from './PgSearchEngine'; +export type { + ConcretePgSearchQuery, + PgSearchQueryTranslatorOptions, + PgSearchQueryTranslator, + PgSearchOptions, + PgSearchHighlightOptions, +} from './PgSearchEngine'; export type { PgSearchEngineIndexer, PgSearchEngineIndexerOptions, diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts index f4b3e6fb0b..355e41352d 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts @@ -15,7 +15,7 @@ */ import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; import { IndexableDocument } from '@backstage/plugin-search-common'; -import { PgSearchHighlightOptions } from '../types'; +import { PgSearchHighlightOptions } from '../PgSearchEngine'; import { DatabaseDocumentStore } from './DatabaseDocumentStore'; const highlightOptions: PgSearchHighlightOptions = { diff --git a/plugins/search-backend-module-pg/src/database/types.ts b/plugins/search-backend-module-pg/src/database/types.ts index 43bda32050..151be7d13f 100644 --- a/plugins/search-backend-module-pg/src/database/types.ts +++ b/plugins/search-backend-module-pg/src/database/types.ts @@ -15,7 +15,7 @@ */ import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; -import { PgSearchHighlightOptions } from '../types'; +import { PgSearchHighlightOptions } from '../PgSearchEngine'; export interface PgSearchQuery { fields?: Record; diff --git a/plugins/search-backend-module-pg/src/index.ts b/plugins/search-backend-module-pg/src/index.ts index 86184d1e4e..fbc52735dd 100644 --- a/plugins/search-backend-module-pg/src/index.ts +++ b/plugins/search-backend-module-pg/src/index.ts @@ -22,4 +22,3 @@ export * from './database'; export * from './PgSearchEngine'; -export type { PgSearchOptions, PgSearchHighlightOptions } from './types'; diff --git a/plugins/search-backend-module-pg/src/types.ts b/plugins/search-backend-module-pg/src/types.ts deleted file mode 100644 index 5e32c69e7a..0000000000 --- a/plugins/search-backend-module-pg/src/types.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 { PluginDatabaseManager } from '@backstage/backend-common'; -import { Config } from '@backstage/config'; - -/** - * Options to instantiate PgSearchEngine - * @public - */ -export type PgSearchOptions = { - config: Config; - database: PluginDatabaseManager; -}; - -/** - * Options for highlighting search terms - * @public - */ -export type PgSearchHighlightOptions = { - useHighlight?: boolean; - maxWords?: number; - minWords?: number; - shortWord?: number; - highlightAll?: boolean; - maxFragments?: number; - fragmentDelimiter?: string; - preTag: string; - postTag: string; -}; From e52f7801b0ff54d8cea619bb9219b5020d96b1ba Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 28 Jun 2022 07:34:57 -0500 Subject: [PATCH 186/212] Adjustments based on feedback Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- docs/features/search/search-engines.md | 30 ++++++++++++++++++- packages/backend/src/plugins/search.ts | 3 +- .../search-backend-module-pg/api-report.md | 10 +++---- .../src/PgSearchEngine/PgSearchEngine.ts | 9 ++++-- .../src/database/DatabaseDocumentStore.ts | 1 + 5 files changed, 42 insertions(+), 11 deletions(-) diff --git a/docs/features/search/search-engines.md b/docs/features/search/search-engines.md index a5ff780c8a..ecd8a85109 100644 --- a/docs/features/search/search-engines.md +++ b/docs/features/search/search-engines.md @@ -59,10 +59,38 @@ configured and make the following changes to your backend: // Initialize a connection to a search engine. const searchEngine = (await PgSearchEngine.supported(env.database)) - ? await PgSearchEngine.from({ database: env.database }) + ? await PgSearchEngine.fromConfig(env.config, { database: env.database }) : new LunrSearchEngine({ logger: env.logger }); ``` +## Optional Configuration + +The following is an example of the optional configuration that can be applied when using Postgres as the search backend. Currently this is mostly for just the highlight feature: + +```yaml +search: + pg: + highlightOptions: + useHighlight: true # Used to enable to disable the highlight feature. The default value is true + maxWord: 35 # Used to set the longest headlines to output. The default value is 35. + minWord: 15 # Used to set the shortest headlines to output. The default value is 15. + shortWord: 3 # Words of this length or less will be dropped at the start and end of a headline, unless they are query terms. The default value of three (3) eliminates common English articles. + highlightAll: false # If true the whole document will be used as the headline, ignoring the preceding three parameters. The default is false. + maxFragments: 0 # Maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details). + fragmentDelimiter: ' ... ' # Delimiter string used to concatenate fragments. Defaults to " ... ". +``` + +**Note:** the highlight search term feature uses `ts_headline` which has been known to potentially impact performance. You only need this minimal config to disable it should you have issues: + +```yaml +search: + pg: + highlightOptions: + useHighlight: false +``` + +The Postgres documentation on [Highlighting Results](https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-HEADLINE) has more details. + ## ElasticSearch Backstage supports ElasticSearch search engine connections, indexing and diff --git a/packages/backend/src/plugins/search.ts b/packages/backend/src/plugins/search.ts index 51ab665026..c478ecdd05 100644 --- a/packages/backend/src/plugins/search.ts +++ b/packages/backend/src/plugins/search.ts @@ -39,9 +39,8 @@ async function createSearchEngine( } if (await PgSearchEngine.supported(env.database)) { - return await PgSearchEngine.fromConfig({ + return await PgSearchEngine.fromConfig(env.config, { database: env.database, - config: env.config, }); } diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index cd47df837c..f7a188a14e 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -79,6 +79,7 @@ export interface DatabaseStore { // // @public (undocumented) export class PgSearchEngine implements SearchEngine { + // @deprecated constructor(databaseStore: DatabaseStore, config: Config); // @deprecated (undocumented) static from(options: { @@ -86,10 +87,10 @@ export class PgSearchEngine implements SearchEngine { config: Config; }): Promise; // (undocumented) - static fromConfig({ - config, - database, - }: PgSearchOptions): Promise; + static fromConfig( + config: Config, + options: PgSearchOptions, + ): Promise; // (undocumented) getIndexer(type: string): Promise; // (undocumented) @@ -142,7 +143,6 @@ export type PgSearchHighlightOptions = { // @public export type PgSearchOptions = { - config: Config; database: PluginDatabaseManager; }; diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index 3f4d419fab..abf7cdbf5c 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -60,7 +60,6 @@ export type PgSearchQueryTranslator = ( * @public */ export type PgSearchOptions = { - config: Config; database: PluginDatabaseManager; }; @@ -82,6 +81,10 @@ export type PgSearchHighlightOptions = { export class PgSearchEngine implements SearchEngine { private readonly highlightOptions: PgSearchHighlightOptions; + + /** + * @deprecated This will be marked as private in a future release, please us fromConfig instead + */ constructor(private readonly databaseStore: DatabaseStore, config: Config) { const uuidTag = uuid(); const highlightConfig = config.getOptionalConfig( @@ -117,9 +120,9 @@ export class PgSearchEngine implements SearchEngine { ); } - static async fromConfig({ config, database }: PgSearchOptions) { + static async fromConfig(config: Config, options: PgSearchOptions) { return new PgSearchEngine( - await DatabaseDocumentStore.create(await database.getClient()), + await DatabaseDocumentStore.create(await options.database.getClient()), config, ); } diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts index 040145f7b8..8e73c0f16f 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts @@ -135,6 +135,7 @@ export class DatabaseDocumentStore implements DatabaseStore { searchQuery: PgSearchQuery, ): Promise { const { types, pgTerm, fields, offset, limit, options } = searchQuery; + // TODO(awanlin): We should make the language a parameter so that we can support more then just english // Builds a query like: // SELECT ts_rank_cd(body, query) AS rank, type, document, // ts_headline('english', document, query) AS highlight From bbd93e2a1d0c3366fbc008fddfb276d937052a86 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 13:34:35 +0000 Subject: [PATCH 187/212] fix(deps): update dependency kafkajs to v2.1.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 319a959e84..c41d871342 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16967,9 +16967,9 @@ jwt-decode@*, jwt-decode@^3.1.0: integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A== kafkajs@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/kafkajs/-/kafkajs-2.0.2.tgz#cdfc8f57aa4fd69f6d9ca1cce4ee89bbc2a3a1f9" - integrity sha512-g6CM3fAenofOjR1bfOAqeZUEaSGhNtBscNokybSdW1rmIKYNwBPC9xQzwulFJm36u/xcxXUiCl/L/qfslapihA== + version "2.1.0" + resolved "https://registry.npmjs.org/kafkajs/-/kafkajs-2.1.0.tgz#32ede4e8080cc75586c5e4406eeb582fa73f7b1e" + integrity sha512-6IYiOdGWvFPbSbVB+AV3feT+A7vzw5sXm7Ze4QTfP7FRNdY8pGcpiNPvD2lfgYFD8Dm9KbMgBgTt2mf8KaIkzw== keyv-memcache@^1.2.5: version "1.2.9" From f78ed0ae30aac10be9e76d5c98c478dd4d24134e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 13:35:24 +0000 Subject: [PATCH 188/212] fix(deps): update dependency octokit-plugin-create-pull-request to v3.12.2 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 319a959e84..322cd08808 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19648,9 +19648,9 @@ obuf@^1.0.0, obuf@^1.1.2: integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== octokit-plugin-create-pull-request@^3.10.0: - version "3.11.0" - resolved "https://registry.npmjs.org/octokit-plugin-create-pull-request/-/octokit-plugin-create-pull-request-3.11.0.tgz#11f496176111eaa04955fb2bb7e4d953501423d0" - integrity sha512-ZD025HTrm/KoBMRmPYbcCw3tfGomOdAYFB6/K1xiMW+/NFsOyDOeFrEGBbL82b57dhNsPRibs0eL64lpJ3xyvw== + version "3.12.2" + resolved "https://registry.npmjs.org/octokit-plugin-create-pull-request/-/octokit-plugin-create-pull-request-3.12.2.tgz#eaced840587a2f7176c563d94ca6112a93f29da2" + integrity sha512-DwY+vPq7dd2zSiIJw2lN1bYUKEuvjLmBTErTJOQEQd+ujQompN8qjpixeheMZetkJmSNzpWhxxqgZyCMuVnZlQ== dependencies: "@octokit/types" "^6.8.2" From 15201b10321827e3f788b56fc09ff9d554373667 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 14:12:33 +0000 Subject: [PATCH 189/212] fix(deps): update dependency rc-progress to v3.4.0 Signed-off-by: Renovate Bot --- .changeset/renovate-833a91b.md | 7 +++++++ packages/core-components/package.json | 2 +- plugins/codescene/package.json | 2 +- plugins/sonarqube/package.json | 2 +- yarn.lock | 9 +++++++++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .changeset/renovate-833a91b.md diff --git a/.changeset/renovate-833a91b.md b/.changeset/renovate-833a91b.md new file mode 100644 index 0000000000..15e23ec5ff --- /dev/null +++ b/.changeset/renovate-833a91b.md @@ -0,0 +1,7 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-codescene': patch +'@backstage/plugin-sonarqube': patch +--- + +Updated dependency `rc-progress` to `3.4.0`. diff --git a/packages/core-components/package.json b/packages/core-components/package.json index aeea26c17b..51cbc37a1b 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -56,7 +56,7 @@ "pluralize": "^8.0.0", "prop-types": "^15.7.2", "qs": "^6.9.4", - "rc-progress": "3.3.3", + "rc-progress": "3.4.0", "react-helmet": "6.1.0", "react-hook-form": "^7.12.2", "react-markdown": "^8.0.0", diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 0b06850594..c21c1e24be 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -30,7 +30,7 @@ "@material-ui/core": "^4.9.10", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.57", - "rc-progress": "3.3.3", + "rc-progress": "3.4.0", "react-router-dom": "6.0.0-beta.0", "react-use": "^17.2.4" }, diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 94888e1d95..4aabc80bab 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -46,7 +46,7 @@ "@material-ui/lab": "4.0.0-alpha.57", "@material-ui/styles": "^4.10.0", "cross-fetch": "^3.1.5", - "rc-progress": "3.3.3", + "rc-progress": "3.4.0", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index d64acad3a0..569376c94f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21621,6 +21621,15 @@ rc-progress@3.3.3: classnames "^2.2.6" rc-util "^5.16.1" +rc-progress@3.4.0: + version "3.4.0" + resolved "https://registry.npmjs.org/rc-progress/-/rc-progress-3.4.0.tgz#80a33c25c9675f5836ba25a87cd8dc310aad72b1" + integrity sha512-ZuMyOzzTkZnn+EKqGQ7YHzrvGzBtcCCVjx1McC/E/pMTvr6GWVfVRSawDlWsscxsJs7MkqSTwCO6Lu4IeoY2zQ== + dependencies: + "@babel/runtime" "^7.10.1" + classnames "^2.2.6" + rc-util "^5.16.1" + rc-util@^5.16.1: version "5.16.1" resolved "https://registry.npmjs.org/rc-util/-/rc-util-5.16.1.tgz#374db7cb735512f05165ddc3d6b2c61c21b8b4e3" From 8915b74167cbcad90ac45b425b42287a9f81a7ed Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 16:43:09 +0200 Subject: [PATCH 190/212] Fix mocking Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.test.ts | 10 +++++----- .../src/service/techInsightsContextBuilder.ts | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index 46d1e61e22..82f504c8a8 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -27,9 +27,11 @@ import { Knex } from 'knex'; jest.mock('./fact/FactRetrieverRegistry'); jest.mock('./fact/FactRetrieverEngine', () => ({ - create: jest.fn().mockResolvedValue({ - schedule: jest.fn(), - }), + FactRetrieverEngine: { + create: jest.fn().mockResolvedValue({ + schedule: jest.fn(), + }), + }, })); describe('buildTechInsightsContext', () => { @@ -68,7 +70,6 @@ describe('buildTechInsightsContext', () => { discovery: discoveryMock, tokenManager: ServerTokenManager.noop(), }); - expect(DefaultFactRetrieverRegistry).toHaveBeenCalledTimes(1); }); @@ -85,7 +86,6 @@ describe('buildTechInsightsContext', () => { discovery: discoveryMock, tokenManager: ServerTokenManager.noop(), }); - expect(DefaultFactRetrieverRegistry).not.toHaveBeenCalled(); }); }); diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 008acf192d..1ce87adb96 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -120,6 +120,7 @@ export const buildTechInsightsContext = async < scheduler, tokenManager, } = options; + logger.info('HERE1'); const buildFactRetrieverRegistry = (): FactRetrieverRegistry => { if (!options.factRetrieverRegistry) { @@ -139,6 +140,7 @@ export const buildTechInsightsContext = async < await database.getClient(), { logger }, ); + logger.info('HERE2'); const factRetrieverEngine = await FactRetrieverEngine.create({ scheduler, From d223fa15663a4e4552812b14422fded352a69c32 Mon Sep 17 00:00:00 2001 From: sblausten Date: Thu, 30 Jun 2022 16:47:32 +0200 Subject: [PATCH 191/212] Clean Signed-off-by: sblausten --- .../src/service/techInsightsContextBuilder.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 1ce87adb96..008acf192d 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -120,7 +120,6 @@ export const buildTechInsightsContext = async < scheduler, tokenManager, } = options; - logger.info('HERE1'); const buildFactRetrieverRegistry = (): FactRetrieverRegistry => { if (!options.factRetrieverRegistry) { @@ -140,7 +139,6 @@ export const buildTechInsightsContext = async < await database.getClient(), { logger }, ); - logger.info('HERE2'); const factRetrieverEngine = await FactRetrieverEngine.create({ scheduler, From 94a4c24fed612732e4559c169ea8c08d865551b3 Mon Sep 17 00:00:00 2001 From: planeiii Date: Thu, 30 Jun 2022 09:52:56 -0500 Subject: [PATCH 192/212] chore: correct yarn.lock registry entry Signed-off-by: planeiii --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8d7fe5fa30..6c67be2830 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6502,7 +6502,7 @@ resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@*", "@types/react-dom@<18.0.0", "@types/react-dom@^17": +"@types/react-dom@*", "@types/react-dom@<18.0.0": version "17.0.17" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1" integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg== @@ -20904,8 +20904,8 @@ promise-all-reject-late@^1.0.0: promise-any-polyfill@^1.0.1: version "1.0.1" - resolved "https://artifactory.thousandeyes.com/artifactory/api/npm/npm/promise-any-polyfill/-/promise-any-polyfill-1.0.1.tgz#563872dd0abd370bfa8039e63980469b4b8b0d53" - integrity sha1-Vjhy3Qq9Nwv6gDnmOYBGm0uLDVM= + resolved "https://registry.npmjs.org/promise-any-polyfill/-/promise-any-polyfill-1.0.1.tgz#563872dd0abd370bfa8039e63980469b4b8b0d53" + integrity sha512-51Tj+hOoV3LOeCHItmWBklN9FYkyV53uIIjjzgIchitGneTvl6+ivOxWXhxraeUzzS3YFRpXRPPbv7+KD3NzYQ== promise-call-limit@^1.0.1: version "1.0.1" @@ -26012,7 +26012,7 @@ ws@^7.3.1, ws@^7.4.6: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^8.0.0, ws@^8.3.0: +ws@^8.3.0: version "8.8.0" resolved "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== From 3ba68057fba8f46b70be8bb0b1edd6a1e7337375 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 15:12:48 +0000 Subject: [PATCH 193/212] fix(deps): update dependency @react-hookz/web to v14.5.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7550d34558..a06b7e2bd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5263,9 +5263,9 @@ "@react-hookz/deep-equal" "^1.0.1" "@react-hookz/web@^14.0.0": - version "14.4.0" - resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.4.0.tgz#8c5003d2ee243e4f628ca7f69a6975a4c1a84713" - integrity sha512-MZUeiC/xCg30yBVfV3LS4gtQUngVb/r0xhaeGKk+Bx5ZaJOhHQ8kuduXP13RmbzpehJk2e1TL0oZsTofzT7QJQ== + version "14.5.0" + resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.5.0.tgz#174804687176956310faeaedc02077272753ae49" + integrity sha512-YEdyRc3Wbs2IEJTEKYQr56+txGE6kMnLxSRiPawUoJbhAzMAS+14xhCr4iUEyBTS3Q4xdI/32w9ls3gK8FQgBw== dependencies: "@react-hookz/deep-equal" "^1.0.2" From d7c397db55cfcf7bc64740ce5f257ba341173f99 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 16:10:30 +0000 Subject: [PATCH 194/212] fix(deps): update dependency @react-hookz/web to v14.5.1 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a06b7e2bd4..434fe8bd9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5263,9 +5263,9 @@ "@react-hookz/deep-equal" "^1.0.1" "@react-hookz/web@^14.0.0": - version "14.5.0" - resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.5.0.tgz#174804687176956310faeaedc02077272753ae49" - integrity sha512-YEdyRc3Wbs2IEJTEKYQr56+txGE6kMnLxSRiPawUoJbhAzMAS+14xhCr4iUEyBTS3Q4xdI/32w9ls3gK8FQgBw== + version "14.6.0" + resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.6.0.tgz#8b3824841ee679b23516aa9b316e819e55590a1c" + integrity sha512-4ZQU4wsNd4QsMe4LkF9t1y4NS2cCp1N/JfG9TYw1dsWLOJhZ0w+4ebp7cydN5BLeceIaILcfQ7fBYUvrBJN6EA== dependencies: "@react-hookz/deep-equal" "^1.0.2" From 714591a2305b058cfe8ba60e5d2ade9549fcecd0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 16:12:02 +0000 Subject: [PATCH 195/212] fix(deps): update dependency google-auth-library to v8.1.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a06b7e2bd4..b56f04b458 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13997,9 +13997,9 @@ google-auth-library@^7.14.0: lru-cache "^6.0.0" google-auth-library@^8.0.0, google-auth-library@^8.0.1, google-auth-library@^8.0.2: - version "8.0.3" - resolved "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.0.3.tgz#1e780430632d03df36dc22a3f5c89dbc251f2105" - integrity sha512-1eC6yaCrPfkv3bwtb3e0AOct7E7xR/uikDyXNo/j8Wd6a1ldRgAey5FmaDGNJnHNDPLtDiENQLYsA69eXOF5sA== + version "8.1.0" + resolved "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.1.0.tgz#879e8d2e90a9d47e6eab32fd1d5fd9ed52d7d441" + integrity sha512-J/fNXEnqLgbr3kmeUshZCtHQia6ZiNbbrebVzpt/+LTeY6Ka9CtbQvloTjVGVO7nyYbs0KYeuIwgUC/t2Gp1Jw== dependencies: arrify "^2.0.0" base64-js "^1.3.0" From a274fe38b9351ba91ff1003cfe97e4646d720d5d Mon Sep 17 00:00:00 2001 From: David Weber Date: Mon, 27 Jun 2022 22:58:57 +0200 Subject: [PATCH 196/212] feat: add hidden title column to catalog and API table to enable filtering by title Signed-off-by: David Weber --- .changeset/silly-geese-design.md | 6 ++++++ .../ApiExplorerPage/DefaultApiExplorerPage.tsx | 1 + plugins/catalog/api-report.md | 7 +++++++ .../src/components/CatalogTable/CatalogTable.tsx | 1 + .../catalog/src/components/CatalogTable/columns.tsx | 10 ++++++++++ 5 files changed, 25 insertions(+) create mode 100644 .changeset/silly-geese-design.md diff --git a/.changeset/silly-geese-design.md b/.changeset/silly-geese-design.md new file mode 100644 index 0000000000..d4f8de2510 --- /dev/null +++ b/.changeset/silly-geese-design.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-api-docs': patch +'@backstage/plugin-catalog': minor +--- + +Add hidden title column to catalog and API table to enable filtering by title. diff --git a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx index 9fc6b2c3c2..b0acd3567c 100644 --- a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx +++ b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx @@ -40,6 +40,7 @@ import React from 'react'; import { registerComponentRouteRef } from '../../routes'; const defaultColumns: TableColumn[] = [ + CatalogTable.columns.createTitleColumn({ hidden: true }), CatalogTable.columns.createNameColumn({ defaultKind: 'API' }), CatalogTable.columns.createSystemColumn(), CatalogTable.columns.createOwnerColumn(), diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 0d2d611412..c5ee52df5c 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -136,6 +136,13 @@ export const CatalogTable: { createSpecLifecycleColumn(): TableColumn; createMetadataDescriptionColumn(): TableColumn; createTagsColumn(): TableColumn; + createTitleColumn( + options?: + | { + hidden?: boolean | undefined; + } + | undefined, + ): TableColumn; }>; }; diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 94ae7c47f4..96937c52c2 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -68,6 +68,7 @@ export const CatalogTable = (props: CatalogTableProps) => { const defaultColumns: TableColumn[] = useMemo(() => { return [ + columnFactories.createTitleColumn({ hidden: true }), columnFactories.createNameColumn({ defaultKind: filters.kind?.value }), ...createEntitySpecificColumns(), columnFactories.createMetadataDescriptionColumn(), diff --git a/plugins/catalog/src/components/CatalogTable/columns.tsx b/plugins/catalog/src/components/CatalogTable/columns.tsx index 0fb91d4f3f..d8b52e276e 100644 --- a/plugins/catalog/src/components/CatalogTable/columns.tsx +++ b/plugins/catalog/src/components/CatalogTable/columns.tsx @@ -131,4 +131,14 @@ export const columnFactories = Object.freeze({ ), }; }, + createTitleColumn(options?: { + hidden?: boolean; + }): TableColumn { + return { + title: 'Title', + field: 'entity.metadata.title', + hidden: options?.hidden, + searchable: true, + }; + }, }); From ad3326c66e8ca0fa067ab445ae9769c53e140bb5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 17:18:15 +0000 Subject: [PATCH 197/212] fix(deps): update dependency graphiql to v1.9.10 Signed-off-by: Renovate Bot --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 434fe8bd9b..dc22c47c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2348,10 +2348,10 @@ teeny-request "^8.0.0" uuid "^8.0.0" -"@graphiql/react@^0.4.2": - version "0.4.2" - resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.4.2.tgz#2a12c7cf0f3945022c2231ce4e814561f2363ef7" - integrity sha512-Df2BaA0HGRkzETCaUw4ZSDe///sfIAGZ6H436A08hmg7SU3yoWJboWGWGc/QD2NyBKVgVBMmzmHcgWhsYh03EA== +"@graphiql/react@^0.4.3": + version "0.4.3" + resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.4.3.tgz#29ca3125c7a349de5e9beb2aef660137fbcbde2e" + integrity sha512-MnH+7LqRqFnwo8YBDtgDfJOdeS5QqNTzH2gTvTbEYYWaNQW1+Vhbsyu2RKHnPSgKVQlfLzdjw6SAMtSb3q1Qog== dependencies: "@graphiql/toolkit" "^0.6.0" codemirror "^5.65.3" @@ -14135,11 +14135,11 @@ grapheme-splitter@^1.0.4: integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== graphiql@^1.5.12, graphiql@^1.8.8: - version "1.9.9" - resolved "https://registry.npmjs.org/graphiql/-/graphiql-1.9.9.tgz#dfc1760e7552140247e591e3c66d1ccc389ea71f" - integrity sha512-eJ5kGpXFXw69QG/1SJrQs/mzGpDIv4XeGqohGSKQCOh7NtsAsQIxs/VMVR8Lvv9tx6YiIFUvAHp997NlyOwHbQ== + version "1.9.10" + resolved "https://registry.npmjs.org/graphiql/-/graphiql-1.9.10.tgz#ba7113ed8b1bc988d00d8d7cc51901b51b684bde" + integrity sha512-uYYK/zBTV9Y/IHw4uopGVRusbF2xmPnptx7OMFTnTHOTQOmzfIGRTn58WuPgevyEi+9zSLojM86lot9xvNA1/w== dependencies: - "@graphiql/react" "^0.4.2" + "@graphiql/react" "^0.4.3" "@graphiql/toolkit" "^0.6.0" entities "^2.0.0" graphql-language-service "^5.0.6" From 816d4ab03d55afa6ae66f511e2a3b85f3701e8f5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 17:21:11 +0000 Subject: [PATCH 198/212] fix(deps): update dependency testcontainers to v8.11.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 434fe8bd9b..081c7a8b9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24611,9 +24611,9 @@ test-exclude@^6.0.0: minimatch "^3.0.4" testcontainers@^8.1.2: - version "8.10.1" - resolved "https://registry.npmjs.org/testcontainers/-/testcontainers-8.10.1.tgz#2b3d1d25932f437ba4c46a1f32380ce7987629f8" - integrity sha512-MQFoWe6sJrbcZqXb+fM7uN2w9WnV2KZnNyI7Qc9pbxQZS6oLa/or5kgL4DADAuzYFxXJvL3f8inIGI+/1S+rvA== + version "8.11.0" + resolved "https://registry.npmjs.org/testcontainers/-/testcontainers-8.11.0.tgz#f19307557289b7e80c7e1d65b39ab0054a2b2549" + integrity sha512-sc9FA40waYXKVTp/Dm9qmcc8I5/TLyZd+JxtnYjIQDp1UvLzAckQPjSlGCDTdM00J2X4KDwG0+jY+8WprZbpnQ== dependencies: "@balena/dockerignore" "^1.0.2" "@types/archiver" "^5.3.1" From 3cf7afae083e3f5f3ab2e1b0c17d5ec83ebeacc1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 18:15:26 +0000 Subject: [PATCH 199/212] fix(deps): update dependency winston to v3.8.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 081c7a8b9d..10cf622edc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26165,9 +26165,9 @@ winston-transport@^4.5.0: triple-beam "^1.3.0" winston@^3.2.1, winston@^3.7.2: - version "3.7.2" - resolved "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1" - integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng== + version "3.8.0" + resolved "https://registry.npmjs.org/winston/-/winston-3.8.0.tgz#4fc8656829dcfdab3c38f558eab785eea38a5328" + integrity sha512-Iix1w8rIq2kBDkGvclO0db2CVOHYVamCIkVWcUbs567G9i2pdB+gvqLgDgxx4B4HXHYD6U4Zybh6ojepUOqcFQ== dependencies: "@dabh/diagnostics" "^2.0.2" async "^3.2.3" From 0ac0eb67bc4ec7ad6cf781fa267290131a796885 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 18:16:17 +0000 Subject: [PATCH 200/212] fix(deps): update typescript-eslint monorepo to v5.30.0 Signed-off-by: Renovate Bot --- yarn.lock | 90 +++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/yarn.lock b/yarn.lock index 081c7a8b9d..8e1c31260c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7245,13 +7245,13 @@ integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== "@typescript-eslint/eslint-plugin@^5.9.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz#c67794d2b0fd0b4a47f50266088acdc52a08aab6" - integrity sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w== + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.0.tgz#524a11e15c09701733033c96943ecf33f55d9ca1" + integrity sha512-lvhRJ2pGe2V9MEU46ELTdiHgiAFZPKtLhiU5wlnaYpMc2+c1R8fh8i80ZAa665drvjHKUJyRRGg3gEm1If54ow== dependencies: - "@typescript-eslint/scope-manager" "5.29.0" - "@typescript-eslint/type-utils" "5.29.0" - "@typescript-eslint/utils" "5.29.0" + "@typescript-eslint/scope-manager" "5.30.0" + "@typescript-eslint/type-utils" "5.30.0" + "@typescript-eslint/utils" "5.30.0" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -7272,13 +7272,13 @@ eslint-utils "^3.0.0" "@typescript-eslint/parser@^5.9.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz#41314b195b34d44ff38220caa55f3f93cfca43cf" - integrity sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw== + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.0.tgz#a2184fb5f8ef2bf1db0ae61a43907e2e32aa1b8f" + integrity sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA== dependencies: - "@typescript-eslint/scope-manager" "5.29.0" - "@typescript-eslint/types" "5.29.0" - "@typescript-eslint/typescript-estree" "5.29.0" + "@typescript-eslint/scope-manager" "5.30.0" + "@typescript-eslint/types" "5.30.0" + "@typescript-eslint/typescript-estree" "5.30.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.20.0": @@ -7289,13 +7289,13 @@ "@typescript-eslint/types" "5.20.0" "@typescript-eslint/visitor-keys" "5.20.0" -"@typescript-eslint/scope-manager@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz#2a6a32e3416cb133e9af8dcf54bf077a916aeed3" - integrity sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA== +"@typescript-eslint/scope-manager@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.0.tgz#bf585ee801ab4ad84db2f840174e171a6bb002c7" + integrity sha512-3TZxvlQcK5fhTBw5solQucWSJvonXf5yua5nx8OqK94hxdrT7/6W3/CS42MLd/f1BmlmmbGEgQcTHHCktUX5bQ== dependencies: - "@typescript-eslint/types" "5.29.0" - "@typescript-eslint/visitor-keys" "5.29.0" + "@typescript-eslint/types" "5.30.0" + "@typescript-eslint/visitor-keys" "5.30.0" "@typescript-eslint/scope-manager@5.9.0": version "5.9.0" @@ -7305,12 +7305,12 @@ "@typescript-eslint/types" "5.9.0" "@typescript-eslint/visitor-keys" "5.9.0" -"@typescript-eslint/type-utils@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz#241918001d164044020b37d26d5b9f4e37cc3d5d" - integrity sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg== +"@typescript-eslint/type-utils@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.0.tgz#98f3af926a5099153f092d4dad87148df21fbaae" + integrity sha512-GF8JZbZqSS+azehzlv/lmQQ3EU3VfWYzCczdZjJRxSEeXDQkqFhCBgFhallLDbPwQOEQ4MHpiPfkjKk7zlmeNg== dependencies: - "@typescript-eslint/utils" "5.29.0" + "@typescript-eslint/utils" "5.30.0" debug "^4.3.4" tsutils "^3.21.0" @@ -7319,10 +7319,10 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz#fa39c3c2aa786568302318f1cb51fcf64258c20c" integrity sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg== -"@typescript-eslint/types@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz#7861d3d288c031703b2d97bc113696b4d8c19aab" - integrity sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg== +"@typescript-eslint/types@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.0.tgz#db7d81d585a3da3801432a9c1d2fafbff125e110" + integrity sha512-vfqcBrsRNWw/LBXyncMF/KrUTYYzzygCSsVqlZ1qGu1QtGs6vMkt3US0VNSQ05grXi5Yadp3qv5XZdYLjpp8ag== "@typescript-eslint/types@5.9.0": version "5.9.0" @@ -7342,13 +7342,13 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz#e83d19aa7fd2e74616aab2f25dfbe4de4f0b5577" - integrity sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ== +"@typescript-eslint/typescript-estree@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.0.tgz#4565ee8a6d2ac368996e20b2344ea0eab1a8f0bb" + integrity sha512-hDEawogreZB4n1zoqcrrtg/wPyyiCxmhPLpZ6kmWfKF5M5G0clRLaEexpuWr31fZ42F96SlD/5xCt1bT5Qm4Nw== dependencies: - "@typescript-eslint/types" "5.29.0" - "@typescript-eslint/visitor-keys" "5.29.0" + "@typescript-eslint/types" "5.30.0" + "@typescript-eslint/visitor-keys" "5.30.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -7368,15 +7368,15 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz#775046effd5019667bd086bcf326acbe32cd0082" - integrity sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A== +"@typescript-eslint/utils@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.0.tgz#1dac771fead5eab40d31860716de219356f5f754" + integrity sha512-0bIgOgZflLKIcZsWvfklsaQTM3ZUbmtH0rJ1hKyV3raoUYyeZwcjQ8ZUJTzS7KnhNcsVT1Rxs7zeeMHEhGlltw== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.29.0" - "@typescript-eslint/types" "5.29.0" - "@typescript-eslint/typescript-estree" "5.29.0" + "@typescript-eslint/scope-manager" "5.30.0" + "@typescript-eslint/types" "5.30.0" + "@typescript-eslint/typescript-estree" "5.30.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -7400,12 +7400,12 @@ "@typescript-eslint/types" "5.20.0" eslint-visitor-keys "^3.0.0" -"@typescript-eslint/visitor-keys@5.29.0": - version "5.29.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz#7a4749fa7ef5160c44a451bf060ac1dc6dfb77ee" - integrity sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ== +"@typescript-eslint/visitor-keys@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.0.tgz#07721d23daca2ec4c2da7f1e660d41cd78bacac3" + integrity sha512-6WcIeRk2DQ3pHKxU1Ni0qMXJkjO/zLjBymlYBy/53qxe7yjEFSvzKLDToJjURUhSl2Fzhkl4SMXQoETauF74cw== dependencies: - "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/types" "5.30.0" eslint-visitor-keys "^3.3.0" "@typescript-eslint/visitor-keys@5.9.0": From 3e032a5de26eb406031804c818112f1f9bd59e8b Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Tue, 28 Jun 2022 19:42:52 -0400 Subject: [PATCH 201/212] refactor: create cost-insights-common isomorphic package This moves most of the cost-insights API types into a separate isomorphic @backstage/plugin-cost-insights-common package. This will allow these types to be used by a a cost-insights backend or other product specific modules. Signed-off-by: Andrew Thauer --- .changeset/afraid-flies-try.md | 7 + plugins/cost-insights-common/.eslintrc.js | 1 + plugins/cost-insights-common/CHANGELOG.md | 1 + plugins/cost-insights-common/README.md | 8 + plugins/cost-insights-common/api-report.md | 185 +++++++++++++++++ plugins/cost-insights-common/package.json | 42 ++++ plugins/cost-insights-common/src/index.ts | 23 +++ .../cost-insights-common/src/setupTests.ts | 17 ++ .../src/types/ChangeStatistic.ts | 24 +++ .../src/types/ChartData.ts} | 0 .../src/types/Cost.ts | 0 .../src/types/Currency.ts | 23 +++ .../src/types/DateAggregation.ts | 0 .../src/types/Duration.ts | 28 +++ .../src/types/Entity.ts | 0 .../src/types/Filters.ts | 0 .../src/types/Group.ts | 0 .../src/types/Maybe.ts | 0 .../src/types/Metric.ts | 0 .../src/types/MetricData.ts | 0 .../src/types/Product.ts | 0 .../src/types/Project.ts | 0 .../src/types/Trendline.ts | 0 .../cost-insights-common/src/types/index.ts | 31 +++ plugins/cost-insights/api-report.md | 193 ++---------------- plugins/cost-insights/package.json | 1 + plugins/cost-insights/src/types/Alert.ts | 9 +- .../src/types/ChangeStatistic.ts | 9 - plugins/cost-insights/src/types/Currency.ts | 8 - plugins/cost-insights/src/types/Duration.ts | 13 -- plugins/cost-insights/src/types/index.ts | 19 +- 31 files changed, 416 insertions(+), 226 deletions(-) create mode 100644 .changeset/afraid-flies-try.md create mode 100644 plugins/cost-insights-common/.eslintrc.js create mode 100644 plugins/cost-insights-common/CHANGELOG.md create mode 100644 plugins/cost-insights-common/README.md create mode 100644 plugins/cost-insights-common/api-report.md create mode 100644 plugins/cost-insights-common/package.json create mode 100644 plugins/cost-insights-common/src/index.ts create mode 100644 plugins/cost-insights-common/src/setupTests.ts create mode 100644 plugins/cost-insights-common/src/types/ChangeStatistic.ts rename plugins/{cost-insights/src/types/ChartData.tsx => cost-insights-common/src/types/ChartData.ts} (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Cost.ts (100%) create mode 100644 plugins/cost-insights-common/src/types/Currency.ts rename plugins/{cost-insights => cost-insights-common}/src/types/DateAggregation.ts (100%) create mode 100644 plugins/cost-insights-common/src/types/Duration.ts rename plugins/{cost-insights => cost-insights-common}/src/types/Entity.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Filters.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Group.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Maybe.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Metric.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/MetricData.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Product.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Project.ts (100%) rename plugins/{cost-insights => cost-insights-common}/src/types/Trendline.ts (100%) create mode 100644 plugins/cost-insights-common/src/types/index.ts diff --git a/.changeset/afraid-flies-try.md b/.changeset/afraid-flies-try.md new file mode 100644 index 0000000000..15d2e3942c --- /dev/null +++ b/.changeset/afraid-flies-try.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +Move cost-insights data specific API types (non react) into an @backstage/plugin-cost-insights-common +isomorphic package. This allows these types to be shared in any backend packages or other cost-insight +modules. diff --git a/plugins/cost-insights-common/.eslintrc.js b/plugins/cost-insights-common/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/plugins/cost-insights-common/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/cost-insights-common/CHANGELOG.md b/plugins/cost-insights-common/CHANGELOG.md new file mode 100644 index 0000000000..d958aaa41b --- /dev/null +++ b/plugins/cost-insights-common/CHANGELOG.md @@ -0,0 +1 @@ +# @backstage/plugin-cost-insights-common diff --git a/plugins/cost-insights-common/README.md b/plugins/cost-insights-common/README.md new file mode 100644 index 0000000000..5140701987 --- /dev/null +++ b/plugins/cost-insights-common/README.md @@ -0,0 +1,8 @@ +# Cost Insights Common + +Shared isomorphic code for the cost-insights plugin. + +## Links + +- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/cost-insights) +- [The Backstage homepage](https://backstage.io) diff --git a/plugins/cost-insights-common/api-report.md b/plugins/cost-insights-common/api-report.md new file mode 100644 index 0000000000..af95e8765b --- /dev/null +++ b/plugins/cost-insights-common/api-report.md @@ -0,0 +1,185 @@ +## API Report File for "@backstage/plugin-cost-insights-common" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ChangeStatistic { + // (undocumented) + amount: number; + // (undocumented) + ratio?: number; +} + +// Warning: (ae-missing-release-tag) "ChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ChartData = { + date: number; + trend: number; + dailyCost: number; + [key: string]: number; +}; + +// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Cost { + // (undocumented) + aggregation: DateAggregation[]; + // (undocumented) + change?: ChangeStatistic; + // (undocumented) + groupedCosts?: Record; + // (undocumented) + id: string; + // (undocumented) + trendline?: Trendline; +} + +// Warning: (ae-missing-release-tag) "Currency" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Currency { + // (undocumented) + kind: string | null; + // (undocumented) + label: string; + // (undocumented) + prefix?: string; + // (undocumented) + rate?: number; + // (undocumented) + unit: string; +} + +// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type DateAggregation = { + date: string; + amount: number; +}; + +// Warning: (ae-missing-release-tag) "Duration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export enum Duration { + // (undocumented) + P30D = 'P30D', + // (undocumented) + P3M = 'P3M', + // (undocumented) + P7D = 'P7D', + // (undocumented) + P90D = 'P90D', +} + +// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Entity { + // (undocumented) + aggregation: [number, number]; + // (undocumented) + change: ChangeStatistic; + // (undocumented) + entities: Record; + // (undocumented) + id: Maybe; +} + +// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Group = { + id: string; +}; + +// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Maybe = T | null; + +// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Metric = { + kind: string; + name: string; + default: boolean; +}; + +// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface MetricData { + // (undocumented) + aggregation: DateAggregation[]; + // (undocumented) + change: ChangeStatistic; + // (undocumented) + format: 'number' | 'currency'; + // (undocumented) + id: string; +} + +// Warning: (ae-missing-release-tag) "PageFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface PageFilters { + // (undocumented) + duration: Duration; + // (undocumented) + group: Maybe; + // (undocumented) + metric: string | null; + // (undocumented) + project: Maybe; +} + +// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Product { + // (undocumented) + kind: string; + // (undocumented) + name: string; +} + +// Warning: (ae-missing-release-tag) "ProductFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ProductFilters = Array; + +// Warning: (ae-missing-release-tag) "ProductPeriod" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface ProductPeriod { + // (undocumented) + duration: Duration; + // (undocumented) + productType: string; +} + +// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export interface Project { + // (undocumented) + id: string; + // (undocumented) + name?: string; +} + +// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type Trendline = { + slope: number; + intercept: number; +}; +``` diff --git a/plugins/cost-insights-common/package.json b/plugins/cost-insights-common/package.json new file mode 100644 index 0000000000..e950063efb --- /dev/null +++ b/plugins/cost-insights-common/package.json @@ -0,0 +1,42 @@ +{ + "name": "@backstage/plugin-cost-insights-common", + "description": "Common functionalities for the cost-insights plugin", + "version": "0.0.1", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "private": false, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "module": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "backstage": { + "role": "common-library" + }, + "homepage": "https://backstage.io", + "repository": { + "type": "git", + "url": "https://github.com/backstage/backstage", + "directory": "plugins/cost-insights-common" + }, + "keywords": [ + "backstage" + ], + "scripts": { + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack", + "clean": "backstage-cli package clean" + }, + "dependencies": {}, + "devDependencies": { + "@backstage/cli": "^0.18.0-next.1" + }, + "files": [ + "dist" + ] +} diff --git a/plugins/cost-insights-common/src/index.ts b/plugins/cost-insights-common/src/index.ts new file mode 100644 index 0000000000..c3c76ccf17 --- /dev/null +++ b/plugins/cost-insights-common/src/index.ts @@ -0,0 +1,23 @@ +/* + * 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. + */ + +/** + * Provides shared objects useful for interacting with the cost-insights plugin. + * + * @packageDocumentation + */ + +export * from './types'; diff --git a/plugins/cost-insights-common/src/setupTests.ts b/plugins/cost-insights-common/src/setupTests.ts new file mode 100644 index 0000000000..813cdeaae3 --- /dev/null +++ b/plugins/cost-insights-common/src/setupTests.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +export {}; diff --git a/plugins/cost-insights-common/src/types/ChangeStatistic.ts b/plugins/cost-insights-common/src/types/ChangeStatistic.ts new file mode 100644 index 0000000000..079d9bcb07 --- /dev/null +++ b/plugins/cost-insights-common/src/types/ChangeStatistic.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. + */ + +export interface ChangeStatistic { + // The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum + // If a ratio cannot be calculated - such as when a new or old sum is zero, + // the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount. + ratio?: number; + // The actual USD change between time periods (can be negative if costs decreased) + amount: number; +} diff --git a/plugins/cost-insights/src/types/ChartData.tsx b/plugins/cost-insights-common/src/types/ChartData.ts similarity index 100% rename from plugins/cost-insights/src/types/ChartData.tsx rename to plugins/cost-insights-common/src/types/ChartData.ts diff --git a/plugins/cost-insights/src/types/Cost.ts b/plugins/cost-insights-common/src/types/Cost.ts similarity index 100% rename from plugins/cost-insights/src/types/Cost.ts rename to plugins/cost-insights-common/src/types/Cost.ts diff --git a/plugins/cost-insights-common/src/types/Currency.ts b/plugins/cost-insights-common/src/types/Currency.ts new file mode 100644 index 0000000000..e82f0c9a52 --- /dev/null +++ b/plugins/cost-insights-common/src/types/Currency.ts @@ -0,0 +1,23 @@ +/* + * 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 interface Currency { + kind: string | null; + label: string; + unit: string; + prefix?: string; + rate?: number; +} diff --git a/plugins/cost-insights/src/types/DateAggregation.ts b/plugins/cost-insights-common/src/types/DateAggregation.ts similarity index 100% rename from plugins/cost-insights/src/types/DateAggregation.ts rename to plugins/cost-insights-common/src/types/DateAggregation.ts diff --git a/plugins/cost-insights-common/src/types/Duration.ts b/plugins/cost-insights-common/src/types/Duration.ts new file mode 100644 index 0000000000..25806a3346 --- /dev/null +++ b/plugins/cost-insights-common/src/types/Duration.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +/** + * Time periods for cost comparison; slight abuse of ISO 8601 periods. We take P3M to mean + * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if + * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - + * September 15. + */ +export enum Duration { + P7D = 'P7D', + P30D = 'P30D', + P90D = 'P90D', + P3M = 'P3M', +} diff --git a/plugins/cost-insights/src/types/Entity.ts b/plugins/cost-insights-common/src/types/Entity.ts similarity index 100% rename from plugins/cost-insights/src/types/Entity.ts rename to plugins/cost-insights-common/src/types/Entity.ts diff --git a/plugins/cost-insights/src/types/Filters.ts b/plugins/cost-insights-common/src/types/Filters.ts similarity index 100% rename from plugins/cost-insights/src/types/Filters.ts rename to plugins/cost-insights-common/src/types/Filters.ts diff --git a/plugins/cost-insights/src/types/Group.ts b/plugins/cost-insights-common/src/types/Group.ts similarity index 100% rename from plugins/cost-insights/src/types/Group.ts rename to plugins/cost-insights-common/src/types/Group.ts diff --git a/plugins/cost-insights/src/types/Maybe.ts b/plugins/cost-insights-common/src/types/Maybe.ts similarity index 100% rename from plugins/cost-insights/src/types/Maybe.ts rename to plugins/cost-insights-common/src/types/Maybe.ts diff --git a/plugins/cost-insights/src/types/Metric.ts b/plugins/cost-insights-common/src/types/Metric.ts similarity index 100% rename from plugins/cost-insights/src/types/Metric.ts rename to plugins/cost-insights-common/src/types/Metric.ts diff --git a/plugins/cost-insights/src/types/MetricData.ts b/plugins/cost-insights-common/src/types/MetricData.ts similarity index 100% rename from plugins/cost-insights/src/types/MetricData.ts rename to plugins/cost-insights-common/src/types/MetricData.ts diff --git a/plugins/cost-insights/src/types/Product.ts b/plugins/cost-insights-common/src/types/Product.ts similarity index 100% rename from plugins/cost-insights/src/types/Product.ts rename to plugins/cost-insights-common/src/types/Product.ts diff --git a/plugins/cost-insights/src/types/Project.ts b/plugins/cost-insights-common/src/types/Project.ts similarity index 100% rename from plugins/cost-insights/src/types/Project.ts rename to plugins/cost-insights-common/src/types/Project.ts diff --git a/plugins/cost-insights/src/types/Trendline.ts b/plugins/cost-insights-common/src/types/Trendline.ts similarity index 100% rename from plugins/cost-insights/src/types/Trendline.ts rename to plugins/cost-insights-common/src/types/Trendline.ts diff --git a/plugins/cost-insights-common/src/types/index.ts b/plugins/cost-insights-common/src/types/index.ts new file mode 100644 index 0000000000..877ace8f5f --- /dev/null +++ b/plugins/cost-insights-common/src/types/index.ts @@ -0,0 +1,31 @@ +/* + * 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 * from './ChangeStatistic'; +export * from './ChartData'; +export * from './Cost'; +export * from './DateAggregation'; +export * from './Duration'; +export * from './Currency'; +export * from './Entity'; +export * from './Filters'; +export * from './Group'; +export * from './Maybe'; +export * from './MetricData'; +export * from './Metric'; +export * from './Product'; +export * from './Project'; +export * from './Trendline'; diff --git a/plugins/cost-insights/api-report.md b/plugins/cost-insights/api-report.md index 75e1315502..8bde5729e7 100644 --- a/plugins/cost-insights/api-report.md +++ b/plugins/cost-insights/api-report.md @@ -9,10 +9,21 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePalette } from '@backstage/theme'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { BackstageTheme } from '@backstage/theme'; +import { ChangeStatistic } from '@backstage/plugin-cost-insights-common'; import { ContentRenderer } from 'recharts'; +import { Cost } from '@backstage/plugin-cost-insights-common'; +import { Currency } from '@backstage/plugin-cost-insights-common'; import { Dispatch } from 'react'; +import { Duration } from '@backstage/plugin-cost-insights-common'; +import { Entity } from '@backstage/plugin-cost-insights-common'; import { ForwardRefExoticComponent } from 'react'; +import { Group } from '@backstage/plugin-cost-insights-common'; +import { Maybe } from '@backstage/plugin-cost-insights-common'; +import { Metric } from '@backstage/plugin-cost-insights-common'; +import { MetricData } from '@backstage/plugin-cost-insights-common'; import { PaletteOptions } from '@material-ui/core/styles/createPalette'; +import { Product } from '@backstage/plugin-cost-insights-common'; +import { Project } from '@backstage/plugin-cost-insights-common'; import { PropsWithChildren } from 'react'; import { ReactNode } from 'react'; import { RechartsFunction } from 'recharts'; @@ -269,16 +280,6 @@ export type BarChartTooltipProps = { actions?: ReactNode; }; -// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface ChangeStatistic { - // (undocumented) - amount: number; - // (undocumented) - ratio?: number; -} - // Warning: (ae-missing-release-tag) "ChangeThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -289,32 +290,6 @@ export enum ChangeThreshold { upper = 0.05, } -// Warning: (ae-missing-release-tag) "ChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type ChartData = { - date: number; - trend: number; - dailyCost: number; - [key: string]: number; -}; - -// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Cost { - // (undocumented) - aggregation: DateAggregation[]; - // (undocumented) - change?: ChangeStatistic; - // (undocumented) - groupedCosts?: Record; - // (undocumented) - id: string; - // (undocumented) - trendline?: Trendline; -} - // Warning: (ae-missing-release-tag) "CostGrowth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -423,22 +398,6 @@ export interface CostInsightsThemeOptions extends PaletteOptions { palette: CostInsightsPaletteOptions; } -// Warning: (ae-missing-release-tag) "Currency" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Currency { - // (undocumented) - kind: string | null; - // (undocumented) - label: string; - // (undocumented) - prefix?: string; - // (undocumented) - rate?: number; - // (undocumented) - unit: string; -} - // Warning: (ae-missing-release-tag) "CurrencyType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -465,52 +424,16 @@ export enum DataKey { Previous = 'previous', } -// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type DateAggregation = { - date: string; - amount: number; -}; - // Warning: (ae-missing-release-tag) "DEFAULT_DATE_FORMAT" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; -// Warning: (ae-missing-release-tag) "Duration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public -export enum Duration { - // (undocumented) - P30D = 'P30D', - // (undocumented) - P3M = 'P3M', - // (undocumented) - P7D = 'P7D', - // (undocumented) - P90D = 'P90D', -} - // Warning: (ae-missing-release-tag) "EngineerThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const EngineerThreshold = 0.5; -// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Entity { - // (undocumented) - aggregation: [number, number]; - // (undocumented) - change: ChangeStatistic; - // (undocumented) - entities: Record; - // (undocumented) - id: Maybe; -} - // Warning: (ae-missing-release-tag) "ExampleCostInsightsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -533,13 +456,6 @@ export class ExampleCostInsightsClient implements CostInsightsApi { getUserGroups(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Group = { - id: string; -}; - // Warning: (ae-missing-release-tag) "GrowthType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -602,34 +518,6 @@ export type LegendItemProps = { // @public (undocumented) export type Loading = Record; -// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Maybe = T | null; - -// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Metric = { - kind: string; - name: string; - default: boolean; -}; - -// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface MetricData { - // (undocumented) - aggregation: DateAggregation[]; - // (undocumented) - change: ChangeStatistic; - // (undocumented) - format: 'number' | 'currency'; - // (undocumented) - id: string; -} - // Warning: (ae-forgotten-export) The symbol "MockConfigProviderProps" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "MockConfigProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -648,35 +536,6 @@ export const MockCurrencyProvider: ({ ...context }: MockCurrencyProviderProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "PageFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface PageFilters { - // (undocumented) - duration: Duration; - // (undocumented) - group: Maybe; - // (undocumented) - metric: string | null; - // (undocumented) - project: Maybe; -} - -// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Product { - // (undocumented) - kind: string; - // (undocumented) - name: string; -} - -// Warning: (ae-missing-release-tag) "ProductFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type ProductFilters = Array; - // Warning: (ae-missing-release-tag) "ProductInsightsOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -687,26 +546,6 @@ export type ProductInsightsOptions = { project: Maybe; }; -// Warning: (ae-missing-release-tag) "ProductPeriod" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface ProductPeriod { - // (undocumented) - duration: Duration; - // (undocumented) - productType: string; -} - -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface Project { - // (undocumented) - id: string; - // (undocumented) - name?: string; -} - // Warning: (ae-missing-release-tag) "ProjectGrowthAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public @@ -763,14 +602,6 @@ export type TooltipItem = { value: string; }; -// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export type Trendline = { - slope: number; - intercept: number; -}; - // Warning: (ae-missing-release-tag) "UnlabeledDataflowAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public @@ -817,4 +648,6 @@ export interface UnlabeledDataflowData { // (undocumented) unlabeledCost: number; } + +export * from '@backstage/plugin-cost-insights-common'; ``` diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index e2555d961f..4801a2002b 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -38,6 +38,7 @@ "@backstage/config": "^1.0.1", "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", + "@backstage/plugin-cost-insights-common": "^0.0.1", "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", diff --git a/plugins/cost-insights/src/types/Alert.ts b/plugins/cost-insights/src/types/Alert.ts index 2f220be0e6..a04becada1 100644 --- a/plugins/cost-insights/src/types/Alert.ts +++ b/plugins/cost-insights/src/types/Alert.ts @@ -13,10 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ForwardRefExoticComponent, RefAttributes } from 'react'; -import { ChangeStatistic } from './ChangeStatistic'; -import { Duration } from './Duration'; -import { Maybe } from './Maybe'; +import { + ChangeStatistic, + Duration, + Maybe, +} from '@backstage/plugin-cost-insights-common'; /** * Generic alert type with required fields for display. The `element` field will be rendered in diff --git a/plugins/cost-insights/src/types/ChangeStatistic.ts b/plugins/cost-insights/src/types/ChangeStatistic.ts index 6e85335a67..8264b23c8d 100644 --- a/plugins/cost-insights/src/types/ChangeStatistic.ts +++ b/plugins/cost-insights/src/types/ChangeStatistic.ts @@ -14,15 +14,6 @@ * limitations under the License. */ -export interface ChangeStatistic { - // The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum - // If a ratio cannot be calculated - such as when a new or old sum is zero, - // the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount. - ratio?: number; - // The actual USD change between time periods (can be negative if costs decreased) - amount: number; -} - export const EngineerThreshold = 0.5; export enum ChangeThreshold { diff --git a/plugins/cost-insights/src/types/Currency.ts b/plugins/cost-insights/src/types/Currency.ts index 5cc5756dfc..0316e8f90e 100644 --- a/plugins/cost-insights/src/types/Currency.ts +++ b/plugins/cost-insights/src/types/Currency.ts @@ -14,14 +14,6 @@ * limitations under the License. */ -export interface Currency { - kind: string | null; - label: string; - unit: string; - prefix?: string; - rate?: number; -} - export enum CurrencyType { USD = 'USD', CarbonOffsetTons = 'CARBON_OFFSET_TONS', diff --git a/plugins/cost-insights/src/types/Duration.ts b/plugins/cost-insights/src/types/Duration.ts index 94297ac00a..c5d9c83f6e 100644 --- a/plugins/cost-insights/src/types/Duration.ts +++ b/plugins/cost-insights/src/types/Duration.ts @@ -14,17 +14,4 @@ * limitations under the License. */ -/** - * Time periods for cost comparison; slight abuse of ISO 8601 periods. We take P3M to mean - * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if - * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - - * September 15. - */ -export enum Duration { - P7D = 'P7D', - P30D = 'P30D', - P90D = 'P90D', - P3M = 'P3M', -} - export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; diff --git a/plugins/cost-insights/src/types/index.ts b/plugins/cost-insights/src/types/index.ts index 5f090cc7eb..b3a06f248d 100644 --- a/plugins/cost-insights/src/types/index.ts +++ b/plugins/cost-insights/src/types/index.ts @@ -14,22 +14,15 @@ * limitations under the License. */ +// @deprecated - use types from `@backstage/plugin-cost-insights-common` instead. +export * from '@backstage/plugin-cost-insights-common'; + +// TODO: Split some of these up into `@backstage/plugin-cost-insights-react` for presentation types +// and `@backstage/plugin-cost-insights-common` for data transfer object types. export * from './Alert'; export * from './ChangeStatistic'; -export * from './ChartData'; -export * from './Cost'; -export * from './DateAggregation'; -export * from './Duration'; export * from './Currency'; -export * from './Entity'; +export * from './Duration'; export * from './Icon'; -export * from './Filters'; -export * from './Group'; export * from './Loading'; -export * from './Maybe'; -export * from './MetricData'; -export * from './Metric'; -export * from './Product'; -export * from './Project'; export * from './Theme'; -export * from './Trendline'; From e6db276347ab532249d455a7bf3d39a0d6b0f724 Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 09:38:41 -0400 Subject: [PATCH 202/212] update api report for cost-insight types Signed-off-by: Andrew Thauer --- plugins/cost-insights-common/api-report.md | 36 +--- .../src/types/ChangeStatistic.ts | 3 + .../src/types/ChartData.ts | 3 + .../cost-insights-common/src/types/Cost.ts | 3 + .../src/types/Currency.ts | 3 + .../src/types/DateAggregation.ts | 3 + .../src/types/Duration.ts | 1 + .../cost-insights-common/src/types/Entity.ts | 192 +++++++++--------- .../cost-insights-common/src/types/Filters.ts | 9 + .../cost-insights-common/src/types/Group.ts | 3 + .../cost-insights-common/src/types/Maybe.ts | 3 + .../cost-insights-common/src/types/Metric.ts | 3 + .../src/types/MetricData.ts | 3 + .../cost-insights-common/src/types/Product.ts | 3 + .../cost-insights-common/src/types/Project.ts | 3 + .../src/types/Trendline.ts | 4 + 16 files changed, 147 insertions(+), 128 deletions(-) diff --git a/plugins/cost-insights-common/api-report.md b/plugins/cost-insights-common/api-report.md index af95e8765b..daf8f5767d 100644 --- a/plugins/cost-insights-common/api-report.md +++ b/plugins/cost-insights-common/api-report.md @@ -3,8 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChangeStatistic { // (undocumented) @@ -13,8 +11,6 @@ export interface ChangeStatistic { ratio?: number; } -// Warning: (ae-missing-release-tag) "ChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ChartData = { date: number; @@ -23,8 +19,6 @@ export type ChartData = { [key: string]: number; }; -// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Cost { // (undocumented) @@ -39,8 +33,6 @@ export interface Cost { trendline?: Trendline; } -// Warning: (ae-missing-release-tag) "Currency" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Currency { // (undocumented) @@ -55,16 +47,12 @@ export interface Currency { unit: string; } -// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type DateAggregation = { date: string; amount: number; }; -// Warning: (ae-missing-release-tag) "Duration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export enum Duration { // (undocumented) @@ -77,9 +65,7 @@ export enum Duration { P90D = 'P90D', } -// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export interface Entity { // (undocumented) aggregation: [number, number]; @@ -91,20 +77,14 @@ export interface Entity { id: Maybe; } -// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Group = { id: string; }; -// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Maybe = T | null; -// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Metric = { kind: string; @@ -112,8 +92,6 @@ export type Metric = { default: boolean; }; -// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface MetricData { // (undocumented) @@ -126,8 +104,6 @@ export interface MetricData { id: string; } -// Warning: (ae-missing-release-tag) "PageFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PageFilters { // (undocumented) @@ -140,8 +116,6 @@ export interface PageFilters { project: Maybe; } -// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Product { // (undocumented) @@ -150,13 +124,9 @@ export interface Product { name: string; } -// Warning: (ae-missing-release-tag) "ProductFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ProductFilters = Array; -// Warning: (ae-missing-release-tag) "ProductPeriod" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ProductPeriod { // (undocumented) @@ -165,8 +135,6 @@ export interface ProductPeriod { productType: string; } -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Project { // (undocumented) @@ -175,8 +143,6 @@ export interface Project { name?: string; } -// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Trendline = { slope: number; diff --git a/plugins/cost-insights-common/src/types/ChangeStatistic.ts b/plugins/cost-insights-common/src/types/ChangeStatistic.ts index 079d9bcb07..29be6e9367 100644 --- a/plugins/cost-insights-common/src/types/ChangeStatistic.ts +++ b/plugins/cost-insights-common/src/types/ChangeStatistic.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export interface ChangeStatistic { // The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum // If a ratio cannot be calculated - such as when a new or old sum is zero, diff --git a/plugins/cost-insights-common/src/types/ChartData.ts b/plugins/cost-insights-common/src/types/ChartData.ts index 9de8af496d..f4ae204a22 100644 --- a/plugins/cost-insights-common/src/types/ChartData.ts +++ b/plugins/cost-insights-common/src/types/ChartData.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export type ChartData = { date: number; trend: number; diff --git a/plugins/cost-insights-common/src/types/Cost.ts b/plugins/cost-insights-common/src/types/Cost.ts index 2ae4755bc7..90ccbe17c0 100644 --- a/plugins/cost-insights-common/src/types/Cost.ts +++ b/plugins/cost-insights-common/src/types/Cost.ts @@ -18,6 +18,9 @@ import { DateAggregation } from './DateAggregation'; import { ChangeStatistic } from './ChangeStatistic'; import { Trendline } from './Trendline'; +/** + * @public + */ export interface Cost { id: string; aggregation: DateAggregation[]; diff --git a/plugins/cost-insights-common/src/types/Currency.ts b/plugins/cost-insights-common/src/types/Currency.ts index e82f0c9a52..4bd1490a69 100644 --- a/plugins/cost-insights-common/src/types/Currency.ts +++ b/plugins/cost-insights-common/src/types/Currency.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export interface Currency { kind: string | null; label: string; diff --git a/plugins/cost-insights-common/src/types/DateAggregation.ts b/plugins/cost-insights-common/src/types/DateAggregation.ts index 72a2514006..4faed85241 100644 --- a/plugins/cost-insights-common/src/types/DateAggregation.ts +++ b/plugins/cost-insights-common/src/types/DateAggregation.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export type DateAggregation = { date: string; // YYYY-MM-DD amount: number; diff --git a/plugins/cost-insights-common/src/types/Duration.ts b/plugins/cost-insights-common/src/types/Duration.ts index 25806a3346..3a4c7a3a9f 100644 --- a/plugins/cost-insights-common/src/types/Duration.ts +++ b/plugins/cost-insights-common/src/types/Duration.ts @@ -19,6 +19,7 @@ * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - * September 15. + * @public */ export enum Duration { P7D = 'P7D', diff --git a/plugins/cost-insights-common/src/types/Entity.ts b/plugins/cost-insights-common/src/types/Entity.ts index ccfea6667e..9a6d6746aa 100644 --- a/plugins/cost-insights-common/src/types/Entity.ts +++ b/plugins/cost-insights-common/src/types/Entity.ts @@ -17,102 +17,108 @@ import { ChangeStatistic } from './ChangeStatistic'; import { Maybe } from './Maybe'; +/** + * + * An entity is a tree-like structure that represents any unique + * product or service that generates cost over a fixed period of time. + * An entity could be atomic or composite. An atomic entity is indivisible + * and cannot be broken into sub-entities. + * + * A composite entity is divided into sub-entities that account for portions + * of the total cost **over the same time period**. The root entity is + * expected to only have _one_ Record consisting of the sub-entities to display + * in the product panel (keyed by the entity type, such as "service" for + * compute entities). + * + * The root sub-entities may have multiple breakdowns - for example, a + * breakdown of an entity cost by SKU vs deployment environment. The sum + * aggregated cost of each keyed breakdown should equal the sub-entity's cost. + * + * Entities with null ids are considered "unlabeled" - costs without attribution. + * If an entity is a composite, it may only have one (1) null child but may have any number of + * null grandchildren. + * + * @public + * + * @example + * Here's an example composite entity: + * ``` + * const compositeEntity = { + * id: 'product', + * aggregation: [0, 200], + * change: { + * ratio: 2000, + * amount: 200 + * }, + * entities: { + * service: [ + * { + * id: 'service-a', + * aggregation: [0, 100], + * change: { + * ratio: 100, + * amount: 100 + * }, + * entities: {} + * }, + * { + * id: 'service-b', + * aggregation: [0, 100], + * change: { + * ratio: 100, + * amount: 100 + * }, + * entities: { + * SKU: [ + * { + * id: 'service-b-sku-a', + * aggregation: [0, 25], + * change: { + * ratio: 25, + * amount: 25 + * }, + * entities: {} + * }, + * { + * id: null, // Unlabeled cost for service-b + * aggregation: [0, 75], + * change: { + * ratio: 75, + * amount: 75 + * }, + * entities: {} + * }, + * ], + * deployment: [ + * { + * id: 'service-b-env-a', + * aggregation: [0, 50], + * change: { + * ratio: 50, + * amount: 50 + * }, + * entities: {} + * }, + * { + * id: 'service-b-env-b', + * aggregation: [0, 50], + * change: { + * ratio: 50, + * amount: 50 + * }, + * entities: {} + * }, + * ] + * } + * }, + * ] + * } + * } + * ``` + */ export interface Entity { id: Maybe; aggregation: [number, number]; entities: Record; change: ChangeStatistic; } - -/* - An entity is a tree-like structure that represents any unique - product or service that generates cost over a fixed period of time. - An entity could be atomic or composite. An atomic entity is indivisible - and cannot be broken into sub-entities. - - A composite entity is divided into sub-entities that account for portions - of the total cost **over the same time period**. The root entity is - expected to only have _one_ Record consisting of the sub-entities to display - in the product panel (keyed by the entity type, such as "service" for - compute entities). - - The root sub-entities may have multiple breakdowns - for example, a - breakdown of an entity cost by SKU vs deployment environment. The sum - aggregated cost of each keyed breakdown should equal the sub-entity's cost. - - Entities with null ids are considered "unlabeled" - costs without attribution. - If an entity is a composite, it may only have one (1) null child but may have any number of - null grandchildren. - - { - id: 'product', - aggregation: [0, 200], - change: { - ratio: 2000, - amount: 200 - }, - entities: { - service: [ - { - id: 'service-a', - aggregation: [0, 100], - change: { - ratio: 100, - amount: 100 - }, - entities: {} - }, - { - id: 'service-b', - aggregation: [0, 100], - change: { - ratio: 100, - amount: 100 - }, - entities: { - SKU: [ - { - id: 'service-b-sku-a', - aggregation: [0, 25], - change: { - ratio: 25, - amount: 25 - }, - entities: {} - }, - { - id: null, // Unlabeled cost for service-b - aggregation: [0, 75], - change: { - ratio: 75, - amount: 75 - }, - entities: {} - }, - ], - deployment: [ - { - id: 'service-b-env-a', - aggregation: [0, 50], - change: { - ratio: 50, - amount: 50 - }, - entities: {} - }, - { - id: 'service-b-env-b', - aggregation: [0, 50], - change: { - ratio: 50, - amount: 50 - }, - entities: {} - }, - ] - } - }, - ] - } - } -*/ diff --git a/plugins/cost-insights-common/src/types/Filters.ts b/plugins/cost-insights-common/src/types/Filters.ts index 6beef5cacc..67cbb6ce2f 100644 --- a/plugins/cost-insights-common/src/types/Filters.ts +++ b/plugins/cost-insights-common/src/types/Filters.ts @@ -17,6 +17,9 @@ import { Maybe } from './Maybe'; import { Duration } from './Duration'; +/** + * @public + */ export interface PageFilters { group: Maybe; project: Maybe; @@ -24,8 +27,14 @@ export interface PageFilters { metric: string | null; } +/** + * @public + */ export type ProductFilters = Array; +/** + * @public + */ export interface ProductPeriod { duration: Duration; productType: string; diff --git a/plugins/cost-insights-common/src/types/Group.ts b/plugins/cost-insights-common/src/types/Group.ts index 8e0c768924..b34cac083f 100644 --- a/plugins/cost-insights-common/src/types/Group.ts +++ b/plugins/cost-insights-common/src/types/Group.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export type Group = { id: string; }; diff --git a/plugins/cost-insights-common/src/types/Maybe.ts b/plugins/cost-insights-common/src/types/Maybe.ts index 461c31f6a5..824c64c334 100644 --- a/plugins/cost-insights-common/src/types/Maybe.ts +++ b/plugins/cost-insights-common/src/types/Maybe.ts @@ -14,4 +14,7 @@ * limitations under the License. */ +/** + * @public + */ export type Maybe = T | null; diff --git a/plugins/cost-insights-common/src/types/Metric.ts b/plugins/cost-insights-common/src/types/Metric.ts index 107513b80d..901d40f106 100644 --- a/plugins/cost-insights-common/src/types/Metric.ts +++ b/plugins/cost-insights-common/src/types/Metric.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export type Metric = { kind: string; name: string; diff --git a/plugins/cost-insights-common/src/types/MetricData.ts b/plugins/cost-insights-common/src/types/MetricData.ts index 225da185f8..56742e76e9 100644 --- a/plugins/cost-insights-common/src/types/MetricData.ts +++ b/plugins/cost-insights-common/src/types/MetricData.ts @@ -17,6 +17,9 @@ import { DateAggregation } from './DateAggregation'; import { ChangeStatistic } from './ChangeStatistic'; +/** + * @public + */ export interface MetricData { id: string; format: 'number' | 'currency'; diff --git a/plugins/cost-insights-common/src/types/Product.ts b/plugins/cost-insights-common/src/types/Product.ts index 9920841223..7ed49c18da 100644 --- a/plugins/cost-insights-common/src/types/Product.ts +++ b/plugins/cost-insights-common/src/types/Product.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export interface Product { kind: string; name: string; diff --git a/plugins/cost-insights-common/src/types/Project.ts b/plugins/cost-insights-common/src/types/Project.ts index c12a3f1fa2..6cad92ed46 100644 --- a/plugins/cost-insights-common/src/types/Project.ts +++ b/plugins/cost-insights-common/src/types/Project.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +/** + * @public + */ export interface Project { id: string; name?: string; diff --git a/plugins/cost-insights-common/src/types/Trendline.ts b/plugins/cost-insights-common/src/types/Trendline.ts index 64405678f1..3a7e372880 100644 --- a/plugins/cost-insights-common/src/types/Trendline.ts +++ b/plugins/cost-insights-common/src/types/Trendline.ts @@ -13,6 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @public + */ export type Trendline = { slope: number; intercept: number; From 81dd5ea9890609131719263a907b32551d8e801d Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 09:44:07 -0400 Subject: [PATCH 203/212] add changeset for new cost-insights-common package Signed-off-by: Andrew Thauer --- .changeset/light-hornets-eat.md | 5 +++++ plugins/cost-insights-common/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/light-hornets-eat.md diff --git a/.changeset/light-hornets-eat.md b/.changeset/light-hornets-eat.md new file mode 100644 index 0000000000..795e51fb67 --- /dev/null +++ b/.changeset/light-hornets-eat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights-common': minor +--- + +Introduces a new isomorphic @backstage/plugin-cost-insight-common package to contain shared types across all other cost insights packages and modules. diff --git a/plugins/cost-insights-common/package.json b/plugins/cost-insights-common/package.json index e950063efb..c15f063fd2 100644 --- a/plugins/cost-insights-common/package.json +++ b/plugins/cost-insights-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights-common", "description": "Common functionalities for the cost-insights plugin", - "version": "0.0.1", + "version": "0.0.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", From c380ea795eb3876a6b50ce602f33dc1065bc578f Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 10:25:59 -0400 Subject: [PATCH 204/212] update cost-insights api docs Signed-off-by: Andrew Thauer --- plugins/cost-insights-common/api-report.md | 2 -- .../src/types/ChangeStatistic.ts | 13 +++++++++---- .../src/types/DateAggregation.ts | 7 ++++++- plugins/cost-insights-common/src/types/Duration.ts | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/plugins/cost-insights-common/api-report.md b/plugins/cost-insights-common/api-report.md index daf8f5767d..1f54bece3e 100644 --- a/plugins/cost-insights-common/api-report.md +++ b/plugins/cost-insights-common/api-report.md @@ -5,9 +5,7 @@ ```ts // @public (undocumented) export interface ChangeStatistic { - // (undocumented) amount: number; - // (undocumented) ratio?: number; } diff --git a/plugins/cost-insights-common/src/types/ChangeStatistic.ts b/plugins/cost-insights-common/src/types/ChangeStatistic.ts index 29be6e9367..8d64fb47f9 100644 --- a/plugins/cost-insights-common/src/types/ChangeStatistic.ts +++ b/plugins/cost-insights-common/src/types/ChangeStatistic.ts @@ -18,10 +18,15 @@ * @public */ export interface ChangeStatistic { - // The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum - // If a ratio cannot be calculated - such as when a new or old sum is zero, - // the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount. + /** + * The ratio of change from one duration to another, expressed as: (newSum - oldSum) / oldSum + * If a ratio cannot be calculated - such as when a new or old sum is zero, + * the ratio can be omitted and where applicable, ∞ or -∞ will display based on amount. + */ ratio?: number; - // The actual USD change between time periods (can be negative if costs decreased) + + /** + * The actual USD change between time periods (can be negative if costs decreased) + */ amount: number; } diff --git a/plugins/cost-insights-common/src/types/DateAggregation.ts b/plugins/cost-insights-common/src/types/DateAggregation.ts index 4faed85241..edc867a7bf 100644 --- a/plugins/cost-insights-common/src/types/DateAggregation.ts +++ b/plugins/cost-insights-common/src/types/DateAggregation.ts @@ -18,6 +18,11 @@ * @public */ export type DateAggregation = { - date: string; // YYYY-MM-DD + /** + * The date aggregation as string. + * @example YYYY-MM-DD + */ + date: string; + amount: number; }; diff --git a/plugins/cost-insights-common/src/types/Duration.ts b/plugins/cost-insights-common/src/types/Duration.ts index 3a4c7a3a9f..dbb226df24 100644 --- a/plugins/cost-insights-common/src/types/Duration.ts +++ b/plugins/cost-insights-common/src/types/Duration.ts @@ -19,6 +19,7 @@ * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - * September 15. + * * @public */ export enum Duration { From 66ef0326315b90b75a4b64a971478b1c555ec5c0 Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 14:21:35 -0400 Subject: [PATCH 205/212] move frontend types back into cost-insights Signed-off-by: Andrew Thauer --- .../cost-insights-common/src/types/index.ts | 4 --- plugins/cost-insights/package.json | 2 +- plugins/cost-insights/src/types/Alert.ts | 7 ++--- .../src/types/ChartData.ts | 0 plugins/cost-insights/src/types/Currency.ts | 14 +++++---- .../src/types/CurrencyType.ts} | 14 ++++----- .../src/types/DateFormat.ts} | 15 +--------- plugins/cost-insights/src/types/Duration.ts | 15 +++++++++- .../src/types/Filters.ts | 2 +- plugins/cost-insights/src/types/index.ts | 29 +++++++++++++++++-- 10 files changed, 60 insertions(+), 42 deletions(-) rename plugins/{cost-insights-common => cost-insights}/src/types/ChartData.ts (100%) rename plugins/{cost-insights-common/src/types/Currency.ts => cost-insights/src/types/CurrencyType.ts} (81%) rename plugins/{cost-insights-common/src/types/Duration.ts => cost-insights/src/types/DateFormat.ts} (60%) rename plugins/{cost-insights-common => cost-insights}/src/types/Filters.ts (93%) diff --git a/plugins/cost-insights-common/src/types/index.ts b/plugins/cost-insights-common/src/types/index.ts index 877ace8f5f..86e7af33aa 100644 --- a/plugins/cost-insights-common/src/types/index.ts +++ b/plugins/cost-insights-common/src/types/index.ts @@ -15,13 +15,9 @@ */ export * from './ChangeStatistic'; -export * from './ChartData'; export * from './Cost'; export * from './DateAggregation'; -export * from './Duration'; -export * from './Currency'; export * from './Entity'; -export * from './Filters'; export * from './Group'; export * from './Maybe'; export * from './MetricData'; diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 4801a2002b..d7a04eddbc 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -38,7 +38,7 @@ "@backstage/config": "^1.0.1", "@backstage/core-components": "^0.9.6-next.1", "@backstage/core-plugin-api": "^1.0.3", - "@backstage/plugin-cost-insights-common": "^0.0.1", + "@backstage/plugin-cost-insights-common": "^0.0.0", "@backstage/theme": "^0.2.16-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", diff --git a/plugins/cost-insights/src/types/Alert.ts b/plugins/cost-insights/src/types/Alert.ts index a04becada1..483b9a654d 100644 --- a/plugins/cost-insights/src/types/Alert.ts +++ b/plugins/cost-insights/src/types/Alert.ts @@ -15,11 +15,8 @@ */ import { ForwardRefExoticComponent, RefAttributes } from 'react'; -import { - ChangeStatistic, - Duration, - Maybe, -} from '@backstage/plugin-cost-insights-common'; +import { ChangeStatistic, Maybe } from '@backstage/plugin-cost-insights-common'; +import { Duration } from './Duration'; /** * Generic alert type with required fields for display. The `element` field will be rendered in diff --git a/plugins/cost-insights-common/src/types/ChartData.ts b/plugins/cost-insights/src/types/ChartData.ts similarity index 100% rename from plugins/cost-insights-common/src/types/ChartData.ts rename to plugins/cost-insights/src/types/ChartData.ts diff --git a/plugins/cost-insights/src/types/Currency.ts b/plugins/cost-insights/src/types/Currency.ts index 0316e8f90e..4bd1490a69 100644 --- a/plugins/cost-insights/src/types/Currency.ts +++ b/plugins/cost-insights/src/types/Currency.ts @@ -14,9 +14,13 @@ * limitations under the License. */ -export enum CurrencyType { - USD = 'USD', - CarbonOffsetTons = 'CARBON_OFFSET_TONS', - Beers = 'BEERS', - IceCream = 'PINTS_OF_ICE_CREAM', +/** + * @public + */ +export interface Currency { + kind: string | null; + label: string; + unit: string; + prefix?: string; + rate?: number; } diff --git a/plugins/cost-insights-common/src/types/Currency.ts b/plugins/cost-insights/src/types/CurrencyType.ts similarity index 81% rename from plugins/cost-insights-common/src/types/Currency.ts rename to plugins/cost-insights/src/types/CurrencyType.ts index 4bd1490a69..0316e8f90e 100644 --- a/plugins/cost-insights-common/src/types/Currency.ts +++ b/plugins/cost-insights/src/types/CurrencyType.ts @@ -14,13 +14,9 @@ * limitations under the License. */ -/** - * @public - */ -export interface Currency { - kind: string | null; - label: string; - unit: string; - prefix?: string; - rate?: number; +export enum CurrencyType { + USD = 'USD', + CarbonOffsetTons = 'CARBON_OFFSET_TONS', + Beers = 'BEERS', + IceCream = 'PINTS_OF_ICE_CREAM', } diff --git a/plugins/cost-insights-common/src/types/Duration.ts b/plugins/cost-insights/src/types/DateFormat.ts similarity index 60% rename from plugins/cost-insights-common/src/types/Duration.ts rename to plugins/cost-insights/src/types/DateFormat.ts index dbb226df24..c5d9c83f6e 100644 --- a/plugins/cost-insights-common/src/types/Duration.ts +++ b/plugins/cost-insights/src/types/DateFormat.ts @@ -14,17 +14,4 @@ * limitations under the License. */ -/** - * Time periods for cost comparison; slight abuse of ISO 8601 periods. We take P3M to mean - * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if - * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - - * September 15. - * - * @public - */ -export enum Duration { - P7D = 'P7D', - P30D = 'P30D', - P90D = 'P90D', - P3M = 'P3M', -} +export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; diff --git a/plugins/cost-insights/src/types/Duration.ts b/plugins/cost-insights/src/types/Duration.ts index c5d9c83f6e..dbb226df24 100644 --- a/plugins/cost-insights/src/types/Duration.ts +++ b/plugins/cost-insights/src/types/Duration.ts @@ -14,4 +14,17 @@ * limitations under the License. */ -export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; +/** + * Time periods for cost comparison; slight abuse of ISO 8601 periods. We take P3M to mean + * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if + * it's September 15, P3M represents costs for Q2 and P30D represents August 16 - + * September 15. + * + * @public + */ +export enum Duration { + P7D = 'P7D', + P30D = 'P30D', + P90D = 'P90D', + P3M = 'P3M', +} diff --git a/plugins/cost-insights-common/src/types/Filters.ts b/plugins/cost-insights/src/types/Filters.ts similarity index 93% rename from plugins/cost-insights-common/src/types/Filters.ts rename to plugins/cost-insights/src/types/Filters.ts index 67cbb6ce2f..d307243ad0 100644 --- a/plugins/cost-insights-common/src/types/Filters.ts +++ b/plugins/cost-insights/src/types/Filters.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Maybe } from './Maybe'; +import { Maybe } from '@backstage/plugin-cost-insights-common'; import { Duration } from './Duration'; /** diff --git a/plugins/cost-insights/src/types/index.ts b/plugins/cost-insights/src/types/index.ts index b3a06f248d..57711b4eee 100644 --- a/plugins/cost-insights/src/types/index.ts +++ b/plugins/cost-insights/src/types/index.ts @@ -14,15 +14,40 @@ * limitations under the License. */ -// @deprecated - use types from `@backstage/plugin-cost-insights-common` instead. -export * from '@backstage/plugin-cost-insights-common'; +import * as common from '@backstage/plugin-cost-insights-common'; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type ChangeStatistic = common.ChangeStatistic; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Cost = common.Cost; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type DateAggregation = common.DateAggregation; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Entity = common.Entity; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Group = common.Group; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Maybe = common.Maybe; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Metric = common.Metric; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type MetricData = common.MetricData; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Product = common.Product; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Project = common.Project; +/** * @deprecated use the same type from @backstage/plugin-cost-insights-common instead */ +export type Trendline = common.Trendline; // TODO: Split some of these up into `@backstage/plugin-cost-insights-react` for presentation types // and `@backstage/plugin-cost-insights-common` for data transfer object types. export * from './Alert'; export * from './ChangeStatistic'; +export * from './ChartData'; export * from './Currency'; +export * from './CurrencyType'; +export * from './DateFormat'; export * from './Duration'; +export * from './Filters'; export * from './Icon'; export * from './Loading'; export * from './Theme'; From 6f7ef41351a701aa2619dd64fe5390dd2bb54f42 Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 15:38:03 -0400 Subject: [PATCH 206/212] update cost-insights api docs Signed-off-by: Andrew Thauer --- plugins/cost-insights-common/api-report.md | 57 -------- plugins/cost-insights/api-report.md | 153 ++++++++++++++++++--- 2 files changed, 133 insertions(+), 77 deletions(-) diff --git a/plugins/cost-insights-common/api-report.md b/plugins/cost-insights-common/api-report.md index 1f54bece3e..a5f7045854 100644 --- a/plugins/cost-insights-common/api-report.md +++ b/plugins/cost-insights-common/api-report.md @@ -9,14 +9,6 @@ export interface ChangeStatistic { ratio?: number; } -// @public (undocumented) -export type ChartData = { - date: number; - trend: number; - dailyCost: number; - [key: string]: number; -}; - // @public (undocumented) export interface Cost { // (undocumented) @@ -31,38 +23,12 @@ export interface Cost { trendline?: Trendline; } -// @public (undocumented) -export interface Currency { - // (undocumented) - kind: string | null; - // (undocumented) - label: string; - // (undocumented) - prefix?: string; - // (undocumented) - rate?: number; - // (undocumented) - unit: string; -} - // @public (undocumented) export type DateAggregation = { date: string; amount: number; }; -// @public -export enum Duration { - // (undocumented) - P30D = 'P30D', - // (undocumented) - P3M = 'P3M', - // (undocumented) - P7D = 'P7D', - // (undocumented) - P90D = 'P90D', -} - // @public export interface Entity { // (undocumented) @@ -102,18 +68,6 @@ export interface MetricData { id: string; } -// @public (undocumented) -export interface PageFilters { - // (undocumented) - duration: Duration; - // (undocumented) - group: Maybe; - // (undocumented) - metric: string | null; - // (undocumented) - project: Maybe; -} - // @public (undocumented) export interface Product { // (undocumented) @@ -122,17 +76,6 @@ export interface Product { name: string; } -// @public (undocumented) -export type ProductFilters = Array; - -// @public (undocumented) -export interface ProductPeriod { - // (undocumented) - duration: Duration; - // (undocumented) - productType: string; -} - // @public (undocumented) export interface Project { // (undocumented) diff --git a/plugins/cost-insights/api-report.md b/plugins/cost-insights/api-report.md index 8bde5729e7..a646cddeab 100644 --- a/plugins/cost-insights/api-report.md +++ b/plugins/cost-insights/api-report.md @@ -9,21 +9,13 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePalette } from '@backstage/theme'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { BackstageTheme } from '@backstage/theme'; -import { ChangeStatistic } from '@backstage/plugin-cost-insights-common'; +import { ChangeStatistic as ChangeStatistic_2 } from '@backstage/plugin-cost-insights-common'; +import * as common from '@backstage/plugin-cost-insights-common'; import { ContentRenderer } from 'recharts'; -import { Cost } from '@backstage/plugin-cost-insights-common'; -import { Currency } from '@backstage/plugin-cost-insights-common'; import { Dispatch } from 'react'; -import { Duration } from '@backstage/plugin-cost-insights-common'; -import { Entity } from '@backstage/plugin-cost-insights-common'; import { ForwardRefExoticComponent } from 'react'; -import { Group } from '@backstage/plugin-cost-insights-common'; -import { Maybe } from '@backstage/plugin-cost-insights-common'; -import { Metric } from '@backstage/plugin-cost-insights-common'; -import { MetricData } from '@backstage/plugin-cost-insights-common'; +import { Maybe as Maybe_2 } from '@backstage/plugin-cost-insights-common'; import { PaletteOptions } from '@material-ui/core/styles/createPalette'; -import { Product } from '@backstage/plugin-cost-insights-common'; -import { Project } from '@backstage/plugin-cost-insights-common'; import { PropsWithChildren } from 'react'; import { ReactNode } from 'react'; import { RechartsFunction } from 'recharts'; @@ -43,9 +35,9 @@ export type Alert = { status?: AlertStatus; url?: string; buttonText?: string; - SnoozeForm?: Maybe; - AcceptForm?: Maybe; - DismissForm?: Maybe; + SnoozeForm?: Maybe_2; + AcceptForm?: Maybe_2; + DismissForm?: Maybe_2; onSnoozed?(options: AlertOptions): Promise; onAccepted?(options: AlertOptions): Promise; onDismissed?(options: AlertOptions): Promise; @@ -66,9 +58,9 @@ export interface AlertCost { // @public (undocumented) export interface AlertDismissFormData { // (undocumented) - feedback: Maybe; + feedback: Maybe_2; // (undocumented) - other: Maybe; + other: Maybe_2; // (undocumented) reason: AlertDismissReason; } @@ -280,6 +272,12 @@ export type BarChartTooltipProps = { actions?: ReactNode; }; +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type ChangeStatistic = common.ChangeStatistic; + // Warning: (ae-missing-release-tag) "ChangeThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -290,6 +288,20 @@ export enum ChangeThreshold { upper = 0.05, } +// @public (undocumented) +export type ChartData = { + date: number; + trend: number; + dailyCost: number; + [key: string]: number; +}; + +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Cost = common.Cost; + // Warning: (ae-missing-release-tag) "CostGrowth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -398,6 +410,20 @@ export interface CostInsightsThemeOptions extends PaletteOptions { palette: CostInsightsPaletteOptions; } +// @public (undocumented) +export interface Currency { + // (undocumented) + kind: string | null; + // (undocumented) + label: string; + // (undocumented) + prefix?: string; + // (undocumented) + rate?: number; + // (undocumented) + unit: string; +} + // Warning: (ae-missing-release-tag) "CurrencyType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -424,16 +450,40 @@ export enum DataKey { Previous = 'previous', } +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type DateAggregation = common.DateAggregation; + // Warning: (ae-missing-release-tag) "DEFAULT_DATE_FORMAT" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; +// @public +export enum Duration { + // (undocumented) + P30D = 'P30D', + // (undocumented) + P3M = 'P3M', + // (undocumented) + P7D = 'P7D', + // (undocumented) + P90D = 'P90D', +} + // Warning: (ae-missing-release-tag) "EngineerThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const EngineerThreshold = 0.5; +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Entity = common.Entity; + // Warning: (ae-missing-release-tag) "ExampleCostInsightsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -456,6 +506,12 @@ export class ExampleCostInsightsClient implements CostInsightsApi { getUserGroups(userId: string): Promise; } +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Group = common.Group; + // Warning: (ae-missing-release-tag) "GrowthType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -518,6 +574,24 @@ export type LegendItemProps = { // @public (undocumented) export type Loading = Record; +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Maybe = common.Maybe; + +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Metric = common.Metric; + +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type MetricData = common.MetricData; + // Warning: (ae-forgotten-export) The symbol "MockConfigProviderProps" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "MockConfigProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -536,6 +610,27 @@ export const MockCurrencyProvider: ({ ...context }: MockCurrencyProviderProps) => JSX.Element; +// @public (undocumented) +export interface PageFilters { + // (undocumented) + duration: Duration; + // (undocumented) + group: Maybe_2; + // (undocumented) + metric: string | null; + // (undocumented) + project: Maybe_2; +} + +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Product = common.Product; + +// @public (undocumented) +export type ProductFilters = Array; + // Warning: (ae-missing-release-tag) "ProductInsightsOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -546,6 +641,20 @@ export type ProductInsightsOptions = { project: Maybe; }; +// @public (undocumented) +export interface ProductPeriod { + // (undocumented) + duration: Duration; + // (undocumented) + productType: string; +} + +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Project = common.Project; + // Warning: (ae-missing-release-tag) "ProjectGrowthAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public @@ -570,7 +679,7 @@ export interface ProjectGrowthData { // (undocumented) aggregation: [number, number]; // (undocumented) - change: ChangeStatistic; + change: ChangeStatistic_2; // (undocumented) periodEnd: string; // (undocumented) @@ -588,7 +697,7 @@ export interface ResourceData { // (undocumented) current: number; // (undocumented) - name: Maybe; + name: Maybe_2; // (undocumented) previous: number; } @@ -602,6 +711,12 @@ export type TooltipItem = { value: string; }; +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public @deprecated (undocumented) +export type Trendline = common.Trendline; + // Warning: (ae-missing-release-tag) "UnlabeledDataflowAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public @@ -648,6 +763,4 @@ export interface UnlabeledDataflowData { // (undocumented) unlabeledCost: number; } - -export * from '@backstage/plugin-cost-insights-common'; ``` From 7d2f89a1bd431a66b1a507c5808e3a7b982a6bcd Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Thu, 30 Jun 2022 21:22:21 +0200 Subject: [PATCH 207/212] fix(search): when reset page cursor Signed-off-by: Camila Belo --- .../src/context/SearchContext.test.tsx | 74 ++++++++++++------- .../src/context/SearchContext.tsx | 5 +- 2 files changed, 49 insertions(+), 30 deletions(-) diff --git a/plugins/search-react/src/context/SearchContext.test.tsx b/plugins/search-react/src/context/SearchContext.test.tsx index 0272176150..68c79d3a5e 100644 --- a/plugins/search-react/src/context/SearchContext.test.tsx +++ b/plugins/search-react/src/context/SearchContext.test.tsx @@ -108,40 +108,58 @@ describe('SearchContext', () => { expect(result.current).toEqual(expect.objectContaining(initialState)); }); - it('Resets cursor when term is set (and different from previous)', async () => { - const { result, waitForNextUpdate } = renderHook(() => useSearch(), { - wrapper, - initialProps: { - initialState: { - ...initialState, - pageCursor: 'SOMEPAGE', + describe('Resets cursor', () => { + it('When term is cleared', async () => { + const { result, waitForNextUpdate } = renderHook(() => useSearch(), { + wrapper, + initialProps: { + initialState: { + ...initialState, + term: 'first term', + pageCursor: 'SOMEPAGE', + }, }, - }, + }); + + await waitForNextUpdate(); + + expect(result.current.term).toEqual('first term'); + expect(result.current.pageCursor).toEqual('SOMEPAGE'); + + act(() => { + result.current.setTerm(''); + }); + + await waitForNextUpdate(); + + expect(result.current.pageCursor).toBeUndefined(); }); - await waitForNextUpdate(); + it('When term is set (and different from previous)', async () => { + const { result, waitForNextUpdate } = renderHook(() => useSearch(), { + wrapper, + initialProps: { + initialState: { + ...initialState, + term: 'first term', + pageCursor: 'SOMEPAGE', + }, + }, + }); - expect(result.current.pageCursor).toEqual('SOMEPAGE'); + await waitForNextUpdate(); - act(() => { - result.current.setTerm('first term'); + expect(result.current.term).toEqual('first term'); + expect(result.current.pageCursor).toEqual('SOMEPAGE'); + + act(() => { + result.current.setTerm('second term'); + }); + + await waitForNextUpdate(); + + expect(result.current.pageCursor).toBeUndefined(); }); - - act(() => { - result.current.setPageCursor('OTHERPAGE'); - }); - - await waitForNextUpdate(); - - expect(result.current.pageCursor).toEqual('OTHERPAGE'); - - act(() => { - result.current.setTerm('second term'); - }); - - await waitForNextUpdate(); - - expect(result.current.pageCursor).toEqual(undefined); }); describe('Performs search (and sets results)', () => { diff --git a/plugins/search-react/src/context/SearchContext.tsx b/plugins/search-react/src/context/SearchContext.tsx index 8a0f962121..faad50f37a 100644 --- a/plugins/search-react/src/context/SearchContext.tsx +++ b/plugins/search-react/src/context/SearchContext.tsx @@ -150,10 +150,11 @@ export const SearchContextProvider = (props: SearchContextProviderProps) => { useEffect(() => { // Any time a term is reset, we want to start from page 0. - if (term && prevTerm && term !== prevTerm) { + // Only reset the term if it has been modified by the user at least once, the initial state must not reset the term. + if (prevTerm !== undefined && term !== prevTerm) { setPageCursor(undefined); } - }, [term, prevTerm, initialState.pageCursor]); + }, [term, prevTerm, setPageCursor]); const value: SearchContextValue = { result, From 60408ca9d4fc9311747b96e6a77dc065210c5cf0 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Thu, 30 Jun 2022 21:29:53 +0200 Subject: [PATCH 208/212] chore: add changeset file Signed-off-by: Camila Belo --- .changeset/search-boats-double.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/search-boats-double.md diff --git a/.changeset/search-boats-double.md b/.changeset/search-boats-double.md new file mode 100644 index 0000000000..92fd372cb8 --- /dev/null +++ b/.changeset/search-boats-double.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-react': patch +--- + +Fix search pagination to reset page cursor also when a term is cleared. From 227688347385202304aa004165404fee21770053 Mon Sep 17 00:00:00 2001 From: Andrew Thauer Date: Thu, 30 Jun 2022 16:43:29 -0400 Subject: [PATCH 209/212] fix cost-insight contrib doc refs Signed-off-by: Andrew Thauer --- plugins/cost-insights/contrib/aws-cost-explorer-api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/cost-insights/contrib/aws-cost-explorer-api.md b/plugins/cost-insights/contrib/aws-cost-explorer-api.md index caa7b72e10..1e3f4e9de6 100644 --- a/plugins/cost-insights/contrib/aws-cost-explorer-api.md +++ b/plugins/cost-insights/contrib/aws-cost-explorer-api.md @@ -77,7 +77,7 @@ We can use the data provided by the Cost Explorer API to implement CostInsightsA ### 1. [getGroupDailyCost](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts#L93) -The `getGroupDailyCost` method is expected to return daily cost aggregations for a given group and interval time frame as a [`Cost`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Cost.ts). +The `getGroupDailyCost` method is expected to return daily cost aggregations for a given group and interval time frame as a [`Cost`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights-common/src/types/Cost.ts). #### Total Daily cost @@ -208,13 +208,13 @@ Sample `groupedCosts` based on the response: ### 2. [getProjectDailyCost](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts#L111) -The `getProjectDailyCost` method is expected to return daily cost aggregations for a given billing entity and interval time frame as a [`Cost`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Cost.ts). +The `getProjectDailyCost` method is expected to return daily cost aggregations for a given billing entity and interval time frame as a [`Cost`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights-common/src/types/Cost.ts). This should be similar to the `getGroupDailyCost` method implementation, but with an updated `LINKED_ACCOUNT` filter to get narrower cost data for a lower-level linked account. ### 3. [getProductInsights](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts#L111) -The `getProductInsights` method is expected to return cost aggregations for a particular cloud product and interval time frame as an [`Entity`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Entity.ts). +The `getProductInsights` method is expected to return cost aggregations for a particular cloud product and interval time frame as an [`Entity`](https://github.com/backstage/backstage/blob/master/plugins/cost-insights-common/src/types/Entity.ts). #### Cloud product cost by resource From b32758297e0a73b4070451c39db07977e9a9fb24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 21:38:15 +0000 Subject: [PATCH 210/212] fix(deps): update dependency @react-hookz/web to v14.7.0 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d65223713f..7346c00a19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5263,9 +5263,9 @@ "@react-hookz/deep-equal" "^1.0.1" "@react-hookz/web@^14.0.0": - version "14.6.0" - resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.6.0.tgz#8b3824841ee679b23516aa9b316e819e55590a1c" - integrity sha512-4ZQU4wsNd4QsMe4LkF9t1y4NS2cCp1N/JfG9TYw1dsWLOJhZ0w+4ebp7cydN5BLeceIaILcfQ7fBYUvrBJN6EA== + version "14.7.0" + resolved "https://registry.npmjs.org/@react-hookz/web/-/web-14.7.0.tgz#3154b7cf38bf464e7b60417eae7f3348ce19e6f6" + integrity sha512-9AN0W3QH3Aj5/LXHKy2XiysjgvaNRLQwEVyCaU3AOMW9c1XlL5hSYc67ExubmzQRw2kAYx2Jpgl8wKCIINxsxQ== dependencies: "@react-hookz/deep-equal" "^1.0.2" From b84d745e1699ad22cdbda1b5528cf53665ce074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 1 Jul 2022 10:23:02 +0200 Subject: [PATCH 211/212] impure lockfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4082736f9c..26f0069db3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6787,7 +6787,7 @@ resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@*", "@types/react-dom@<18.0.0": +"@types/react-dom@*", "@types/react-dom@<18.0.0", "@types/react-dom@^17": version "17.0.17" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1" integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg== @@ -26313,7 +26313,7 @@ ws@^7.3.1, ws@^7.4.6: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^8.3.0: +ws@^8.0.0, ws@^8.3.0: version "8.8.0" resolved "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== From 03de4ce96198ecca6fcfd17f948493bd158e7b51 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 09:12:50 +0000 Subject: [PATCH 212/212] fix(deps): update dependency @graphql-tools/schema to v8.5.0 Signed-off-by: Renovate Bot --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 75721232fb..7e4eda9c3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6787,7 +6787,7 @@ resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@*", "@types/react-dom@<18.0.0": +"@types/react-dom@*", "@types/react-dom@<18.0.0", "@types/react-dom@^17": version "17.0.17" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1" integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg== @@ -26313,7 +26313,7 @@ ws@^7.3.1, ws@^7.4.6: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^8.3.0: +ws@^8.0.0, ws@^8.3.0: version "8.8.0" resolved "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==