diff --git a/.changeset/angry-tables-invite.md b/.changeset/angry-tables-invite.md deleted file mode 100644 index a187acda78..0000000000 --- a/.changeset/angry-tables-invite.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-bazaar': patch -'@backstage/plugin-bazaar-backend': patch ---- - -Add Bazaar plugin to marketplace and some minor refactoring diff --git a/.changeset/beige-crabs-itch.md b/.changeset/beige-crabs-itch.md new file mode 100644 index 0000000000..9c66e42054 --- /dev/null +++ b/.changeset/beige-crabs-itch.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-api-docs': patch +--- + +chore(deps): bump `react-syntax-highligher` and `swagger-ui-react` diff --git a/.changeset/brave-pugs-fold.md b/.changeset/brave-pugs-fold.md deleted file mode 100644 index f79867a719..0000000000 --- a/.changeset/brave-pugs-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/test-utils': patch ---- - -Add new `MockConfigApi` as a more discoverable and leaner method for mocking configuration. diff --git a/.changeset/clean-wolves-jog.md b/.changeset/clean-wolves-jog.md deleted file mode 100644 index 70ab23715f..0000000000 --- a/.changeset/clean-wolves-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/config': patch ---- - -The `ConfigReader#get` method now always returns a deep clone of the configuration data. diff --git a/.changeset/cold-steaks-flash.md b/.changeset/cold-steaks-flash.md deleted file mode 100644 index 74cdcbdec2..0000000000 --- a/.changeset/cold-steaks-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -fix: Register plugin to prioritise Component kind for entityRef diff --git a/.changeset/cold-toes-sniff.md b/.changeset/cold-toes-sniff.md deleted file mode 100644 index 7fcfb54408..0000000000 --- a/.changeset/cold-toes-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/integration': patch ---- - -Adds a new GitHub credentials provider (DefaultGithubCredentialsProvider). It handles multiple app configurations. It looks up the app configuration based on the url. diff --git a/.changeset/dependabot-0c71dee.md b/.changeset/dependabot-0c71dee.md deleted file mode 100644 index b2d7f3dc2a..0000000000 --- a/.changeset/dependabot-0c71dee.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -build(deps-dev): bump `http-errors` from 1.8.0 to 2.0.0 diff --git a/.changeset/dependabot-2af4c1d.md b/.changeset/dependabot-2af4c1d.md deleted file mode 100644 index 93dc1d1e21..0000000000 --- a/.changeset/dependabot-2af4c1d.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-bazaar': patch -'@backstage/plugin-ilert': patch ---- - -build(deps): bump `@date-io/luxon` from 1.3.13 to 2.11.1 diff --git a/.changeset/dry-boats-tap.md b/.changeset/dry-boats-tap.md deleted file mode 100644 index c69c4360b5..0000000000 --- a/.changeset/dry-boats-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-todo-backend': patch ---- - -Properly exported all referenced types diff --git a/.changeset/dull-bulldogs-laugh.md b/.changeset/dull-bulldogs-laugh.md deleted file mode 100644 index f49aa694b6..0000000000 --- a/.changeset/dull-bulldogs-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Create a short delay when `` is opened diff --git a/.changeset/eight-rats-raise.md b/.changeset/eight-rats-raise.md deleted file mode 100644 index 7bc2a07f04..0000000000 --- a/.changeset/eight-rats-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Add catalog permission rules. diff --git a/.changeset/fair-bikes-scream.md b/.changeset/fair-bikes-scream.md deleted file mode 100644 index decdfd3828..0000000000 --- a/.changeset/fair-bikes-scream.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@backstage/cli': minor ---- - -ESLint upgraded to version 8 and all it's plugins updated to newest version. - -If you use any custom plugins for ESLint please check compatibility. - -```diff -- "@typescript-eslint/eslint-plugin": "^v4.33.0", -- "@typescript-eslint/parser": "^v4.28.3", -+ "@typescript-eslint/eslint-plugin": "^5.9.0", -+ "@typescript-eslint/parser": "^5.9.0", -- "eslint": "^7.30.0", -+ "eslint": "^8.6.0", -- "eslint-plugin-import": "^2.20.2", -- "eslint-plugin-jest": "^24.1.0", -- "eslint-plugin-jsx-a11y": "^6.2.1", -+ "eslint-plugin-import": "^2.25.4", -+ "eslint-plugin-jest": "^25.3.4", -+ "eslint-plugin-jsx-a11y": "^6.5.1", -- "eslint-plugin-react": "^7.12.4", -- "eslint-plugin-react-hooks": "^4.0.0", -+ "eslint-plugin-react": "^7.28.0", -+ "eslint-plugin-react-hooks": "^4.3.0", -``` - -Please consult changelogs from packages if you find any problems. diff --git a/.changeset/flat-shirts-watch.md b/.changeset/flat-shirts-watch.md deleted file mode 100644 index af6ff350da..0000000000 --- a/.changeset/flat-shirts-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-tech-insights': patch ---- - -Added possibility to pass customized title and description for the scorecards instead of using hardcoded ones. diff --git a/.changeset/fluffy-tomatoes-rescue.md b/.changeset/fluffy-tomatoes-rescue.md deleted file mode 100644 index 4d446070a0..0000000000 --- a/.changeset/fluffy-tomatoes-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-gocd': patch ---- - -Add GoCD plugin for CI/CD. diff --git a/.changeset/four-ghosts-sniff.md b/.changeset/four-ghosts-sniff.md deleted file mode 100644 index 9da0ab15ed..0000000000 --- a/.changeset/four-ghosts-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-plugin-api': minor ---- - -Removed the deprecated `OldIconComponent` type. diff --git a/.changeset/funny-llamas-yell.md b/.changeset/funny-llamas-yell.md deleted file mode 100644 index 890caaa221..0000000000 --- a/.changeset/funny-llamas-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-graphql': patch ---- - -Bump graphql versions diff --git a/.changeset/fuzzy-llamas-collect.md b/.changeset/fuzzy-llamas-collect.md deleted file mode 100644 index 17ee925e56..0000000000 --- a/.changeset/fuzzy-llamas-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-ldap': patch ---- - -Make sure to avoid accidental data sharing / mutation of `set` values diff --git a/.changeset/gold-birds-happen.md b/.changeset/gold-birds-happen.md deleted file mode 100644 index 7a47a45fab..0000000000 --- a/.changeset/gold-birds-happen.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -For the component `EntityMembersListCard` you can now specify the type of members you have in a group. For example: - -```tsx - - - -``` - -If left empty it will by default use 'Members'. diff --git a/.changeset/healthy-toes-laugh.md b/.changeset/healthy-toes-laugh.md deleted file mode 100644 index e0db38e5e3..0000000000 --- a/.changeset/healthy-toes-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-permission-node': patch ---- - -Add helpers for creating PermissionRules with inferred types diff --git a/.changeset/itchy-walls-count.md b/.changeset/itchy-walls-count.md deleted file mode 100644 index 46a8709573..0000000000 --- a/.changeset/itchy-walls-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-sonarqube': patch ---- - -Enhance token description by highlighting that the trailing colon is required. diff --git a/.changeset/late-plums-act.md b/.changeset/late-plums-act.md deleted file mode 100644 index 6822f40eeb..0000000000 --- a/.changeset/late-plums-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Allow a custom GithubCredentialsProvider to be passed to the GitHub processors. diff --git a/.changeset/lazy-gorillas-tell.md b/.changeset/lazy-gorillas-tell.md deleted file mode 100644 index 672d8c221b..0000000000 --- a/.changeset/lazy-gorillas-tell.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/core-plugin-api': minor ---- - -Removed previously deprecated exports: `PluginHooks`, `PluginOutput`, and `FeatureFlagOutput`. - -The deprecated `register` method of `PluginConfig` has been removed, as well as the deprecated `output` method of `BackstagePlugin`. diff --git a/.changeset/lazy-rockets-dress.md b/.changeset/lazy-rockets-dress.md deleted file mode 100644 index b11857af04..0000000000 --- a/.changeset/lazy-rockets-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Fix token pass-through for software templates using beta 3 version diff --git a/.changeset/light-trainers-allow.md b/.changeset/light-trainers-allow.md new file mode 100644 index 0000000000..0ea13cd19e --- /dev/null +++ b/.changeset/light-trainers-allow.md @@ -0,0 +1,22 @@ +--- +'@backstage/backend-common': patch +'@backstage/config': patch +'@backstage/config-loader': patch +'@backstage/plugin-app-backend': patch +--- + +Loading of app configurations now reference the `@deprecated` construct from +JSDoc to determine if a property in-use has been deprecated. Users are notified +of deprecated keys in the format: + +```txt +The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead. +``` + +When the `withDeprecatedKeys` option is set to `true` in the `process` method +of `loadConfigSchema`, the user will be notified that deprecated keys have been +identified in their app configuration. + +The `backend-common` and `plugin-app-backend` packages have been updated to set +`withDeprecatedKeys` to true so that users are notified of deprecated settings +by default. diff --git a/.changeset/long-clouds-rest.md b/.changeset/long-clouds-rest.md new file mode 100644 index 0000000000..701be91536 --- /dev/null +++ b/.changeset/long-clouds-rest.md @@ -0,0 +1,12 @@ +--- +'@backstage/cli': patch +--- + +Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties + +```sh +$ yarn backstage-cli config:check --lax --deprecated +config:check --lax --deprecated +Loaded config from app-config.yaml +The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead. +``` diff --git a/.changeset/long-otters-promise.md b/.changeset/long-otters-promise.md deleted file mode 100644 index eecb97e8ac..0000000000 --- a/.changeset/long-otters-promise.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-ldap': patch -'@backstage/plugin-catalog-backend-module-msgraph': patch ---- - -Clean up API report diff --git a/.changeset/metal-worms-flash.md b/.changeset/metal-worms-flash.md deleted file mode 100644 index dd06abdb34..0000000000 --- a/.changeset/metal-worms-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Provide support for Bitbucket servers with custom BaseURLs. diff --git a/.changeset/neat-rice-stare.md b/.changeset/neat-rice-stare.md new file mode 100644 index 0000000000..3f373cbf90 --- /dev/null +++ b/.changeset/neat-rice-stare.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Fix bug with resource loading in permission integration diff --git a/.changeset/nervous-starfishes-report.md b/.changeset/nervous-starfishes-report.md deleted file mode 100644 index 2ac4179a2c..0000000000 --- a/.changeset/nervous-starfishes-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-home': patch ---- - -Adds two new home components - CompanyLogo and Toolkit. diff --git a/.changeset/nervous-taxis-grin.md b/.changeset/nervous-taxis-grin.md deleted file mode 100644 index 76deaa2d5c..0000000000 --- a/.changeset/nervous-taxis-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-tech-insights-backend': patch ---- - -Modify queries to perform better by filtering on sub-queries as well diff --git a/.changeset/olive-laws-thank.md b/.changeset/olive-laws-thank.md deleted file mode 100644 index 06a94d5614..0000000000 --- a/.changeset/olive-laws-thank.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-azure-devops-backend': minor -'@backstage/plugin-azure-devops': patch -'@backstage/plugin-azure-devops-common': minor ---- - -- feat: Created PullRequestsDashboardProvider for resolving team and team member relations -- feat: Created useUserTeamIds hook. -- feat: Updated useFilterProcessor to provide teamIds for `AssignedToCurrentUsersTeams` and `CreatedByCurrentUsersTeams` filters. diff --git a/.changeset/olive-points-flash.md b/.changeset/olive-points-flash.md deleted file mode 100644 index 64b23419de..0000000000 --- a/.changeset/olive-points-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Switch Webpack minification to use `esbuild` instead of `terser`. diff --git a/.changeset/pink-suns-walk.md b/.changeset/pink-suns-walk.md deleted file mode 100644 index 1857b90811..0000000000 --- a/.changeset/pink-suns-walk.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/core-components': patch -'@backstage/create-app': patch -'@backstage/integration': patch -'@backstage/techdocs-common': patch -'@backstage/plugin-apache-airflow': patch -'@backstage/plugin-auth-backend': patch -'@backstage/plugin-azure-devops': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-catalog-import': patch -'@backstage/plugin-catalog-react': patch -'@backstage/plugin-code-coverage': patch -'@backstage/plugin-code-coverage-backend': patch -'@backstage/plugin-cost-insights': patch -'@backstage/plugin-fossa': patch -'@backstage/plugin-jenkins': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-search-backend-node': patch -'@backstage/plugin-techdocs': patch -'@backstage/plugin-techdocs-backend': patch ---- - -Cleaned up API exports diff --git a/.changeset/plenty-eyes-brush.md b/.changeset/plenty-eyes-brush.md deleted file mode 100644 index 354c216c3c..0000000000 --- a/.changeset/plenty-eyes-brush.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Add permissions to create-app's PluginEnvironment - -`CatalogEnvironment` now has a `permissions` field, which means that a permission client must now be provided as part of `PluginEnvironment`. To apply these changes to an existing app, add the following to the `makeCreateEnv` function in `packages/backend/src/index.ts`: - -```diff - // packages/backend/src/index.ts - -+ import { ServerPermissionClient } from '@backstage/plugin-permission-node'; - - function makeCreateEnv(config: Config) { - ... -+ const permissions = ServerPerimssionClient.fromConfig(config, { -+ discovery, -+ tokenManager, -+ }); - - root.info(`Created UrlReader ${reader}`); - - return (plugin: string): PluginEnvironment => { - ... - return { - logger, - cache, - database, - config, - reader, - discovery, - tokenManager, - scheduler, -+ permissions, - }; - } - } -``` - -And add a permissions field to the `PluginEnvironment` type in `packages/backend/src/types.ts`: - -```diff - // packages/backend/src/types.ts - -+ import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; - - export type PluginEnvironment = { - ... -+ permissions: PermissionAuthorizer; - }; -``` - -[`@backstage/plugin-permission-common`](https://www.npmjs.com/package/@backstage/plugin-permission-common) and [`@backstage/plugin-permission-node`](https://www.npmjs.com/package/@backstage/plugin-permission-node) will need to be installed as dependencies: - -```diff - // packages/backend/package.json - -+ "@backstage/plugin-permission-common": "...", -+ "@backstage/plugin-permission-node": "...", -``` diff --git a/.changeset/popular-cycles-work.md b/.changeset/popular-cycles-work.md deleted file mode 100644 index 939f59de94..0000000000 --- a/.changeset/popular-cycles-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -bump `logform` to use fixed version of `color` dependency diff --git a/.changeset/quiet-carpets-shake.md b/.changeset/quiet-carpets-shake.md deleted file mode 100644 index a0744651e3..0000000000 --- a/.changeset/quiet-carpets-shake.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-kubernetes': patch -'@backstage/plugin-pagerduty': patch -'@backstage/plugin-splunk-on-call': patch ---- - -Clean up emptystate.svg image, removing wrong white artifact from the background diff --git a/.changeset/rotten-files-wink.md b/.changeset/rotten-files-wink.md deleted file mode 100644 index 65bd92bcc5..0000000000 --- a/.changeset/rotten-files-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Updated `ResponseErrorPanel` to not use the deprecated `data` property of `ResponseError`. diff --git a/.changeset/rotten-olives-shop.md b/.changeset/rotten-olives-shop.md deleted file mode 100644 index b7fb51ad06..0000000000 --- a/.changeset/rotten-olives-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well. diff --git a/.changeset/selfish-bikes-sleep.md b/.changeset/selfish-bikes-sleep.md deleted file mode 100644 index f05518fde1..0000000000 --- a/.changeset/selfish-bikes-sleep.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-api-docs': patch ---- - -Update @asyncapi/react-component to 1.0.0-next.26, which will fix the -`ResizeObserver loop limit exceeded` errors which we encountered in several E2E -tests. - -For more details check the following links: - -- https://github.com/backstage/backstage/pull/8088#issuecomment-991183968 -- https://github.com/asyncapi/asyncapi-react/issues/498 diff --git a/.changeset/seven-swans-glow.md b/.changeset/seven-swans-glow.md deleted file mode 100644 index 2d41b94082..0000000000 --- a/.changeset/seven-swans-glow.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-tech-insights': patch -'@backstage/plugin-tech-insights-backend': patch -'@backstage/plugin-tech-insights-common': patch -'@backstage/plugin-tech-insights-backend-module-jsonfc': patch ---- - -adding new operation to run checks for multiple entities in one request diff --git a/.changeset/shaggy-emus-look.md b/.changeset/shaggy-emus-look.md deleted file mode 100644 index df8a1fe6fe..0000000000 --- a/.changeset/shaggy-emus-look.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Fixed an issue where valid SAML and GitHub sessions would be considered invalid and not be stored. - -Deprecated the `SamlSession` and `GithubSession` types. diff --git a/.changeset/shiny-emus-complain.md b/.changeset/shiny-emus-complain.md deleted file mode 100644 index 741c092e69..0000000000 --- a/.changeset/shiny-emus-complain.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-catalog-graphql': minor -'@backstage/plugin-graphql-backend': patch ---- - -chore: bumping dependencies in the GraphQL modules and bringing them up to date with the latest `graphql-modules` library diff --git a/.changeset/short-shoes-fail.md b/.changeset/short-shoes-fail.md deleted file mode 100644 index 0b45d67a32..0000000000 --- a/.changeset/short-shoes-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Removed `@backstage/test-utils` dependency. diff --git a/.changeset/silent-nails-sleep.md b/.changeset/silent-nails-sleep.md deleted file mode 100644 index a1587f8427..0000000000 --- a/.changeset/silent-nails-sleep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Allow a GitHubCredentialsProvider to be passed to the GitHub scaffolder tasks actions. diff --git a/.changeset/silver-falcons-nail.md b/.changeset/silver-falcons-nail.md deleted file mode 100644 index 970bbd7fee..0000000000 --- a/.changeset/silver-falcons-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Add apply-conditions endpoint for evaluating conditional permissions in catalog backend. diff --git a/.changeset/silver-knives-change.md b/.changeset/silver-knives-change.md deleted file mode 100644 index a2bbaf1e0b..0000000000 --- a/.changeset/silver-knives-change.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/cli': patch -'@backstage/backend-common': patch ---- - -Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups. diff --git a/.changeset/silver-mice-bake.md b/.changeset/silver-mice-bake.md deleted file mode 100644 index 6cba2fdb0a..0000000000 --- a/.changeset/silver-mice-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': minor ---- - -Removed previously deprecated `ApiRegistry` export. diff --git a/.changeset/slimy-eggs-carry.md b/.changeset/slimy-eggs-carry.md deleted file mode 100644 index a58a3d8c61..0000000000 --- a/.changeset/slimy-eggs-carry.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Switched the secure cookie mode set on the `express-session` to use `'auto'` rather than `true`. This works around an issue where cookies would not be set if TLS termination was handled in a proxy rather than having the backend served directly with HTTPS. - -The downside of this change is that secure cookies won't be used unless the backend is directly served with HTTPS. This will be remedied in a future update that allows the backend to configured for trusted proxy mode. diff --git a/.changeset/stale-gorillas-mix.md b/.changeset/stale-gorillas-mix.md deleted file mode 100644 index 4ffa1fd553..0000000000 --- a/.changeset/stale-gorillas-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider diff --git a/.changeset/techdocs-light-onions-cover.md b/.changeset/techdocs-light-onions-cover.md deleted file mode 100644 index 55c0873575..0000000000 --- a/.changeset/techdocs-light-onions-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Fix an issue where the TechDocs sidebar is hidden when the Backstage sidebar is pinned at smaller screen sizes diff --git a/.changeset/tender-cars-look.md b/.changeset/tender-cars-look.md deleted file mode 100644 index f20ba447d4..0000000000 --- a/.changeset/tender-cars-look.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -Bump `testcontainers` dependency to version `8.1.2` diff --git a/.changeset/thin-buckets-juggle.md b/.changeset/thin-buckets-juggle.md deleted file mode 100644 index a95f8a86ad..0000000000 --- a/.changeset/thin-buckets-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-airbrake': minor ---- - -A plugin for Airbrake (https://airbrake.io/) has been created diff --git a/.changeset/three-sheep-sparkle.md b/.changeset/three-sheep-sparkle.md deleted file mode 100644 index db6d8148ce..0000000000 --- a/.changeset/three-sheep-sparkle.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -In order to integrate the permissions system with the refresh endpoint in catalog-backend, a new AuthorizedRefreshService was created as a thin wrapper around the existing refresh service which performs authorization and handles the case when authorization is denied. In order to instantiate AuthorizedRefreshService, a permission client is required, which was added as a new field to `CatalogEnvironment`. - -The new `permissions` field in `CatalogEnvironment` should already receive the permission client from the `PluginEnvrionment`, so there should be no changes required to the catalog backend setup. See [the create-app changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md) for more details. diff --git a/.changeset/twelve-bears-fail.md b/.changeset/twelve-bears-fail.md deleted file mode 100644 index 6112f5a980..0000000000 --- a/.changeset/twelve-bears-fail.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/core-app-api': patch -'@backstage/core-plugin-api': patch ---- - -Removed direct and transitive MUI dependencies. diff --git a/.changeset/twelve-panthers-move.md b/.changeset/twelve-panthers-move.md deleted file mode 100644 index f52050a488..0000000000 --- a/.changeset/twelve-panthers-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Clean up API reports diff --git a/.changeset/violet-dingos-relate.md b/.changeset/violet-dingos-relate.md deleted file mode 100644 index c8b0c03e2c..0000000000 --- a/.changeset/violet-dingos-relate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/errors': minor ---- - -Removed the deprecated exports `ErrorResponse` and `parseErrorResponse`. - -Removed the deprecated `constructor` and the deprecated `data` property of `ResponseError`. diff --git a/.changeset/warm-crews-flash.md b/.changeset/warm-crews-flash.md deleted file mode 100644 index b21a3ada02..0000000000 --- a/.changeset/warm-crews-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-kubernetes-backend': patch ---- - -Exclude the AWS session token from credential validation, because it's not necessary in this context. diff --git a/.changeset/warm-moles-battle.md b/.changeset/warm-moles-battle.md deleted file mode 100644 index 3d203ea1d3..0000000000 --- a/.changeset/warm-moles-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-tech-insights': patch ---- - -fix React warning because of missing `key` prop diff --git a/.github/workflows/dependabot-changeset-maker.yml b/.github/workflows/dependabot-changeset-maker.yml index e38ce12c6d..e6439f7beb 100644 --- a/.github/workflows/dependabot-changeset-maker.yml +++ b/.github/workflows/dependabot-changeset-maker.yml @@ -1,6 +1,7 @@ name: 'Dependabot changeset maker' on: - - pull_request_target + pull_request_target: + branches: 'dependabot/**' jobs: generate-changeset: diff --git a/STYLE.md b/STYLE.md index 8fbe87eb5f..d968d387fc 100644 --- a/STYLE.md +++ b/STYLE.md @@ -15,6 +15,7 @@ Our TypeScript style is inspired by the [style guidelines](https://github.com/Mi 1. Use camelCase for property names and local variables. 1. Do not use `_` as a prefix for private properties. 1. Use whole words in names when possible. +1. Give type parameters names prefixed with `T`, for example `Request`. ## Syntax and Types diff --git a/docs/auth/google/gcp-iap-auth.md b/docs/auth/google/gcp-iap-auth.md new file mode 100644 index 0000000000..29951951d1 --- /dev/null +++ b/docs/auth/google/gcp-iap-auth.md @@ -0,0 +1,125 @@ +--- +id: provider +title: Google Identity-Aware Proxy Provider +sidebar_label: Google IAP +# prettier-ignore +description: Adding Google Identity-Aware Proxy as an authentication provider in Backstage +--- + +Backstage allows offloading the responsibility of authenticating users to the +Google HTTPS Load Balancer & [IAP](https://cloud.google.com/iap), leveraging the +authentication support on the latter. + +This tutorial shows how to use authentication on an IAP sitting in front of +Backstage. + +It is assumed an IAP is already serving traffic in front of a Backstage instance +configured to serve the frontend app from the backend. + +## Configuration + +Let's start by adding the following `auth` configuration in your +`app-config.yaml` or `app-config.production.yaml` or similar: + +```yaml +auth: + providers: + gcp-iap: + audience: + '/projects//global/backendServices/' +``` + +You can find the project number and service ID in the Google Cloud Console. + +This config section must be in place for the provider to load at all. Now let's +add the provider itself. + +## Backend Changes + +This provider is not enabled by default in the auth backend code, because +besides the config section above, it also needs to be given one or more +callbacks in actual code as well as described below. + +Add a `providerFactories` entry to the router in +`packages/backend/plugin/auth.ts`. + +```ts +import { createGcpIapProvider } from '@backstage/plugin-auth-backend'; + +export default async function createPlugin({ + logger, + database, + config, + discovery, +}: PluginEnvironment): Promise { + return await createRouter({ + logger, + config, + database, + discovery, + providerFactories: { + 'gcp-iap': createGcpIapProvider({ + // Replace the auth handler if you want to customize the returned user + // profile info (can be left out; the default implementation is shown + // below which only returns the email). You may want to amend this code + // with something that loads additional user profile data out of e.g. + // GSuite or LDAP or similar. + async authHandler({ iapToken }) { + return { profile: { email: iapToken.email } }; + }, + signIn: { + // You need to supply an identity resolver, that takes the profile + // and the IAP token and produces the Backstage token with the + // relevant user info. + async resolver({ profile, result: { iapToken } }, ctx) { + // Somehow compute the Backstage token claims. Just some dummy code + // shown here, but you may want to query your LDAP server, or + // GSuite or similar, based on the IAP token sub/email claims + const id = `user:default/${iapToken.email.split('@')[0]}`; + const fullEnt = ['group:default/team-name']; + const token = await ctx.tokenIssuer.issueToken({ + claims: { sub: id, ent: fullEnt }, + }); + return { id, token }; + }, + }, + }), + }, + }); +} +``` + +Now the backend is ready to serve auth requests on the +`/api/auth/gcp-iap/refresh` endpoint. All that's left is to update the frontend +sign-in mechanism to poll that endpoint through the IAP, on the user's behalf. + +## Frontend Changes + +All Backstage apps need a `SignInPage` to be configured. Its purpose is to +establish who the user is and what their identifying credentials are, blocking +rendering the rest of the UI until that's complete, and then keeping those +credentials fresh. + +When using IAP Proxy authentication, the Backstage UI will only be loaded once +the user has already successfully completely authenticated themselves with the +IAP and has an active session, so we don't want to make the user have to go +through a _second_ layer of authentication flows after that. + +As such, we want to not display a sign-in page visually at all. Instead, we will +pick a `SignInPage` implementation component which knows how to silently make +requests to the backend provider we configured above, and just trusting its +output to properly represent the current user. Luckily, Backstage comes with a +component for this purpose out of the box. + +Update your `createApp` call in `packages/app/src/App.tsx`, as follows. + +```diff ++import { ProxiedSignInPage } from '@backstage/core-components'; + + const app = createApp({ + components: { ++ SignInPage: props => , +``` + +After this, your app should be ready to leverage the Identity-Aware Proxy for +authentication! diff --git a/docs/auth/identity-resolver.md b/docs/auth/identity-resolver.md index 2c36ddcd7f..a33351e938 100644 --- a/docs/auth/identity-resolver.md +++ b/docs/auth/identity-resolver.md @@ -96,7 +96,7 @@ It can be enabled like this ```tsx // File: packages/backend/src/plugins/auth.ts -import { googleEmailSignInResolver } from '@backstage/plugin-auth-backend'; +import { googleEmailSignInResolver, createGoogleProvider } from '@backstage/plugin-auth-backend'; export default async function createPlugin({ ... diff --git a/docs/features/software-catalog/descriptor-format.md b/docs/features/software-catalog/descriptor-format.md index 57473ce4c7..ec4e13c1d4 100644 --- a/docs/features/software-catalog/descriptor-format.md +++ b/docs/features/software-catalog/descriptor-format.md @@ -1266,6 +1266,10 @@ shape, this kind has the following structure. Exactly equal to `backstage.io/v1alpha1` and `Location`, respectively. +### `spec` [required] + +The `spec` field is required. The minimal spec should be an empty object. + ### `spec.type` [optional] The single location type, that's common to the targets specified in the spec. If diff --git a/docs/integrations/aws-s3/discovery.md b/docs/integrations/aws-s3/discovery.md index d50aceacb8..545a578e63 100644 --- a/docs/integrations/aws-s3/discovery.md +++ b/docs/integrations/aws-s3/discovery.md @@ -26,3 +26,16 @@ catalog: ``` Note the `s3-discovery` type, as this is not a regular `url` processor. + +As this processor is not one of the default providers, you will also need to add +the below to `packages/backend/src/plugins/catalog.ts`: + +```ts +/* packages/backend/src/plugins/catalog.ts */ + +import { AwsS3DiscoveryProcessor } from '@backstage/plugin-catalog-backend'; + +const builder = await CatalogBuilder.create(env); +/** ... other processors ... */ +builder.addProcessor(new AwsS3DiscoveryProcessor(env.reader)); +``` diff --git a/docs/local-dev/cli-commands.md b/docs/local-dev/cli-commands.md index caec60ed70..21b129e0c2 100644 --- a/docs/local-dev/cli-commands.md +++ b/docs/local-dev/cli-commands.md @@ -556,6 +556,7 @@ Options: --package <name> Only load config schema that applies to the given package --lax Do not require environment variables to be set --frontend Only validate the frontend configuration + --deprecated List all deprecated configuration settings --config <path> Config files to load instead of app-config.yaml (default: []) -h, --help display help for command ``` diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 751b758984..631a4726e1 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/app-defaults +## 0.1.4 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/core-app-api@0.4.0 + - @backstage/plugin-permission-react@0.2.2 + ## 0.1.3 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 89d83ae91f..eb65583934 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "0.1.3", + "version": "0.1.4", "private": false, "publishConfig": { "access": "public", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.2", - "@backstage/core-app-api": "^0.3.0", - "@backstage/core-plugin-api": "^0.4.0", - "@backstage/plugin-permission-react": "^0.2.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-permission-react": "^0.2.2", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,8 +42,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@types/jest": "^26.0.7", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index c14db343bc..aa2fdc5ffa 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,55 @@ # example-app +## 0.2.60 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/cli@0.11.0 + - @backstage/plugin-tech-insights@0.1.5 + - @backstage/plugin-gocd@0.1.1 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-org@0.3.34 + - @backstage/plugin-home@0.4.10 + - @backstage/plugin-azure-devops@0.1.10 + - @backstage/plugin-apache-airflow@0.1.3 + - @backstage/plugin-catalog-import@0.7.9 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/plugin-code-coverage@0.1.22 + - @backstage/plugin-cost-insights@0.11.17 + - @backstage/plugin-jenkins@0.5.17 + - @backstage/plugin-scaffolder@0.11.18 + - @backstage/plugin-techdocs@0.12.14 + - @backstage/plugin-kubernetes@0.5.4 + - @backstage/plugin-pagerduty@0.3.22 + - @backstage/plugin-api-docs@0.6.22 + - @backstage/core-app-api@0.4.0 + - @backstage/plugin-airbrake@0.1.0 + - @backstage/app-defaults@0.1.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + - @backstage/plugin-badges@0.2.19 + - @backstage/plugin-catalog@0.7.8 + - @backstage/plugin-catalog-graph@0.2.6 + - @backstage/plugin-circleci@0.2.34 + - @backstage/plugin-cloudbuild@0.2.32 + - @backstage/plugin-explore@0.3.25 + - @backstage/plugin-gcp-projects@0.3.13 + - @backstage/plugin-github-actions@0.4.31 + - @backstage/plugin-graphiql@0.2.27 + - @backstage/plugin-kafka@0.2.25 + - @backstage/plugin-lighthouse@0.2.34 + - @backstage/plugin-newrelic@0.3.13 + - @backstage/plugin-newrelic-dashboard@0.1.3 + - @backstage/plugin-rollbar@0.3.23 + - @backstage/plugin-search@0.5.5 + - @backstage/plugin-sentry@0.3.33 + - @backstage/plugin-shortcuts@0.1.19 + - @backstage/plugin-tech-radar@0.5.2 + - @backstage/plugin-todo@0.1.18 + - @backstage/plugin-user-settings@0.3.16 + ## 0.2.59 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index b83c43674b..bc30713a94 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,54 +1,54 @@ { "name": "example-app", - "version": "0.2.59", + "version": "0.2.60", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/integration-react": "^0.1.16", - "@backstage/plugin-airbrake": "^0.0.0", - "@backstage/plugin-api-docs": "^0.6.21", - "@backstage/plugin-azure-devops": "^0.1.9", - "@backstage/plugin-apache-airflow": "^0.1.2", - "@backstage/plugin-badges": "^0.2.18", - "@backstage/plugin-catalog": "^0.7.7", - "@backstage/plugin-catalog-graph": "^0.2.5", - "@backstage/plugin-catalog-import": "^0.7.8", - "@backstage/plugin-catalog-react": "^0.6.10", - "@backstage/plugin-circleci": "^0.2.33", - "@backstage/plugin-cloudbuild": "^0.2.31", - "@backstage/plugin-code-coverage": "^0.1.21", - "@backstage/plugin-cost-insights": "^0.11.16", - "@backstage/plugin-explore": "^0.3.24", - "@backstage/plugin-gcp-projects": "^0.3.12", - "@backstage/plugin-github-actions": "^0.4.30", - "@backstage/plugin-gocd": "^0.1.0", - "@backstage/plugin-graphiql": "^0.2.26", - "@backstage/plugin-home": "^0.4.9", - "@backstage/plugin-jenkins": "^0.5.16", - "@backstage/plugin-kafka": "^0.2.24", - "@backstage/plugin-kubernetes": "^0.5.3", - "@backstage/plugin-lighthouse": "^0.2.33", - "@backstage/plugin-newrelic": "^0.3.12", - "@backstage/plugin-newrelic-dashboard": "^0.1.2", - "@backstage/plugin-org": "^0.3.33", - "@backstage/plugin-pagerduty": "0.3.21", - "@backstage/plugin-rollbar": "^0.3.22", - "@backstage/plugin-scaffolder": "^0.11.17", - "@backstage/plugin-search": "^0.5.4", - "@backstage/plugin-sentry": "^0.3.32", - "@backstage/plugin-shortcuts": "^0.1.18", - "@backstage/plugin-tech-radar": "^0.5.1", - "@backstage/plugin-techdocs": "^0.12.13", - "@backstage/plugin-todo": "^0.1.17", - "@backstage/plugin-user-settings": "^0.3.15", + "@backstage/app-defaults": "^0.1.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-airbrake": "^0.1.0", + "@backstage/plugin-api-docs": "^0.6.22", + "@backstage/plugin-azure-devops": "^0.1.10", + "@backstage/plugin-apache-airflow": "^0.1.3", + "@backstage/plugin-badges": "^0.2.19", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/plugin-catalog-graph": "^0.2.6", + "@backstage/plugin-catalog-import": "^0.7.9", + "@backstage/plugin-catalog-react": "^0.6.11", + "@backstage/plugin-circleci": "^0.2.34", + "@backstage/plugin-cloudbuild": "^0.2.32", + "@backstage/plugin-code-coverage": "^0.1.22", + "@backstage/plugin-cost-insights": "^0.11.17", + "@backstage/plugin-explore": "^0.3.25", + "@backstage/plugin-gcp-projects": "^0.3.13", + "@backstage/plugin-github-actions": "^0.4.31", + "@backstage/plugin-gocd": "^0.1.1", + "@backstage/plugin-graphiql": "^0.2.27", + "@backstage/plugin-home": "^0.4.10", + "@backstage/plugin-jenkins": "^0.5.17", + "@backstage/plugin-kafka": "^0.2.25", + "@backstage/plugin-kubernetes": "^0.5.4", + "@backstage/plugin-lighthouse": "^0.2.34", + "@backstage/plugin-newrelic": "^0.3.13", + "@backstage/plugin-newrelic-dashboard": "^0.1.3", + "@backstage/plugin-org": "^0.3.34", + "@backstage/plugin-pagerduty": "0.3.22", + "@backstage/plugin-rollbar": "^0.3.23", + "@backstage/plugin-scaffolder": "^0.11.18", + "@backstage/plugin-search": "^0.5.5", + "@backstage/plugin-sentry": "^0.3.33", + "@backstage/plugin-shortcuts": "^0.1.19", + "@backstage/plugin-tech-radar": "^0.5.2", + "@backstage/plugin-techdocs": "^0.12.14", + "@backstage/plugin-todo": "^0.1.18", + "@backstage/plugin-user-settings": "^0.3.16", "@backstage/search-common": "^0.2.0", - "@backstage/plugin-tech-insights": "^0.1.4", + "@backstage/plugin-tech-insights": "^0.1.5", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -68,7 +68,7 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/test-utils": "^0.2.0", + "@backstage/test-utils": "^0.2.2", "@rjsf/core": "^3.2.1", "@testing-library/cypress": "^8.0.2", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 7edcbc7acf..ccba33dc34 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/backend-common +## 0.10.3 + +### Patch Changes + +- 5b406daabe: build(deps-dev): bump `http-errors` from 1.8.0 to 2.0.0 +- 5333451def: Cleaned up API exports +- db5310e25e: bump `logform` to use fixed version of `color` dependency +- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups. +- 3b4d8caff6: The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider +- f77bd5c8ff: Clean up API reports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/errors@0.2.0 + - @backstage/config-loader@0.9.2 + ## 0.10.2 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index dae5804583..a1e3533fb7 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.10.2", + "version": "0.10.3", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -30,10 +30,10 @@ }, "dependencies": { "@backstage/cli-common": "^0.1.6", - "@backstage/config": "^0.1.11", - "@backstage/config-loader": "^0.9.1", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", + "@backstage/config": "^0.1.12", + "@backstage/config-loader": "^0.9.2", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@backstage/types": "^0.1.1", "@google-cloud/storage": "^5.8.0", "@manypkg/get-packages": "^1.1.3", @@ -81,8 +81,8 @@ } }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/archiver": "^5.1.0", "@types/compression": "^1.7.0", "@types/concat-stream": "^1.6.0", diff --git a/packages/backend-common/src/config.ts b/packages/backend-common/src/config.ts index 12cc2e3a9d..9081b99284 100644 --- a/packages/backend-common/src/config.ts +++ b/packages/backend-common/src/config.ts @@ -39,7 +39,10 @@ const updateRedactionList = ( configs: AppConfig[], logger: Logger, ) => { - const secretAppConfigs = schema.process(configs, { visibility: ['secret'] }); + const secretAppConfigs = schema.process(configs, { + visibility: ['secret'], + withDeprecatedKeys: true, + }); const secretConfig = ConfigReader.fromConfigs(secretAppConfigs); const values = new Set(); const data = secretConfig.get(); diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index acaa41c131..4042074ebe 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-tasks +## 0.1.3 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index e7af82ce95..5ffb689be9 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.1.2", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -29,9 +29,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.2", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.4", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", "@types/luxon": "^2.0.4", "knex": "^0.95.1", @@ -43,8 +43,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.11", - "@backstage/cli": "^0.10.5", + "@backstage/backend-test-utils": "^0.1.13", + "@backstage/cli": "^0.11.0", "jest": "^26.0.1", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index f484a0fb8f..5701ed8933 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/backend-test-utils +## 0.1.13 + +### Patch Changes + +- b1bc55405e: Bump `testcontainers` dependency to version `8.1.2` +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/cli@0.11.0 + ## 0.1.12 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 78daeb4efe..b3abbfca18 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.12", + "version": "0.1.13", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -30,9 +30,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/cli": "^0.10.4", - "@backstage/config": "^0.1.9", + "@backstage/backend-common": "^0.10.3", + "@backstage/cli": "^0.11.0", + "@backstage/config": "^0.1.12", "knex": "^0.95.1", "mysql2": "^2.2.5", "pg": "^8.3.0", @@ -41,7 +41,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "jest": "^26.0.1" }, "files": [ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index f3c2d4f861..bd9c1f3649 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,35 @@ # example-backend +## 0.2.60 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/plugin-scaffolder-backend@0.15.20 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-todo-backend@0.1.18 + - @backstage/plugin-catalog-backend@0.20.0 + - @backstage/plugin-tech-insights-backend@0.1.5 + - @backstage/plugin-permission-node@0.3.0 + - @backstage/plugin-auth-backend@0.6.2 + - @backstage/plugin-code-coverage-backend@0.1.19 + - @backstage/plugin-search-backend-node@0.4.4 + - @backstage/plugin-techdocs-backend@0.12.3 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.5 + - @backstage/plugin-permission-backend@0.3.0 + - @backstage/plugin-graphql-backend@0.1.11 + - @backstage/plugin-kubernetes-backend@0.4.3 + - example-app@0.2.60 + - @backstage/backend-tasks@0.1.3 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-badges-backend@0.1.15 + - @backstage/plugin-kafka-backend@0.2.14 + - @backstage/plugin-permission-common@0.3.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.2.3 + ## 0.2.59 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index f204659789..c3b2236dd8 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.59", + "version": "0.2.60", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,43 +24,43 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/backend-tasks": "^0.1.0", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.10", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/backend-tasks": "^0.1.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/integration": "^0.7.1", "@backstage/plugin-app-backend": "^0.3.21", - "@backstage/plugin-auth-backend": "^0.6.0", + "@backstage/plugin-auth-backend": "^0.6.2", "@backstage/plugin-azure-devops-backend": "^0.2.6", - "@backstage/plugin-badges-backend": "^0.1.14", - "@backstage/plugin-catalog-backend": "^0.19.4", - "@backstage/plugin-code-coverage-backend": "^0.1.18", - "@backstage/plugin-graphql-backend": "^0.1.10", + "@backstage/plugin-badges-backend": "^0.1.15", + "@backstage/plugin-catalog-backend": "^0.20.0", + "@backstage/plugin-code-coverage-backend": "^0.1.19", + "@backstage/plugin-graphql-backend": "^0.1.11", "@backstage/plugin-jenkins-backend": "^0.1.10", - "@backstage/plugin-kubernetes-backend": "^0.4.1", - "@backstage/plugin-kafka-backend": "^0.2.13", - "@backstage/plugin-permission-backend": "^0.2.3", - "@backstage/plugin-permission-common": "^0.3.0", - "@backstage/plugin-permission-node": "^0.2.3", + "@backstage/plugin-kubernetes-backend": "^0.4.3", + "@backstage/plugin-kafka-backend": "^0.2.14", + "@backstage/plugin-permission-backend": "^0.3.0", + "@backstage/plugin-permission-common": "^0.3.1", + "@backstage/plugin-permission-node": "^0.3.0", "@backstage/plugin-proxy-backend": "^0.2.15", "@backstage/plugin-rollbar-backend": "^0.1.18", - "@backstage/plugin-scaffolder-backend": "^0.15.19", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.2", + "@backstage/plugin-scaffolder-backend": "^0.15.20", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.2.3", "@backstage/plugin-search-backend": "^0.3.0", - "@backstage/plugin-search-backend-node": "^0.4.2", + "@backstage/plugin-search-backend-node": "^0.4.4", "@backstage/plugin-search-backend-module-elasticsearch": "^0.0.7", "@backstage/plugin-search-backend-module-pg": "^0.2.3", - "@backstage/plugin-techdocs-backend": "^0.12.2", - "@backstage/plugin-tech-insights-backend": "^0.1.4", + "@backstage/plugin-techdocs-backend": "^0.12.3", + "@backstage/plugin-tech-insights-backend": "^0.1.5", "@backstage/plugin-tech-insights-node": "^0.1.2", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.4", - "@backstage/plugin-todo-backend": "^0.1.17", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.5", + "@backstage/plugin-todo-backend": "^0.1.18", "@gitbeaker/node": "^34.6.0", "@octokit/rest": "^18.5.3", "azure-devops-node-api": "^11.0.1", "dockerode": "^3.3.1", - "example-app": "^0.2.58", + "example-app": "^0.2.60", "express": "^4.17.1", "express-promise-router": "^4.1.0", "express-prom-bundle": "^6.3.6", @@ -72,7 +72,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5" diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 6d5c3d4a94..691cdac37c 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/catalog-client +## 0.5.4 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.5.3 ### Patch Changes diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index 5ccb600e0c..97c500e4c3 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-client", "description": "An isomorphic client for the catalog backend", - "version": "0.5.3", + "version": "0.5.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,12 +30,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/errors": "^0.1.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/errors": "^0.2.0", "cross-fetch": "^3.0.6" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "msw": "^0.35.0" }, diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md index 8c0a65c20a..a669ef6dce 100644 --- a/packages/catalog-model/CHANGELOG.md +++ b/packages/catalog-model/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/catalog-model +## 0.9.9 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/errors@0.2.0 + ## 0.9.8 ### Patch Changes diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index 6fdc89bdfb..c1a13d00f2 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-model", "description": "Types and validators that help describe the model of a Backstage Catalog", - "version": "0.9.8", + "version": "0.9.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,8 +30,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.4", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", "@types/json-schema": "^7.0.5", "@types/yup": "^0.29.13", @@ -42,7 +42,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.10.2", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "@types/lodash": "^4.14.151", "yaml": "^1.9.2" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index b412c1b079..f65caf08d4 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,44 @@ # @backstage/cli +## 0.11.0 + +### Minor Changes + +- 14e980acee: ESLint upgraded to version 8 and all it's plugins updated to newest version. + + If you use any custom plugins for ESLint please check compatibility. + + ```diff + - "@typescript-eslint/eslint-plugin": "^v4.33.0", + - "@typescript-eslint/parser": "^v4.28.3", + + "@typescript-eslint/eslint-plugin": "^5.9.0", + + "@typescript-eslint/parser": "^5.9.0", + - "eslint": "^7.30.0", + + "eslint": "^8.6.0", + - "eslint-plugin-import": "^2.20.2", + - "eslint-plugin-jest": "^24.1.0", + - "eslint-plugin-jsx-a11y": "^6.2.1", + + "eslint-plugin-import": "^2.25.4", + + "eslint-plugin-jest": "^25.3.4", + + "eslint-plugin-jsx-a11y": "^6.5.1", + - "eslint-plugin-react": "^7.12.4", + - "eslint-plugin-react-hooks": "^4.0.0", + + "eslint-plugin-react": "^7.28.0", + + "eslint-plugin-react-hooks": "^4.3.0", + ``` + + Please consult changelogs from packages if you find any problems. + +### Patch Changes + +- f302d24d34: Switch Webpack minification to use `esbuild` instead of `terser`. +- bee7082094: Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well. +- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/errors@0.2.0 + - @backstage/config-loader@0.9.2 + ## 0.10.5 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index be09563796..edb2cfb3ce 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.10.5", + "version": "0.11.0", "private": false, "publishConfig": { "access": "public" @@ -29,9 +29,9 @@ }, "dependencies": { "@backstage/cli-common": "^0.1.6", - "@backstage/config": "^0.1.11", - "@backstage/config-loader": "^0.9.1", - "@backstage/errors": "^0.1.5", + "@backstage/config": "^0.1.12", + "@backstage/config-loader": "^0.9.2", + "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", "@hot-loader/react-dom": "^16.13.0", "@manypkg/get-packages": "^1.1.3", @@ -115,13 +115,13 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.10.2", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@backstage/theme": "^0.2.14", "@types/diff": "^5.0.0", "@types/express": "^4.17.6", diff --git a/packages/cli/src/commands/config/validate.ts b/packages/cli/src/commands/config/validate.ts index 2d3ce60366..8d528b8300 100644 --- a/packages/cli/src/commands/config/validate.ts +++ b/packages/cli/src/commands/config/validate.ts @@ -23,5 +23,6 @@ export default async (cmd: Command) => { fromPackage: cmd.package, mockEnv: cmd.lax, fullVisibility: !cmd.frontend, + withDeprecatedKeys: cmd.deprecated, }); }; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index fa00bf4073..dfe427b27b 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -193,6 +193,7 @@ export function registerCommands(program: CommanderStatic) { ) .option('--lax', 'Do not require environment variables to be set') .option('--frontend', 'Only validate the frontend configuration') + .option('--deprecated', 'Output deprecated configuration settings') .option(...configOption) .description( 'Validate that the given configuration loads and matches schema', diff --git a/packages/cli/src/lib/config.ts b/packages/cli/src/lib/config.ts index b43e4798b4..e7ceeadf08 100644 --- a/packages/cli/src/lib/config.ts +++ b/packages/cli/src/lib/config.ts @@ -30,6 +30,7 @@ type Options = { fromPackage?: string; mockEnv?: boolean; withFilteredKeys?: boolean; + withDeprecatedKeys?: boolean; fullVisibility?: boolean; }; @@ -91,6 +92,7 @@ export async function loadCliConfig(options: Options) { ? ['frontend', 'backend', 'secret'] : ['frontend'], withFilteredKeys: options.withFilteredKeys, + withDeprecatedKeys: options.withDeprecatedKeys, }); const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs); diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 7c6ccaf9fe..c7a70212e6 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/codemods +## 0.1.29 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/core-app-api@0.4.0 + ## 0.1.28 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 88ed029f00..9a3cb370b9 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.28", + "version": "0.1.29", "private": false, "publishConfig": { "access": "public", diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index 36aae32e8b..d91ac57ab2 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/config-loader +## 0.9.2 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/errors@0.2.0 + ## 0.9.1 ### Patch Changes diff --git a/packages/config-loader/api-report.md b/packages/config-loader/api-report.md index 106c744d7b..06868e0f47 100644 --- a/packages/config-loader/api-report.md +++ b/packages/config-loader/api-report.md @@ -21,6 +21,7 @@ export type ConfigSchemaProcessingOptions = { visibility?: ConfigVisibility[]; valueTransform?: TransformFunc; withFilteredKeys?: boolean; + withDeprecatedKeys?: boolean; }; // @public (undocumented) diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index d909cde58c..6e6364c9b0 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "0.9.1", + "version": "0.9.2", "private": false, "publishConfig": { "access": "public", @@ -31,8 +31,8 @@ }, "dependencies": { "@backstage/cli-common": "^0.1.6", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.4", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", "@types/json-schema": "^7.0.6", "ajv": "^7.0.3", diff --git a/packages/config-loader/src/lib/schema/collect.ts b/packages/config-loader/src/lib/schema/collect.ts index 8e7f582e44..a05796139b 100644 --- a/packages/config-loader/src/lib/schema/collect.ts +++ b/packages/config-loader/src/lib/schema/collect.ts @@ -182,10 +182,10 @@ function compileTsSchemas(paths: string[]) { program, // All schemas should export a `Config` symbol 'Config', - // This enables usage of @visibility is doc comments + // This enables usage of @visibility and @deprecated in doc comments { required: true, - validationKeywords: ['visibility'], + validationKeywords: ['visibility', 'deprecated'], }, [path.split(sep).join('/')], // Unix paths are expected for all OSes here ) as JsonObject | null; diff --git a/packages/config-loader/src/lib/schema/compile.test.ts b/packages/config-loader/src/lib/schema/compile.test.ts index 1e63f3cbf8..7b7db87c8f 100644 --- a/packages/config-loader/src/lib/schema/compile.test.ts +++ b/packages/config-loader/src/lib/schema/compile.test.ts @@ -40,6 +40,7 @@ describe('compileConfigSchemas', () => { ], visibilityByDataPath: new Map(), visibilityBySchemaPath: new Map(), + deprecationByDataPath: new Map(), }); expect(validate([{ data: { b: 'b' }, context: 'test' }])).toEqual({ errors: [ @@ -53,6 +54,7 @@ describe('compileConfigSchemas', () => { ], visibilityByDataPath: new Map(), visibilityBySchemaPath: new Map(), + deprecationByDataPath: new Map(), }); }); @@ -112,6 +114,7 @@ describe('compileConfigSchemas', () => { '/properties/d/items': 'frontend', }), ), + deprecationByDataPath: new Map(), }); }); @@ -137,4 +140,34 @@ describe('compileConfigSchemas', () => { "Config schema visibility is both 'frontend' and 'secret' for properties/a/visibility", ); }); + + it('should discover deprecations', () => { + const validate = compileConfigSchemas([ + { + path: 'a1', + value: { + type: 'object', + properties: { + a: { type: 'string', deprecated: 'deprecation reason for a' }, + b: { type: 'string', deprecated: 'deprecation reason for b' }, + c: { type: 'string' }, + }, + }, + }, + ]); + expect( + validate([ + { data: { a: 'a', b: 'b', c: 'c', d: ['d'] }, context: 'test' }, + ]), + ).toEqual({ + deprecationByDataPath: new Map( + Object.entries({ + '/a': 'deprecation reason for a', + '/b': 'deprecation reason for b', + }), + ), + visibilityByDataPath: new Map(), + visibilityBySchemaPath: new Map(), + }); + }); }); diff --git a/packages/config-loader/src/lib/schema/compile.ts b/packages/config-loader/src/lib/schema/compile.ts index 1cbf5a404d..b7f705751e 100644 --- a/packages/config-loader/src/lib/schema/compile.ts +++ b/packages/config-loader/src/lib/schema/compile.ts @@ -40,6 +40,7 @@ export function compileConfigSchemas( // output during validation. We work around this by having this extra piece // of state that we reset before each validation. const visibilityByDataPath = new Map(); + const deprecationByDataPath = new Map(); const ajv = new Ajv({ allErrors: true, @@ -47,28 +48,48 @@ export function compileConfigSchemas( schemas: { 'https://backstage.io/schema/config-v1': true, }, - }).addKeyword({ - keyword: 'visibility', - metaSchema: { - type: 'string', - enum: CONFIG_VISIBILITIES, - }, - compile(visibility: ConfigVisibility) { - return (_data, context) => { - if (context?.dataPath === undefined) { - return false; - } - if (visibility && visibility !== 'backend') { + }) + .addKeyword({ + keyword: 'visibility', + metaSchema: { + type: 'string', + enum: CONFIG_VISIBILITIES, + }, + compile(visibility: ConfigVisibility) { + return (_data, context) => { + if (context?.dataPath === undefined) { + return false; + } + if (visibility && visibility !== 'backend') { + const normalizedPath = context.dataPath.replace( + /\['?(.*?)'?\]/g, + (_, segment) => `/${segment}`, + ); + visibilityByDataPath.set(normalizedPath, visibility); + } + return true; + }; + }, + }) + .removeKeyword('deprecated') // remove `deprecated` keyword so that we can implement our own compiler + .addKeyword({ + keyword: 'deprecated', + metaSchema: { type: 'string' }, + compile(deprecationDescription: string) { + return (_data, context) => { + if (context?.dataPath === undefined) { + return false; + } const normalizedPath = context.dataPath.replace( /\['?(.*?)'?\]/g, (_, segment) => `/${segment}`, ); - visibilityByDataPath.set(normalizedPath, visibility); - } - return true; - }; - }, - }); + // create mapping of deprecation description and data path of property + deprecationByDataPath.set(normalizedPath, deprecationDescription); + return true; + }; + }, + }); for (const schema of schemas) { try { @@ -79,6 +100,7 @@ export function compileConfigSchemas( } const merged = mergeConfigSchemas(schemas.map(_ => _.value)); + const validate = ajv.compile(merged); const visibilityBySchemaPath = new Map(); @@ -94,17 +116,20 @@ export function compileConfigSchemas( visibilityByDataPath.clear(); const valid = validate(config); + if (!valid) { return { errors: validate.errors ?? [], visibilityByDataPath: new Map(visibilityByDataPath), visibilityBySchemaPath, + deprecationByDataPath, }; } return { visibilityByDataPath: new Map(visibilityByDataPath), visibilityBySchemaPath, + deprecationByDataPath, }; }; } diff --git a/packages/config-loader/src/lib/schema/filtering.test.ts b/packages/config-loader/src/lib/schema/filtering.test.ts index be07b915ed..df06975c9f 100644 --- a/packages/config-loader/src/lib/schema/filtering.test.ts +++ b/packages/config-loader/src/lib/schema/filtering.test.ts @@ -64,6 +64,13 @@ const visibility = new Map( }), ); +const deprecations = new Map( + Object.entries({ + '/arr': 'deprecated array', + '/objB/never': 'deprecated nested property', + }), +); + describe('filterByVisibility', () => { test.each<[ConfigVisibility[], JsonObject]>([ [ @@ -185,9 +192,34 @@ describe('filterByVisibility', () => { [['frontend', 'backend', 'secret'], { data, filteredKeys: [] }], ])('should filter correctly with %p', (filter, expected) => { expect( - filterByVisibility(data, filter, visibility, undefined, true), + filterByVisibility( + data, + filter, + visibility, + deprecations, + undefined, + true, + false, + ), ).toEqual(expected); }); + + it('should include deprecated keys regardless of visibility', () => { + expect( + filterByVisibility( + data, + [], + visibility, + deprecations, + undefined, + true, + true, + ).deprecatedKeys, + ).toEqual([ + { key: 'arr', description: 'deprecated array' }, + { key: 'objB.never', description: 'deprecated nested property' }, + ]); + }); }); describe('filterErrorsByVisibility', () => { diff --git a/packages/config-loader/src/lib/schema/filtering.ts b/packages/config-loader/src/lib/schema/filtering.ts index b2f39d3cc4..2855979b1f 100644 --- a/packages/config-loader/src/lib/schema/filtering.ts +++ b/packages/config-loader/src/lib/schema/filtering.ts @@ -30,10 +30,17 @@ export function filterByVisibility( data: JsonObject, includeVisibilities: ConfigVisibility[], visibilityByDataPath: Map, + deprecationByDataPath: Map, transformFunc?: TransformFunc, withFilteredKeys?: boolean, -): { data: JsonObject; filteredKeys?: string[] } { + withDeprecatedKeys?: boolean, +): { + data: JsonObject; + filteredKeys?: string[]; + deprecatedKeys?: { key: string; description: string }[]; +} { const filteredKeys = new Array(); + const deprecatedKeys = new Array<{ key: string; description: string }>(); function transform( jsonVal: JsonValue, @@ -44,6 +51,12 @@ export function filterByVisibility( visibilityByDataPath.get(visibilityPath) ?? DEFAULT_CONFIG_VISIBILITY; const isVisible = includeVisibilities.includes(visibility); + // deprecated keys are added regardless of visibility indicator + const deprecation = deprecationByDataPath.get(visibilityPath); + if (deprecation) { + deprecatedKeys.push({ key: filterPath, description: deprecation }); + } + if (typeof jsonVal !== 'object') { if (isVisible) { if (transformFunc) { @@ -109,6 +122,7 @@ export function filterByVisibility( return { filteredKeys: withFilteredKeys ? filteredKeys : undefined, + deprecatedKeys: withDeprecatedKeys ? deprecatedKeys : undefined, data: (transform(data, '', '') as JsonObject) ?? {}, }; } diff --git a/packages/config-loader/src/lib/schema/load.test.ts b/packages/config-loader/src/lib/schema/load.test.ts index e2ae3cc2c7..8510ccb1d8 100644 --- a/packages/config-loader/src/lib/schema/load.test.ts +++ b/packages/config-loader/src/lib/schema/load.test.ts @@ -62,7 +62,10 @@ describe('loadConfigSchema', () => { expect(schema.process(configs)).toEqual(configs); expect(schema.process(configs, { visibility: ['frontend'] })).toEqual([ - { data: { key1: 'a' }, context: 'test' }, + { + data: { key1: 'a' }, + context: 'test', + }, ]); expect( schema.process(configs, { @@ -71,7 +74,11 @@ describe('loadConfigSchema', () => { withFilteredKeys: true, }), ).toEqual([ - { data: { key1: 'X' }, context: 'test', filteredKeys: ['key2'] }, + { + data: { key1: 'X' }, + context: 'test', + filteredKeys: ['key2'], + }, ]); expect( schema.process(configs, { @@ -79,14 +86,21 @@ describe('loadConfigSchema', () => { withFilteredKeys: true, }), ).toEqual([ - { data: { key1: 'X', key2: 'X' }, context: 'test', filteredKeys: [] }, + { + data: { key1: 'X', key2: 'X' }, + context: 'test', + filteredKeys: [], + }, ]); const serialized = schema.serialize(); const schema2 = await loadConfigSchema({ serialized }); expect(schema2.process(configs, { visibility: ['frontend'] })).toEqual([ - { data: { key1: 'a' }, context: 'test' }, + { + data: { key1: 'a' }, + context: 'test', + }, ]); expect(() => schema2.process([...configs, { data: { key1: 3 }, context: 'test2' }]), @@ -131,7 +145,10 @@ describe('loadConfigSchema', () => { 'Config validation failed, Config should be number { type=number } at /key2', ); expect(schema.process(configs, { visibility: ['frontend'] })).toEqual([ - { data: { key1: 'a' }, context: 'test' }, + { + data: { key1: 'a' }, + context: 'test', + }, ]); expect(() => schema.process(configs, { visibility: ['secret'] })).toThrow( 'Config validation failed, Config should be number { type=number } at /key2', @@ -179,7 +196,12 @@ describe('loadConfigSchema', () => { ]; expect( schema.process(mkConfig({ x: 1 }), { visibility: ['frontend'] }), - ).toEqual([{ data: { nested: [{}] }, context: 'test' }]); + ).toEqual([ + { + data: { nested: [{}] }, + context: 'test', + }, + ]); expect(() => schema.process(mkConfig({ y: 1 }))).toThrow( 'Config validation failed, Config should be string { type=string } at /nested/0/y', ); @@ -190,10 +212,20 @@ describe('loadConfigSchema', () => { ); expect( schema.process(mkConfig({ x: 'a' }), { visibility: ['frontend'] }), - ).toEqual([{ data: { nested: [{}] }, context: 'test' }]); + ).toEqual([ + { + data: { nested: [{}] }, + context: 'test', + }, + ]); expect( schema.process(mkConfig({ y: 'aaa' }), { visibility: ['frontend'] }), - ).toEqual([{ data: { nested: [{ y: 'aaa' }] }, context: 'test' }]); + ).toEqual([ + { + data: { nested: [{ y: 'aaa' }] }, + context: 'test', + }, + ]); expect(() => schema.process(mkConfig({ y: 'aaaa' }), { visibility: ['frontend'] }), ).toThrow( diff --git a/packages/config-loader/src/lib/schema/load.ts b/packages/config-loader/src/lib/schema/load.ts index 2d78785304..aa7ed06305 100644 --- a/packages/config-loader/src/lib/schema/load.ts +++ b/packages/config-loader/src/lib/schema/load.ts @@ -82,7 +82,7 @@ export async function loadConfigSchema( return { process( configs: AppConfig[], - { visibility, valueTransform, withFilteredKeys } = {}, + { visibility, valueTransform, withFilteredKeys, withDeprecatedKeys } = {}, ): AppConfig[] { const result = validate(configs); @@ -105,8 +105,10 @@ export async function loadConfigSchema( data, visibility, result.visibilityByDataPath, + result.deprecationByDataPath, valueTransform, withFilteredKeys, + withDeprecatedKeys, ), })); } else if (valueTransform) { @@ -116,8 +118,10 @@ export async function loadConfigSchema( data, Array.from(CONFIG_VISIBILITIES), result.visibilityByDataPath, + result.deprecationByDataPath, valueTransform, withFilteredKeys, + withDeprecatedKeys, ), })); } diff --git a/packages/config-loader/src/lib/schema/types.ts b/packages/config-loader/src/lib/schema/types.ts index 53f4dec88e..75993b3c78 100644 --- a/packages/config-loader/src/lib/schema/types.ts +++ b/packages/config-loader/src/lib/schema/types.ts @@ -81,6 +81,13 @@ type ValidationResult = { * The path in the key uses the form `/properties//items/additionalProperties/` */ visibilityBySchemaPath: Map; + + /** + * The deprecated options that were discovered during validation. + * + * The path in the key uses the form `////` + */ + deprecationByDataPath: Map; }; /** @@ -124,6 +131,13 @@ export type ConfigSchemaProcessingOptions = { * Default: `false`. */ withFilteredKeys?: boolean; + + /** + * Whether or not to include the `deprecatedKeys` property in the output `AppConfig`s. + * + * Default: `true`. + */ + withDeprecatedKeys?: boolean; }; /** diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index de62de5466..05377ffff3 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/config +## 0.1.12 + +### Patch Changes + +- f5343e7c1a: The `ConfigReader#get` method now always returns a deep clone of the configuration data. + ## 0.1.11 ### Patch Changes diff --git a/packages/config/api-report.md b/packages/config/api-report.md index efa6b85559..df9baeb4cd 100644 --- a/packages/config/api-report.md +++ b/packages/config/api-report.md @@ -13,6 +13,10 @@ export type AppConfig = { context: string; data: JsonObject_2; filteredKeys?: string[]; + deprecatedKeys?: { + key: string; + description: string; + }[]; }; // @public diff --git a/packages/config/package.json b/packages/config/package.json index 86e1f5d79c..29d09a5cf8 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config", "description": "Config API used by Backstage core, backend, and CLI", - "version": "0.1.11", + "version": "0.1.12", "private": false, "publishConfig": { "access": "public", @@ -34,7 +34,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/test-utils": "^0.2.0", + "@backstage/test-utils": "^0.2.2", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/config/src/reader.ts b/packages/config/src/reader.ts index 129a703784..1ce54590b5 100644 --- a/packages/config/src/reader.ts +++ b/packages/config/src/reader.ts @@ -83,9 +83,21 @@ export class ConfigReader implements Config { // Merge together all configs into a single config with recursive fallback // readers, giving the first config object in the array the lowest priority. return configs.reduce( - (previousReader, { data, context, filteredKeys }) => { + (previousReader, { data, context, filteredKeys, deprecatedKeys }) => { const reader = new ConfigReader(data, context, previousReader); reader.filteredKeys = filteredKeys; + + if (deprecatedKeys) { + for (const { key, description } of deprecatedKeys) { + // eslint-disable-next-line no-console + console.warn( + `The configuration key '${key}' of ${context} is deprecated and may be removed soon. ${ + description || '' + }`, + ); + } + } + return reader; }, undefined!, diff --git a/packages/config/src/types.ts b/packages/config/src/types.ts index a543233277..37c9595565 100644 --- a/packages/config/src/types.ts +++ b/packages/config/src/types.ts @@ -36,6 +36,12 @@ export type AppConfig = { * This can be used to warn the user if they try to read any of these keys. */ filteredKeys?: string[]; + /** + * A list of deprecated keys that were found in the configuration when it was loaded. + * + * This can be used to warn the user if they are using deprecated properties. + */ + deprecatedKeys?: { key: string; description: string }[]; }; /** diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index bdd3129235..b18ec0685f 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/core-app-api +## 0.4.0 + +### Minor Changes + +- e2eb92c109: Removed previously deprecated `ApiRegistry` export. + +### Patch Changes + +- 34442cd5cf: Fixed an issue where valid SAML and GitHub sessions would be considered invalid and not be stored. + + Deprecated the `SamlSession` and `GithubSession` types. + +- 784d8078ab: Removed direct and transitive MUI dependencies. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index de7477771f..dbce1e62cc 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "0.3.1", + "version": "0.4.0", "private": false, "publishConfig": { "access": "public", @@ -29,8 +29,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/config": "^0.1.12", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/types": "^0.1.1", "@backstage/version-bridge": "^0.1.1", "@types/prop-types": "^15.7.3", @@ -45,8 +45,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index 9f306bb10f..5f2e20f0a3 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/core-components +## 0.8.4 + +### Patch Changes + +- 6415189d99: Add a `ProxiedSignInPage` that can be used e.g. for GCP IAP and AWS ALB +- de2396da24: Create a short delay when `` is opened +- 5333451def: Cleaned up API exports +- e2eb92c109: Updated `ResponseErrorPanel` to not use the deprecated `data` property of `ResponseError`. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-plugin-api@0.5.0 + - @backstage/errors@0.2.0 + ## 0.8.3 ### Patch Changes diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 87a9186d5b..29847b079e 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -752,6 +752,16 @@ export function Progress( props: PropsWithChildren, ): JSX.Element; +// @public +export const ProxiedSignInPage: ( + props: ProxiedSignInPageProps, +) => JSX.Element | null; + +// @public +export type ProxiedSignInPageProps = SignInPageProps & { + provider: string; +}; + // Warning: (ae-missing-release-tag) "Ranker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 337a759da8..83415ace48 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.8.3", + "version": "0.8.4", "private": false, "publishConfig": { "access": "public", @@ -29,9 +29,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", + "@backstage/config": "^0.1.12", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", "@material-table/core": "^3.1.0", "@material-ui/core": "^4.12.2", @@ -58,13 +58,14 @@ "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "react-sparklines": "^1.7.0", - "react-syntax-highlighter": "^15.4.3", + "react-syntax-highlighter": "^15.4.5", "react-text-truncate": "^0.16.0", "react-use": "^17.2.4", "react-virtualized-auto-sizer": "^1.0.6", "react-window": "^1.8.6", "remark-gfm": "^2.0.0", - "zen-observable": "^0.8.15" + "zen-observable": "^0.8.15", + "zod": "^3.11.6" }, "peerDependencies": { "@types/react": "^16.13.1 || ^17.0.0", @@ -72,9 +73,9 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/core-app-api": "^0.3.1", - "@backstage/cli": "^0.10.5", - "@backstage/test-utils": "^0.2.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", @@ -92,7 +93,9 @@ "@types/react-syntax-highlighter": "^13.5.2", "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", - "@types/zen-observable": "^0.8.0" + "@types/zen-observable": "^0.8.0", + "cross-fetch": "^3.0.6", + "msw": "^0.35.0" }, "files": [ "dist" diff --git a/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.test.ts b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.test.ts new file mode 100644 index 0000000000..00e0c02373 --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.test.ts @@ -0,0 +1,166 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { setupRequestMockHandlers } from '@backstage/test-utils'; +import { rest } from 'msw'; +import { setupServer } from 'msw/node'; +import { + DEFAULTS, + ProxiedSignInIdentity, + tokenToExpiry, +} from './ProxiedSignInIdentity'; + +const validBackstageTokenExpClaim = 1641216199; +const validBackstageToken = + 'eyJhbGciOiJFUzI1NiIsImtpZCI6ImMxNTMzNDRiLWZjYzktNGIwOS1iN2ZhLTU3ZmM5MDhjMjBiNiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjcwMDcvYXBpL2F1dGgiLCJzdWIiOiJmcmViZW4iLCJhdWQiOiJiYWNrc3RhZ2UiLCJpYXQiOjE2NDEyMTI1OTksImV4cCI6MTY0MTIxNjE5OSwiZW50IjpbInVzZXI6ZGVmYXVsdC9mcmViZW4iXX0.4nOTmPHPwhzaKTzikgUsHcszfcP-JamcojMnRfyfsKhyHCCEywe6uLFlvvmK5NbaX5Z7IIji-kg7bxKU58kwoQ'; + +describe('ProxiedSignInIdentity', () => { + describe('tokenToExpiry', () => { + beforeEach(() => jest.useFakeTimers('modern')); + afterEach(() => jest.useRealTimers()); + + it('handles undefined', async () => { + expect(tokenToExpiry(undefined)).toEqual( + new Date(Date.now() + DEFAULTS.defaultTokenExpiryMillis), + ); + }); + + it('handles a valid token', async () => { + expect(tokenToExpiry(validBackstageToken)).toEqual( + new Date( + validBackstageTokenExpClaim * 1000 - DEFAULTS.tokenExpiryMarginMillis, + ), + ); + }); + + it('handles a token that has no exp', async () => { + const [a, _b, c] = validBackstageToken.split('.'); + const botched = `${a}.${btoa(JSON.stringify({}))}.${c}`; + expect(tokenToExpiry(botched)).toEqual( + new Date(new Date(Date.now() + DEFAULTS.defaultTokenExpiryMillis)), + ); + }); + }); + + describe('ProxiedSignInIdentity', () => { + beforeEach(() => jest.useFakeTimers('modern')); + afterEach(() => jest.useRealTimers()); + + const worker = setupServer(); + setupRequestMockHandlers(worker); + + it('runs the happy path', async () => { + const getBaseUrl = jest.fn(); + const serverCalled = jest.fn(); + + function makeToken() { + const iat = Math.floor(Date.now() / 1000); + const exp = iat + 3600; + return { + providerInfo: { + stuff: 1, + }, + profile: { + email: 'e', + displayName: 'd', + picture: 'p', + }, + backstageIdentity: { + token: [ + 'eyJhbGciOiJFUzI1NiIsImtpZCI6ImMxNTMzNDRiLWZjYzktNGIwOS1iN2ZhLTU3ZmM5MDhjMjBiNiJ9', + btoa( + JSON.stringify({ + iss: 'http://localhost:7007/api/auth', + sub: 'user:default/freben', + aud: 'backstage', + iat, + exp, + ent: ['group:default/my-team'], + }), + ).replace(/=/g, ''), + '4nOTmPHPwhzaKTzikgUsHcszfcP-JamcojMnRfyfsKhyHCCEywe6uLFlvvmK5NbaX5Z7IIji-kg7bxKU58kwoQ', + ].join('.'), + identity: { + type: 'user', + userEntityRef: 'k:ns/ue', + ownershipEntityRefs: ['k:ns/oe'], + }, + }, + }; + } + + worker.events.on('request:match', serverCalled); + worker.use( + rest.get('http://example.com/api/auth/foo/refresh', (_, res, ctx) => + res( + ctx.status(200), + ctx.set('Content-Type', 'application/json'), + ctx.json(makeToken()), + ), + ), + ); + + const identity = new ProxiedSignInIdentity({ + provider: 'foo', + discoveryApi: { getBaseUrl }, + }); + + getBaseUrl.mockResolvedValue('http://example.com/api/auth'); + + await identity.start(); // should not throw + expect(getBaseUrl).toBeCalledTimes(1); + expect(getBaseUrl).lastCalledWith('auth'); + expect(serverCalled).toBeCalledTimes(1); + + // All information should now be available + await expect(identity.getBackstageIdentity()).resolves.toEqual({ + type: 'user', + userEntityRef: 'k:ns/ue', + ownershipEntityRefs: ['k:ns/oe'], + }); + await expect(identity.getIdToken()).resolves.toEqual(expect.any(String)); + await expect(identity.getCredentials()).resolves.toEqual({ + token: expect.any(String), + }); + await expect(identity.getProfileInfo()).resolves.toEqual({ + email: 'e', + displayName: 'd', + picture: 'p', + }); + expect(identity.getUserId()).toBe('ue'); + expect(identity.getProfile()).toEqual({ + email: 'e', + displayName: 'd', + picture: 'p', + }); + + await identity.getSessionAsync(); // no need to fetch again just yet + expect(serverCalled).toBeCalledTimes(1); + + // Use a fairly large margin (1000) since the iat and exp are clamped to + // full seconds, but the "local current time" isn't + jest.advanceTimersByTime( + 3600 * 1000 - DEFAULTS.tokenExpiryMarginMillis - 1000, + ); + await identity.getSessionAsync(); // still no need to fetch again + expect(serverCalled).toBeCalledTimes(1); + + jest.advanceTimersByTime(1001); + await identity.getSessionAsync(); // now the expiry has passed + expect(serverCalled).toBeCalledTimes(2); + }); + }); +}); diff --git a/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.ts b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.ts new file mode 100644 index 0000000000..2247d17d82 --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInIdentity.ts @@ -0,0 +1,214 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + BackstageUserIdentity, + discoveryApiRef, + IdentityApi, + ProfileInfo, +} from '@backstage/core-plugin-api'; +import { ResponseError } from '@backstage/errors'; +import { ProxiedSession, proxiedSessionSchema } from './types'; + +export const DEFAULTS = { + // The amount of time between token refreshes, if we fail to get an actual + // value out of the exp claim + defaultTokenExpiryMillis: 5 * 60 * 1000, + // The amount of time before the actual expiry of the Backstage token, that we + // shall start trying to get a new one + tokenExpiryMarginMillis: 5 * 60 * 1000, +} as const; + +// When the token expires, with some margin +export function tokenToExpiry(jwtToken: string | undefined): Date { + const fallback = new Date(Date.now() + DEFAULTS.defaultTokenExpiryMillis); + if (!jwtToken) { + return fallback; + } + + const [_header, rawPayload, _signature] = jwtToken.split('.'); + const payload = JSON.parse(atob(rawPayload)); + if (typeof payload.exp !== 'number') { + return fallback; + } + + return new Date(payload.exp * 1000 - DEFAULTS.tokenExpiryMarginMillis); +} + +type ProxiedSignInIdentityOptions = { + provider: string; + discoveryApi: typeof discoveryApiRef.T; +}; + +type State = + | { + type: 'empty'; + } + | { + type: 'fetching'; + promise: Promise; + previous: ProxiedSession | undefined; + } + | { + type: 'active'; + session: ProxiedSession; + expiresAt: Date; + } + | { + type: 'failed'; + error: Error; + }; + +/** + * An identity API that gets the user auth information solely based on a + * provider's `/refresh` endpoint. + */ +export class ProxiedSignInIdentity implements IdentityApi { + private readonly options: ProxiedSignInIdentityOptions; + private readonly abortController: AbortController; + private state: State; + + constructor(options: ProxiedSignInIdentityOptions) { + this.options = options; + this.abortController = new AbortController(); + this.state = { type: 'empty' }; + } + + async start() { + // Try to make a first fetch, bubble up any errors to the caller + await this.getSessionAsync(); + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getUserId} */ + getUserId(): string { + const { backstageIdentity } = this.getSessionSync(); + const ref = backstageIdentity.identity.userEntityRef; + const match = /^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(ref); + if (!match) { + throw new TypeError(`Invalid user entity reference "${ref}"`); + } + + return match[3]; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getIdToken} */ + async getIdToken(): Promise { + const session = await this.getSessionAsync(); + return session.backstageIdentity.token; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getProfile} */ + getProfile(): ProfileInfo { + const session = this.getSessionSync(); + return session.profile; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getProfileInfo} */ + async getProfileInfo(): Promise { + const session = await this.getSessionAsync(); + return session.profile; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getBackstageIdentity} */ + async getBackstageIdentity(): Promise { + const session = await this.getSessionAsync(); + return session.backstageIdentity.identity; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.getCredentials} */ + async getCredentials(): Promise<{ token?: string | undefined }> { + const session = await this.getSessionAsync(); + return { + token: session.backstageIdentity.token, + }; + } + + /** {@inheritdoc @backstage/core-plugin-api#IdentityApi.signOut} */ + async signOut(): Promise { + this.abortController.abort(); + } + + getSessionSync(): ProxiedSession { + if (this.state.type === 'active') { + return this.state.session; + } else if (this.state.type === 'fetching' && this.state.previous) { + return this.state.previous; + } + throw new Error('No session available. Try reloading your browser page.'); + } + + async getSessionAsync(): Promise { + if (this.state.type === 'fetching') { + return this.state.promise; + } else if ( + this.state.type === 'active' && + new Date() < this.state.expiresAt + ) { + return this.state.session; + } + + const previous = + this.state.type === 'active' ? this.state.session : undefined; + + const promise = this.fetchSession().then( + session => { + this.state = { + type: 'active', + session, + expiresAt: tokenToExpiry(session.backstageIdentity.token), + }; + return session; + }, + error => { + this.state = { + type: 'failed', + error, + }; + throw error; + }, + ); + + this.state = { + type: 'fetching', + promise, + previous, + }; + + return promise; + } + + async fetchSession(): Promise { + const baseUrl = await this.options.discoveryApi.getBaseUrl('auth'); + + // Note that we do not use the fetchApi here, since this all happens before + // sign-in completes so there can be no automatic token injection and + // similar. + const response = await fetch( + `${baseUrl}/${this.options.provider}/refresh`, + { + signal: this.abortController.signal, + headers: { 'x-requested-with': 'XMLHttpRequest' }, + credentials: 'include', + }, + ); + + if (!response.ok) { + throw await ResponseError.fromResponse(response); + } + + return proxiedSessionSchema.parse(await response.json()); + } +} diff --git a/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInPage.tsx b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInPage.tsx new file mode 100644 index 0000000000..adcd6ced8f --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/ProxiedSignInPage.tsx @@ -0,0 +1,82 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + discoveryApiRef, + SignInPageProps, + useApi, +} from '@backstage/core-plugin-api'; +import React from 'react'; +import useAsync from 'react-use/lib/useAsync'; +import { ErrorPanel } from '../../components/ErrorPanel'; +import { Progress } from '../../components/Progress'; +import { ProxiedSignInIdentity } from './ProxiedSignInIdentity'; + +/** + * Props for {@link ProxiedSignInPage}. + * + * @public + */ +export type ProxiedSignInPageProps = SignInPageProps & { + /** + * The provider to use, e.g. "gcp-iap" or "aws-alb". This must correspond to + * a properly configured auth provider ID in the auth backend. + */ + provider: string; +}; + +/** + * A sign-in page that has no user interface of its own. Instead, it relies on + * sign-in being performed by a reverse authenticating proxy that Backstage is + * deployed behind, and leverages its session handling. + * + * @remarks + * + * This sign-in page is useful when you are using products such as Google + * Identity-Aware Proxy or AWS Application Load Balancer or similar, to front + * your Backstage installation. This sign-in page implementation will silently + * and regularly punch through the proxy to the auth backend to refresh your + * frontend session information, without requiring user interaction. + * + * @public + */ +export const ProxiedSignInPage = (props: ProxiedSignInPageProps) => { + const discoveryApi = useApi(discoveryApiRef); + + const { loading, error } = useAsync(async () => { + const identity = new ProxiedSignInIdentity({ + provider: props.provider, + discoveryApi, + }); + + await identity.start(); + + props.onSignInSuccess(identity); + }, []); + + if (loading) { + return ; + } else if (error) { + return ( + + ); + } + + return null; +}; diff --git a/packages/core-components/src/layout/ProxiedSignInPage/index.ts b/packages/core-components/src/layout/ProxiedSignInPage/index.ts new file mode 100644 index 0000000000..f7bab5f46c --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { ProxiedSignInPage } from './ProxiedSignInPage'; +export type { ProxiedSignInPageProps } from './ProxiedSignInPage'; diff --git a/packages/core-components/src/layout/ProxiedSignInPage/types.test.ts b/packages/core-components/src/layout/ProxiedSignInPage/types.test.ts new file mode 100644 index 0000000000..178714ecf9 --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/types.test.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TypeOf } from 'zod'; +import { ProxiedSession, proxiedSessionSchema } from './types'; + +describe('types', () => { + const responseData: ProxiedSession = { + providerInfo: { + stuff: 1, + }, + profile: { + email: 'e', + displayName: 'd', + picture: 'p', + }, + backstageIdentity: { + token: 't', + identity: { + type: 'user', + userEntityRef: 'k:ns/ue', + ownershipEntityRefs: ['k:ns/oe'], + }, + }, + }; + + it('has a compatible schema type', () => { + function f(_b: TypeOf) {} + f(responseData); // no tsc errors + expect(proxiedSessionSchema.parse(responseData)).toEqual(responseData); + }); +}); diff --git a/packages/core-components/src/layout/ProxiedSignInPage/types.ts b/packages/core-components/src/layout/ProxiedSignInPage/types.ts new file mode 100644 index 0000000000..dd4230cd8b --- /dev/null +++ b/packages/core-components/src/layout/ProxiedSignInPage/types.ts @@ -0,0 +1,50 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + BackstageIdentityResponse, + ProfileInfo, +} from '@backstage/core-plugin-api'; +import { z } from 'zod'; + +export const proxiedSessionSchema = z.object({ + providerInfo: z.object({}).catchall(z.unknown()).optional(), + profile: z.object({ + email: z.string().optional(), + displayName: z.string().optional(), + picture: z.string().optional(), + }), + backstageIdentity: z.object({ + token: z.string(), + identity: z.object({ + type: z.literal('user'), + userEntityRef: z.string(), + ownershipEntityRefs: z.array(z.string()), + }), + }), +}); + +/** + * Generic session information for proxied sign-in providers, e.g. common + * reverse authenticating proxy implementations. + * + * @public + */ +export type ProxiedSession = { + providerInfo?: { [key: string]: unknown }; + profile: ProfileInfo; + backstageIdentity: Omit; +}; diff --git a/packages/core-components/src/layout/index.ts b/packages/core-components/src/layout/index.ts index 19cd6dfb78..9bb7fbaa26 100644 --- a/packages/core-components/src/layout/index.ts +++ b/packages/core-components/src/layout/index.ts @@ -26,6 +26,7 @@ export * from './HomepageTimer'; export * from './InfoCard'; export * from './ItemCard'; export * from './Page'; +export * from './ProxiedSignInPage'; export * from './Sidebar'; export * from './SignInPage'; export * from './TabbedCard'; diff --git a/packages/core-components/src/setupTests.ts b/packages/core-components/src/setupTests.ts index 963c0f188b..c1d649f2ad 100644 --- a/packages/core-components/src/setupTests.ts +++ b/packages/core-components/src/setupTests.ts @@ -15,3 +15,4 @@ */ import '@testing-library/jest-dom'; +import 'cross-fetch/polyfill'; diff --git a/packages/core-plugin-api/CHANGELOG.md b/packages/core-plugin-api/CHANGELOG.md index 535be6aef6..7f081e8b45 100644 --- a/packages/core-plugin-api/CHANGELOG.md +++ b/packages/core-plugin-api/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/core-plugin-api +## 0.5.0 + +### Minor Changes + +- 784d8078ab: Removed the deprecated `OldIconComponent` type. +- e2eb92c109: Removed previously deprecated exports: `PluginHooks`, `PluginOutput`, and `FeatureFlagOutput`. + + The deprecated `register` method of `PluginConfig` has been removed, as well as the deprecated `output` method of `BackstagePlugin`. + +### Patch Changes + +- 784d8078ab: Removed direct and transitive MUI dependencies. +- Updated dependencies + - @backstage/config@0.1.12 + ## 0.4.1 ### Patch Changes diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index d284d60c6b..55ac56083b 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-plugin-api", "description": "Core API used by Backstage plugins", - "version": "0.4.1", + "version": "0.5.0", "private": false, "publishConfig": { "access": "public", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", + "@backstage/config": "^0.1.12", "@backstage/types": "^0.1.1", "@backstage/version-bridge": "^0.1.1", "history": "^5.0.0", @@ -43,9 +43,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index f72e76b9c0..8d19c65e54 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,67 @@ # @backstage/create-app +## 0.4.12 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- cd529c4094: Add permissions to create-app's PluginEnvironment + + `CatalogEnvironment` now has a `permissions` field, which means that a permission client must now be provided as part of `PluginEnvironment`. To apply these changes to an existing app, add the following to the `makeCreateEnv` function in `packages/backend/src/index.ts`: + + ```diff + // packages/backend/src/index.ts + + + import { ServerPermissionClient } from '@backstage/plugin-permission-node'; + + function makeCreateEnv(config: Config) { + ... + + const permissions = ServerPerimssionClient.fromConfig(config, { + + discovery, + + tokenManager, + + }); + + root.info(`Created UrlReader ${reader}`); + + return (plugin: string): PluginEnvironment => { + ... + return { + logger, + cache, + database, + config, + reader, + discovery, + tokenManager, + scheduler, + + permissions, + }; + } + } + ``` + + And add a permissions field to the `PluginEnvironment` type in `packages/backend/src/types.ts`: + + ```diff + // packages/backend/src/types.ts + + + import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; + + export type PluginEnvironment = { + ... + + permissions: PermissionAuthorizer; + }; + ``` + + [`@backstage/plugin-permission-common`](https://www.npmjs.com/package/@backstage/plugin-permission-common) and [`@backstage/plugin-permission-node`](https://www.npmjs.com/package/@backstage/plugin-permission-node) will need to be installed as dependencies: + + ```diff + // packages/backend/package.json + + + "@backstage/plugin-permission-common": "...", + + "@backstage/plugin-permission-node": "...", + ``` + ## 0.4.11 ## 0.4.10 diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 639e0370d7..041616f90a 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.11", + "version": "0.4.12", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index c08bbc61fd..7e17d1a2cf 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/dev-utils +## 0.2.17 + +### Patch Changes + +- Updated dependencies + - @backstage/test-utils@0.2.2 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/core-app-api@0.4.0 + - @backstage/app-defaults@0.1.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + ## 0.2.16 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 75b34baf32..afd405cbbd 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.2.16", + "version": "0.2.17", "private": false, "publishConfig": { "access": "public", @@ -29,14 +29,14 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/app-defaults": "^0.1.3", - "@backstage/core-app-api": "^0.3.1", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/catalog-model": "^0.9.7", - "@backstage/integration-react": "^0.1.16", - "@backstage/plugin-catalog-react": "^0.6.10", - "@backstage/test-utils": "^0.2.0", + "@backstage/app-defaults": "^0.1.4", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/catalog-model": "^0.9.9", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog-react": "^0.6.11", + "@backstage/test-utils": "^0.2.2", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,7 +55,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 6c941cda58..56f0865db2 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@backstage/cli-common": "^0.1.1", - "@backstage/errors": "^0.1.4", + "@backstage/errors": "^0.2.0", "@types/fs-extra": "^9.0.1", "@types/node": "^14.14.32", "@types/puppeteer": "^5.4.4", diff --git a/packages/embedded-techdocs-app/CHANGELOG.md b/packages/embedded-techdocs-app/CHANGELOG.md index aa0e9ce955..29774b165f 100644 --- a/packages/embedded-techdocs-app/CHANGELOG.md +++ b/packages/embedded-techdocs-app/CHANGELOG.md @@ -1,5 +1,22 @@ # embedded-techdocs-app +## 0.2.59 + +### Patch Changes + +- Updated dependencies + - @backstage/test-utils@0.2.2 + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/cli@0.11.0 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-techdocs@0.12.14 + - @backstage/core-app-api@0.4.0 + - @backstage/app-defaults@0.1.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + - @backstage/plugin-catalog@0.7.8 + ## 0.2.58 ### Patch Changes diff --git a/packages/embedded-techdocs-app/package.json b/packages/embedded-techdocs-app/package.json index a1ffd9f858..a830336879 100644 --- a/packages/embedded-techdocs-app/package.json +++ b/packages/embedded-techdocs-app/package.json @@ -1,20 +1,20 @@ { "name": "embedded-techdocs-app", - "version": "0.2.58", + "version": "0.2.59", "private": true, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^0.1.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/cli": "^0.10.3", - "@backstage/config": "^0.1.10", - "@backstage/core-app-api": "^0.3.0", - "@backstage/core-components": "^0.8.2", - "@backstage/core-plugin-api": "^0.4.0", - "@backstage/integration-react": "^0.1.16", - "@backstage/plugin-catalog": "^0.7.5", - "@backstage/plugin-techdocs": "^0.12.11", - "@backstage/test-utils": "^0.2.0", + "@backstage/app-defaults": "^0.1.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/cli": "^0.11.0", + "@backstage/config": "^0.1.12", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/plugin-techdocs": "^0.12.14", + "@backstage/test-utils": "^0.2.2", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -26,7 +26,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index 02b28cdf1d..110863d347 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/errors +## 0.2.0 + +### Minor Changes + +- e2eb92c109: Removed the deprecated exports `ErrorResponse` and `parseErrorResponse`. + + Removed the deprecated `constructor` and the deprecated `data` property of `ResponseError`. + ## 0.1.5 ### Patch Changes diff --git a/packages/errors/package.json b/packages/errors/package.json index d0d59ffd6a..d9ab7e1e6c 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/errors", "description": "Common utilities for error handling within Backstage", - "version": "0.1.5", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "serialize-error": "^8.0.1" }, "devDependencies": { - "@backstage/cli": "^0.10.0", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7" }, "files": [ diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 121b778143..fb5445c2d9 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/integration-react +## 0.1.18 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.1.17 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 62f9e8d593..b1bc8e4eb3 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "0.1.17", + "version": "0.1.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.2", - "@backstage/core-plugin-api": "^0.4.0", - "@backstage/integration": "^0.7.0", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/integration": "^0.7.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -35,9 +35,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", - "@backstage/dev-utils": "^0.2.15", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 359d2dd11e..e2d535ada1 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/integration +## 0.7.1 + +### Patch Changes + +- 3b4d8caff6: Adds a new GitHub credentials provider (DefaultGithubCredentialsProvider). It handles multiple app configurations. It looks up the app configuration based on the url. +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + ## 0.7.0 ### Minor Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index ae674d2cf1..336ed1535f 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration", "description": "Helpers for managing integrations towards external systems", - "version": "0.7.0", + "version": "0.7.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", + "@backstage/config": "^0.1.12", "cross-fetch": "^3.0.6", "git-url-parse": "^11.6.0", "@octokit/rest": "^18.5.3", @@ -39,9 +39,9 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/cli": "^0.10.4", - "@backstage/config-loader": "^0.9.1", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/config-loader": "^0.9.2", + "@backstage/test-utils": "^0.2.2", "@types/jest": "^26.0.7", "@types/luxon": "^2.0.4", "msw": "^0.35.0" diff --git a/packages/search-common/package.json b/packages/search-common/package.json index 51cea5a28e..87660e7ee3 100644 --- a/packages/search-common/package.json +++ b/packages/search-common/package.json @@ -39,7 +39,7 @@ "@backstage/types": "^0.1.1" }, "devDependencies": { - "@backstage/cli": "^0.10.0" + "@backstage/cli": "^0.11.0" }, "jest": { "roots": [ diff --git a/packages/storybook/CHANGELOG.md b/packages/storybook/CHANGELOG.md index f5e44f780c..c1e756bb12 100644 --- a/packages/storybook/CHANGELOG.md +++ b/packages/storybook/CHANGELOG.md @@ -1,5 +1,14 @@ # storybook +## 0.2.1 + +### Patch Changes + +- Updated dependencies + - @backstage/test-utils@0.2.2 + - @backstage/core-plugin-api@0.5.0 + - @backstage/core-app-api@0.4.0 + ## 0.2.0 ### Patch Changes diff --git a/packages/storybook/package.json b/packages/storybook/package.json index a0e9b25d76..5c4b440264 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "0.2.0", + "version": "0.2.1", "description": "Storybook build for components package", "private": true, "scripts": { @@ -9,9 +9,9 @@ }, "dependencies": { "@backstage/theme": "^0.2.0", - "@backstage/test-utils": "^0.2.1", - "@backstage/core-app-api": "^0.3.1", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/test-utils": "^0.2.2", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-plugin-api": "^0.5.0", "react": "^16.13.1", "react-dom": "^16.13.1" }, diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index b4c4ade6a3..c971a4d1df 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -32,7 +32,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", @@ -41,7 +41,7 @@ "@types/react-dev-utils": "^9.0.4", "@types/serve-handler": "^6.1.0", "@types/webpack-env": "^1.15.3", - "embedded-techdocs-app": "0.2.58", + "embedded-techdocs-app": "0.2.59", "find-process": "^1.4.5", "nodemon": "^2.0.2", "ts-node": "^10.0.0" @@ -56,10 +56,10 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/techdocs-common": "^0.11.2", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/techdocs-common": "^0.11.3", "@types/dockerode": "^3.3.0", "commander": "^6.1.0", "dockerode": "^3.3.1", diff --git a/packages/techdocs-common/CHANGELOG.md b/packages/techdocs-common/CHANGELOG.md index 96281958b6..5a9c2f79e8 100644 --- a/packages/techdocs-common/CHANGELOG.md +++ b/packages/techdocs-common/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/techdocs-common +## 0.11.3 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.11.2 ### Patch Changes diff --git a/packages/techdocs-common/package.json b/packages/techdocs-common/package.json index f3e0f2d0d4..0b9ae3a831 100644 --- a/packages/techdocs-common/package.json +++ b/packages/techdocs-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/techdocs-common", "description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "0.11.2", + "version": "0.11.3", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -38,12 +38,12 @@ "dependencies": { "@azure/identity": "^2.0.1", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/search-common": "^0.2.1", - "@backstage/integration": "^0.7.0", + "@backstage/integration": "^0.7.1", "@google-cloud/storage": "^5.6.0", "@trendyol-js/openstack-swift-sdk": "^0.0.5", "@types/express": "^4.17.6", @@ -60,7 +60,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index fa747f84d1..bdd7562652 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/test-utils +## 0.2.2 + +### Patch Changes + +- 2d3fd91e33: Add new `MockConfigApi` as a more discoverable and leaner method for mocking configuration. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-plugin-api@0.5.0 + - @backstage/core-app-api@0.4.0 + ## 0.2.1 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 48745f7068..d1382ada4a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "0.2.1", + "version": "0.2.2", "private": false, "publishConfig": { "access": "public", @@ -29,9 +29,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-app-api": "^0.3.0", - "@backstage/core-plugin-api": "^0.4.0", + "@backstage/config": "^0.1.12", + "@backstage/core-app-api": "^0.4.0", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@material-ui/core": "^4.12.2", @@ -48,7 +48,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/theme/package.json b/packages/theme/package.json index 08477dccd0..33ec467940 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -31,7 +31,7 @@ "@material-ui/core": "^4.12.2" }, "devDependencies": { - "@backstage/cli": "^0.10.0" + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/packages/types/package.json b/packages/types/package.json index 822b2d678e..fc17471869 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -31,7 +31,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.10.0", + "@backstage/cli": "^0.11.0", "@types/zen-observable": "^0.8.0", "zen-observable": "^0.8.15" }, diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index 0291cdc208..8164aacfae 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -33,7 +33,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.1", + "@backstage/cli": "^0.11.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2" diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md new file mode 100644 index 0000000000..42c2b4603d --- /dev/null +++ b/plugins/airbrake/CHANGELOG.md @@ -0,0 +1,13 @@ +# @backstage/plugin-airbrake + +## 0.1.0 + +### Minor Changes + +- 04c86e5a10: A plugin for Airbrake (https://airbrake.io/) has been created + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 7294c97413..d343876fb5 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.0.0", + "version": "0.1.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -34,11 +34,11 @@ }, "devDependencies": { "@types/object-hash": "^2.2.1", - "@backstage/app-defaults": "^0.1.2", - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/app-defaults": "^0.1.4", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index 4f3771d348..1802258402 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-allure +## 0.1.11 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.1.10 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 54ac6ea659..79b381c319 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.10", + "version": "0.1.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,10 +22,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 3721035996..75dd925060 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-analytics-module-ga +## 0.1.6 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index a17f915b16..ad4b322a7c 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.5", + "version": "0.1.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.5", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -35,10 +35,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index bb8a010fda..2a2ff1a873 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-apache-airflow +## 0.1.3 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index d203c8de9e..c4cc9c3e23 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.1.2", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -33,10 +33,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 31611f5b2c..b7f4fbc29e 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-api-docs +## 0.6.22 + +### Patch Changes + +- faf844e269: Update @asyncapi/react-component to 1.0.0-next.26, which will fix the + `ResizeObserver loop limit exceeded` errors which we encountered in several E2E + tests. + + For more details check the following links: + + - https://github.com/backstage/backstage/pull/8088#issuecomment-991183968 + - https://github.com/asyncapi/asyncapi-react/issues/498 + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-catalog@0.7.8 + ## 0.6.21 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 8d190dae92..10f1a74a8a 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.6.21", + "version": "0.6.22", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ }, "dependencies": { "@asyncapi/react-component": "1.0.0-next.26", - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog": "^0.7.7", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,24 +46,23 @@ "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "react-use": "^17.2.4", - "swagger-client": "3.16.1", - "swagger-ui-react": "^4.0.0-rc.3" + "swagger-ui-react": "^4.1.3" }, "peerDependencies": { "@types/react": "^16.13.1 || ^17.0.0", "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", - "@types/swagger-ui-react": "^3.23.3", + "@types/swagger-ui-react": "^4.1.1", "cross-fetch": "^3.0.6", "msw": "^0.35.0" }, diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index b1a01a8345..d5cbe9c07d 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -30,9 +30,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/config-loader": "^0.9.1", - "@backstage/config": "^0.1.11", + "@backstage/backend-common": "^0.10.3", + "@backstage/config-loader": "^0.9.2", + "@backstage/config": "^0.1.12", "@backstage/types": "^0.1.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -43,7 +43,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@backstage/types": "^0.1.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/app-backend/src/lib/config.ts b/plugins/app-backend/src/lib/config.ts index c37dc34dcc..6959253336 100644 --- a/plugins/app-backend/src/lib/config.ts +++ b/plugins/app-backend/src/lib/config.ts @@ -91,7 +91,7 @@ export async function readConfigs(options: ReadOptions): Promise { const frontendConfigs = await schema.process( [{ data: config.get() as JsonObject, context: 'app' }], - { visibility: ['frontend'] }, + { visibility: ['frontend'], withDeprecatedKeys: true }, ); appConfigs.push(...frontendConfigs); } catch (error) { diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 14e56b060e..533bf10166 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-auth-backend +## 0.6.2 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- da9c59d6e0: Removed `@backstage/test-utils` dependency. +- 20ca7cfa5f: Switched the secure cookie mode set on the `express-session` to use `'auto'` rather than `true`. This works around an issue where cookies would not be set if TLS termination was handled in a proxy rather than having the backend served directly with HTTPS. + + The downside of this change is that secure cookies won't be used unless the backend is directly served with HTTPS. This will be remedied in a future update that allows the backend to configured for trusted proxy mode. + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.6.1 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 3afd6cefe3..69dd53987f 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.6.1", + "version": "0.6.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,11 +30,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.2", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/types": "^0.1.1", "@google-cloud/firestore": "^4.15.1", "@types/express": "^4.17.6", @@ -73,8 +73,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 080a4e0367..e61ccf4b72 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-azure-devops-backend +## 0.3.0 + +### Minor Changes + +- a2ed2c2d69: - feat: Created PullRequestsDashboardProvider for resolving team and team member relations + - feat: Created useUserTeamIds hook. + - feat: Updated useFilterProcessor to provide teamIds for `AssignedToCurrentUsersTeams` and `CreatedByCurrentUsersTeams` filters. + +### Patch Changes + +- 9f9596f9ef: Only warn if teams fail to load at startup. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-azure-devops-common@0.2.0 + ## 0.2.6 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 23ca6b694d..61f89ccf56 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.2.6", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/config": "^0.1.11", - "@backstage/plugin-azure-devops-common": "^0.1.3", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/plugin-azure-devops-common": "^0.2.0", "@types/express": "^4.17.6", "azure-devops-node-api": "^11.0.1", "express": "^4.17.1", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.35.0" diff --git a/plugins/azure-devops-backend/src/api/PullRequestsDashboardProvider.ts b/plugins/azure-devops-backend/src/api/PullRequestsDashboardProvider.ts index a4879de7be..0f6dbe5b04 100644 --- a/plugins/azure-devops-backend/src/api/PullRequestsDashboardProvider.ts +++ b/plugins/azure-devops-backend/src/api/PullRequestsDashboardProvider.ts @@ -40,7 +40,11 @@ export class PullRequestsDashboardProvider { azureDevOpsApi: AzureDevOpsApi, ): Promise { const provider = new PullRequestsDashboardProvider(logger, azureDevOpsApi); - await provider.readTeams(); + try { + await provider.readTeams(); + } catch (error) { + logger.warn(`Failed to load azure team information, ${error}`); + } return provider; } @@ -124,10 +128,12 @@ export class PullRequestsDashboardProvider { }); } - public getUserTeamIds(email: string): string[] { + public async getUserTeamIds(email: string): Promise { + await this.getAllTeams(); // Make sure team members are loaded return ( - this.getTeamMembers().find(teamMember => teamMember.uniqueName === email) - ?.memberOf ?? [] + Array.from(this.teamMembers.values()).find( + teamMember => teamMember.uniqueName === email, + )?.memberOf ?? [] ); } @@ -138,8 +144,4 @@ export class PullRequestsDashboardProvider { return Array.from(this.teams.values()); } - - public getTeamMembers(): TeamMember[] { - return Array.from(this.teamMembers.values()); - } } diff --git a/plugins/azure-devops-backend/src/service/router.test.ts b/plugins/azure-devops-backend/src/service/router.test.ts index 335e581d73..e6cd856c0a 100644 --- a/plugins/azure-devops-backend/src/service/router.test.ts +++ b/plugins/azure-devops-backend/src/service/router.test.ts @@ -49,7 +49,7 @@ describe('createRouter', () => { getPullRequests: jest.fn(), getBuilds: jest.fn(), getBuildRuns: jest.fn(), - getAllTeams: jest.fn().mockReturnValue([]), + getAllTeams: jest.fn(), getTeamMembers: jest.fn(), } as any; const router = await createRouter({ @@ -411,6 +411,7 @@ describe('createRouter', () => { describe('GET /users/:userId/team-ids', () => { it('fetches a a list of teams', async () => { + azureDevOpsApi.getAllTeams.mockResolvedValue([]); const response = await request(app).get('/users/user1/team-ids'); expect(response.status).toEqual(200); }); diff --git a/plugins/azure-devops-backend/src/service/router.ts b/plugins/azure-devops-backend/src/service/router.ts index 6482ed2f59..f41209e4ff 100644 --- a/plugins/azure-devops-backend/src/service/router.ts +++ b/plugins/azure-devops-backend/src/service/router.ts @@ -176,7 +176,7 @@ export async function createRouter( router.get('/users/:userId/team-ids', async (req, res) => { const { userId } = req.params; - const teamIds = pullRequestsDashboardProvider.getUserTeamIds(userId); + const teamIds = await pullRequestsDashboardProvider.getUserTeamIds(userId); res.status(200).json(teamIds); }); diff --git a/plugins/azure-devops-common/CHANGELOG.md b/plugins/azure-devops-common/CHANGELOG.md index 84c2cae9a5..74129ea19e 100644 --- a/plugins/azure-devops-common/CHANGELOG.md +++ b/plugins/azure-devops-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-azure-devops-common +## 0.2.0 + +### Minor Changes + +- a2ed2c2d69: - feat: Created PullRequestsDashboardProvider for resolving team and team member relations + - feat: Created useUserTeamIds hook. + - feat: Updated useFilterProcessor to provide teamIds for `AssignedToCurrentUsersTeams` and `CreatedByCurrentUsersTeams` filters. + ## 0.1.3 ### Patch Changes diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index f8a9622bff..d8dfce0ab6 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.1.3", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "devDependencies": { - "@backstage/cli": "^0.10.2" + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 838130d4ae..b56f391976 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-azure-devops +## 0.1.10 + +### Patch Changes + +- a2ed2c2d69: - feat: Created PullRequestsDashboardProvider for resolving team and team member relations + - feat: Created useUserTeamIds hook. + - feat: Updated useFilterProcessor to provide teamIds for `AssignedToCurrentUsersTeams` and `CreatedByCurrentUsersTeams` filters. +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-azure-devops-common@0.2.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.9 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index f8cbcc430a..8e40ed60fe 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.9", + "version": "0.1.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,12 +27,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/plugin-azure-devops-common": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-azure-devops-common": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 5b37003d36..d3ebf60a3d 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges-backend +## 0.1.15 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.1.14 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index fbd7b2c266..dd2a8af930 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.14", + "version": "0.1.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/errors": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@types/express": "^4.17.6", "badge-maker": "^3.3.0", "cors": "^2.8.5", @@ -45,7 +45,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 67d54623bf..9c51905691 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges +## 0.2.19 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.2.18 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index f9e24f27bf..26580d63c7 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.18", + "version": "0.2.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,11 +27,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index 1a08a36b9d..eceb35eb1b 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bazaar-backend +## 0.1.6 + +### Patch Changes + +- 6eb6e2dc31: Add Bazaar plugin to marketplace and some minor refactoring +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/backend-test-utils@0.1.13 + ## 0.1.5 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index a7c59735ff..9c6cf17407 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.5", + "version": "0.1.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/backend-test-utils": "^0.1.11", - "@backstage/config": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/backend-test-utils": "^0.1.13", + "@backstage/config": "^0.1.12", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -31,7 +31,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3" + "@backstage/cli": "^0.11.0" }, "files": [ "dist", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index 09b1f64edf..01d6f5955d 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-bazaar +## 0.1.9 + +### Patch Changes + +- 6eb6e2dc31: Add Bazaar plugin to marketplace and some minor refactoring +- b47965beec: build(deps): bump `@date-io/luxon` from 1.3.13 to 2.11.1 +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/cli@0.11.0 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-catalog@0.7.8 + ## 0.1.8 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index d081a220e7..6c2a344c19 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.8", + "version": "0.1.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,13 +21,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/cli": "^0.10.5", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog": "^0.7.7", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/cli": "^0.11.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/plugin-catalog-react": "^0.6.11", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/dev-utils": "^0.2.16", + "@backstage/cli": "^0.11.0", + "@backstage/dev-utils": "^0.2.17", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.0.6" }, diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 3f606353c1..626f52a06c 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bitrise +## 0.1.22 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.1.21 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index e1dca12e2b..964f4da6d4 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.21", + "version": "0.1.22", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index b8e48924dc..b2da918f59 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.3.9 + +### Patch Changes + +- 2b19fd2e94: Make sure to avoid accidental data sharing / mutation of `set` values +- 722681b1b1: Clean up API report +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/plugin-catalog-backend@0.20.0 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.3.8 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 2817a0e209..ff79feaea2 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 modules that helps integrate towards LDAP", - "version": "0.3.8", + "version": "0.3.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-catalog-backend": "^0.19.0", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-backend": "^0.20.0", "@backstage/types": "^0.1.1", "@types/ldapjs": "^2.2.0", "ldapjs": "^2.2.0", @@ -40,7 +40,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.0", + "@backstage/cli": "^0.11.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 3db08d02fc..17afa99b76 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.2.12 + +### Patch Changes + +- 722681b1b1: Clean up API report +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/plugin-catalog-backend@0.20.0 + - @backstage/catalog-model@0.9.9 + ## 0.2.11 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index db3e59c307..1afc377605 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 modules that helps integrate towards Microsoft Graph", - "version": "0.2.11", + "version": "0.2.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,9 +30,9 @@ }, "dependencies": { "@azure/msal-node": "^1.1.0", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/plugin-catalog-backend": "^0.19.3", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/plugin-catalog-backend": "^0.20.0", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -42,9 +42,9 @@ "qs": "^6.9.4" }, "devDependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/cli": "^0.10.3", - "@backstage/test-utils": "^0.2.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/lodash": "^4.14.151", "msw": "^0.35.0" }, diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index e53bb50e1a..e329c82ac0 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-catalog-backend +## 0.20.0 + +### Minor Changes + +- cd529c4094: In order to integrate the permissions system with the refresh endpoint in catalog-backend, a new AuthorizedRefreshService was created as a thin wrapper around the existing refresh service which performs authorization and handles the case when authorization is denied. In order to instantiate AuthorizedRefreshService, a permission client is required, which was added as a new field to `CatalogEnvironment`. + + The new `permissions` field in `CatalogEnvironment` should already receive the permission client from the `PluginEnvrionment`, so there should be no changes required to the catalog backend setup. See [the create-app changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md) for more details. + +### Patch Changes + +- 0ae759dad4: Add catalog permission rules. +- 3b4d8caff6: Allow a custom GithubCredentialsProvider to be passed to the GitHub processors. +- 6fd70f8bc8: Provide support for Bitbucket servers with custom BaseURLs. +- 5333451def: Cleaned up API exports +- 730d01ab1a: Add apply-conditions endpoint for evaluating conditional permissions in catalog backend. +- 0a6c68582a: Add authorization to catalog-backend entities GET endpoints +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-permission-node@0.3.0 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-permission-common@0.3.1 + ## 0.19.4 ### Patch Changes diff --git a/plugins/catalog-backend/api-report.md b/plugins/catalog-backend/api-report.md index 702597c7c8..c503d303ba 100644 --- a/plugins/catalog-backend/api-report.md +++ b/plugins/catalog-backend/api-report.md @@ -849,6 +849,7 @@ export type EntitiesRequest = { filter?: EntityFilter; fields?: (entity: Entity) => Entity; pagination?: EntityPagination; + authorizationToken?: string; }; // Warning: (ae-missing-release-tag) "EntitiesResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -1358,7 +1359,7 @@ export interface NextRouterOptions { // (undocumented) logger: Logger_2; // (undocumented) - permissionRules?: PermissionRule[]; + permissionIntegrationRouter?: express.Router; // (undocumented) refreshService?: RefreshService; } diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 504e86a736..71151c460d 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": "0.19.4", + "version": "0.20.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,15 +30,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@backstage/plugin-catalog-common": "^0.1.0", - "@backstage/plugin-permission-common": "^0.3.0", - "@backstage/plugin-permission-node": "^0.2.3", + "@backstage/plugin-permission-common": "^0.3.1", + "@backstage/plugin-permission-node": "^0.3.0", "@backstage/search-common": "^0.2.1", "@backstage/types": "^0.1.1", "@octokit/graphql": "^4.5.8", @@ -65,10 +65,10 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.12", - "@backstage/cli": "^0.10.4", - "@backstage/plugin-permission-common": "^0.3.0", - "@backstage/test-utils": "^0.2.1", + "@backstage/backend-test-utils": "^0.1.13", + "@backstage/cli": "^0.11.0", + "@backstage/plugin-permission-common": "^0.3.1", + "@backstage/test-utils": "^0.2.2", "@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/catalog/types.ts b/plugins/catalog-backend/src/catalog/types.ts index f030d63bce..f71d7fb7d9 100644 --- a/plugins/catalog-backend/src/catalog/types.ts +++ b/plugins/catalog-backend/src/catalog/types.ts @@ -70,6 +70,7 @@ export type EntitiesRequest = { filter?: EntityFilter; fields?: (entity: Entity) => Entity; pagination?: EntityPagination; + authorizationToken?: string; }; export type EntitiesResponse = { diff --git a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts new file mode 100644 index 0000000000..768e3a690b --- /dev/null +++ b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts @@ -0,0 +1,96 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AuthorizeResult } from '@backstage/plugin-permission-common'; +import { createConditionTransformer } from '@backstage/plugin-permission-node'; +import { isEntityKind } from '../permissions/rules/isEntityKind'; +import { AuthorizedEntitiesCatalog } from './AuthorizedEntitiesCatalog'; + +describe('AuthorizedEntitiesCatalog', () => { + const fakeCatalog = { + entities: jest.fn(), + removeEntityByUid: jest.fn(), + entityAncestry: jest.fn(), + }; + const fakePermissionApi = { + authorize: jest.fn(), + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('entities', () => { + it('returns empty response on DENY', async () => { + fakePermissionApi.authorize.mockResolvedValue([ + { result: AuthorizeResult.DENY }, + ]); + + const catalog = new AuthorizedEntitiesCatalog( + fakeCatalog, + fakePermissionApi, + createConditionTransformer([]), + ); + + expect( + await catalog.entities({ + authorizationToken: 'abcd', + }), + ).toEqual({ + entities: [], + pageInfo: { hasNextPage: false }, + }); + }); + + it('calls underlying catalog method with correct filter on CONDITIONAL', async () => { + fakePermissionApi.authorize.mockResolvedValue([ + { + result: AuthorizeResult.CONDITIONAL, + conditions: { rule: 'IS_ENTITY_KIND', params: [['b']] }, + }, + ]); + const catalog = new AuthorizedEntitiesCatalog( + fakeCatalog, + fakePermissionApi, + createConditionTransformer([isEntityKind]), + ); + + await catalog.entities({ authorizationToken: 'abcd' }); + + expect(fakeCatalog.entities).toHaveBeenCalledWith({ + authorizationToken: 'abcd', + filter: { key: 'kind', values: ['b'] }, + }); + }); + + it('calls underlying catalog method on ALLOW', async () => { + fakePermissionApi.authorize.mockResolvedValue([ + { result: AuthorizeResult.ALLOW }, + ]); + const catalog = new AuthorizedEntitiesCatalog( + fakeCatalog, + fakePermissionApi, + createConditionTransformer([]), + ); + + await catalog.entities({ authorizationToken: 'abcd' }); + + expect(fakeCatalog.entities).toHaveBeenCalledWith({ + authorizationToken: 'abcd', + }); + }); + }); +}); diff --git a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts new file mode 100644 index 0000000000..5b65070c43 --- /dev/null +++ b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts @@ -0,0 +1,77 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { catalogEntityReadPermission } from '@backstage/plugin-catalog-common'; +import { + AuthorizeResult, + PermissionAuthorizer, +} from '@backstage/plugin-permission-common'; +import { ConditionTransformer } from '@backstage/plugin-permission-node'; +import { + EntitiesCatalog, + EntitiesRequest, + EntitiesResponse, + EntityAncestryResponse, + EntityFilter, +} from '../catalog/types'; + +export class AuthorizedEntitiesCatalog implements EntitiesCatalog { + constructor( + private readonly entitiesCatalog: EntitiesCatalog, + private readonly permissionApi: PermissionAuthorizer, + private readonly transformConditions: ConditionTransformer, + ) {} + + async entities(request?: EntitiesRequest): Promise { + const authorizeResponse = ( + await this.permissionApi.authorize( + [{ permission: catalogEntityReadPermission }], + { token: request?.authorizationToken }, + ) + )[0]; + + if (authorizeResponse.result === AuthorizeResult.DENY) { + return { + entities: [], + pageInfo: { hasNextPage: false }, + }; + } + + if (authorizeResponse.result === AuthorizeResult.CONDITIONAL) { + const permissionFilter: EntityFilter = this.transformConditions( + authorizeResponse.conditions, + ); + return this.entitiesCatalog.entities({ + ...request, + filter: request?.filter + ? { allOf: [permissionFilter, request.filter] } + : permissionFilter, + }); + } + + return this.entitiesCatalog.entities(request); + } + + removeEntityByUid(uid: string): Promise { + // TODO: Implement permissioning + return this.entitiesCatalog.removeEntityByUid(uid); + } + + entityAncestry(entityRef: string): Promise { + // TODO: Implement permissioning + return this.entitiesCatalog.entityAncestry(entityRef); + } +} diff --git a/plugins/catalog-backend/src/service/NextCatalogBuilder.ts b/plugins/catalog-backend/src/service/NextCatalogBuilder.ts index eecfb5fc11..18ee1e2042 100644 --- a/plugins/catalog-backend/src/service/NextCatalogBuilder.ts +++ b/plugins/catalog-backend/src/service/NextCatalogBuilder.ts @@ -23,7 +23,9 @@ import { FieldFormatEntityPolicy, makeValidator, NoForeignRootFieldsEntityPolicy, + parseEntityRef, SchemaValidEntityPolicy, + stringifyEntityRef, Validators, } from '@backstage/catalog-model'; import { @@ -33,7 +35,7 @@ import { } from '@backstage/integration'; import { createHash } from 'crypto'; import { Router } from 'express'; -import lodash from 'lodash'; +import lodash, { keyBy } from 'lodash'; import { EntitiesCatalog, EntitiesSearchFilter } from '../catalog'; import { DatabaseLocationsCatalog, @@ -90,7 +92,14 @@ import { LocationService } from './types'; import { connectEntityProviders } from '../processing/connectEntityProviders'; import { permissionRules as catalogPermissionRules } from '../permissions/rules'; import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; -import { PermissionRule } from '@backstage/plugin-permission-node'; +import { + PermissionRule, + createConditionTransformer, + createPermissionIntegrationRouter, +} from '@backstage/plugin-permission-node'; +import { AuthorizedEntitiesCatalog } from './AuthorizedEntitiesCatalog'; +import { basicEntityFilter } from './request/basicEntityFilter'; +import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common'; export type CatalogEnvironment = { logger: Logger; @@ -399,7 +408,38 @@ export class NextCatalogBuilder { parser, policy, }); - const entitiesCatalog = new NextEntitiesCatalog(dbClient); + const unauthorizedEntitiesCatalog = new NextEntitiesCatalog(dbClient); + const entitiesCatalog = new AuthorizedEntitiesCatalog( + unauthorizedEntitiesCatalog, + permissions, + createConditionTransformer(this.permissionRules), + ); + const permissionIntegrationRouter = createPermissionIntegrationRouter({ + resourceType: RESOURCE_TYPE_CATALOG_ENTITY, + getResources: async (resourceRefs: string[]) => { + const { entities } = await unauthorizedEntitiesCatalog.entities({ + filter: { + anyOf: resourceRefs.map(resourceRef => { + const { kind, namespace, name } = parseEntityRef(resourceRef); + + return basicEntityFilter({ + kind, + 'metadata.namespace': namespace, + 'metadata.name': name, + }); + }), + }, + }); + + const entitiesByRef = keyBy(entities, stringifyEntityRef); + + return resourceRefs.map( + resourceRef => + entitiesByRef[stringifyEntityRef(parseEntityRef(resourceRef))], + ); + }, + rules: this.permissionRules, + }); const stitcher = new Stitcher(dbClient, logger); const locationStore = new DefaultLocationStore(dbClient); @@ -435,7 +475,7 @@ export class NextCatalogBuilder { refreshService, logger, config, - permissionRules: this.permissionRules, + permissionIntegrationRouter, }); await connectEntityProviders(processingDatabase, entityProviders); diff --git a/plugins/catalog-backend/src/service/NextRouter.test.ts b/plugins/catalog-backend/src/service/NextRouter.test.ts index e835c4620a..b79fba4a56 100644 --- a/plugins/catalog-backend/src/service/NextRouter.test.ts +++ b/plugins/catalog-backend/src/service/NextRouter.test.ts @@ -25,6 +25,8 @@ import { LocationService, RefreshService } from './types'; import { basicEntityFilter } from './request'; import { createNextRouter } from './NextRouter'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; +import { createPermissionIntegrationRouter } from '@backstage/plugin-permission-node'; +import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common'; describe('createNextRouter readonly disabled', () => { let entitiesCatalog: jest.Mocked; @@ -52,7 +54,7 @@ describe('createNextRouter readonly disabled', () => { logger: getVoidLogger(), refreshService, config: new ConfigReader(undefined), - permissionRules: [], + permissionIntegrationRouter: express.Router(), }); app = express().use(router); }); @@ -340,7 +342,7 @@ describe('createNextRouter readonly enabled', () => { readonly: true, }, }), - permissionRules: [], + permissionIntegrationRouter: express.Router(), }); app = express().use(router); }); @@ -468,7 +470,15 @@ describe('NextRouter permissioning', () => { logger: getVoidLogger(), refreshService, config: new ConfigReader(undefined), - permissionRules: [fakeRule], + permissionIntegrationRouter: createPermissionIntegrationRouter({ + resourceType: RESOURCE_TYPE_CATALOG_ENTITY, + rules: [fakeRule], + getResources: jest.fn((resourceRefs: string[]) => + Promise.resolve( + resourceRefs.map(resourceRef => ({ id: resourceRef })), + ), + ), + }), }); app = express().use(router); }); @@ -480,7 +490,7 @@ describe('NextRouter permissioning', () => { it('accepts and evaluates conditions at the apply-conditions endpoint', async () => { const spideySense: Entity = { apiVersion: 'a', - kind: 'b', + kind: 'component', metadata: { name: 'spidey-sense', }, @@ -491,15 +501,22 @@ describe('NextRouter permissioning', () => { }); const requestBody = { - resourceType: 'catalog-entity', - resourceRef: 'component:default/spidey-sense', - conditions: { rule: 'FAKE_RULE', params: ['user:default/spiderman'] }, + items: [ + { + id: '123', + resourceType: 'catalog-entity', + resourceRef: 'component:default/spidey-sense', + conditions: { rule: 'FAKE_RULE', params: ['user:default/spiderman'] }, + }, + ], }; const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send(requestBody); expect(response.status).toBe(200); - expect(response.body).toEqual({ result: AuthorizeResult.ALLOW }); + expect(response.body).toEqual({ + items: [{ id: '123', result: AuthorizeResult.ALLOW }], + }); }); }); diff --git a/plugins/catalog-backend/src/service/NextRouter.ts b/plugins/catalog-backend/src/service/NextRouter.ts index 5338f58f91..78550e1791 100644 --- a/plugins/catalog-backend/src/service/NextRouter.ts +++ b/plugins/catalog-backend/src/service/NextRouter.ts @@ -17,23 +17,16 @@ import { errorHandler } from '@backstage/backend-common'; import { analyzeLocationSchema, - Entity, locationSpecSchema, - parseEntityRef, stringifyEntityRef, } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import { NotFoundError } from '@backstage/errors'; -import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common'; -import { - createPermissionIntegrationRouter, - PermissionRule, -} from '@backstage/plugin-permission-node'; import express from 'express'; import Router from 'express-promise-router'; import { Logger } from 'winston'; import yn from 'yn'; -import { EntitiesCatalog, EntitiesSearchFilter } from '../catalog'; +import { EntitiesCatalog } from '../catalog'; import { LocationAnalyzer } from '../ingestion/types'; import { basicEntityFilter, @@ -51,7 +44,7 @@ export interface NextRouterOptions { refreshService?: RefreshService; logger: Logger; config: Config; - permissionRules?: PermissionRule[]; + permissionIntegrationRouter?: express.Router; } export async function createNextRouter( @@ -64,7 +57,7 @@ export async function createNextRouter( refreshService, config, logger, - permissionRules, + permissionIntegrationRouter, } = options; const router = Router(); @@ -88,21 +81,18 @@ export async function createNextRouter( }); } + if (permissionIntegrationRouter) { + router.use(permissionIntegrationRouter); + } + if (entitiesCatalog) { router - .use( - createPermissionIntegrationRouter({ - resourceType: RESOURCE_TYPE_CATALOG_ENTITY, - getResource: resourceRef => - getEntityResource(resourceRef, entitiesCatalog), - rules: permissionRules ?? [], - }), - ) .get('/entities', async (req, res) => { const { entities, pageInfo } = await entitiesCatalog.entities({ filter: parseEntityFilterParams(req.query), fields: parseEntityTransformParams(req.query), pagination: parseEntityPaginationParams(req.query), + authorizationToken: getBearerToken(req.header('authorization')), }); // Add a Link header to the next page @@ -120,6 +110,7 @@ export async function createNextRouter( const { uid } = req.params; const { entities } = await entitiesCatalog.entities({ filter: basicEntityFilter({ 'metadata.uid': uid }), + authorizationToken: getBearerToken(req.header('authorization')), }); if (!entities.length) { throw new NotFoundError(`No entity with uid ${uid}`); @@ -139,6 +130,7 @@ export async function createNextRouter( 'metadata.namespace': namespace, 'metadata.name': name, }), + authorizationToken: getBearerToken(req.header('authorization')), }); if (!entities.length) { throw new NotFoundError( @@ -204,23 +196,6 @@ export async function createNextRouter( return router; } -async function getEntityResource( - resourceRef: string, - entitiesCatalog: EntitiesCatalog, -): Promise { - const parsed = parseEntityRef(resourceRef); - - const { entities } = await entitiesCatalog.entities({ - filter: basicEntityFilter({ - kind: parsed.kind, - 'metadata.namespace': parsed.namespace, - 'metadata.name': parsed.name, - }), - }); - - return entities[0]; -} - function getBearerToken( authorizationHeader: string | undefined, ): string | undefined { diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index da4f80cd1a..5026dc0074 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -30,10 +30,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/plugin-permission-common": "^0.3.0" + "@backstage/plugin-permission-common": "^0.3.1" }, "devDependencies": { - "@backstage/cli": "^0.10.3" + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index ffbef5c63f..22020d0e97 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-graph +## 0.2.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.2.5 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 8718172cf4..de06748c90 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.5", + "version": "0.2.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md index fe6cc4cc00..e06952bb60 100644 --- a/plugins/catalog-graphql/CHANGELOG.md +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-graphql +## 0.3.0 + +### Minor Changes + +- 0fb17da164: chore: bumping dependencies in the GraphQL modules and bringing them up to date with the latest `graphql-modules` library + +### Patch Changes + +- cf01627a33: Bump graphql versions +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/catalog-model@0.9.9 + ## 0.2.14 ### Patch Changes diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 8982f0fa5a..aac63bee0b 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.2.14", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", "@backstage/types": "^0.1.1", "graphql-modules": "^1.0.0", "apollo-server": "^3.0.0", @@ -43,8 +43,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.3", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@graphql-codegen/cli": "^2.3.1", "@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript-resolvers": "^2.4.3", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index ff675b812c..8afb610900 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-import +## 0.7.9 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + ## 0.7.8 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 7558ff9445..b20b4d01da 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.7.8", + "version": "0.7.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,14 +31,14 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/integration": "^0.7.0", - "@backstage/integration-react": "^0.1.17", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog-react": "^0.6.11", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -56,10 +56,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index e15a9d1c13..c201015e60 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-react +## 0.6.11 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.6.10 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 6b76ec3925..7da6c9386b 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": "0.6.10", + "version": "0.6.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,12 +29,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/integration": "^0.7.0", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@backstage/types": "^0.1.1", "@backstage/version-bridge": "^0.1.1", "@material-ui/core": "^4.12.2", @@ -52,9 +52,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index e33eccb116..3553d48da3 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog +## 0.7.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + ## 0.7.7 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index da7f666b35..9684cb1bd8 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": "0.7.7", + "version": "0.7.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,13 +31,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/integration-react": "^0.1.17", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index a3b5de58c5..b2df699f5f 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-circleci +## 0.2.34 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.2.33 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index a7e05511db..9b5bc10143 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.2.33", + "version": "0.2.34", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "postpack": "backstage-cli postpack" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index cbd4c0bbfa..bd857ff054 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cloudbuild +## 0.2.32 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.2.31 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index d0075d683e..ba2f7f608a 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.2.31", + "version": "0.2.32", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 1fd78b862b..417cf7948e 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-code-coverage-backend +## 0.1.19 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.1.18 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 4a24cada7c..78ac11c7a5 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.1.18", + "version": "0.1.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,12 +20,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -36,7 +36,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 6f10ecbbf4..bec12d6c0d 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-code-coverage +## 0.1.22 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.21 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index e6ddcdb5f1..6a7e3740e5 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.1.21", + "version": "0.1.22", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,12 +21,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 20b8e258d5..708ff17d0b 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-config-schema +## 0.1.18 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/errors@0.2.0 + ## 0.1.17 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 85a088b20c..f73cfbb356 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.17", + "version": "0.1.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@material-ui/core": "^4.12.2", @@ -38,10 +38,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index d0a0eb400b..8456151d6f 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cost-insights +## 0.11.17 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.11.16 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 4f9c3f55ec..2e7ec2bad6 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.16", + "version": "0.11.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,9 +31,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.10", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -56,10 +56,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/explore-react/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index b173eca371..7f72577711 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-explore-react +## 0.0.10 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@0.5.0 + ## 0.0.9 ### Patch Changes diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index e115678a27..a2dc776412 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.9", + "version": "0.0.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,12 +29,12 @@ "postpack": "backstage-cli postpack" }, "dependencies": { - "@backstage/core-plugin-api": "^0.4.0" + "@backstage/core-plugin-api": "^0.5.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", - "@backstage/dev-utils": "^0.2.15", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 2b0c42002f..1b968e13e0 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-explore +## 0.3.25 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-explore-react@0.0.10 + ## 0.3.24 ### Patch Changes diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 424eb84eac..aab62079e7 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.24", + "version": "0.3.25", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", - "@backstage/plugin-explore-react": "^0.0.9", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", + "@backstage/plugin-explore-react": "^0.0.10", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 8d2e3b71d8..f1b2d2ecfc 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-firehydrant +## 0.1.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + ## 0.1.11 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 118c64c11d..9d52293cd5 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.11", + "version": "0.1.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index 7e62631d00..f5458f4367 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-fossa +## 0.2.27 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.2.26 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index ff5c063e15..a89286f507 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.26", + "version": "0.2.27", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,11 +32,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index 9da0972948..c0dfe5434f 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gcp-projects +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.12 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 1b36c4a112..8aa8f6b644 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.12", + "version": "0.3.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 50ef4d5f26..096df63eaa 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-git-release-manager +## 0.3.8 + +### Patch Changes + +- c1813739c6: Improved copy for patch CTA +- Updated dependencies + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.7 ### Patch Changes diff --git a/plugins/git-release-manager/api-report.md b/plugins/git-release-manager/api-report.md index 4ed142ca04..743ea4e0f9 100644 --- a/plugins/git-release-manager/api-report.md +++ b/plugins/git-release-manager/api-report.md @@ -296,6 +296,11 @@ const mockBumpedTag = 'rc-2020.01.01_1337'; // @public (undocumented) const mockCalverProject: Project; +// Warning: (ae-missing-release-tag) "mockCtaMessage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +const mockCtaMessage = 'Patch Release Candidate'; + // Warning: (ae-missing-release-tag) "mockDefaultBranch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -601,6 +606,7 @@ declare namespace testHelpers_2 { mockNextGitInfoSemver, mockNextGitInfoCalver, mockTagParts, + mockCtaMessage, mockBumpedTag, createMockRelease, mockReleaseCandidateCalver, diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 444c77fc8a..aa31559977 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.7", + "version": "0.3.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/integration": "^0.7.0", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/integration": "^0.7.1", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/git-release-manager/src/features/Patch/Patch.tsx b/plugins/git-release-manager/src/features/Patch/Patch.tsx index c902ab0dc5..6088538161 100644 --- a/plugins/git-release-manager/src/features/Patch/Patch.tsx +++ b/plugins/git-release-manager/src/features/Patch/Patch.tsx @@ -40,24 +40,32 @@ export const Patch = ({ releaseBranch, onSuccess, }: PatchProps) => { + const ctaMessage = `Patch Release ${ + latestRelease?.prerelease ? 'Candidate' : 'Version' + }`; + return ( - - Patch Release {latestRelease?.prerelease ? 'Candidate' : 'Version'} - + {ctaMessage} ); }; -function BodyWrapper({ latestRelease, releaseBranch, onSuccess }: PatchProps) { +function BodyWrapper({ + latestRelease, + releaseBranch, + onSuccess, + ctaMessage, +}: PatchProps & { ctaMessage: string }) { const { project } = useProjectContext(); if (latestRelease === null) { @@ -93,6 +101,7 @@ function BodyWrapper({ latestRelease, releaseBranch, onSuccess }: PatchProps) { releaseBranch={releaseBranch} onSuccess={onSuccess} tagParts={bumpedTag.tagParts} + ctaMessage={ctaMessage} /> ); } diff --git a/plugins/git-release-manager/src/features/Patch/PatchBody.test.tsx b/plugins/git-release-manager/src/features/Patch/PatchBody.test.tsx index d3e215d6d3..765cd82de2 100644 --- a/plugins/git-release-manager/src/features/Patch/PatchBody.test.tsx +++ b/plugins/git-release-manager/src/features/Patch/PatchBody.test.tsx @@ -24,6 +24,7 @@ import { mockReleaseCandidateCalver, mockReleaseVersionCalver, mockTagParts, + mockCtaMessage, } from '../../test-helpers/test-helpers'; import { mockApiClient } from '../../test-helpers/mock-api-client'; import { PatchBody } from './PatchBody'; @@ -60,6 +61,7 @@ describe('PatchBody', () => { latestRelease={mockReleaseCandidateCalver} releaseBranch={mockReleaseBranch} tagParts={mockTagParts} + ctaMessage={mockCtaMessage} />, ); @@ -77,6 +79,7 @@ describe('PatchBody', () => { releaseBranch={mockReleaseBranch} bumpedTag={mockBumpedTag} tagParts={mockTagParts} + ctaMessage={mockCtaMessage} />, ); diff --git a/plugins/git-release-manager/src/features/Patch/PatchBody.tsx b/plugins/git-release-manager/src/features/Patch/PatchBody.tsx index 98303890c8..c5429e389a 100644 --- a/plugins/git-release-manager/src/features/Patch/PatchBody.tsx +++ b/plugins/git-release-manager/src/features/Patch/PatchBody.tsx @@ -58,6 +58,7 @@ interface PatchBodyProps { releaseBranch: GetBranchResult['branch']; onSuccess?: ComponentConfig['onSuccess']; tagParts: NonNullable; + ctaMessage: string; } export const PatchBody = ({ @@ -66,6 +67,7 @@ export const PatchBody = ({ releaseBranch, onSuccess, tagParts, + ctaMessage, }: PatchBodyProps) => { const pluginApiClient = useApi(gitReleaseManagerApiRef); const { project } = useProjectContext(); @@ -106,7 +108,7 @@ export const PatchBody = ({ ); } @@ -320,7 +322,7 @@ export const PatchBody = ({ run(selectedPatchCommit); }} > - Patch Release Candidate + {ctaMessage} ); diff --git a/plugins/git-release-manager/src/test-helpers/test-helpers.ts b/plugins/git-release-manager/src/test-helpers/test-helpers.ts index a5f0787a09..5547d889e0 100644 --- a/plugins/git-release-manager/src/test-helpers/test-helpers.ts +++ b/plugins/git-release-manager/src/test-helpers/test-helpers.ts @@ -115,6 +115,8 @@ export const mockTagParts = { patch: 1, } as CalverTagParts; +export const mockCtaMessage = 'Patch Release Candidate'; + export const mockBumpedTag = 'rc-2020.01.01_1337'; /** diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index a2099a5b20..7474d21b96 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-github-actions +## 0.4.31 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.4.30 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index e65ed5a989..0cb2d43074 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.4.30", + "version": "0.4.31", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,11 +33,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/integration": "^0.7.0", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/integration": "^0.7.1", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 94b4dadbcd..218effd052 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-github-deployments +## 0.1.26 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + ## 0.1.25 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index fcf452c67e..5d4fe3aa4b 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.25", + "version": "0.1.26", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,13 +21,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/integration": "^0.7.0", - "@backstage/integration-react": "^0.1.17", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 58607974f5..e8c1203517 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-gitops-profiles +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.12 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 345d2a812e..644644b764 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.12", + "version": "0.3.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,8 +32,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md new file mode 100644 index 0000000000..6edae04378 --- /dev/null +++ b/plugins/gocd/CHANGELOG.md @@ -0,0 +1,13 @@ +# @backstage/plugin-gocd + +## 0.1.1 + +### Patch Changes + +- d9aaecd1cb: Add GoCD plugin for CI/CD. +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index d07931916d..c03a8261f5 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.0", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,11 +28,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.1", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.6.0", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index da188aee4b..f8767cb04f 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-graphiql +## 0.2.27 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.2.26 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 593be20c6e..25936f97a3 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.26", + "version": "0.2.27", "private": false, "publishConfig": { "access": "public", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index 25b60ec94a..5c41c9fb0a 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-graphql-backend +## 0.1.11 + +### Patch Changes + +- 0fb17da164: chore: bumping dependencies in the GraphQL modules and bringing them up to date with the latest `graphql-modules` library +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-catalog-graphql@0.3.0 + ## 0.1.10 ### Patch Changes diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index b341a6602c..0144b7ca93 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.10", + "version": "0.1.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,9 +31,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/config": "^0.1.8", - "@backstage/plugin-catalog-graphql": "^0.2.14", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/plugin-catalog-graphql": "^0.3.0", "@graphql-tools/schema": "^8.3.1", "graphql-modules": "^1.0.0", "@types/express": "^4.17.6", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.35.0", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 15d4fce3de..2c7f9785b8 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-home +## 0.4.10 + +### Patch Changes + +- bdf1419d20: Adds two new home components - CompanyLogo and Toolkit. +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-search@0.5.5 + ## 0.4.9 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index 298b1860e9..df0249a04e 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.9", + "version": "0.4.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", - "@backstage/plugin-search": "^0.5.1", + "@backstage/plugin-search": "^0.5.5", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index 47a07999be..6cae7a6529 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-ilert +## 0.1.21 + +### Patch Changes + +- b47965beec: build(deps): bump `@date-io/luxon` from 1.3.13 to 2.11.1 +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.20 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index 0a7b69b6f9..6299be9b2c 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.20", + "version": "0.1.21", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@date-io/luxon": "2.x", "@material-ui/core": "^4.12.2", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index 4276e08c05..eabccc1416 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -22,10 +22,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", "msw": "^0.35.0", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 5881cd7ecf..20e3c433d0 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-jenkins +## 0.5.17 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.5.16 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 14ff0fd2e7..ce637dba75 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.5.16", + "version": "0.5.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,11 +32,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index 6ec2d482b7..d6bcc20d89 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kafka-backend +## 0.2.14 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.2.13 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index a26cf280c2..d0130b5370 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.13", + "version": "0.2.14", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/errors": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -44,7 +44,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/jest-when": "^2.7.2", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index 45b122b7c1..4fb13cd517 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kafka +## 0.2.25 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.2.24 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 5eab137ca1..1aefb39e31 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.2.24", + "version": "0.2.25", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index faf40d12e7..aa57639849 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kubernetes-backend +## 0.4.3 + +### Patch Changes + +- a67ec8527f: Exclude the AWS session token from credential validation, because it's not necessary in this context. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.4.2 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 75ec4c3f03..f4be95dcb8 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.4.2", + "version": "0.4.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.2", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/errors": "^0.1.5", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "@backstage/plugin-kubernetes-common": "^0.2.1", "@google-cloud/container": "^2.2.0", "@kubernetes/client-node": "^0.16.0", @@ -55,7 +55,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", + "@backstage/cli": "^0.11.0", "@types/aws4": "^1.5.1", "supertest": "^6.1.3", "aws-sdk-mock": "^5.2.1", diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index cac133aa47..7b30ddaa9e 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -35,11 +35,11 @@ "url": "https://github.com/backstage/backstage/issues" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", + "@backstage/catalog-model": "^0.9.9", "@kubernetes/client-node": "^0.16.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5" + "@backstage/cli": "^0.11.0" }, "jest": { "roots": [ diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index 67126b4461..210ca07868 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-kubernetes +## 0.5.4 + +### Patch Changes + +- 7612e2856b: Clean up emptystate.svg image, removing wrong white artifact from the background +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.5.3 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 2d152c7390..937212786e 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.5.3", + "version": "0.5.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/plugin-kubernetes-common": "^0.2.1", "@kubernetes/client-node": "^0.16.0", "@backstage/theme": "^0.2.14", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 83ab044467..2f6bb2b2e1 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-lighthouse +## 0.2.34 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.2.33 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 4dcf72452e..339e9bce7a 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.2.33", + "version": "0.2.34", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,11 +32,11 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index 389d0f5f9d..1e796d2e53 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-newrelic-dashboard +## 0.1.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.2 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 5a0ebc10df..782a6b662b 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.1.2", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,19 +20,19 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/dev-utils": "^0.2.16", + "@backstage/cli": "^0.11.0", + "@backstage/dev-utils": "^0.2.17", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.0.6" diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 19265d9e17..a4ffcd2b6e 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-newrelic +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.12 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 0caca9f96e..8ecc05449d 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.12", + "version": "0.3.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,8 +32,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 958e389a6e..e60b594a22 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-org +## 0.3.34 + +### Patch Changes + +- 3f08dcd696: For the component `EntityMembersListCard` you can now specify the type of members you have in a group. For example: + + ```tsx + + + + ``` + + If left empty it will by default use 'Members'. + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.3.33 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index fadca4442a..72cc6ca1e2 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.3.33", + "version": "0.3.34", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -39,11 +39,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/catalog-client": "^0.5.4", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 9e55d4d587..0e43f1daee 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-pagerduty +## 0.3.22 + +### Patch Changes + +- 7612e2856b: Clean up emptystate.svg image, removing wrong white artifact from the background +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.3.21 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 6a3ea7ebb9..d4a7c17653 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.3.21", + "version": "0.3.22", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 76ee47ab32..d199acfea4 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-permission-backend +## 0.3.0 + +### Minor Changes + +- 419ca637c0: Optimizations to the integration between the permission backend and plugin-backends using createPermissionIntegrationRouter: + + - The permission backend already supported batched requests to authorize, but would make calls to plugin backend to apply conditions serially. Now, after applying the policy for each authorization request, the permission backend makes a single batched /apply-conditions request to each plugin backend referenced in policy decisions. + - The `getResource` method accepted by `createPermissionIntegrationRouter` has been replaced with `getResources`, to allow consumers to make batch requests to upstream data stores. When /apply-conditions is called with a batch of requests, all required resources are requested in a single invocation of `getResources`. + + Plugin owners consuming `createPermissionIntegrationRouter` should replace the `getResource` method in the options with a `getResources` method, accepting an array of resourceRefs, and returning an array of the corresponding resources. + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-permission-node@0.3.0 + - @backstage/plugin-auth-backend@0.6.2 + - @backstage/errors@0.2.0 + - @backstage/plugin-permission-common@0.3.1 + ## 0.2.3 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 890495f646..9ce153d40a 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.2.3", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,21 +19,25 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/config": "^0.1.11", - "@backstage/plugin-auth-backend": "^0.6.0", - "@backstage/plugin-permission-common": "^0.3.0", - "@backstage/plugin-permission-node": "^0.2.3", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-auth-backend": "^0.6.2", + "@backstage/plugin-permission-common": "^0.3.1", + "@backstage/plugin-permission-node": "^0.3.0", "@types/express": "*", + "dataloader": "^2.0.0", "express": "^4.17.1", "express-promise-router": "^4.1.0", + "lodash": "^4.17.21", "node-fetch": "^2.6.1", "winston": "^3.2.1", "yn": "^4.0.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", + "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", "msw": "^0.35.0" diff --git a/plugins/permission-backend/src/service/PermissionIntegrationClient.test.ts b/plugins/permission-backend/src/service/PermissionIntegrationClient.test.ts index 7f46490ce2..4be1b55379 100644 --- a/plugins/permission-backend/src/service/PermissionIntegrationClient.test.ts +++ b/plugins/permission-backend/src/service/PermissionIntegrationClient.test.ts @@ -16,7 +16,7 @@ import { AddressInfo } from 'net'; import { Server } from 'http'; -import express, { Router } from 'express'; +import express, { Router, RequestHandler } from 'express'; import { RestContext, rest } from 'msw'; import { setupServer, SetupServerApi } from 'msw/node'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; @@ -39,14 +39,16 @@ describe('PermissionIntegrationClient', () => { const mockApplyConditionsHandler = jest.fn( (_req, res, { json }: RestContext) => { - return res(json({ result: AuthorizeResult.ALLOW })); + return res( + json({ items: [{ id: '123', result: AuthorizeResult.ALLOW }] }), + ); }, ); - const mockBaseUrl = 'http://backstage:9191/i-am-a-mock-base'; + const mockBaseUrl = 'http://backstage:9191'; const discovery: PluginEndpointDiscovery = { - async getBaseUrl() { - return mockBaseUrl; + async getBaseUrl(pluginId) { + return `${mockBaseUrl}/${pluginId}`; }, async getExternalBaseUrl() { throw new Error('Not implemented.'); @@ -64,7 +66,7 @@ describe('PermissionIntegrationClient', () => { server.listen({ onUnhandledRequest: 'error' }); server.use( rest.post( - `${mockBaseUrl}/.well-known/backstage/permissions/apply-conditions`, + `${mockBaseUrl}/plugin-1/.well-known/backstage/permissions/apply-conditions`, mockApplyConditionsHandler, ), ); @@ -77,30 +79,39 @@ describe('PermissionIntegrationClient', () => { }); it('should make a POST request to the correct endpoint', async () => { - await client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }); + await client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]); expect(mockApplyConditionsHandler).toHaveBeenCalled(); }); it('should include a request body', async () => { - await client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }); + await client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]); expect(mockApplyConditionsHandler).toHaveBeenCalledWith( expect.objectContaining({ body: { - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, + items: [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ], }, }), expect.anything(), @@ -109,25 +120,29 @@ describe('PermissionIntegrationClient', () => { }); it('should return the response from the fetch request', async () => { - const response = await client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }); + const response = await client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]); expect(response).toEqual( - expect.objectContaining({ result: AuthorizeResult.ALLOW }), + expect.objectContaining([{ id: '123', result: AuthorizeResult.ALLOW }]), ); }); it('should not include authorization headers if no token is supplied', async () => { - await client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }); + await client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]); const request = mockApplyConditionsHandler.mock.calls[0][0]; expect(request.headers.has('authorization')).toEqual(false); @@ -135,12 +150,15 @@ describe('PermissionIntegrationClient', () => { it('should include correctly-constructed authorization header if token is supplied', async () => { await client.applyConditions( - { - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }, + 'plugin-1', + [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ], 'Bearer fake-token', ); @@ -156,36 +174,88 @@ describe('PermissionIntegrationClient', () => { ); await expect( - client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }), + client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]), ).rejects.toThrowError(/401/i); }); it('should reject invalid responses', async () => { mockApplyConditionsHandler.mockImplementationOnce( (_req, res, { json }: RestContext) => { - return res(json({ outcome: AuthorizeResult.ALLOW })); + return res( + json({ items: [{ id: '123', outcome: AuthorizeResult.ALLOW }] }), + ); }, ); await expect( - client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: mockConditions, - }), + client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]), ).rejects.toThrowError(/invalid input/i); }); + + it('should batch requests to plugin backends', async () => { + mockApplyConditionsHandler.mockImplementationOnce( + (_req, res, { json }: RestContext) => { + return res( + json({ + items: [ + { id: '123', result: AuthorizeResult.ALLOW }, + { id: '456', result: AuthorizeResult.DENY }, + { id: '789', result: AuthorizeResult.ALLOW }, + ], + }), + ); + }, + ); + + await expect( + client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + { + id: '456', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + { + id: '789', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: mockConditions, + }, + ]), + ).resolves.toEqual([ + { id: '123', result: AuthorizeResult.ALLOW }, + { id: '456', result: AuthorizeResult.DENY }, + { id: '789', result: AuthorizeResult.ALLOW }, + ]); + + expect(mockApplyConditionsHandler).toHaveBeenCalledTimes(1); + }); }); describe('integration with @backstage/plugin-permission-node', () => { let server: Server; let client: PermissionIntegrationClient; + let routerSpy: RequestHandler; beforeAll(async () => { const router = Router(); @@ -193,7 +263,10 @@ describe('PermissionIntegrationClient', () => { router.use( createPermissionIntegrationRouter({ resourceType: 'test-resource', - getResource: async resourceRef => ({ id: resourceRef }), + getResources: async resourceRefs => + resourceRefs.map(resourceRef => ({ + id: resourceRef, + })), rules: [ { name: 'RULE_1', @@ -217,7 +290,9 @@ describe('PermissionIntegrationClient', () => { const app = express(); - app.use('/test-plugin', router); + routerSpy = jest.fn(router); + + app.use('/plugin-1', routerSpy); await new Promise(resolve => { server = app.listen(resolve); @@ -252,41 +327,45 @@ describe('PermissionIntegrationClient', () => { it('works for simple conditions', async () => { await expect( - client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: { rule: 'RULE_1', params: ['no'] }, - }), - ).resolves.toEqual({ result: AuthorizeResult.DENY }); + client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: { rule: 'RULE_1', params: ['no'] }, + }, + ]), + ).resolves.toEqual([{ id: '123', result: AuthorizeResult.DENY }]); }); it('works for complex criteria', async () => { await expect( - client.applyConditions({ - pluginId: 'test-plugin', - resourceRef: 'testResource1', - resourceType: 'test-resource', - conditions: { - allOf: [ - { - allOf: [ - { rule: 'RULE_1', params: ['yes'] }, - { not: { rule: 'RULE_2', params: ['no'] } }, - ], - }, - { - not: { + client.applyConditions('plugin-1', [ + { + id: '123', + resourceRef: 'testResource1', + resourceType: 'test-resource', + conditions: { + allOf: [ + { allOf: [ - { rule: 'RULE_1', params: ['no'] }, - { rule: 'RULE_2', params: ['yes'] }, + { rule: 'RULE_1', params: ['yes'] }, + { not: { rule: 'RULE_2', params: ['no'] } }, ], }, - }, - ], + { + not: { + allOf: [ + { rule: 'RULE_1', params: ['no'] }, + { rule: 'RULE_2', params: ['yes'] }, + ], + }, + }, + ], + }, }, - }), - ).resolves.toEqual({ result: AuthorizeResult.ALLOW }); + ]), + ).resolves.toEqual([{ id: '123', result: AuthorizeResult.ALLOW }]); }); }); }); diff --git a/plugins/permission-backend/src/service/PermissionIntegrationClient.ts b/plugins/permission-backend/src/service/PermissionIntegrationClient.ts index de42a7f194..2b2161ee71 100644 --- a/plugins/permission-backend/src/service/PermissionIntegrationClient.ts +++ b/plugins/permission-backend/src/service/PermissionIntegrationClient.ts @@ -17,20 +17,28 @@ import fetch from 'node-fetch'; import { z } from 'zod'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; +import { AuthorizeResult } from '@backstage/plugin-permission-common'; import { - AuthorizeResult, - PermissionCondition, - PermissionCriteria, -} from '@backstage/plugin-permission-common'; -import { - ApplyConditionsRequest, - ApplyConditionsResponse, + ApplyConditionsRequestEntry, + ApplyConditionsResponseEntry, + ConditionalPolicyDecision, } from '@backstage/plugin-permission-node'; const responseSchema = z.object({ - result: z.literal(AuthorizeResult.ALLOW).or(z.literal(AuthorizeResult.DENY)), + items: z.array( + z.object({ + id: z.string(), + result: z + .literal(AuthorizeResult.ALLOW) + .or(z.literal(AuthorizeResult.DENY)), + }), + ), }); +export type ResourcePolicyDecision = ConditionalPolicyDecision & { + resourceRef: string; +}; + export class PermissionIntegrationClient { private readonly discovery: PluginEndpointDiscovery; @@ -39,32 +47,26 @@ export class PermissionIntegrationClient { } async applyConditions( - { - pluginId, - resourceRef, - resourceType, - conditions, - }: { - resourceRef: string; - pluginId: string; - resourceType: string; - conditions: PermissionCriteria; - }, + pluginId: string, + decisions: readonly ApplyConditionsRequestEntry[], authHeader?: string, - ): Promise { + ): Promise { const endpoint = `${await this.discovery.getBaseUrl( pluginId, )}/.well-known/backstage/permissions/apply-conditions`; - const request: ApplyConditionsRequest = { - resourceRef, - resourceType, - conditions, - }; - const response = await fetch(endpoint, { method: 'POST', - body: JSON.stringify(request), + body: JSON.stringify({ + items: decisions.map( + ({ id, resourceRef, resourceType, conditions }) => ({ + id, + resourceRef, + resourceType, + conditions, + }), + ), + }), headers: { ...(authHeader ? { authorization: authHeader } : {}), 'content-type': 'application/json', @@ -77,6 +79,8 @@ export class PermissionIntegrationClient { ); } - return responseSchema.parse(await response.json()); + const result = responseSchema.parse(await response.json()); + + return result.items; } } diff --git a/plugins/permission-backend/src/service/router.test.ts b/plugins/permission-backend/src/service/router.test.ts index 26fa7ef8a6..971cb6a223 100644 --- a/plugins/permission-backend/src/service/router.test.ts +++ b/plugins/permission-backend/src/service/router.test.ts @@ -19,14 +19,30 @@ import request from 'supertest'; import { getVoidLogger } from '@backstage/backend-common'; import { IdentityClient } from '@backstage/plugin-auth-backend'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; -import { ApplyConditionsResponse } from '@backstage/plugin-permission-node'; +import { + ApplyConditionsRequestEntry, + ApplyConditionsResponseEntry, +} from '@backstage/plugin-permission-node'; import { PermissionIntegrationClient } from './PermissionIntegrationClient'; import { createRouter } from './router'; const mockApplyConditions: jest.MockedFunction< InstanceType['applyConditions'] -> = jest.fn(); +> = jest.fn( + async ( + _pluginId: string, + decisions: readonly ApplyConditionsRequestEntry[], + ) => + decisions.map(decision => ({ + id: decision.id, + result: + (decision.conditions as any).params[0] === 'yes' + ? (AuthorizeResult.ALLOW as const) + : (AuthorizeResult.DENY as const), + })), +); + jest.mock('./PermissionIntegrationClient', () => ({ PermissionIntegrationClient: jest.fn(() => ({ applyConditions: mockApplyConditions, @@ -34,7 +50,7 @@ jest.mock('./PermissionIntegrationClient', () => ({ })); const policy = { - handle: jest.fn().mockImplementation((_req, identity) => { + handle: jest.fn().mockImplementation(async (_req, identity) => { if (identity) { return { result: AuthorizeResult.ALLOW }; } @@ -70,6 +86,10 @@ describe('createRouter', () => { app = express().use(router); }); + afterEach(() => { + jest.clearAllMocks(); + }); + describe('GET /health', () => { it('returns ok', async () => { const response = await request(app).get('/health'); @@ -158,18 +178,14 @@ describe('createRouter', () => { }); describe('conditional policy result', () => { - beforeEach(() => { - policy.handle.mockReturnValueOnce({ + it('returns conditions if no resourceRef is supplied', async () => { + policy.handle.mockResolvedValueOnce({ result: AuthorizeResult.CONDITIONAL, pluginId: 'test-plugin', resourceType: 'test-resource-1', - conditions: { - anyOf: [{ rule: 'test-rule', params: ['abc'] }], - }, + conditions: { rule: 'test-rule', params: ['abc'] }, }); - }); - it('returns conditions if no resourceRef is supplied', async () => { const response = await request(app) .post('/authorize') .send([ @@ -188,21 +204,399 @@ describe('createRouter', () => { { id: '123', result: AuthorizeResult.CONDITIONAL, - conditions: { anyOf: [{ rule: 'test-rule', params: ['abc'] }] }, + pluginId: 'test-plugin', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['abc'] }, }, ]); }); - it.each([ - AuthorizeResult.ALLOW, - AuthorizeResult.DENY, + it('makes separate batched requests to multiple plugin backends', async () => { + policy.handle + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-2', + resourceType: 'test-resource-2', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['no'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-2', + resourceType: 'test-resource-2', + conditions: { rule: 'test-rule', params: ['no'] }, + }); + + const response = await request(app) + .post('/authorize') + .auth('test-token', { type: 'bearer' }) + .send([ + { + id: '123', + permission: { + name: 'test.permission.1', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:1', + }, + { + id: '234', + permission: { + name: 'test.permission.2', + resourceType: 'test-resource-2', + attributes: {}, + }, + resourceRef: 'resource:2', + }, + { + id: '345', + permission: { + name: 'test.permission.3', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:3', + }, + { + id: '456', + permission: { + name: 'test.permission.4', + resourceType: 'test-resource-2', + attributes: {}, + }, + resourceRef: 'resource:4', + }, + ]); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-1', + [ + expect.objectContaining({ + id: '123', + resourceType: 'test-resource-1', + resourceRef: 'resource:1', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + expect.objectContaining({ + id: '345', + resourceType: 'test-resource-1', + resourceRef: 'resource:3', + conditions: { rule: 'test-rule', params: ['no'] }, + }), + ], + 'Bearer test-token', + ); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-2', + [ + expect.objectContaining({ + id: '234', + resourceType: 'test-resource-2', + resourceRef: 'resource:2', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + expect.objectContaining({ + id: '456', + resourceType: 'test-resource-2', + resourceRef: 'resource:4', + conditions: { rule: 'test-rule', params: ['no'] }, + }), + ], + 'Bearer test-token', + ); + + expect(response.status).toEqual(200); + expect(response.body).toEqual([ + { id: '123', result: AuthorizeResult.ALLOW }, + { id: '234', result: AuthorizeResult.ALLOW }, + { id: '345', result: AuthorizeResult.DENY }, + { id: '456', result: AuthorizeResult.DENY }, + ]); + }); + + it('leaves definitive results unchanged', async () => { + policy.handle + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['no'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-2', + resourceType: 'test-resource-2', + conditions: { rule: 'test-rule', params: ['no'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.ALLOW, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-2', + resourceType: 'test-resource-2', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.DENY, + }); + + const response = await request(app) + .post('/authorize') + .auth('test-token', { type: 'bearer' }) + .send([ + { + id: '123', + permission: { + name: 'test.permission.1', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:1', + }, + { + id: '234', + permission: { + name: 'test.permission.2', + resourceType: 'test-resource-2', + attributes: {}, + }, + resourceRef: 'resource:2', + }, + { + id: '345', + permission: { + name: 'test.permission.3', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:3', + }, + { + id: '456', + permission: { + name: 'test.permission.4', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:4', + }, + { + id: '567', + permission: { + name: 'test.permission.5', + resourceType: 'test-resource-2', + attributes: {}, + }, + resourceRef: 'resource:5', + }, + { + id: '678', + permission: { + name: 'test.permission.6', + attributes: {}, + }, + }, + ]); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-1', + [ + expect.objectContaining({ + id: '123', + resourceType: 'test-resource-1', + resourceRef: 'resource:1', + conditions: { rule: 'test-rule', params: ['no'] }, + }), + expect.objectContaining({ + id: '456', + resourceType: 'test-resource-1', + resourceRef: 'resource:4', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + ], + 'Bearer test-token', + ); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-2', + [ + expect.objectContaining({ + id: '234', + resourceType: 'test-resource-2', + resourceRef: 'resource:2', + conditions: { rule: 'test-rule', params: ['no'] }, + }), + expect.objectContaining({ + id: '567', + resourceType: 'test-resource-2', + resourceRef: 'resource:5', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + ], + 'Bearer test-token', + ); + + expect(response.status).toEqual(200); + expect(response.body).toEqual([ + { id: '123', result: AuthorizeResult.DENY }, + { id: '234', result: AuthorizeResult.DENY }, + { id: '345', result: AuthorizeResult.ALLOW }, + { id: '456', result: AuthorizeResult.ALLOW }, + { id: '567', result: AuthorizeResult.ALLOW }, + { id: '678', result: AuthorizeResult.DENY }, + ]); + }); + + it('leaves conditional results without resourceRefs unchanged', async () => { + policy.handle + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-2', + resourceType: 'test-resource-2', + conditions: { rule: 'test-rule', params: ['yes'] }, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.ALLOW, + }) + .mockResolvedValueOnce({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['abc'] }, + }); + + const response = await request(app) + .post('/authorize') + .auth('test-token', { type: 'bearer' }) + .send([ + { + id: '123', + permission: { + name: 'test.permission.1', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:1', + }, + { + id: '234', + permission: { + name: 'test.permission.2', + resourceType: 'test-resource-2', + attributes: {}, + }, + resourceRef: 'resource:2', + }, + { + id: '345', + permission: { + name: 'test.permission.3', + resourceType: 'test-resource-1', + attributes: {}, + }, + resourceRef: 'resource:3', + }, + { + id: '456', + permission: { + name: 'test.permission.4', + resourceType: 'test-resource-1', + attributes: {}, + }, + }, + ]); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-1', + [ + expect.objectContaining({ + id: '123', + resourceType: 'test-resource-1', + resourceRef: 'resource:1', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + ], + 'Bearer test-token', + ); + + expect(mockApplyConditions).toHaveBeenCalledWith( + 'plugin-2', + [ + expect.objectContaining({ + id: '234', + resourceType: 'test-resource-2', + resourceRef: 'resource:2', + conditions: { rule: 'test-rule', params: ['yes'] }, + }), + ], + 'Bearer test-token', + ); + + expect(response.status).toEqual(200); + expect(response.body).toEqual([ + { id: '123', result: AuthorizeResult.ALLOW }, + { id: '234', result: AuthorizeResult.ALLOW }, + { id: '345', result: AuthorizeResult.ALLOW }, + { + id: '456', + result: AuthorizeResult.CONDITIONAL, + pluginId: 'plugin-1', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params: ['abc'] }, + }, + ]); + }); + + it.each<[ApplyConditionsResponseEntry['result'], string]>([ + [AuthorizeResult.ALLOW, 'yes'], + [AuthorizeResult.DENY, 'no'], ])( 'applies conditions and returns %s if resourceRef is supplied', - async result => { - mockApplyConditions.mockResolvedValueOnce({ - result, + async (result, params) => { + policy.handle.mockResolvedValue({ + result: AuthorizeResult.CONDITIONAL, + pluginId: 'test-plugin', + resourceType: 'test-resource-1', + conditions: { rule: 'test-rule', params }, }); + mockApplyConditions.mockResolvedValueOnce([ + { + id: '123', + result, + }, + { + id: '234', + result, + }, + ]); + const response = await request(app) .post('/authorize') .auth('test-token', { type: 'bearer' }) @@ -216,15 +610,33 @@ describe('createRouter', () => { attributes: {}, }, }, + { + id: '234', + resourceRef: 'test/resource', + permission: { + name: 'test.permission', + resourceType: 'test-resource-1', + attributes: {}, + }, + }, ]); expect(mockApplyConditions).toHaveBeenCalledWith( - { - pluginId: 'test-plugin', - resourceType: 'test-resource-1', - resourceRef: 'test/resource', - conditions: { anyOf: [{ rule: 'test-rule', params: ['abc'] }] }, - }, + 'test-plugin', + [ + expect.objectContaining({ + id: '123', + resourceType: 'test-resource-1', + resourceRef: 'test/resource', + conditions: { rule: 'test-rule', params }, + }), + expect.objectContaining({ + id: '234', + resourceType: 'test-resource-1', + resourceRef: 'test/resource', + conditions: { rule: 'test-rule', params }, + }), + ], 'Bearer test-token', ); @@ -234,6 +646,10 @@ describe('createRouter', () => { id: '123', result, }, + { + id: '234', + result, + }, ]); }, ); @@ -247,10 +663,10 @@ describe('createRouter', () => { [{ id: '123' }], [{ id: '123', permission: { name: 'test.permission' } }], [{ id: '123', permission: { attributes: { invalid: 'attribute' } } }], - ])('returns a 500 error for invalid request %#', async requestBody => { + ])('returns a 400 error for invalid request %#', async requestBody => { const response = await request(app).post('/authorize').send(requestBody); - expect(response.status).toEqual(500); + expect(response.status).toEqual(400); expect(response.body).toEqual( expect.objectContaining({ error: expect.objectContaining({ @@ -261,7 +677,7 @@ describe('createRouter', () => { }); it('returns a 500 error if the policy returns a different resourceType', async () => { - policy.handle.mockReturnValueOnce({ + policy.handle.mockResolvedValueOnce({ result: AuthorizeResult.CONDITIONAL, pluginId: 'test-plugin', resourceType: 'test-resource-2', diff --git a/plugins/permission-backend/src/service/router.ts b/plugins/permission-backend/src/service/router.ts index 41791b8fc8..58438afbb5 100644 --- a/plugins/permission-backend/src/service/router.ts +++ b/plugins/permission-backend/src/service/router.ts @@ -22,6 +22,7 @@ import { errorHandler, PluginEndpointDiscovery, } from '@backstage/backend-common'; +import { InputError } from '@backstage/errors'; import { BackstageIdentityResponse, IdentityClient, @@ -32,8 +33,14 @@ import { AuthorizeRequest, Identified, } from '@backstage/plugin-permission-common'; -import { PermissionPolicy } from '@backstage/plugin-permission-node'; +import { + ApplyConditionsRequestEntry, + ApplyConditionsResponseEntry, + PermissionPolicy, +} from '@backstage/plugin-permission-node'; import { PermissionIntegrationClient } from './PermissionIntegrationClient'; +import { memoize } from 'lodash'; +import DataLoader from 'dataloader'; const requestSchema: z.ZodSchema[]> = z.array( z.object({ @@ -70,45 +77,52 @@ export interface RouterOptions { } const handleRequest = async ( - { id, resourceRef, ...request }: Identified, + requests: Identified[], user: BackstageIdentityResponse | undefined, policy: PermissionPolicy, permissionIntegrationClient: PermissionIntegrationClient, authHeader?: string, -): Promise> => { - const response = await policy.handle(request, user); +): Promise[]> => { + const applyConditionsLoaderFor = memoize((pluginId: string) => { + return new DataLoader< + ApplyConditionsRequestEntry, + ApplyConditionsResponseEntry + >(batch => + permissionIntegrationClient.applyConditions(pluginId, batch, authHeader), + ); + }); - if (response.result === AuthorizeResult.CONDITIONAL) { - // Sanity check that any resource provided matches the one expected by the permission - if (request.permission.resourceType !== response.resourceType) { - throw new Error( - `Invalid resource conditions returned from permission policy for permission ${request.permission.name}`, - ); - } + return Promise.all( + requests.map(({ id, resourceRef, ...request }) => + policy.handle(request, user).then(decision => { + if (decision.result !== AuthorizeResult.CONDITIONAL) { + return { + id, + ...decision, + }; + } - if (resourceRef) { - return { - id, - ...(await permissionIntegrationClient.applyConditions( - { - resourceRef, - pluginId: response.pluginId, - resourceType: response.resourceType, - conditions: response.conditions, - }, - authHeader, - )), - }; - } + if (decision.resourceType !== request.permission.resourceType) { + throw new Error( + `Invalid resource conditions returned from permission policy for permission ${request.permission.name}`, + ); + } - return { - id, - result: AuthorizeResult.CONDITIONAL, - conditions: response.conditions, - }; - } + if (!resourceRef) { + return { + id, + ...decision, + }; + } - return { id, ...response }; + return applyConditionsLoaderFor(decision.pluginId).load({ + id, + resourceRef, + ...decision, + }); + }), + ), + ); }; /** @@ -142,24 +156,27 @@ export async function createRouter( const token = IdentityClient.getBearerToken(req.header('authorization')); const user = token ? await identity.authenticate(token) : undefined; - const body = requestSchema.parse(req.body); + const parseResult = requestSchema.safeParse(req.body); + + if (!parseResult.success) { + throw new InputError(parseResult.error.toString()); + } + + const body = parseResult.data; res.json( - await Promise.all( - body.map(request => - handleRequest( - request, - user, - policy, - permissionIntegrationClient, - req.header('authorization'), - ), - ), + await handleRequest( + body, + user, + policy, + permissionIntegrationClient, + req.header('authorization'), ), ); }, ); router.use(errorHandler()); + return router; } diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index 628ab685e0..fbf56d830f 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-common +## 0.3.1 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/errors@0.2.0 + ## 0.3.0 ### Minor Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index fc6529d0d1..5722ba11b9 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-common", "description": "Isomorphic types and client for Backstage permissions and authorization", - "version": "0.3.0", + "version": "0.3.1", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { @@ -38,14 +38,14 @@ "url": "https://github.com/backstage/backstage/issues" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", "cross-fetch": "^3.0.6", "uuid": "^8.0.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "msw": "^0.35.0" } diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 377b48f45e..807efc1b59 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-permission-node +## 0.3.0 + +### Minor Changes + +- 419ca637c0: Optimizations to the integration between the permission backend and plugin-backends using createPermissionIntegrationRouter: + + - The permission backend already supported batched requests to authorize, but would make calls to plugin backend to apply conditions serially. Now, after applying the policy for each authorization request, the permission backend makes a single batched /apply-conditions request to each plugin backend referenced in policy decisions. + - The `getResource` method accepted by `createPermissionIntegrationRouter` has been replaced with `getResources`, to allow consumers to make batch requests to upstream data stores. When /apply-conditions is called with a batch of requests, all required resources are requested in a single invocation of `getResources`. + + Plugin owners consuming `createPermissionIntegrationRouter` should replace the `getResource` method in the options with a `getResources` method, accepting an array of resourceRefs, and returning an array of the corresponding resources. + +### Patch Changes + +- 9db1b86f32: Add helpers for creating PermissionRules with inferred types +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-auth-backend@0.6.2 + - @backstage/errors@0.2.0 + - @backstage/plugin-permission-common@0.3.1 + ## 0.2.3 ### Patch Changes diff --git a/plugins/permission-node/api-report.md b/plugins/permission-node/api-report.md index e743f18311..71685c59b1 100644 --- a/plugins/permission-node/api-report.md +++ b/plugins/permission-node/api-report.md @@ -9,25 +9,34 @@ import { AuthorizeResponse } from '@backstage/plugin-permission-common'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; import { BackstageIdentityResponse } from '@backstage/plugin-auth-backend'; import { Config } from '@backstage/config'; +import express from 'express'; +import { Identified } from '@backstage/plugin-permission-common'; import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; import { PermissionCondition } from '@backstage/plugin-permission-common'; import { PermissionCriteria } from '@backstage/plugin-permission-common'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; -import { Router } from 'express'; import { TokenManager } from '@backstage/backend-common'; // @public export type ApplyConditionsRequest = { - resourceRef: string; - resourceType: string; - conditions: PermissionCriteria; + items: ApplyConditionsRequestEntry[]; }; +// @public +export type ApplyConditionsRequestEntry = Identified<{ + resourceRef: string; + resourceType: string; + conditions: PermissionCriteria; +}>; + // @public export type ApplyConditionsResponse = { - result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; + items: ApplyConditionsResponseEntry[]; }; +// @public +export type ApplyConditionsResponseEntry = Identified; + // @public export type Condition = TRule extends PermissionRule< any, @@ -92,8 +101,8 @@ export const createConditionTransformer: < export const createPermissionIntegrationRouter: (options: { resourceType: string; rules: PermissionRule[]; - getResource: (resourceRef: string) => Promise; -}) => Router; + getResources: (resourceRefs: string[]) => Promise<(TResource | undefined)[]>; +}) => express.Router; // @public export const createPermissionRule: < @@ -104,6 +113,11 @@ export const createPermissionRule: < rule: PermissionRule, ) => PermissionRule; +// @public +export type DefinitivePolicyDecision = { + result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; +}; + // @public export const makeCreatePermissionRule: () => < TParams extends unknown[], @@ -137,9 +151,7 @@ export type PolicyAuthorizeRequest = Omit; // @public export type PolicyDecision = - | { - result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; - } + | DefinitivePolicyDecision | ConditionalPolicyDecision; // @public diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 55f955110e..a492c99006 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.2.3", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,16 +29,18 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/config": "^0.1.11", - "@backstage/plugin-auth-backend": "^0.6.0", - "@backstage/plugin-permission-common": "^0.3.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-auth-backend": "^0.6.2", + "@backstage/plugin-permission-common": "^0.3.1", "@types/express": "^4.17.6", "express": "^4.17.1", + "express-promise-router": "^4.1.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/permission-node/src/integration/createPermissionIntegrationRouter.test.ts b/plugins/permission-node/src/integration/createPermissionIntegrationRouter.test.ts index 15c9cf4003..065c30a978 100644 --- a/plugins/permission-node/src/integration/createPermissionIntegrationRouter.test.ts +++ b/plugins/permission-node/src/integration/createPermissionIntegrationRouter.test.ts @@ -16,15 +16,13 @@ import { AuthorizeResult } from '@backstage/plugin-permission-common'; import express, { Express, Router } from 'express'; -import request from 'supertest'; +import request, { Response } from 'supertest'; import { createPermissionIntegrationRouter } from './createPermissionIntegrationRouter'; -const mockGetResource: jest.MockedFunction< - (resourceRef: string) => Promise -> = jest.fn((resourceRef: string) => - Promise.resolve({ - resourceRef, - }), +const mockGetResources: jest.MockedFunction< + Parameters[0]['getResources'] +> = jest.fn(async resourceRefs => + resourceRefs.map(resourceRef => ({ id: resourceRef })), ); const testRule1 = { @@ -47,16 +45,20 @@ describe('createPermissionIntegrationRouter', () => { let app: Express; let router: Router; - beforeEach(() => { + beforeAll(() => { router = createPermissionIntegrationRouter({ resourceType: 'test-resource', - getResource: mockGetResource, + getResources: mockGetResources, rules: [testRule1, testRule2], }); app = express().use(router); }); + afterEach(() => { + jest.clearAllMocks(); + }); + it('works', async () => { expect(router).toBeDefined(); }); @@ -70,7 +72,6 @@ describe('createPermissionIntegrationRouter', () => { { rule: 'test-rule-2', params: [{}] }, ], }, - { not: { rule: 'test-rule-2', params: [{}] }, }, @@ -96,13 +97,25 @@ describe('createPermissionIntegrationRouter', () => { const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send({ - resourceRef: 'default:test/resource', - resourceType: 'test-resource', - conditions, + items: [ + { + id: '123', + resourceRef: 'default:test/resource', + resourceType: 'test-resource', + conditions, + }, + ], }); expect(response.status).toEqual(200); - expect(response.body).toEqual({ result: AuthorizeResult.ALLOW }); + expect(response.body).toEqual({ + items: [ + { + id: '123', + result: AuthorizeResult.ALLOW, + }, + ], + }); }); it.each([ @@ -137,74 +150,237 @@ describe('createPermissionIntegrationRouter', () => { const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send({ - resourceRef: 'default:test/resource', - resourceType: 'test-resource', - conditions, + items: [ + { + id: '123', + resourceRef: 'default:test/resource', + resourceType: 'test-resource', + conditions, + }, + ], }); expect(response.status).toEqual(200); - expect(response.body).toEqual({ result: AuthorizeResult.DENY }); + expect(response.body).toEqual({ + items: [{ id: '123', result: AuthorizeResult.DENY }], + }); }, ); + describe('batched requests', () => { + let response: Response; + + beforeEach(async () => { + response = await request(app) + .post('/.well-known/backstage/permissions/apply-conditions') + .send({ + items: [ + { + id: '123', + resourceRef: 'default:test/resource-1', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-1', params: [] }, + }, + { + id: '234', + resourceRef: 'default:test/resource-1', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-2', params: [] }, + }, + { + id: '345', + resourceRef: 'default:test/resource-2', + resourceType: 'test-resource', + conditions: { not: { rule: 'test-rule-1', params: [] } }, + }, + { + id: '456', + resourceRef: 'default:test/resource-3', + resourceType: 'test-resource', + conditions: { not: { rule: 'test-rule-2', params: [] } }, + }, + { + id: '567', + resourceRef: 'default:test/resource-4', + resourceType: 'test-resource', + conditions: { + anyOf: [ + { rule: 'test-rule-1', params: [] }, + { rule: 'test-rule-2', params: [] }, + ], + }, + }, + ], + }); + }); + + it('processes batched requests', () => { + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + items: [ + { id: '123', result: AuthorizeResult.ALLOW }, + { id: '234', result: AuthorizeResult.DENY }, + { id: '345', result: AuthorizeResult.DENY }, + { id: '456', result: AuthorizeResult.ALLOW }, + { id: '567', result: AuthorizeResult.ALLOW }, + ], + }); + }); + + it('calls getResources for all required resources at once', () => { + expect(mockGetResources).toHaveBeenCalledWith([ + 'default:test/resource-1', + 'default:test/resource-2', + 'default:test/resource-3', + 'default:test/resource-4', + ]); + }); + }); + it('returns 400 when called with incorrect resource type', async () => { const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send({ - resourceRef: 'default:test/resource', - resourceType: 'test-incorrect-resource', - conditions: { - anyOf: [], - }, + items: [ + { + id: '123', + resourceRef: 'default:test/resource-1', + resourceType: 'test-incorrect-resource-1', + conditions: { + anyOf: [], + }, + }, + { + id: '234', + resourceRef: 'default:test/resource-2', + resourceType: 'test-resource', + conditions: { + anyOf: [], + }, + }, + { + id: '345', + resourceRef: 'default:test/resource-3', + resourceType: 'test-incorrect-resource-2', + conditions: { + anyOf: [], + }, + }, + ], }); expect(response.status).toEqual(400); expect(response.error && response.error.text).toMatch( - /unexpected resource type: test-incorrect-resource/i, + /unexpected resource types: test-incorrect-resource-1, test-incorrect-resource-2/i, ); }); - it('returns 400 when resource is not found', async () => { - mockGetResource.mockReturnValueOnce(Promise.resolve(undefined)); + it('returns 200/DENY when resource is not found', async () => { + mockGetResources.mockImplementationOnce(async resourceRefs => + resourceRefs.map(() => undefined), + ); const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send({ - resourceRef: 'default:test/resource', - resourceType: 'test-resource', - conditions: { - not: { - rule: 'testRule1', - params: ['a', 1], + items: [ + { + id: '123', + resourceRef: 'default:test/resource', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-1', params: [] }, }, - }, + ], }); - expect(response.status).toEqual(400); - expect(response.error && response.error.text).toMatch( - /resource for ref default:test\/resource not found/i, + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + items: [ + { + id: '123', + result: AuthorizeResult.DENY, + }, + ], + }); + }); + + it('interleaves responses for present and missing resources', async () => { + mockGetResources.mockImplementationOnce(async resourceRefs => + resourceRefs.map(resourceRef => + resourceRef === 'default:test/missing-resource' + ? undefined + : { id: resourceRef }, + ), ); + + const response = await request(app) + .post('/.well-known/backstage/permissions/apply-conditions') + .send({ + items: [ + { + id: '123', + resourceRef: 'default:test/resource-1', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-1', params: [] }, + }, + { + id: '234', + resourceRef: 'default:test/missing-resource', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-1', params: [] }, + }, + { + id: '345', + resourceRef: 'default:test/resource-2', + resourceType: 'test-resource', + conditions: { rule: 'test-rule-1', params: [] }, + }, + ], + }); + + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + items: [ + { + id: '123', + result: AuthorizeResult.ALLOW, + }, + { + id: '234', + result: AuthorizeResult.DENY, + }, + { + id: '345', + result: AuthorizeResult.ALLOW, + }, + ], + }); }); it.each([ undefined, + '', {}, { resourceType: 'test-resource-type' }, - { resourceRef: 'test/resource-ref' }, + [{ resourceType: 'test-resource-type' }], + { items: [{ resourceType: 'test-resource-type' }] }, + { items: [{ resourceRef: 'test/resource-ref' }] }, { - resourceType: 'test-resource-type', - resourceRef: 'test/resource-ref', + items: [ + { + resourceType: 'test-resource-type', + resourceRef: 'test/resource-ref', + }, + ], }, - { conditions: { anyOf: [] } }, + { items: [{ conditions: { anyOf: [] } }] }, ])(`returns 400 for invalid input %#`, async input => { const response = await request(app) .post('/.well-known/backstage/permissions/apply-conditions') .send(input); expect(response.status).toEqual(400); - expect(response.error && response.error.text).toMatch( - /invalid request body/i, - ); + expect(response.error && response.error.text).toMatch(/invalid/i); }); }); }); diff --git a/plugins/permission-node/src/integration/createPermissionIntegrationRouter.ts b/plugins/permission-node/src/integration/createPermissionIntegrationRouter.ts index b8d3e02a81..1b01660fb0 100644 --- a/plugins/permission-node/src/integration/createPermissionIntegrationRouter.ts +++ b/plugins/permission-node/src/integration/createPermissionIntegrationRouter.ts @@ -14,10 +14,14 @@ * limitations under the License. */ -import express, { Response, Router } from 'express'; +import express, { Response } from 'express'; +import Router from 'express-promise-router'; import { z } from 'zod'; +import { InputError } from '@backstage/errors'; +import { errorHandler } from '@backstage/backend-common'; import { AuthorizeResult, + Identified, PermissionCondition, PermissionCriteria, } from '@backstage/plugin-permission-common'; @@ -28,6 +32,7 @@ import { isNotCriteria, isOrCriteria, } from './util'; +import { DefinitivePolicyDecision } from '../policy/types'; const permissionCriteriaSchema: z.ZodSchema< PermissionCriteria @@ -44,9 +49,14 @@ const permissionCriteriaSchema: z.ZodSchema< ); const applyConditionsRequestSchema = z.object({ - resourceRef: z.string(), - resourceType: z.string(), - conditions: permissionCriteriaSchema, + items: z.array( + z.object({ + id: z.string(), + resourceRef: z.string(), + resourceType: z.string(), + conditions: permissionCriteriaSchema, + }), + ), }); /** @@ -55,10 +65,19 @@ const applyConditionsRequestSchema = z.object({ * * @public */ -export type ApplyConditionsRequest = { +export type ApplyConditionsRequestEntry = Identified<{ resourceRef: string; resourceType: string; conditions: PermissionCriteria; +}>; + +/** + * A batch of {@link ApplyConditionsRequestEntry} objects. + * + * @public + */ +export type ApplyConditionsRequest = { + items: ApplyConditionsRequestEntry[]; }; /** @@ -67,15 +86,29 @@ export type ApplyConditionsRequest = { * * @public */ +export type ApplyConditionsResponseEntry = Identified; + +/** + * A batch of {@link ApplyConditionsResponseEntry} objects. + * + * @public + */ export type ApplyConditionsResponse = { - result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; + items: ApplyConditionsResponseEntry[]; }; const applyConditions = ( criteria: PermissionCriteria, - resource: TResource, + resource: TResource | undefined, getRule: (name: string) => PermissionRule, ): boolean => { + // If resource was not found, deny. This avoids leaking information from the + // apply-conditions API which would allow a user to differentiate between + // non-existent resources and resources to which they do not have access. + if (resource === undefined) { + return false; + } + if (isAndCriteria(criteria)) { return criteria.allOf.every(child => applyConditions(child, resource, getRule), @@ -92,84 +125,107 @@ const applyConditions = ( }; /** - * Create an express Router which provides an authorization route to allow integration between the - * permission backend and other Backstage backend plugins. Plugin owners that wish to support - * conditional authorization for their resources should add the router created by this function - * to their express app inside their `createRouter` implementation. + * Create an express Router which provides an authorization route to allow + * integration between the permission backend and other Backstage backend + * plugins. Plugin owners that wish to support conditional authorization for + * their resources should add the router created by this function to their + * express app inside their `createRouter` implementation. * * @remarks * - * To make this concrete, we can use the Backstage software catalog as an example. The catalog has - * conditional rules around access to specific _entities_ in the catalog. The _type_ of resource is - * captured here as `resourceType`, a string identifier (`catalog-entity` in this example) that can - * be provided with permission definitions. This is merely a _type_ to verify that conditions in an - * authorization policy are constructed correctly, not a reference to a specific resource. + * To make this concrete, we can use the Backstage software catalog as an + * example. The catalog has conditional rules around access to specific + * _entities_ in the catalog. The _type_ of resource is captured here as + * `resourceType`, a string identifier (`catalog-entity` in this example) that + * can be provided with permission definitions. This is merely a _type_ to + * verify that conditions in an authorization policy are constructed correctly, + * not a reference to a specific resource. * - * The `rules` parameter is an array of {@link PermissionRule}s that introduce conditional - * filtering logic for resources; for the catalog, these are things like `isEntityOwner` or - * `hasAnnotation`. Rules describe how to filter a list of resources, and the `conditions` returned - * allow these rules to be applied with specific parameters (such as 'group:default/team-a', or + * The `rules` parameter is an array of {@link PermissionRule}s that introduce + * conditional filtering logic for resources; for the catalog, these are things + * like `isEntityOwner` or `hasAnnotation`. Rules describe how to filter a list + * of resources, and the `conditions` returned allow these rules to be applied + * with specific parameters (such as 'group:default/team-a', or * 'backstage.io/edit-url'). * - * The `getResource` argument should load a resource by reference. For the catalog, this is an - * {@link @backstage/catalog-model#EntityRef}. For other plugins, this can be any serialized format. - * This is used to construct the `createPermissionIntegrationRouter`, a function to add an - * authorization route to your backend plugin. This route will be called by the `permission-backend` - * when authorization conditions relating to this plugin need to be evaluated. + * The `getResources` argument should load resources based on a reference + * identifier. For the catalog, this is an + * {@link @backstage/catalog-model#EntityRef}. For other plugins, this can be + * any serialized format. This is used to construct the + * `createPermissionIntegrationRouter`, a function to add an authorization route + * to your backend plugin. This function will be called by the + * `permission-backend` when authorization conditions relating to this plugin + * need to be evaluated. * * @public */ export const createPermissionIntegrationRouter = (options: { resourceType: string; rules: PermissionRule[]; - getResource: (resourceRef: string) => Promise; -}): Router => { - const { resourceType, rules, getResource } = options; + getResources: ( + resourceRefs: string[], + ) => Promise>; +}): express.Router => { + const { resourceType, rules, getResources } = options; const router = Router(); const getRule = createGetRule(rules); + const assertValidResourceTypes = ( + requests: ApplyConditionsRequestEntry[], + ) => { + const invalidResourceTypes = requests + .filter(request => request.resourceType !== resourceType) + .map(request => request.resourceType); + + if (invalidResourceTypes.length) { + throw new InputError( + `Unexpected resource types: ${invalidResourceTypes.join(', ')}.`, + ); + } + }; + + router.use(express.json()); + router.post( '/.well-known/backstage/permissions/apply-conditions', - express.json(), - async ( - req, - res: Response< - | { - result: Omit; - } - | string - >, - ) => { + async (req, res: Response) => { const parseResult = applyConditionsRequestSchema.safeParse(req.body); if (!parseResult.success) { - return res.status(400).send(`Invalid request body.`); + throw new InputError(parseResult.error.toString()); } - const { data: body } = parseResult; + const body = parseResult.data; - if (body.resourceType !== resourceType) { - return res - .status(400) - .send(`Unexpected resource type: ${body.resourceType}.`); - } + assertValidResourceTypes(body.items); - const resource = await getResource(body.resourceRef); + const resourceRefs = Array.from( + new Set(body.items.map(({ resourceRef }) => resourceRef)), + ); + const resourceArray = await getResources(resourceRefs); + const resources = resourceRefs.reduce((acc, resourceRef, index) => { + acc[resourceRef] = resourceArray[index]; - if (!resource) { - return res - .status(400) - .send(`Resource for ref ${body.resourceRef} not found.`); - } + return acc; + }, {} as Record); return res.status(200).json({ - result: applyConditions(body.conditions, resource, getRule) - ? AuthorizeResult.ALLOW - : AuthorizeResult.DENY, + items: body.items.map(request => ({ + id: request.id, + result: applyConditions( + request.conditions, + resources[request.resourceRef], + getRule, + ) + ? AuthorizeResult.ALLOW + : AuthorizeResult.DENY, + })), }); }, ); + router.use(errorHandler()); + return router; }; diff --git a/plugins/permission-node/src/policy/index.ts b/plugins/permission-node/src/policy/index.ts index c8216989a1..1b05f240d3 100644 --- a/plugins/permission-node/src/policy/index.ts +++ b/plugins/permission-node/src/policy/index.ts @@ -16,6 +16,7 @@ export type { ConditionalPolicyDecision, + DefinitivePolicyDecision, PermissionPolicy, PolicyAuthorizeRequest, PolicyDecision, diff --git a/plugins/permission-node/src/policy/types.ts b/plugins/permission-node/src/policy/types.ts index d122ad8d8d..4c6a033e11 100644 --- a/plugins/permission-node/src/policy/types.ts +++ b/plugins/permission-node/src/policy/types.ts @@ -35,6 +35,19 @@ import { BackstageIdentityResponse } from '@backstage/plugin-auth-backend'; */ export type PolicyAuthorizeRequest = Omit; +/** + * A definitive result to an authorization request, returned by the {@link PermissionPolicy}. + * + * @remarks + * + * This indicates that the policy unconditionally allows (or denies) the request. + * + * @public + */ +export type DefinitivePolicyDecision = { + result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; +}; + /** * A conditional result to an authorization request, returned by the {@link PermissionPolicy}. * @@ -61,7 +74,7 @@ export type ConditionalPolicyDecision = { * @public */ export type PolicyDecision = - | { result: AuthorizeResult.ALLOW | AuthorizeResult.DENY } + | DefinitivePolicyDecision | ConditionalPolicyDecision; /** diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index a5ad489a91..0372c37f4b 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-permission-react +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-permission-common@0.3.1 + ## 0.2.1 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index 23225cbf93..e29157506c 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.2.1", + "version": "0.2.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,9 +27,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.11", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-permission-common": "^0.3.0", + "@backstage/config": "^0.1.12", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-permission-common": "^0.3.1", "cross-fetch": "^3.0.6", "react-router": "6.0.0-beta.0", "react-use": "^17.2.4" @@ -39,8 +39,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/test-utils": "^0.2.0", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@types/jest": "^26.0.7" diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index fea9b93fe3..fdf4d71f36 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -29,8 +29,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/config": "^0.1.8", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -43,7 +43,7 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 5257402661..986d78043b 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/config": "^0.1.10", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", "@types/express": "^4.17.6", "camelcase-keys": "^6.2.2", "compression": "^1.7.4", @@ -48,8 +48,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/supertest": "^2.0.8", "msw": "^0.36.3", "supertest": "^6.1.3" diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index 88d06fde9d..f0ee0c2658 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-rollbar +## 0.3.23 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.3.22 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index baae723318..4c99ba58e3 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.3.22", + "version": "0.3.23", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 52a82025c9..1c4c60d8dd 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/plugin-scaffolder-backend@0.15.20 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 349cda084e..5663c5435a 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.1.7", + "version": "0.1.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,11 +20,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/errors": "^0.1.4", - "@backstage/integration": "^0.7.0", - "@backstage/plugin-scaffolder-backend": "^0.15.19", - "@backstage/config": "^0.1.11", + "@backstage/backend-common": "^0.10.3", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/plugin-scaffolder-backend": "^0.15.20", + "@backstage/config": "^0.1.12", "@backstage/types": "^0.1.1", "command-exists": "^1.2.9", "fs-extra": "10.0.0", @@ -32,7 +32,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 70c35ba33e..7c229c38e4 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/plugin-scaffolder-backend@0.15.20 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 42a910e624..79ad253a6e 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.2.2", + "version": "0.2.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,17 +21,17 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/plugin-scaffolder-backend": "^0.15.19", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.4", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/plugin-scaffolder-backend": "^0.15.20", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@backstage/types": "^0.1.1", "command-exists": "^1.2.9", "fs-extra": "^9.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 1a138a16e0..0903b7a9ab 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-scaffolder-backend +## 0.15.20 + +### Patch Changes + +- 9fbd3b90ae: fix: Register plugin to prioritise Component kind for entityRef +- 451ef0aa07: Fix token pass-through for software templates using beta 3 version +- 5333451def: Cleaned up API exports +- 3b4d8caff6: Allow a GitHubCredentialsProvider to be passed to the GitHub scaffolder tasks actions. +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-catalog-backend@0.20.0 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/plugin-scaffolder-backend-module-cookiecutter@0.1.8 + ## 0.15.19 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 8fb5bdcdab..c497306d71 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "0.15.19", + "version": "0.15.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "build:assets": "node scripts/build-nunjucks.js" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", - "@backstage/plugin-catalog-backend": "^0.19.4", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/plugin-catalog-backend": "^0.20.0", "@backstage/plugin-scaffolder-common": "^0.1.2", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.7", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.8", "@backstage/types": "^0.1.1", "@gitbeaker/core": "^34.6.0", "@gitbeaker/node": "^34.6.0", @@ -73,8 +73,8 @@ "vm2": "^3.9.5" }, "devDependencies": { - "@backstage/cli": "^0.10.4", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index 80644a6739..3d6b89639f 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -36,10 +36,10 @@ "url": "https://github.com/backstage/backstage/issues" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", + "@backstage/catalog-model": "^0.9.9", "@backstage/types": "^0.1.1" }, "devDependencies": { - "@backstage/cli": "^0.10.4" + "@backstage/cli": "^0.11.0" } } diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 429aa3b77e..cc1c85580f 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-scaffolder +## 0.11.18 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + ## 0.11.17 ### Patch Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 6c76010bec..448726ef2f 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "0.11.17", + "version": "0.11.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,15 +31,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", - "@backstage/integration-react": "^0.1.17", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/plugin-scaffolder-common": "^0.1.2", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -67,11 +67,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/plugin-catalog": "^0.7.7", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index d9b478dc3a..b5cf2117b9 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.8", + "@backstage/config": "^0.1.12", "@backstage/search-common": "^0.2.0", "@elastic/elasticsearch": "7.13.0", "@acuris/aws-es-connection": "^2.2.0", @@ -30,8 +30,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/cli": "^0.10.3", + "@backstage/backend-common": "^0.10.3", + "@backstage/cli": "^0.11.0", "@elastic/elasticsearch-mock": "^0.3.0" }, "files": [ diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 79c7619ea4..29b6fae66e 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -20,15 +20,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", + "@backstage/backend-common": "^0.10.3", "@backstage/search-common": "^0.2.0", - "@backstage/plugin-search-backend-node": "^0.4.2", + "@backstage/plugin-search-backend-node": "^0.4.4", "lodash": "^4.17.21", "knex": "^0.95.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.11", - "@backstage/cli": "^0.10.3" + "@backstage/backend-test-utils": "^0.1.13", + "@backstage/cli": "^0.11.0" }, "files": [ "dist", diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index d4f4381f83..9fb673bb4e 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-search-backend-node +## 0.4.4 + +### Patch Changes + +- 5333451def: Cleaned up API exports + ## 0.4.3 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 88d3af13ed..894893232a 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-node", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", - "version": "0.4.3", + "version": "0.4.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,8 +26,8 @@ "@types/lunr": "^2.3.3" }, "devDependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/cli": "^0.10.3" + "@backstage/backend-common": "^0.10.3", + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index c67d1ef047..cb19b14c8a 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", + "@backstage/backend-common": "^0.10.3", "@backstage/search-common": "^0.2.0", - "@backstage/plugin-search-backend-node": "^0.4.2", + "@backstage/plugin-search-backend-node": "^0.4.4", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -30,7 +30,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.3", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 8baec7afa5..8787178093 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search +## 0.5.5 + +### Patch Changes + +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.5.4 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index f4880f86b3..57b349407f 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "0.5.4", + "version": "0.5.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,12 +30,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/search-common": "^0.2.1", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", @@ -52,10 +52,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/search/src/components/SearchModal/SearchModal.test.tsx b/plugins/search/src/components/SearchModal/SearchModal.test.tsx index d3209f9a9b..b59be710de 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.test.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.test.tsx @@ -24,16 +24,10 @@ import { rootRouteRef } from '../../plugin'; import { searchApiRef } from '../../apis'; import { SearchModal } from './SearchModal'; - -jest.mock('../SearchContext', () => ({ - ...jest.requireActual('../SearchContext'), - useSearch: jest.fn().mockReturnValue({ - result: {}, - }), -})); +import { SearchContextProvider } from '../SearchContext'; describe('SearchModal', () => { - const query = jest.fn().mockResolvedValue({}); + const query = jest.fn().mockResolvedValue({ results: [] }); const apiRegistry = TestApiRegistry.from( [configApiRef, new ConfigReader({ app: { title: 'Mock app' } })], @@ -45,7 +39,9 @@ describe('SearchModal', () => { it('Should render the Modal correctly', async () => { await renderInTestApp( - + + + , { mountedRoutes: { @@ -60,7 +56,9 @@ describe('SearchModal', () => { it('Calls toggleModal handler', async () => { await renderInTestApp( - + + + , { mountedRoutes: { diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index e01cac2d53..828fbbf52f 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-sentry +## 0.3.33 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.3.32 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 20bfdf22b0..6ae891a21d 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.3.32", + "version": "0.3.33", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index 1378e08dc3..ac26db7e95 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-shortcuts +## 0.1.19 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.1.18 ### Patch Changes diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index b38d66f6b9..c133c6134e 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.1.18", + "version": "0.1.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@material-ui/core": "^4.12.2", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 0e83dcf0d7..f5eba462af 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sonarqube +## 0.2.12 + +### Patch Changes + +- 3423b3b24d: Enhance token description by highlighting that the trailing colon is required. +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.2.11 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 7523e79779..479daa0948 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.2.11", + "version": "0.2.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,10 +33,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -50,10 +50,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index 20b2171f55..1a36413841 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-splunk-on-call +## 0.3.19 + +### Patch Changes + +- 7612e2856b: Clean up emptystate.svg image, removing wrong white artifact from the background +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/catalog-model@0.9.9 + ## 0.3.18 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index 7f18330d7d..efd429bc69 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.18", + "version": "0.3.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/plugin-catalog-react": "^0.6.10", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,10 +48,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 544bfc3c2b..7666d101e0 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.5 + +### Patch Changes + +- a60eb0f0dd: adding new operation to run checks for multiple entities in one request +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-tech-insights-common@0.2.1 + - @backstage/errors@0.2.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 30f00f4210..914c5bb284 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.4", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/config": "^0.1.8", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-tech-insights-common": "^0.2.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/plugin-tech-insights-node": "^0.1.2", "ajv": "^7.0.3", "json-rules-engine": "^6.1.2", @@ -43,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/node-cron": "^2.0.4" }, "files": [ diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index ccc54f6a84..a4371a9723 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-tech-insights-backend +## 0.1.5 + +### Patch Changes + +- 19f0f93504: Catch errors from a fact retriever and log them. +- 10f26e8883: Modify queries to perform better by filtering on sub-queries as well +- a60eb0f0dd: adding new operation to run checks for multiple entities in one request +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/backend-common@0.10.3 + - @backstage/plugin-tech-insights-common@0.2.1 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.1.4 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index c3c7a33bf1..bf435bbf92 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.1.4", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,12 +31,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.8", - "@backstage/errors": "^0.1.5", - "@backstage/plugin-tech-insights-common": "^0.2.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/plugin-tech-insights-node": "^0.1.2", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -51,8 +51,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.11", - "@backstage/cli": "^0.10.3", + "@backstage/backend-test-utils": "^0.1.13", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "@types/node-cron": "^3.0.0", "@types/semver": "^7.3.8", diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts index 11fd0d29b8..4e9d4c41b2 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts @@ -16,6 +16,7 @@ import { FactRetriever, FactRetrieverContext, + TechInsightFact, TechInsightsStore, } from '@backstage/plugin-tech-insights-node'; import { FactRetrieverRegistry } from './FactRetrieverRegistry'; @@ -108,16 +109,23 @@ export class FactRetrieverEngine { this.logger.info( `Retrieving facts for fact retriever ${factRetriever.id}`, ); - const facts = await factRetriever.handler({ - ...this.factRetrieverContext, - entityFilter: factRetriever.entityFilter, - }); - if (this.logger.isDebugEnabled()) { + + let facts: TechInsightFact[] = []; + try { + facts = await factRetriever.handler({ + ...this.factRetrieverContext, + entityFilter: factRetriever.entityFilter, + }); this.logger.debug( `Retrieved ${facts.length} facts for fact retriever ${ factRetriever.id } in ${duration(startTimestamp)}`, ); + } catch (e) { + this.logger.error( + `Failed to retrieve facts for retriever ${factRetriever.id}`, + e, + ); } try { diff --git a/plugins/tech-insights-common/CHANGELOG.md b/plugins/tech-insights-common/CHANGELOG.md index 9e72ce8ace..947c22756f 100644 --- a/plugins/tech-insights-common/CHANGELOG.md +++ b/plugins/tech-insights-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-tech-insights-common +## 0.2.1 + +### Patch Changes + +- a60eb0f0dd: adding new operation to run checks for multiple entities in one request + ## 0.2.0 ### Minor Changes diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index 7bf668a24e..ce71a63ae8 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-common", - "version": "0.2.0", + "version": "0.2.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "@backstage/types": "^0.1.1" }, "devDependencies": { - "@backstage/cli": "^0.10.0" + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 7fd120d73b..34c13aa57e 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -30,15 +30,15 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.0", - "@backstage/config": "^0.1.8", - "@backstage/plugin-tech-insights-common": "^0.2.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/config": "^0.1.12", + "@backstage/plugin-tech-insights-common": "^0.2.1", "@types/luxon": "^2.0.5", "luxon": "^2.0.2", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.3" + "@backstage/cli": "^0.11.0" }, "files": [ "dist" diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index 47baf0943c..1f630036d4 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-tech-insights +## 0.1.5 + +### Patch Changes + +- 34883f5c9e: Added possibility to pass customized title and description for the scorecards instead of using hardcoded ones. +- a60eb0f0dd: adding new operation to run checks for multiple entities in one request +- 48580d0fbb: fix React warning because of missing `key` prop +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/plugin-tech-insights-common@0.2.1 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.4 ### Patch Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index e6bf9d3947..8310cc5544 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.1.4", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,12 +20,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.6.10", - "@backstage/plugin-tech-insights-common": "^0.2.0", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", + "@backstage/plugin-tech-insights-common": "^0.2.1", "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@material-ui/core": "^4.12.2", @@ -39,10 +39,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index cf7eb04197..e2ecdbfcf9 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-radar +## 0.5.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.5.1 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index 45df565b81..17d5874b88 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.1", + "version": "0.5.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,8 +31,8 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@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.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 256a402a24..ce4557cf80 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-techdocs-backend +## 0.12.3 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/techdocs-common@0.11.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.12.2 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 0d5a86ffc7..0040d2e7e4 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "0.12.2", + "version": "0.12.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,14 +31,14 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.11", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@backstage/search-common": "^0.2.1", - "@backstage/techdocs-common": "^0.11.2", + "@backstage/techdocs-common": "^0.11.3", "@types/express": "^4.17.6", "cross-fetch": "^3.0.6", "dockerode": "^3.3.1", @@ -52,8 +52,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.10.4", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/test-utils": "^0.2.2", "@types/dockerode": "^3.3.0", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index a72c3e3313..4031dfc29d 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-techdocs +## 0.12.14 + +### Patch Changes + +- 5333451def: Cleaned up API exports +- 1628ca3f49: Fix an issue where the TechDocs sidebar is hidden when the Backstage sidebar is pinned at smaller screen sizes +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + - @backstage/integration-react@0.1.18 + - @backstage/plugin-catalog@0.7.8 + - @backstage/plugin-search@0.5.5 + ## 0.12.13 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 300c662225..3d633f5ef3 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "0.12.13", + "version": "0.12.14", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,16 +32,16 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.8", - "@backstage/config": "^0.1.11", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.5", - "@backstage/integration": "^0.7.0", - "@backstage/integration-react": "^0.1.17", - "@backstage/plugin-catalog": "^0.7.7", - "@backstage/plugin-catalog-react": "^0.6.10", - "@backstage/plugin-search": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", + "@backstage/integration-react": "^0.1.18", + "@backstage/plugin-catalog": "^0.7.8", + "@backstage/plugin-catalog-react": "^0.6.11", + "@backstage/plugin-search": "^0.5.5", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -62,10 +62,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^7.0.2", diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index 41ffd3e79d..f70a914ca0 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-todo-backend +## 0.1.18 + +### Patch Changes + +- 2260702efd: Properly exported all referenced types +- Updated dependencies + - @backstage/config@0.1.12 + - @backstage/integration@0.7.1 + - @backstage/backend-common@0.10.3 + - @backstage/errors@0.2.0 + - @backstage/catalog-client@0.5.4 + - @backstage/catalog-model@0.9.9 + ## 0.1.17 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index 7368f69fd8..fb7e3b795f 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo-backend", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", - "version": "0.1.17", + "version": "0.1.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,12 +25,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.10.1", - "@backstage/catalog-client": "^0.5.3", - "@backstage/catalog-model": "^0.9.7", - "@backstage/config": "^0.1.10", - "@backstage/errors": "^0.1.3", - "@backstage/integration": "^0.7.0", + "@backstage/backend-common": "^0.10.3", + "@backstage/catalog-client": "^0.5.4", + "@backstage/catalog-model": "^0.9.9", + "@backstage/config": "^0.1.12", + "@backstage/errors": "^0.2.0", + "@backstage/integration": "^0.7.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -39,7 +39,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.4", + "@backstage/cli": "^0.11.0", "@types/supertest": "^2.0.8", "msw": "^0.35.0", "supertest": "^6.1.3" diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index e5b6723744..4931561fe8 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-todo +## 0.1.18 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/plugin-catalog-react@0.6.11 + - @backstage/errors@0.2.0 + - @backstage/catalog-model@0.9.9 + ## 0.1.17 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 7d06199a64..91f7c7c5b6 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo", "description": "A Backstage plugin that lets you browse TODO comments in your source code", - "version": "0.1.17", + "version": "0.1.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,11 +27,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.9.7", - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.6.8", + "@backstage/catalog-model": "^0.9.9", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", + "@backstage/plugin-catalog-react": "^0.6.11", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index feb61f79e8..31bf596795 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-user-settings +## 0.3.16 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + ## 0.3.15 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index c8fa6d2070..a51caebf10 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.3.15", + "version": "0.3.16", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -44,10 +44,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 7f66a5c224..00b1360490 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-xcmetrics +## 0.2.15 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.8.4 + - @backstage/core-plugin-api@0.5.0 + - @backstage/errors@0.2.0 + ## 0.2.14 ### Patch Changes diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index 333826ba87..f76927cac4 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.14", + "version": "0.2.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core-components": "^0.8.3", - "@backstage/core-plugin-api": "^0.4.1", - "@backstage/errors": "^0.1.3", + "@backstage/core-components": "^0.8.4", + "@backstage/core-plugin-api": "^0.5.0", + "@backstage/errors": "^0.2.0", "@backstage/theme": "^0.2.14", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -37,10 +37,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.10.5", - "@backstage/core-app-api": "^0.3.1", - "@backstage/dev-utils": "^0.2.16", - "@backstage/test-utils": "^0.2.1", + "@backstage/cli": "^0.11.0", + "@backstage/core-app-api": "^0.4.0", + "@backstage/dev-utils": "^0.2.17", + "@backstage/test-utils": "^0.2.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^13.1.8", diff --git a/yarn.lock b/yarn.lock index 128fadbfb3..8f8c08a0e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2160,7 +2160,7 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.11.2", "@babel/runtime-corejs3@^7.14.7": +"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.11.2": version "7.15.3" resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.15.3.tgz#28754263988198f2a928c09733ade2fb4d28089d" integrity sha512-30A3lP+sRL6ml8uhoJSs+8jwpKzbw8CqBvDc1laeptxPm5FahumJxirigcbD2qTs71Sonvj1cyZB0OKGAmxQ+A== @@ -2168,7 +2168,22 @@ core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.6", "@babel/runtime@^7.14.8", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime-corejs3@^7.16.3": + version "7.16.8" + resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz#ea533d96eda6fdc76b1812248e9fbd0c11d4a1a7" + integrity sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg== + dependencies: + core-js-pure "^3.20.2" + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.6", "@babel/runtime@^7.14.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.16.3" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5" + integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3": version "7.16.7" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa" integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ== @@ -2294,6 +2309,43 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@backstage/core-app-api@^0.3.0": + version "0.3.1" + resolved "https://registry.npmjs.org/@backstage/core-app-api/-/core-app-api-0.3.1.tgz#eceee31852908fcc35edf198f4b06424b8cad2c9" + integrity sha512-q0Nm9lNghMMaHWG32MjTkfeHUWMMzDZ5EJIfxwXmizMoO6bmiyMja8sRuQznZHPEP0kzwe3cZwPvwafgY4UU/g== + dependencies: + "@backstage/app-defaults" "^0.1.3" + "@backstage/config" "^0.1.11" + "@backstage/core-components" "^0.8.3" + "@backstage/core-plugin-api" "^0.4.1" + "@backstage/theme" "^0.2.14" + "@backstage/types" "^0.1.1" + "@backstage/version-bridge" "^0.1.1" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@types/prop-types" "^15.7.3" + prop-types "^15.7.2" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + zen-observable "^0.8.15" + zod "^3.11.6" + +"@backstage/core-plugin-api@^0.4.0", "@backstage/core-plugin-api@^0.4.1": + version "0.4.1" + resolved "https://registry.npmjs.org/@backstage/core-plugin-api/-/core-plugin-api-0.4.1.tgz#c0a13504bdfa61ae3d0db96934cd6c32a7574446" + integrity sha512-IIb7XTcquTPaSIlamMKUgeTs5uLqkKN0Nw32QdTZhKgFkFFVzWC0AwN+henkaMNBZFdGb0ttPzrvNXGj5E6dGg== + dependencies: + "@backstage/config" "^0.1.11" + "@backstage/theme" "^0.2.14" + "@backstage/types" "^0.1.1" + "@backstage/version-bridge" "^0.1.1" + "@material-ui/core" "^4.12.2" + history "^5.0.0" + prop-types "^15.7.2" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + zen-observable "^0.8.15" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -5340,12 +5392,11 @@ integrity sha512-8UiDeDbjCImFSfOegGu13otQ7OdP9FOYpcLjeouppnhs+MPeIEAtYS+jCcBKmi3reyTagC15/KVSRhde1wS1vg== "@roadiehq/backstage-plugin-github-insights@^1.4.2": - version "1.4.2" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-1.4.2.tgz#462e2868a1b4cee338032e4715ad797db71ebd22" - integrity sha512-hIGOhzyK1rC3JI+y/yI303whdRJTN4KXCYHekcdchjlTKB31SMU4lER0sBacCyiov1vAl+LkDmdubESSLou/Hw== + version "1.4.3" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-1.4.3.tgz#c83fd94dc7266330b464686c5f283fa07f5f2be9" + integrity sha512-khvXVgp+GTwXULTG4jfzB6uQtzPbjgZhfudE04hc/O3FWU4Wyrcmc/UTTu1nFah7m6yL6pwfEdC3auKXPr07lQ== dependencies: "@backstage/catalog-model" "^0.9.7" - "@backstage/core-app-api" "^0.3.0" "@backstage/core-components" "^0.8.0" "@backstage/core-plugin-api" "^0.4.0" "@backstage/integration-react" "^0.1.10" @@ -8226,10 +8277,10 @@ dependencies: "@types/superagent" "*" -"@types/swagger-ui-react@^3.23.3": - version "3.35.2" - resolved "https://registry.npmjs.org/@types/swagger-ui-react/-/swagger-ui-react-3.35.2.tgz#f362a60a0d71c2da5dc1ab420ed4aa1721e6c8a0" - integrity sha512-HA/1pw5uzn3+3gDX1R50SpzP/3GiqhUZoT5LLl8rhVu1i39Et1acz9ryuzmf5i4PoZNIfLcZYBlIok0P/6qmyA== +"@types/swagger-ui-react@^4.1.1": + version "4.1.1" + resolved "https://registry.npmjs.org/@types/swagger-ui-react/-/swagger-ui-react-4.1.1.tgz#6ae70f5b966941eb6655d79d1114d9b9ef69a980" + integrity sha512-tZqX/nShvNqtJ7WAfwOK7mphK1jqmEre4mUJh+R1RyCFVODsMTG4My2nqjXpSm8NfhVGmbFH3giD17AXmgsaJw== dependencies: "@types/react" "*" @@ -11863,6 +11914,11 @@ core-js-pure@^3.16.0, core-js-pure@^3.6.5, core-js-pure@^3.8.2: resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.16.2.tgz#0ef4b79cabafb251ea86eb7d139b42bd98c533e8" integrity sha512-oxKe64UH049mJqrKkynWp6Vu0Rlm/BTXO/bJZuN2mmR3RtOFNepLlSWDd1eo16PzHpQAoNG97rLU1V/YxesJjw== +core-js-pure@^3.20.2: + version "3.20.2" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz#5d263565f0e34ceeeccdc4422fae3e84ca6b8c0f" + integrity sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg== + core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.10: version "2.6.12" resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" @@ -12661,7 +12717,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -dataloader@2.0.0: +dataloader@2.0.0, dataloader@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz#41eaf123db115987e21ca93c005cd7753c55fe6f" integrity sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ== @@ -13208,7 +13264,7 @@ domhandler@^4.2.0: dependencies: domelementtype "^2.2.0" -dompurify@^2.2.7, dompurify@^2.2.9: +dompurify@=2.3.3, dompurify@^2.2.7, dompurify@^2.2.9: version "2.3.3" resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.3.3.tgz#c1af3eb88be47324432964d8abc75cf4b98d634c" integrity sha512-dqnqRkPMAjOZE0FogZ+ceJNM2dZ3V/yNOuFB7+39qpO93hHhfRpHw3heYQC7DPK9FqbQTfBKUJhiSfz4MvXYwg== @@ -14939,9 +14995,9 @@ fn.name@1.x.x: integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== follow-redirects@^1.0.0, follow-redirects@^1.14.0: - version "1.14.6" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" - integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== + version "1.14.7" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" + integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== for-in@^0.1.3: version "0.1.8" @@ -23127,11 +23183,16 @@ printj@~1.1.0: resolved "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -prismjs@^1.21.0, prismjs@^1.22.0, prismjs@~1.25.0: +prismjs@^1.21.0, prismjs@~1.25.0: version "1.25.0" resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756" integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg== +prismjs@^1.25.0: + version "1.26.0" + resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.26.0.tgz#16881b594828bb6b45296083a8cbab46b0accd47" + integrity sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ== + private@^0.1.8: version "0.1.8" resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -23464,6 +23525,13 @@ qs@^6.10.0, qs@^6.10.1, qs@^6.9.1, qs@^6.9.4, qs@^6.9.6: dependencies: side-channel "^1.0.4" +qs@^6.10.2: + version "6.10.3" + resolved "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.2" resolved "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -23479,11 +23547,6 @@ query-string@^7.0.0: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystring-browser@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/querystring-browser/-/querystring-browser-1.0.4.tgz#f2e35881840a819bc7b1bf597faf0979e6622dc6" - integrity sha1-8uNYgYQKgZvHsb9Zf68JeeZiLcY= - querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -23635,10 +23698,10 @@ react-colorful@^5.1.2: resolved "https://registry.npmjs.org/react-colorful/-/react-colorful-5.2.2.tgz#0a69d0648db47e51359d343854d83d250a742243" integrity sha512-Xdb1Rl6lZ5SMdNBH59eE0lGqR1g2LVD8IgPlw0WeMDrOC65lYI8fgMEwj/0dDpVRVMh5qp73ciISDst/t2O2iQ== -react-copy-to-clipboard@5.0.3: - version "5.0.3" - resolved "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.3.tgz#2a0623b1115a1d8c84144e9434d3342b5af41ab4" - integrity sha512-9S3j+m+UxDZOM0Qb8mhnT/rMR0NGSrj9A/073yz2DSxPMYhmYFBMYIdI2X4o8AjOjyFsSNxDRnCX6s/gRxpriw== +react-copy-to-clipboard@5.0.4: + version "5.0.4" + resolved "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.4.tgz#42ec519b03eb9413b118af92d1780c403a5f19bf" + integrity sha512-IeVAiNVKjSPeGax/Gmkqfa/+PuMTBhutEvFUaMQLwE2tS0EXrAdgOpWDX26bWTXF3HrioorR7lr08NqeYUWQCQ== dependencies: copy-to-clipboard "^3" prop-types "^15.5.8" @@ -23993,15 +24056,15 @@ react-syntax-highlighter@^13.5.3: prismjs "^1.21.0" refractor "^3.1.0" -react-syntax-highlighter@^15.4.3, react-syntax-highlighter@^15.4.4: - version "15.4.4" - resolved "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.4.tgz#dc9043f19e7bd063ff3ea78986d22a6eaa943b2a" - integrity sha512-PsOFHNTzkb3OroXdoR897eKN5EZ6grht1iM+f1lJSq7/L0YVnkJaNVwC3wEUYPOAmeyl5xyer1DjL6MrumO6Zw== +react-syntax-highlighter@^15.4.5: + version "15.4.5" + resolved "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.4.5.tgz#db900d411d32a65c8e90c39cd64555bf463e712e" + integrity sha512-RC90KQTxZ/b7+9iE6s9nmiFLFjWswUcfULi4GwVzdFVKVMQySkJWBuOmJFfjwjMVCo0IUUuJrWebNKyviKpwLQ== dependencies: "@babel/runtime" "^7.3.1" highlight.js "^10.4.1" lowlight "^1.17.0" - prismjs "^1.22.0" + prismjs "^1.25.0" refractor "^3.2.0" react-test-renderer@^16.13.1: @@ -24373,7 +24436,7 @@ redux-immutable@^4.0.0: resolved "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz#3a1a32df66366462b63691f0e1dc35e472bbc9f3" integrity sha1-Ohoy32Y2ZGK2NpHw4dw15HK7yfM= -redux@^4.0.0, redux@^4.1.0: +redux@^4.0.0: version "4.1.1" resolved "https://registry.npmjs.org/redux/-/redux-4.1.1.tgz#76f1c439bb42043f985fbd9bf21990e60bd67f47" integrity sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw== @@ -24388,6 +24451,13 @@ redux@^4.0.4: loose-envify "^1.4.0" symbol-observable "^1.2.0" +redux@^4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/redux/-/redux-4.1.2.tgz#140f35426d99bb4729af760afcf79eaaac407104" + integrity sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw== + dependencies: + "@babel/runtime" "^7.9.2" + reflect-metadata@^0.1.13: version "0.1.13" resolved "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" @@ -26614,39 +26684,38 @@ svgo@^2.7.0: picocolors "^1.0.0" stable "^0.1.8" -swagger-client@3.16.1, swagger-client@^3.16.1: - version "3.16.1" - resolved "https://registry.npmjs.org/swagger-client/-/swagger-client-3.16.1.tgz#df86c9d407ab52c00cb356e714b0ec732bb3ad40" - integrity sha512-BcNRQzXHRGuXfhN0f80ptlr+bSaPvXwo8+gWbpmTnbKdAjcWOKAWwUx7rgGHjTKZh0qROr/GX9xOZIY8LrBuTg== +swagger-client@^3.17.0: + version "3.18.0" + resolved "https://registry.npmjs.org/swagger-client/-/swagger-client-3.18.0.tgz#2e59e666b38ded983e26fb512421ef8ff82547f0" + integrity sha512-lNfwTXHim0QiCNuZ4BKgWle7N7+9WlFLtcP02n0xSchFtdzsKJb2kWsOlwplRU3appVFjnHRy+1eVabRc3ZhbA== dependencies: "@babel/runtime-corejs3" "^7.11.2" btoa "^1.2.1" - buffer "^6.0.3" cookie "~0.4.1" cross-fetch "^3.1.4" deep-extend "~0.6.0" fast-json-patch "^3.0.0-1" form-data-encoder "^1.4.3" formdata-node "^4.0.0" + is-plain-object "^5.0.0" js-yaml "^4.1.0" lodash "^4.17.21" - qs "^6.9.4" - querystring-browser "^1.0.4" + qs "^6.10.2" traverse "~0.6.6" url "~0.11.0" -swagger-ui-react@^4.0.0-rc.3: - version "4.0.0-rc.3" - resolved "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-4.0.0-rc.3.tgz#393f424daf55272dd36737be654d978daf870d3d" - integrity sha512-Mo3+NvwLbbPy+ZJZoQkc3UudevSM03SHTZqwZOI7EY4KyMgqeet3xElnAUGZC94GqBZTstU0rf/znkgdaNo9qg== +swagger-ui-react@^4.1.3: + version "4.1.3" + resolved "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-4.1.3.tgz#a722ecbe54ef237fa9080447a7c708c4c72d846a" + integrity sha512-o1AoXUTNH40cxWus0QOeWQ8x9tSIEmrLBrOgAOHDnvWJ1qyjT8PjgHjPbUVjMbja18coyuaAAeUdyLKvLGmlDA== dependencies: - "@babel/runtime-corejs3" "^7.14.7" + "@babel/runtime-corejs3" "^7.16.3" "@braintree/sanitize-url" "^5.0.2" base64-js "^1.5.1" classnames "^2.3.1" css.escape "1.5.1" deep-extend "0.6.0" - dompurify "^2.2.9" + dompurify "=2.3.3" ieee754 "^1.2.1" immutable "^3.x.x" js-file-download "^0.4.12" @@ -26655,20 +26724,20 @@ swagger-ui-react@^4.0.0-rc.3: memoizee "^0.4.15" prop-types "^15.7.2" randombytes "^2.1.0" - react-copy-to-clipboard "5.0.3" + react-copy-to-clipboard "5.0.4" react-debounce-input "=3.2.4" react-immutable-proptypes "2.2.0" react-immutable-pure-component "^2.2.0" react-inspector "^5.1.1" react-redux "^7.2.4" - react-syntax-highlighter "^15.4.4" - redux "^4.1.0" + react-syntax-highlighter "^15.4.5" + redux "^4.1.2" redux-immutable "^4.0.0" remarkable "^2.0.1" reselect "^4.0.0" serialize-error "^8.1.0" sha.js "^2.4.11" - swagger-client "^3.16.1" + swagger-client "^3.17.0" url-parse "^1.5.3" xml "=1.0.1" xml-but-prettier "^1.0.1"