diff --git a/.changeset/afraid-radios-boil.md b/.changeset/afraid-radios-boil.md new file mode 100644 index 0000000000..a9533d55c0 --- /dev/null +++ b/.changeset/afraid-radios-boil.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-msgraph': patch +--- + +Fixed a bug in the `MicrosoftGraphEntityProvider` that ignored the `userExpand` and `groupExpand` configuration parameters diff --git a/.changeset/beige-monkeys-add.md b/.changeset/beige-monkeys-add.md new file mode 100644 index 0000000000..ee54e4d090 --- /dev/null +++ b/.changeset/beige-monkeys-add.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': patch +--- + +Workaround support for `swc` instead of `sucrase` diff --git a/.changeset/big-dolls-reflect.md b/.changeset/big-dolls-reflect.md new file mode 100644 index 0000000000..e57fb74e09 --- /dev/null +++ b/.changeset/big-dolls-reflect.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-auth-node': patch +'@backstage/plugin-permission-node': patch +--- + +Minor update to tests diff --git a/.changeset/blue-snakes-compete.md b/.changeset/blue-snakes-compete.md new file mode 100644 index 0000000000..73054554b1 --- /dev/null +++ b/.changeset/blue-snakes-compete.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr-backend': patch +--- + +Continue processing subsequent entities when an error occurs in collator diff --git a/.changeset/curly-hounds-wait.md b/.changeset/curly-hounds-wait.md new file mode 100644 index 0000000000..58ebfe89a3 --- /dev/null +++ b/.changeset/curly-hounds-wait.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-stack-overflow-backend': patch +--- + +Now requests all questions available using pagination. Default max page is set to 100, with a configurable `maxPage` option on the collator. diff --git a/.changeset/dry-games-end.md b/.changeset/dry-games-end.md new file mode 100644 index 0000000000..dc2f86ee10 --- /dev/null +++ b/.changeset/dry-games-end.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Fix bug with empty strings in `EntityPicker` diff --git a/.changeset/famous-wombats-happen.md b/.changeset/famous-wombats-happen.md new file mode 100644 index 0000000000..9d8a2f0b0e --- /dev/null +++ b/.changeset/famous-wombats-happen.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-techdocs': patch +--- + +Internal refactor to use more type safe code when dealing with route parameters. diff --git a/.changeset/funny-years-speak.md b/.changeset/funny-years-speak.md new file mode 100644 index 0000000000..b82c10a59f --- /dev/null +++ b/.changeset/funny-years-speak.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Removed the previously deprecated class `AtlassianAuthProvider`. Please use `providers.atlassian.create(...)` instead. diff --git a/.changeset/large-eagles-shop.md b/.changeset/large-eagles-shop.md new file mode 100644 index 0000000000..bd5bd2e28d --- /dev/null +++ b/.changeset/large-eagles-shop.md @@ -0,0 +1,10 @@ +--- +'@backstage/plugin-airbrake-backend': patch +'@backstage/plugin-catalog-backend-module-bitbucket-server': patch +'@backstage/plugin-dynatrace': patch +'@backstage/plugin-periskop-backend': patch +'@backstage/plugin-stack-overflow-backend': patch +'@backstage/plugin-vault-backend': patch +--- + +Switched to using node-fetch instead of cross-fetch as is standard for our backend packages diff --git a/.changeset/loud-comics-search.md b/.changeset/loud-comics-search.md new file mode 100644 index 0000000000..27f5b3c5d9 --- /dev/null +++ b/.changeset/loud-comics-search.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-tech-insights': minor +--- + +Added the possibility to display check results of different types on a single scorecard. + +- **BREAKING** Removed the `getScorecardsDefinition` method from the `TechInsightsApi` interface. Added the `getCheckResultRenderers` method that returns rendering components for given types. +- **BREAKING** The `CheckResultRenderer` type now exposes the `component` factory method that creates a React component used to display a result of a provided check result. +- The `TechInsightsClient` constructor accepts now the optional `renderers` parameter that can be used to inject a custom renderer. +- **BREAKING** The `title` parameter in the `EntityTechInsightsScorecardContent` and `EntityTechInsightsScorecardCard` components is now mandatory. +- The `jsonRulesEngineCheckResultRenderer` used to render `json-rules-engine` check results is exported. +- The `BooleanCheck` component that can be used to render other check results types is also exported. + +If you were overriding the `getScorecardsDefinition` method to adjust the rendering of check results, you should now provide a custom renderer using `renderers` parameter in the `TechInsightsClient` class. + +See the [README](https://github.com/backstage/backstage/tree/master/plugins/tech-insights/README.md) for more details. diff --git a/.changeset/metal-crabs-wash.md b/.changeset/metal-crabs-wash.md new file mode 100644 index 0000000000..6ecb50ef67 --- /dev/null +++ b/.changeset/metal-crabs-wash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Renamed the `RedirectInfo` type to `OAuthStartResponse` diff --git a/.changeset/nervous-rivers-sneeze.md b/.changeset/nervous-rivers-sneeze.md new file mode 100644 index 0000000000..534dbb4a1a --- /dev/null +++ b/.changeset/nervous-rivers-sneeze.md @@ -0,0 +1,63 @@ +--- +'@backstage/cli': patch +--- + +Switch out `sucrase` for `swc` for transpilation. + +`sucrase` is a little more relaxed when it comes to supporting the ways of mocking in `jest`. You might have to make some changes to your tests to meet the `jest` standard and spec if your tests seems to start failing. + +Mocks that look like this are invalid, and they will throw a reference error in line with the `jest` documentation [here on example 3](https://jestjs.io/docs/es6-class-mocks#calling-jestmock-with-the-module-factory-parameter) + +```ts +const mockCommandExists = jest.fn(); +jest.mock('command-exists', () => mockCommandExists); +``` + +You might need to update these mocks to look a little like the following to defer the call to the `jest.fn()` spy until the mock is called. + +```ts +const mockCommandExists = jest.fn(); +jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), +); +``` + +Also, imports are immutable. So it means that you might get some errors when trying to use `jest.spyOn` with starred imports. You might see an error like this: + +```log +TypeError: Cannot redefine property: executeFrameHandlerStrategy + at Function.defineProperty () + + 20 | import { AuthResolverContext } from '../types'; + 21 | + > 22 | const mockFrameHandler = jest.spyOn( + | ^ + 23 | helpers, + 24 | 'executeFrameHandlerStrategy', + 25 | ) as unknown as jest.MockedFunction< +``` + +This happens when you try to do `import * as something from './something'` and then `jest.spyOn(something, 'test)`. You will need to add a `jest.mock` call to mock out the required starred import to return `jest.fn()` functions from the start. Something like this fixes the above test: + +```ts +jest.mock('../../helpers', () => ({ + executeFrameHandlerStrategy: jest.fn(), +})); +``` + +You can also remove any occurrence of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI. + +**Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`. + +```json +"jest": { + "transform": { + "\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js", + "\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js", + "\\.(yaml)$": "jest-transform-yaml" + } +} +``` diff --git a/.changeset/pre.json b/.changeset/pre.json index 172b96d8f6..a2f1d9f8e8 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -171,5 +171,45 @@ "@backstage/plugin-vault-backend": "0.2.1", "@backstage/plugin-xcmetrics": "0.2.28" }, - "changesets": [] + "changesets": [ + "beige-monkeys-add", + "beige-pumas-tap", + "clever-beans-turn", + "cold-frogs-kiss", + "dry-games-end", + "eight-spies-protect", + "five-carrots-pay", + "fresh-rabbits-juggle", + "gorgeous-swans-kiss", + "happy-kiwis-look", + "hot-files-begin", + "hot-suits-glow", + "hungry-dogs-agree", + "lazy-snakes-film", + "light-beans-share", + "lucky-points-wash", + "nervous-rivers-sneeze", + "old-tables-joke", + "renovate-7d3b357", + "renovate-c98c336", + "rotten-books-crash", + "rude-books-rush", + "shaggy-chicken-behave", + "sharp-swans-suffer", + "shiny-lobsters-fix", + "silent-kings-live", + "slimy-zebras-reply", + "spicy-cherries-remember", + "strong-games-kiss", + "strong-planes-return", + "tame-papayas-protect", + "techdocs-jeans-wait", + "tiny-oranges-thank", + "tough-dolphins-smile", + "two-planets-provide", + "weak-yaks-learn", + "wild-sheep-roll", + "witty-cats-wink", + "young-trees-rescue" + ] } diff --git a/.changeset/red-numbers-suffer.md b/.changeset/red-numbers-suffer.md new file mode 100644 index 0000000000..c1baae1e92 --- /dev/null +++ b/.changeset/red-numbers-suffer.md @@ -0,0 +1,44 @@ +--- +'@backstage/plugin-allure': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-auth-backend': patch +'@backstage/plugin-bitrise': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-catalog-graphql': patch +'@backstage/plugin-cicd-statistics': patch +'@backstage/plugin-circleci': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-code-climate': patch +'@backstage/plugin-config-schema': patch +'@backstage/plugin-cost-insights': patch +'@backstage/plugin-dynatrace': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-explore-react': patch +'@backstage/plugin-firehydrant': patch +'@backstage/plugin-gcalendar': patch +'@backstage/plugin-gcp-projects': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-github-deployments': patch +'@backstage/plugin-github-pull-requests-board': patch +'@backstage/plugin-gitops-profiles': patch +'@backstage/plugin-graphql-backend': patch +'@backstage/plugin-home': patch +'@backstage/plugin-ilert': patch +'@backstage/plugin-jenkins-backend': patch +'@backstage/plugin-kubernetes-common': patch +'@backstage/plugin-newrelic': patch +'@backstage/plugin-newrelic-dashboard': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-rollbar': patch +'@backstage/plugin-rollbar-backend': patch +'@backstage/plugin-search-backend-module-pg': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-shortcuts': patch +'@backstage/plugin-splunk-on-call': patch +'@backstage/plugin-tech-radar': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-xcmetrics': patch +--- + +Minor API signatures cleanup diff --git a/.changeset/renovate-f18a0fc.md b/.changeset/renovate-f18a0fc.md new file mode 100644 index 0000000000..6f17cb8c0f --- /dev/null +++ b/.changeset/renovate-f18a0fc.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Updated dependency `@types/minimatch` to `^5.0.0`. diff --git a/.changeset/rich-cooks-camp.md b/.changeset/rich-cooks-camp.md new file mode 100644 index 0000000000..04d86033f7 --- /dev/null +++ b/.changeset/rich-cooks-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Cloudflare Access Provider: Add JWT to CloudflareAccessResult diff --git a/.changeset/rich-melons-compete.md b/.changeset/rich-melons-compete.md new file mode 100644 index 0000000000..68297159f7 --- /dev/null +++ b/.changeset/rich-melons-compete.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-gcalendar': patch +--- + +Upgrade `react-query:3` to `@tanstack/react-query:4` diff --git a/.changeset/rotten-books-crash.md b/.changeset/rotten-books-crash.md new file mode 100644 index 0000000000..b0c020a743 --- /dev/null +++ b/.changeset/rotten-books-crash.md @@ -0,0 +1,5 @@ +--- +'@backstage/dev-utils': patch +--- + +Removed the dependency and setup of `react-hot-loader`, since the `@backstage/cli` now uses `swc` with `React Refresh` instead. diff --git a/.changeset/shaggy-chicken-behave.md b/.changeset/shaggy-chicken-behave.md new file mode 100644 index 0000000000..41445b0930 --- /dev/null +++ b/.changeset/shaggy-chicken-behave.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +'@backstage/plugin-scaffolder-common': minor +--- + +add entity metadata to the template info type diff --git a/.changeset/small-lemons-brake.md b/.changeset/small-lemons-brake.md new file mode 100644 index 0000000000..ac7906fc28 --- /dev/null +++ b/.changeset/small-lemons-brake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Include entity ref into error message when catalog policies fail diff --git a/.changeset/small-walls-promise.md b/.changeset/small-walls-promise.md new file mode 100644 index 0000000000..0455b0d776 --- /dev/null +++ b/.changeset/small-walls-promise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +--- + +Changed the description of the `techdocsAnnotationFactName` fact. diff --git a/.changeset/strong-planes-return.md b/.changeset/strong-planes-return.md new file mode 100644 index 0000000000..5b5648528a --- /dev/null +++ b/.changeset/strong-planes-return.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +'@backstage/plugin-tech-insights-node': patch +--- + +Support for timeout in FactRetrieverRegistrationOptions diff --git a/.changeset/tender-ladybugs-relax.md b/.changeset/tender-ladybugs-relax.md new file mode 100644 index 0000000000..2aefa09dc0 --- /dev/null +++ b/.changeset/tender-ladybugs-relax.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-stack-overflow': patch +--- + +Support showing HTML entity references from the API response before rendering the question title to the list component. diff --git a/.changeset/tiny-oranges-thank.md b/.changeset/tiny-oranges-thank.md new file mode 100644 index 0000000000..179aeea1c4 --- /dev/null +++ b/.changeset/tiny-oranges-thank.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +--- + +Modify Tech insight initialization to expose FactRetrieverEngine. Enables users to trigger fact retrieval manually or reschedule retrievers on runtime. diff --git a/.changeset/witty-queens-happen.md b/.changeset/witty-queens-happen.md new file mode 100644 index 0000000000..969bd2c79e --- /dev/null +++ b/.changeset/witty-queens-happen.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr': patch +--- + +Fix parsing of ADR location which includes a trailing slash diff --git a/.changeset/young-trees-rescue.md b/.changeset/young-trees-rescue.md new file mode 100644 index 0000000000..d2ea5b3aeb --- /dev/null +++ b/.changeset/young-trees-rescue.md @@ -0,0 +1,24 @@ +--- +'@backstage/create-app': patch +--- + +Added `EntityLinksCard` to the system `EntityPage`. + +For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx` + +```diff +const systemPage = ( + ... + + + ++ ++ ++ +- ++ + + + ... +); +``` diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e732e49b43..3bead8d569 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -63,7 +63,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -181,7 +181,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 6fd9fe2814..03105b753a 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.5.3 + - uses: backstage/actions/cron@v0.5.5 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index fe234359dd..e776c47537 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 6b505dfbf5..a2ffdbcbe3 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml index 58b1f725ad..0a8b243255 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.5.3 + uses: backstage/actions/issue-sync@v0.5.5 diff --git a/.github/workflows/pr-review-comment.yaml b/.github/workflows/pr-review-comment.yaml index fac7fd2fc4..4b1048da9b 100644 --- a/.github/workflows/pr-review-comment.yaml +++ b/.github/workflows/pr-review-comment.yaml @@ -35,7 +35,7 @@ jobs: const prNumber = artifact.name.slice('pr_number-'.length) console.log(`::set-output name=pr-number::${prNumber}`); - - uses: backstage/actions/re-review@v0.5.3 + - uses: backstage/actions/re-review@v0.5.5 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 4fa8a60577..3fbac53400 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,7 +18,7 @@ jobs: if: github.repository == 'backstage/backstage' && ( github.event.pull_request || github.event.issue.pull_request ) steps: - name: PR sync - uses: backstage/actions/pr-sync@v0.5.3 + uses: backstage/actions/pr-sync@v0.5.5 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} diff --git a/.github/workflows/sync_code-formatting.yml b/.github/workflows/sync_code-formatting.yml index 45cf6dca3d..c37f8c578e 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 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 1ac1ff3b2c..ae65e90ac0 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 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 d02c17c35f..0eedfd9d6b 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -47,7 +47,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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index 03a1b01c07..9c6e693ba4 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.5.3 + uses: backstage/actions/yarn-install@v0.5.5 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: storybook yarn install diff --git a/docs/overview/roadmap.md b/docs/overview/roadmap.md index 2763f95a5a..2ac211bf97 100644 --- a/docs/overview/roadmap.md +++ b/docs/overview/roadmap.md @@ -111,5 +111,4 @@ guidelines to get started. If you have specific questions about the roadmap, please create an [issue](https://github.com/backstage/backstage/issues/new/choose), ping us on -[Discord](https://discord.gg/qxsEfa8Vq8), or [book -time](http://calendly.com/spotify-backstage) with the Spotify team. +[Discord](https://discord.gg/qxsEfa8Vq8), or [book time](https://info.backstage.spotify.com/office-hours) with the Spotify team. diff --git a/docs/overview/threat-model.md b/docs/overview/threat-model.md new file mode 100644 index 0000000000..120a0817a9 --- /dev/null +++ b/docs/overview/threat-model.md @@ -0,0 +1,89 @@ +--- +id: threat-model +title: Backstage Threat Model +description: A document describing the threat model for Backstage. +--- + +The threat model outlines key security considerations of Backstage for operators, developers and security researchers. This is a living document and will evolve and be expanded alongside the Backstage project as relevant. + +See [Security Policy and Advisories](https://github.com/backstage/backstage/security) in the Backstage GitHub repository for details on reporting security vulnerabilities and advisories on fixed security flaws. + +## Trust Model + +The Backstage trust model is divided into three groups with different trust levels. + +An **internal user** is an authenticated user that generally belongs to the organization of a particular Backstage deployment. These users are trusted to the extent that they are not expected to compromise the availability of Backstage, but they are not trusted to not compromise data confidentiality or integrity. + +An **integrator** is a user responsible for configuring and maintaining an instance of Backstage. Integrators are fully trusted, since they operate the system and database and therefore have root access to the host system. Additional measures can be taken by adopters of Backstage in order to restrict or observe the access of this group, but that falls outside of the current scope of Backstage. + +Another group of de facto integrators is internal and external code contributors. When installing Backstage plugins you should vet them just like any other package from an external source. While it’s possible to limit the impact of for example a supply chain attack by splitting the deployment into separate services with different plugins, the Backstage project itself does not aim to prevent these kinds of attacks or in any other way sandbox or limit the access of plugins. + +An **external user** is a user that does not belong to the other two groups, for example a malicious actor outside of the organization. The security model of Backstage currently assumes that this group does not have any direct access to Backstage, and it is the responsibility of each adopter of Backstage to make sure this is the case. + +## Integrator Responsibilities + +As an integrator of Backstage you yourself are responsible for protecting your Backstage installation from external and unauthorized access. The sign-in system in Backstage does not exist to limit access, only to inform the system of the identity of the user. There are some plugins that have more fine-grained access control through the permissions system, but the primary purpose of that system is to restrict access to resources for internal users rather than Backstage as a whole. A common and recommended way to protect a Backstage deployment from unauthorized access is to deploy it behind an authenticating proxy such as AWS’s ALB, GCP’s IAP, or Cloudflare Access. + +Other responsibilities include protecting the integrity of configuration files as it may otherwise be possible to introduce vulnerable configurations, as well as the confidentiality of configured secrets related to Backstage as these typically include authentication details to third party systems. + +The integrator is ultimately responsible for auditing usage of internal and external plugins as these run on the host system and have access to configuration and secrets. When installing plugins from sources like NPM, you should vet these in the same way that you would vet any other package installed from that source. + +## Common Backend Configuration + +There are many common facilities that are configured centrally and available to all Backstage backend plugins. For example there is a `DatabaseManager` that provides access to a SQL database, `TaskScheduler` for scheduling long-running tasks, `Logger` as a general logging facility, and `UrlReader` for reading content from external sources. These are all configured either directly in code, or within the `backend` block of the static configuration. The appropriate care needs to be taken to ensure that any secrets remain confidential and no malicious configuration is injected. + +In a typical Backstage setup, there is no boundary between plugins that run on the same host. Likewise, there is no boundary between plugins that share the same database access. Any plugin that is running on a host that has access to the logical database of any other plugin should be considered to have full access to that other plugin. For example, if you deploy the `auth` and `catalog` plugins on separate hosts with separate configuration and credentials, the `catalog` plugin is still considered to have full access to the `auth` plugin if the `catalog` plugin has access to the `auth` plugin's logical database. The only way to create a boundary between the two plugins is to deploy them in such a way that they do not have access to each others’ database. This applies to the database facility as well as any other shared resources, such as the cache. + +The `UrlReader` facility is of particular interest for a secure Backstage configuration. In particular the `backend.reading.allow` configuration lists the hosts that you trust the backend to be able to read content from on behalf of users. It is extremely important that this list does not, for example, allow access to instance metadata endpoints of cloud providers, or other endpoints that your Backstage instance may have access to which contain sensitive information. In general it is recommended to keep the list minimal and only allow reading from required endpoints. The same concerns apply to custom implementations of the `UrlReader` interface, if you need to implement these through code. + +## Authentication + +Backstage provides authentication of users through the `auth` plugin, which primarily acts as an authorization server for different OAuth 2.0 provider integrations. These integrations can both serve the purpose of signing users into Backstage, as well as providing delegated access to external resources, and are all subject to the common concerns of implementing secure OAuth 2.0 authorization servers. All auth provider integrations are disabled by default, and need to be enabled through configuration in order to be used. For each Backstage installation it is recommended to only enable the minimal set of providers that are in use by that instance. + +It is not within scope of the `auth` backend to protect against unauthorized access, that is something that needs to be handled at a deployment level. See the [Integrator Responsibilities](#integrator-responsibilities) section for more information. + +In order to use an auth provider to sign in users into Backstage, it needs to be configured with an [Identity resolver](https://backstage.io/docs/auth/identity-resolver), which is a custom callback implemented in code. The identity resolver is a sensitive part of configuring Backstage and it is important that it always resolves user identities correctly, based on information provided by the authentication provider. There are a number of built-in identity resolvers that can simplify configuration, and it is important that these all resolve users in a secure way, regardless of how they are used. + +As part of signing in with an identity resolver, a Backstage Token is issued containing the resolved user identity. The tokens are asymmetrically signed JSON Web Tokens, with the public keys available to any service that wishes to verify a token. The signing keys are rotated continuously and are unique to each installation of Backstage, meaning that Backstage Tokens are not shared across installations. The token contains claims for the user identity and ownership information, which can be used to determine what Backstage resources are owned by that user or group. It is important that this token can not be forged outside of the `auth` plugin, with the exception of other plugins deployed in the same backend service or sharing the same database. For a high-security deployment, the `auth` backend should therefore be deployed in a separate service with its own database. + +The token is used to prove the identity of the user within the Backstage system, and is used throughout Backstage plugins to control access. It is important that the ownership resolution logic is consistent across the entire Backstage ecosystem, with no possibility of misinterpreting the ownership information. + +For cross backend communication the Backstage Token is typically forwarded or in strict backend to backend communication without a user party the backend itself issues a service token based on a pre-shared secret which is then validated on the receiving end. There are no unique service identities tied to these tokens at this point, meaning the tokens can be used across all services in a Backstage installation, this is something that we aim to improve in the future. + +Backstage also supports authentication through a proxy where the user identity is read from the incoming request from the proxy, which has been decorated by an authenticating reverse proxy such as [AWS ALB](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/). The following proxy auth providers verify the signature of incoming requests, and are therefore safe to deploy with direct access by users: `awsAlb`, `cfAccess`, and `gcpIap`. Providers like `oauth2Proxy` does not verify the incoming request and can therefore be spoofed by a malicious internal user to supply the `auth` backend with forged identity information. It’s therefore highly recommended to restrict access to the `oauth2Proxy` endpoints, or use a different provider. + +## Catalog + +Integrators should configure `catalog.rules` and `catalog.locations[].rules` to limit the allowed entity kinds that users can define. In general it is best to restrict definition of User, Group, and Template entities so that internal users cannot register additional ones. Template entities define actions that are executed on the backend hosts, and while the goal is for these actions to be secure regardless of input, it is still a more sensitive context and it is recommended that you protect it with additional checks. It is very important to not allow registration of User and Group entities if you ingest and rely on these as organizational data in your catalog. Doing so could otherwise open up for the ability to impersonate users and confuse group membership information. You should always ingest organizational data using a statically configured catalog location or an entity provider reading from a trusted source. The entities emitted directly by an entity provider are always trusted and rules are not applied to them, but any entities produced further down the chain are still subject to the rules. + +The Catalog does not aim to protect against resource exhaustion attacks in its default setup. If you need to prevent your internal users from being able to register large amounts of entities, then it is recommended to disable entity registration and use a different approach for discovering entities. One way to mitigate any resource exhaustion attacks is to only allow the catalog to read from trusted SCM sources that have an audit trail. Catalog currently lacks limits for entity hierarchy depth and entity size, which we hope to address in the future. + +By default all internal users are allowed to create and delete entities. If this does not fit your organization's needs it is recommended to enable and configure the [permission](https://backstage.io/docs/permissions/overview) system to restrict these operations. + +## Scaffolder + +By default, Scaffolding jobs execute directly on the host machine, including any actions defined in the template. Because the Scaffolder templates are considered a more sensitive area it is recommended to control access to create and update templates to trusted parties. Template execution is intended to be secure regardless of input, but we still recommend this additional layer of protection. The string templating is executed in a [node VM sandbox](https://github.com/patriksimek/vm2) to mitigate the possibility of remote code execution attacks. + +The Scaffolder often has elevated permissions to for example create repositories in a Github organization. The integrator should therefore be cautious of Scaffolder Templates that for example delete or update existing resources as the user input is typically user defined and can therefore delete or modify resources maliciously or by mistake. + +One strategy that allows you to reduce the access that the Scaffolder service has is to rely on user credentials when executing actions. For example, a GitHub App integration could be configured with read-only permissions, with a separate user OAuth token used to create repositories. This requires that your users have access to create repositories in the first place. + +The integrator should audit installed scaffolding actions just like any other plugin package. It is also important to verify that installed actions fall in line with your own security requirements, as some actions might be intended for more relaxed environments. + +By default all internal users are allowed to execute templates in the scaffolder. If this does not fit your organization's needs it is recommended to enable and configure the [permission](https://backstage.io/docs/permissions/overview) system to restrict these operations. + +## TechDocs + +TechDocs' backend can be broadly configured in two ways. The default is when `techdocs.builder` is set to `local`, in which documentation is generated on-demand and stored locally by the TechDocs backend. When `techdocs.builder` is set to `external` instead, documentation is assumed to be generated by an external process (e.g. in a CI/CD pipeline), and merely read from a configured external storage provider. + +When documentation is generated locally, integrators are responsible for ensuring secure configuration of file system permissions in the location where generated assets are stored. When documentation is generated externally, integrators are responsible for access control and permissioning between the external process that generates the documentation, the storage provider where documentation assets are published, and the TechDocs backend. + +Regardless of backend configuration, the TechDocs frontend does not trust the generated HTML of any documentation sites and therefore applies a strict sanitization process before rendering out any content to users. + +By default, all TechDocs documentation is visible to all Backstage users. Access can be restricted to TechDocs sites by configuring view permissions for the Catalog. + +## Proxy + +The proxy backend acts as a utility for frontend plugins to access remote services that may not be set up to receive traffic directly from the Backstage frontend. Typical reasons for this would be that the upstream service does not provide the appropriate CORS headers or does not serve its content over HTTPS. + +The proxy entries are configured through static configuration. Each entry has a mount path and an upstream target, and also supports other options such as limiting the allowed methods, or injecting additional headers. It is recommended to avoid injecting authentication headers for upstream services, as this is a risky way to decorate requests with credentials. Anyone with access to your Backstage deployment will be able to make requests to the upstream service using the injected credentials. It is recommended that you instead create a backend plugin that forwards individual requests to the upstream service in a secure way. In case you do end up injecting credentials into upstream requests, be sure that you are not exposing any sensitive information or actions. You should also restrict the access as much as possible, for example using the `allowedMethods` option to limit the methods that can be used, and using tokens with the minimum required authorization scope. diff --git a/docs/releases/v1.6.0-next.0-changelog.md b/docs/releases/v1.6.0-next.0-changelog.md new file mode 100644 index 0000000000..5ff2311b79 --- /dev/null +++ b/docs/releases/v1.6.0-next.0-changelog.md @@ -0,0 +1,1974 @@ +# Release v1.6.0-next.0 + +## @backstage/plugin-azure-devops@0.2.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-azure-devops-common@0.3.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + +## @backstage/plugin-dynatrace@0.2.0-next.0 + +### Minor Changes + +- e44c0b3811: New features: + + - Some visual improvements to the table that displays Problems + - Added support for viewing recent Synthetics results using + - Added some additional linking to the configured Dynatrace instance + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-scaffolder@1.6.0-next.0 + +### Minor Changes + +- 3424a8075d: Added support for `async` validation for the `next` version of the plugin +- 192d856495: Implementing review step for the scaffolder under `create/next` + +### Patch Changes + +- 9ffb75616d: Fix bug with empty strings in `EntityPicker` +- 3f739be9d9: Minor API signatures cleanup +- 9097278df2: Updated dependency `json-schema-library` to `^7.0.0`. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-scaffolder-backend@1.6.0-next.0 + +### Minor Changes + +- ea2eee9e6a: Add the option for a homepage when using the `github:publish` action + +- 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options. + + To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`; + + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseTaskStore = await DatabaseTaskStore.create(databaseManager); + +- 1ff817b3f0: add entity metadata to the template info type + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 2df9955f4a: Removed the depreacated `publish:file` action, use the template editor to test templates instead. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + +## @backstage/plugin-scaffolder-common@1.2.0-next.0 + +### Minor Changes + +- 1ff817b3f0: add entity metadata to the template info type + +## @backstage/plugin-search-backend-module-pg@0.4.0-next.0 + +### Minor Changes + +- 8872cc735d: Fixed a bug in search-backend-module-pg where it ignores the skip migration database options when using the database. + + To use this new implementation you need to create the instance of `DatabaseDocumentStore` using the `PluginDatabaseManager` instead of `Knex`; + + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseDocumentStore } from '@backstage/plugin-search-backend-module-pg'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseDocumentStore = await DatabaseDocumentStore.create(databaseManager); + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/app-defaults@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + +## @backstage/backend-app-api@0.2.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + +## @backstage/backend-common@0.15.1-next.0 + +### Patch Changes + +- 399286d7dd: Workaround support for `swc` instead of `sucrase` +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/backend-defaults@0.1.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + +## @backstage/backend-plugin-api@0.1.2-next.0 + +### Patch Changes + +- eef91a2558: Simplified the `ServiceFactory` type and removed `AnyServiceFactory`. +- 68513f169a: When defining a new `ServiceRef` you can now also include a `defaultFactory`, which will be used to construct instances of the service in case there is no explicit factory defined. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/backend-tasks@0.3.5-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/backend-test-utils@0.1.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + +## @backstage/catalog-client@1.0.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + +## @backstage/cli@0.18.2-next.0 + +### Patch Changes + +- 6ae0f6a719: Switch out `sucrase` for `swc` for transpilation. + + `sucrase` is a little more relaxed when it comes to supporting the ways of mocking in `jest`. You might have to make some changes to your tests to meet the `jest` standard and spec if your tests seems to start failing. + + Mocks that look like this are invalid, and they will throw a reference error in line with the `jest` documentation [here on example 3](https://jestjs.io/docs/es6-class-mocks#calling-jestmock-with-the-module-factory-parameter) + + ```ts + const mockCommandExists = jest.fn(); + jest.mock('command-exists', () => mockCommandExists); + ``` + + You might need to update these mocks to look a little like the following to defer the call to the `jest.fn()` spy until the mock is called. + + ```ts + const mockCommandExists = jest.fn(); + jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), + ); + ``` + + Also, imports are immutable. So it means that you might get some errors when trying to use `jest.spyOn` with starred imports. You might see an error like this: + + ```log + TypeError: Cannot redefine property: executeFrameHandlerStrategy + at Function.defineProperty () + + 20 | import { AuthResolverContext } from '../types'; + 21 | + > 22 | const mockFrameHandler = jest.spyOn( + | ^ + 23 | helpers, + 24 | 'executeFrameHandlerStrategy', + 25 | ) as unknown as jest.MockedFunction< + ``` + + This happens when you try to do `import * as something from './something'` and then `jest.spyOn(something, 'test)`. You will need to add a `jest.mock` call to mock out the required starred import to return `jest.fn()` functions from the start. Something like this fixes the above test: + + ```ts + jest.mock('../../helpers', () => ({ + executeFrameHandlerStrategy: jest.fn(), + })); + ``` + + You can also remove any occurrence of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI. + + **Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`. + + ```json + "jest": { + "transform": { + "\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js", + "\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js", + "\\.(yaml)$": "jest-transform-yaml" + } + } + ``` + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/release-manifests@0.0.6-next.0 + +## @backstage/config-loader@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/core-app-api@1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/core-components@0.11.1-next.0 + +### Patch Changes + +- b29c44d895: Adds code to generate ids for headers parsed through the MarkdownContent component. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/core-plugin-api@1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + +## @backstage/create-app@0.4.31-next.0 + +### Patch Changes + +- e83de28e36: Fix typo in the documentation + +- 208d6780c9: The `packages/backend/Dockerfile` received a couple of updates, it now looks as follows: + + ```Dockerfile + FROM node:16-bullseye-slim + + # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, + # in which case you should also move better-sqlite3 to "devDependencies" in package.json. + RUN apt-get update && \ + apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + yarn config set python /usr/bin/python3 + + # From here on we use the least-privileged `node` user to run the backend. + USER node + WORKDIR /app + + # This switches many Node.js dependencies to production mode. + ENV NODE_ENV production + + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. + # The skeleton contains the package.json of each package in the monorepo, + # and along with yarn.lock and the root package.json, that's enough to run yarn install. + COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ + RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz + + RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" + + # Then copy the rest of the backend bundle, along with any other files we might want. + COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ + RUN tar xzf bundle.tar.gz && rm bundle.tar.gz + + CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] + ``` + + The two notable changes are that a `USER node` instruction has been added and the ordering of instructions has been changed accordingly. This means that the app will now be running using the least-privileged `node` user. In order for this to work we now need to make sure that all app files are owned by the `node` user, which we do by adding the `--chown=node:node` option to the `COPY` instructions. + + The second change is the addition of `ENV NODE_ENV production`, which ensured that all Node.js modules run in production mode. If you apply this change to an existing app, note that one of the more significant changes is that this switches the log formatting to use the default production format, JSON. Rather than your log lines looking like this: + + ```log + 2022-08-10T11:36:05.478Z catalog info Performing database migration type=plugin + ``` + + They will now look like this: + + ```log + {"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","type":"plugin"} + ``` + + If you wish to keep the existing format, you can override this change by applying the following change to `packages/backend/src/index.ts`: + + ```diff + getRootLogger, + + setRootLogger, + + createRootLogger, + + coloredFormat, + useHotMemoize, + ... + ServerTokenManager, + } from '@backstage/backend-common'; + + ... + + async function main() { + + setRootLogger(createRootLogger({ format: coloredFormat })); + + + const config = await loadBackendConfig({ + ``` + +- c0a08fd08c: Added `EntityLinksCard` to the system `EntityPage`. + + For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx` + + ```diff + const systemPage = ( + ... + + + + + + + + + + - + + + + + ... + ); + ``` + +## @backstage/dev-utils@1.0.6-next.0 + +### Patch Changes + +- 4c5e85ddf3: Removed the dependency and setup of `react-hot-loader`, since the `@backstage/cli` now uses `swc` with `React Refresh` instead. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + +## @backstage/integration@1.3.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/integration-react@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/release-manifests@0.0.6-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @techdocs/cli@1.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + +## @backstage/test-utils@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + +## @backstage/plugin-adr@0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-adr-backend@0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-adr-common@0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-airbrake@0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/dev-utils@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-airbrake-backend@0.2.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-allure@0.1.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-analytics-module-ga@0.1.20-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-apache-airflow@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-api-docs@0.8.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @backstage/plugin-apollo-explorer@0.1.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-app-backend@0.3.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/config-loader@1.1.4-next.0 + +## @backstage/plugin-auth-backend@0.15.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @backstage/plugin-auth-node@0.2.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-azure-devops-backend@0.3.15-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +- cb1cfc018b: `createRouter` now requires an additional reader: `UrlReader` argument + + ```diff + export default async function createPlugin( + env: PluginEnvironment, + ): Promise { + return createRouter({ + logger: env.logger, + config: env.config, + + reader: env.reader, + }); + } + ``` + + Remember to check if you have already provided these settings previously. + + #### [Azure DevOps] + + ```yaml + # app-config.yaml + azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company + ``` + + #### [Azure Integrations] + + ```yaml + # app-config.yaml + integrations: + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} + ``` + +- ef9ab322de: Minor API signatures cleanup + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + +## @backstage/plugin-badges@0.2.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-badges-backend@0.1.30-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + +## @backstage/plugin-bazaar@0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @backstage/plugin-bazaar-backend@0.1.20-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + +## @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-bitrise@0.1.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog@1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-backend@1.3.2-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-backend-module-aws@0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-azure@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-github@0.1.7-next.0 + +### Patch Changes + +- 3c4a388537: New experimental alpha exports for use with the upcoming backend system. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.3-next.0 + +### Patch Changes + +- c54fcea9af: Now the `searchStream` method in LDAP client awaits the callbacks +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-msgraph@0.4.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 4c82b955fc: Fix typo +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + +## @backstage/plugin-catalog-common@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-graph@0.2.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog-graphql@0.3.13-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/plugin-catalog-import@0.8.12-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog-node@1.0.2-next.0 + +### Patch Changes + +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + +## @backstage/plugin-catalog-react@1.1.4-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-cicd-statistics@0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-cicd-statistics@0.1.11-next.0 + +## @backstage/plugin-circleci@0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-cloudbuild@0.3.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-climate@0.1.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-coverage@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-coverage-backend@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-codescene@0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-config-schema@0.1.32-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-cost-insights@0.11.31-next.0 + +### Patch Changes + +- 9318bf15d4: The `CostInsightsHeader`component now uses group names if available +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-explore@0.3.40-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-explore-react@0.0.21-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-explore-react@0.0.21-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/plugin-firehydrant@0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-fossa@0.2.41-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-gcalendar@0.3.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-gcp-projects@0.3.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-git-release-manager@0.3.22-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-github-actions@0.5.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-deployments@0.1.40-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-issues@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-pull-requests-board@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-gitops-profiles@0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-gocd@0.1.15-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-graphiql@0.2.41-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-graphql-backend@0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-graphql@0.3.13-next.0 + +## @backstage/plugin-home@0.4.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-ilert@0.1.35-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-jenkins@0.7.8-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + +## @backstage/plugin-jenkins-backend@0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + +## @backstage/plugin-jenkins-common@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-kafka@0.3.9-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-kafka-backend@0.2.29-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-kubernetes@0.7.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-kubernetes-backend@0.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @backstage/plugin-lighthouse@0.3.9-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-newrelic@0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-newrelic-dashboard@0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-org@0.5.9-next.0 + +### Patch Changes + +- ab6650ede9: Added an edit button to the `UserProfileCard` that is enabled when the `backstage.io/edit-url` is present, this matches how the `GroupProfileCard` works +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-pagerduty@0.5.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-periskop@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-periskop-backend@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-permission-backend@0.5.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + +## @backstage/plugin-permission-common@0.6.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/plugin-permission-node@0.6.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-permission-react@0.4.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-proxy-backend@0.2.30-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-rollbar@0.4.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-rollbar-backend@0.1.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + +## @backstage/plugin-search@1.0.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend@1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend-module-elasticsearch@1.0.2-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend-node@1.0.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-common@1.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-search-react@1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-sentry@0.4.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-shortcuts@0.3.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-sonarqube@0.4.1-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-sonarqube-backend@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-splunk-on-call@0.3.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-stack-overflow@0.1.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-stack-overflow-backend@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-tech-insights@0.2.5-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-tech-insights-backend@0.5.2-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- 9e8e9f5243: Modify Tech insight initialization to expose FactRetrieverEngine. Enables users to trigger fact retrieval manually or reschedule retrievers on runtime. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/catalog-client@1.0.5-next.0 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + +## @backstage/plugin-tech-insights-node@0.3.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + +## @backstage/plugin-tech-radar@0.5.16-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-techdocs@1.3.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 829f14a9b0: Always update the title and sub-title when the location changes on a `TechDocs` reader page. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @backstage/plugin-techdocs-backend@1.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @backstage/plugin-techdocs-node@1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-react@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-todo@0.2.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-todo-backend@0.1.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-user-settings@0.4.8-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-vault@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-vault-backend@0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + +## @backstage/plugin-xcmetrics@0.2.29-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## example-app@0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kafka@0.3.9-next.0 + - @backstage/plugin-lighthouse@0.3.9-next.0 + - @backstage/plugin-scaffolder@1.6.0-next.0 + - @backstage/plugin-azure-devops@0.2.0-next.0 + - @backstage/plugin-cloudbuild@0.3.9-next.0 + - @backstage/plugin-explore@0.3.40-next.0 + - @backstage/plugin-github-actions@0.5.9-next.0 + - @backstage/plugin-jenkins@0.7.8-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.2-next.0 + - @backstage/plugin-pagerduty@0.5.2-next.0 + - @backstage/plugin-sentry@0.4.2-next.0 + - @backstage/plugin-tech-insights@0.2.5-next.0 + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.4-next.0 + - @backstage/plugin-user-settings@0.4.8-next.0 + - @backstage/plugin-dynatrace@0.2.0-next.0 + - @backstage/plugin-cost-insights@0.11.31-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-org@0.5.9-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-airbrake@0.3.9-next.0 + - @backstage/plugin-apache-airflow@0.2.2-next.0 + - @backstage/plugin-api-docs@0.8.9-next.0 + - @backstage/plugin-badges@0.2.33-next.0 + - @backstage/plugin-catalog-import@0.8.12-next.0 + - @backstage/plugin-circleci@0.3.9-next.0 + - @backstage/plugin-code-coverage@0.2.2-next.0 + - @backstage/plugin-gcalendar@0.3.5-next.0 + - @backstage/plugin-gcp-projects@0.3.28-next.0 + - @backstage/plugin-gocd@0.1.15-next.0 + - @backstage/plugin-graphiql@0.2.41-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-kubernetes@0.7.2-next.0 + - @backstage/plugin-newrelic@0.3.27-next.0 + - @backstage/plugin-rollbar@0.4.9-next.0 + - @backstage/plugin-search@1.0.2-next.0 + - @backstage/plugin-shortcuts@0.3.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-tech-radar@0.5.16-next.0 + - @backstage/plugin-todo@0.2.11-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog-graph@0.2.21-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + - @internal/plugin-catalog-customized@0.0.2-next.0 + +## example-backend@0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-kafka-backend@0.2.29-next.0 + - @backstage/plugin-proxy-backend@0.2.30-next.0 + - @backstage/plugin-azure-devops-backend@0.3.15-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/plugin-search-backend-module-pg@0.4.0-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-app-backend@0.3.36-next.0 + - @backstage/plugin-auth-backend@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-code-coverage-backend@0.2.2-next.0 + - @backstage/plugin-graphql-backend@0.1.26-next.0 + - @backstage/plugin-jenkins-backend@0.1.26-next.0 + - @backstage/plugin-permission-backend@0.5.11-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-rollbar-backend@0.1.33-next.0 + - @backstage/plugin-techdocs-backend@1.2.2-next.0 + - @backstage/plugin-todo-backend@0.1.33-next.0 + - @backstage/plugin-tech-insights-backend@0.5.2-next.0 + - @backstage/plugin-badges-backend@0.1.30-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.0.2-next.0 + - @backstage/plugin-kubernetes-backend@0.7.2-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.4-next.0 + - @backstage/plugin-search-backend@1.0.2-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.20-next.0 + - example-app@0.2.75-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## example-backend-next@0.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-defaults@0.1.1-next.0 + +## techdocs-cli-embedded-app@0.2.74-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @internal/plugin-catalog-customized@0.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @internal/plugin-todo-list@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @internal/plugin-todo-list-backend@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @internal/plugin-todo-list-common@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 diff --git a/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md b/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md index 4519f16d96..7f8fe01e11 100644 --- a/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md +++ b/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md @@ -51,4 +51,4 @@ As with most alpha releases, you should expect things to change quite a lot unti If you have feedback or questions, please open a [GitHub issue](https://github.com/backstage/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send us an email at [backstage-interest@spotify.com](mailto:backstage-interest@spotify.com) 🙏 -To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://mailchi.mp/spotify/backstage-community). +To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://info.backstage.spotify.com/newsletter_subscribe). diff --git a/microsite/blog/2020-08-05-announcing-backstage-software-templates.md b/microsite/blog/2020-08-05-announcing-backstage-software-templates.md index 0bf8d7e581..18bfa64c19 100644 --- a/microsite/blog/2020-08-05-announcing-backstage-software-templates.md +++ b/microsite/blog/2020-08-05-announcing-backstage-software-templates.md @@ -75,4 +75,4 @@ We have learned that one of the keys to getting these standards adopted is to ke If you have feedback or questions, please open a [GitHub issue](https://github.com/backstage/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send us an email at [backstage-interest@spotify.com](mailto:backstage-interest@spotify.com) 🙏 -To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://mailchi.mp/spotify/backstage-community). +To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://info.backstage.spotify.com/newsletter_subscribe). diff --git a/microsite/blog/2020-09-23-backstage-cncf-sandbox.md b/microsite/blog/2020-09-23-backstage-cncf-sandbox.md index 48a67e878c..70ef06f242 100644 --- a/microsite/blog/2020-09-23-backstage-cncf-sandbox.md +++ b/microsite/blog/2020-09-23-backstage-cncf-sandbox.md @@ -18,4 +18,4 @@ The Backstage community is healthy and growing quickly. Over [130 people](https: We’re excited to embark on this journey with the CNCF community. There’s so much great tech being built here, and it’s about time we share it to build even greater products, together. Entering into the CNCF Sandbox is just the first step. We are committed to working with the community to bring Backstage through the Incubation step, and finally all the way to becoming a Graduated, top-level project. -Thanks to everyone for your support so far. We hope you [join us](https://mailchi.mp/spotify/backstage-community) in this next chapter of Backstage's journey. If you have questions or feedback, feel free to [email](mailto:backstage-interest@spotify.com) me directly. +Thanks to everyone for your support so far. We hope you [join us](https://info.backstage.spotify.com/newsletter_subscribe) in this next chapter of Backstage's journey. If you have questions or feedback, feel free to [email](mailto:backstage-interest@spotify.com) me directly. diff --git a/microsite/blog/2021-06-22-spotify-backstage-is-growing.md b/microsite/blog/2021-06-22-spotify-backstage-is-growing.md index 2507192a4a..a12ddf7443 100644 --- a/microsite/blog/2021-06-22-spotify-backstage-is-growing.md +++ b/microsite/blog/2021-06-22-spotify-backstage-is-growing.md @@ -49,7 +49,7 @@ We’ve launched a new website at: [backstage.spotify.com](https://backstage.spo You’ll find a high-level introduction to the platform, tips and tricks tested by Spotify to accelerate developer effectiveness, and access to a group of partners that have scaled Backstage for numerous adopters. You can also use the site to book product overviews, demos, and technical deep dives with members of the Spotify team. -We will continue to post important product announcements, technical documentation, feature demos, and community news here on Backstage.io. ([Subscribe to the newsletter](https://mailchi.mp/spotify/backstage-community) to stay up to date.) And both contributors and adopting companies can continue to find around-the-clock/around-the-world technical support on [GitHub](https://github.com/backstage/backstage) and [Discord](https://discord.gg/MUpMjP2). +We will continue to post important product announcements, technical documentation, feature demos, and community news here on Backstage.io. ([Subscribe to the newsletter](https://info.backstage.spotify.com/newsletter_subscribe) to stay up to date.) And both contributors and adopting companies can continue to find around-the-clock/around-the-world technical support on [GitHub](https://github.com/backstage/backstage) and [Discord](https://discord.gg/MUpMjP2). ## Separate community sessions for adopters and contributors diff --git a/microsite/blog/2021-09-30-50-public-adopters.md b/microsite/blog/2021-09-30-50-public-adopters.md index 3e96cade69..6a4652b99f 100644 --- a/microsite/blog/2021-09-30-50-public-adopters.md +++ b/microsite/blog/2021-09-30-50-public-adopters.md @@ -41,5 +41,5 @@ If you are a Backstage enthusiast, please [join me][news] and the entire Backsta [da]: https://medium.com/dazn-tech/developer-experience-dx-at-dazn-e6de9a0208d2 [ex]: https://backstage.spotify.com/blog/community-session/firehydrant-expedia-loblaw/ [plugins]: https://backstage.io/plugins -[news]: https://mailchi.mp/spotify/backstage-community +[news]: https://info.backstage.spotify.com/newsletter_subscribe [gh]: https://github.com/backstage/backstage/blob/master/ADOPTERS.md diff --git a/microsite/core/Footer.js b/microsite/core/Footer.js index f0917d3255..327e42f38a 100644 --- a/microsite/core/Footer.js +++ b/microsite/core/Footer.js @@ -48,7 +48,7 @@ class Footer extends React.Component { Community Sessions - + Subscribe to our newsletter CNCF Incubation diff --git a/microsite/core/HubSpotForm.js b/microsite/core/HubSpotForm.js new file mode 100644 index 0000000000..2905909ffe --- /dev/null +++ b/microsite/core/HubSpotForm.js @@ -0,0 +1,40 @@ +import React from 'react'; + +export class HubSpotForm extends React.Component { + render() { + return ( + <> + + + ); + } +} diff --git a/microsite/core/Typeform.js b/microsite/core/Typeform.js deleted file mode 100644 index c737d907f0..0000000000 --- a/microsite/core/Typeform.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; - -export function Typeform() { - return ( - <> -
- `); }; +/** @public */ export const ensuresXRequestedWith = (req: express.Request) => { const requiredHeader = req.header('X-Requested-With'); if (!requiredHeader || requiredHeader !== 'XMLHttpRequest') { diff --git a/plugins/auth-backend/src/lib/flow/types.ts b/plugins/auth-backend/src/lib/flow/types.ts index aaa8b55d1c..f67198a1b0 100644 --- a/plugins/auth-backend/src/lib/flow/types.ts +++ b/plugins/auth-backend/src/lib/flow/types.ts @@ -19,6 +19,8 @@ import { AuthResponse } from '../../providers/types'; /** * Payload sent as a post message after the auth request is complete. * If successful then has a valid payload with Auth information else contains an error. + * + * @public */ export type WebMessageResponse = | { diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts index 9c28ed8fad..6caa9fed12 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts @@ -44,7 +44,8 @@ import { prepareBackstageIdentityResponse } from '../../providers/prepareBacksta export const THOUSAND_DAYS_MS = 1000 * 24 * 60 * 60 * 1000; export const TEN_MINUTES_MS = 600 * 1000; -export type Options = { +/** @public */ +export type OAuthAdapterOptions = { providerId: string; secure: boolean; persistScopes?: boolean; @@ -54,11 +55,16 @@ export type Options = { isOriginAllowed: (origin: string) => boolean; callbackUrl: string; }; + +/** @public */ export class OAuthAdapter implements AuthProviderRouteHandlers { static fromConfig( config: AuthProviderConfig, handlers: OAuthHandlers, - options: Pick, + options: Pick< + OAuthAdapterOptions, + 'providerId' | 'persistScopes' | 'callbackUrl' + >, ): OAuthAdapter { const { origin: appOrigin } = new URL(config.appUrl); @@ -83,7 +89,7 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { constructor( private readonly handlers: OAuthHandlers, - private readonly options: Options, + private readonly options: OAuthAdapterOptions, ) { this.baseCookieOptions = { httpOnly: true, diff --git a/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts b/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts index 95a0547a5e..1c6d45d0a4 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts @@ -20,6 +20,7 @@ import { InputError, NotFoundError } from '@backstage/errors'; import { readState } from './helpers'; import { AuthProviderRouteHandlers } from '../../providers/types'; +/** @public */ export class OAuthEnvironmentHandler implements AuthProviderRouteHandlers { static mapConfig( config: Config, diff --git a/plugins/auth-backend/src/lib/oauth/helpers.ts b/plugins/auth-backend/src/lib/oauth/helpers.ts index eec25696a3..63d5d62ef9 100644 --- a/plugins/auth-backend/src/lib/oauth/helpers.ts +++ b/plugins/auth-backend/src/lib/oauth/helpers.ts @@ -19,6 +19,7 @@ import { OAuthState } from './types'; import pickBy from 'lodash/pickBy'; import { CookieConfigurer } from '../../providers/types'; +/** @public */ export const readState = (stateString: string): OAuthState => { const state = Object.fromEntries( new URLSearchParams(Buffer.from(stateString, 'hex').toString('utf-8')), @@ -35,6 +36,7 @@ export const readState = (stateString: string): OAuthState => { return state as OAuthState; }; +/** @public */ export const encodeState = (state: OAuthState): string => { const stateString = new URLSearchParams( pickBy(state, value => value !== undefined), @@ -43,6 +45,7 @@ export const encodeState = (state: OAuthState): string => { return Buffer.from(stateString, 'utf-8').toString('hex'); }; +/** @public */ export const verifyNonce = (req: express.Request, providerId: string) => { const cookieNonce = req.cookies[`${providerId}-nonce`]; const state: OAuthState = readState(req.query.state?.toString() ?? ''); diff --git a/plugins/auth-backend/src/lib/oauth/index.ts b/plugins/auth-backend/src/lib/oauth/index.ts index b7b37f5920..671e8e48e9 100644 --- a/plugins/auth-backend/src/lib/oauth/index.ts +++ b/plugins/auth-backend/src/lib/oauth/index.ts @@ -15,6 +15,7 @@ */ export { OAuthEnvironmentHandler } from './OAuthEnvironmentHandler'; +export type { OAuthAdapterOptions } from './OAuthAdapter'; export { OAuthAdapter } from './OAuthAdapter'; export { encodeState, verifyNonce, readState } from './helpers'; export type { diff --git a/plugins/auth-backend/src/lib/oauth/types.ts b/plugins/auth-backend/src/lib/oauth/types.ts index 6e5fe19859..e8b5282aad 100644 --- a/plugins/auth-backend/src/lib/oauth/types.ts +++ b/plugins/auth-backend/src/lib/oauth/types.ts @@ -17,10 +17,12 @@ import express from 'express'; import { Profile as PassportProfile } from 'passport'; import { BackstageSignInResult } from '@backstage/plugin-auth-node'; -import { RedirectInfo, ProfileInfo } from '../../providers/types'; +import { OAuthStartResponse, ProfileInfo } from '../../providers/types'; /** * Common options for passport.js-based OAuth providers + * + * @public */ export type OAuthProviderOptions = { /** @@ -37,6 +39,7 @@ export type OAuthProviderOptions = { callbackUrl: string; }; +/** @public */ export type OAuthResult = { fullProfile: PassportProfile; params: { @@ -59,6 +62,7 @@ export type OAuthResponse = { backstageIdentity?: BackstageSignInResult; }; +/** @public */ export type OAuthProviderInfo = { /** * An access token issued for the signed in user. @@ -78,6 +82,7 @@ export type OAuthProviderInfo = { scope: string; }; +/** @public */ export type OAuthState = { /* A type for the serialized value in the `state` parameter of the OAuth authorization flow */ @@ -87,11 +92,13 @@ export type OAuthState = { scope?: string; }; +/** @public */ export type OAuthStartRequest = express.Request<{}> & { scope: string; state: OAuthState; }; +/** @public */ export type OAuthRefreshRequest = express.Request<{}> & { scope: string; refreshToken: string; @@ -108,7 +115,7 @@ export interface OAuthHandlers { /** * Initiate a sign in request with an auth provider. */ - start(req: OAuthStartRequest): Promise; + start(req: OAuthStartRequest): Promise; /** * Handle the redirect from the auth provider when the user has signed in. diff --git a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts index 893be26852..660b96f018 100644 --- a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts +++ b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts @@ -33,7 +33,7 @@ describe('PassportStrategyHelper', () => { } describe('executeRedirectStrategy', () => { - it('should call authenticate and resolve with RedirectInfo', async () => { + it('should call authenticate and resolve with OAuthStartResponse', async () => { const mockStrategy = new MyCustomRedirectStrategy(); const spyAuthenticate = jest.spyOn(mockStrategy, 'authenticate'); const redirectStrategyPromise = executeRedirectStrategy( diff --git a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts index 6117736e21..16377f17f2 100644 --- a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts +++ b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts @@ -20,7 +20,7 @@ import jwtDecoder from 'jwt-decode'; import { InternalOAuthError } from 'passport-oauth2'; import { PassportProfile } from './types'; -import { ProfileInfo, RedirectInfo } from '../../providers/types'; +import { ProfileInfo, OAuthStartResponse } from '../../providers/types'; export type PassportDoneCallback = ( err?: Error, @@ -77,7 +77,7 @@ export const executeRedirectStrategy = async ( req: express.Request, providerStrategy: passport.Strategy, options: Record, -): Promise => { +): Promise => { return new Promise(resolve => { const strategy = Object.create(providerStrategy); strategy.redirect = (url: string, status?: number) => { diff --git a/plugins/auth-backend/src/providers/atlassian/index.ts b/plugins/auth-backend/src/providers/atlassian/index.ts index 8dff0197a3..f001463694 100644 --- a/plugins/auth-backend/src/providers/atlassian/index.ts +++ b/plugins/auth-backend/src/providers/atlassian/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export { atlassian, AtlassianAuthProvider } from './provider'; +export { atlassian } from './provider'; diff --git a/plugins/auth-backend/src/providers/atlassian/provider.test.ts b/plugins/auth-backend/src/providers/atlassian/provider.test.ts index c41a18aa22..1fb987d3b0 100644 --- a/plugins/auth-backend/src/providers/atlassian/provider.test.ts +++ b/plugins/auth-backend/src/providers/atlassian/provider.test.ts @@ -20,6 +20,14 @@ import { OAuthResult } from '../../lib/oauth'; import { PassportProfile } from '../../lib/passport/types'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/atlassian/provider.ts b/plugins/auth-backend/src/providers/atlassian/provider.ts index b693d226a2..e02d899fb1 100644 --- a/plugins/auth-backend/src/providers/atlassian/provider.ts +++ b/plugins/auth-backend/src/providers/atlassian/provider.ts @@ -38,12 +38,13 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import express from 'express'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; +/** @public */ export type AtlassianAuthProviderOptions = OAuthProviderOptions & { scopes: string; signInResolver?: SignInResolver; @@ -58,10 +59,6 @@ export const atlassianDefaultAuthHandler: AuthHandler = async ({ profile: makeProfileInfo(fullProfile, params.id_token), }); -/** - * @public - * @deprecated This export is deprecated and will be removed in the future. - */ export class AtlassianAuthProvider implements OAuthHandlers { private readonly _strategy: AtlassianStrategy; private readonly signInResolver?: SignInResolver; @@ -97,7 +94,7 @@ export class AtlassianAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { state: encodeState(req.state), }); diff --git a/plugins/auth-backend/src/providers/auth0/provider.ts b/plugins/auth-backend/src/providers/auth0/provider.ts index a53f504f50..8e0255ebe6 100644 --- a/plugins/auth-backend/src/providers/auth0/provider.ts +++ b/plugins/auth-backend/src/providers/auth0/provider.ts @@ -37,7 +37,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, AuthResolverContext, @@ -98,7 +98,7 @@ export class Auth0AuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/bitbucket/provider.test.ts b/plugins/auth-backend/src/providers/bitbucket/provider.test.ts index 9eeedc3d7b..503eccffbd 100644 --- a/plugins/auth-backend/src/providers/bitbucket/provider.test.ts +++ b/plugins/auth-backend/src/providers/bitbucket/provider.test.ts @@ -25,6 +25,14 @@ const mockFrameHandler = jest.spyOn( () => Promise<{ result: BitbucketOAuthResult; privateInfo: any }> >; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + describe('createBitbucketProvider', () => { it('should auth', async () => { const provider = new BitbucketAuthProvider({ diff --git a/plugins/auth-backend/src/providers/bitbucket/provider.ts b/plugins/auth-backend/src/providers/bitbucket/provider.ts index e3bd044466..cfa30e9a73 100644 --- a/plugins/auth-backend/src/providers/bitbucket/provider.ts +++ b/plugins/auth-backend/src/providers/bitbucket/provider.ts @@ -39,7 +39,7 @@ import { import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -54,6 +54,7 @@ type Options = OAuthProviderOptions & { resolverContext: AuthResolverContext; }; +/** @public */ export type BitbucketOAuthResult = { fullProfile: BitbucketPassportProfile; params: { @@ -65,6 +66,7 @@ export type BitbucketOAuthResult = { refreshToken?: string; }; +/** @public */ export type BitbucketPassportProfile = PassportProfile & { id?: string; displayName?: string; @@ -119,7 +121,7 @@ export class BitbucketAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts b/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts index 21ec7371e5..7570eb9156 100644 --- a/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts +++ b/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts @@ -138,12 +138,28 @@ describe('CloudflareAccessAuthProvider', () => { const provider = new CloudflareAccessAuthProvider({ teamName: 'foobar', resolverContext: {} as AuthResolverContext, - authHandler: async ({ claims }) => ({ - profile: { - email: claims.email, - }, - }), - signInResolver: async () => { + authHandler: async result => { + expect(result).toEqual( + expect.objectContaining({ + claims: mockClaims, + cfIdentity: mockCfIdentity, + token: mockJwt, + }), + ); + return { + profile: { + email: result.claims.email, + }, + }; + }, + signInResolver: async ({ result }) => { + expect(result).toEqual( + expect.objectContaining({ + claims: mockClaims, + cfIdentity: mockCfIdentity, + token: mockJwt, + }), + ); return { token: 'eyblob.eyJzdWIiOiJ1c2VyOmRlZmF1bHQvamltbXltYXJrdW0iLCJlbnQiOlsidXNlcjpkZWZhdWx0L2ppbW15bWFya3VtIl19.eyblob', diff --git a/plugins/auth-backend/src/providers/cloudflare-access/provider.ts b/plugins/auth-backend/src/providers/cloudflare-access/provider.ts index a2c16fcebf..0d8f736550 100644 --- a/plugins/auth-backend/src/providers/cloudflare-access/provider.ts +++ b/plugins/auth-backend/src/providers/cloudflare-access/provider.ts @@ -146,13 +146,13 @@ export type CloudflareAccessIdentityProfile = { }; /** - * * @public */ export type CloudflareAccessResult = { claims: CloudflareAccessClaims; cfIdentity: CloudflareAccessIdentityProfile; expiresInSeconds?: number; + token: string; }; /** @@ -262,7 +262,11 @@ export class CloudflareAccessAuthProvider implements AuthProviderRouteHandlers { const sub = verifyResult.payload.sub; const cfAccessResultStr = await this.cache?.get(`${CACHE_PREFIX}/${sub}`); if (typeof cfAccessResultStr === 'string') { - return JSON.parse(cfAccessResultStr) as CloudflareAccessResult; + const result = JSON.parse(cfAccessResultStr) as CloudflareAccessResult; + return { + ...result, + token: jwt, + }; } const claims = verifyResult.payload as CloudflareAccessClaims; // Builds a passport profile from JWT claims first @@ -273,13 +277,16 @@ export class CloudflareAccessAuthProvider implements AuthProviderRouteHandlers { const cfIdentity = await this.getIdentityProfile(jwt); // Stores a stringified JSON object in cfaccess provider cache only when // we complete all steps - const cfAccessResult: CloudflareAccessResult = { + const cfAccessResult = { claims, cfIdentity, expiresInSeconds: claims.exp - claims.iat, }; this.cache?.set(`${CACHE_PREFIX}/${sub}`, JSON.stringify(cfAccessResult)); - return cfAccessResult; + return { + ...cfAccessResult, + token: jwt, + }; } catch (err) { throw new ForwardedError( 'Failed to populate access identity information', diff --git a/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts b/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts index c6e9107353..9143d63143 100644 --- a/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts +++ b/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts @@ -22,6 +22,8 @@ import { AuthProviderFactory, SignInResolver } from './types'; * * The returned object facilitates the creation of provider instances, and * supplies built-in sign-in resolvers for the specific provider. + * + * @public */ export function createAuthProviderIntegration< TCreateOptions extends unknown[], diff --git a/plugins/auth-backend/src/providers/github/provider.test.ts b/plugins/auth-backend/src/providers/github/provider.test.ts index 18690a986b..ff750223d3 100644 --- a/plugins/auth-backend/src/providers/github/provider.test.ts +++ b/plugins/auth-backend/src/providers/github/provider.test.ts @@ -21,6 +21,15 @@ import { makeProfileInfo } from '../../lib/passport/PassportStrategyHelper'; import { OAuthStartRequest, encodeState } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + ...jest.requireActual('../../lib/passport/PassportStrategyHelper'), + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index 9c115b5eb8..7571b4a327 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -26,7 +26,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, StateEncoder, @@ -52,6 +52,7 @@ type PrivateInfo = { refreshToken?: string; }; +/** @public */ export type GithubOAuthResult = { fullProfile: PassportProfile; params: { @@ -106,7 +107,7 @@ export class GithubAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: (await this.stateEncoder(req)).encodedState, diff --git a/plugins/auth-backend/src/providers/gitlab/provider.test.ts b/plugins/auth-backend/src/providers/gitlab/provider.test.ts index 169930786b..f9e1442661 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.test.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.test.ts @@ -23,6 +23,14 @@ import { PassportProfile } from '../../lib/passport/types'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index c24c2e128d..7f5489d391 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -25,7 +25,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthHandler, AuthResolverContext, @@ -110,7 +110,7 @@ export class GitlabAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: encodeState(req.state), diff --git a/plugins/auth-backend/src/providers/google/provider.test.ts b/plugins/auth-backend/src/providers/google/provider.test.ts index 2e904c62ad..3c0b367be2 100644 --- a/plugins/auth-backend/src/providers/google/provider.test.ts +++ b/plugins/auth-backend/src/providers/google/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/google/provider.ts b/plugins/auth-backend/src/providers/google/provider.ts index f60d4e9947..7689cd1a3a 100644 --- a/plugins/auth-backend/src/providers/google/provider.ts +++ b/plugins/auth-backend/src/providers/google/provider.ts @@ -39,7 +39,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -98,7 +98,7 @@ export class GoogleAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this.strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/index.ts b/plugins/auth-backend/src/providers/index.ts index 83dd1c6c1f..67d3a62990 100644 --- a/plugins/auth-backend/src/providers/index.ts +++ b/plugins/auth-backend/src/providers/index.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -export { AtlassianAuthProvider } from './atlassian'; export type { AwsAlbResult } from './aws-alb'; export type { BitbucketOAuthResult, @@ -50,6 +49,7 @@ export type { StateEncoder, AuthResponse, ProfileInfo, + OAuthStartResponse, } from './types'; export { prepareBackstageIdentityResponse } from './prepareBackstageIdentityResponse'; diff --git a/plugins/auth-backend/src/providers/microsoft/provider.test.ts b/plugins/auth-backend/src/providers/microsoft/provider.test.ts index e9b4424a95..e4e919004c 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.test.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.test.ts @@ -23,6 +23,12 @@ import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/microsoft/provider.ts b/plugins/auth-backend/src/providers/microsoft/provider.ts index db79dba225..fd2a1529a7 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.ts @@ -38,7 +38,7 @@ import { } from '../../lib/passport'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -97,7 +97,7 @@ export class MicrosoftAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: encodeState(req.state), diff --git a/plugins/auth-backend/src/providers/oauth2/provider.test.ts b/plugins/auth-backend/src/providers/oauth2/provider.test.ts index 23e08dd729..9bdf7095f3 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.test.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/oauth2/provider.ts b/plugins/auth-backend/src/providers/oauth2/provider.ts index 6fa649c421..3e7720b14a 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.ts @@ -39,7 +39,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -114,7 +114,7 @@ export class OAuth2AuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/oidc/provider.ts b/plugins/auth-backend/src/providers/oidc/provider.ts index eb963a3711..bce8ba843b 100644 --- a/plugins/auth-backend/src/providers/oidc/provider.ts +++ b/plugins/auth-backend/src/providers/oidc/provider.ts @@ -40,7 +40,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -91,7 +91,7 @@ export class OidcAuthProvider implements OAuthHandlers { this.resolverContext = options.resolverContext; } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { const { strategy } = await this.implementation; const options: Record = { scope: req.scope || this.scope || 'openid profile email', diff --git a/plugins/auth-backend/src/providers/okta/provider.test.ts b/plugins/auth-backend/src/providers/okta/provider.test.ts index 468c4cdcc8..bc27129300 100644 --- a/plugins/auth-backend/src/providers/okta/provider.test.ts +++ b/plugins/auth-backend/src/providers/okta/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/okta/provider.ts b/plugins/auth-backend/src/providers/okta/provider.ts index cb686f17e9..05e0451bdb 100644 --- a/plugins/auth-backend/src/providers/okta/provider.ts +++ b/plugins/auth-backend/src/providers/okta/provider.ts @@ -38,7 +38,7 @@ import { } from '../../lib/passport'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -125,7 +125,7 @@ export class OktaAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this.strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index 59b57b3851..ac636f92cc 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -37,7 +37,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, AuthResolverContext, @@ -95,7 +95,7 @@ export class OneLoginProvider implements OAuthHandlers { }, ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/types.ts b/plugins/auth-backend/src/providers/types.ts index c99bdfbadb..574afade79 100644 --- a/plugins/auth-backend/src/providers/types.ts +++ b/plugins/auth-backend/src/providers/types.ts @@ -126,7 +126,8 @@ export type AuthProviderConfig = { cookieConfigurer?: CookieConfigurer; }; -export type RedirectInfo = { +/** @public */ +export type OAuthStartResponse = { /** * URL to redirect to */ @@ -147,6 +148,8 @@ export type RedirectInfo = { * `/auth/[provider]/handler/frame -> frameHandler` * `/auth/[provider]/refresh -> refresh` * `/auth/[provider]/logout -> logout` + * + * @public */ export interface AuthProviderRouteHandlers { /** @@ -192,6 +195,7 @@ export interface AuthProviderRouteHandlers { logout?(req: express.Request, res: express.Response): Promise; } +/** @public */ export type AuthProviderFactory = (options: { providerId: string; globalConfig: AuthProviderConfig; diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index e4fa5eeea4..8fd758f1b4 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -36,8 +36,10 @@ import passport from 'passport'; import { Minimatch } from 'minimatch'; import { CatalogAuthResolverContext } from '../lib/resolvers'; -type ProviderFactories = { [s: string]: AuthProviderFactory }; +/** @public */ +export type ProviderFactories = { [s: string]: AuthProviderFactory }; +/** @public */ export interface RouterOptions { logger: Logger; database: PluginDatabaseManager; @@ -48,6 +50,7 @@ export interface RouterOptions { providerFactories?: ProviderFactories; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { @@ -187,6 +190,7 @@ export async function createRouter( return router; } +/** @public */ export function createOriginFilter( config: Config, ): (origin: string) => boolean { diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index c01c24590d..f965e4ac8f 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-node +## 0.2.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index 2fd4f470c5..2f8509889d 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.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "jose": "^4.6.0", @@ -31,7 +31,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "lodash": "^4.17.21", "msw": "^0.45.0", "uuid": "^8.0.0" diff --git a/plugins/auth-node/src/IdentityClient.test.ts b/plugins/auth-node/src/IdentityClient.test.ts index 5451bd3f9e..bdc7dd5cd7 100644 --- a/plugins/auth-node/src/IdentityClient.test.ts +++ b/plugins/auth-node/src/IdentityClient.test.ts @@ -13,7 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { PluginEndpointDiscovery } from '@backstage/backend-common'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { decodeProtectedHeader, exportJWK, @@ -100,9 +102,7 @@ describe('IdentityClient', () => { let factory: FakeTokenFactory; const keyDurationSeconds = 5; - beforeAll(() => server.listen({ onUnhandledRequest: 'error' })); - afterAll(() => server.close()); - afterEach(() => server.resetHandlers()); + setupRequestMockHandlers(server); beforeEach(() => { client = IdentityClient.create({ discovery, issuer: mockBaseUrl }); diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 5c8de9557e..239cf68d52 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,52 @@ # @backstage/plugin-azure-devops-backend +## 0.3.15-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- cb1cfc018b: `createRouter` now requires an additional reader: `UrlReader` argument + + ```diff + export default async function createPlugin( + env: PluginEnvironment, + ): Promise { + return createRouter({ + logger: env.logger, + config: env.config, + + reader: env.reader, + }); + } + ``` + + Remember to check if you have already provided these settings previously. + + #### [Azure DevOps] + + ```yaml + # app-config.yaml + azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company + ``` + + #### [Azure Integrations] + + ```yaml + # app-config.yaml + integrations: + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} + ``` + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 0b57991cb9..91c2992116 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.14", + "version": "0.3.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,9 +23,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-azure-devops-common": "^0.2.4", + "@backstage/plugin-azure-devops-common": "^0.3.0-next.0", "@types/express": "^4.17.6", "azure-devops-node-api": "^11.0.1", "express": "^4.17.1", @@ -36,7 +36,7 @@ "mime-types": "^2.1.27" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.45.0" diff --git a/plugins/azure-devops-common/CHANGELOG.md b/plugins/azure-devops-common/CHANGELOG.md index cdd02cc625..8f0c5b9f76 100644 --- a/plugins/azure-devops-common/CHANGELOG.md +++ b/plugins/azure-devops-common/CHANGELOG.md @@ -1,5 +1,58 @@ # @backstage/plugin-azure-devops-common +## 0.3.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + ## 0.2.4 ### Patch Changes diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index 40803ae633..2be8c22935 100644 --- a/plugins/azure-devops-common/package.json +++ b/plugins/azure-devops-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-common", - "version": "0.2.4", + "version": "0.3.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli package clean" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index f108dd1424..85b3800c30 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,64 @@ # @backstage/plugin-azure-devops +## 0.2.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.24 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index af2e47532f..d80e01fbe9 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.24", + "version": "0.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-azure-devops-common": "^0.2.4", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-azure-devops-common": "^0.3.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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 c9730194af..f26dab77f3 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-badges-backend +## 0.1.30-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + ## 0.1.29 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index e642121802..de173d3b46 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.29", + "version": "0.1.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 534c433781..5f59e32bbc 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges +## 0.2.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.32 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 522b860c47..8a850e321e 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.32", + "version": "0.2.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index d607584548..b6cec7bc0d 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-bazaar-backend +## 0.1.20-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 85539c6dab..340a261a97 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", "@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.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index c1c9f91eed..ffb5d62bb3 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-bazaar +## 0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + ## 0.1.23 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index db2b72f920..4d39f92a09 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.23", + "version": "0.1.24-next.0", "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", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/cli": "^0.18.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@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.18.1", - "@backstage/dev-utils": "^1.0.5", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.1.5" }, diff --git a/plugins/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index e6c2f366d6..4c31b9fccd 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index c2c8534013..217db60c1e 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitbucket-cloud-common", "description": "Common functionalities for bitbucket-cloud plugins", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,11 +28,11 @@ "update-models": "yarn refresh-schema && yarn generate-models && yarn reduce-models" }, "dependencies": { - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@openapitools/openapi-generator-cli": "^2.4.26", "msw": "^0.45.0", "ts-morph": "^15.0.0" diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 8fd4113dd2..531efcf02d 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bitrise +## 0.1.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.35 ### Patch Changes diff --git a/plugins/bitrise/api-report.md b/plugins/bitrise/api-report.md index f8421a532a..01d10c61cf 100644 --- a/plugins/bitrise/api-report.md +++ b/plugins/bitrise/api-report.md @@ -8,18 +8,15 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; -// Warning: (ae-missing-release-tag) "bitrisePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const BITRISE_APP_ANNOTATION = 'bitrise.io/app'; + // @public (undocumented) export const bitrisePlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "EntityBitriseContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityBitriseContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isBitriseAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isBitriseAvailable: (entity: Entity) => boolean; ``` diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 7daf3c48fb..558cf618b3 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.35", + "version": "0.1.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@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.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx b/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx index 19e97628df..2dcffc3bb3 100644 --- a/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx +++ b/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx @@ -20,7 +20,7 @@ import { BitriseBuildDetailsDialog } from './BitriseBuildDetailsDialog'; import { BitriseBuildResult } from '../../api/bitriseApi.model'; jest.mock('../BitriseArtifactsComponent', () => ({ - BitriseArtifactsComponent: (_props: { build: string }) => <>, + BitriseArtifactsComponent: (_props: { build: string }) => <>VISIBLE, })); describe('BitriseArtifactsComponent', () => { @@ -42,18 +42,14 @@ describe('BitriseArtifactsComponent', () => { expect(await rendered.findByTestId('btn')).toBeInTheDocument(); }); - it('should change the state when the button is clicked', async () => { - const setOpen = jest.fn(); - const useStateMock: any = (initState: any) => [initState, setOpen]; - - jest.spyOn(React, 'useState').mockImplementation(useStateMock); - + it('should open the modal when clicked to render the ArtifactsComponent', async () => { const rendered = renderComponent(); - const btn = await rendered.findByTestId('btn'); + expect(await rendered.queryByText('VISIBLE')).not.toBeInTheDocument(); + btn.click(); - expect(setOpen).toHaveBeenCalled(); + expect(rendered.getByText('VISIBLE')).toBeInTheDocument(); }); }); diff --git a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx index f805f050fa..3c93fb20d7 100644 --- a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx +++ b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx @@ -32,8 +32,10 @@ export type Props = { entity: Entity; }; +/** @public */ export const BITRISE_APP_ANNOTATION = 'bitrise.io/app'; +/** @public */ export const isBitriseAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[BITRISE_APP_ANNOTATION]); diff --git a/plugins/bitrise/src/extensions.ts b/plugins/bitrise/src/extensions.ts index ccb5fb24dd..e588f092d8 100644 --- a/plugins/bitrise/src/extensions.ts +++ b/plugins/bitrise/src/extensions.ts @@ -17,6 +17,7 @@ import { bitrisePlugin } from './plugin'; import { createComponentExtension } from '@backstage/core-plugin-api'; +/** @public */ export const EntityBitriseContent = bitrisePlugin.provide( createComponentExtension({ name: 'EntityBitriseContent', diff --git a/plugins/bitrise/src/index.ts b/plugins/bitrise/src/index.ts index 3cf1389013..54cce62cec 100644 --- a/plugins/bitrise/src/index.ts +++ b/plugins/bitrise/src/index.ts @@ -22,4 +22,7 @@ export { bitrisePlugin } from './plugin'; export { EntityBitriseContent } from './extensions'; -export { isBitriseAvailable } from './components/BitriseBuildsComponent'; +export { + isBitriseAvailable, + BITRISE_APP_ANNOTATION, +} from './components/BitriseBuildsComponent'; diff --git a/plugins/bitrise/src/plugin.ts b/plugins/bitrise/src/plugin.ts index 92beda287c..2b75f6d8b5 100644 --- a/plugins/bitrise/src/plugin.ts +++ b/plugins/bitrise/src/plugin.ts @@ -28,6 +28,7 @@ export const bitriseApiRef = createApiRef({ id: 'plugin.bitrise.service', }); +/** @public */ export const bitrisePlugin = createPlugin({ id: 'bitrise', apis: [ diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index ab7ac4b3ac..8f9db30419 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.8 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index 5b4eefb70b..a2f7c499dd 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.8", + "version": "0.1.9-next.0", "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.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@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.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "aws-sdk-mock": "^5.2.1", "yaml": "^2.0.0" diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index d7f0d022ce..fa502fe75a 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 9cd034bc51..ccb6985475 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.6", + "version": "0.1.7-next.0", "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.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.45.0", @@ -48,8 +48,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 2586ee3a5a..17a73fc25c 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index 83a33bc23d..4d9da39c66 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,18 +33,18 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-bitbucket-cloud-common": "^0.1.2", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-bitbucket-cloud-common": "^0.1.3-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "msw": "^0.45.0" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index 216de9ff65..8fcfee0ba5 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/api-report.md b/plugins/catalog-backend-module-bitbucket-server/api-report.md index 1f40f22242..7d95e148a3 100644 --- a/plugins/catalog-backend-module-bitbucket-server/api-report.md +++ b/plugins/catalog-backend-module-bitbucket-server/api-report.md @@ -10,6 +10,7 @@ import { EntityProvider } from '@backstage/plugin-catalog-backend'; import { EntityProviderConnection } from '@backstage/plugin-catalog-backend'; import { LocationSpec } from '@backstage/plugin-catalog-backend'; import { Logger } from 'winston'; +import { Response as Response_2 } from 'node-fetch'; import { TaskRunner } from '@backstage/backend-tasks'; // @public @@ -24,7 +25,7 @@ export class BitbucketServerClient { projectKey: string; repo: string; path: string; - }): Promise; + }): Promise; // (undocumented) getRepository(options: { projectKey: string; diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index d3ffc0a946..ebc7b929ca 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,20 +32,21 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.0.1", "@backstage/config": "^1.0.0", "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "cross-fetch": "^3.1.5", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@types/node-fetch": "^2.5.12", + "node-fetch": "^2.6.7", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "msw": "^0.45.0" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts index 66ccdc8c9a..d205b7434e 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.test.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { BitbucketServerIntegrationConfig } from '@backstage/integration'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; @@ -49,9 +50,7 @@ describe('BitbucketServerClient', () => { config: config, }); - beforeAll(() => server.listen({ onUnhandledRequest: 'error' })); - afterAll(() => server.close()); - afterEach(() => server.resetHandlers()); + setupRequestMockHandlers(server); it('listProjects', async () => { server.use( diff --git a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts index 025cc555ce..b5baf66afd 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/lib/BitbucketServerClient.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { fetch, Request } from 'cross-fetch'; +import fetch, { Request, Response } from 'node-fetch'; import { BitbucketServerIntegrationConfig, getBitbucketServerRequestOptions, diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md index 1f1761bc71..e7bebee4b7 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.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index e67d1267f4..36b669c81d 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.2", + "version": "0.2.3-next.0", "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.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-bitbucket-cloud-common": "^0.1.2", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-bitbucket-cloud-common": "^0.1.3-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.45.0", @@ -47,8 +47,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts b/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts index ad893e7c87..c2f98bf549 100644 --- a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts +++ b/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts @@ -15,6 +15,7 @@ */ import { getVoidLogger } from '@backstage/backend-common'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { ConfigReader } from '@backstage/config'; import { Models } from '@backstage/plugin-bitbucket-cloud-common'; import { @@ -175,9 +176,7 @@ function setupBitbucketCloudSearchStubs( } describe('BitbucketDiscoveryProcessor', () => { - beforeAll(() => server.listen()); - afterEach(() => server.resetHandlers()); - afterAll(() => server.close()); + setupRequestMockHandlers(server); afterEach(() => jest.resetAllMocks()); diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index b4292da75c..73f86afd2f 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index b068709b96..b81603232c 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.3", + "version": "0.1.4-next.0", "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.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "fs-extra": "10.1.0", "msw": "^0.45.0", "node-fetch": "^2.6.7", @@ -42,8 +42,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/fs-extra": "^9.0.1" }, "files": [ diff --git a/plugins/catalog-backend-module-gerrit/src/providers/GerritEntityProvider.test.ts b/plugins/catalog-backend-module-gerrit/src/providers/GerritEntityProvider.test.ts index ee65d536c7..26aacb9126 100644 --- a/plugins/catalog-backend-module-gerrit/src/providers/GerritEntityProvider.test.ts +++ b/plugins/catalog-backend-module-gerrit/src/providers/GerritEntityProvider.test.ts @@ -13,9 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { getVoidLogger } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { TaskInvocationDefinition, TaskRunner } from '@backstage/backend-tasks'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { EntityProviderConnection } from '@backstage/plugin-catalog-backend'; import { rest } from 'msw'; import fs from 'fs-extra'; @@ -49,12 +51,11 @@ class PersistingTaskRunner implements TaskRunner { const logger = getVoidLogger(); describe('GerritEntityProvider', () => { - beforeAll(() => server.listen()); + setupRequestMockHandlers(server); + afterEach(() => { jest.resetAllMocks(); - server.resetHandlers(); }); - afterAll(() => server.close()); const config = new ConfigReader({ catalog: { diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index 2e9c03529b..72fb0d52df 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-github +## 0.1.7-next.0 + +### Patch Changes + +- 3c4a388537: New experimental alpha exports for use with the upcoming backend system. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 4c9202e6f5..9dade48c04 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.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,15 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", - "@backstage/backend-plugin-api": "^0.1.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/backend-plugin-api": "^0.1.2-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-catalog-node": "^1.0.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", "@backstage/types": "^1.0.0", "@octokit/graphql": "^5.0.0", "lodash": "^4.17.21", @@ -52,8 +52,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts b/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts index a40ab4eb5c..5cc464d345 100644 --- a/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts +++ b/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts @@ -21,6 +21,11 @@ import { EntityProviderConnection } from '@backstage/plugin-catalog-backend'; import { GitHubEntityProvider } from './GitHubEntityProvider'; import * as helpers from '../lib/github'; +jest.mock('../lib/github', () => { + return { + getOrganizationRepositories: jest.fn(), + }; +}); class PersistingTaskRunner implements TaskRunner { private tasks: TaskInvocationDefinition[] = []; diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index e3f269514b..dbd243050e 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index d06cc6f429..0146c7af45 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.6", + "version": "0.1.7-next.0", "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.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", "msw": "^0.45.0", @@ -48,8 +48,8 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "@types/uuid": "^8.0.0" }, diff --git a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts index 341167f279..d0f2eb383d 100644 --- a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts @@ -15,6 +15,7 @@ */ import { getVoidLogger } from '@backstage/backend-common'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { ConfigReader } from '@backstage/config'; import { LocationSpec } from '@backstage/plugin-catalog-backend'; import { rest, RestRequest } from 'msw'; @@ -149,14 +150,14 @@ function getProcessor({ } describe('GitlabDiscoveryProcessor', () => { + setupRequestMockHandlers(server); + beforeAll(() => { - server.listen(); jest.useFakeTimers('modern'); jest.setSystemTime(new Date(SERVER_TIME)); }); - afterEach(() => server.resetHandlers()); + afterAll(() => { - server.close(); jest.useRealTimers(); }); diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 8e41d6325b..dec2c7a657 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.3-next.0 + +### Patch Changes + +- c54fcea9af: Now the `searchStream` method in LDAP client awaits the callbacks +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + ## 0.5.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 1de6cbd331..1244605ff9 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.2", + "version": "0.5.3-next.0", "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.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@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.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index f914f83f00..8da7b81927 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.4.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 4c82b955fc: Fix typo +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + ## 0.4.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index c12f1bfaf5..835a9e2846 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,10 +34,10 @@ }, "dependencies": { "@azure/identity": "^2.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -48,9 +48,9 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "msw": "^0.45.0" }, diff --git a/plugins/catalog-backend-module-msgraph/src/processors/MicrosoftGraphOrgEntityProvider.ts b/plugins/catalog-backend-module-msgraph/src/processors/MicrosoftGraphOrgEntityProvider.ts index 4c38198b0d..67f3039873 100644 --- a/plugins/catalog-backend-module-msgraph/src/processors/MicrosoftGraphOrgEntityProvider.ts +++ b/plugins/catalog-backend-module-msgraph/src/processors/MicrosoftGraphOrgEntityProvider.ts @@ -282,6 +282,8 @@ export class MicrosoftGraphOrgEntityProvider implements EntityProvider { client, provider.tenantId, { + userExpand: provider.userExpand, + groupExpand: provider.groupExpand, userFilter: provider.userFilter, userGroupMemberFilter: provider.userGroupMemberFilter, userGroupMemberSearch: provider.userGroupMemberSearch, diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index 660fbd4148..692239989b 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index ce08fcf4d3..ecf2a6b756 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.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,19 +34,19 @@ }, "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-catalog-node": "^1.0.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", "@backstage/types": "^1.0.0", "winston": "^3.2.1", "yaml": "^2.1.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "openapi-types": "^12.0.0" }, "files": [ diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index bc287ad98a..9810c789d7 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-backend +## 1.3.2-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.3.1 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index e537678bde..f90b051a75 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.3.1", + "version": "1.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,19 +34,19 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-plugin-api": "^0.1.1", - "@backstage/plugin-catalog-node": "^1.0.1", - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-plugin-api": "^0.1.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-node": "^0.6.4", - "@backstage/plugin-scaffolder-common": "^1.1.2", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", "codeowners-utils": "^1.0.2", @@ -70,10 +70,10 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-search-backend-node": "1.0.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-backend-node": "1.0.2-next.0", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/lodash": "^4.14.151", diff --git a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.test.ts b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.test.ts index 30c668bb38..cbb130d138 100644 --- a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.test.ts +++ b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.test.ts @@ -20,6 +20,7 @@ import { ANNOTATION_ORIGIN_LOCATION, Entity, EntityPolicies, + EntityPolicy, LocationEntity, } from '@backstage/catalog-model'; import { ScmIntegrations } from '@backstage/integration'; @@ -35,6 +36,7 @@ import { CatalogRulesEnforcer } from '../ingestion/CatalogRules'; import { DefaultCatalogProcessingOrchestrator } from './DefaultCatalogProcessingOrchestrator'; import { defaultEntityDataParser } from '../modules/util/parse'; import { ConfigReader } from '@backstage/config'; +import { InputError } from '@backstage/errors'; class FooBarProcessor implements CatalogProcessor { getProcessorName = () => 'foo-bar'; @@ -191,23 +193,23 @@ describe('DefaultCatalogProcessingOrchestrator', () => { }); describe('rules', () => { - it('enforces catalog rules', async () => { - const entity: LocationEntity = { - apiVersion: 'backstage.io/v1beta1', - kind: 'Location', - metadata: { - name: 'l', - annotations: { - [ANNOTATION_ORIGIN_LOCATION]: 'url:https://example.com/origin.yaml', - [ANNOTATION_LOCATION]: 'url:https://example.com/origin.yaml', - }, + const entity: LocationEntity = { + apiVersion: 'backstage.io/v1beta1', + kind: 'Location', + metadata: { + name: 'l', + annotations: { + [ANNOTATION_ORIGIN_LOCATION]: 'url:https://example.com/origin.yaml', + [ANNOTATION_LOCATION]: 'url:https://example.com/origin.yaml', }, - spec: { - type: 'url', - target: 'http://example.com/entity.yaml', - }, - }; + }, + spec: { + type: 'url', + target: 'http://example.com/entity.yaml', + }, + }; + it('enforces catalog rules', async () => { const integrations = ScmIntegrations.fromConfig(new ConfigReader({})); const processor: jest.Mocked = { getProcessorName: jest.fn(), @@ -241,5 +243,49 @@ describe('DefaultCatalogProcessingOrchestrator', () => { orchestrator.process({ entity, state: {} }), ).resolves.toEqual(expect.objectContaining({ ok: false })); }); + + it('includes entity ref within error', async () => { + const integrations = ScmIntegrations.fromConfig(new ConfigReader({})); + const processor: jest.Mocked = { + getProcessorName: jest.fn(), + validateEntityKind: jest.fn(async () => true), + readLocation: jest.fn(async (_l, _o, emit) => { + emit(processingResult.entity({ type: 't', target: 't' }, entity)); + return true; + }), + }; + const parser: CatalogProcessorParser = jest.fn(); + const rulesEnforcer: jest.Mocked = { + isAllowed: jest.fn(), + }; + + class FailingEntityPolicy implements EntityPolicy { + async enforce(_entity: Entity): Promise { + // eslint-disable-next-line no-throw-literal + throw 'boom'; + } + } + const orchestrator = new DefaultCatalogProcessingOrchestrator({ + processors: [processor], + integrations, + logger: getVoidLogger(), + parser, + policy: EntityPolicies.allOf([new FailingEntityPolicy()]), + rulesEnforcer, + }); + + await expect( + orchestrator.process({ entity, state: {} }), + ).resolves.toEqual( + expect.objectContaining({ + ok: false, + errors: [ + new InputError( + "Policy check failed for location:default/l; caused by unknown error 'boom'", + ), + ], + }), + ); + }); }); }); diff --git a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.ts b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.ts index 9effaeb3d9..79876f70d8 100644 --- a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.ts +++ b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingOrchestrator.ts @@ -211,11 +211,18 @@ export class DefaultCatalogProcessingOrchestrator try { policyEnforcedEntity = await this.options.policy.enforce(entity); } catch (e) { - throw new InputError('Policy check failed', e); + throw new InputError( + `Policy check failed for ${stringifyEntityRef(entity)}`, + e, + ); } if (!policyEnforcedEntity) { - throw new Error('Policy unexpectedly returned no data'); + throw new Error( + `Policy unexpectedly returned no data for ${stringifyEntityRef( + entity, + )}`, + ); } return policyEnforcedEntity; diff --git a/plugins/catalog-backend/src/search/DefaultCatalogCollator.test.ts b/plugins/catalog-backend/src/search/DefaultCatalogCollator.test.ts index 81abb91328..8c8e3f1a25 100644 --- a/plugins/catalog-backend/src/search/DefaultCatalogCollator.test.ts +++ b/plugins/catalog-backend/src/search/DefaultCatalogCollator.test.ts @@ -18,6 +18,7 @@ import { PluginEndpointDiscovery, TokenManager, } from '@backstage/backend-common'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { Entity } from '@backstage/catalog-model'; import { DefaultCatalogCollator } from './DefaultCatalogCollator'; import { setupServer } from 'msw/node'; @@ -61,6 +62,7 @@ describe('DefaultCatalogCollator', () => { let mockTokenManager: jest.Mocked; let collator: DefaultCatalogCollator; + setupRequestMockHandlers(server); beforeAll(() => { mockDiscoveryApi = { getBaseUrl: jest.fn().mockResolvedValue('http://localhost:7007'), @@ -74,7 +76,6 @@ describe('DefaultCatalogCollator', () => { discovery: mockDiscoveryApi, tokenManager: mockTokenManager, }); - server.listen(); }); beforeEach(() => { server.use( @@ -91,9 +92,7 @@ describe('DefaultCatalogCollator', () => { }), ); }); - afterEach(() => server.resetHandlers()); afterAll(() => { - server.close(); jest.useRealTimers(); }); diff --git a/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.test.ts b/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.test.ts index ccb61b8680..5fc8ca6fbf 100644 --- a/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.test.ts +++ b/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.test.ts @@ -17,6 +17,7 @@ import { PluginEndpointDiscovery, TokenManager, } from '@backstage/backend-common'; +import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; import { Entity } from '@backstage/catalog-model'; import { ConfigReader } from '@backstage/config'; import { TestPipeline } from '@backstage/plugin-search-backend-node'; @@ -72,9 +73,7 @@ describe('DefaultCatalogCollatorFactory', () => { tokenManager: mockTokenManager, }; - beforeAll(() => { - server.listen(); - }); + setupRequestMockHandlers(server); beforeEach(() => { server.use( @@ -96,12 +95,6 @@ describe('DefaultCatalogCollatorFactory', () => { ); }); - afterAll(() => { - server.close(); - }); - - afterEach(() => server.resetHandlers()); - it('has expected type', () => { const factory = DefaultCatalogCollatorFactory.fromConfig(config, options); expect(factory.type).toBe('software-catalog'); diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index b3e150edc8..45d1e9bbec 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-common +## 1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.5 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 09911048ee..835fdb411e 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.5", + "version": "1.0.6-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.3", - "@backstage/plugin-search-common": "^1.0.0" + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/catalog-customized/CHANGELOG.md b/plugins/catalog-customized/CHANGELOG.md index 7d4ce71cb2..d8c95242db 100644 --- a/plugins/catalog-customized/CHANGELOG.md +++ b/plugins/catalog-customized/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-catalog-customized +## 0.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + ## 0.0.1 ### Patch Changes diff --git a/plugins/catalog-customized/package.json b/plugins/catalog-customized/package.json index 747897da41..6513b62d53 100644 --- a/plugins/catalog-customized/package.json +++ b/plugins/catalog-customized/package.json @@ -1,7 +1,7 @@ { "name": "@internal/plugin-catalog-customized", "description": "The internal Backstage Customizable plugin for browsing the Backstage catalog", - "version": "0.0.1", + "version": "0.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-catalog-react": "^1.1.3" + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0" }, "devDependencies": { "@types/react": "^16.13.1 || ^17.0.0" diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 398aec357f..380d4610ab 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-graph +## 0.2.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.20 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 14f5aecb0d..d74c10b50a 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.20", + "version": "0.2.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -45,11 +45,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/types": "^1.0.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md index 3f2ffd4f64..92da5866ca 100644 --- a/plugins/catalog-graphql/CHANGELOG.md +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-catalog-graphql +## 0.3.13-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 0.3.12 ### Patch Changes diff --git a/plugins/catalog-graphql/api-report.md b/plugins/catalog-graphql/api-report.md index e14fd988d0..f03ed94af5 100644 --- a/plugins/catalog-graphql/api-report.md +++ b/plugins/catalog-graphql/api-report.md @@ -7,13 +7,9 @@ import { Config } from '@backstage/config'; import { Logger } from 'winston'; import { Module } from 'graphql-modules'; -// Warning: (ae-missing-release-tag) "createModule" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createModule(options: ModuleOptions): Promise; -// Warning: (ae-missing-release-tag) "ModuleOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ModuleOptions { // (undocumented) diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 533d07ac1e..af85222603 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-graphql", "description": "An experimental Backstage catalog GraphQL module", - "version": "0.3.12", + "version": "0.3.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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-graphql/src/graphql/module.ts b/plugins/catalog-graphql/src/graphql/module.ts index e33ee429b4..e27adbbaf1 100644 --- a/plugins/catalog-graphql/src/graphql/module.ts +++ b/plugins/catalog-graphql/src/graphql/module.ts @@ -27,11 +27,13 @@ import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json'; import { Entity } from '@backstage/catalog-model'; import typeDefs from '../schema'; +/** @public */ export interface ModuleOptions { logger: Logger; config: Config; } +/** @public */ export async function createModule(options: ModuleOptions): Promise { const catalogClient = new CatalogClient( options.config.getString('backend.baseUrl'), diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index bbed459737..7a157d4bd6 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-import +## 0.8.12-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.8.11 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 63120c05b0..3e02888b94 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.11", + "version": "0.8.12-next.0", "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", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-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.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index 5a65738d61..98aea30638 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -37,7 +37,7 @@ const octokit = { }, }; -jest.doMock('@octokit/rest', () => { +jest.mock('@octokit/rest', () => { class Octokit { constructor() { return octokit; diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index 04b65bb4ba..ac0e62054c 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-node +## 1.0.2-next.0 + +### Patch Changes + +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index 08f61b699c..4513f8ab2b 100644 --- a/plugins/catalog-node/package.json +++ b/plugins/catalog-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-node", "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,14 +25,14 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-plugin-api": "^0.1.1", + "@backstage/backend-plugin-api": "^0.1.2-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/errors": "1.1.0", "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/cli": "^0.18.1" + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 964e1e0017..5176b633ba 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-react +## 1.1.4-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + ## 1.1.3 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 08987df622..291def38c6 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.3", + "version": "1.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,15 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-react": "^0.4.4", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", @@ -63,11 +63,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-scaffolder-common": "^1.1.2", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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 578b51c61b..cc178e78c5 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog +## 1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.5.0 ### Minor Changes diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 98bc7ab89e..377b62a1e6 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -64,6 +64,9 @@ export type BackstageOverrides = Overrides & { >; }; +// @public (undocumented) +export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; + // @public (undocumented) export const CatalogEntityPage: () => JSX.Element; @@ -79,8 +82,6 @@ export interface CatalogKindHeaderProps { initialFilter?: string; } -// Warning: (ae-forgotten-export) The symbol "CatalogInputPluginOptions" needs to be exported by the entry point index.d.ts -// // @public (undocumented) export const catalogPlugin: BackstagePlugin< { @@ -176,6 +177,9 @@ export interface CatalogTableRow { }; } +// @public (undocumented) +export type ColumnBreakpoints = Record; + // @public export interface DefaultCatalogPageProps { // (undocumented) @@ -296,15 +300,11 @@ export type EntityLayoutRouteProps = { >; }; -// Warning: (ae-forgotten-export) The symbol "EntityLinksCard" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export const EntityLinksCard: EntityLinksCard_2; +export const EntityLinksCard: (props: EntityLinksCardProps) => JSX.Element; // @public (undocumented) export interface EntityLinksCardProps { - // Warning: (ae-forgotten-export) The symbol "ColumnBreakpoints" needs to be exported by the entry point index.d.ts - // // (undocumented) cols?: ColumnBreakpoints | number; // (undocumented) diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index ba20f0d285..5465814ef9 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.5.0", + "version": "1.5.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,16 +34,16 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", @@ -61,11 +61,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-permission-react": "^0.4.4", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/components/EntityLinksCard/EntityLinksCard.tsx b/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx index 10302d7837..ebc551c29f 100644 --- a/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx +++ b/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx @@ -29,7 +29,7 @@ export interface EntityLinksCardProps { variant?: InfoCardVariants; } -export function EntityLinksCard(props: EntityLinksCardProps) { +export const EntityLinksCard = (props: EntityLinksCardProps) => { const { cols = undefined, variant } = props; const { entity } = useEntity(); const app = useApp(); @@ -55,4 +55,4 @@ export function EntityLinksCard(props: EntityLinksCardProps) { )} ); -} +}; diff --git a/plugins/catalog/src/components/EntityLinksCard/index.ts b/plugins/catalog/src/components/EntityLinksCard/index.ts index dcd4366066..eb3beda6ea 100644 --- a/plugins/catalog/src/components/EntityLinksCard/index.ts +++ b/plugins/catalog/src/components/EntityLinksCard/index.ts @@ -17,3 +17,4 @@ export { EntityLinksCard } from './EntityLinksCard'; export type { EntityLinksCardProps } from './EntityLinksCard'; export type { EntityLinksEmptyStateClassKey } from './EntityLinksEmptyState'; +export type { Breakpoint, ColumnBreakpoints } from './types'; diff --git a/plugins/catalog/src/components/EntityLinksCard/types.ts b/plugins/catalog/src/components/EntityLinksCard/types.ts index e3cd1a94ac..fdd9c9c07c 100644 --- a/plugins/catalog/src/components/EntityLinksCard/types.ts +++ b/plugins/catalog/src/components/EntityLinksCard/types.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +/** @public */ export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; +/** @public */ export type ColumnBreakpoints = Record; diff --git a/plugins/catalog/src/index.ts b/plugins/catalog/src/index.ts index f0f94656d5..886039e329 100644 --- a/plugins/catalog/src/index.ts +++ b/plugins/catalog/src/index.ts @@ -59,6 +59,8 @@ export type { DependsOnResourcesCardProps } from './components/DependsOnResource export type { EntityLinksEmptyStateClassKey, EntityLinksCardProps, + Breakpoint, + ColumnBreakpoints, } from './components/EntityLinksCard'; export type { SystemDiagramCardClassKey } from './components/SystemDiagramCard'; export type { DefaultCatalogPageProps } from './components/CatalogPage'; diff --git a/plugins/catalog/src/options.ts b/plugins/catalog/src/options.ts index 1d8b972ec2..bb248c16b6 100644 --- a/plugins/catalog/src/options.ts +++ b/plugins/catalog/src/options.ts @@ -20,6 +20,7 @@ export type CatalogPluginOptions = { createButtonTitle: string; }; +/** @ignore */ export type CatalogInputPluginOptions = { createButtonTitle: string; }; diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index 163776416b..4846df3e12 100644 --- a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md +++ b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cicd-statistics-module-gitlab +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-cicd-statistics@0.1.11-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index b034b48177..294b36eacd 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics-module-gitlab", "description": "CI/CD Statistics plugin module; Gitlab CICD", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,16 +29,16 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/plugin-cicd-statistics": "^0.1.10", + "@backstage/plugin-cicd-statistics": "^0.1.11-next.0", "@gitbeaker/browser": "^35.6.0", "@gitbeaker/core": "^35.6.0", "luxon": "^3.0.0", "p-limit": "^4.0.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/catalog-model": "^1.1.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/cicd-statistics/CHANGELOG.md b/plugins/cicd-statistics/CHANGELOG.md index 268e32b825..f8d3c66ca5 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cicd-statistics +## 0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.10 ### Patch Changes diff --git a/plugins/cicd-statistics/api-report.md b/plugins/cicd-statistics/api-report.md index e49c6b27dc..b0966aa281 100644 --- a/plugins/cicd-statistics/api-report.md +++ b/plugins/cicd-statistics/api-report.md @@ -10,13 +10,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "AbortError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AbortError extends Error {} -// Warning: (ae-missing-release-tag) "Build" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface Build { branchType: FilterBranchType; @@ -30,25 +26,17 @@ export interface Build { triggeredBy?: TriggerReason; } -// Warning: (ae-missing-release-tag) "BuildWithRaw" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type BuildWithRaw = Build & { raw: T; }; -// Warning: (ae-missing-release-tag) "ChartType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type ChartType = 'duration' | 'count'; -// Warning: (ae-missing-release-tag) "ChartTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type ChartTypes = Array; -// Warning: (ae-missing-release-tag) "CicdConfiguration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdConfiguration { availableStatuses: ReadonlyArray; @@ -56,8 +44,6 @@ export interface CicdConfiguration { formatStageName: (parentNames: Array, stageName: string) => string; } -// Warning: (ae-missing-release-tag) "CicdDefaults" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdDefaults { chartTypes: Record; @@ -75,16 +61,12 @@ export interface CicdDefaults { timeTo: Date; } -// Warning: (ae-missing-release-tag) "CicdState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdState { // (undocumented) builds: Array; } -// Warning: (ae-missing-release-tag) "CicdStatisticsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdStatisticsApi { // (undocumented) @@ -95,13 +77,9 @@ export interface CicdStatisticsApi { ): Promise>; } -// Warning: (ae-missing-release-tag) "cicdStatisticsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cicdStatisticsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "cicdStatisticsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cicdStatisticsPlugin: BackstagePlugin< { @@ -111,18 +89,12 @@ export const cicdStatisticsPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityCicdStatisticsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCicdStatisticsContent: EntityPageCicdCharts; -// Warning: (ae-missing-release-tag) "EntityPageCicdCharts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function EntityPageCicdCharts(): JSX.Element; -// Warning: (ae-missing-release-tag) "FetchBuildsOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface FetchBuildsOptions { // (undocumented) @@ -141,13 +113,9 @@ export interface FetchBuildsOptions { updateProgress: UpdateProgress; } -// Warning: (ae-missing-release-tag) "FilterBranchType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type FilterBranchType = 'master' | 'branch'; -// Warning: (ae-missing-release-tag) "FilterStatusType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type FilterStatusType = | 'unknown' @@ -160,16 +128,12 @@ export type FilterStatusType = | 'stalled' | 'expired'; -// Warning: (ae-missing-release-tag) "GetConfigurationOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface GetConfigurationOptions { // (undocumented) entity: Entity; } -// Warning: (ae-missing-release-tag) "Stage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface Stage { duration: number; @@ -179,13 +143,9 @@ export interface Stage { status: FilterStatusType; } -// Warning: (ae-missing-release-tag) "statusTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const statusTypes: Array; -// Warning: (ae-missing-release-tag) "TriggerReason" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TriggerReason = /** Triggered by source code management, e.g. a Github hook */ @@ -197,13 +157,9 @@ export type TriggerReason = /** Triggered for some other reason */ | 'other'; -// Warning: (ae-missing-release-tag) "triggerReasons" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const triggerReasons: Array; -// Warning: (ae-missing-release-tag) "UpdateProgress" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface UpdateProgress { // (undocumented) diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index 10e5e5ea38..288416d3d5 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", - "version": "0.1.10", + "version": "0.1.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,8 +38,8 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@date-io/luxon": "^1.3.13", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.11.2", diff --git a/plugins/cicd-statistics/src/apis/cicd-statistics.ts b/plugins/cicd-statistics/src/apis/cicd-statistics.ts index 714900a1bd..3ece331ec9 100644 --- a/plugins/cicd-statistics/src/apis/cicd-statistics.ts +++ b/plugins/cicd-statistics/src/apis/cicd-statistics.ts @@ -15,9 +15,9 @@ */ import { createApiRef } from '@backstage/core-plugin-api'; - import { CicdStatisticsApi } from './types'; +/** @public */ export const cicdStatisticsApiRef = createApiRef({ id: 'cicd-statistics-api', }); diff --git a/plugins/cicd-statistics/src/apis/types.ts b/plugins/cicd-statistics/src/apis/types.ts index 32d9d3f2df..226fa3f55d 100644 --- a/plugins/cicd-statistics/src/apis/types.ts +++ b/plugins/cicd-statistics/src/apis/types.ts @@ -21,6 +21,8 @@ import { Entity } from '@backstage/catalog-model'; * * If all of these aren't applicable to the underlying CI/CD, these can be * configured to be hidden, using the `availableStatuses` in `CicdConfiguration`. + * + * @public */ export type FilterStatusType = | 'unknown' @@ -32,6 +34,10 @@ export type FilterStatusType = | 'failed' | 'stalled' | 'expired'; + +/** + * @public + */ export const statusTypes: Array = [ 'succeeded', 'failed', @@ -50,9 +56,14 @@ export const statusTypes: Array = [ * The concept of what constitutes a master branch is generic. It might be called * something like 'release' or 'main' or 'trunk' in the underlying CI/CD system, * which is then up to the Api to map accordingly. + * + * @public */ export type FilterBranchType = 'master' | 'branch'; +/** + * @public + */ export type TriggerReason = /** Triggered by source code management, e.g. a Github hook */ | 'scm' @@ -63,6 +74,9 @@ export type TriggerReason = /** Triggered for some other reason */ | 'other'; +/** + * @public + */ export const triggerReasons: Array = [ 'scm', 'manual', @@ -76,6 +90,8 @@ export const triggerReasons: Array = [ * This may be called things like Stage or Step or Task in CI/CD systems, but is * generic here. There's also no concept of parallelism which might exist within * some stages. + * + * @public */ export interface Stage { name: string; @@ -94,6 +110,8 @@ export interface Stage { * Generic Build type. * * A build has e.g. a build type (master/branch), a status and (possibly) sub stages. + * + * @public */ export interface Build { raw?: unknown; @@ -125,6 +143,8 @@ export interface Build { * * This can be useful in an Api to use while mapping internal data structures * (raw) into generic builds. + * + * @public */ export type BuildWithRaw = Build & { raw: T; @@ -136,8 +156,16 @@ export type BuildWithRaw = Build & { * Values are: * * `duration`: shows an area chart of the duration over time * * `count`: shows a bar chart of the number of build per day + * + * @public */ export type ChartType = 'duration' | 'count'; + +/** + * Chart types. + * + * @public + */ export type ChartTypes = Array; /** @@ -145,6 +173,8 @@ export type ChartTypes = Array; * * These are all optional, but can be overridden from the Api to whatever makes * most sense for that implementation. + * + * @public */ export interface CicdDefaults { timeFrom: Date; @@ -171,6 +201,8 @@ export interface CicdDefaults { * configuration before anything else. * * All of these fields are optional though, and will fallback to hard-coded defaults. + * + * @public */ export interface CicdConfiguration { /** @@ -200,11 +232,15 @@ export interface CicdConfiguration { /** * If the Api implements support for aborting the fetching of builds, throw an * AbortError of this type (or any other error with name === 'AbortError'). + * + * @public */ export class AbortError extends Error {} /** * The result type for `fetchBuilds`. + * + * @public */ export interface CicdState { builds: Array; @@ -222,6 +258,8 @@ export interface CicdState { * the UI. * * Optionally this can signal multiple progresses in several steps + * + * @public */ export interface UpdateProgress { (completed: number, total: number, started?: number): void; @@ -238,6 +276,8 @@ export interface UpdateProgress { /** * When reading configuration, the Api can return a custom settings depending on * the entity being viewed. + * + * @public */ export interface GetConfigurationOptions { entity: Entity; @@ -252,6 +292,8 @@ export interface GetConfigurationOptions { * * When the UI re-fetches, it will abort any previous fetching, so polling * `abortSignal.aborted`, and possibly throwing an `AbortError`, can be useful. + * + * @public */ export interface FetchBuildsOptions { entity: Entity; @@ -266,6 +308,8 @@ export interface FetchBuildsOptions { /** * The interface which is mapped to the `cicdStatisticsApiRef` which is used by * the UI. + * + * @public */ export interface CicdStatisticsApi { getConfiguration( diff --git a/plugins/cicd-statistics/src/entity-page.tsx b/plugins/cicd-statistics/src/entity-page.tsx index 3c51dabf2a..db5cba42aa 100644 --- a/plugins/cicd-statistics/src/entity-page.tsx +++ b/plugins/cicd-statistics/src/entity-page.tsx @@ -46,6 +46,7 @@ import { cleanupBuildTree } from './utils/stage-names'; import { renderFallbacks, useAsyncChain } from './components/progress'; import { sortFilterStatusType } from './utils/api'; +/** @public */ export function EntityPageCicdCharts() { const state = useCicdConfiguration(); diff --git a/plugins/cicd-statistics/src/plugin.ts b/plugins/cicd-statistics/src/plugin.ts index ca9506475a..2abac90d03 100644 --- a/plugins/cicd-statistics/src/plugin.ts +++ b/plugins/cicd-statistics/src/plugin.ts @@ -26,6 +26,7 @@ const rootCatalogCicdStatsRouteRef = createRouteRef({ id: 'cicd-statistics', }); +/** @public */ export const cicdStatisticsPlugin = createPlugin({ id: 'cicd-statistics', routes: { @@ -33,6 +34,7 @@ export const cicdStatisticsPlugin = createPlugin({ }, }); +/** @public */ export const EntityCicdStatisticsContent = cicdStatisticsPlugin.provide( createRoutableExtension({ component: () => import('./entity-page').then(m => m.EntityPageCicdCharts), diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index b76be5b5b2..365ffd1677 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-circleci +## 0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/circleci/api-report.md b/plugins/circleci/api-report.md index 034cfae3ee..277b5720de 100644 --- a/plugins/circleci/api-report.md +++ b/plugins/circleci/api-report.md @@ -26,17 +26,12 @@ export { BuildSummary }; export { BuildWithSteps }; -// Warning: (ae-missing-release-tag) "CIRCLECI_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug'; -// Warning: (ae-missing-release-tag) "CircleCIApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class CircleCIApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { discoveryApi: DiscoveryApi; proxyPath?: string }); // (undocumented) getBuild( buildNumber: number, @@ -59,44 +54,30 @@ export class CircleCIApi { ): Promise; } -// Warning: (ae-missing-release-tag) "circleCIApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "circleCIBuildRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIBuildRouteRef: SubRouteRef>; -// Warning: (ae-missing-release-tag) "circleCIPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const circleCIPlugin: BackstagePlugin<{}, {}, {}>; export { circleCIPlugin }; export { circleCIPlugin as plugin }; -// Warning: (ae-missing-release-tag) "circleCIRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "EntityCircleCIContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCircleCIContent: () => JSX.Element; export { GitType }; -// Warning: (ae-missing-release-tag) "isCircleCIAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isCircleCIAvailable: (entity: Entity) => boolean; export { isCircleCIAvailable }; export { isCircleCIAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; ``` diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index c1ab1d2141..23334570a2 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.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,9 +36,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,10 +55,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/circleci/src/api/CircleCIApi.ts b/plugins/circleci/src/api/CircleCIApi.ts index 931feec4d5..6ec8addd76 100644 --- a/plugins/circleci/src/api/CircleCIApi.ts +++ b/plugins/circleci/src/api/CircleCIApi.ts @@ -28,28 +28,31 @@ import { } from 'circleci-api'; import { createApiRef, DiscoveryApi } from '@backstage/core-plugin-api'; +/** @public */ export { GitType }; + +/** @public */ export type { BuildWithSteps, BuildStepAction, BuildSummary }; +/** @public */ export const circleCIApiRef = createApiRef({ id: 'plugin.circleci.service', }); const DEFAULT_PROXY_PATH = '/circleci/api'; -type Options = { - discoveryApi: DiscoveryApi; - /** - * Path to use for requests via the proxy, defaults to /circleci/api - */ - proxyPath?: string; -}; - +/** @public */ export class CircleCIApi { private readonly discoveryApi: DiscoveryApi; private readonly proxyPath: string; - constructor(options: Options) { + constructor(options: { + discoveryApi: DiscoveryApi; + /** + * Path to use for requests via the proxy, defaults to /circleci/api + */ + proxyPath?: string; + }) { this.discoveryApi = options.discoveryApi; this.proxyPath = options.proxyPath ?? DEFAULT_PROXY_PATH; } diff --git a/plugins/circleci/src/api/index.ts b/plugins/circleci/src/api/index.ts index 213ce2de8b..08a549b1ee 100644 --- a/plugins/circleci/src/api/index.ts +++ b/plugins/circleci/src/api/index.ts @@ -14,7 +14,8 @@ * limitations under the License. */ -export { CircleCIApi, circleCIApiRef, GitType } from './CircleCIApi'; +export type { GitType } from './CircleCIApi'; +export { CircleCIApi, circleCIApiRef } from './CircleCIApi'; export type { BuildWithSteps, BuildStepAction, diff --git a/plugins/circleci/src/components/Router.tsx b/plugins/circleci/src/components/Router.tsx index e16c91f2a0..09c74dbbe8 100644 --- a/plugins/circleci/src/components/Router.tsx +++ b/plugins/circleci/src/components/Router.tsx @@ -24,9 +24,11 @@ import { Entity } from '@backstage/catalog-model'; import { useEntity } from '@backstage/plugin-catalog-react'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isCircleCIAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[CIRCLECI_ANNOTATION]); +/** @public */ export const Router = () => { const { entity } = useEntity(); diff --git a/plugins/circleci/src/constants.ts b/plugins/circleci/src/constants.ts index 97c016826e..3478c22aee 100644 --- a/plugins/circleci/src/constants.ts +++ b/plugins/circleci/src/constants.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug'; diff --git a/plugins/circleci/src/plugin.ts b/plugins/circleci/src/plugin.ts index 890e40ae9a..0cf7fb52ea 100644 --- a/plugins/circleci/src/plugin.ts +++ b/plugins/circleci/src/plugin.ts @@ -23,6 +23,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const circleCIPlugin = createPlugin({ id: 'circleci', apis: [ @@ -34,6 +35,7 @@ export const circleCIPlugin = createPlugin({ ], }); +/** @public */ export const EntityCircleCIContent = circleCIPlugin.provide( createRoutableExtension({ name: 'EntityCircleCIContent', diff --git a/plugins/circleci/src/route-refs.tsx b/plugins/circleci/src/route-refs.tsx index e8579b9f0d..22295c4ebc 100644 --- a/plugins/circleci/src/route-refs.tsx +++ b/plugins/circleci/src/route-refs.tsx @@ -16,10 +16,12 @@ import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api'; +/** @public */ export const circleCIRouteRef = createRouteRef({ id: 'circle-ci', }); +/** @public */ export const circleCIBuildRouteRef = createSubRouteRef({ id: 'circle-ci/build', parent: circleCIRouteRef, diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 18ebdec1df..3132f88ed2 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-cloudbuild +## 0.3.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/cloudbuild/api-report.md b/plugins/cloudbuild/api-report.md index 34b50b54d8..deacf96acd 100644 --- a/plugins/cloudbuild/api-report.md +++ b/plugins/cloudbuild/api-report.md @@ -11,8 +11,6 @@ import { Entity } from '@backstage/catalog-model'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ActionsGetWorkflowResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ActionsGetWorkflowResponseData = { id: string; @@ -37,16 +35,12 @@ export type ActionsGetWorkflowResponseData = { timing: Timing2; }; -// Warning: (ae-missing-release-tag) "ActionsListWorkflowRunsForRepoResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ActionsListWorkflowRunsForRepoResponseData { // (undocumented) builds: ActionsGetWorkflowResponseData[]; } -// Warning: (ae-missing-release-tag) "BUILD" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BUILD { // (undocumented) @@ -55,8 +49,6 @@ export interface BUILD { startTime: string; } -// Warning: (ae-missing-release-tag) "CLOUDBUILD_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug'; @@ -79,8 +71,6 @@ export type CloudbuildApi = { }) => Promise; }; -// Warning: (ae-missing-release-tag) "cloudbuildApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cloudbuildApiRef: ApiRef; @@ -107,8 +97,6 @@ export class CloudbuildClient implements CloudbuildApi { reRunWorkflow(options: { projectId: string; runId: string }): Promise; } -// Warning: (ae-missing-release-tag) "cloudbuildPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const cloudbuildPlugin: BackstagePlugin< { @@ -120,27 +108,19 @@ const cloudbuildPlugin: BackstagePlugin< export { cloudbuildPlugin }; export { cloudbuildPlugin as plugin }; -// Warning: (ae-missing-release-tag) "EntityCloudbuildContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCloudbuildContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityLatestCloudbuildRunCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityLatestCloudbuildsForBranchCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "FETCHSOURCE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface FETCHSOURCE { // (undocumented) @@ -149,27 +129,19 @@ export interface FETCHSOURCE { startTime: string; } -// Warning: (ae-missing-release-tag) "isCloudbuildAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isCloudbuildAvailable: (entity: Entity) => boolean; export { isCloudbuildAvailable }; export { isCloudbuildAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "LatestWorkflowRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const LatestWorkflowRunCard: (props: { branch: string }) => JSX.Element; -// Warning: (ae-missing-release-tag) "LatestWorkflowsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const LatestWorkflowsForBranchCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "Options" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Options { // (undocumented) @@ -182,8 +154,6 @@ export interface Options { substitutionOption: string; } -// Warning: (ae-missing-release-tag) "PullTiming" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PullTiming { // (undocumented) @@ -192,8 +162,6 @@ export interface PullTiming { startTime: string; } -// Warning: (ae-missing-release-tag) "ResolvedStorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ResolvedStorageSource { // (undocumented) @@ -204,8 +172,6 @@ export interface ResolvedStorageSource { object: string; } -// Warning: (ae-missing-release-tag) "Results" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Results { // (undocumented) @@ -214,21 +180,15 @@ export interface Results { buildStepOutputs: string[]; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "Source" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Source { // (undocumented) storageSource: StorageSource; } -// Warning: (ae-missing-release-tag) "SourceProvenance" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SourceProvenance { // (undocumented) @@ -237,8 +197,6 @@ export interface SourceProvenance { resolvedStorageSource: {}; } -// Warning: (ae-missing-release-tag) "Step" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Step { // (undocumented) @@ -263,8 +221,6 @@ export interface Step { waitFor: string[]; } -// Warning: (ae-missing-release-tag) "StorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface StorageSource { // (undocumented) @@ -273,8 +229,6 @@ export interface StorageSource { object: string; } -// Warning: (ae-missing-release-tag) "Substitutions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Substitutions { // (undocumented) @@ -289,8 +243,6 @@ export interface Substitutions { SHORT_SHA: string; } -// Warning: (ae-missing-release-tag) "Timing" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Timing { // (undocumented) @@ -299,8 +251,6 @@ export interface Timing { startTime: string; } -// Warning: (ae-missing-release-tag) "Timing2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Timing2 { // (undocumented) @@ -309,8 +259,6 @@ export interface Timing2 { FETCHSOURCE: FETCHSOURCE; } -// Warning: (ae-missing-release-tag) "Volume" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Volume { // (undocumented) diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index f55b942543..ac65694c74 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.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,9 +35,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/api/CloudbuildApi.ts b/plugins/cloudbuild/src/api/CloudbuildApi.ts index eeaf269cde..cb29b49fbf 100644 --- a/plugins/cloudbuild/src/api/CloudbuildApi.ts +++ b/plugins/cloudbuild/src/api/CloudbuildApi.ts @@ -20,6 +20,7 @@ import { } from '../api/types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const cloudbuildApiRef = createApiRef({ id: 'plugin.cloudbuild.service', }); diff --git a/plugins/cloudbuild/src/api/types.ts b/plugins/cloudbuild/src/api/types.ts index c9f6481b9e..1dd03265bc 100644 --- a/plugins/cloudbuild/src/api/types.ts +++ b/plugins/cloudbuild/src/api/types.ts @@ -14,10 +14,12 @@ * limitations under the License. */ +/** @public */ export interface ActionsListWorkflowRunsForRepoResponseData { builds: ActionsGetWorkflowResponseData[]; } +/** @public */ export type ActionsGetWorkflowResponseData = { id: string; status: string; @@ -41,6 +43,7 @@ export type ActionsGetWorkflowResponseData = { timing: Timing2; }; +/** @public */ export interface Step { name: string; args: string[]; @@ -54,16 +57,19 @@ export interface Step { pullTiming: PullTiming; } +/** @public */ export interface Timing2 { BUILD: BUILD; FETCHSOURCE: FETCHSOURCE; } +/** @public */ export interface SourceProvenance { resolvedStorageSource: {}; fileHashes: {}; } +/** @public */ export interface Options { machineType: string; substitutionOption: string; @@ -71,6 +77,7 @@ export interface Options { dynamicSubstitutions: boolean; } +/** @public */ export interface Substitutions { COMMIT_SHA: string; SHORT_SHA: string; @@ -79,45 +86,54 @@ export interface Substitutions { REVISION_ID: string; } +/** @public */ export interface Results { buildStepImages: string[]; buildStepOutputs: string[]; } +/** @public */ export interface BUILD { startTime: string; endTime: string; } +/** @public */ export interface FETCHSOURCE { startTime: string; endTime: string; } +/** @public */ export interface StorageSource { bucket: string; object: string; } +/** @public */ export interface Source { storageSource: StorageSource; } +/** @public */ export interface Volume { name: string; path: string; } +/** @public */ export interface Timing { startTime: string; endTime: string; } +/** @public */ export interface PullTiming { startTime: string; endTime: string; } +/** @public */ export interface ResolvedStorageSource { bucket: string; object: string; diff --git a/plugins/cloudbuild/src/components/Cards/Cards.tsx b/plugins/cloudbuild/src/components/Cards/Cards.tsx index 75c9ee432b..2b7a8607b7 100644 --- a/plugins/cloudbuild/src/components/Cards/Cards.tsx +++ b/plugins/cloudbuild/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React, { useEffect } from 'react'; import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns'; import { WorkflowRunsTable } from '../WorkflowRunsTable'; @@ -72,6 +73,7 @@ const WidgetContent = ({ ); }; +/** @public */ export const LatestWorkflowRunCard = (props: { branch: string }) => { const { branch = 'master' } = props; const { entity } = useEntity(); @@ -100,6 +102,7 @@ export const LatestWorkflowRunCard = (props: { branch: string }) => { ); }; +/** @public */ export const LatestWorkflowsForBranchCard = (props: { branch: string }) => { const { branch = 'master' } = props; const { entity } = useEntity(); diff --git a/plugins/cloudbuild/src/components/Cards/index.ts b/plugins/cloudbuild/src/components/Cards/index.ts index 669f723c2d..7149bdf3ca 100644 --- a/plugins/cloudbuild/src/components/Cards/index.ts +++ b/plugins/cloudbuild/src/components/Cards/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { LatestWorkflowRunCard, LatestWorkflowsForBranchCard } from './Cards'; diff --git a/plugins/cloudbuild/src/components/Router.tsx b/plugins/cloudbuild/src/components/Router.tsx index e4c590bcaf..6ac025fef1 100644 --- a/plugins/cloudbuild/src/components/Router.tsx +++ b/plugins/cloudbuild/src/components/Router.tsx @@ -23,9 +23,11 @@ import { WorkflowRunsTable } from './WorkflowRunsTable'; import { CLOUDBUILD_ANNOTATION } from './useProjectName'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isCloudbuildAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[CLOUDBUILD_ANNOTATION]); +/** @public */ export const Router = () => { const { entity } = useEntity(); diff --git a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts index 0b244f8b69..549ab1eaf2 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts +++ b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { useParams } from 'react-router-dom'; import useAsync from 'react-use/lib/useAsync'; import { cloudbuildApiRef } from '../../api'; -import { useApi } from '@backstage/core-plugin-api'; +import { useApi, useRouteRefParams } from '@backstage/core-plugin-api'; +import { buildRouteRef } from '../../routes'; export const useWorkflowRunsDetails = (projectId: string) => { const api = useApi(cloudbuildApiRef); - const { id } = useParams(); + const { id } = useRouteRefParams(buildRouteRef); const details = useAsync(async () => { return projectId ? api.getWorkflowRun({ diff --git a/plugins/cloudbuild/src/components/useProjectName.ts b/plugins/cloudbuild/src/components/useProjectName.ts index 3f314aaa47..ae6ae07b56 100644 --- a/plugins/cloudbuild/src/components/useProjectName.ts +++ b/plugins/cloudbuild/src/components/useProjectName.ts @@ -17,6 +17,7 @@ import useAsync from 'react-use/lib/useAsync'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug'; export const useProjectName = (entity: Entity) => { diff --git a/plugins/cloudbuild/src/plugin.ts b/plugins/cloudbuild/src/plugin.ts index fc96d154b7..2933bfb0be 100644 --- a/plugins/cloudbuild/src/plugin.ts +++ b/plugins/cloudbuild/src/plugin.ts @@ -23,6 +23,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const cloudbuildPlugin = createPlugin({ id: 'cloudbuild', apis: [ @@ -39,6 +40,7 @@ export const cloudbuildPlugin = createPlugin({ }, }); +/** @public */ export const EntityCloudbuildContent = cloudbuildPlugin.provide( createRoutableExtension({ name: 'EntityCloudbuildContent', @@ -47,6 +49,7 @@ export const EntityCloudbuildContent = cloudbuildPlugin.provide( }), ); +/** @public */ export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide( createComponentExtension({ name: 'EntityLatestCloudbuildRunCard', @@ -57,6 +60,7 @@ export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide( }), ); +/** @public */ export const EntityLatestCloudbuildsForBranchCard = cloudbuildPlugin.provide( createComponentExtension({ name: 'EntityLatestCloudbuildsForBranchCard', diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index 6202bf67a3..b360bea1ec 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-climate +## 0.1.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.8 ### Patch Changes diff --git a/plugins/code-climate/api-report.md b/plugins/code-climate/api-report.md index 5ef53cf543..f4a2d3a26d 100644 --- a/plugins/code-climate/api-report.md +++ b/plugins/code-climate/api-report.md @@ -11,21 +11,15 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { FetchApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "CodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CodeClimateApi { // (undocumented) fetchData(repoID: string): Promise; } -// Warning: (ae-missing-release-tag) "codeClimateApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const codeClimateApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CodeClimateData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CodeClimateData = { repoID: string; @@ -42,8 +36,6 @@ export type CodeClimateData = { numberOfOtherIssues: number; }; -// Warning: (ae-missing-release-tag) "codeClimatePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const codeClimatePlugin: BackstagePlugin< { @@ -53,30 +45,18 @@ export const codeClimatePlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityCodeClimateCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCodeClimateCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "MockCodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class MockCodeClimateApi implements CodeClimateApi { // (undocumented) fetchData(): Promise; } -// Warning: (ae-missing-release-tag) "mockData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const mockData: CodeClimateData; - -// Warning: (ae-missing-release-tag) "ProductionCodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ProductionCodeClimateApi implements CodeClimateApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }); // (undocumented) fetchAllData(options: { apiUrl: string; diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 70b990943e..3631017c94 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.8", + "version": "0.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/api/code-climate-api.ts b/plugins/code-climate/src/api/code-climate-api.ts index fb4f41ebb5..d58d355d75 100644 --- a/plugins/code-climate/src/api/code-climate-api.ts +++ b/plugins/code-climate/src/api/code-climate-api.ts @@ -17,10 +17,12 @@ import { CodeClimateData } from './code-climate-data'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const codeClimateApiRef = createApiRef({ id: 'plugin.code-climate.service', }); +/** @public */ export interface CodeClimateApi { fetchData(repoID: string): Promise; } diff --git a/plugins/code-climate/src/api/code-climate-data.ts b/plugins/code-climate/src/api/code-climate-data.ts index 9271905157..77e10d67d9 100644 --- a/plugins/code-climate/src/api/code-climate-data.ts +++ b/plugins/code-climate/src/api/code-climate-data.ts @@ -164,6 +164,7 @@ export type CodeClimateIssuesData = { meta: { current_page: number; total_pages: number; total_count: number }; }; +/** @public */ export type CodeClimateData = { repoID: string; maintainability: { diff --git a/plugins/code-climate/src/api/mock/index.ts b/plugins/code-climate/src/api/mock/index.ts index 56ba9c7974..0044fec7bb 100644 --- a/plugins/code-climate/src/api/mock/index.ts +++ b/plugins/code-climate/src/api/mock/index.ts @@ -14,5 +14,4 @@ * limitations under the License. */ -export { mockData } from './mock-api'; export { MockCodeClimateApi } from './mock-api'; diff --git a/plugins/code-climate/src/api/mock/mock-api.ts b/plugins/code-climate/src/api/mock/mock-api.ts index 74e4d83027..65ac6de3b8 100644 --- a/plugins/code-climate/src/api/mock/mock-api.ts +++ b/plugins/code-climate/src/api/mock/mock-api.ts @@ -47,6 +47,7 @@ export const mockData: CodeClimateData = { numberOfOtherIssues: 26, }; +/** @public */ export class MockCodeClimateApi implements CodeClimateApi { fetchData(): Promise { return new Promise(resolve => { diff --git a/plugins/code-climate/src/api/production-api.ts b/plugins/code-climate/src/api/production-api.ts index 81ba6b9ad6..e227201b9d 100644 --- a/plugins/code-climate/src/api/production-api.ts +++ b/plugins/code-climate/src/api/production-api.ts @@ -34,16 +34,12 @@ const codeSmellsQuery = `${basicIssuesOptions}&${categoriesFilter}=Complexity`; const duplicationQuery = `${basicIssuesOptions}&${categoriesFilter}=Duplication`; const otherIssuesQuery = `${basicIssuesOptions}&${categoriesFilter}=Bug%20Risk`; -type Options = { - discoveryApi: DiscoveryApi; - fetchApi: FetchApi; -}; - +/** @public */ export class ProductionCodeClimateApi implements CodeClimateApi { private readonly discoveryApi: DiscoveryApi; private readonly fetchApi: FetchApi; - constructor(options: Options) { + constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }) { this.discoveryApi = options.discoveryApi; this.fetchApi = options.fetchApi; } diff --git a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx index a2ced6f5a2..70d34d0298 100644 --- a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx +++ b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { CodeClimateTable } from './CodeClimateTable'; -import { mockData } from '../../api/mock'; +import { mockData } from '../../api/mock/mock-api'; import { ThemeProvider } from '@material-ui/core'; import { lightTheme } from '@backstage/theme'; diff --git a/plugins/code-climate/src/plugin.ts b/plugins/code-climate/src/plugin.ts index 54502b6355..38bb268388 100644 --- a/plugins/code-climate/src/plugin.ts +++ b/plugins/code-climate/src/plugin.ts @@ -30,6 +30,7 @@ export const rootRouteRef = createRouteRef({ id: 'code-climate', }); +/** @public */ export const codeClimatePlugin = createPlugin({ id: 'code-climate', apis: [ @@ -48,6 +49,7 @@ export const codeClimatePlugin = createPlugin({ }, }); +/** @public */ export const EntityCodeClimateCard = codeClimatePlugin.provide( createComponentExtension({ name: 'EntityCodeClimateCard', diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 0d07616343..f2da88d456 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.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 0d03994a92..83a89ba25f 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.2.1", + "version": "0.2.2-next.0", "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.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "@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.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.45.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 9e4282b28a..b907d5fb0b 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-coverage +## 0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index 2b7d10ec0b..62aaf4c5ba 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.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,10 +26,10 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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 f753f291f7..b549eb2222 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-codescene +## 0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 2f6a6f0c92..af2f380a26 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.10", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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 f69905cce2..88b8bfebd6 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-config-schema +## 0.1.32-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.31 ### Patch Changes diff --git a/plugins/config-schema/api-report.md b/plugins/config-schema/api-report.md index 4b9f47c950..7d110c34d4 100644 --- a/plugins/config-schema/api-report.md +++ b/plugins/config-schema/api-report.md @@ -11,28 +11,18 @@ import { Observable } from '@backstage/types'; import { RouteRef } from '@backstage/core-plugin-api'; import { Schema } from 'jsonschema'; -// Warning: (ae-missing-release-tag) "ConfigSchemaApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ConfigSchemaApi { - // Warning: (ae-forgotten-export) The symbol "ConfigSchemaResult" needs to be exported by the entry point index.d.ts - // // (undocumented) schema$(): Observable; } -// Warning: (ae-missing-release-tag) "configSchemaApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const configSchemaApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "ConfigSchemaPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ConfigSchemaPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "configSchemaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const configSchemaPlugin: BackstagePlugin< { @@ -42,6 +32,12 @@ export const configSchemaPlugin: BackstagePlugin< {} >; +// @public (undocumented) +export interface ConfigSchemaResult { + // (undocumented) + schema?: Schema; +} + // @public export class StaticSchemaLoader implements ConfigSchemaApi { constructor(options?: { url?: string }); diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index e1fb598c7f..0437eff613 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.31", + "version": "0.1.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,8 +25,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", @@ -41,10 +41,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/api/index.ts b/plugins/config-schema/src/api/index.ts index 8c1532ed0c..18319a2fe7 100644 --- a/plugins/config-schema/src/api/index.ts +++ b/plugins/config-schema/src/api/index.ts @@ -15,5 +15,5 @@ */ export { configSchemaApiRef } from './types'; -export type { ConfigSchemaApi } from './types'; +export type { ConfigSchemaApi, ConfigSchemaResult } from './types'; export { StaticSchemaLoader } from './StaticSchemaLoader'; diff --git a/plugins/config-schema/src/api/types.ts b/plugins/config-schema/src/api/types.ts index 13cd4f602b..b0c43495cf 100644 --- a/plugins/config-schema/src/api/types.ts +++ b/plugins/config-schema/src/api/types.ts @@ -18,14 +18,17 @@ import { Schema } from 'jsonschema'; import { createApiRef } from '@backstage/core-plugin-api'; import { Observable } from '@backstage/types'; +/** @public */ export interface ConfigSchemaResult { schema?: Schema; } +/** @public */ export interface ConfigSchemaApi { schema$(): Observable; } +/** @public */ export const configSchemaApiRef = createApiRef({ id: 'plugin.config-schema', }); diff --git a/plugins/config-schema/src/plugin.ts b/plugins/config-schema/src/plugin.ts index 91d7daa871..a0ad45f18c 100644 --- a/plugins/config-schema/src/plugin.ts +++ b/plugins/config-schema/src/plugin.ts @@ -20,6 +20,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const configSchemaPlugin = createPlugin({ id: 'config-schema', routes: { @@ -27,6 +28,7 @@ export const configSchemaPlugin = createPlugin({ }, }); +/** @public */ export const ConfigSchemaPage = configSchemaPlugin.provide( createRoutableExtension({ name: 'ConfigSchemaPage', diff --git a/plugins/cost-insights-common/package.json b/plugins/cost-insights-common/package.json index 03d3b11ea8..ef28594488 100644 --- a/plugins/cost-insights-common/package.json +++ b/plugins/cost-insights-common/package.json @@ -34,7 +34,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 080f2e1f41..ece5960fd7 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cost-insights +## 0.11.31-next.0 + +### Patch Changes + +- 9318bf15d4: The `CostInsightsHeader`component now uses group names if available +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.11.30 ### Patch Changes diff --git a/plugins/cost-insights/api-report.md b/plugins/cost-insights/api-report.md index 2a4cecc4eb..f4c8c9bd6f 100644 --- a/plugins/cost-insights/api-report.md +++ b/plugins/cost-insights/api-report.md @@ -25,8 +25,6 @@ import { SetStateAction } from 'react'; import { TooltipProps } from 'recharts'; import { TypographyProps } from '@material-ui/core'; -// Warning: (ae-missing-release-tag) "Alert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type Alert = { title: string | JSX.Element; @@ -43,8 +41,6 @@ export type Alert = { onDismissed?(options: AlertOptions): Promise; }; -// Warning: (ae-missing-release-tag) "AlertCost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertCost { // (undocumented) @@ -53,8 +49,6 @@ export interface AlertCost { id: string; } -// Warning: (ae-missing-release-tag) "AlertDismissFormData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertDismissFormData { // (undocumented) @@ -65,8 +59,6 @@ export interface AlertDismissFormData { reason: AlertDismissReason; } -// Warning: (ae-missing-release-tag) "AlertDismissOption" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertDismissOption { // (undocumented) @@ -75,13 +67,9 @@ export interface AlertDismissOption { reason: string; } -// Warning: (ae-missing-release-tag) "AlertDismissOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AlertDismissOptions: AlertDismissOption[]; -// Warning: (ae-missing-release-tag) "AlertDismissReason" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AlertDismissReason { // (undocumented) @@ -98,8 +86,6 @@ export enum AlertDismissReason { Seasonal = 'seasonal', } -// Warning: (ae-missing-release-tag) "AlertForm" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertForm< A extends Alert = any, @@ -108,8 +94,6 @@ export type AlertForm< AlertFormProps & RefAttributes >; -// Warning: (ae-missing-release-tag) "AlertFormProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertFormProps = { alert: A; @@ -117,8 +101,6 @@ export type AlertFormProps = { disableSubmit: (isDisabled: boolean) => void; }; -// Warning: (ae-missing-release-tag) "AlertOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertOptions { // (undocumented) @@ -127,29 +109,21 @@ export interface AlertOptions { group: string; } -// Warning: (ae-missing-release-tag) "AlertSnoozeFormData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AlertSnoozeFormData { // (undocumented) intervals: string; } -// Warning: (ae-missing-release-tag) "AlertSnoozeOption" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertSnoozeOption = { label: string; duration: Duration; }; -// Warning: (ae-missing-release-tag) "AlertSnoozeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AlertSnoozeOptions: AlertSnoozeOption[]; -// Warning: (ae-missing-release-tag) "AlertStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AlertStatus { // (undocumented) @@ -160,36 +134,17 @@ export enum AlertStatus { Snoozed = 'snoozed', } -// Warning: (ae-missing-release-tag) "BarChart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChart: ({ - resources, - responsive, - displayAmount, - options, - tooltip, - onClick, - onMouseMove, -}: BarChartProps) => JSX.Element; +export const BarChart: (props: BarChartProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public +// @public @deprecated (undocumented) export interface BarChartData extends BarChartOptions {} -// Warning: (ae-missing-release-tag) "BarChartLegend" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartLegend: ({ - costStart, - costEnd, - options, - children, -}: PropsWithChildren) => JSX.Element; +export const BarChartLegend: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartLegendOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartLegendOptions = { previousName: string; @@ -199,8 +154,6 @@ export type BarChartLegendOptions = { hideMarker?: boolean; }; -// Warning: (ae-missing-release-tag) "BarChartLegendProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartLegendProps = { costStart: number; @@ -208,8 +161,6 @@ export type BarChartLegendProps = { options?: Partial; }; -// Warning: (ae-missing-release-tag) "BarChartOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BarChartOptions { // (undocumented) @@ -222,8 +173,6 @@ export interface BarChartOptions { previousName: string; } -// Warning: (ae-missing-release-tag) "BarChartProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartProps = { resources: ResourceData[]; @@ -235,34 +184,21 @@ export type BarChartProps = { onMouseMove?: RechartsFunction; }; -// Warning: (ae-missing-release-tag) "BarChartTooltip" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartTooltip: ({ - title, - content, - subtitle, - topRight, - actions, - children, -}: PropsWithChildren) => JSX.Element; +export const BarChartTooltip: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartTooltipItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartTooltipItem: ({ - item, -}: BarChartTooltipItemProps) => JSX.Element; +export const BarChartTooltipItem: ( + props: BarChartTooltipItemProps, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartTooltipItemProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartTooltipItemProps = { item: TooltipItem; }; -// Warning: (ae-missing-release-tag) "BarChartTooltipProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartTooltipProps = { title: string; @@ -272,13 +208,9 @@ 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 @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) export enum ChangeThreshold { // (undocumented) @@ -295,28 +227,26 @@ 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 type ConfigContextProps = { + metrics: Metric[]; + products: Product[]; + icons: Icon[]; + engineerCost: number; + currencies: Currency[]; +}; + // @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) -export const CostGrowth: ({ change, duration }: CostGrowthProps) => JSX.Element; +export const CostGrowth: (props: CostGrowthProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "CostGrowthIndicator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const CostGrowthIndicator: ({ - change, - formatter, - className, - ...props -}: CostGrowthIndicatorProps) => JSX.Element; +export const CostGrowthIndicator: ( + props: CostGrowthIndicatorProps, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "CostGrowthIndicatorProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostGrowthIndicatorProps = TypographyProps & { change: ChangeStatistic; @@ -328,16 +258,12 @@ export type CostGrowthIndicatorProps = TypographyProps & { ) => Maybe; }; -// Warning: (ae-missing-release-tag) "CostGrowthProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostGrowthProps = { change: ChangeStatistic; duration: Duration; }; -// Warning: (ae-missing-release-tag) "CostInsightsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostInsightsApi = { getLastCompleteBillingDate(): Promise; @@ -350,36 +276,36 @@ export type CostInsightsApi = { getAlerts(group: string): Promise; }; -// Warning: (ae-missing-release-tag) "costInsightsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const costInsightsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CostInsightsLabelDataflowInstructionsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsLabelDataflowInstructionsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "CostInsightsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsPage: () => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "CostInsightsPaletteAdditions" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "CostInsightsPalette" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions; -// Warning: (ae-missing-release-tag) "CostInsightsPaletteOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type CostInsightsPaletteAdditions = { + blue: string; + lightBlue: string; + darkBlue: string; + magenta: string; + yellow: string; + tooltip: CostInsightsTooltipOptions; + navigationText: string; + alertBackground: string; + dataViz: string[]; +}; + // @public (undocumented) export type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions; -// Warning: (ae-missing-release-tag) "costInsightsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const costInsightsPlugin: BackstagePlugin< { @@ -393,27 +319,27 @@ const costInsightsPlugin: BackstagePlugin< export { costInsightsPlugin }; export { costInsightsPlugin as plugin }; -// Warning: (ae-missing-release-tag) "CostInsightsProjectGrowthInstructionsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsProjectGrowthInstructionsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "CostInsightsTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CostInsightsTheme extends BackstageTheme { // (undocumented) palette: CostInsightsPalette; } -// Warning: (ae-missing-release-tag) "CostInsightsThemeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CostInsightsThemeOptions extends PaletteOptions { // (undocumented) palette: CostInsightsPaletteOptions; } +// @public (undocumented) +export type CostInsightsTooltipOptions = { + background: string; + color: string; +}; + // @public (undocumented) export interface Currency { // (undocumented) @@ -428,8 +354,12 @@ export interface Currency { 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) +export type CurrencyContextProps = { + currency: Currency; + setCurrency: Dispatch>; +}; + // @public (undocumented) export enum CurrencyType { // (undocumented) @@ -442,8 +372,6 @@ export enum CurrencyType { USD = 'USD', } -// Warning: (ae-missing-release-tag) "DataKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum DataKey { // (undocumented) @@ -454,13 +382,9 @@ 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 @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'; @@ -476,18 +400,12 @@ export enum Duration { 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 @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) export class ExampleCostInsightsClient implements CostInsightsApi { // (undocumented) @@ -508,13 +426,9 @@ 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 @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) export enum GrowthType { // (undocumented) @@ -525,16 +439,12 @@ export enum GrowthType { Savings = 1, } -// Warning: (ae-missing-release-tag) "Icon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Icon = { kind: string; component: JSX.Element; }; -// Warning: (ae-missing-release-tag) "IconType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum IconType { // (undocumented) @@ -551,18 +461,11 @@ export enum IconType { Storage = 'storage', } -// Warning: (ae-missing-release-tag) "LegendItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LegendItem: ({ - title, - tooltipText, - markerColor, - children, -}: PropsWithChildren) => JSX.Element; +export const LegendItem: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "LegendItemProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LegendItemProps = { title: string; @@ -570,43 +473,37 @@ export type LegendItemProps = { markerColor?: string; }; -// Warning: (ae-missing-release-tag) "Loading" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @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 @deprecated (undocumented) export type Maybe = common.Maybe; -// 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: (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) -// // @public (undocumented) -export const MockConfigProvider: ({ - children, - ...context -}: MockConfigProviderProps) => JSX.Element; +export const MockConfigProvider: ( + props: MockConfigProviderProps, +) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "MockCurrencyProviderProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "MockCurrencyProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const MockCurrencyProvider: ({ - children, - ...context -}: MockCurrencyProviderProps) => JSX.Element; +export type MockConfigProviderProps = PropsWithChildren< + Partial +>; + +// @public (undocumented) +export const MockCurrencyProvider: ( + props: MockCurrencyProviderProps, +) => JSX.Element; + +// @public (undocumented) +export type MockCurrencyProviderProps = PropsWithChildren< + Partial +>; // @public (undocumented) export interface PageFilters { @@ -620,16 +517,12 @@ export interface PageFilters { project: Maybe_2; } -// 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) export type ProductInsightsOptions = { product: string; @@ -646,13 +539,9 @@ 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 @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 export class ProjectGrowthAlert implements Alert { constructor(data: ProjectGrowthData); @@ -668,8 +557,6 @@ export class ProjectGrowthAlert implements Alert { get url(): string; } -// Warning: (ae-missing-release-tag) "ProjectGrowthData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ProjectGrowthData { // (undocumented) @@ -686,8 +573,6 @@ export interface ProjectGrowthData { project: string; } -// Warning: (ae-missing-release-tag) "ResourceData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ResourceData { // (undocumented) @@ -698,8 +583,6 @@ export interface ResourceData { previous: number; } -// Warning: (ae-missing-release-tag) "TooltipItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TooltipItem = { fill: string; @@ -707,13 +590,9 @@ 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 @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 export class UnlabeledDataflowAlert implements Alert { constructor(data: UnlabeledDataflowData); @@ -731,8 +610,6 @@ export class UnlabeledDataflowAlert implements Alert { get url(): string; } -// Warning: (ae-missing-release-tag) "UnlabeledDataflowAlertProject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface UnlabeledDataflowAlertProject { // (undocumented) @@ -743,8 +620,6 @@ export interface UnlabeledDataflowAlertProject { unlabeledCost: number; } -// Warning: (ae-missing-release-tag) "UnlabeledDataflowData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface UnlabeledDataflowData { // (undocumented) diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 52d33c83d9..a737688d74 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.30", + "version": "0.11.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,8 +36,8 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/plugin-cost-insights-common": "^0.1.1", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", @@ -61,10 +61,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/alerts/ProjectGrowthAlert.tsx b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx index 6767477f67..f432a14ff8 100644 --- a/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx +++ b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx @@ -22,8 +22,9 @@ import { Alert, ProjectGrowthData } from '../types'; * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi * fetches alert data from the backend, then creates Alert classes with the data. + * + * @public */ - export class ProjectGrowthAlert implements Alert { data: ProjectGrowthData; diff --git a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx index da96f7d1f8..b4ee3d559c 100644 --- a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx +++ b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx @@ -22,8 +22,9 @@ import { Alert, AlertStatus, UnlabeledDataflowData } from '../types'; * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi * fetches alert data from the backend, then creates Alert classes with the data. + * + * @public */ - export class UnlabeledDataflowAlert implements Alert { data: UnlabeledDataflowData; status?: AlertStatus; diff --git a/plugins/cost-insights/src/api/CostInsightsApi.ts b/plugins/cost-insights/src/api/CostInsightsApi.ts index 558cb57c0e..3c97407f08 100644 --- a/plugins/cost-insights/src/api/CostInsightsApi.ts +++ b/plugins/cost-insights/src/api/CostInsightsApi.ts @@ -25,6 +25,7 @@ import { } from '../types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export type ProductInsightsOptions = { /** * The product from the cost-insights configuration in app-config.yaml @@ -47,6 +48,7 @@ export type ProductInsightsOptions = { project: Maybe; }; +/** @public */ export type CostInsightsApi = { /** * Get the most current date for which billing data is complete, in YYYY-MM-DD format. This helps @@ -146,6 +148,7 @@ export type CostInsightsApi = { getAlerts(group: string): Promise; }; +/** @public */ export const costInsightsApiRef = createApiRef({ id: 'plugin.costinsights.service', }); diff --git a/plugins/cost-insights/src/components/BarChart/BarChart.tsx b/plugins/cost-insights/src/components/BarChart/BarChart.tsx index 27ef69db7a..145819db08 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChart.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChart.tsx @@ -61,6 +61,7 @@ export const defaultTooltip: ContentRenderer = ({ ); }; +/** @public */ export type BarChartProps = { resources: ResourceData[]; responsive?: boolean; @@ -71,15 +72,18 @@ export type BarChartProps = { onMouseMove?: RechartsFunction; }; -export const BarChart = ({ - resources, - responsive = true, - displayAmount = 6, - options = {}, - tooltip = defaultTooltip, - onClick, - onMouseMove, -}: BarChartProps) => { +/** @public */ +export const BarChart = (props: BarChartProps) => { + const { + resources, + responsive = true, + displayAmount = 6, + options = {}, + tooltip = defaultTooltip, + onClick, + onMouseMove, + } = props; + const theme = useTheme(); const styles = useBarChartStyles(theme); const [activeChart, setActiveChart] = useState(false); diff --git a/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx b/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx index e7afe5fa59..72c3120dd4 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx @@ -21,6 +21,7 @@ import { currencyFormatter } from '../../utils/formatters'; import { CostInsightsTheme } from '../../types'; import { useBarChartLayoutStyles as useStyles } from '../../utils/styles'; +/** @public */ export type BarChartLegendOptions = { previousName: string; previousFill: string; @@ -29,18 +30,19 @@ export type BarChartLegendOptions = { hideMarker?: boolean; }; +/** @public */ export type BarChartLegendProps = { costStart: number; costEnd: number; options?: Partial; }; -export const BarChartLegend = ({ - costStart, - costEnd, - options = {}, - children, -}: PropsWithChildren) => { +/** @public */ +export const BarChartLegend = ( + props: PropsWithChildren, +) => { + const { costStart, costEnd, options = {}, children } = props; + const theme = useTheme(); const classes = useStyles(); diff --git a/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx b/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx index 101f0cbb8c..0b522e5e09 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx @@ -19,6 +19,7 @@ import classnames from 'classnames'; import { Box, Divider, Typography } from '@material-ui/core'; import { useTooltipStyles as useStyles } from '../../utils/styles'; +/** @public */ export type BarChartTooltipProps = { title: string; content?: ReactNode | string; @@ -27,14 +28,12 @@ export type BarChartTooltipProps = { actions?: ReactNode; }; -export const BarChartTooltip = ({ - title, - content, - subtitle, - topRight, - actions, - children, -}: PropsWithChildren) => { +/** @public */ +export const BarChartTooltip = ( + props: PropsWithChildren, +) => { + const { title, content, subtitle, topRight, actions, children } = props; + const classes = useStyles(); const titleClassName = classnames(classes.truncate, { [classes.maxWidth]: topRight === undefined, diff --git a/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx b/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx index 758bc9ffa0..fc50ab979a 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx @@ -19,18 +19,24 @@ import { Box, Typography } from '@material-ui/core'; import LensIcon from '@material-ui/icons/Lens'; import { useTooltipStyles as useStyles } from '../../utils/styles'; +/** @public */ export type TooltipItem = { fill: string; label: string; value: string; }; +/** @public */ export type BarChartTooltipItemProps = { item: TooltipItem; }; -export const BarChartTooltipItem = ({ item }: BarChartTooltipItemProps) => { +/** @public */ +export const BarChartTooltipItem = (props: BarChartTooltipItemProps) => { + const { item } = props; + const classes = useStyles(); + return ( { +/** @public */ +export const CostGrowth = (props: CostGrowthProps) => { + const { change, duration } = props; + const styles = useStyles(); const { engineerCost } = useConfig(); const [currency] = useCurrency(); diff --git a/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx b/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx index e7746495d6..8993504c84 100644 --- a/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx +++ b/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx @@ -23,6 +23,7 @@ import { growthOf } from '../../utils/change'; import { ChangeStatistic, GrowthType, Maybe } from '../../types'; import { useCostGrowthStyles as useStyles } from '../../utils/styles'; +/** @public */ export type CostGrowthIndicatorProps = TypographyProps & { change: ChangeStatistic; formatter?: ( @@ -31,12 +32,10 @@ export type CostGrowthIndicatorProps = TypographyProps & { ) => Maybe; }; -export const CostGrowthIndicator = ({ - change, - formatter, - className, - ...props -}: CostGrowthIndicatorProps) => { +/** @public */ +export const CostGrowthIndicator = (props: CostGrowthIndicatorProps) => { + const { change, formatter, className, ...extraProps } = props; + const classes = useStyles(); const growth = growthOf(change); @@ -46,7 +45,7 @@ export const CostGrowthIndicator = ({ }); return ( - + {formatter ? formatter(change, { absolute: true }) : change.ratio} {growth === GrowthType.Excess && } {growth === GrowthType.Savings && } diff --git a/plugins/cost-insights/src/components/LegendItem/LegendItem.tsx b/plugins/cost-insights/src/components/LegendItem/LegendItem.tsx index 92dc706003..0b8a993b39 100644 --- a/plugins/cost-insights/src/components/LegendItem/LegendItem.tsx +++ b/plugins/cost-insights/src/components/LegendItem/LegendItem.tsx @@ -20,19 +20,19 @@ import LensIcon from '@material-ui/icons/Lens'; import HelpOutlineOutlinedIcon from '@material-ui/icons/HelpOutlineOutlined'; import { useCostGrowthLegendStyles } from '../../utils/styles'; +/** @public */ export type LegendItemProps = { title: string; tooltipText?: string; markerColor?: string; }; -export const LegendItem = ({ - title, - tooltipText, - markerColor, - children, -}: PropsWithChildren) => { +/** @public */ +export const LegendItem = (props: PropsWithChildren) => { + const { title, tooltipText, markerColor, children } = props; + const classes = useCostGrowthLegendStyles(); + return ( { return new Promise(resolve => setTimeout(resolve, 0, res)); diff --git a/plugins/cost-insights/src/hooks/useConfig.tsx b/plugins/cost-insights/src/hooks/useConfig.tsx index 236c142b3b..322e1e35f1 100644 --- a/plugins/cost-insights/src/hooks/useConfig.tsx +++ b/plugins/cost-insights/src/hooks/useConfig.tsx @@ -58,6 +58,7 @@ import { configApiRef, useApi } from '@backstage/core-plugin-api'; * rate: 3.5 */ +/** @public */ export type ConfigContextProps = { metrics: Metric[]; products: Product[]; diff --git a/plugins/cost-insights/src/hooks/useCurrency.tsx b/plugins/cost-insights/src/hooks/useCurrency.tsx index 13458ee432..32dc907578 100644 --- a/plugins/cost-insights/src/hooks/useCurrency.tsx +++ b/plugins/cost-insights/src/hooks/useCurrency.tsx @@ -23,6 +23,7 @@ import React, { import { Currency } from '../types'; import { useConfig } from './useConfig'; +/** @public */ export type CurrencyContextProps = { currency: Currency; setCurrency: Dispatch>; diff --git a/plugins/cost-insights/src/index.ts b/plugins/cost-insights/src/index.ts index b9a4bb83e0..2c46156005 100644 --- a/plugins/cost-insights/src/index.ts +++ b/plugins/cost-insights/src/index.ts @@ -38,8 +38,13 @@ export { LegendItem, } from './components'; export { MockConfigProvider, MockCurrencyProvider } from './testUtils'; +export type { + MockConfigProviderProps, + MockCurrencyProviderProps, +} from './testUtils'; export * from './api'; export * from './alerts'; +export type { ConfigContextProps, CurrencyContextProps } from './hooks'; export * from './types'; export type { diff --git a/plugins/cost-insights/src/plugin.ts b/plugins/cost-insights/src/plugin.ts index a422098e08..789d803438 100644 --- a/plugins/cost-insights/src/plugin.ts +++ b/plugins/cost-insights/src/plugin.ts @@ -32,6 +32,7 @@ export const unlabeledDataflowAlertRef = createRouteRef({ id: 'cost-insights:labeling-jobs', }); +/** @public */ export const costInsightsPlugin = createPlugin({ id: 'cost-insights', featureFlags: [{ name: 'cost-insights-currencies' }], @@ -42,6 +43,7 @@ export const costInsightsPlugin = createPlugin({ }, }); +/** @public */ export const CostInsightsPage = costInsightsPlugin.provide( createRoutableExtension({ name: 'CostInsightsPage', @@ -51,6 +53,7 @@ export const CostInsightsPage = costInsightsPlugin.provide( }), ); +/** @public */ export const CostInsightsProjectGrowthInstructionsPage = costInsightsPlugin.provide( createRoutableExtension({ @@ -63,6 +66,7 @@ export const CostInsightsProjectGrowthInstructionsPage = }), ); +/** @public */ export const CostInsightsLabelDataflowInstructionsPage = costInsightsPlugin.provide( createRoutableExtension({ diff --git a/plugins/cost-insights/src/testUtils/providers.tsx b/plugins/cost-insights/src/testUtils/providers.tsx index efcb15b5a3..8088fca3c6 100644 --- a/plugins/cost-insights/src/testUtils/providers.tsx +++ b/plugins/cost-insights/src/testUtils/providers.tsx @@ -27,12 +27,11 @@ import { import { ScrollContext, ScrollContextProps } from '../hooks/useScroll'; import { Group, Duration } from '../types'; -type PartialPropsWithChildren = PropsWithChildren>; - export const MockGroups: Group[] = [{ id: 'tech' }, { id: 'mock-group' }]; -export type MockFilterProviderProps = - PartialPropsWithChildren; +export type MockFilterProviderProps = PropsWithChildren< + Partial +>; export const MockFilterProvider = ({ children, @@ -56,8 +55,9 @@ export const MockFilterProvider = ({ ); }; -export type MockLoadingProviderProps = - PartialPropsWithChildren; +export type MockLoadingProviderProps = PropsWithChildren< + Partial +>; export const MockLoadingProvider = ({ children, @@ -75,13 +75,15 @@ export const MockLoadingProvider = ({ ); }; -export type MockConfigProviderProps = - PartialPropsWithChildren; +/** @public */ +export type MockConfigProviderProps = PropsWithChildren< + Partial +>; + +/** @public */ +export const MockConfigProvider = (props: MockConfigProviderProps) => { + const { children, ...context } = props; -export const MockConfigProvider = ({ - children, - ...context -}: MockConfigProviderProps) => { const defaultContext: ConfigContextProps = { metrics: [], products: [], @@ -89,6 +91,7 @@ export const MockConfigProvider = ({ engineerCost: 0, currencies: [], }; + return ( {children} @@ -96,13 +99,15 @@ export const MockConfigProvider = ({ ); }; -export type MockCurrencyProviderProps = - PartialPropsWithChildren; +/** @public */ +export type MockCurrencyProviderProps = PropsWithChildren< + Partial +>; + +/** @public */ +export const MockCurrencyProvider = (props: MockCurrencyProviderProps) => { + const { children, ...context } = props; -export const MockCurrencyProvider = ({ - children, - ...context -}: MockCurrencyProviderProps) => { const defaultContext: CurrencyContextProps = { currency: { kind: null, @@ -111,6 +116,7 @@ export const MockCurrencyProvider = ({ }, setCurrency: jest.fn(), }; + return ( {children} @@ -118,8 +124,9 @@ export const MockCurrencyProvider = ({ ); }; -export type MockBillingDateProviderProps = - PartialPropsWithChildren; +export type MockBillingDateProviderProps = PropsWithChildren< + Partial +>; export const MockBillingDateProvider = ({ children, @@ -149,8 +156,9 @@ export const MockScrollProvider = ({ children }: MockScrollProviderProps) => { ); }; -export type MockGroupsProviderProps = - PartialPropsWithChildren; +export type MockGroupsProviderProps = PropsWithChildren< + Partial +>; export const MockGroupsProvider = ({ children, diff --git a/plugins/cost-insights/src/types/Alert.ts b/plugins/cost-insights/src/types/Alert.ts index 483b9a654d..0b6773b3a8 100644 --- a/plugins/cost-insights/src/types/Alert.ts +++ b/plugins/cost-insights/src/types/Alert.ts @@ -31,8 +31,9 @@ import { Duration } from './Duration'; * React.forwardRef. See https://reactjs.org/docs/forwarding-refs * * Errors thrown within hooks will generate a snackbar error notification. + * + * @public */ - export type Alert = { title: string | JSX.Element; subtitle: string | JSX.Element; @@ -48,6 +49,7 @@ export type Alert = { onDismissed?(options: AlertOptions): Promise; }; +/** @public */ export type AlertForm< A extends Alert = any, Data = any, @@ -55,6 +57,7 @@ export type AlertForm< AlertFormProps & RefAttributes >; +/** @public */ export interface AlertOptions { data: T; group: string; @@ -69,11 +72,14 @@ export interface AlertOptions { * inclusive of the last day. * * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals + * + * @public */ export interface AlertSnoozeFormData { intervals: string; } +/** @public */ export interface AlertDismissFormData { other: Maybe; reason: AlertDismissReason; @@ -81,23 +87,27 @@ export interface AlertDismissFormData { } // TODO: Convert enum to literal +/** @public */ export enum AlertStatus { Snoozed = 'snoozed', Accepted = 'accepted', Dismissed = 'dismissed', } +/** @public */ export type AlertFormProps = { alert: A; onSubmit: (data: FormData) => void; disableSubmit: (isDisabled: boolean) => void; }; +/** @public */ export interface AlertDismissOption { label: string; reason: string; } +/** @public */ export enum AlertDismissReason { Other = 'other', Resolved = 'resolved', @@ -107,6 +117,7 @@ export enum AlertDismissReason { NotApplicable = 'not-applicable', } +/** @public */ export const AlertDismissOptions: AlertDismissOption[] = [ { reason: AlertDismissReason.Resolved, @@ -134,11 +145,13 @@ export const AlertDismissOptions: AlertDismissOption[] = [ }, ]; +/** @public */ export type AlertSnoozeOption = { label: string; duration: Duration; }; +/** @public */ export const AlertSnoozeOptions: AlertSnoozeOption[] = [ { duration: Duration.P7D, @@ -154,17 +167,20 @@ export const AlertSnoozeOptions: AlertSnoozeOption[] = [ }, ]; +/** @public */ export interface AlertCost { id: string; aggregation: [number, number]; } +/** @public */ export interface ResourceData { previous: number; current: number; name: Maybe; } +/** @public */ export interface BarChartOptions { previousFill: string; currentFill: string; @@ -172,15 +188,20 @@ export interface BarChartOptions { currentName: string; } -/** deprecated use BarChartOptions instead */ +/** + * @public + * @deprecated use BarChartOptions instead + */ export interface BarChartData extends BarChartOptions {} +/** @public */ export enum DataKey { Previous = 'previous', Current = 'current', Name = 'name', } +/** @public */ export interface ProjectGrowthData { project: string; periodStart: string; @@ -190,6 +211,7 @@ export interface ProjectGrowthData { products: Array; } +/** @public */ export interface UnlabeledDataflowData { periodStart: string; periodEnd: string; @@ -198,6 +220,7 @@ export interface UnlabeledDataflowData { labeledCost: number; } +/** @public */ export interface UnlabeledDataflowAlertProject { id: string; unlabeledCost: number; diff --git a/plugins/cost-insights/src/types/ChangeStatistic.ts b/plugins/cost-insights/src/types/ChangeStatistic.ts index 8264b23c8d..ba022aacf3 100644 --- a/plugins/cost-insights/src/types/ChangeStatistic.ts +++ b/plugins/cost-insights/src/types/ChangeStatistic.ts @@ -14,13 +14,16 @@ * limitations under the License. */ +/** @public */ export const EngineerThreshold = 0.5; +/** @public */ export enum ChangeThreshold { upper = 0.05, lower = -0.05, } +/** @public */ export enum GrowthType { Negligible, Savings, diff --git a/plugins/cost-insights/src/types/CurrencyType.ts b/plugins/cost-insights/src/types/CurrencyType.ts index 0316e8f90e..b20c57393f 100644 --- a/plugins/cost-insights/src/types/CurrencyType.ts +++ b/plugins/cost-insights/src/types/CurrencyType.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export enum CurrencyType { USD = 'USD', CarbonOffsetTons = 'CARBON_OFFSET_TONS', diff --git a/plugins/cost-insights/src/types/DateFormat.ts b/plugins/cost-insights/src/types/DateFormat.ts index c5d9c83f6e..4ada898905 100644 --- a/plugins/cost-insights/src/types/DateFormat.ts +++ b/plugins/cost-insights/src/types/DateFormat.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; diff --git a/plugins/cost-insights/src/types/Icon.ts b/plugins/cost-insights/src/types/Icon.ts index 24312677c9..968abd18a6 100644 --- a/plugins/cost-insights/src/types/Icon.ts +++ b/plugins/cost-insights/src/types/Icon.ts @@ -14,11 +14,13 @@ * limitations under the License. */ +/** @public */ export type Icon = { kind: string; component: JSX.Element; }; +/** @public */ export enum IconType { Compute = 'compute', Data = 'data', diff --git a/plugins/cost-insights/src/types/Loading.ts b/plugins/cost-insights/src/types/Loading.ts index eddab2401e..36dc0159c5 100644 --- a/plugins/cost-insights/src/types/Loading.ts +++ b/plugins/cost-insights/src/types/Loading.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export type Loading = Record; diff --git a/plugins/cost-insights/src/types/Theme.ts b/plugins/cost-insights/src/types/Theme.ts index 943bf29a12..39b4428a9f 100644 --- a/plugins/cost-insights/src/types/Theme.ts +++ b/plugins/cost-insights/src/types/Theme.ts @@ -13,15 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { PaletteOptions } from '@material-ui/core/styles/createPalette'; -type CostInsightsTooltipOptions = { +/** @public */ +export type CostInsightsTooltipOptions = { background: string; color: string; }; -type CostInsightsPaletteAdditions = { +/** @public */ +export type CostInsightsPaletteAdditions = { blue: string; lightBlue: string; darkBlue: string; @@ -33,16 +36,20 @@ type CostInsightsPaletteAdditions = { dataViz: string[]; }; +/** @public */ export type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions; +/** @public */ export type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions; +/** @public */ export interface CostInsightsThemeOptions extends PaletteOptions { palette: CostInsightsPaletteOptions; } +/** @public */ export interface CostInsightsTheme extends BackstageTheme { palette: CostInsightsPalette; } diff --git a/plugins/cost-insights/src/types/index.ts b/plugins/cost-insights/src/types/index.ts index b836914e73..750114d3ec 100644 --- a/plugins/cost-insights/src/types/index.ts +++ b/plugins/cost-insights/src/types/index.ts @@ -35,45 +35,56 @@ import * as common from '@backstage/plugin-cost-insights-common'; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type ChangeStatistic = common.ChangeStatistic; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Cost = common.Cost; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type DateAggregation = common.DateAggregation; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Entity = common.Entity; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Group = common.Group; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Maybe = common.Maybe; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Metric = common.Metric; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type MetricData = common.MetricData; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Product = common.Product; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Project = common.Project; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Trendline = common.Trendline; diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index 08a98daa2e..f07258752e 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-dynatrace +## 0.2.0-next.0 + +### Minor Changes + +- e44c0b3811: New features: + + - Some visual improvements to the table that displays Problems + - Added support for viewing recent Synthetics results using + - Added some additional linking to the configured Dynatrace instance + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/dynatrace/api-report.md b/plugins/dynatrace/api-report.md index 59fd145250..1677318a9f 100644 --- a/plugins/dynatrace/api-report.md +++ b/plugins/dynatrace/api-report.md @@ -14,8 +14,6 @@ export const dynatracePlugin: BackstagePlugin<{}, {}, {}>; // @public export const DynatraceTab: () => JSX.Element; -// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' -// // @public export const isDynatraceAvailable: (entity: Entity) => boolean; diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index 3ae4d60bc1..e544c193d9 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "0.1.2", + "version": "0.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,30 +23,28 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "cross-fetch": "^3.1.5", "react-use": "^17.2.4" }, "peerDependencies": { - "@backstage/plugin-catalog-react": "^1.1.3-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "*", "@types/node": "*", - "cross-fetch": "^3.1.5", "express": "^4.18.1", "msw": "^0.45.0" }, diff --git a/plugins/dynatrace/src/index.ts b/plugins/dynatrace/src/index.ts index c96c16201d..0c5da219a5 100644 --- a/plugins/dynatrace/src/index.ts +++ b/plugins/dynatrace/src/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { dynatracePlugin, DynatraceTab, isDynatraceAvailable } from './plugin'; diff --git a/plugins/dynatrace/src/plugin.ts b/plugins/dynatrace/src/plugin.ts index 26ecb1aba1..1488ae7417 100644 --- a/plugins/dynatrace/src/plugin.ts +++ b/plugins/dynatrace/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { dynatraceApiRef, DynatraceClient } from './api'; import { createApiFactory, @@ -55,7 +56,7 @@ export const dynatracePlugin = createPlugin({ /** * Checks if the entity has a dynatrace id annotation. * @public - * @param entity {Entity} - The entity to check for the dynatrace id annotation. + * @param entity - The entity to check for the dynatrace id annotation. */ export const isDynatraceAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[DYNATRACE_ID_ANNOTATION]) || diff --git a/plugins/dynatrace/src/setupTests.ts b/plugins/dynatrace/src/setupTests.ts index 9bb3e72355..7a459ed24e 100644 --- a/plugins/dynatrace/src/setupTests.ts +++ b/plugins/dynatrace/src/setupTests.ts @@ -13,5 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import '@testing-library/jest-dom'; -import 'cross-fetch/polyfill'; diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index d541b6e65d..ba33b2f29d 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-todo-list-backend +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + ## 1.0.4 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index 8b3e7877c5..216b9dd440 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.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,20 +23,19 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", + "@backstage/plugin-auth-node": "^0.2.5-next.0", "@types/express": "^4.17.6", - "cross-fetch": "^3.1.5", - "express": "^4.17.1", "express-promise-router": "^4.1.0", + "express": "^4.17.1", "uuid": "^8.3.2", "winston": "^3.2.1", "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", "msw": "^0.45.0", diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index d624c2f6a6..ed40a99c3e 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.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index 0783ec5641..979ea61c36 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.3", + "version": "1.0.4-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.3" + "@backstage/plugin-permission-common": "^0.6.4-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", - "@backstage/core-app-api": "^1.0.5-next.0", - "@backstage/dev-utils": "^1.0.5-next.0", - "@backstage/test-utils": "^1.1.3-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@types/node": "^16.11.26", "msw": "^0.45.0", "cross-fetch": "^3.1.5" diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index 3d637910de..b096ccfa4e 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.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 1.0.4 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index db168683a2..37e57c1467 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.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@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.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index b4c5547d9f..c819d6be7a 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-explore-react +## 0.0.21-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + ## 0.0.20 ### Patch Changes diff --git a/plugins/explore-react/api-report.md b/plugins/explore-react/api-report.md index 75fb01064d..8a9d2b8b13 100644 --- a/plugins/explore-react/api-report.md +++ b/plugins/explore-react/api-report.md @@ -5,8 +5,6 @@ ```ts import { ApiRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ExploreTool" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ExploreTool = { title: string; @@ -17,16 +15,12 @@ export type ExploreTool = { lifecycle?: string; }; -// Warning: (ae-missing-release-tag) "ExploreToolsConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ExploreToolsConfig { // (undocumented) getTools: () => Promise; } -// Warning: (ae-missing-release-tag) "exploreToolsConfigRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const exploreToolsConfigRef: ApiRef; ``` diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 9a20b74af2..625a6d6947 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore-react", "description": "A frontend library for Backstage plugins that want to interact with the explore plugin", - "version": "0.0.20", + "version": "0.0.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,12 +33,12 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-plugin-api": "^1.0.5" + "@backstage/core-plugin-api": "^1.0.6-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/tools/api.ts b/plugins/explore-react/src/tools/api.ts index 8a91b84785..0fae2ce0fb 100644 --- a/plugins/explore-react/src/tools/api.ts +++ b/plugins/explore-react/src/tools/api.ts @@ -16,10 +16,12 @@ import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const exploreToolsConfigRef = createApiRef({ id: 'plugin.explore.toolsconfig', }); +/** @public */ export type ExploreTool = { title: string; description?: string; @@ -29,6 +31,7 @@ export type ExploreTool = { lifecycle?: string; }; +/** @public */ export interface ExploreToolsConfig { getTools: () => Promise; } diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 96813c08ca..39dd8e0812 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-explore +## 0.3.40-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-explore-react@0.0.21-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.39 ### Patch Changes diff --git a/plugins/explore/api-report.md b/plugins/explore/api-report.md index f4c7345b6c..9653c0fb63 100644 --- a/plugins/explore/api-report.md +++ b/plugins/explore/api-report.md @@ -12,8 +12,6 @@ import { ExternalRouteRef } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; import { TabProps } from '@material-ui/core'; -// Warning: (ae-missing-release-tag) "catalogEntityRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export const catalogEntityRouteRef: ExternalRouteRef< { @@ -24,34 +22,30 @@ export const catalogEntityRouteRef: ExternalRouteRef< true >; -// Warning: (ae-forgotten-export) The symbol "DomainCardProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "DomainCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const DomainCard: ({ entity }: DomainCardProps) => JSX.Element; +export const DomainCard: (props: { entity: DomainEntity }) => JSX.Element; -// Warning: (ae-missing-release-tag) "DomainExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DomainExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "ExploreLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ExploreLayout: { - ({ title, subtitle, children }: ExploreLayoutProps): JSX.Element; + (props: ExploreLayoutProps): JSX.Element; Route: (props: SubRoute) => null; }; -// Warning: (ae-missing-release-tag) "ExplorePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type ExploreLayoutProps = { + title?: string; + subtitle?: string; + children?: default_2.ReactNode; +}; + // @public (undocumented) export const ExplorePage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "explorePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const explorePlugin: BackstagePlugin< { @@ -72,27 +66,29 @@ const explorePlugin: BackstagePlugin< export { explorePlugin }; export { explorePlugin as plugin }; -// Warning: (ae-missing-release-tag) "exploreRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const exploreRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "GroupsExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GroupsExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "ToolExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type SubRoute = { + path: string; + title: string; + children: JSX.Element; + tabProps?: TabProps< + default_2.ElementType, + { + component?: default_2.ElementType; + } + >; +}; + // @public (undocumented) export const ToolExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; - -// Warnings were encountered during analysis: -// -// src/components/ExploreLayout/ExploreLayout.d.ts:29:5 - (ae-forgotten-export) The symbol "ExploreLayoutProps" needs to be exported by the entry point index.d.ts -// src/components/ExploreLayout/ExploreLayout.d.ts:30:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 9ac2c08e48..db91907e25 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.39", + "version": "0.3.40-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-explore-react": "^0.0.20", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-explore-react": "^0.0.21-next.0", "@backstage/theme": "^0.2.16", "@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.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/components/DomainCard/DomainCard.tsx b/plugins/explore/src/components/DomainCard/DomainCard.tsx index 94e4f145c3..a20a5e1f0c 100644 --- a/plugins/explore/src/components/DomainCard/DomainCard.tsx +++ b/plugins/explore/src/components/DomainCard/DomainCard.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model'; import { EntityRefLinks, @@ -33,13 +34,11 @@ import React from 'react'; import { Button, ItemCardHeader } from '@backstage/core-components'; import { useRouteRef } from '@backstage/core-plugin-api'; -type DomainCardProps = { - entity: DomainEntity; -}; +/** @public */ +export const DomainCard = (props: { entity: DomainEntity }) => { + const { entity } = props; -export const DomainCard = ({ entity }: DomainCardProps) => { const catalogEntityRoute = useRouteRef(entityRouteRef); - const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY); const url = catalogEntityRoute(entityRouteParams(entity)); diff --git a/plugins/explore/src/components/DomainCard/index.ts b/plugins/explore/src/components/DomainCard/index.ts index 5d62a09e89..dbae755460 100644 --- a/plugins/explore/src/components/DomainCard/index.ts +++ b/plugins/explore/src/components/DomainCard/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { DomainCard } from './DomainCard'; diff --git a/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx b/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx index bc9553c612..3ddf0b17f8 100644 --- a/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx +++ b/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx @@ -24,8 +24,8 @@ import { default as React } from 'react'; // TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts // A generalized version of createSubRoutesFromChildren, etc. would be required - -type SubRoute = { +/** @public */ +export type SubRoute = { path: string; title: string; children: JSX.Element; @@ -40,7 +40,8 @@ attachComponentData(Route, dataKey, true); // This causes all mount points that are discovered within this route to use the path of the route itself attachComponentData(Route, 'core.gatherMountPoints', true); -type ExploreLayoutProps = { +/** @public */ +export type ExploreLayoutProps = { title?: string; subtitle?: string; children?: React.ReactNode; @@ -57,12 +58,12 @@ type ExploreLayoutProps = { * * * ``` + * + * @public */ -export const ExploreLayout = ({ - title, - subtitle, - children, -}: ExploreLayoutProps) => { +export const ExploreLayout = (props: ExploreLayoutProps) => { + const { title, subtitle, children } = props; + const routes = useElementFilter(children, elements => elements .selectByComponentData({ diff --git a/plugins/explore/src/components/ExploreLayout/index.ts b/plugins/explore/src/components/ExploreLayout/index.ts index fa98ec78da..4d1781b3f4 100644 --- a/plugins/explore/src/components/ExploreLayout/index.ts +++ b/plugins/explore/src/components/ExploreLayout/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { ExploreLayoutProps, SubRoute } from './ExploreLayout'; export { ExploreLayout } from './ExploreLayout'; diff --git a/plugins/explore/src/components/index.ts b/plugins/explore/src/components/index.ts index cefc549684..f8fba16910 100644 --- a/plugins/explore/src/components/index.ts +++ b/plugins/explore/src/components/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export { DomainCard } from './DomainCard'; -export { ExploreLayout } from './ExploreLayout'; +export * from './DomainCard'; +export * from './ExploreLayout'; diff --git a/plugins/explore/src/extensions.tsx b/plugins/explore/src/extensions.tsx index 6800f86966..c6d66c4c12 100644 --- a/plugins/explore/src/extensions.tsx +++ b/plugins/explore/src/extensions.tsx @@ -21,6 +21,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const ExplorePage = explorePlugin.provide( createRoutableExtension({ name: 'ExplorePage', @@ -30,6 +31,7 @@ export const ExplorePage = explorePlugin.provide( }), ); +/** @public */ export const DomainExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'DomainExplorerContent', @@ -42,6 +44,7 @@ export const DomainExplorerContent = explorePlugin.provide( }), ); +/** @public */ export const GroupsExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'GroupsExplorerContent', @@ -54,6 +57,7 @@ export const GroupsExplorerContent = explorePlugin.provide( }), ); +/** @public */ export const ToolExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'ToolExplorerContent', diff --git a/plugins/explore/src/plugin.ts b/plugins/explore/src/plugin.ts index cefb884834..a4bb538265 100644 --- a/plugins/explore/src/plugin.ts +++ b/plugins/explore/src/plugin.ts @@ -19,6 +19,7 @@ import { catalogEntityRouteRef, exploreRouteRef } from './routes'; import { exampleTools } from './util/examples'; import { createApiFactory, createPlugin } from '@backstage/core-plugin-api'; +/** @public */ export const explorePlugin = createPlugin({ id: 'explore', apis: [ diff --git a/plugins/explore/src/routes.ts b/plugins/explore/src/routes.ts index e8b393c4f6..0f66974a03 100644 --- a/plugins/explore/src/routes.ts +++ b/plugins/explore/src/routes.ts @@ -19,12 +19,14 @@ import { createRouteRef, } from '@backstage/core-plugin-api'; +/** @public */ export const exploreRouteRef = createRouteRef({ id: 'explore', }); /** * @deprecated This route is no longer used and can be removed + * @public */ export const catalogEntityRouteRef = createExternalRouteRef({ id: 'catalog-entity', diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 2af1f5ffe3..238f43d7de 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-firehydrant +## 0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.25 ### Patch Changes diff --git a/plugins/firehydrant/api-report.md b/plugins/firehydrant/api-report.md index c12048e81f..2e3bcf6385 100644 --- a/plugins/firehydrant/api-report.md +++ b/plugins/firehydrant/api-report.md @@ -8,13 +8,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "FirehydrantCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const FirehydrantCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "firehydrantPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const firehydrantPlugin: BackstagePlugin< { diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 81d71c24c0..b426e8db08 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.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/plugin.ts b/plugins/firehydrant/src/plugin.ts index df21ee7f9c..6deefe4fce 100644 --- a/plugins/firehydrant/src/plugin.ts +++ b/plugins/firehydrant/src/plugin.ts @@ -23,6 +23,7 @@ import { import { rootRouteRef } from './routes'; +/** @public */ export const firehydrantPlugin = createPlugin({ id: 'firehydrant', apis: [ @@ -37,6 +38,7 @@ export const firehydrantPlugin = createPlugin({ }, }); +/** @public */ export const FirehydrantCard = firehydrantPlugin.provide( createComponentExtension({ name: 'FirehydrantCard', diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index 8a7e37e0eb..59fc0986eb 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-fossa +## 0.2.41-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.40 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index ccc98265b4..15cbb078ac 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.40", + "version": "0.2.41-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,10 +36,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@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.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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 946aae643a..7c93731f47 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcalendar +## 0.3.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.3.4 ### Patch Changes diff --git a/plugins/gcalendar/api-report.md b/plugins/gcalendar/api-report.md index 61c39aaf2a..8c86e4d2c9 100644 --- a/plugins/gcalendar/api-report.md +++ b/plugins/gcalendar/api-report.md @@ -12,22 +12,15 @@ import { FetchApi } from '@backstage/core-plugin-api'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EventAttendee" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type EventAttendee = gapi.client.calendar.EventAttendee; -// Warning: (ae-missing-release-tag) "GCalendar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendar = gapi.client.calendar.CalendarListEntry; -// Warning: (ae-missing-release-tag) "GCalendarApiClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class GCalendarApiClient { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { authApi: OAuthApi; fetchApi: FetchApi }); // (undocumented) getCalendars(params?: any): Promise; // (undocumented) @@ -39,13 +32,9 @@ export class GCalendarApiClient { }>; } -// Warning: (ae-missing-release-tag) "gcalendarApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gcalendarApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "GCalendarEvent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendarEvent = gapi.client.calendar.Event & Pick & @@ -53,13 +42,9 @@ export type GCalendarEvent = gapi.client.calendar.Event & calendarId?: string; }; -// Warning: (ae-missing-release-tag) "GCalendarList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendarList = gapi.client.calendar.CalendarList; -// Warning: (ae-missing-release-tag) "gcalendarPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gcalendarPlugin: BackstagePlugin< { @@ -69,13 +54,9 @@ export const gcalendarPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "HomePageCalendar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const HomePageCalendar: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ResponseStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum ResponseStatus { // (undocumented) diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index 30f3a4f00d..9f72bcb222 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.4", + "version": "0.3.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,31 +22,31 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "@maxim_mazurok/gapi.client.calendar": "^3.0.20220408", + "@tanstack/react-query": "^4.1.3", "classnames": "^2.3.1", "cross-fetch": "^3.1.5", "dompurify": "^2.3.6", "lodash": "^4.17.21", "luxon": "^3.0.0", "material-ui-popup-state": "^1.9.3", - "react-query": "^3.34.16", "react-use": "^17.2.4" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@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/src/api/client.ts b/plugins/gcalendar/src/api/client.ts index 084c302636..0f5b56cc08 100644 --- a/plugins/gcalendar/src/api/client.ts +++ b/plugins/gcalendar/src/api/client.ts @@ -13,25 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { OAuthApi, createApiRef, FetchApi } from '@backstage/core-plugin-api'; +import { OAuthApi, createApiRef, FetchApi } from '@backstage/core-plugin-api'; import { GCalendarEvent, GCalendarList } from './types'; import { ResponseError } from '@backstage/errors'; -type Options = { - authApi: OAuthApi; - fetchApi: FetchApi; -}; - +/** @public */ export const gcalendarApiRef = createApiRef({ id: 'plugin.gcalendar.service', }); +/** @public */ export class GCalendarApiClient { private readonly authApi: OAuthApi; private readonly fetchApi: FetchApi; - constructor(options: Options) { + constructor(options: { authApi: OAuthApi; fetchApi: FetchApi }) { this.authApi = options.authApi; this.fetchApi = options.fetchApi; } diff --git a/plugins/gcalendar/src/api/index.ts b/plugins/gcalendar/src/api/index.ts index 4c195158d3..09cc21a2d0 100644 --- a/plugins/gcalendar/src/api/index.ts +++ b/plugins/gcalendar/src/api/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * from './client'; export * from './types'; diff --git a/plugins/gcalendar/src/api/types.ts b/plugins/gcalendar/src/api/types.ts index 5c8bbdd1c1..9b1b508762 100644 --- a/plugins/gcalendar/src/api/types.ts +++ b/plugins/gcalendar/src/api/types.ts @@ -16,18 +16,23 @@ /// +/** @public */ export type GCalendarList = gapi.client.calendar.CalendarList; +/** @public */ export type GCalendar = gapi.client.calendar.CalendarListEntry; +/** @public */ export type EventAttendee = gapi.client.calendar.EventAttendee; +/** @public */ export type GCalendarEvent = gapi.client.calendar.Event & Pick & Pick & { calendarId?: string; }; +/** @public */ export enum ResponseStatus { needsAction = 'needsAction', accepted = 'accepted', diff --git a/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx b/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx index b698c23ea1..a5575bc190 100644 --- a/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx +++ b/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx @@ -15,7 +15,7 @@ */ import { sortBy } from 'lodash'; import { DateTime } from 'luxon'; -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; import { InfoCard, Progress } from '@backstage/core-components'; import { useAnalytics } from '@backstage/core-plugin-api'; @@ -35,6 +35,7 @@ import { CalendarEvent } from './CalendarEvent'; import { CalendarSelect } from './CalendarSelect'; import { SignInContent } from './SignInContent'; import { getStartDate } from './util'; +import useAsync from 'react-use/lib/useAsync'; export const CalendarCard = () => { const [date, setDate] = useState(DateTime.now()); @@ -47,9 +48,7 @@ export const CalendarCard = () => { const { isSignedIn, isInitialized, signIn } = useSignIn(); - useEffect(() => { - signIn(true); - }, [signIn]); + useAsync(async () => signIn(true), [signIn]); const { isLoading: isCalendarLoading, data: calendars = [] } = useCalendarsQuery({ diff --git a/plugins/gcalendar/src/components/CalendarCard/CalendarSelect.tsx b/plugins/gcalendar/src/components/CalendarCard/CalendarSelect.tsx index a1e037a2a3..cd48d9ad3e 100644 --- a/plugins/gcalendar/src/components/CalendarCard/CalendarSelect.tsx +++ b/plugins/gcalendar/src/components/CalendarCard/CalendarSelect.tsx @@ -58,7 +58,6 @@ export const CalendarSelect = ({ calendars, }: CalendarSelectProps) => { const classes = useStyles(); - return (