diff --git a/.changeset/beige-eagles-cheat.md b/.changeset/beige-eagles-cheat.md deleted file mode 100644 index 5b5081d2ee..0000000000 --- a/.changeset/beige-eagles-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli-node': patch ---- - -Updated doc link. diff --git a/.changeset/blue-hairs-marry.md b/.changeset/blue-hairs-marry.md deleted file mode 100644 index 2ca1a3d47e..0000000000 --- a/.changeset/blue-hairs-marry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli-node': patch ---- - -Added new plugin metadata fields to `BackstagePackageJson` type. diff --git a/.changeset/brave-apples-move.md b/.changeset/brave-apples-move.md deleted file mode 100644 index 7a1fa86a56..0000000000 --- a/.changeset/brave-apples-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Fixed a potential crash when passing an object with a `null` prototype as log meta. diff --git a/.changeset/breezy-badgers-train.md b/.changeset/breezy-badgers-train.md deleted file mode 100644 index 8f747b8602..0000000000 --- a/.changeset/breezy-badgers-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli-node': patch ---- - -Upgraded @yarnpkg/parsers to stable 3.0 diff --git a/.changeset/breezy-planets-sparkle.md b/.changeset/breezy-planets-sparkle.md deleted file mode 100644 index eea9e5c6bf..0000000000 --- a/.changeset/breezy-planets-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-onelogin-provider': minor ---- - -Separate out the OneLogin provider into its own module diff --git a/.changeset/brown-bananas-talk.md b/.changeset/brown-bananas-talk.md deleted file mode 100644 index 71020b787a..0000000000 --- a/.changeset/brown-bananas-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Having tooltip inherit font size for consistency in catalog table columns diff --git a/.changeset/calm-cars-serve.md b/.changeset/calm-cars-serve.md deleted file mode 100644 index 5df2a18cd4..0000000000 --- a/.changeset/calm-cars-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-tasks': patch ---- - -Marked all exports as deprecated and pointed at `@backstage/backend-plugin-api` and `@backstage/backend-defaults` diff --git a/.changeset/calm-files-sort.md b/.changeset/calm-files-sort.md deleted file mode 100644 index a487c00eb4..0000000000 --- a/.changeset/calm-files-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -In tests, return `null` rather than throwing an error when trying to get the `ExtensionPoint.T` property, so that tests asserting the property are not easily broken. diff --git a/.changeset/calm-plums-wink.md b/.changeset/calm-plums-wink.md deleted file mode 100644 index edb991f616..0000000000 --- a/.changeset/calm-plums-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -mkdocs-material have updated their CSS variable template, and a few are unset in Backstage. This patch adds the missing variables to ensure coverage. diff --git a/.changeset/chilled-planes-sniff.md b/.changeset/chilled-planes-sniff.md deleted file mode 100644 index e4084ea561..0000000000 --- a/.changeset/chilled-planes-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-api-docs': patch ---- - -The `registerComponent` external route will now by default bind to the catalog import page if it is available. diff --git a/.changeset/chilled-suns-camp.md b/.changeset/chilled-suns-camp.md deleted file mode 100644 index 1ab603abfa..0000000000 --- a/.changeset/chilled-suns-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Removed accents on deprecation note diff --git a/.changeset/clever-kids-return.md b/.changeset/clever-kids-return.md deleted file mode 100644 index a6cab79f2b..0000000000 --- a/.changeset/clever-kids-return.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@backstage/plugin-auth-node': patch ---- - -Updated scope management for OAuth providers, where the `createOAuthAuthenticator` now accepts a new collection of `scopes` options: - -- `scopes.persist` - Whether scopes should be persisted, replaces the `shouldPersistScopes` option. -- `scopes.required` - A list of required scopes that will always be requested. -- `scopes.transform` - A function that can be used to transform the scopes before they are requested. - -The `createOAuthProviderFactory` has also received a new `additionalScopes` option, and will also read `additionalScopes` from the auth provider configuration. Both of these can be used to add additional scopes that should always be requested. - -A significant change under the hood that this new scope management brings is that providers that persist scopes will now always merge the already granted scopes with the requested ones. The previous behavior was that the full authorization flow would not include existing scopes, while the refresh flow would only include the existing scopes. diff --git a/.changeset/clever-radios-yawn.md b/.changeset/clever-radios-yawn.md deleted file mode 100644 index e5600183f5..0000000000 --- a/.changeset/clever-radios-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-api-docs': patch ---- - -Make sure that the toggle button state is properly reflected in API cards diff --git a/.changeset/clever-waves-judge.md b/.changeset/clever-waves-judge.md new file mode 100644 index 0000000000..585ad01bbe --- /dev/null +++ b/.changeset/clever-waves-judge.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-techdocs-react': patch +'@backstage/plugin-techdocs': patch +--- + +Fixed a bug with the TechDocsReaderPageProvider not re-rendering when setShadowDom is called, meaning that the useShadowDom hooks were inconsistent. This issue caused the TextSize addon changes not to reapply during navigation. diff --git a/.changeset/cold-seas-end.md b/.changeset/cold-seas-end.md deleted file mode 100644 index 96fa048fbd..0000000000 --- a/.changeset/cold-seas-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Updated configuration schema to include the `useRedisSets` cache config option. diff --git a/.changeset/create-app-1716302437.md b/.changeset/create-app-1716302437.md deleted file mode 100644 index b50d431d4b..0000000000 --- a/.changeset/create-app-1716302437.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Bumped create-app version. diff --git a/.changeset/create-app-1716903719.md b/.changeset/create-app-1716903719.md deleted file mode 100644 index b50d431d4b..0000000000 --- a/.changeset/create-app-1716903719.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Bumped create-app version. diff --git a/.changeset/cuddly-eggs-sin.md b/.changeset/cuddly-eggs-sin.md deleted file mode 100644 index bfe7de9680..0000000000 --- a/.changeset/cuddly-eggs-sin.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': patch -'@backstage/plugin-techdocs-node': patch ---- - -Allow defining custom build log transport for techdocs builder diff --git a/.changeset/cuddly-jobs-kick.md b/.changeset/cuddly-jobs-kick.md deleted file mode 100644 index aa62efb88b..0000000000 --- a/.changeset/cuddly-jobs-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-compat-api': patch ---- - -Add support for forwarding default target from legacy external route refs. diff --git a/.changeset/cyan-jobs-visit.md b/.changeset/cyan-jobs-visit.md deleted file mode 100644 index ccc8c90adf..0000000000 --- a/.changeset/cyan-jobs-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': minor ---- - -Added `TestCaches` that functions just like `TestDatabases` diff --git a/.changeset/cyan-paws-beg.md b/.changeset/cyan-paws-beg.md deleted file mode 100644 index 87c2b746a4..0000000000 --- a/.changeset/cyan-paws-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-github': patch ---- - -Added handling for dry run to githubPullRequest and githubWebhook and added tests for this functionality diff --git a/.changeset/cyan-snails-peel.md b/.changeset/cyan-snails-peel.md deleted file mode 100644 index 4da79258fb..0000000000 --- a/.changeset/cyan-snails-peel.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-user-settings-backend': patch -'@backstage/plugin-devtools-backend': patch -'@backstage/plugin-techdocs-backend': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-search-backend': patch -'@backstage/plugin-proxy-backend': patch -'@backstage/plugin-auth-backend': patch -'@backstage/plugin-app-backend': patch ---- - -Updated local development setup. diff --git a/.changeset/dull-moose-cough.md b/.changeset/dull-moose-cough.md deleted file mode 100644 index 4de43fb35f..0000000000 --- a/.changeset/dull-moose-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/integration': patch ---- - -Updated function for getHarnessEditContentsUrl diff --git a/.changeset/early-eggs-press.md b/.changeset/early-eggs-press.md deleted file mode 100644 index ff6658f7ca..0000000000 --- a/.changeset/early-eggs-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -The `TokenManager` has been deprecated in preparation for the [stable release of the New Backend System](https://github.com/backstage/backstage/issues/24493). Please [migrate](https://backstage.io/docs/tutorials/auth-service-migration) to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead. diff --git a/.changeset/eighty-kings-dress.md b/.changeset/eighty-kings-dress.md deleted file mode 100644 index 52aab627ab..0000000000 --- a/.changeset/eighty-kings-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -In preparation to the new backend system stable release, the `isDatabaseConflictError` helper have been moved to the `@backstage/backend-plugin-api` package and deprecated from `@backstage/backend-common`. diff --git a/.changeset/eighty-yaks-switch.md b/.changeset/eighty-yaks-switch.md deleted file mode 100644 index 30e3374d70..0000000000 --- a/.changeset/eighty-yaks-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Fix readme for new plugins created using cli diff --git a/.changeset/empty-avocados-tease.md b/.changeset/empty-avocados-tease.md deleted file mode 100644 index f202af2b82..0000000000 --- a/.changeset/empty-avocados-tease.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-techdocs': patch ---- - -Internal updates to allow reusing Backstage's `fetchApi` implementation for event source requests. This allows you to for example, override the `Authorization` header. diff --git a/.changeset/empty-spoons-tell.md b/.changeset/empty-spoons-tell.md deleted file mode 100644 index 44e3dceb6f..0000000000 --- a/.changeset/empty-spoons-tell.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -'@backstage/plugin-proxy-backend': minor ---- - -**BREAKING**: The proxy backend plugin is now protected by Backstage auth, by -default. Unless specifically configured (see below), all proxy endpoints will -reject requests immediately unless a valid Backstage user or service token is -passed along with the request. This aligns the proxy with how other Backstage -backends behave out of the box, and serves to protect your upstreams from -unauthorized access. - -A proxy configuration section can now look as follows: - -```yaml -proxy: - endpoints: - '/pagerduty': - target: https://api.pagerduty.com - credentials: require # NEW! - headers: - Authorization: Token token=${PAGERDUTY_TOKEN} -``` - -There are three possible `credentials` settings at this point: - -- `require`: Callers must provide Backstage user or service credentials with - each request. The credentials are not forwarded to the proxy target. -- `forward`: Callers must provide Backstage user or service credentials with - each request, and those credentials are forwarded to the proxy target. -- `dangerously-allow-unauthenticated`: No Backstage credentials are required to - access this proxy target. The target can still apply its own credentials - checks, but the proxy will not help block non-Backstage-blessed callers. If - you also add `allowedHeaders: ['Authorization']` to an endpoint configuration, - then the Backstage token (if provided) WILL be forwarded. - -The value `dangerously-allow-unauthenticated` was the old default. - -The value `require` is the new default, so requests that were previously -permitted may now start resulting in `401 Unauthorized` responses. If you have -`backend.auth.dangerouslyDisableDefaultAuthPolicy` set to `true`, this does not -apply; the proxy will behave as if all endpoints were set to -`dangerously-allow-unauthenticated`. - -If you have proxy endpoints that require unauthenticated access still, please -add `credentials: dangerously-allow-unauthenticated` to their declarations in -your app-config. diff --git a/.changeset/empty-tables-ring.md b/.changeset/empty-tables-ring.md deleted file mode 100644 index c83a987228..0000000000 --- a/.changeset/empty-tables-ring.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-kubernetes-react': minor -'@backstage/plugin-catalog-import': minor -'@backstage/plugin-kubernetes': patch -'@backstage/plugin-search': patch ---- - -Migrate from identityApi to fetchApi in frontend plugins. diff --git a/.changeset/fair-pillows-know.md b/.changeset/fair-pillows-know.md new file mode 100644 index 0000000000..f0e5034393 --- /dev/null +++ b/.changeset/fair-pillows-know.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch +'@backstage/plugin-scaffolder-backend-module-gitlab': patch +'@backstage/plugin-scaffolder-backend-module-rails': patch +--- + +Updated configuration instructions diff --git a/.changeset/famous-monkeys-count.md b/.changeset/famous-monkeys-count.md deleted file mode 100644 index c5151b38c3..0000000000 --- a/.changeset/famous-monkeys-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Add support for JWKS tokens in ExternalTokenHandler. diff --git a/.changeset/fifty-actors-buy.md b/.changeset/fifty-actors-buy.md deleted file mode 100644 index 40e6f44154..0000000000 --- a/.changeset/fifty-actors-buy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Add `peerDependencies` to `devDependencies` in `package.json.hbs` templates. diff --git a/.changeset/forty-adults-roll.md b/.changeset/forty-adults-roll.md deleted file mode 100644 index 50dd60da9e..0000000000 --- a/.changeset/forty-adults-roll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-tasks': patch ---- - -Updated the `TaskScheduleDefinitionConfig` deprecated comment to point to `SchedulerServiceTaskScheduleDefinitionConfig` diff --git a/.changeset/forty-experts-live.md b/.changeset/forty-experts-live.md deleted file mode 100644 index 11fc3b688f..0000000000 --- a/.changeset/forty-experts-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-graph': patch ---- - -Add function to `EntityRelationsGraph` filter that excludes entities from graph diff --git a/.changeset/forty-rice-visit.md b/.changeset/forty-rice-visit.md deleted file mode 100644 index a7da4b5a1e..0000000000 --- a/.changeset/forty-rice-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Move `cache` implementation and types to the `@backstage/backend-defaults` package. diff --git a/.changeset/four-adults-mix.md b/.changeset/four-adults-mix.md deleted file mode 100644 index 5013166dc6..0000000000 --- a/.changeset/four-adults-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-notifications': patch ---- - -Do not always show scrollbars in notification description diff --git a/.changeset/friendly-keys-fold.md b/.changeset/friendly-keys-fold.md deleted file mode 100644 index 218abe4efe..0000000000 --- a/.changeset/friendly-keys-fold.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch -'@backstage/backend-app-api': patch ---- - -Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. diff --git a/.changeset/gentle-avocados-obey.md b/.changeset/gentle-avocados-obey.md new file mode 100644 index 0000000000..80bf5f89c7 --- /dev/null +++ b/.changeset/gentle-avocados-obey.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Only bootstrap global-agent if it's actually being used diff --git a/.changeset/gentle-baboons-peel.md b/.changeset/gentle-baboons-peel.md deleted file mode 100644 index b51ad77283..0000000000 --- a/.changeset/gentle-baboons-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -`TechDocsIndexPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. diff --git a/.changeset/gentle-llamas-cross.md b/.changeset/gentle-llamas-cross.md deleted file mode 100644 index 42a6d70cd6..0000000000 --- a/.changeset/gentle-llamas-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Use `inherit` variant on OverflowTooltip underlying Typography component. diff --git a/.changeset/gold-teachers-wink.md b/.changeset/gold-teachers-wink.md deleted file mode 100644 index 0578e8d02b..0000000000 --- a/.changeset/gold-teachers-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies diff --git a/.changeset/great-clouds-hang.md b/.changeset/great-clouds-hang.md deleted file mode 100644 index 4e8bf28d9d..0000000000 --- a/.changeset/great-clouds-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-defaults': patch ---- - -Exposed `DefaultSchedulerService` diff --git a/.changeset/great-cougars-guess.md b/.changeset/great-cougars-guess.md deleted file mode 100644 index af1de3e8ce..0000000000 --- a/.changeset/great-cougars-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -Made it possible to give access restrictions to `mockCredentials.service` diff --git a/.changeset/green-apricots-invite.md b/.changeset/green-apricots-invite.md deleted file mode 100644 index b5e92021b4..0000000000 --- a/.changeset/green-apricots-invite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -The `catalogIndex` external route is now optional and will by default bind to the catalog index page if it is available. diff --git a/.changeset/grumpy-wolves-hang.md b/.changeset/grumpy-wolves-hang.md new file mode 100644 index 0000000000..8ab3740e74 --- /dev/null +++ b/.changeset/grumpy-wolves-hang.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fix issue with CLI that was preventing upgrading from 1.28 diff --git a/.changeset/honest-badgers-ring.md b/.changeset/honest-badgers-ring.md deleted file mode 100644 index c1e763e6cb..0000000000 --- a/.changeset/honest-badgers-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -The type `MockDirectoryOptions` was renamed to `CreateMockDirectoryOptions` so that it's clear these options are exclusive to the mock directory factory. diff --git a/.changeset/honest-pandas-chew.md b/.changeset/honest-pandas-chew.md deleted file mode 100644 index d5ae9e8cea..0000000000 --- a/.changeset/honest-pandas-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-plugin-api': patch ---- - -Added a new `defaultTarget` option to `createExternalRouteRef`. I lets you specify a default target of the route by name, for example `'catalog.catalogIndex'`, which will be used if the target route is present in the app and there is no explicit route binding. diff --git a/.changeset/hungry-cups-jog.md b/.changeset/hungry-cups-jog.md deleted file mode 100644 index bd15fa92d3..0000000000 --- a/.changeset/hungry-cups-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Removed waiting for the workspace and repository fields to be filled in before requesting user credentials diff --git a/.changeset/itchy-spoons-cry.md b/.changeset/itchy-spoons-cry.md deleted file mode 100644 index 20877e8087..0000000000 --- a/.changeset/itchy-spoons-cry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-app-backend': patch ---- - -Restore the support of external config schema in the router of the `app-backend` plugin, which was broken in release `1.26.0`. -This support is critical for dynamic frontend plugins to have access to their config values. diff --git a/.changeset/large-months-decide.md b/.changeset/large-months-decide.md deleted file mode 100644 index e9d4c47bbe..0000000000 --- a/.changeset/large-months-decide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-notifications-node': minor ---- - -add notifications filtering by processors diff --git a/.changeset/late-ants-impress.md b/.changeset/late-ants-impress.md deleted file mode 100644 index 44b2cbefb3..0000000000 --- a/.changeset/late-ants-impress.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch -'@backstage/plugin-scaffolder-node-test-utils': patch -'@backstage/plugin-search-backend-module-elasticsearch': patch -'@backstage/plugin-search-backend-module-pg': patch -'@backstage/plugin-search-backend-node': patch -'@backstage/plugin-signals-backend': patch -'@backstage/plugin-events-node': patch ---- - -Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. diff --git a/.changeset/late-students-live.md b/.changeset/late-students-live.md deleted file mode 100644 index 6a7c203e9e..0000000000 --- a/.changeset/late-students-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Fixed bug in CopyToClipboardButton component where positioning of the "Copy to clipboard" button in techdocs code snippets was broken in some cases diff --git a/.changeset/lemon-weeks-lay.md b/.changeset/lemon-weeks-lay.md deleted file mode 100644 index 66d1402882..0000000000 --- a/.changeset/lemon-weeks-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-defaults': patch ---- - -Remove dependency with `@backstage/backend-commons` package. diff --git a/.changeset/light-rice-argue.md b/.changeset/light-rice-argue.md deleted file mode 100644 index 23572b4cdd..0000000000 --- a/.changeset/light-rice-argue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-gitlab': patch ---- - -Added `gitlab:issue:edit` action to edit existing GitLab issues diff --git a/.changeset/little-cooks-approve.md b/.changeset/little-cooks-approve.md deleted file mode 100644 index d4088208ae..0000000000 --- a/.changeset/little-cooks-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-notifications': patch ---- - -Fixes performance issue with Notifications title counter. diff --git a/.changeset/long-llamas-push-atlassian.md b/.changeset/long-llamas-push-atlassian.md deleted file mode 100644 index 3e0ae5ad14..0000000000 --- a/.changeset/long-llamas-push-atlassian.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-atlassian-provider': minor ---- - -**BREAKING**: The `scope` and `scopes` config options have been removed and replaced by the standard `additionalScopes` config. In addition, the `offline_access`, `read:jira-work`, and `read:jira-user` scopes have been set to required and will always be present. diff --git a/.changeset/long-llamas-push-bitbucket.md b/.changeset/long-llamas-push-bitbucket.md deleted file mode 100644 index 36a68219eb..0000000000 --- a/.changeset/long-llamas-push-bitbucket.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-bitbucket-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration. In addition, the `account` scope has been set to required and will always be present. diff --git a/.changeset/long-llamas-push-github.md b/.changeset/long-llamas-push-github.md deleted file mode 100644 index c68fb8e925..0000000000 --- a/.changeset/long-llamas-push-github.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-github-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration. In addition, the `read:user` scope has been set to required and will always be present. diff --git a/.changeset/long-llamas-push-gitlab.md b/.changeset/long-llamas-push-gitlab.md deleted file mode 100644 index fe5d293723..0000000000 --- a/.changeset/long-llamas-push-gitlab.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-gitlab-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration. In addition, the `read_user` scope has been set to required and will always be present. diff --git a/.changeset/long-llamas-push-google.md b/.changeset/long-llamas-push-google.md deleted file mode 100644 index c9de73eb36..0000000000 --- a/.changeset/long-llamas-push-google.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-google-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration. In addition, the `openid`, `userinfo.email`, and `userinfo.profile` scopes have been set to required and will always be present. diff --git a/.changeset/long-llamas-push-microsoft.md b/.changeset/long-llamas-push-microsoft.md deleted file mode 100644 index f6509db0f7..0000000000 --- a/.changeset/long-llamas-push-microsoft.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-microsoft-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration. diff --git a/.changeset/long-llamas-push-oauth2.md b/.changeset/long-llamas-push-oauth2.md deleted file mode 100644 index 2a233dbb42..0000000000 --- a/.changeset/long-llamas-push-oauth2.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-oauth2-provider': minor ---- - -**BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. diff --git a/.changeset/long-llamas-push-oidc.md b/.changeset/long-llamas-push-oidc.md deleted file mode 100644 index 248d762864..0000000000 --- a/.changeset/long-llamas-push-oidc.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-oidc-provider': minor ---- - -**BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, `profile`, and `email` scopes have been set to required and will always be present. diff --git a/.changeset/long-llamas-push-okta.md b/.changeset/long-llamas-push-okta.md deleted file mode 100644 index d330746d2e..0000000000 --- a/.changeset/long-llamas-push-okta.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-okta-provider': patch ---- - -Added support for the new shared `additionalScopes` configuration, which means it can now also be specified as an array. In addition, the `openid`, `email`, `profile`, and `offline_access` scopes have been set to required and will always be present. diff --git a/.changeset/long-llamas-push-pinniped.md b/.changeset/long-llamas-push-pinniped.md deleted file mode 100644 index a9c6a54cee..0000000000 --- a/.changeset/long-llamas-push-pinniped.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-pinniped-provider': patch ---- - -**BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, the `openid`, `pinniped:request-audience`, `username`, and `offline_access` scopes have been set to required and will always be present. diff --git a/.changeset/long-llamas-push-vmware-cloud.md b/.changeset/long-llamas-push-vmware-cloud.md deleted file mode 100644 index 9edfb01f68..0000000000 --- a/.changeset/long-llamas-push-vmware-cloud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-vmware-cloud-provider': minor ---- - -**BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, and `offline_access` scopes have been set to required and will always be present. diff --git a/.changeset/loud-pumpkins-bow.md b/.changeset/loud-pumpkins-bow.md deleted file mode 100644 index a55c97e19a..0000000000 --- a/.changeset/loud-pumpkins-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-react': patch ---- - -Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. diff --git a/.changeset/lovely-hats-pay.md b/.changeset/lovely-hats-pay.md deleted file mode 100644 index 117f50e5db..0000000000 --- a/.changeset/lovely-hats-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/theme': patch ---- - -Internal refactor to fix an issue where the MUI 5 `v5-` class prefixing gets removed by tree shaking. diff --git a/.changeset/lucky-taxis-rule.md b/.changeset/lucky-taxis-rule.md deleted file mode 100644 index eacbaaefbe..0000000000 --- a/.changeset/lucky-taxis-rule.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/backend-defaults': patch ---- - -Added core service factories and implementations from -`@backstage/backend-app-api`. They are now available as subpath exports, e.g. -`@backstage/backend-defaults/scheduler` is where the service factory and default -implementation of `coreServices.scheduler` now lives. They have been marked as -deprecated in their old locations. diff --git a/.changeset/many-moles-sing.md b/.changeset/many-moles-sing.md deleted file mode 100644 index 8b49f674c7..0000000000 --- a/.changeset/many-moles-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -We are deprecating the legacy `createServiceBuilder` factory, so if you are still using it, please checkout the migration guide and [migrate](https://backstage.io/docs/backend-system/building-plugins-and-modules/migrating) your plugin to use the new backend system. diff --git a/.changeset/many-windows-attack.md b/.changeset/many-windows-attack.md deleted file mode 100644 index d0516244f4..0000000000 --- a/.changeset/many-windows-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch ---- - -Remove debug console logging statement diff --git a/.changeset/mean-laws-lay.md b/.changeset/mean-laws-lay.md deleted file mode 100644 index a7c629a9a5..0000000000 --- a/.changeset/mean-laws-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Pass through `EventsService` too in the new backend system diff --git a/.changeset/metal-apricots-heal.md b/.changeset/metal-apricots-heal.md deleted file mode 100644 index 8cfd72a605..0000000000 --- a/.changeset/metal-apricots-heal.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Added a new static key based method for plugin-to-plugin auth. This is useful for example if you are running readonly service nodes that cannot use a database for the default public-key signature scheme outlined in [BEP-0003](https://github.com/backstage/backstage/tree/master/beps/0003-auth-architecture-evolution). Most users should want to stay on the more secure zero-config database signature scheme. - -You can generate a public and private key pair using `openssl`. - -- First generate a private key using the ES256 algorithm - - ```sh - openssl ecparam -name prime256v1 -genkey -out private.ec.key - ``` - -- Convert it to PKCS#8 format - - ```sh - openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private.ec.key -out private.key - ``` - -- Extract the public key - - ```sh - openssl ec -inform PEM -outform PEM -pubout -in private.key -out public.key - ``` - -After this you have the files `private.key` and `public.key`. Put them in a place where you know their absolute paths, and then set up your app-config accordingly: - -```yaml -backend: - auth: - keyStore: - type: static - static: - keys: - - publicKeyFile: /absolute/path/to/public.key - privateKeyFile: /absolute/path/to/private.key - keyId: some-custom-id -``` diff --git a/.changeset/mighty-rocks-join.md b/.changeset/mighty-rocks-join.md deleted file mode 100644 index 5a859faf8c..0000000000 --- a/.changeset/mighty-rocks-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-msgraph': patch ---- - -Added missing `userSelect` property in `readMicrosoftGraphOrg` method diff --git a/.changeset/moody-buttons-hope.md b/.changeset/moody-buttons-hope.md deleted file mode 100644 index 0b8f57f9bc..0000000000 --- a/.changeset/moody-buttons-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Marked the `TokenManagerService` and `IdentityService` types as deprecated diff --git a/.changeset/moody-llamas-breathe.md b/.changeset/moody-llamas-breathe.md new file mode 100644 index 0000000000..418cf7480e --- /dev/null +++ b/.changeset/moody-llamas-breathe.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': patch +--- + +Add dependencies that are needed by cross-imports from backend-defaults diff --git a/.changeset/nasty-doors-grab.md b/.changeset/nasty-doors-grab.md deleted file mode 100644 index 971843d053..0000000000 --- a/.changeset/nasty-doors-grab.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-azure': patch ---- - -Use `GitRepository.webUrl` instead of `GitRepository.remoteUrl` to set the value of `repoContentsUrl` as `remoteUrl` can sometimes return an URL with the wrong format (e.g. `https://@dev.azure.com///\_git/`). diff --git a/.changeset/nasty-roses-flash.md b/.changeset/nasty-roses-flash.md deleted file mode 100644 index 4c09a7e47f..0000000000 --- a/.changeset/nasty-roses-flash.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/integration': minor ---- - -**BREAKING** Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: - -- `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead) -- `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead) -- `GitHubIntegration` (use `GithubIntegration` instead) -- `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead) -- `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead) -- `replaceGitHubUrlType` (use `replaceGithubUrlType` instead) diff --git a/.changeset/neat-chairs-complain.md b/.changeset/neat-chairs-complain.md deleted file mode 100644 index 96c0271d81..0000000000 --- a/.changeset/neat-chairs-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Fixing issues with log redaction in the scaffolder logs diff --git a/.changeset/neat-rivers-share.md b/.changeset/neat-rivers-share.md deleted file mode 100644 index 42649de977..0000000000 --- a/.changeset/neat-rivers-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-permission-node': patch ---- - -Ensure that service token access restrictions, when present, are taken into account diff --git a/.changeset/nervous-kings-change.md b/.changeset/nervous-kings-change.md deleted file mode 100644 index 9d61d2ea81..0000000000 --- a/.changeset/nervous-kings-change.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Deprecated all of the `UrlReader` related type names and replaced them with prefixed versions. Please update your imports. - -- `ReadTreeOptions` was renamed to `UrlReaderServiceReadTreeOptions` -- `ReadTreeResponse` was renamed to `UrlReaderServiceReadTreeResponse` -- `ReadTreeResponseDirOptions` was renamed to `UrlReaderServiceReadTreeResponseDirOptions` -- `ReadTreeResponseFile` was renamed to `UrlReaderServiceReadTreeResponseFile` -- `ReadUrlResponse` was renamed to `UrlReaderServiceReadUrlResponse` -- `ReadUrlOptions` was renamed to `UrlReaderServiceReadUrlOptions` -- `SearchOptions` was renamed to `UrlReaderServiceSearchOptions` -- `SearchResponse` was renamed to `UrlReaderServiceSearchResponse` -- `SearchResponseFile` was renamed to `UrlReaderServiceSearchResponseFile` diff --git a/.changeset/nervous-queens-fly.md b/.changeset/nervous-queens-fly.md deleted file mode 100644 index 802034765c..0000000000 --- a/.changeset/nervous-queens-fly.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -Refactored `TestDatabases` to no longer depend on `backend-common` diff --git a/.changeset/new-masks-occur.md b/.changeset/new-masks-occur.md deleted file mode 100644 index b5777b7abe..0000000000 --- a/.changeset/new-masks-occur.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-confluence-to-markdown': patch -'@backstage/plugin-auth-backend-module-cloudflare-access-provider': patch -'@backstage/plugin-catalog-backend-module-scaffolder-entity-model': patch -'@backstage/plugin-search-backend-module-stack-overflow-collator': patch -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch -'@backstage/plugin-auth-backend-module-azure-easyauth-provider': patch -'@backstage/plugin-permission-backend-module-allow-all-policy': patch -'@backstage/plugin-scaffolder-backend-module-bitbucket-server': patch -'@backstage/plugin-auth-backend-module-oauth2-proxy-provider': patch -'@backstage/plugin-auth-backend-module-vmware-cloud-provider': patch -'@backstage/plugin-scaffolder-backend-module-bitbucket-cloud': patch -'@backstage/plugin-catalog-backend-module-backstage-openapi': patch -'@backstage/plugin-catalog-backend-module-bitbucket-server': patch -'@backstage/plugin-scaffolder-backend-module-notifications': patch -'@backstage/plugin-auth-backend-module-atlassian-provider': patch -'@backstage/plugin-auth-backend-module-bitbucket-provider': patch -'@backstage/plugin-auth-backend-module-microsoft-provider': patch -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch -'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch -'@backstage/plugin-auth-backend-module-onelogin-provider': patch -'@backstage/plugin-auth-backend-module-pinniped-provider': patch -'@backstage/plugin-events-backend-module-bitbucket-cloud': patch -'@backstage/plugin-auth-backend-module-aws-alb-provider': patch -'@backstage/plugin-auth-backend-module-gcp-iap-provider': patch -'@backstage/plugin-auth-backend-module-github-provider': patch -'@backstage/plugin-auth-backend-module-gitlab-provider': patch -'@backstage/plugin-auth-backend-module-google-provider': patch -'@backstage/plugin-auth-backend-module-oauth2-provider': patch -'@backstage/plugin-catalog-unprocessed-entities-common': patch -'@backstage/plugin-scaffolder-backend-module-bitbucket': patch -'@backstage/plugin-search-backend-module-elasticsearch': patch -'@backstage/plugin-auth-backend-module-guest-provider': patch -'@backstage/plugin-catalog-backend-module-unprocessed': patch -'@backstage/plugin-notifications-backend-module-email': patch -'@backstage/plugin-auth-backend-module-oidc-provider': patch -'@backstage/plugin-auth-backend-module-okta-provider': patch -'@backstage/plugin-catalog-backend-module-github-org': patch -'@backstage/plugin-catalog-backend-module-gitlab-org': patch -'@backstage/plugin-scaffolder-backend-module-gerrit': patch -'@backstage/plugin-scaffolder-backend-module-github': patch -'@backstage/plugin-scaffolder-backend-module-gitlab': patch -'@backstage/plugin-scaffolder-backend-module-sentry': patch -'@backstage/plugin-scaffolder-backend-module-yeoman': patch -'@backstage/plugin-catalog-backend-module-puppetdb': patch -'@backstage/plugin-scaffolder-backend-module-azure': patch -'@backstage/plugin-scaffolder-backend-module-gitea': patch -'@backstage/plugin-scaffolder-backend-module-rails': patch -'@backstage/plugin-api-docs-module-protoc-gen-doc': patch -'@backstage/plugin-catalog-backend-module-msgraph': patch -'@backstage/plugin-catalog-backend-module-openapi': patch -'@backstage/plugin-search-backend-module-techdocs': patch -'@backstage/plugin-techdocs-module-addons-contrib': patch -'@backstage/plugin-catalog-backend-module-gerrit': patch -'@backstage/plugin-catalog-backend-module-github': patch -'@backstage/plugin-catalog-backend-module-gitlab': patch -'@backstage/plugin-events-backend-module-aws-sqs': patch -'@backstage/plugin-search-backend-module-catalog': patch -'@backstage/plugin-search-backend-module-explore': patch -'@backstage/plugin-catalog-backend-module-azure': patch -'@backstage/plugin-catalog-unprocessed-entities': patch -'@backstage/plugin-events-backend-module-gerrit': patch -'@backstage/plugin-events-backend-module-github': patch -'@backstage/plugin-events-backend-module-gitlab': patch -'@backstage/plugin-catalog-backend-module-ldap': patch -'@backstage/plugin-events-backend-module-azure': patch -'@backstage/plugin-catalog-backend-module-aws': patch -'@backstage/plugin-catalog-backend-module-gcp': patch -'@backstage/plugin-scaffolder-node-test-utils': patch -'@backstage/plugin-techdocs-addons-test-utils': patch -'@backstage/plugin-events-backend-test-utils': patch -'@backstage/plugin-search-backend-module-pg': patch -'@backstage/plugin-bitbucket-cloud-common': patch -'@backstage/plugin-notifications-backend': patch -'@backstage/plugin-user-settings-backend': patch -'@backstage/plugin-notifications-common': patch -'@backstage/plugin-user-settings-common': patch -'@backstage/plugin-search-backend-node': patch -'@backstage/plugin-kubernetes-backend': patch -'@backstage/plugin-kubernetes-cluster': patch -'@backstage/plugin-notifications-node': patch -'@backstage/plugin-permission-backend': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-kubernetes-common': patch -'@backstage/plugin-permission-common': patch -'@backstage/plugin-scaffolder-common': patch -'@backstage/plugin-devtools-backend': patch -'@backstage/plugin-kubernetes-react': patch -'@backstage/plugin-permission-react': patch -'@backstage/plugin-scaffolder-react': patch -'@backstage/plugin-techdocs-backend': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-devtools-common': patch -'@backstage/plugin-kubernetes-node': patch -'@backstage/plugin-permission-node': patch -'@backstage/plugin-scaffolder-node': patch -'@backstage/plugin-signals-backend': patch -'@backstage/plugin-app-visualizer': patch -'@backstage/plugin-catalog-common': patch -'@backstage/plugin-catalog-import': patch -'@backstage/plugin-events-backend': patch -'@backstage/plugin-search-backend': patch -'@backstage/plugin-techdocs-react': patch -'@backstage/plugin-catalog-graph': patch -'@backstage/plugin-catalog-react': patch -'@backstage/plugin-config-schema': patch -'@backstage/plugin-notifications': patch -'@backstage/plugin-proxy-backend': patch -'@backstage/plugin-search-common': patch -'@backstage/plugin-signals-react': patch -'@backstage/plugin-techdocs-node': patch -'@backstage/plugin-user-settings': patch -'@backstage/plugin-auth-backend': patch -'@backstage/plugin-catalog-node': patch -'@backstage/plugin-search-react': patch -'@backstage/plugin-signals-node': patch -'@backstage/plugin-app-backend': patch -'@backstage/plugin-events-node': patch -'@backstage/plugin-auth-react': patch -'@backstage/plugin-home-react': patch -'@backstage/plugin-kubernetes': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-auth-node': patch -'@backstage/plugin-org-react': patch -'@backstage/plugin-api-docs': patch -'@backstage/plugin-app-node': patch -'@backstage/plugin-devtools': patch -'@backstage/plugin-techdocs': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-signals': patch -'@backstage/plugin-search': patch -'@backstage/plugin-home': patch -'@backstage/plugin-org': patch ---- - -Added additional plugin metadata to `package.json`. diff --git a/.changeset/new-numbers-hug.md b/.changeset/new-numbers-hug.md deleted file mode 100644 index e4e35a2825..0000000000 --- a/.changeset/new-numbers-hug.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Moved the declaration of the `SchedulerService` here, along with prefixed versions of all of the types it depends on, from `@backstage/backend-tasks` diff --git a/.changeset/nice-kangaroos-occur.md b/.changeset/nice-kangaroos-occur.md deleted file mode 100644 index 9798885d1a..0000000000 --- a/.changeset/nice-kangaroos-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Fix bug with missing Actions column after adding "pagination" prop to catalog table diff --git a/.changeset/nice-pants-shave.md b/.changeset/nice-pants-shave.md deleted file mode 100644 index 500888a817..0000000000 --- a/.changeset/nice-pants-shave.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-cloudflare-access-provider': patch -'@backstage/plugin-scaffolder-backend-module-sentry': patch -'@backstage/plugin-scaffolder-backend-module-gitea': patch -'@backstage/plugin-notifications-node': patch ---- - -Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 diff --git a/.changeset/nine-hairs-kick.md b/.changeset/nine-hairs-kick.md deleted file mode 100644 index e4160640b4..0000000000 --- a/.changeset/nine-hairs-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-gitlab': patch ---- - -Fixed an issue in `GitlabOrgDiscoveryEntityProvider` where a missing `orgEnabled` config key was throwing an error. diff --git a/.changeset/nine-ties-type.md b/.changeset/nine-ties-type.md deleted file mode 100644 index abb0661724..0000000000 --- a/.changeset/nine-ties-type.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch -'@backstage/backend-app-api': patch ---- - -Fixing issue with log meta fields possibly being circular refs diff --git a/.changeset/old-trees-check.md b/.changeset/old-trees-check.md deleted file mode 100644 index b4d745ffb5..0000000000 --- a/.changeset/old-trees-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-tasks': patch ---- - -Deprecate the legacy `TaskScheduler.fromConfig` method and stop using the `getVoidlogger` in tests files to reduce the dependency on the soon-to-deprecate `backstage-common` package. diff --git a/.changeset/olive-mangos-tickle.md b/.changeset/olive-mangos-tickle.md deleted file mode 100644 index 6033ec3ed6..0000000000 --- a/.changeset/olive-mangos-tickle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Stop using `getVoidLogger` in tests to reduce the dependency on the soon-to-deprecate `backstage-common` package. diff --git a/.changeset/orange-chefs-end.md b/.changeset/orange-chefs-end.md deleted file mode 100644 index 9ba2a29685..0000000000 --- a/.changeset/orange-chefs-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-oidc-provider': patch ---- - -if oidc server do not provide revocation_endpoint,we should not call revoke function diff --git a/.changeset/orange-pianos-eat.md b/.changeset/orange-pianos-eat.md deleted file mode 100644 index 5e085a612b..0000000000 --- a/.changeset/orange-pianos-eat.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/integration': minor ---- - -Implemented `readTree` for Harness provider to support TechDocs functionality diff --git a/.changeset/perfect-bikes-invite.md b/.changeset/perfect-bikes-invite.md deleted file mode 100644 index 96a4ad5659..0000000000 --- a/.changeset/perfect-bikes-invite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-gitlab': patch ---- - -Fixed an issue in `GitlabDiscoveryEntityProvider` where the fallback branch was taking precedence over the GitLab default branch. diff --git a/.changeset/plenty-mirrors-laugh.md b/.changeset/plenty-mirrors-laugh.md deleted file mode 100644 index f46e3b5937..0000000000 --- a/.changeset/plenty-mirrors-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend-module-microsoft-provider': patch ---- - -Minor internal type updates diff --git a/.changeset/polite-emus-invent.md b/.changeset/polite-emus-invent.md deleted file mode 100644 index a31c04e021..0000000000 --- a/.changeset/polite-emus-invent.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/backend-defaults': minor ---- - -**BREAKING**: The `workdir` argument have been removed from The `GerritUrlReader` constructor. - -**BREAKING**: The Gerrit `readTree` implementation will now only use the Gitiles api. Support -for using git to clone the repo has been removed. diff --git a/.changeset/polite-otters-talk.md b/.changeset/polite-otters-talk.md deleted file mode 100644 index e56b935c1e..0000000000 --- a/.changeset/polite-otters-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-notifications-backend-module-email': minor ---- - -add notification filters diff --git a/.changeset/popular-boxes-press.md b/.changeset/popular-boxes-press.md deleted file mode 100644 index 44b50d711a..0000000000 --- a/.changeset/popular-boxes-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-defaults': patch ---- - -Internal minor refactors of the database connectors diff --git a/.changeset/popular-carrots-love.md b/.changeset/popular-carrots-love.md deleted file mode 100644 index 22490e0b1a..0000000000 --- a/.changeset/popular-carrots-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Fixed an issue causing `SidebarSubmenu` text to not follow the theme color diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 1f6e3fc9b8..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "mode": "exit", - "tag": "next", - "initialVersions": { - "example-app": "0.2.97", - "@backstage/app-defaults": "1.5.5", - "example-app-next": "0.0.11", - "app-next-example-plugin": "0.0.11", - "example-backend": "0.0.26", - "@backstage/backend-app-api": "0.7.3", - "@backstage/backend-common": "0.22.0", - "@backstage/backend-defaults": "0.2.18", - "@backstage/backend-dev-utils": "0.1.4", - "@backstage/backend-dynamic-feature-service": "0.2.10", - "example-backend-legacy": "0.2.98", - "@backstage/backend-openapi-utils": "0.1.11", - "@backstage/backend-plugin-api": "0.6.18", - "@backstage/backend-tasks": "0.5.23", - "@backstage/backend-test-utils": "0.3.8", - "@backstage/catalog-client": "1.6.5", - "@backstage/catalog-model": "1.5.0", - "@backstage/cli": "0.26.5", - "@backstage/cli-common": "0.1.13", - "@backstage/cli-node": "0.2.5", - "@backstage/codemods": "0.1.48", - "@backstage/config": "1.2.0", - "@backstage/config-loader": "1.8.0", - "@backstage/core-app-api": "1.12.5", - "@backstage/core-compat-api": "0.2.5", - "@backstage/core-components": "0.14.7", - "@backstage/core-plugin-api": "1.9.2", - "@backstage/create-app": "0.5.15", - "@backstage/dev-utils": "1.0.32", - "e2e-test": "0.2.16", - "@backstage/e2e-test-utils": "0.1.1", - "@backstage/errors": "1.2.4", - "@backstage/eslint-plugin": "0.1.8", - "@backstage/frontend-app-api": "0.7.0", - "@backstage/frontend-plugin-api": "0.6.5", - "@backstage/frontend-test-utils": "0.1.7", - "@backstage/integration": "1.11.0", - "@backstage/integration-aws-node": "0.1.12", - "@backstage/integration-react": "1.1.27", - "@backstage/release-manifests": "0.0.11", - "@backstage/repo-tools": "0.9.0", - "@techdocs/cli": "1.8.11", - "techdocs-cli-embedded-app": "0.2.96", - "@backstage/test-utils": "1.5.5", - "@backstage/theme": "0.5.4", - "@backstage/types": "1.1.1", - "@backstage/version-bridge": "1.0.8", - "@backstage/plugin-api-docs": "0.11.5", - "@backstage/plugin-api-docs-module-protoc-gen-doc": "0.1.6", - "@backstage/plugin-app-backend": "0.3.66", - "@backstage/plugin-app-node": "0.1.18", - "@backstage/plugin-app-visualizer": "0.1.6", - "@backstage/plugin-auth-backend": "0.22.5", - "@backstage/plugin-auth-backend-module-atlassian-provider": "0.1.10", - "@backstage/plugin-auth-backend-module-aws-alb-provider": "0.1.10", - "@backstage/plugin-auth-backend-module-azure-easyauth-provider": "0.1.1", - "@backstage/plugin-auth-backend-module-bitbucket-provider": "0.1.1", - "@backstage/plugin-auth-backend-module-cloudflare-access-provider": "0.1.1", - "@backstage/plugin-auth-backend-module-gcp-iap-provider": "0.2.13", - "@backstage/plugin-auth-backend-module-github-provider": "0.1.15", - "@backstage/plugin-auth-backend-module-gitlab-provider": "0.1.15", - "@backstage/plugin-auth-backend-module-google-provider": "0.1.15", - "@backstage/plugin-auth-backend-module-guest-provider": "0.1.4", - "@backstage/plugin-auth-backend-module-microsoft-provider": "0.1.13", - "@backstage/plugin-auth-backend-module-oauth2-provider": "0.1.15", - "@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "0.1.11", - "@backstage/plugin-auth-backend-module-oidc-provider": "0.1.9", - "@backstage/plugin-auth-backend-module-okta-provider": "0.0.11", - "@backstage/plugin-auth-backend-module-pinniped-provider": "0.1.12", - "@backstage/plugin-auth-backend-module-vmware-cloud-provider": "0.1.10", - "@backstage/plugin-auth-node": "0.4.13", - "@backstage/plugin-auth-react": "0.1.2", - "@backstage/plugin-bitbucket-cloud-common": "0.2.19", - "@backstage/plugin-catalog": "1.20.0", - "@backstage/plugin-catalog-backend": "1.22.0", - "@backstage/plugin-catalog-backend-module-aws": "0.3.13", - "@backstage/plugin-catalog-backend-module-azure": "0.1.38", - "@backstage/plugin-catalog-backend-module-backstage-openapi": "0.2.1", - "@backstage/plugin-catalog-backend-module-bitbucket-cloud": "0.2.5", - "@backstage/plugin-catalog-backend-module-bitbucket-server": "0.1.32", - "@backstage/plugin-catalog-backend-module-gcp": "0.1.19", - "@backstage/plugin-catalog-backend-module-gerrit": "0.1.35", - "@backstage/plugin-catalog-backend-module-github": "0.6.1", - "@backstage/plugin-catalog-backend-module-github-org": "0.1.13", - "@backstage/plugin-catalog-backend-module-gitlab": "0.3.16", - "@backstage/plugin-catalog-backend-module-gitlab-org": "0.0.1", - "@backstage/plugin-catalog-backend-module-incremental-ingestion": "0.4.23", - "@backstage/plugin-catalog-backend-module-ldap": "0.5.34", - "@backstage/plugin-catalog-backend-module-msgraph": "0.5.26", - "@backstage/plugin-catalog-backend-module-openapi": "0.1.36", - "@backstage/plugin-catalog-backend-module-puppetdb": "0.1.24", - "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "0.1.16", - "@backstage/plugin-catalog-backend-module-unprocessed": "0.4.5", - "@backstage/plugin-catalog-common": "1.0.23", - "@backstage/plugin-catalog-graph": "0.4.5", - "@backstage/plugin-catalog-import": "0.11.0", - "@backstage/plugin-catalog-node": "1.12.0", - "@backstage/plugin-catalog-react": "1.12.0", - "@backstage/plugin-catalog-unprocessed-entities": "0.2.4", - "@backstage/plugin-catalog-unprocessed-entities-common": "0.0.1", - "@backstage/plugin-config-schema": "0.1.55", - "@backstage/plugin-devtools": "0.1.14", - "@backstage/plugin-devtools-backend": "0.3.4", - "@backstage/plugin-devtools-common": "0.1.9", - "@backstage/plugin-events-backend": "0.3.5", - "@backstage/plugin-events-backend-module-aws-sqs": "0.3.4", - "@backstage/plugin-events-backend-module-azure": "0.2.4", - "@backstage/plugin-events-backend-module-bitbucket-cloud": "0.2.4", - "@backstage/plugin-events-backend-module-gerrit": "0.2.4", - "@backstage/plugin-events-backend-module-github": "0.2.4", - "@backstage/plugin-events-backend-module-gitlab": "0.2.4", - "@backstage/plugin-events-backend-test-utils": "0.1.28", - "@backstage/plugin-events-node": "0.3.4", - "@internal/plugin-todo-list": "1.0.27", - "@internal/plugin-todo-list-backend": "1.0.27", - "@internal/plugin-todo-list-common": "1.0.18", - "@backstage/plugin-home": "0.7.4", - "@backstage/plugin-home-react": "0.1.13", - "@backstage/plugin-kubernetes": "0.11.10", - "@backstage/plugin-kubernetes-backend": "0.17.1", - "@backstage/plugin-kubernetes-cluster": "0.0.11", - "@backstage/plugin-kubernetes-common": "0.7.6", - "@backstage/plugin-kubernetes-node": "0.1.12", - "@backstage/plugin-kubernetes-react": "0.3.5", - "@backstage/plugin-notifications": "0.2.1", - "@backstage/plugin-notifications-backend": "0.2.1", - "@backstage/plugin-notifications-backend-module-email": "0.0.1", - "@backstage/plugin-notifications-common": "0.0.3", - "@backstage/plugin-notifications-node": "0.1.4", - "@backstage/plugin-org": "0.6.25", - "@backstage/plugin-org-react": "0.1.24", - "@backstage/plugin-permission-backend": "0.5.42", - "@backstage/plugin-permission-backend-module-allow-all-policy": "0.1.15", - "@backstage/plugin-permission-common": "0.7.13", - "@backstage/plugin-permission-node": "0.7.29", - "@backstage/plugin-permission-react": "0.4.22", - "@backstage/plugin-proxy-backend": "0.4.16", - "@backstage/plugin-scaffolder": "1.20.0", - "@backstage/plugin-scaffolder-backend": "1.22.6", - "@backstage/plugin-scaffolder-backend-module-azure": "0.1.10", - "@backstage/plugin-scaffolder-backend-module-bitbucket": "0.2.8", - "@backstage/plugin-scaffolder-backend-module-bitbucket-cloud": "0.1.8", - "@backstage/plugin-scaffolder-backend-module-bitbucket-server": "0.1.8", - "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown": "0.2.19", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.2.42", - "@backstage/plugin-scaffolder-backend-module-gerrit": "0.1.10", - "@backstage/plugin-scaffolder-backend-module-gitea": "0.1.8", - "@backstage/plugin-scaffolder-backend-module-github": "0.2.8", - "@backstage/plugin-scaffolder-backend-module-gitlab": "0.4.0", - "@backstage/plugin-scaffolder-backend-module-notifications": "0.0.1", - "@backstage/plugin-scaffolder-backend-module-rails": "0.4.35", - "@backstage/plugin-scaffolder-backend-module-sentry": "0.1.26", - "@backstage/plugin-scaffolder-backend-module-yeoman": "0.3.1", - "@backstage/plugin-scaffolder-common": "1.5.2", - "@backstage/plugin-scaffolder-node": "0.4.4", - "@backstage/plugin-scaffolder-node-test-utils": "0.1.4", - "@backstage/plugin-scaffolder-react": "1.8.5", - "@backstage/plugin-search": "1.4.11", - "@backstage/plugin-search-backend": "1.5.8", - "@backstage/plugin-search-backend-module-catalog": "0.1.24", - "@backstage/plugin-search-backend-module-elasticsearch": "1.4.1", - "@backstage/plugin-search-backend-module-explore": "0.1.24", - "@backstage/plugin-search-backend-module-pg": "0.5.27", - "@backstage/plugin-search-backend-module-stack-overflow-collator": "0.1.11", - "@backstage/plugin-search-backend-module-techdocs": "0.1.23", - "@backstage/plugin-search-backend-node": "1.2.22", - "@backstage/plugin-search-common": "1.2.11", - "@backstage/plugin-search-react": "1.7.11", - "@backstage/plugin-signals": "0.0.6", - "@backstage/plugin-signals-backend": "0.1.4", - "@backstage/plugin-signals-node": "0.1.4", - "@backstage/plugin-signals-react": "0.0.3", - "@backstage/plugin-techdocs": "1.10.5", - "@backstage/plugin-techdocs-addons-test-utils": "1.0.32", - "@backstage/plugin-techdocs-backend": "1.10.5", - "@backstage/plugin-techdocs-module-addons-contrib": "1.1.10", - "@backstage/plugin-techdocs-node": "1.12.4", - "@backstage/plugin-techdocs-react": "1.2.4", - "@backstage/plugin-user-settings": "0.8.6", - "@backstage/plugin-user-settings-backend": "0.2.17", - "yarn-plugin-backstage": "0.0.0", - "@backstage/plugin-auth-backend-module-onelogin-provider": "0.0.0", - "@backstage/plugin-user-settings-common": "0.0.0" - }, - "changesets": [ - "beige-eagles-cheat", - "blue-hairs-marry", - "brave-apples-move", - "breezy-badgers-train", - "breezy-planets-sparkle", - "brown-bananas-talk", - "calm-cars-serve", - "calm-files-sort", - "calm-plums-wink", - "chilled-planes-sniff", - "clever-kids-return", - "clever-radios-yawn", - "cold-seas-end", - "create-app-1716302437", - "create-app-1716903719", - "cuddly-eggs-sin", - "cuddly-jobs-kick", - "cyan-jobs-visit", - "cyan-paws-beg", - "cyan-snails-peel", - "eighty-kings-dress", - "eighty-yaks-switch", - "empty-avocados-tease", - "empty-spoons-tell", - "empty-tables-ring", - "famous-monkeys-count", - "forty-adults-roll", - "forty-experts-live", - "four-adults-mix", - "friendly-keys-fold", - "gentle-baboons-peel", - "gentle-llamas-cross", - "gold-teachers-wink", - "great-clouds-hang", - "great-cougars-guess", - "green-apricots-invite", - "honest-badgers-ring", - "honest-pandas-chew", - "itchy-spoons-cry", - "large-months-decide", - "late-ants-impress", - "late-students-live", - "light-rice-argue", - "little-cooks-approve", - "long-llamas-push-atlassian", - "long-llamas-push-bitbucket", - "long-llamas-push-github", - "long-llamas-push-gitlab", - "long-llamas-push-google", - "long-llamas-push-microsoft", - "long-llamas-push-oauth2", - "long-llamas-push-oidc", - "long-llamas-push-okta", - "long-llamas-push-pinniped", - "long-llamas-push-vmware-cloud", - "loud-pumpkins-bow", - "lovely-hats-pay", - "lucky-taxis-rule", - "many-moles-sing", - "many-windows-attack", - "mean-laws-lay", - "moody-buttons-hope", - "nasty-roses-flash", - "neat-rivers-share", - "nervous-kings-change", - "nervous-queens-fly", - "new-masks-occur", - "new-numbers-hug", - "nice-kangaroos-occur", - "nice-pants-shave", - "nine-hairs-kick", - "nine-ties-type", - "old-trees-check", - "olive-mangos-tickle", - "orange-chefs-end", - "orange-pianos-eat", - "perfect-bikes-invite", - "polite-otters-talk", - "popular-boxes-press", - "popular-carrots-love", - "pretty-berries-live", - "pretty-spoons-knock", - "proud-readers-move", - "purple-mugs-beg", - "rare-frogs-beam", - "real-ghosts-return", - "rich-teachers-agree", - "rude-kings-press", - "rude-snakes-clap", - "selfish-pugs-lick", - "serious-yaks-sit", - "seven-geese-raise", - "shaggy-jokes-promise", - "shaggy-mugs-kiss", - "shaggy-zebras-mate", - "six-llamas-give", - "slimy-fans-raise", - "slow-dolls-type", - "smooth-gifts-nail", - "soft-flies-live", - "sour-colts-juggle", - "spicy-brooms-hang", - "spicy-camels-happen", - "spicy-ears-raise", - "spotty-plants-switch", - "spotty-ravens-perform", - "strong-moose-work", - "stupid-tigers-bake", - "swift-islands-leave", - "tall-bananas-reflect", - "tall-lies-fetch", - "tall-pumas-teach", - "tasty-horses-breathe", - "tender-seas-listen", - "thirty-plums-shout", - "tiny-pandas-return", - "twelve-pumpkins-fold", - "twenty-masks-dance", - "warm-bees-hope", - "warm-mayflies-yell", - "weak-gifts-occur", - "wet-crabs-guess", - "wild-coats-doubt", - "wild-doors-cheat", - "wild-ears-walk", - "wise-beers-doubt", - "wise-vans-sin", - "wise-wasps-look", - "young-apes-thank", - "young-camels-return" - ] -} diff --git a/.changeset/pretty-berries-live.md b/.changeset/pretty-berries-live.md deleted file mode 100644 index e83ebeef13..0000000000 --- a/.changeset/pretty-berries-live.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-defaults': patch -'@backstage/backend-common': patch ---- - -Deprecated `dropDatabase` diff --git a/.changeset/pretty-spoons-knock.md b/.changeset/pretty-spoons-knock.md deleted file mode 100644 index 5eddce54d9..0000000000 --- a/.changeset/pretty-spoons-knock.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder-react': patch -'@backstage/plugin-catalog-react': patch ---- - -Prevents Autocomplete dropdown from overlapping sidebar on hovering it diff --git a/.changeset/proud-readers-move.md b/.changeset/proud-readers-move.md deleted file mode 100644 index 70d94b2e6d..0000000000 --- a/.changeset/proud-readers-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-graph': patch ---- - -The `catalogEntity` external route will now by default bind to the catalog entity page if it is available. diff --git a/.changeset/purple-mugs-beg.md b/.changeset/purple-mugs-beg.md deleted file mode 100644 index 2507b5d706..0000000000 --- a/.changeset/purple-mugs-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli-common': patch ---- - -The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`. diff --git a/.changeset/rare-frogs-beam.md b/.changeset/rare-frogs-beam.md deleted file mode 100644 index 981c0c00ce..0000000000 --- a/.changeset/rare-frogs-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Fixed a broken link to the node-postgres documentation diff --git a/.changeset/rare-peas-dream.md b/.changeset/rare-peas-dream.md new file mode 100644 index 0000000000..443f8c566d --- /dev/null +++ b/.changeset/rare-peas-dream.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-defaults': patch +--- + +Repack the package to fix issues with typescript with named exports diff --git a/.changeset/real-ghosts-return.md b/.changeset/real-ghosts-return.md deleted file mode 100644 index 9f81649254..0000000000 --- a/.changeset/real-ghosts-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Bumped TypeScript to version `5.4`. diff --git a/.changeset/renovate-7906f3a.md b/.changeset/renovate-7906f3a.md deleted file mode 100644 index 2584e64e5f..0000000000 --- a/.changeset/renovate-7906f3a.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-home-react': patch -'@backstage/plugin-home': patch -'@backstage/plugin-scaffolder-react': patch -'@backstage/plugin-scaffolder': patch ---- - -Updated dependency `@rjsf/utils` to `5.18.4`. -Updated dependency `@rjsf/core` to `5.18.4`. -Updated dependency `@rjsf/material-ui` to `5.18.4`. -Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. diff --git a/.changeset/rich-bears-march.md b/.changeset/rich-bears-march.md new file mode 100644 index 0000000000..ec4a4a9404 --- /dev/null +++ b/.changeset/rich-bears-march.md @@ -0,0 +1,5 @@ +--- +'@techdocs/cli': patch +--- + +Import discovery from backend-defaults instead of backend-common diff --git a/.changeset/rich-teachers-agree.md b/.changeset/rich-teachers-agree.md deleted file mode 100644 index eed8517619..0000000000 --- a/.changeset/rich-teachers-agree.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -Added the following default targets for external routes: - -- `createComponent` binds to the Scaffolder page. -- `viewTechDoc` binds to the TechDocs entity documentation page. -- `createFromTemplate` binds to the Scaffolder selected template page. diff --git a/.changeset/rude-kings-press.md b/.changeset/rude-kings-press.md deleted file mode 100644 index 5c10753f8a..0000000000 --- a/.changeset/rude-kings-press.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Deprecated core service factories and implementations and moved them over to -subpath exports on `@backstage/backend-defaults` instead. E.g. -`@backstage/backend-defaults/scheduler` is where the service factory and default -implementation of `coreServices.scheduler` now lives. diff --git a/.changeset/rude-snakes-clap.md b/.changeset/rude-snakes-clap.md deleted file mode 100644 index 6292730c4c..0000000000 --- a/.changeset/rude-snakes-clap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-user-settings-backend': patch -'@backstage/plugin-user-settings-common': patch -'@backstage/plugin-user-settings': patch ---- - -Use signals to update user settings across sessions diff --git a/.changeset/selfish-pugs-lick.md b/.changeset/selfish-pugs-lick.md deleted file mode 100644 index 1ac7ac7321..0000000000 --- a/.changeset/selfish-pugs-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-permission-node': patch ---- - -Import `tokenManager` definition from `@backstage/backend-plugin-api` diff --git a/.changeset/serious-yaks-sit.md b/.changeset/serious-yaks-sit.md deleted file mode 100644 index 5afc74f955..0000000000 --- a/.changeset/serious-yaks-sit.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Added support for configuration of route bindings through static configuration, and default targets for external route refs. - -In addition to configuring route bindings through code, it is now also possible to configure route bindings under the `app.routes.bindings` key, for example: - -```yaml -app: - routes: - bindings: - catalog.createComponent: catalog-import.importPage -``` - -Each key in the route binding object is of the form `.`, where the route name is key used in the `externalRoutes` object passed to `createPlugin`. The value is of the same form, but with the name taken from the plugin `routes` option instead. - -The equivalent of the above configuration in code is the following: - -```ts -const app = createApp({ - // ... - bindRoutes({ bind }) { - bind(catalogPlugin.externalRoutes, { - createComponent: catalogImportPlugin.routes.importPage, - }); - }, -}); -``` diff --git a/.changeset/seven-geese-raise.md b/.changeset/seven-geese-raise.md deleted file mode 100644 index 3d6e2347b9..0000000000 --- a/.changeset/seven-geese-raise.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': patch -'@backstage/plugin-search-backend': patch ---- - -Split backend search plugin startup into "init" and "start" stages to ensure necessary initialization has happened before startup diff --git a/.changeset/shaggy-jokes-promise.md b/.changeset/shaggy-jokes-promise.md deleted file mode 100644 index e7788b69f4..0000000000 --- a/.changeset/shaggy-jokes-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend': patch ---- - -Move @backstage/repo-tools to devDependencies diff --git a/.changeset/shaggy-mugs-kiss.md b/.changeset/shaggy-mugs-kiss.md deleted file mode 100644 index 8f0e800acd..0000000000 --- a/.changeset/shaggy-mugs-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-tasks': patch ---- - -More detailed deprecation messages diff --git a/.changeset/shaggy-zebras-mate.md b/.changeset/shaggy-zebras-mate.md deleted file mode 100644 index c66a92d1e9..0000000000 --- a/.changeset/shaggy-zebras-mate.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-defaults': patch -'@backstage/backend-common': patch ---- - -Moved over all URL reader functionality from `@backstage/backend-common` to `@backstage/backend-defaults/urlReader`. Please update your imports. diff --git a/.changeset/silent-experts-move.md b/.changeset/silent-experts-move.md new file mode 100644 index 0000000000..06441a62c6 --- /dev/null +++ b/.changeset/silent-experts-move.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Subpath export `package.json` should be of a unique name to avoid typescript resolution issues diff --git a/.changeset/silver-scissors-fold.md b/.changeset/silver-scissors-fold.md deleted file mode 100644 index d562b35d3c..0000000000 --- a/.changeset/silver-scissors-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Removed the circular dependency on `@backstage/backend-app-api` diff --git a/.changeset/six-llamas-give.md b/.changeset/six-llamas-give.md deleted file mode 100644 index 9bfbf52625..0000000000 --- a/.changeset/six-llamas-give.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-defaults': minor -'@backstage/backend-common': minor ---- - -Deprecated and moved over core services to `@backstage/backend-defaults` diff --git a/.changeset/slimy-fans-raise.md b/.changeset/slimy-fans-raise.md deleted file mode 100644 index 782ef4bc82..0000000000 --- a/.changeset/slimy-fans-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -Fix weird opening behaviour of the component. diff --git a/.changeset/slow-dolls-type.md b/.changeset/slow-dolls-type.md deleted file mode 100644 index d2626f3ab3..0000000000 --- a/.changeset/slow-dolls-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': minor ---- - -Changed the way to display entities in EntityPicker to use entityPresentationApi instead of humanizeEntityRef diff --git a/.changeset/smooth-gifts-nail.md b/.changeset/smooth-gifts-nail.md deleted file mode 100644 index aa2585bc4f..0000000000 --- a/.changeset/smooth-gifts-nail.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch -'@backstage/backend-app-api': patch ---- - -Updating the logger redaction message to something less dramatic diff --git a/.changeset/soft-clocks-bake.md b/.changeset/soft-clocks-bake.md new file mode 100644 index 0000000000..29d7658869 --- /dev/null +++ b/.changeset/soft-clocks-bake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Added small notes to AboutCard to discourage customizability PRs diff --git a/.changeset/soft-flies-live.md b/.changeset/soft-flies-live.md deleted file mode 100644 index b331269647..0000000000 --- a/.changeset/soft-flies-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-gitlab': patch ---- - -Add new `gitlab:pipeline:trigger` action to trigger GitLab pipelines. diff --git a/.changeset/sour-colts-juggle.md b/.changeset/sour-colts-juggle.md deleted file mode 100644 index 35dc79452a..0000000000 --- a/.changeset/sour-colts-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -Fix the logger service mock to prevent returning `undefined` from the `child` method. diff --git a/.changeset/spicy-brooms-hang.md b/.changeset/spicy-brooms-hang.md deleted file mode 100644 index 23f7da309b..0000000000 --- a/.changeset/spicy-brooms-hang.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder-react': patch -'@backstage/plugin-scaffolder': patch ---- - -Fixing bug in `formData` type as it should be `optional` as it's possibly undefined diff --git a/.changeset/spicy-camels-happen.md b/.changeset/spicy-camels-happen.md deleted file mode 100644 index 1017f042ad..0000000000 --- a/.changeset/spicy-camels-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -We are deprecating the legacy router handlers and contexts in preparation for the new backend system stable release. diff --git a/.changeset/spicy-ears-raise.md b/.changeset/spicy-ears-raise.md deleted file mode 100644 index a53ed9c721..0000000000 --- a/.changeset/spicy-ears-raise.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/integration-react': patch -'@backstage/backend-common': patch -'@backstage/integration': patch ---- - -Fix AWS CodeCommit integration by allowing to change the host diff --git a/.changeset/spotty-plants-switch.md b/.changeset/spotty-plants-switch.md deleted file mode 100644 index a5951de05d..0000000000 --- a/.changeset/spotty-plants-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-ldap': minor ---- - -Migrate LDAP catalog module to the new backend system. diff --git a/.changeset/spotty-ravens-perform.md b/.changeset/spotty-ravens-perform.md deleted file mode 100644 index 507561c11c..0000000000 --- a/.changeset/spotty-ravens-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Adds icons to status component diff --git a/.changeset/strong-moose-work.md b/.changeset/strong-moose-work.md deleted file mode 100644 index 443b708e51..0000000000 --- a/.changeset/strong-moose-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/repo-tools': patch ---- - -Add `--client-additional-properties` option to `openapi generate` command diff --git a/.changeset/stupid-tigers-bake.md b/.changeset/stupid-tigers-bake.md deleted file mode 100644 index a4579ab05a..0000000000 --- a/.changeset/stupid-tigers-bake.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-kubernetes-backend': minor -'@backstage/plugin-kubernetes-common': minor -'@backstage/plugin-kubernetes-react': minor ---- - -Update kubernetes plugins to use autoscaling/v2 diff --git a/.changeset/swift-islands-leave.md b/.changeset/swift-islands-leave.md deleted file mode 100644 index 3b0b460733..0000000000 --- a/.changeset/swift-islands-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Removed max width from `Select` component. diff --git a/.changeset/tall-bananas-reflect.md b/.changeset/tall-bananas-reflect.md deleted file mode 100644 index 00e8fd8b43..0000000000 --- a/.changeset/tall-bananas-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Remove Tech Radar menu item from sidebar of scaffolded app to align with removal of tech-radar plugin from backend diff --git a/.changeset/tall-lies-fetch.md b/.changeset/tall-lies-fetch.md deleted file mode 100644 index a4484a5687..0000000000 --- a/.changeset/tall-lies-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Export `catalogTranslationRef` under `/alpha` diff --git a/.changeset/tall-pumas-teach.md b/.changeset/tall-pumas-teach.md deleted file mode 100644 index 39e7c06297..0000000000 --- a/.changeset/tall-pumas-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-react': patch ---- - -Fixed a typo '$' in the review step label diff --git a/.changeset/tasty-forks-compare.md b/.changeset/tasty-forks-compare.md deleted file mode 100644 index 2b525ed51a..0000000000 --- a/.changeset/tasty-forks-compare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-node': patch ---- - -Updated `getRepoUrlFromLocationAnnotation` to check for Harness SCM integration diff --git a/.changeset/tasty-horses-breathe.md b/.changeset/tasty-horses-breathe.md deleted file mode 100644 index afd20e6c4a..0000000000 --- a/.changeset/tasty-horses-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Added a new `--publish` flag to the `repo fix` command. This command will validate and if possible generate the metadata required for publishing packages with the Backstage CLI. In addition, a check has been added that the `backstage.pluginId` and `backstage.pluginPackage(s)` fields are present when packing a package for publishing. diff --git a/.changeset/tender-seas-listen.md b/.changeset/tender-seas-listen.md deleted file mode 100644 index 86b0bf4618..0000000000 --- a/.changeset/tender-seas-listen.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-scaffolder-react': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-catalog': patch ---- - -updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: - -- `scaffolder.task.create` -- `scaffolder.task.cancel` -- `scaffolder.task.read` diff --git a/.changeset/thick-lizards-divide.md b/.changeset/thick-lizards-divide.md new file mode 100644 index 0000000000..84c1ab311a --- /dev/null +++ b/.changeset/thick-lizards-divide.md @@ -0,0 +1,6 @@ +--- +'@backstage/backend-app-api': patch +'@backstage/backend-common': patch +--- + +Fixing exporting of classes properly from new packages diff --git a/.changeset/thirty-plums-shout.md b/.changeset/thirty-plums-shout.md deleted file mode 100644 index 56ac640326..0000000000 --- a/.changeset/thirty-plums-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. diff --git a/.changeset/three-lies-explode.md b/.changeset/three-lies-explode.md deleted file mode 100644 index df3556d0ba..0000000000 --- a/.changeset/three-lies-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Fix bug in `getLocationByEntity` diff --git a/.changeset/tiny-pandas-return.md b/.changeset/tiny-pandas-return.md deleted file mode 100644 index cc9210a368..0000000000 --- a/.changeset/tiny-pandas-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-api-docs': patch ---- - -`DefaultApiExplorerPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. diff --git a/.changeset/twelve-pumpkins-fold.md b/.changeset/twelve-pumpkins-fold.md deleted file mode 100644 index ae63a8fce2..0000000000 --- a/.changeset/twelve-pumpkins-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Increase max wait time in debug:wait action to 10 minutes diff --git a/.changeset/twenty-masks-dance.md b/.changeset/twenty-masks-dance.md deleted file mode 100644 index f08e6301c9..0000000000 --- a/.changeset/twenty-masks-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Fixed a bug in `SupportButton` where the title was rendered with the characteristics of a button. diff --git a/.changeset/twenty-seals-guess.md b/.changeset/twenty-seals-guess.md deleted file mode 100644 index a206105b46..0000000000 --- a/.changeset/twenty-seals-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Finalizes the deprecation of legacy backend utilities. Deprecated utilities include the `ServiceBuilder` type, `notFoundHandler` and `redactWintonLogLine` functions. diff --git a/.changeset/violet-ducks-care.md b/.changeset/violet-ducks-care.md deleted file mode 100644 index 6ba59fd2b5..0000000000 --- a/.changeset/violet-ducks-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Ensure name and title are both indexed by the DefaultCatalogCollator diff --git a/.changeset/warm-bees-hope.md b/.changeset/warm-bees-hope.md deleted file mode 100644 index 2a3de7fda7..0000000000 --- a/.changeset/warm-bees-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Renamed `BackendPluginConfig`, `BackendModuleConfig`, and `ExtensionPointConfig` respectively to `CreateBackendPluginOptions`, `CreateBackendModuleOptions`, and `CreateExtensionPointOptions` to standardize frontend and backend factories signatures. diff --git a/.changeset/warm-mayflies-yell.md b/.changeset/warm-mayflies-yell.md deleted file mode 100644 index a2068668f7..0000000000 --- a/.changeset/warm-mayflies-yell.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-scaffolder': minor ---- - -Added the following default targets for external routes: - -- `registerComponent` binds to the catalog import page. -- `viewTechDoc` binds to the TechDocs entity documentation page. diff --git a/.changeset/weak-gifts-occur.md b/.changeset/weak-gifts-occur.md deleted file mode 100644 index 7834c0a9d9..0000000000 --- a/.changeset/weak-gifts-occur.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-scaffolder-common': patch ---- - -added the following new permissions to the scaffolder backend endpoints: - -- `scaffolder.task.create` -- `scaffolder.task.cancel` -- `scaffolder.task.read` diff --git a/.changeset/wet-crabs-guess.md b/.changeset/wet-crabs-guess.md deleted file mode 100644 index c8a9282a47..0000000000 --- a/.changeset/wet-crabs-guess.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch -'@backstage/plugin-catalog-backend': patch ---- - -Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package. diff --git a/.changeset/wicked-dingos-heal.md b/.changeset/wicked-dingos-heal.md deleted file mode 100644 index 367c65e95e..0000000000 --- a/.changeset/wicked-dingos-heal.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/integration': minor ---- - -**BREAKING**: `gitilesBaseUrl` is now mandatory for the Gerrit integration. The -ability to override this requirement using the `DISABLE_GERRIT_GITILES_REQUIREMENT` -environment variable has been removed. diff --git a/.changeset/wild-coats-doubt.md b/.changeset/wild-coats-doubt.md deleted file mode 100644 index 4e86911127..0000000000 --- a/.changeset/wild-coats-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Updated to use the new `@backstage/plugin-auth-backend-module-onelogin-provider` implementation diff --git a/.changeset/wild-doors-cheat.md b/.changeset/wild-doors-cheat.md deleted file mode 100644 index c302dde467..0000000000 --- a/.changeset/wild-doors-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Fix `versions:check --fix` when `yarn.lock` has multiple joint versions in the same section diff --git a/.changeset/wild-ears-walk.md b/.changeset/wild-ears-walk.md deleted file mode 100644 index 072c545f1a..0000000000 --- a/.changeset/wild-ears-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-notifications-backend': minor ---- - -adding filtering of notifications by processors diff --git a/.changeset/wild-eyes-grab.md b/.changeset/wild-eyes-grab.md deleted file mode 100644 index f382c406f3..0000000000 --- a/.changeset/wild-eyes-grab.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@backstage/plugin-search-backend-module-elasticsearch': minor ---- - -**BREAKING**: The ElasticSearch indexer will now delete stale indices matching the indexer's pattern. -The method `getAliases` of `ElasticSearchClientWrapper` has been deprecated and might be removed in future releases. - -An indexer using the `some-type-index__*` pattern will remove indices matching this pattern after indexation -to prevent stale indices leading to shards exhaustion. - -Before upgrading ensure that the index pattern doesn't match indices that are not managed by Backstage -and thus shouldn't be deleted. - -Note: The ElasticSearch indexer already uses wildcards patterns to remove aliases on these indices. diff --git a/.changeset/wise-beers-doubt.md b/.changeset/wise-beers-doubt.md deleted file mode 100644 index be70f326e0..0000000000 --- a/.changeset/wise-beers-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Updated `node-gyp` to v10 diff --git a/.changeset/wise-vans-sin.md b/.changeset/wise-vans-sin.md deleted file mode 100644 index 37565c9300..0000000000 --- a/.changeset/wise-vans-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Deprecate legacy service logger helpers and stop using `getVoidLogger` in tests. diff --git a/.changeset/wise-wasps-look.md b/.changeset/wise-wasps-look.md deleted file mode 100644 index 34f52b3a7b..0000000000 --- a/.changeset/wise-wasps-look.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Change owner to project for azure host diff --git a/.changeset/young-apes-thank.md b/.changeset/young-apes-thank.md deleted file mode 100644 index 570316b2e2..0000000000 --- a/.changeset/young-apes-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-github': minor ---- - -Allow empty author info in createPullRequest action for Github diff --git a/.changeset/young-camels-return.md b/.changeset/young-camels-return.md deleted file mode 100644 index efdd822788..0000000000 --- a/.changeset/young-camels-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Bump `esbuild` target for package builds to `ES2022`. diff --git a/.changeset/young-houses-unite.md b/.changeset/young-houses-unite.md new file mode 100644 index 0000000000..47ffe43c21 --- /dev/null +++ b/.changeset/young-houses-unite.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Fixing issue with `MiddlewareFactory` deprecation wrapping diff --git a/.github/vale/config/vocabularies/Backstage/accept.txt b/.github/vale/config/vocabularies/Backstage/accept.txt index 4f89369011..6ff0ef56da 100644 --- a/.github/vale/config/vocabularies/Backstage/accept.txt +++ b/.github/vale/config/vocabularies/Backstage/accept.txt @@ -161,6 +161,7 @@ hoc horizontalpodautoscalers Hostname hotspots +howto http https Iain @@ -291,6 +292,7 @@ Periskop permissioned permissioning pipx +plaintext plantuml Platformize Podman diff --git a/.github/workflows/api-breaking-changes-comment.yml b/.github/workflows/api-breaking-changes-comment.yml index f8fc638905..c3886e05b9 100644 --- a/.github/workflows/api-breaking-changes-comment.yml +++ b/.github/workflows/api-breaking-changes-comment.yml @@ -22,7 +22,7 @@ jobs: action: ${{ steps.event.outputs.ACTION }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 4bf55e1928..e334a29b82 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -14,7 +14,7 @@ jobs: if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/automate_area-labels.yml b/.github/workflows/automate_area-labels.yml index 74f577f360..bde8f15606 100644 --- a/.github/workflows/automate_area-labels.yml +++ b/.github/workflows/automate_area-labels.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/automate_changeset_feedback.yml b/.github/workflows/automate_changeset_feedback.yml index e0558ca269..94b4b51848 100644 --- a/.github/workflows/automate_changeset_feedback.yml +++ b/.github/workflows/automate_changeset_feedback.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/automate_merge_message.yml b/.github/workflows/automate_merge_message.yml index d96c03f8e0..2aac0a17f6 100644 --- a/.github/workflows/automate_merge_message.yml +++ b/.github/workflows/automate_merge_message.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/automate_stale.yml b/.github/workflows/automate_stale.yml index afb8f3b838..6cb16937c6 100644 --- a/.github/workflows/automate_stale.yml +++ b/.github/workflows/automate_stale.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/ci-noop.yml b/.github/workflows/ci-noop.yml index 4dc8594bc9..adf0feb926 100644 --- a/.github/workflows/ci-noop.yml +++ b/.github/workflows/ci-noop.yml @@ -40,7 +40,7 @@ jobs: name: Test ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5dccceefd..135076ba40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: name: Install ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -64,7 +64,7 @@ jobs: name: Verify ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index ede29d2730..923293667a 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml index 2314f372a9..8b4709337a 100644 --- a/.github/workflows/deploy_docker-image.yml +++ b/.github/workflows/deploy_docker-image.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -51,7 +51,7 @@ jobs: working-directory: ./example-app - name: Login to GitHub Container Registry - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 + uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/deploy_microsite.yml b/.github/workflows/deploy_microsite.yml index 7163bf7348..a0cdae5774 100644 --- a/.github/workflows/deploy_microsite.yml +++ b/.github/workflows/deploy_microsite.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index 2ba1ee2179..db9489dbb8 100644 --- a/.github/workflows/deploy_nightly.yml +++ b/.github/workflows/deploy_nightly.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index f9724eaf60..81e95fab97 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -154,7 +154,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml index 7afc0a81bb..26e394fd87 100644 --- a/.github/workflows/issue.yaml +++ b/.github/workflows/issue.yaml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/pr-review-comment-trigger.yaml b/.github/workflows/pr-review-comment-trigger.yaml index bea1618608..ccf02d5aee 100644 --- a/.github/workflows/pr-review-comment-trigger.yaml +++ b/.github/workflows/pr-review-comment-trigger.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/pr-review-comment.yaml b/.github/workflows/pr-review-comment.yaml index d722894df7..1b2b9ee5be 100644 --- a/.github/workflows/pr-review-comment.yaml +++ b/.github/workflows/pr-review-comment.yaml @@ -17,7 +17,7 @@ jobs: steps: # Inspired by https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8193bfaf79..bf7c5cfa8d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,7 +18,7 @@ jobs: if: github.repository == 'backstage/backstage' && ( github.event.pull_request || github.event.issue.pull_request ) steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 54434f8935..ecf18d71ad 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@530d4feaa9c62aaab2d250371e2061eb7a172363 # v3.25.9 + uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10 with: sarif_file: results.sarif diff --git a/.github/workflows/sync_code-formatting.yml b/.github/workflows/sync_code-formatting.yml index 13d6d7096c..9886c94830 100644 --- a/.github/workflows/sync_code-formatting.yml +++ b/.github/workflows/sync_code-formatting.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/sync_dependabot-changesets.yml b/.github/workflows/sync_dependabot-changesets.yml index 246cff50fb..ce79efb148 100644 --- a/.github/workflows/sync_dependabot-changesets.yml +++ b/.github/workflows/sync_dependabot-changesets.yml @@ -11,7 +11,7 @@ jobs: if: github.actor == 'dependabot[bot]' && github.repository == 'backstage/backstage' steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/sync_release-manifest.yml b/.github/workflows/sync_release-manifest.yml index ae988d35e0..db35945550 100644 --- a/.github/workflows/sync_release-manifest.yml +++ b/.github/workflows/sync_release-manifest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/sync_renovate-changesets.yml b/.github/workflows/sync_renovate-changesets.yml index 788e5c4ef1..4ba792d4e0 100644 --- a/.github/workflows/sync_renovate-changesets.yml +++ b/.github/workflows/sync_renovate-changesets.yml @@ -11,7 +11,7 @@ jobs: if: github.actor == 'renovate[bot]' && github.repository == 'backstage/backstage' steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/sync_snyk-github-issues.yml b/.github/workflows/sync_snyk-github-issues.yml index 48909a7425..fb3456bfb6 100644 --- a/.github/workflows/sync_snyk-github-issues.yml +++ b/.github/workflows/sync_snyk-github-issues.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/sync_snyk-monitor.yml b/.github/workflows/sync_snyk-monitor.yml index 9fdf9a3a71..a3c72c1d7b 100644 --- a/.github/workflows/sync_snyk-monitor.yml +++ b/.github/workflows/sync_snyk-monitor.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -58,6 +58,6 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} NODE_OPTIONS: --max-old-space-size=7168 - name: Upload Snyk report - uses: github/codeql-action/upload-sarif@530d4feaa9c62aaab2d250371e2061eb7a172363 # v3.25.9 + uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10 with: sarif_file: snyk.sarif diff --git a/.github/workflows/sync_version-packages.yml b/.github/workflows/sync_version-packages.yml index b53eab54d0..3a10083b7e 100644 --- a/.github/workflows/sync_version-packages.yml +++ b/.github/workflows/sync_version-packages.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_accessibility-noop.yml b/.github/workflows/verify_accessibility-noop.yml index 7ec67cbf0f..6b51713aa1 100644 --- a/.github/workflows/verify_accessibility-noop.yml +++ b/.github/workflows/verify_accessibility-noop.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_accessibility.yml b/.github/workflows/verify_accessibility.yml index 4883018fa6..bb46bbd4c1 100644 --- a/.github/workflows/verify_accessibility.yml +++ b/.github/workflows/verify_accessibility.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_codeql.yml b/.github/workflows/verify_codeql.yml index 8322515cfe..e19187b6ce 100644 --- a/.github/workflows/verify_codeql.yml +++ b/.github/workflows/verify_codeql.yml @@ -42,7 +42,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -55,7 +55,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@530d4feaa9c62aaab2d250371e2061eb7a172363 # v3.25.9 + uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -66,7 +66,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@530d4feaa9c62aaab2d250371e2061eb7a172363 # v3.25.9 + uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -80,4 +80,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@530d4feaa9c62aaab2d250371e2061eb7a172363 # v3.25.9 + uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10 diff --git a/.github/workflows/verify_docs-quality.yml b/.github/workflows/verify_docs-quality.yml index 19bf87c0b0..2a0c4449a9 100644 --- a/.github/workflows/verify_docs-quality.yml +++ b/.github/workflows/verify_docs-quality.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-kubernetes-noop.yml b/.github/workflows/verify_e2e-kubernetes-noop.yml index 6352abce70..b51c7fd201 100644 --- a/.github/workflows/verify_e2e-kubernetes-noop.yml +++ b/.github/workflows/verify_e2e-kubernetes-noop.yml @@ -23,7 +23,7 @@ jobs: name: Kubernetes ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-kubernetes.yml b/.github/workflows/verify_e2e-kubernetes.yml index ff6a6cf0c4..b7465945ea 100644 --- a/.github/workflows/verify_e2e-kubernetes.yml +++ b/.github/workflows/verify_e2e-kubernetes.yml @@ -22,7 +22,7 @@ jobs: name: Kubernetes ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit @@ -40,7 +40,7 @@ jobs: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: bootstrap kind - uses: helm/kind-action@99576bfa6ddf9a8e612d83b513da5a75875caced # v1.9.0 + uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 - name: kubernetes test working-directory: packages/backend-common diff --git a/.github/workflows/verify_e2e-linux-noop.yml b/.github/workflows/verify_e2e-linux-noop.yml index 2b7eb1d84b..c042bdeac7 100644 --- a/.github/workflows/verify_e2e-linux-noop.yml +++ b/.github/workflows/verify_e2e-linux-noop.yml @@ -29,7 +29,7 @@ jobs: name: E2E Linux ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-linux.yml b/.github/workflows/verify_e2e-linux.yml index 4e8b86cd56..d6491f1e3c 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -41,7 +41,7 @@ jobs: name: E2E Linux ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-techdocs.yml b/.github/workflows/verify_e2e-techdocs.yml index f18f244b46..41f76a6410 100644 --- a/.github/workflows/verify_e2e-techdocs.yml +++ b/.github/workflows/verify_e2e-techdocs.yml @@ -30,7 +30,7 @@ jobs: name: Techdocs steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-windows-noop.yml b/.github/workflows/verify_e2e-windows-noop.yml index fd90b86b0d..299489fcbe 100644 --- a/.github/workflows/verify_e2e-windows-noop.yml +++ b/.github/workflows/verify_e2e-windows-noop.yml @@ -25,7 +25,7 @@ jobs: name: E2E Windows ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_e2e-windows.yml b/.github/workflows/verify_e2e-windows.yml index a31b9238ba..d7575cadf7 100644 --- a/.github/workflows/verify_e2e-windows.yml +++ b/.github/workflows/verify_e2e-windows.yml @@ -31,7 +31,7 @@ jobs: name: E2E Windows ${{ matrix.node-version }} steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_fossa.yml b/.github/workflows/verify_fossa.yml index a5b0c7a102..ad94f9ece5 100644 --- a/.github/workflows/verify_fossa.yml +++ b/.github/workflows/verify_fossa.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_microsite-noop.yml b/.github/workflows/verify_microsite-noop.yml index a9a82b140b..d8ccaf73e5 100644 --- a/.github/workflows/verify_microsite-noop.yml +++ b/.github/workflows/verify_microsite-noop.yml @@ -21,7 +21,7 @@ jobs: name: Microsite steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_microsite.yml b/.github/workflows/verify_microsite.yml index 9aee979bc4..1a5bc8075b 100644 --- a/.github/workflows/verify_microsite.yml +++ b/.github/workflows/verify_microsite.yml @@ -24,7 +24,7 @@ jobs: name: Microsite steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_microsite_accessibility-noop.yml b/.github/workflows/verify_microsite_accessibility-noop.yml index 8ac2672b22..9f0ecc65be 100644 --- a/.github/workflows/verify_microsite_accessibility-noop.yml +++ b/.github/workflows/verify_microsite_accessibility-noop.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_microsite_accessibility.yml b/.github/workflows/verify_microsite_accessibility.yml index 6583e0119e..c9ed1696cd 100644 --- a/.github/workflows/verify_microsite_accessibility.yml +++ b/.github/workflows/verify_microsite_accessibility.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_storybook-noop.yml b/.github/workflows/verify_storybook-noop.yml index e98da4ae02..a1a1c1965d 100644 --- a/.github/workflows/verify_storybook-noop.yml +++ b/.github/workflows/verify_storybook-noop.yml @@ -28,7 +28,7 @@ jobs: name: Storybook steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index f4871baa46..83ddac8429 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -28,7 +28,7 @@ jobs: name: Storybook steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/.github/workflows/verify_windows.yml b/.github/workflows/verify_windows.yml index 3426880dbd..736193cad6 100644 --- a/.github/workflows/verify_windows.yml +++ b/.github/workflows/verify_windows.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 + uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 with: egress-policy: audit diff --git a/docs/auth/github/provider.md b/docs/auth/github/provider.md index 1604b607ff..1873730bd6 100644 --- a/docs/auth/github/provider.md +++ b/docs/auth/github/provider.md @@ -71,7 +71,7 @@ This provider includes several resolvers out of the box that you can use: - `emailLocalPartMatchingUserEntityName`: Matches the [local part](https://en.wikipedia.org/wiki/Email_address#Local-part) of the email address from the auth provider with the User entity that has a matching `name`. If no match is found it will throw a `NotFoundError`. - `usernameMatchingUserEntityName`: Matches the username from the auth provider with the User entity that has a matching `name`. If no match is found it will throw a `NotFoundError`. -:::note +:::note Note The resolvers will be tried in order, but will only be skipped if they throw a `NotFoundError`. diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index d002b12015..ec699d2760 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -425,6 +425,10 @@ value. These are special in that they form the entity's unique The return type is JSON, as a single [`Entity`](descriptor-format.md), or a 404 error if there was no entity with that reference triplet. +### `GET /entities/by-name/{kind}/{namespace}/{name}/ancestry` + +Get an entity's ancestry by entity ref. + ### `POST /entities/by-refs` Gets a batch of entities by their entity refs. This is useful in contexts where @@ -456,6 +460,31 @@ where the `items` array has _the same length_ and _the same order_ as the input `entityRefs` array. Each element contains the corresponding entity data, or `null` if no entity existed in the catalog with that ref. +### `POST /refresh` + +Refresh the entity related to `entityRef`. + +Request body is JSON, on the form + +```json +{ + "entityRef": "" +} +``` + +### `POST /validate-entity` + +Validate that a passed in entity has no errors in schema. + +Request body is JSON, on the form + +```json +{ + "location": "", + "entity": {} +} +``` + ## Locations ### `GET /locations` @@ -504,6 +533,23 @@ Response type is JSON, on the form } ``` +### `GET /entity-facets?facet=&facet=&filter=&filter=` + +Get all entity facets that match the given filters. + +Response type is JSON, on the form + +```json +{ + "facets": [ + { + "value": "", + "count": 1 + } + ] +} +``` + ### `POST /locations` Adds a location to be ingested by the catalog. @@ -542,7 +588,59 @@ If the location already exists the response will be `HTTP/1.1 409 Conflict` and Supports the `?dryRun=true` query parameter, which will perform validation and not write anything to the database. In the event of successfully passing validation, the `entities` field of the response JSON will be populated with entities present in the location. -### `DELETE /locations/` +### `POST /analyze-location` + +Validate a given location. + +Request body is JSON, on the form + +```json +{ + "location": { + "type": "", + "target": "" + }, + "catalogFileName": "" +} +``` + +And Response type is JSON, on the form + +```json +{ + "generateEntities": [ + { + "fields": [ + { + "description": "", + "value": "", + "state": "needsUserInput", + "field": "" + }, + { + "description": "", + "value": {}, + "state": "analysisSuggestedNoValue", + "field": "" + } + ], + "entity": {} + } + ], + "existingEntityFiles": [ + { + "entity": "", + "isRegistered": "", + "location": { + "target": "", + "type": "" + } + } + ] +} +``` + +### `DELETE /locations/{id}` Delete a location by its id. On success response code will be `HTTP/1.1 204 No Content`. diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index e1791af036..e8b354bd45 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -226,7 +226,6 @@ should have something similar to the below in ```ts return await createRouter({ - containerRunner, catalogClient, logger: env.logger, config: env.config, diff --git a/docs/features/techdocs/getting-started.md b/docs/features/techdocs/getting-started.md index 6cbbc83614..7909f8166f 100644 --- a/docs/features/techdocs/getting-started.md +++ b/docs/features/techdocs/getting-started.md @@ -142,7 +142,6 @@ export default async function createPlugin( // Generators are used for generating documentation sites. const generators = await Generators.fromConfig(env.config, { logger: env.logger, - containerRunner, }); // Publisher is used for diff --git a/docs/integrations/gitlab/discovery.md b/docs/integrations/gitlab/discovery.md index b16f6db839..98fbb0fbce 100644 --- a/docs/integrations/gitlab/discovery.md +++ b/docs/integrations/gitlab/discovery.md @@ -120,8 +120,8 @@ export default async function createPlugin( }), // optional: alternatively, use schedule scheduler: env.scheduler, + events: env.events, }); - env.eventBroker.subscribe(gitlabProvider); builder.addEntityProvider(gitlabProvider); /* highlight-add-end */ const { processingEngine, router } = await builder.build(); diff --git a/docs/integrations/gitlab/org.md b/docs/integrations/gitlab/org.md index 2cc0dcfb82..ccf8f19239 100644 --- a/docs/integrations/gitlab/org.md +++ b/docs/integrations/gitlab/org.md @@ -130,9 +130,9 @@ export default async function createPlugin( }), // optional: alternatively, use schedule scheduler: env.scheduler, + events: env.events, }, ); - env.eventBroker.subscribe(gitlabOrgProvider); builder.addEntityProvider(gitlabOrgProvider); /* highlight-add-end */ const { processingEngine, router } = await builder.build(); diff --git a/docs/integrations/ldap/org.md b/docs/integrations/ldap/org.md index f70d02afed..38f19af257 100644 --- a/docs/integrations/ldap/org.md +++ b/docs/integrations/ldap/org.md @@ -301,11 +301,11 @@ map: In case you want to customize the ingested entities, the provider allows to pass transformers for users and groups. -Transformers can be configured by extending `ldapOrgEntityProviderTransformExtensionPoint`. Here is an example: +Transformers can be configured by extending `ldapOrgEntityProviderTransformsExtensionPoint`. Here is an example: ```ts title="packages/backend/src/index.ts" import { createBackendModule } from '@backstage/backend-plugin-api'; -import { ldapOrgEntityProviderTransformExtensionPoint } from '@backstage/plugin-catalog-backend-module-ldap'; +import { ldapOrgEntityProviderTransformsExtensionPoint } from '@backstage/plugin-catalog-backend-module-ldap'; import { myUserTransformer, myGroupTransformer } from './transformers'; backend.add( @@ -316,7 +316,7 @@ backend.add( env.registerInit({ deps: { /* highlight-add-start */ - ldapTransformers: ldapOrgEntityProviderTransformExtensionPoint, + ldapTransformers: ldapOrgEntityProviderTransformsExtensionPoint, /* highlight-add-end */ }, async init({ ldapTransformers }) { diff --git a/docs/plugins/backend-plugin.md b/docs/plugins/backend-plugin.md index 255ab4f865..7f155f3b05 100644 --- a/docs/plugins/backend-plugin.md +++ b/docs/plugins/backend-plugin.md @@ -281,14 +281,14 @@ export async function createRouter( allow: ['user'], }); - const userInfo = await userInfo.getUserInfo(credentials); + const user = await userInfo.getUserInfo(credentials); res.json({ // The catalog entity ref of the user. - userEntityRef: userInfo.userEntityRef, + userEntityRef: user.userEntityRef, // The list of entities that this user or any teams this user is a part of owns. - ownershipEntityRefs: userInfo.ownershipEntityRefs, + ownershipEntityRefs: user.ownershipEntityRefs, }); }); diff --git a/docs/releases/v1.28.0-changelog.md b/docs/releases/v1.28.0-changelog.md new file mode 100644 index 0000000000..97d2219257 --- /dev/null +++ b/docs/releases/v1.28.0-changelog.md @@ -0,0 +1,2982 @@ +# Release v1.28.0 + +Upgrade Helper: [https://backstage.github.io/upgrade-helper/?to=1.28.0](https://backstage.github.io/upgrade-helper/?to=1.28.0) + +## @backstage/backend-common@0.23.0 + +### Minor Changes + +- 395b973: Implemented `readTree` for Harness provider to support TechDocs functionality +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- 9539a0b: Import utility functions from `backend-defaults` instead of `backend-app-api` +- b2c4607: Removed accents on deprecation note +- c6c0919: Updated configuration schema to include the `useRedisSets` cache config option. +- ed3074e: The `database` types, helpers and implementations were moved to the package `@backstage/backend-defaults` and deprecated from the package `@backstage/backend-commons`. +- 9cca724: The `TokenManager` has been deprecated in preparation for the [stable release of the New Backend System](https://github.com/backstage/backstage/issues/24493). Please [migrate](https://backstage.io/docs/tutorials/auth-service-migration) to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead. +- 1779188: In preparation to the new backend system stable release, the `isDatabaseConflictError` helper have been moved to the `@backstage/backend-plugin-api` package and deprecated from `@backstage/backend-common`. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- e171620: Move `cache` implementation and types to the `@backstage/backend-defaults` package. +- 1a6f38a: `ContainerRunner`, `DockerContainerRunner` and `KubernetesContainerRunner` are now deprecated +- 8869b8e: We are deprecating the legacy `createServiceBuilder` factory, so if you are still using it, please checkout the migration guide and [migrate](https://backstage.io/docs/backend-system/building-plugins-and-modules/migrating) your plugin to use the new backend system. +- 0634fdc: Deprecated `dropDatabase` +- b2ee7f3: Moved over all URL reader functionality from `@backstage/backend-common` to `@backstage/backend-defaults/urlReader`. Please update your imports. +- d94a477: Removed the circular dependency on `@backstage/backend-app-api` +- 3bd04bb: We are deprecating the legacy router handlers and contexts in preparation for the new backend system stable release. +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- e9a03c9: Finalizes the deprecation of legacy backend utilities. Deprecated utilities include the `ServiceBuilder` type, `notFoundHandler` and `redactWintonLogLine` functions. +- 6a576dc: Deprecate legacy service logger helpers and stop using `getVoidLogger` in tests. +- 032a7a6: Deprecate the legacy error and request logging handler types, respectively: `ErrorHandlerOptions` and `RequestLoggingHandlerFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/integration@1.12.0 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/backend-dev-utils@0.1.4 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + +## @backstage/backend-defaults@0.3.0 + +### Minor Changes + +- 662dce8: **BREAKING**: The `workdir` argument have been removed from The `GerritUrlReader` constructor. + + **BREAKING**: The Gerrit `readTree` implementation will now only use the Gitiles api. Support + for using git to clone the repo has been removed. + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- 1897169: Exposed `DefaultSchedulerService` +- b5bc997: Refactor cache manager inline types. +- e171620: Remove dependency with `@backstage/backend-commons` package. +- 6551b3d: Added core service factories and implementations from + `@backstage/backend-app-api`. They are now available as subpath exports, e.g. + `@backstage/backend-defaults/scheduler` is where the service factory and default + implementation of `coreServices.scheduler` now lives. They have been marked as + deprecated in their old locations. +- 8aab451: Internal minor refactors of the database connectors +- 0634fdc: Deprecated `dropDatabase` +- b2ee7f3: Moved over all URL reader functionality from `@backstage/backend-common` to `@backstage/backend-defaults/urlReader`. Please update your imports. +- 9539a0b: Added `@backstage/backend-defaults/auth`, `@backstage/backend-defaults/httpAuth`, and `@backstage/backend-defaults/userInfo` to house their respective backend service factories. You should now import these services from those new locations, instead of `@backstage/backend-app-api`. +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/integration@1.12.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/backend-dev-utils@0.1.4 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + +## @backstage/backend-test-utils@0.4.0 + +### Minor Changes + +- 805cbe7: Added `TestCaches` that functions just like `TestDatabases` + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 9e63318: Made it possible to give access restrictions to `mockCredentials.service` +- 006b3e8: The type `MockDirectoryOptions` was renamed to `CreateMockDirectoryOptions` so that it's clear these options are exclusive to the mock directory factory. +- 0634fdc: Refactored `TestDatabases` to no longer depend on `backend-common` +- 6a576dc: Fix the logger service mock to prevent returning `undefined` from the `child` method. +- 6c11f6e: Use imports from backend-defaults instead of the deprecated ones from backend-app-api +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/integration@1.12.0 + +### Minor Changes + +- be1014d: **BREAKING** Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: + + - `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead) + - `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead) + - `GitHubIntegration` (use `GithubIntegration` instead) + - `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead) + - `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead) + - `replaceGitHubUrlType` (use `replaceGithubUrlType` instead) + +- 395b973: Implemented `readTree` for Harness provider to support TechDocs functionality + +- 662dce8: **BREAKING**: `gitilesBaseUrl` is now mandatory for the Gerrit integration. The + ability to override this requirement using the `DISABLE_GERRIT_GITILES_REQUIREMENT` + environment variable has been removed. + +### Patch Changes + +- 509e08c: Updated function for getHarnessEditContentsUrl +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-atlassian-provider@0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` and `scopes` config options have been removed and replaced by the standard `additionalScopes` config. In addition, the `offline_access`, `read:jira-work`, and `read:jira-user` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-oauth2-provider@0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-oidc-provider@0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, `profile`, and `email` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 4f21993: if oidc server do not provide revocation_endpoint,we should not call revoke function +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + +## @backstage/plugin-auth-backend-module-onelogin-provider@0.1.0 + +### Minor Changes + +- 566d7cb: Separate out the OneLogin provider into its own module + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-vmware-cloud-provider@0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, and `offline_access` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-catalog@1.21.0 + +### Minor Changes + +- 863a800: Added the following default targets for external routes: + + - `createComponent` binds to the Scaffolder page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + - `createFromTemplate` binds to the Scaffolder selected template page. + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + +- e04e57d: Fix bug with missing Actions column after adding "pagination" prop to catalog table + +- a2d2649: Export `catalogTranslationRef` under `/alpha` + +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-backend@1.23.0 + +### Minor Changes + +- c7528b0: Pass through `EventsService` too in the new backend system + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- d779e3b: Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. +- 6c5cab1: Fix bug in `getLocationByEntity` +- 0f55f5c: Ensure name and title are both indexed by the DefaultCatalogCollator +- 1779188: Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-backend-module-ldap@0.6.0 + +### Minor Changes + +- debcc8c: Migrate LDAP catalog module to the new backend system. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-import@0.12.0 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 3daad61: Integrated Azure DevOps as a catalog import source. This enables Backstage to create Pull Requests to Azure DevOps repositories as it does with GitHub repositories +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-kubernetes-backend@0.18.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-kubernetes-node@0.1.13 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + +## @backstage/plugin-kubernetes-common@0.8.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-kubernetes-react@0.4.0 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-notifications-backend@0.3.0 + +### Minor Changes + +- 07a789b: adding filtering of notifications by processors + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-notifications-backend-module-email@0.1.0 + +### Minor Changes + +- 07a789b: add notification filters + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + +## @backstage/plugin-notifications-node@0.2.0 + +### Minor Changes + +- 07a789b: add notifications filtering by processors + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-proxy-backend@0.5.0 + +### Minor Changes + +- 88480e4: **BREAKING**: The proxy backend plugin is now protected by Backstage auth, by + default. Unless specifically configured (see below), all proxy endpoints will + reject requests immediately unless a valid Backstage user or service token is + passed along with the request. This aligns the proxy with how other Backstage + backends behave out of the box, and serves to protect your upstreams from + unauthorized access. + + A proxy configuration section can now look as follows: + + ```yaml + proxy: + endpoints: + '/pagerduty': + target: https://api.pagerduty.com + credentials: require # NEW! + headers: + Authorization: Token token=${PAGERDUTY_TOKEN} + ``` + + There are three possible `credentials` settings at this point: + + - `require`: Callers must provide Backstage user or service credentials with + each request. The credentials are not forwarded to the proxy target. + - `forward`: Callers must provide Backstage user or service credentials with + each request, and those credentials are forwarded to the proxy target. + - `dangerously-allow-unauthenticated`: No Backstage credentials are required to + access this proxy target. The target can still apply its own credentials + checks, but the proxy will not help block non-Backstage-blessed callers. If + you also add `allowedHeaders: ['Authorization']` to an endpoint configuration, + then the Backstage token (if provided) WILL be forwarded. + + The value `dangerously-allow-unauthenticated` was the old default. + + The value `require` is the new default, so requests that were previously + permitted may now start resulting in `401 Unauthorized` responses. If you have + `backend.auth.dangerouslyDisableDefaultAuthPolicy` set to `true`, this does not + apply; the proxy will behave as if all endpoints were set to + `dangerously-allow-unauthenticated`. + + If you have proxy endpoints that require unauthenticated access still, please + add `credentials: dangerously-allow-unauthenticated` to their declarations in + your app-config. + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder@1.21.0 + +### Minor Changes + +- d57ebbc: Changed the way to display entities in EntityPicker to use entityPresentationApi instead of humanizeEntityRef + +- 62bd9eb: Replace `ui:widget: password` with the a warning message stating that it's not secure and to use the build in `SecretField`. + + You can do this by updating your `template.yaml` files that have the reference `ui:widget: password` to `ui:field: Secret` instead. + + ```diff + apiVersion: backstage.io/v1alpha1 + kind: Template + metadata: + ... + + spec: + parameters: + - title: collect some information + schema: + type: object + properties: + password: + title: Password + type: string + - ui:widget: password + + ui:field: Secret + steps: + - id: collect-info + name: Collect some information + action: acme:do:something + input: + - password: ${{ parameters.password }} + + password: ${{ secrets.password }} + ``` + +- 60085dd: Added the following default targets for external routes: + + - `registerComponent` binds to the catalog import page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + +### Patch Changes + +- cbebad1: Internal updates to allow reusing Backstage's `fetchApi` implementation for event source requests. This allows you to for example, override the `Authorization` header. + +- 1ea7679: Removed waiting for the workspace and repository fields to be filled in before requesting user credentials + +- d44a20a: Added additional plugin metadata to `package.json`. + +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined + +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- 612a453: Change owner to project for azure host + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-github@0.3.0 + +### Minor Changes + +- 403394a: Allow empty author info in createPullRequest action for Github + +### Patch Changes + +- f145a04: Added handling for dry run to githubPullRequest and githubWebhook and added tests for this functionality +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-react@1.9.0 + +### Minor Changes + +- 62bd9eb: Replace `ui:widget: password` with the a warning message stating that it's not secure and to use the build in `SecretField`. + + You can do this by updating your `template.yaml` files that have the reference `ui:widget: password` to `ui:field: Secret` instead. + + ```diff + apiVersion: backstage.io/v1alpha1 + kind: Template + metadata: + ... + + spec: + parameters: + - title: collect some information + schema: + type: object + properties: + password: + title: Password + type: string + - ui:widget: password + + ui:field: Secret + steps: + - id: collect-info + name: Collect some information + action: acme:do:something + input: + - password: ${{ parameters.password }} + + password: ${{ secrets.password }} + ``` + +### Patch Changes + +- 86dc29d: Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. +- d44a20a: Added additional plugin metadata to `package.json`. +- fa8560e: Prevents Autocomplete dropdown from overlapping sidebar on hovering it +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- 928cfa0: Fixed a typo ' + +## @backstage/plugin-search-backend-module-elasticsearch@1.5.0 + +### Minor Changes + +- b186701: **BREAKING**: The ElasticSearch indexer will now delete stale indices matching the indexer's pattern. + The method `getAliases` of `ElasticSearchClientWrapper` has been deprecated and might be removed in future releases. + + An indexer using the `some-type-index__*` pattern will remove indices matching this pattern after indexation + to prevent stale indices leading to shards exhaustion. + + Before upgrading ensure that the index pattern doesn't match indices that are not managed by Backstage + and thus shouldn't be deleted. + + Note: The ElasticSearch indexer already uses wildcards patterns to remove aliases on these indices. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + - @backstage/integration-aws-node@0.1.12 + +## @backstage/app-defaults@1.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/core-app-api@1.12.6 + +## @backstage/backend-app-api@0.7.6 + +### Patch Changes + +- b7de623: Fixed a potential crash when passing an object with a `null` prototype as log meta. + +- 9539a0b: Deprecated `authServiceFactory`, `httpAuthServiceFactory`, and `userInfoServiceFactory`. Please import them from `@backstage/backend-defaults/auth`, `@backstage/backend-defaults/httpAuth`, and `@backstage/backend-defaults/userInfo` respectively instead. + +- 3e823d3: Limited user tokens will no longer include the `ent` field in its payload. Ownership claims will now be fetched from the user info service. + + NOTE: Limited tokens issued prior to this change will no longer be valid. Users may have to clear their browser cookies in order to refresh their auth tokens. + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. + +- 398b82a: Add support for JWKS tokens in ExternalTokenHandler. + +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. + +- e25e467: Added a new static key based method for plugin-to-plugin auth. This is useful for example if you are running readonly service nodes that cannot use a database for the default public-key signature scheme outlined in [BEP-0003](https://github.com/backstage/backstage/tree/master/beps/0003-auth-architecture-evolution). Most users should want to stay on the more secure zero-config database signature scheme. + + You can generate a public and private key pair using `openssl`. + + - First generate a private key using the ES256 algorithm + + ```sh + openssl ecparam -name prime256v1 -genkey -out private.ec.key + ``` + + - Convert it to PKCS#8 format + + ```sh + openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private.ec.key -out private.key + ``` + + - Extract the public key + + ```sh + openssl ec -inform PEM -outform PEM -pubout -in private.key -out public.key + ``` + + After this you have the files `private.key` and `public.key`. Put them in a place where you know their absolute paths, and then set up your app-config accordingly: + + ```yaml + backend: + auth: + keyStore: + type: static + static: + keys: + - publicKeyFile: /absolute/path/to/public.key + privateKeyFile: /absolute/path/to/private.key + keyId: some-custom-id + ``` + +- 7d30d95: Fixing issue with log meta fields possibly being circular refs + +- 6a576dc: Stop using `getVoidLogger` in tests to reduce the dependency on the soon-to-deprecate `backstage-common` package. + +- 6551b3d: Deprecated core service factories and implementations and moved them over to + subpath exports on `@backstage/backend-defaults` instead. E.g. + `@backstage/backend-defaults/scheduler` is where the service factory and default + implementation of `coreServices.scheduler` now lives. + +- d617103: Updating the logger redaction message to something less dramatic + +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/backend-dynamic-feature-service@0.2.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-events-backend@0.3.6 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-app-node@0.1.19 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/backend-openapi-utils@0.1.12 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/errors@1.2.4 + +## @backstage/backend-plugin-api@0.6.19 + +### Patch Changes + +- 78a0b08: **DEPRECATION**: You should no longer do a function call on backend features when adding them to backends. The support for doing that is deprecated, and you should remove all trailing `()` parentheses after plugins and modules where you add them to your backend or test backends (e.g. when using `startTestBackend`). + + The background for this is that `createBackendPlugin` and `createBackendModule` function now effectively return a `BackendFeature` rather than a `() => BackendFeature`. This is part of the cleanup efforts for New Backend System 1.0. In the short run this is non-breaking because the feature type has been given a callback signature that returns itself. But we strongly recommend that you remove all now-redundant calls made to feature objects, because that callback signature will be removed in a future release. + + Service factories are still callbacks at this point. + + Example change: + + ```diff + await startTestBackend({ + features: [ + eventsServiceFactory(), // service - stays unchanged + - catalogModuleBitbucketCloudEntityProvider(), // module - remove parentheses + + catalogModuleBitbucketCloudEntityProvider, + ``` + +- 9bdc3e8: In tests, return `null` rather than throwing an error when trying to get the `ExtensionPoint.T` property, so that tests asserting the property are not easily broken. + +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. + +- 3aa3fc7: Marked the `TokenManagerService` and `IdentityService` types as deprecated + +- b2ee7f3: Deprecated all of the `UrlReader` related type names and replaced them with prefixed versions. Please update your imports. + + - `ReadTreeOptions` was renamed to `UrlReaderServiceReadTreeOptions` + - `ReadTreeResponse` was renamed to `UrlReaderServiceReadTreeResponse` + - `ReadTreeResponseDirOptions` was renamed to `UrlReaderServiceReadTreeResponseDirOptions` + - `ReadTreeResponseFile` was renamed to `UrlReaderServiceReadTreeResponseFile` + - `ReadUrlResponse` was renamed to `UrlReaderServiceReadUrlResponse` + - `ReadUrlOptions` was renamed to `UrlReaderServiceReadUrlOptions` + - `SearchOptions` was renamed to `UrlReaderServiceSearchOptions` + - `SearchResponse` was renamed to `UrlReaderServiceSearchResponse` + - `SearchResponseFile` was renamed to `UrlReaderServiceSearchResponseFile` + +- 9539a0b: Improved `coreServices` doc comments + +- 6551b3d: Moved the declaration of the `SchedulerService` here, along with prefixed versions of all of the types it depends on, from `@backstage/backend-tasks` + +- 0665b7e: Renamed `BackendPluginConfig`, `BackendModuleConfig`, and `ExtensionPointConfig` respectively to `CreateBackendPluginOptions`, `CreateBackendModuleOptions`, and `CreateExtensionPointOptions` to standardize frontend and backend factories signatures. + +- 1779188: Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package. + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/cli-common@0.1.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/backend-tasks@0.5.24 + +### Patch Changes + +- 736bc3c: Marked all exports as deprecated and pointed at `@backstage/backend-plugin-api` and `@backstage/backend-defaults` +- ed473cd: Updated the `TaskScheduleDefinitionConfig` deprecated comment to point to `SchedulerServiceTaskScheduleDefinitionConfig` +- 6a576dc: Deprecate the legacy `TaskScheduler.fromConfig` method and stop using the `getVoidlogger` in tests files to reduce the dependency on the soon-to-deprecate `backstage-common` package. +- 1897169: More detailed deprecation messages +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/cli@0.26.7 + +### Patch Changes + +- 788eca7: Fix readme for new plugins created using cli +- 90c5268: Add `peerDependencies` to `devDependencies` in `package.json.hbs` templates. +- c00f7ee: Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies +- b0f66e9: Updated dependency `vite-plugin-node-polyfills` to `^0.22.0`. +- c328131: Added a new `--publish` flag to the `repo fix` command. This command will validate and if possible generate the metadata required for publishing packages with the Backstage CLI. In addition, a check has been added that the `backstage.pluginId` and `backstage.pluginPackage(s)` fields are present when packing a package for publishing. +- 5afbe1d: Export default module for `scaffolder-action` cli template +- 009da47: Fix `versions:check --fix` when `yarn.lock` has multiple joint versions in the same section +- 9ee948a: Bump `esbuild` target for package builds to `ES2022`. +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/eslint-plugin@0.1.8 + - @backstage/release-manifests@0.0.11 + - @backstage/types@1.1.1 + +## @backstage/cli-common@0.1.14 + +### Patch Changes + +- 142abb0: The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`. + +## @backstage/cli-node@0.2.6 + +### Patch Changes + +- a1ae9cc: Updated doc link. +- c328131: Added new plugin metadata fields to `BackstagePackageJson` type. +- 93be042: Upgraded @yarnpkg/parsers to stable 3.0 +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/codemods@0.1.49 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + +## @backstage/config-loader@1.8.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/core-app-api@1.12.6 + +### Patch Changes + +- 35fbe09: Added support for configuration of route bindings through static configuration, and default targets for external route refs. + + In addition to configuring route bindings through code, it is now also possible to configure route bindings under the `app.routes.bindings` key, for example: + + ```yaml + app: + routes: + bindings: + catalog.createComponent: catalog-import.importPage + ``` + + Each key in the route binding object is of the form `.`, where the route name is key used in the `externalRoutes` object passed to `createPlugin`. The value is of the same form, but with the name taken from the plugin `routes` option instead. + + The equivalent of the above configuration in code is the following: + + ```ts + const app = createApp({ + // ... + bindRoutes({ bind }) { + bind(catalogPlugin.externalRoutes, { + createComponent: catalogImportPlugin.routes.importPage, + }); + }, + }); + ``` + +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/core-compat-api@0.2.6 + +### Patch Changes + +- 35fbe09: Add support for forwarding default target from legacy external route refs. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/version-bridge@1.0.8 + +## @backstage/core-components@0.14.8 + +### Patch Changes + +- a0b46f6: Having tooltip inherit font size for consistency in catalog table columns +- 59cee81: Use `inherit` variant on OverflowTooltip underlying Typography component. +- eae0e4d: Fixed an issue causing `SidebarSubmenu` text to not follow the theme color +- e4811ec: Make number of decimal digits in Gauge configurable via the `decimalDigits` property +- 83c4251: Adds icons to status component +- 3e175c8: Removed max width from `Select` component. +- 57d7582: Fixed a bug in `SupportButton` where the title was rendered with the characteristics of a button. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/version-bridge@1.0.8 + +## @backstage/core-plugin-api@1.9.3 + +### Patch Changes + +- 35fbe09: A new `defaultTarget` option has been added to `createExternalRouteRef`. This allows one to specify a default target of the route by name, for example `'catalog.catalogIndex'`, which will be used if the target route is present in the app and there is no explicit route binding. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/create-app@0.5.16 + +### Patch Changes + +- cce0495: Bumped create-app version. +- 77da22e: Bumped create-app version. +- 2110d76: Removed `dockerode` dependency. +- 34daaea: Fixed a broken link to the node-postgres documentation +- 78363f6: Bumped TypeScript to version `5.4`. +- 1a212f9: Remove Tech Radar menu item from sidebar of scaffolded app to align with removal of tech-radar plugin from backend +- 81507c8: Updated `node-gyp` to v10 +- Updated dependencies + - @backstage/cli-common@0.1.14 + +## @backstage/dev-utils@1.0.33 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/catalog-model@1.5.0 + +## @backstage/frontend-app-api@0.7.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/frontend-plugin-api@0.6.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/frontend-test-utils@0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-app-api@0.7.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/test-utils@1.5.6 + - @backstage/types@1.1.1 + +## @backstage/integration-react@1.1.28 + +### Patch Changes + +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- Updated dependencies + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/config@1.2.0 + +## @backstage/repo-tools@0.9.1 + +### Patch Changes + +- 8721a02: Add `--client-additional-properties` option to `openapi generate` command +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + +## @techdocs/cli@1.8.12 + +### Patch Changes + +- 2110d76: Removed `dockerode` dependency. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/cli-common@0.1.14 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/test-utils@1.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/core-app-api@1.12.6 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/theme@0.5.6 + +### Patch Changes + +- 702fa7d: Internal refactor to fix an issue where the MUI 5 `v5-` class prefixing gets removed by tree shaking. + +## @backstage/plugin-api-docs@0.11.6 + +### Patch Changes + +- 7f84039: The `registerComponent` external route will now by default bind to the catalog import page if it is available. +- 9cdc651: Make sure that the toggle button state is properly reflected in API cards +- d44a20a: Added additional plugin metadata to `package.json`. +- 96cd13e: `DefaultApiExplorerPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-catalog@1.21.0 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-api-docs-module-protoc-gen-doc@0.1.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + +## @backstage/plugin-app-backend@0.3.68 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 82c2b90: Restore the support of external config schema in the router of the `app-backend` plugin, which was broken in release `1.26.0`. + This support is critical for dynamic frontend plugins to have access to their config values. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-app-node@0.1.19 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-app-node@0.1.19 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config-loader@1.8.1 + +## @backstage/plugin-app-visualizer@0.1.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/frontend-plugin-api@0.6.6 + +## @backstage/plugin-auth-backend@0.22.6 + +### Patch Changes + +- 3e823d3: Limited user tokens will no longer include the `ent` field in its payload. Ownership claims will now be fetched from the user info service. + + NOTE: Limited tokens issued prior to this change will no longer be valid. Users may have to clear their browser cookies in order to refresh their auth tokens. + +- 8869b8e: Updated local development setup. + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. + +- d44a20a: Added additional plugin metadata to `package.json`. + +- 3e1bb15: Updated to use the new `@backstage/plugin-auth-backend-module-onelogin-provider` implementation + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/plugin-auth-backend-module-onelogin-provider@0.1.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.1.2 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.12 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.2.0 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.1.2 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.14 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.14 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.16 + - @backstage/plugin-auth-backend-module-google-provider@0.1.16 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.2.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.2.0 + - @backstage/plugin-auth-backend-module-okta-provider@0.0.12 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-bitbucket-provider@0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `account` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-auth-backend-module-github-provider@0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `read:user` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-gitlab-provider@0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `read_user` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-google-provider@0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `openid`, `userinfo.email`, and `userinfo.profile` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-guest-provider@0.1.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-microsoft-provider@0.1.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. +- d44a20a: Added additional plugin metadata to `package.json`. +- c187a9c: Minor internal type updates +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + +## @backstage/plugin-auth-backend-module-okta-provider@0.0.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration, which means it can now also be specified as an array. In addition, the `openid`, `email`, `profile`, and `offline_access` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + +## @backstage/plugin-auth-backend-module-pinniped-provider@0.1.13 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, the `openid`, `pinniped:request-audience`, `username`, and `offline_access` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/config@1.2.0 + +## @backstage/plugin-auth-node@0.4.14 + +### Patch Changes + +- 798ec37: Updated scope management for OAuth providers, where the `createOAuthAuthenticator` now accepts a new collection of `scopes` options: + + - `scopes.persist` - Whether scopes should be persisted, replaces the `shouldPersistScopes` option. + - `scopes.required` - A list of required scopes that will always be requested. + - `scopes.transform` - A function that can be used to transform the scopes before they are requested. + + The `createOAuthProviderFactory` has also received a new `additionalScopes` option, and will also read `additionalScopes` from the auth provider configuration. Both of these can be used to add additional scopes that should always be requested. + + A significant change under the hood that this new scope management brings is that providers that persist scopes will now always merge the already granted scopes with the requested ones. The previous behavior was that the full authorization flow would not include existing scopes, while the refresh flow would only include the existing scopes. + +- d44a20a: Added additional plugin metadata to `package.json`. + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-auth-react@0.1.3 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/errors@1.2.4 + +## @backstage/plugin-bitbucket-cloud-common@0.2.20 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/integration@1.12.0 + +## @backstage/plugin-catalog-backend-module-aws@0.3.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + +## @backstage/plugin-catalog-backend-module-azure@0.1.39 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-backstage-openapi@0.2.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.2.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- b51e823: Remove debug console logging statement +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-bitbucket-cloud-common@0.2.20 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.33 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-backend-module-gcp@0.1.20 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.36 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-backend-module-github@0.6.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 67d0530: Fix bug in root repo import where catalog-info.yaml.hcl file is found by search and breaks the import +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-github-org@0.1.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend-module-github@0.6.2 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.3.18 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 150fc77: Fixed an issue in `GitlabOrgDiscoveryEntityProvider` where a missing `orgEnabled` config key was throwing an error. +- f271164: Fixed an issue in `GitlabDiscoveryEntityProvider` where the fallback branch was taking precedence over the GitLab default branch. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-gitlab-org@0.0.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-backend-module-gitlab@0.3.18 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.4.24 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-backend-module-msgraph@0.5.27 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- f7be17a: Added missing `userSelect` property in `readMicrosoftGraphOrg` method +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.37 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-backend-module-puppetdb@0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-catalog-backend-module-unprocessed@0.4.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-unprocessed-entities-common@0.0.2 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-common@1.0.24 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-catalog-graph@0.4.6 + +### Patch Changes + +- 8d474d3: Add function to `EntityRelationsGraph` filter that excludes entities from graph +- d44a20a: Added additional plugin metadata to `package.json`. +- cd6aeea: The `catalogEntity` external route will now by default bind to the catalog entity page if it is available. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-node@1.12.1 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-react@1.12.1 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- fa8560e: Prevents Autocomplete dropdown from overlapping sidebar on hovering it +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/plugin-catalog-unprocessed-entities@0.2.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-catalog-unprocessed-entities-common@0.0.2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + +## @backstage/plugin-config-schema@0.1.56 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-devtools@0.1.15 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-devtools-common@0.1.10 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + +## @backstage/plugin-devtools-backend@0.3.5 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-devtools-common@0.1.10 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-devtools-common@0.1.10 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/types@1.1.1 + +## @backstage/plugin-events-backend@0.3.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + +## @backstage/plugin-events-backend-module-aws-sqs@0.3.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-events-backend-module-azure@0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + +## @backstage/plugin-events-backend-module-bitbucket-cloud@0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + +## @backstage/plugin-events-backend-module-gerrit@0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + +## @backstage/plugin-events-backend-module-github@0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + +## @backstage/plugin-events-backend-module-gitlab@0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + +## @backstage/plugin-events-backend-test-utils@0.1.29 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-events-node@0.3.5 + +## @backstage/plugin-events-node@0.3.5 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + +## @backstage/plugin-home@0.7.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-home-react@0.1.14 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-home-react@0.1.14 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + +## @backstage/plugin-kubernetes@0.11.11 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-kubernetes-react@0.4.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-kubernetes-cluster@0.0.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-kubernetes-react@0.4.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-kubernetes-node@0.1.13 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-notifications@0.2.2 + +### Patch Changes + +- 7f02684: Do not always show scrollbars in notification description +- 6d196b4: Fixes performance issue with Notifications title counter. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-notifications-common@0.0.4 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + +## @backstage/plugin-org@0.6.26 + +### Patch Changes + +- d8e2f53: The `catalogIndex` external route is now optional and will by default bind to the catalog index page if it is available. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-org-react@0.1.25 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + +## @backstage/plugin-permission-backend@0.5.43 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-permission-backend-module-allow-all-policy@0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + +## @backstage/plugin-permission-common@0.7.14 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-permission-node@0.7.30 + +### Patch Changes + +- 9e63318: Ensure that service token access restrictions, when present, are taken into account +- d44a20a: Added additional plugin metadata to `package.json`. +- c7b0dd1: Import `tokenManager` definition from `@backstage/backend-plugin-api` +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-permission-react@0.4.23 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + +## @backstage/plugin-scaffolder-backend@1.22.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. + +- 5c65785: Fixing issues with log redaction in the scaffolder logs + +- d44a20a: Added additional plugin metadata to `package.json`. + +- 7d30d95: Fixing issue with log meta fields possibly being circular refs + +- d617103: Updating the logger redaction message to something less dramatic + +- f4c8486: Increase max wait time in debug:wait action to 10 minutes + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-scaffolder-backend-module-github@0.3.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.9 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.11 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1 + - @backstage/plugin-scaffolder-backend-module-azure@0.1.11 + - @backstage/plugin-scaffolder-backend-module-gitea@0.1.9 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-azure@0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- b4169ee: Use `GitRepository.webUrl` instead of `GitRepository.remoteUrl` to set the value of `repoContentsUrl` as `remoteUrl` can sometimes return an URL with the wrong format (e.g. `https://@dev.azure.com///\_git/`). +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.43 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-gerrit@0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-gitea@0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- cf96041: Added `gitlab:issue:edit` action to edit existing GitLab issues +- d44a20a: Added additional plugin metadata to `package.json`. +- 829e0ec: Add new `gitlab:pipeline:trigger` action to trigger GitLab pipelines. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-notifications@0.0.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-scaffolder-node@0.4.5 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.36 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-sentry@0.1.27 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.3.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-scaffolder-node-test-utils@0.1.5 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-common@1.5.3 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-node@0.4.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-node-test-utils@0.1.5 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-test-utils@0.4.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/types@1.1.1 + +## @backstage/plugin-search@1.4.12 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/plugin-search-backend@1.5.10 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5b6f979: Split backend search plugin startup into "init" and "start" stages to ensure necessary initialization has happened before startup +- 34dc47d: Move @backstage/repo-tools to devDependencies +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-search-backend-module-catalog@0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-search-backend-module-explore@0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + +## @backstage/plugin-search-backend-module-pg@0.5.28 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + +## @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + +## @backstage/plugin-search-backend-module-techdocs@0.1.24 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## @backstage/plugin-search-backend-node@1.2.24 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5b6f979: Split backend search plugin startup into "init" and "start" stages to ensure necessary initialization has happened before startup +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-search-common@1.2.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/types@1.1.1 + +## @backstage/plugin-search-react@1.7.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-search-common@1.2.12 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## @backstage/plugin-signals@0.0.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-signals-backend@0.1.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-signals-node@0.1.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-signals-react@0.0.4 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-techdocs@1.10.6 + +### Patch Changes + +- 654af4a: mkdocs-material have updated their CSS variable template, and a few are unset in Backstage. This patch adds the missing variables to ensure coverage. +- cbebad1: Internal updates to allow reusing Backstage's `fetchApi` implementation for event source requests. This allows you to for example, override the `Authorization` header. +- 96cd13e: `TechDocsIndexPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. +- e40bd9a: Fixed bug in `CopyToClipboardButton` component where positioning of the "Copy to clipboard" button in techdocs code snippets was broken in some cases. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1256d88: Fixed an issue preventing the `TechDocsSearchBar` component from opening when clicking on the arrow icon. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.33 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-techdocs@1.10.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-catalog@1.21.0 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/test-utils@1.5.6 + +## @backstage/plugin-techdocs-backend@1.10.6 + +### Patch Changes + +- e64bfb2: Allow defining custom build log transport for techdocs builder +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 2110d76: Removed `dockerode` dependency. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + +## @backstage/plugin-techdocs-module-addons-contrib@1.1.11 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/integration-react@1.1.28 + +## @backstage/plugin-techdocs-node@1.12.5 + +### Patch Changes + +- e64bfb2: Allow defining custom build log transport for techdocs builder +- 48c38f0: `TechdocsGenerator` won't require a `containerRunner` option anymore for generating TechDocs in docker. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5db7536: Updated `getRepoUrlFromLocationAnnotation` to check for Harness SCM integration +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + +## @backstage/plugin-techdocs-react@1.2.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/version-bridge@1.0.8 + +## @backstage/plugin-user-settings@0.8.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-user-settings-common@0.0.1 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-user-settings-backend@0.2.18 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-user-settings-common@0.0.1 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + +## @backstage/plugin-user-settings-common@0.0.1 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions + +## example-app@0.2.98 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/plugin-api-docs@0.11.6 + - @backstage/cli@0.26.7 + - @backstage/plugin-scaffolder@1.21.0 + - @backstage/plugin-catalog-import@0.12.0 + - @backstage/plugin-kubernetes@0.11.11 + - @backstage/plugin-search@1.4.12 + - @backstage/plugin-catalog-graph@0.4.6 + - @backstage/plugin-notifications@0.2.2 + - @backstage/plugin-org@0.6.26 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.11 + - @backstage/plugin-catalog-unprocessed-entities@0.2.5 + - @backstage/plugin-kubernetes-cluster@0.0.12 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-user-settings@0.8.7 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/plugin-devtools@0.1.15 + - @backstage/plugin-catalog@1.21.0 + - @backstage/plugin-signals@0.0.7 + - @backstage/plugin-home@0.7.5 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/frontend-app-api@0.7.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## example-app-next@0.0.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/plugin-api-docs@0.11.6 + - @backstage/core-compat-api@0.2.6 + - @backstage/cli@0.26.7 + - @backstage/plugin-scaffolder@1.21.0 + - @backstage/plugin-catalog-import@0.12.0 + - @backstage/plugin-kubernetes@0.11.11 + - @backstage/plugin-search@1.4.12 + - @backstage/plugin-catalog-graph@0.4.6 + - @backstage/plugin-notifications@0.2.2 + - @backstage/plugin-org@0.6.26 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.11 + - @backstage/plugin-catalog-unprocessed-entities@0.2.5 + - @backstage/plugin-kubernetes-cluster@0.0.12 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-app-visualizer@0.1.7 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-user-settings@0.8.7 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/plugin-catalog@1.21.0 + - @backstage/plugin-signals@0.0.7 + - @backstage/plugin-home@0.7.5 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/frontend-app-api@0.7.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## app-next-example-plugin@0.0.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/frontend-plugin-api@0.6.6 + +## example-backend@0.0.27 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/plugin-techdocs-backend@1.10.6 + - @backstage/plugin-scaffolder-backend-module-github@0.3.0 + - @backstage/plugin-devtools-backend@0.3.5 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-search-backend@1.5.10 + - @backstage/plugin-proxy-backend@0.5.0 + - @backstage/plugin-app-backend@0.3.68 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.16 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.2.2 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16 + - @backstage/plugin-auth-backend-module-guest-provider@0.1.5 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6 + - @backstage/plugin-catalog-backend-module-openapi@0.1.37 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-search-backend-module-explore@0.1.25 + - @backstage/plugin-notifications-backend@0.3.0 + - @backstage/plugin-kubernetes-backend@0.18.0 + - @backstage/plugin-permission-backend@0.5.43 + - @backstage/plugin-scaffolder-backend@1.22.9 + - @backstage/plugin-signals-backend@0.1.5 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + +## example-backend-legacy@0.2.99 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/plugin-techdocs-backend@1.10.6 + - @backstage/plugin-devtools-backend@0.3.5 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-search-backend@1.5.10 + - @backstage/plugin-proxy-backend@0.5.0 + - @backstage/plugin-app-backend@0.3.68 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-search-backend-module-elasticsearch@1.5.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.36 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-search-backend-module-explore@0.1.25 + - @backstage/plugin-search-backend-module-pg@0.5.28 + - @backstage/plugin-kubernetes-backend@0.18.0 + - @backstage/plugin-permission-backend@0.5.43 + - @backstage/plugin-scaffolder-backend@1.22.9 + - @backstage/plugin-signals-backend@0.1.5 + - @backstage/plugin-events-backend@0.3.6 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-signals-node@0.1.5 + - example-app@0.2.98 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + +## e2e-test@0.2.17 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.5.16 + - @backstage/cli-common@0.1.14 + - @backstage/errors@1.2.4 + +## techdocs-cli-embedded-app@0.2.97 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/cli@0.26.7 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog@1.21.0 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/test-utils@1.5.6 + +## yarn-plugin-backstage@0.0.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/release-manifests@0.0.11 + +## @internal/plugin-todo-list@1.0.28 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + +## @internal/plugin-todo-list-backend@1.0.28 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + +## @internal/plugin-todo-list-common@1.0.19 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 diff --git a/docs/releases/v1.28.0.md b/docs/releases/v1.28.0.md new file mode 100644 index 0000000000..bc690fbeef --- /dev/null +++ b/docs/releases/v1.28.0.md @@ -0,0 +1,202 @@ +--- +id: v1.28.0 +title: v1.28.0 +description: Backstage Release v1.28.0 +--- + +These are the release notes for the v1.28.0 release of [Backstage](https://backstage.io/). + +A huge thanks to the whole team of maintainers and contributors as well as the amazing Backstage Community for the hard work in getting this release developed and done. + +## Highlights + +### **BREAKING**: Proxy backend plugin protected by default + +The proxy backend plugin is now protected by Backstage auth, by default. Unless specifically configured (see below), all proxy endpoints will reject requests immediately unless a valid Backstage user or service token is passed along with the request. This aligns the proxy with how other Backstage backends behave out of the box, and serves to protect your upstreams from unauthorized access. + +Here's an example of how to configure: + +```diff + proxy: + endpoints: + '/pagerduty': + target: https://api.pagerduty.com ++ credentials: require + headers: + Authorization: Token token=${PAGERDUTY_TOKEN} +``` + +There are three `credentials` settings: + +- `require`: Callers need Backstage credentials. These are not forwarded to the target. +- `forward`: Callers need Backstage credentials, which are forwarded to the target. +- `dangerously-allow-unauthenticated`: No Backstage credentials needed. Target can apply its own checks. Incoming tokens of any sort will be allowed but ignored, and will also be forwarded if `allowedHeaders: ['Authorization']` is included. + +The new default is `require`, replacing the old `dangerously-allow-unauthenticated`. This means some previously permitted requests may now result in `401 Unauthorized` responses. This does not apply if `backend.auth.dangerouslyDisableDefaultAuthPolicy` is set to `true`. + +For proxy endpoints still requiring unauthenticated access, add `credentials: dangerously-allow-unauthenticated` in your app-config. + +See [the proxy documentation](https://backstage.io/docs/plugins/proxying/) for more information. + +### **BREAKING**: Gerrit integration breaking changes + +- The `workdir` argument have been removed from The `GerritUrlReader` constructor; +- The Gerrit `readTree` implementation will now only use the Gitiles api, so the support for using git to clone the repo has been removed; +- The `gitilesBaseUrl` is now mandatory for the Gerrit integration and the ability to override this requirement using the `DISABLE_GERRIT_GITILES_REQUIREMENT` environment variable has been removed. + +Contributed by [@anicke](https://github.com/anicke) in [#25123](https://github.com/backstage/backstage/pull/25123). + +### **BREAKING**: Github integration breaking changes + +- Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: + - `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead) + - `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead) + - `GitHubIntegration` (use `GithubIntegration` instead) + - `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead) + - `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead) + - `replaceGitHubUrlType` (use `replaceGithubUrlType` instead) + +Contributed by [@awanlin](https://github.com/awanlin) in [#25100](https://github.com/backstage/backstage/pull/25100). + +### **BREAKING**: OAuth Scope Updates + +The way that OAuth-based auth providers handle scopes has received several updates. There is now a new `.additionalScopes` configuration for all OAuth providers, which can be used to request additional scopes for all sessions. Many providers already had a similar configuration, but in most cases this did not work correctly as scopes requested by the client would override the configured set. + +Many providers now also have a set of required scopes that will always be present. This is in contrast to the previous solution where the client would be responsible for including a set of baseline scopes. + +A bug has also been fixed in the handling of persistent scopes, which could break session refresh for some providers, such as GitHub. + +### **BREAKING**: User Info service + +Limited-access user tokens (as used in cookies) no longer contain the `ent` ownership claim. This is notably used by TechDocs and the app-backend. If you use those services, you may want to log out and in again. + +Background: As part of the previous auth improvements, we added the `coreServices.userInfo` service. This service can extract user details from incoming credentials - notably the so-called `ent` claim with its ownership information. + +In this release, the auth backend part of this has been implemented, such that the information returned by your sign-in resolver gets persisted and can be acquired after the fact. With this in place, we could finally start slimming down on token sizes, starting with the cookie tokens. Unfortunately this has to be done in such a way that it’s breaking in the short term. + +If any issues persist, try clearing your cookies, and then reach out to us on Discord or with an issue if necessary. + +Contributed by [@kuangp](https://github.com/kuangp) in [#24729](https://github.com/backstage/backstage/pull/24729). + +### New Backend System API movement towards 1.0 release + +As part of finalizing the [New Backend System](https://backstage.io/docs/backend-system/), we are restructuring the out-of-the-box functionality a bit. As part of this release, you will see a large amount of deprecations on the `@backstage/backend-common` package (which will be deleted in a future release), and also on the `@backstage/backend-app-api` package (which is just being slimmed down to its essentials). Instead, you will see that the `@backstage/backend-defaults` package has received new subpath exports that neatly arrange all of these factories and default implementations. + +As an example, the `rootLoggerServiceFactory` export on `@backstage/backend-app-api` has been deprecated, and should now be imported from `@backstage/backend-defaults/rootLogger`. Most other deprecations follow the same pattern. Each deprecated symbol should have a deprecation message on it, which clearly states from where you should now be importing that particular functionality instead. + +This rearrangement was one of the crucial final pieces for settling the API surfaces of this backend system! We hope you’ll find it neater and clearer to understand. + +Please update deprecated imports in your own repo code as soon as convenient, to avoid the breaking changes in future releases when these symbols are finally removed. + +You will also note that backend features (plugins and modules) no longer are returned as functions, which simplifies interacting with features! You may see this in your editor in the form of deprecations, whose message tells you to remove the trailing parentheses. + +Your code may be changed in the following way as an example: + +```diff + await startTestBackend({ + features: [ + // service - stays unchanged + eventsServiceFactory(), + // module - remove parentheses +- catalogModuleBitbucketCloudEntityProvider(), ++ catalogModuleBitbucketCloudEntityProvider, +``` + +In related news, we have unified some type names. The `UrlReader` types are now properly prefixed with the service name, so you’ll see that for example `ReadTreeOptions` is now `UrlReaderServiceReadTreeOptions`. Functions better follow the proper naming convention for their arguments, for example `BackendPluginConfig` now becoming `CreateBackendPluginOptions`. + +### Package Metadata - Important for Package Publishers! + +All `@backstage/*` packages now include a new set of metadata in `package.json` that helps associate related plugin packages with each other. This metadata is also required for all packages published through the `@backstage/cli` to the Backstage ecosystem. For this purpose, a new `--publish` flag has been added to the `repo fix` command. You can read more about this requirement and how to generate the metadata in the documentation section on [Metadata for Published Packages](https://backstage.io/docs/tooling/package-metadata#metadata-for-published-packages). + +### Other Auth Improvements + +The OneLogin auth implementation now lives in its own module, `@backstage/plugin-auth-backend-module-onelogin-provider`. + +In some special use cases such as when you have read-replica databases, you may desire to not use the builtin zero-config plugin-to-plugin auth system that stores keys in the database. For those cases, there is now a new static mode where you supply key pairs in config that are used for this purpose. The howto is [in the docs](https://backstage.io/docs/auth/service-to-service-auth#static-keys-for-plugin-to-plugin-auth). + +There is also a new general `jwks` external access method for those of you who want to externally call Backstage plugins using already-established token flows! Check out [the docs](https://backstage.io/docs/auth/service-to-service-auth#jwks-token-auth). + +Contributed by [@ryan-hanchett](https://github.com/ryan-hanchett) in [#24681](https://github.com/backstage/backstage/pull/24681). + +### Scaffolder `ui:widget: password` notice + +Using `ui:widget: password` does not treat the input as a secret in the Scaffolder, and can lead to exposing some secrets in plaintext, this implementation has been overridden to provide warnings to users that mistakenly use this component and will now render a warning message along with rendering the input in plaintext for additional indication. + +Please use the `ui:field: Secret` option instead, as is mentioned in the [using secrets](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) documentation. + +### New Scaffolder Permissions + +The Scaffolder plugin has been upgraded to include additional permissions: + +- `scaffolder.task.create` +- `scaffolder.task.cancel` +- `scaffolder.task.read` + +The new permissions allow you to control who should have read or write access to tasks. + +Contributed by [@Zaperex](https://github.com/Zaperex) in [#24518](https://github.com/backstage/backstage/pull/24518). + +### Route bindings via app-config + +It is now possible to configure route bindings through static configuration, using the `app.routes.bindings` key. For example: + +```yaml +app: + routes: + bindings: + catalog.createComponent: catalog-import.importPage +``` + +Is the equivalent of the following: + +```ts +const app = createApp({ + // ... + bindRoutes({ bind }) { + bind(catalogPlugin.externalRoutes, { + createComponent: catalogImportPlugin.routes.importPage, + }); + }, +}); +``` + +Additionally, the following default targets have been added for external routes. + +- For catalog: + - `createComponent` binds to the Scaffolder page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + - `createFromTemplate` binds to the Scaffolder selected template page +- For scaffolder: + - `registerComponent` binds to the catalog import page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + +## Security Fixes + +This release does not contain any security fixes. + +## Upgrade path + +We recommend that you keep your Backstage project up to date with this latest release. For more guidance on how to upgrade, check out the documentation for [keeping Backstage updated](https://backstage.io/docs/getting-started/keeping-backstage-updated). + +### Test utilities + +There is now a `TestCaches` class in `@backstage/backend-test-utils` that functions just like `TestDatabases`. This may help in testing out cache based flows against actual cache implementations, using `testcontainers` if available! + +### Notifications improvements + +The notifications system has received numerous updates, including the ability to perform in-flight processing of notifications. The related signals subsystem now also powers real time updates of the user settings plugin. Thanks to the notifications maintainers for their tireless efforts in this exciting area! + +## Links and References + +Below you can find a list of links and references to help you learn about and start using this new release. + +- [Backstage official website](https://backstage.io/), [documentation](https://backstage.io/docs/), and [getting started guide](https://backstage.io/docs/getting-started/) +- [GitHub repository](https://github.com/backstage/backstage) +- Backstage's [versioning and support policy](https://backstage.io/docs/overview/versioning-policy) +- [Community Discord](https://discord.gg/backstage-687207715902193673) for discussions and support +- [Changelog](https://github.com/backstage/backstage/tree/master/docs/releases/v1.28.0-changelog.md) +- Backstage [Demos](https://backstage.io/demos), [Blog](https://backstage.io/blog), [Roadmap](https://backstage.io/docs/overview/roadmap) and [Plugins](https://backstage.io/plugins) + +Sign up for our [newsletter](https://info.backstage.spotify.com/newsletter_subscribe) if you want to be informed about what is happening in the world of Backstage. + +Big shoutout to all 64 of you amazing folks who chipped in on this release 🙏: [@acierto](https://github.com/acierto), [@adityak60](https://github.com/adityak60), [@adsk-mukul](https://github.com/adsk-mukul), [@alexef](https://github.com/alexef), [@andrei-ivanovici](https://github.com/andrei-ivanovici), [@anicke](https://github.com/anicke), [@aramissennyeydd](https://github.com/aramissennyeydd), [@awanlin](https://github.com/awanlin), [@benjdlambert](https://github.com/benjdlambert), [@benjidotsh](https://github.com/benjidotsh), [@bethgriggs](https://github.com/bethgriggs), [@brianphillips](https://github.com/brianphillips), [@brunobastosg](https://github.com/brunobastosg), [@camilaibs](https://github.com/camilaibs), [@cjlee01](https://github.com/cjlee01), [@cmoulliard](https://github.com/cmoulliard), [@davidfestal](https://github.com/davidfestal), [@debsmita1](https://github.com/debsmita1), [@drodil](https://github.com/drodil), [@dweber019](https://github.com/dweber019), [@elaine-mattos](https://github.com/elaine-mattos), [@erik-adsk](https://github.com/erik-adsk), [@fabian-m-95](https://github.com/fabian-m-95), [@freben](https://github.com/freben), [@grantila](https://github.com/grantila), [@huggingpixels](https://github.com/huggingpixels), [@ismailmmd](https://github.com/ismailmmd), [@jeevaramanathan](https://github.com/jeevaramanathan), [@johanhammar](https://github.com/johanhammar), [@jslott2sigma](https://github.com/jslott2sigma), [@julien-hery](https://github.com/julien-hery), [@kalleericson](https://github.com/kalleericson), [@kissmikijr](https://github.com/kissmikijr), [@kuangp](https://github.com/kuangp), [@maetis](https://github.com/maetis), [@marcpalm](https://github.com/marcpalm), [@marcuseide](https://github.com/marcuseide), [@mareklibra](https://github.com/mareklibra), [@mario-mui](https://github.com/mario-mui), [@matteosilv](https://github.com/matteosilv), [@mclarke47](https://github.com/mclarke47), [@npiyush97](https://github.com/npiyush97), [@nurbaysymbat](https://github.com/nurbaysymbat), [@parsifal-m](https://github.com/parsifal-m), [@piatkiewicz](https://github.com/piatkiewicz), [@raffitamizian](https://github.com/raffitamizian), [@rbillon59](https://github.com/rbillon59), [@rewixe](https://github.com/rewixe), [@rugvip](https://github.com/rugvip), [@ryan-hanchett](https://github.com/ryan-hanchett), [@sblausten](https://github.com/sblausten), [@snowblitzer](https://github.com/snowblitzer), [@stanislav-c](https://github.com/stanislav-c), [@stephenglass](https://github.com/stephenglass), [@stijnbrouwers](https://github.com/stijnbrouwers), [@suniljose25](https://github.com/suniljose25), [@tcardonne](https://github.com/tcardonne), [@vadave](https://github.com/vadave), [@veenarm](https://github.com/veenarm), [@vinisdl](https://github.com/vinisdl), [@vinzscam](https://github.com/vinzscam), [@waldirmontoya25](https://github.com/waldirmontoya25), [@ydayagi](https://github.com/ydayagi), [@zaperex](https://github.com/zaperex). diff --git a/microsite/data/plugins/digital.ai-release.yaml b/microsite/data/plugins/digital.ai-release.yaml new file mode 100644 index 0000000000..288a95a123 --- /dev/null +++ b/microsite/data/plugins/digital.ai-release.yaml @@ -0,0 +1,18 @@ +--- +title: Digital.ai Release +author: digital.ai +authorUrl: https://digital.ai/ +category: CI/CD +description: The plugin offers integration with Digital.ai Release and backstage. It provide access to active releases, templates and manage workflow executions. +documentation: https://docs.digital.ai/bundle/devops-release-version-v.24.1/page/release/concept/release-backstage-overview.html +iconUrl: /img/digital.ai-release.svg +npmPackageName: '@digital-ai/plugin-dai-release' +tags: + - ci + - cd + - release + - orchestration + - devops + - pipeline + - automation +addedDate: '2024-05-28' diff --git a/microsite/docusaurus.config.ts b/microsite/docusaurus.config.ts index 9e2a70e74e..b1a6533ab9 100644 --- a/microsite/docusaurus.config.ts +++ b/microsite/docusaurus.config.ts @@ -241,7 +241,7 @@ const config: Config = { position: 'left', }, { - to: 'docs/releases/v1.27.0', + to: 'docs/releases/v1.28.0', label: 'Releases', position: 'left', }, diff --git a/microsite/sidebars.json b/microsite/sidebars.json index e81a410825..075025afbb 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -1,6 +1,7 @@ { "releases": { "Release Notes": [ + "releases/v1.28.0", "releases/v1.27.0", "releases/v1.26.0", "releases/v1.25.0", diff --git a/microsite/static/img/digital.ai-release.svg b/microsite/static/img/digital.ai-release.svg new file mode 100644 index 0000000000..ba510e2a79 --- /dev/null +++ b/microsite/static/img/digital.ai-release.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 08d343e681..00732d79f2 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -11872,8 +11872,8 @@ __metadata: linkType: hard "ws@npm:^7.3.1": - version: 7.5.9 - resolution: "ws@npm:7.5.9" + version: 7.5.10 + resolution: "ws@npm:7.5.10" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -11882,7 +11882,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + checksum: f9bb062abf54cc8f02d94ca86dcd349c3945d63851f5d07a3a61c2fcb755b15a88e943a63cf580cbdb5b74436d67ef6b67f745b8f7c0814e411379138e1863cb languageName: node linkType: hard diff --git a/package.json b/package.json index 03b152d1e6..59150dedc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "1.28.0-next.3", + "version": "1.28.0", "private": true, "repository": { "type": "git", @@ -17,7 +17,7 @@ "build:all": "backstage-cli repo build --all", "build:api-docs": "LANG=en_EN yarn build:api-reports --docs --exclude 'plugins/@(adr|adr-backend|adr-common|airbrake|airbrake-backend|allure|analytics-module-ga|analytics-module-ga4|analytics-module-newrelic-browser|apache-airflow|api-docs|api-docs-module-protoc-gen-doc|apollo-explorer|app-visualizer|azure-devops|azure-devops-backend|azure-devops-common|azure-sites|azure-sites-backend|azure-sites-common|badges|badges-backend|bazaar|bazaar-backend|bitbucket-cloud-common|bitrise|catalog-graph|catalog-graphql|catalog-import|catalog-unprocessed-entities|cicd-statistics|cicd-statistics-module-gitlab|circleci|cloudbuild|code-climate|code-coverage|code-coverage-backend|codescene|config-schema|cost-insights|cost-insights-common|dynatrace|entity-feedback|entity-feedback-backend|entity-feedback-common|entity-validation|example-todo-list|example-todo-list-backend|example-todo-list-common|firehydrant|fossa|gcalendar|gcp-projects|git-release-manager|github-actions|github-deployments|github-issues|github-pull-requests-board|gitops-profiles|gocd|graphiql|graphql-backend|graphql-voyager|ilert|jenkins|jenkins-backend|jenkins-common|kafka|kafka-backend|lighthouse|lighthouse-backend|lighthouse-common|linguist|linguist-backend|linguist-common|microsoft-calendar|newrelic|newrelic-dashboard|nomad|nomad-backend|octopus-deploy|opencost|pagerduty|periskop|periskop-backend|playlist|playlist-backend|playlist-common|proxy-backend|puppetdb|rollbar|rollbar-backend|sentry|shortcuts|splunk-on-call|stack-overflow|stack-overflow-backend|stackstorm|tech-radar|tech-radar-2|todo|todo-backend|xcmetrics)'", "build:api-reports": "yarn build:api-reports:only --tsc", - "build:api-reports:only": "NODE_OPTIONS=--max-old-space-size=8192 backstage-repo-tools api-reports --allow-warnings 'packages/backend-common,packages/core-components,plugins/+(catalog|catalog-import|git-release-manager|jenkins|kubernetes)' -o ae-wrong-input-file-type --validate-release-tags", + "build:api-reports:only": "NODE_OPTIONS=--max-old-space-size=8192 backstage-repo-tools api-reports --allow-warnings 'packages/backend-app-api,packages/backend-common,packages/core-components,plugins/+(catalog|catalog-import|git-release-manager|jenkins|kubernetes)' -o ae-wrong-input-file-type --validate-release-tags", "build:backend": "yarn workspace example-backend build", "build:knip-reports": "backstage-repo-tools knip-reports", "build:plugins-report": "node ./scripts/build-plugins-report", @@ -94,6 +94,7 @@ "dependencies": { "@backstage/errors": "workspace:^", "@manypkg/get-packages": "^1.1.3", + "@types/global-agent": "^2.1.3", "@useoptic/optic": "^0.50.10" }, "devDependencies": { diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index dc03f00faf..dc43bdf646 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/app-defaults +## 1.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/core-app-api@1.12.6 + ## 1.5.6-next.2 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index df20b60bf9..f7ed1ab5ea 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/app-defaults", - "version": "1.5.6-next.2", + "version": "1.5.6", "description": "Provides the default wiring of a Backstage App", "backstage": { "role": "web-library" diff --git a/packages/app-next-example-plugin/CHANGELOG.md b/packages/app-next-example-plugin/CHANGELOG.md index c915ed8ff9..9b9603769f 100644 --- a/packages/app-next-example-plugin/CHANGELOG.md +++ b/packages/app-next-example-plugin/CHANGELOG.md @@ -1,5 +1,13 @@ # app-next-example-plugin +## 0.0.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/frontend-plugin-api@0.6.6 + ## 0.0.12-next.2 ### Patch Changes diff --git a/packages/app-next-example-plugin/package.json b/packages/app-next-example-plugin/package.json index c17e398482..c806e32620 100644 --- a/packages/app-next-example-plugin/package.json +++ b/packages/app-next-example-plugin/package.json @@ -1,6 +1,6 @@ { "name": "app-next-example-plugin", - "version": "0.0.12-next.2", + "version": "0.0.12", "description": "Backstage internal example plugin", "backstage": { "role": "frontend-plugin", diff --git a/packages/app-next/CHANGELOG.md b/packages/app-next/CHANGELOG.md index 1f0ae7b5e4..9f1eb9d444 100644 --- a/packages/app-next/CHANGELOG.md +++ b/packages/app-next/CHANGELOG.md @@ -1,5 +1,48 @@ # example-app-next +## 0.0.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/plugin-api-docs@0.11.6 + - @backstage/core-compat-api@0.2.6 + - @backstage/cli@0.26.7 + - @backstage/plugin-scaffolder@1.21.0 + - @backstage/plugin-catalog-import@0.12.0 + - @backstage/plugin-kubernetes@0.11.11 + - @backstage/plugin-search@1.4.12 + - @backstage/plugin-catalog-graph@0.4.6 + - @backstage/plugin-notifications@0.2.2 + - @backstage/plugin-org@0.6.26 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.11 + - @backstage/plugin-catalog-unprocessed-entities@0.2.5 + - @backstage/plugin-kubernetes-cluster@0.0.12 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-app-visualizer@0.1.7 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-user-settings@0.8.7 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/plugin-catalog@1.21.0 + - @backstage/plugin-signals@0.0.7 + - @backstage/plugin-home@0.7.5 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/frontend-app-api@0.7.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.0.12-next.3 ### Patch Changes diff --git a/packages/app-next/package.json b/packages/app-next/package.json index 9277888dc9..1959f9430c 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -1,6 +1,6 @@ { "name": "example-app-next", - "version": "0.0.12-next.3", + "version": "0.0.12", "private": true, "repository": { "type": "git", @@ -62,7 +62,7 @@ "react-use": "^17.2.4", "vite": "^4.4.9", "vite-plugin-html": "^3.2.0", - "vite-plugin-node-polyfills": "^0.21.0", + "vite-plugin-node-polyfills": "^0.22.0", "zen-observable": "^0.10.0" }, "devDependencies": { diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 50e0487a21..3088708cf2 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,46 @@ # example-app +## 0.2.98 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/plugin-api-docs@0.11.6 + - @backstage/cli@0.26.7 + - @backstage/plugin-scaffolder@1.21.0 + - @backstage/plugin-catalog-import@0.12.0 + - @backstage/plugin-kubernetes@0.11.11 + - @backstage/plugin-search@1.4.12 + - @backstage/plugin-catalog-graph@0.4.6 + - @backstage/plugin-notifications@0.2.2 + - @backstage/plugin-org@0.6.26 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.11 + - @backstage/plugin-catalog-unprocessed-entities@0.2.5 + - @backstage/plugin-kubernetes-cluster@0.0.12 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-user-settings@0.8.7 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/plugin-devtools@0.1.15 + - @backstage/plugin-catalog@1.21.0 + - @backstage/plugin-signals@0.0.7 + - @backstage/plugin-home@0.7.5 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/frontend-app-api@0.7.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.2.98-next.3 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 70512e9362..6bbdd1f9ec 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.98-next.3", + "version": "0.2.98", "backstage": { "role": "frontend" }, @@ -83,7 +83,7 @@ "react-use": "^17.2.4", "vite": "^4.4.9", "vite-plugin-html": "^3.2.0", - "vite-plugin-node-polyfills": "^0.21.0", + "vite-plugin-node-polyfills": "^0.22.0", "zen-observable": "^0.10.0" }, "devDependencies": { diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 1d23c727bc..a7804fc74e 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,74 @@ # @backstage/backend-app-api +## 0.7.6 + +### Patch Changes + +- b7de623: Fixed a potential crash when passing an object with a `null` prototype as log meta. +- 9539a0b: Deprecated `authServiceFactory`, `httpAuthServiceFactory`, and `userInfoServiceFactory`. Please import them from `@backstage/backend-defaults/auth`, `@backstage/backend-defaults/httpAuth`, and `@backstage/backend-defaults/userInfo` respectively instead. +- 3e823d3: Limited user tokens will no longer include the `ent` field in its payload. Ownership claims will now be fetched from the user info service. + + NOTE: Limited tokens issued prior to this change will no longer be valid. Users may have to clear their browser cookies in order to refresh their auth tokens. + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 398b82a: Add support for JWKS tokens in ExternalTokenHandler. +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- e25e467: Added a new static key based method for plugin-to-plugin auth. This is useful for example if you are running readonly service nodes that cannot use a database for the default public-key signature scheme outlined in [BEP-0003](https://github.com/backstage/backstage/tree/master/beps/0003-auth-architecture-evolution). Most users should want to stay on the more secure zero-config database signature scheme. + + You can generate a public and private key pair using `openssl`. + + - First generate a private key using the ES256 algorithm + + ```sh + openssl ecparam -name prime256v1 -genkey -out private.ec.key + ``` + + - Convert it to PKCS#8 format + + ```sh + openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private.ec.key -out private.key + ``` + + - Extract the public key + + ```sh + openssl ec -inform PEM -outform PEM -pubout -in private.key -out public.key + ``` + + After this you have the files `private.key` and `public.key`. Put them in a place where you know their absolute paths, and then set up your app-config accordingly: + + ```yaml + backend: + auth: + keyStore: + type: static + static: + keys: + - publicKeyFile: /absolute/path/to/public.key + privateKeyFile: /absolute/path/to/private.key + keyId: some-custom-id + ``` + +- 7d30d95: Fixing issue with log meta fields possibly being circular refs +- 6a576dc: Stop using `getVoidLogger` in tests to reduce the dependency on the soon-to-deprecate `backstage-common` package. +- 6551b3d: Deprecated core service factories and implementations and moved them over to + subpath exports on `@backstage/backend-defaults` instead. E.g. + `@backstage/backend-defaults/scheduler` is where the service factory and default + implementation of `coreServices.scheduler` now lives. +- d617103: Updating the logger redaction message to something less dramatic +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.7.6-next.3 ### Patch Changes diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 3d7357cb87..7518f8e2cc 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -12,6 +12,7 @@ import { CacheService } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { ConfigSchema } from '@backstage/config-loader'; import { CorsOptions } from 'cors'; +import { DatabaseService } from '@backstage/backend-plugin-api'; import { DiscoveryService } from '@backstage/backend-plugin-api'; import { ErrorRequestHandler } from 'express'; import { Express as Express_2 } from 'express'; @@ -28,7 +29,6 @@ import { LifecycleService } from '@backstage/backend-plugin-api'; import { LoadConfigOptionsRemote } from '@backstage/config-loader'; import { LoggerService } from '@backstage/backend-plugin-api'; import { PermissionsService } from '@backstage/backend-plugin-api'; -import { PluginDatabaseManager } from '@backstage/backend-common'; import { RemoteConfigSourceOptions } from '@backstage/config-loader'; import { RequestHandler } from 'express'; import { RequestListener } from 'http'; @@ -45,7 +45,7 @@ import { transport } from 'winston'; import { UrlReaderService } from '@backstage/backend-plugin-api'; import { UserInfoService } from '@backstage/backend-plugin-api'; -// @public (undocumented) +// @public @deprecated (undocumented) export const authServiceFactory: () => ServiceFactory; // @public (undocumented) @@ -68,26 +68,20 @@ export interface Backend { // @public @deprecated (undocumented) export const cacheServiceFactory: () => ServiceFactory; -// @public (undocumented) -export function createConfigSecretEnumerator(options: { - logger: LoggerService; - dir?: string; - schema?: ConfigSchema; -}): Promise<(config: Config) => Iterable>; +// Warning: (ae-forgotten-export) The symbol "createConfigSecretEnumerator_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const createConfigSecretEnumerator: typeof createConfigSecretEnumerator_2; -// @public -export function createHttpServer( - listener: RequestListener, - options: HttpServerOptions, - deps: { - logger: LoggerService; - }, -): Promise; +// Warning: (ae-forgotten-export) The symbol "createHttpServer_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const createHttpServer: typeof createHttpServer_2; -// @public -export function createLifecycleMiddleware( - options: LifecycleMiddlewareOptions, -): RequestHandler; +// Warning: (ae-forgotten-export) The symbol "createLifecycleMiddleware_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated +export const createLifecycleMiddleware: typeof createLifecycleMiddleware_2; // @public (undocumented) export function createSpecializedBackend( @@ -102,11 +96,11 @@ export interface CreateSpecializedBackendOptions { // @public @deprecated (undocumented) export const databaseServiceFactory: () => ServiceFactory< - PluginDatabaseManager, + DatabaseService, 'plugin' >; -// @public +// @public @deprecated export class DefaultRootHttpRouter implements RootHttpRouterService { // (undocumented) static create(options?: DefaultRootHttpRouterOptions): DefaultRootHttpRouter; @@ -116,10 +110,10 @@ export class DefaultRootHttpRouter implements RootHttpRouterService { use(path: string, handler: Handler): void; } -// @public -export interface DefaultRootHttpRouterOptions { - indexPath?: string | false; -} +// Warning: (ae-forgotten-export) The symbol "DefaultRootHttpRouterOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated +export type DefaultRootHttpRouterOptions = DefaultRootHttpRouterOptions_2; // @public @deprecated (undocumented) export const discoveryServiceFactory: () => ServiceFactory< @@ -127,15 +121,10 @@ export const discoveryServiceFactory: () => ServiceFactory< 'plugin' >; -// @public -export interface ExtendedHttpServer extends http.Server { - // (undocumented) - port(): number; - // (undocumented) - start(): Promise; - // (undocumented) - stop(): Promise; -} +// Warning: (ae-forgotten-export) The symbol "ExtendedHttpServer_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type ExtendedHttpServer = ExtendedHttpServer_2; // @public @deprecated export class HostDiscovery implements DiscoveryService { @@ -151,44 +140,31 @@ export class HostDiscovery implements DiscoveryService { getExternalBaseUrl(pluginId: string): Promise; } -// @public (undocumented) +// @public @deprecated (undocumented) export const httpAuthServiceFactory: () => ServiceFactory< HttpAuthService, 'plugin' >; -// @public (undocumented) -export interface HttpRouterFactoryOptions { - getPath?(pluginId: string): string; -} +// Warning: (ae-forgotten-export) The symbol "HttpRouterFactoryOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type HttpRouterFactoryOptions = HttpRouterFactoryOptions_2; -// @public (undocumented) +// @public @deprecated export const httpRouterServiceFactory: ( - options?: HttpRouterFactoryOptions | undefined, + options?: HttpRouterFactoryOptions_2 | undefined, ) => ServiceFactory; -// @public -export type HttpServerCertificateOptions = - | { - type: 'pem'; - key: string; - cert: string; - } - | { - type: 'generated'; - hostname: string; - }; +// Warning: (ae-forgotten-export) The symbol "HttpServerCertificateOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type HttpServerCertificateOptions = HttpServerCertificateOptions_2; -// @public -export type HttpServerOptions = { - listen: { - port: number; - host: string; - }; - https?: { - certificate: HttpServerCertificateOptions; - }; -}; +// Warning: (ae-forgotten-export) The symbol "HttpServerOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type HttpServerOptions = HttpServerOptions_2; // @public @deprecated export type IdentityFactoryOptions = { @@ -201,12 +177,10 @@ export const identityServiceFactory: ( options?: IdentityFactoryOptions | undefined, ) => ServiceFactory; -// @public -export interface LifecycleMiddlewareOptions { - // (undocumented) - lifecycle: LifecycleService; - startupRequestPauseTimeout?: HumanDuration; -} +// Warning: (ae-forgotten-export) The symbol "LifecycleMiddlewareOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated +export type LifecycleMiddlewareOptions = LifecycleMiddlewareOptions_2; // @public @deprecated export const lifecycleServiceFactory: () => ServiceFactory< @@ -214,7 +188,7 @@ export const lifecycleServiceFactory: () => ServiceFactory< 'plugin' >; -// @public +// @public @deprecated export function loadBackendConfig(options: { remote?: LoadConfigOptionsRemote; argv: string[]; @@ -224,13 +198,13 @@ export function loadBackendConfig(options: { config: Config; }>; -// @public (undocumented) +// @public @deprecated export const loggerServiceFactory: () => ServiceFactory< LoggerService, 'plugin' >; -// @public +// @public @deprecated (undocumented) export class MiddlewareFactory { compression(): RequestHandler; cors(): RequestHandler; @@ -241,19 +215,15 @@ export class MiddlewareFactory { notFound(): RequestHandler; } -// @public -export interface MiddlewareFactoryErrorOptions { - logAllErrors?: boolean; - showStackTraces?: boolean; -} +// Warning: (ae-forgotten-export) The symbol "MiddlewareFactoryErrorOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type MiddlewareFactoryErrorOptions = MiddlewareFactoryErrorOptions_2; -// @public -export interface MiddlewareFactoryOptions { - // (undocumented) - config: RootConfigService; - // (undocumented) - logger: LoggerService; -} +// Warning: (ae-forgotten-export) The symbol "MiddlewareFactoryOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type MiddlewareFactoryOptions = MiddlewareFactoryOptions_2; // @public @deprecated (undocumented) export const permissionsServiceFactory: () => ServiceFactory< @@ -261,14 +231,20 @@ export const permissionsServiceFactory: () => ServiceFactory< 'plugin' >; -// @public -export function readCorsOptions(config?: Config): CorsOptions; +// Warning: (ae-forgotten-export) The symbol "readCorsOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const readCorsOptions: typeof readCorsOptions_2; -// @public -export function readHelmetOptions(config?: Config): HelmetOptions; +// Warning: (ae-forgotten-export) The symbol "readHelmetOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const readHelmetOptions: typeof readHelmetOptions_2; -// @public -export function readHttpServerOptions(config?: Config): HttpServerOptions; +// Warning: (ae-forgotten-export) The symbol "readHttpServerOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const readHttpServerOptions: typeof readHttpServerOptions_2; // @public @deprecated (undocumented) export interface RootConfigFactoryOptions { @@ -283,35 +259,19 @@ export const rootConfigServiceFactory: ( options?: RootConfigFactoryOptions | undefined, ) => ServiceFactory; -// @public (undocumented) -export interface RootHttpRouterConfigureContext { - // (undocumented) - app: Express_2; - // (undocumented) - applyDefaults: () => void; - // (undocumented) - config: RootConfigService; - // (undocumented) - lifecycle: LifecycleService; - // (undocumented) - logger: LoggerService; - // (undocumented) - middleware: MiddlewareFactory; - // (undocumented) - routes: RequestHandler; - // (undocumented) - server: Server; -} +// Warning: (ae-forgotten-export) The symbol "RootHttpRouterConfigureContext_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type RootHttpRouterConfigureContext = RootHttpRouterConfigureContext_2; -// @public (undocumented) -export type RootHttpRouterFactoryOptions = { - indexPath?: string | false; - configure?(context: RootHttpRouterConfigureContext): void; -}; +// Warning: (ae-forgotten-export) The symbol "RootHttpRouterFactoryOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated +export type RootHttpRouterFactoryOptions = RootHttpRouterFactoryOptions_2; -// @public (undocumented) +// @public @deprecated (undocumented) export const rootHttpRouterServiceFactory: ( - options?: RootHttpRouterFactoryOptions | undefined, + options?: RootHttpRouterFactoryOptions_2 | undefined, ) => ServiceFactory; // @public @deprecated @@ -320,7 +280,7 @@ export const rootLifecycleServiceFactory: () => ServiceFactory< 'root' >; -// @public (undocumented) +// @public @deprecated export const rootLoggerServiceFactory: () => ServiceFactory< RootLoggerService, 'root' @@ -344,13 +304,13 @@ export const urlReaderServiceFactory: () => ServiceFactory< 'plugin' >; -// @public (undocumented) +// @public @deprecated (undocumented) export const userInfoServiceFactory: () => ServiceFactory< UserInfoService, 'plugin' >; -// @public +// @public @deprecated export class WinstonLogger implements RootLoggerService { // (undocumented) addRedactions(redactions: Iterable): void; @@ -372,15 +332,8 @@ export class WinstonLogger implements RootLoggerService { warn(message: string, meta?: JsonObject): void; } -// @public (undocumented) -export interface WinstonLoggerOptions { - // (undocumented) - format?: Format; - // (undocumented) - level?: string; - // (undocumented) - meta?: JsonObject; - // (undocumented) - transports?: transport[]; -} +// Warning: (ae-forgotten-export) The symbol "WinstonLoggerOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type WinstonLoggerOptions = WinstonLoggerOptions_2; ``` diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 020cdea841..0c1c23d23d 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-app-api", - "version": "0.7.6-next.3", + "version": "0.7.6", "description": "Core API used by Backstage backend apps", "backstage": { "role": "node-library" @@ -79,6 +79,7 @@ "minimatch": "^9.0.0", "minimist": "^1.2.5", "morgan": "^1.10.0", + "node-fetch": "^2.6.7", "node-forge": "^1.3.1", "path-to-regexp": "^6.2.1", "selfsigned": "^2.0.0", @@ -89,6 +90,7 @@ "winston-transport": "^4.5.0" }, "devDependencies": { + "@backstage/backend-defaults": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@types/compression": "^1.7.0", diff --git a/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts b/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts index 5943261b0b..c16a3f6534 100644 --- a/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts +++ b/packages/backend-app-api/src/alpha/featureDiscoveryServiceFactory.ts @@ -168,7 +168,7 @@ export const featureDiscoveryServiceFactory = createServiceFactory({ function isBackendFeature(value: unknown): value is BackendFeature { return ( !!value && - typeof value === 'object' && + ['object', 'function'].includes(typeof value) && (value as BackendFeature).$$type === '@backstage/BackendFeature' ); } diff --git a/packages/backend-app-api/src/config/config.ts b/packages/backend-app-api/src/config/config.ts index 60d1e46e90..957997849e 100644 --- a/packages/backend-app-api/src/config/config.ts +++ b/packages/backend-app-api/src/config/config.ts @@ -14,56 +14,27 @@ * limitations under the License. */ +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { createConfigSecretEnumerator as _createConfigSecretEnumerator } from '../../../backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator'; + import { resolve as resolvePath } from 'path'; import parseArgs from 'minimist'; -import { LoggerService } from '@backstage/backend-plugin-api'; import { findPaths } from '@backstage/cli-common'; import { - loadConfigSchema, loadConfig, ConfigTarget, LoadConfigOptionsRemote, - ConfigSchema, } from '@backstage/config-loader'; import { ConfigReader } from '@backstage/config'; import type { Config, AppConfig } from '@backstage/config'; -import { getPackages } from '@manypkg/get-packages'; import { ObservableConfigProxy } from './ObservableConfigProxy'; import { isValidUrl } from '../lib/urls'; -/** @public */ -export async function createConfigSecretEnumerator(options: { - logger: LoggerService; - dir?: string; - schema?: ConfigSchema; -}): Promise<(config: Config) => Iterable> { - const { logger, dir = process.cwd() } = options; - const { packages } = await getPackages(dir); - const schema = - options.schema ?? - (await loadConfigSchema({ - dependencies: packages.map(p => p.packageJson.name), - })); - - return (config: Config) => { - const [secretsData] = schema.process( - [{ data: config.getOptional() ?? {}, context: 'schema-enumerator' }], - { - visibility: ['secret'], - ignoreSchemaErrors: true, - }, - ); - const secrets = new Set(); - JSON.parse( - JSON.stringify(secretsData.data), - (_, v) => typeof v === 'string' && secrets.add(v), - ); - logger.info( - `Found ${secrets.size} new secrets in config that will be redacted`, - ); - return secrets; - }; -} +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootConfig` instead. + */ +export const createConfigSecretEnumerator = _createConfigSecretEnumerator; /** * Load configuration for a Backend. @@ -71,6 +42,7 @@ export async function createConfigSecretEnumerator(options: { * This function should only be called once, during the initialization of the backend. * * @public + * @deprecated Please migrate to the new backend system and use `coreServices.rootConfig` instead, or the {@link @backstage/config-loader#ConfigSources} facilities if required. */ export async function loadBackendConfig(options: { remote?: LoadConfigOptionsRemote; diff --git a/packages/backend-app-api/src/http/index.ts b/packages/backend-app-api/src/http/index.ts index 4a9ec14cf8..a056ed2d61 100644 --- a/packages/backend-app-api/src/http/index.ts +++ b/packages/backend-app-api/src/http/index.ts @@ -14,17 +14,174 @@ * limitations under the License. */ -export { readHttpServerOptions } from './config'; -export { createHttpServer } from './createHttpServer'; -export { MiddlewareFactory } from './MiddlewareFactory'; -export type { - MiddlewareFactoryErrorOptions, - MiddlewareFactoryOptions, -} from './MiddlewareFactory'; -export { readCorsOptions } from './readCorsOptions'; -export { readHelmetOptions } from './readHelmetOptions'; -export type { - ExtendedHttpServer, - HttpServerCertificateOptions, - HttpServerOptions, -} from './types'; +import { ErrorRequestHandler, RequestHandler } from 'express'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { + readHttpServerOptions as _readHttpServerOptions, + createHttpServer as _createHttpServer, + MiddlewareFactory as _MiddlewareFactory, + readCorsOptions as _readCorsOptions, + readHelmetOptions as _readHelmetOptions, + type MiddlewareFactoryErrorOptions as _MiddlewareFactoryErrorOptions, + type MiddlewareFactoryOptions as _MiddlewareFactoryOptions, + type ExtendedHttpServer as _ExtendedHttpServer, + type HttpServerCertificateOptions as _HttpServerCertificateOptions, + type HttpServerOptions as _HttpServerOptions, +} from '../../../backend-defaults/src/entrypoints/rootHttpRouter/http'; + +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export const readHttpServerOptions = _readHttpServerOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export const createHttpServer = _createHttpServer; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export const readCorsOptions = _readCorsOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export const readHelmetOptions = _readHelmetOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export class MiddlewareFactory { + /** + * Creates a new {@link MiddlewareFactory}. + */ + static create(options: MiddlewareFactoryOptions) { + return new MiddlewareFactory(_MiddlewareFactory.create(options)); + } + + private constructor(private readonly impl: _MiddlewareFactory) {} + + /** + * Returns a middleware that unconditionally produces a 404 error response. + * + * @remarks + * + * Typically you want to place this middleware at the end of the chain, such + * that it's the last one attempted after no other routes matched. + * + * @returns An Express request handler + */ + notFound(): RequestHandler { + return this.impl.notFound(); + } + + /** + * Returns the compression middleware. + * + * @remarks + * + * The middleware will attempt to compress response bodies for all requests + * that traverse through the middleware. + */ + compression(): RequestHandler { + return this.impl.compression(); + } + + /** + * Returns a request logging middleware. + * + * @remarks + * + * Typically you want to place this middleware at the start of the chain, such + * that it always logs requests whether they are "caught" by handlers farther + * down or not. + * + * @returns An Express request handler + */ + logging(): RequestHandler { + return this.impl.logging(); + } + + /** + * Returns a middleware that implements the helmet library. + * + * @remarks + * + * This middleware applies security policies to incoming requests and outgoing + * responses. It is configured using config keys such as `backend.csp`. + * + * @see {@link https://helmetjs.github.io/} + * + * @returns An Express request handler + */ + helmet(): RequestHandler { + return this.impl.helmet(); + } + + /** + * Returns a middleware that implements the cors library. + * + * @remarks + * + * This middleware handles CORS. It is configured using the config key + * `backend.cors`. + * + * @see {@link https://github.com/expressjs/cors} + * + * @returns An Express request handler + */ + cors(): RequestHandler { + return this.impl.cors(); + } + + /** + * Express middleware to handle errors during request processing. + * + * @remarks + * + * This is commonly the very last middleware in the chain. + * + * Its primary purpose is not to do translation of business logic exceptions, + * but rather to be a global catch-all for uncaught "fatal" errors that are + * expected to result in a 500 error. However, it also does handle some common + * error types (such as http-error exceptions, and the well-known error types + * in the `@backstage/errors` package) and returns the enclosed status code + * accordingly. + * + * It will also produce a response body with a serialized form of the error, + * unless a previous handler already did send a body. See + * {@link @backstage/errors#ErrorResponseBody} for the response shape used. + * + * @returns An Express error request handler + */ + error(options: MiddlewareFactoryErrorOptions = {}): ErrorRequestHandler { + return this.impl.error(options); + } +} +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type MiddlewareFactoryErrorOptions = _MiddlewareFactoryErrorOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type MiddlewareFactoryOptions = _MiddlewareFactoryOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type ExtendedHttpServer = _ExtendedHttpServer; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type HttpServerCertificateOptions = _HttpServerCertificateOptions; +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type HttpServerOptions = _HttpServerOptions; diff --git a/packages/backend-app-api/src/logging/WinstonLogger.ts b/packages/backend-app-api/src/logging/WinstonLogger.ts index 64e97b230c..e5403906ce 100644 --- a/packages/backend-app-api/src/logging/WinstonLogger.ts +++ b/packages/backend-app-api/src/logging/WinstonLogger.ts @@ -14,65 +14,37 @@ * limitations under the License. */ +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { + WinstonLogger as _WinstonLogger, + type WinstonLoggerOptions as _WinstonLoggerOptions, +} from '../../../backend-defaults/src/entrypoints/rootLogger'; + import { LoggerService, RootLoggerService, } from '@backstage/backend-plugin-api'; import { JsonObject } from '@backstage/types'; -import { Format, TransformableInfo } from 'logform'; -import { - Logger, - format, - createLogger, - transports, - transport as Transport, -} from 'winston'; -import { MESSAGE } from 'triple-beam'; -import { escapeRegExp } from '../lib/escapeRegExp'; +import { Format } from 'logform'; /** * @public + * @deprecated Please import from `@backstage/backend-defaults/rootLogger` instead. */ -export interface WinstonLoggerOptions { - meta?: JsonObject; - level?: string; - format?: Format; - transports?: Transport[]; -} +export type WinstonLoggerOptions = _WinstonLoggerOptions; /** * A {@link @backstage/backend-plugin-api#LoggerService} implementation based on winston. * * @public + * @deprecated Please import from `@backstage/backend-defaults/rootLogger` instead. */ export class WinstonLogger implements RootLoggerService { - #winston: Logger; - #addRedactions?: (redactions: Iterable) => void; - /** * Creates a {@link WinstonLogger} instance. */ static create(options: WinstonLoggerOptions): WinstonLogger { - const redacter = WinstonLogger.redacter(); - const defaultFormatter = - process.env.NODE_ENV === 'production' - ? format.json() - : WinstonLogger.colorFormat(); - - let logger = createLogger({ - level: process.env.LOG_LEVEL || options.level || 'info', - format: format.combine( - options.format ?? defaultFormatter, - redacter.format, - ), - transports: options.transports ?? new transports.Console(), - }); - - if (options.meta) { - logger = logger.child(options.meta); - } - - return new WinstonLogger(logger, redacter.add); + return new WinstonLogger(_WinstonLogger.create(options)); } /** @@ -82,111 +54,39 @@ export class WinstonLogger implements RootLoggerService { format: Format; add: (redactions: Iterable) => void; } { - const redactionSet = new Set(); - - let redactionPattern: RegExp | undefined = undefined; - - return { - format: format((obj: TransformableInfo) => { - if (!redactionPattern || !obj) { - return obj; - } - - obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***'); - - return obj; - })(), - add(newRedactions) { - let added = 0; - for (const redactionToTrim of newRedactions) { - // Trimming the string ensures that we don't accdentally get extra - // newlines or other whitespace interfering with the redaction; this - // can happen for example when using string literals in yaml - const redaction = redactionToTrim.trim(); - // Exclude secrets that are empty or just one character in length. These - // typically mean that you are running local dev or tests, or using the - // --lax flag which sets things to just 'x'. - if (redaction.length <= 1) { - continue; - } - if (!redactionSet.has(redaction)) { - redactionSet.add(redaction); - added += 1; - } - } - if (added > 0) { - const redactions = Array.from(redactionSet) - .map(r => escapeRegExp(r)) - .join('|'); - redactionPattern = new RegExp(`(${redactions})`, 'g'); - } - }, - }; + return _WinstonLogger.redacter(); } /** * Creates a pretty printed winston log formatter. */ static colorFormat(): Format { - const colorizer = format.colorize(); - - return format.combine( - format.timestamp(), - format.colorize({ - colors: { - timestamp: 'dim', - prefix: 'blue', - field: 'cyan', - debug: 'grey', - }, - }), - format.printf((info: TransformableInfo) => { - const { timestamp, level, message, plugin, service, ...fields } = info; - const prefix = plugin || service; - const timestampColor = colorizer.colorize('timestamp', timestamp); - const prefixColor = colorizer.colorize('prefix', prefix); - - const extraFields = Object.entries(fields) - .map( - ([key, value]) => - `${colorizer.colorize('field', `${key}`)}=${value}`, - ) - .join(' '); - - return `${timestampColor} ${prefixColor} ${level} ${message} ${extraFields}`; - }), - ); + return _WinstonLogger.colorFormat(); } - private constructor( - winston: Logger, - addRedactions?: (redactions: Iterable) => void, - ) { - this.#winston = winston; - this.#addRedactions = addRedactions; - } + private constructor(private readonly impl: _WinstonLogger) {} error(message: string, meta?: JsonObject): void { - this.#winston.error(message, meta); + this.impl.error(message, meta); } warn(message: string, meta?: JsonObject): void { - this.#winston.warn(message, meta); + this.impl.warn(message, meta); } info(message: string, meta?: JsonObject): void { - this.#winston.info(message, meta); + this.impl.info(message, meta); } debug(message: string, meta?: JsonObject): void { - this.#winston.debug(message, meta); + this.impl.debug(message, meta); } child(meta: JsonObject): LoggerService { - return new WinstonLogger(this.#winston.child(meta)); + return this.impl.child(meta); } addRedactions(redactions: Iterable) { - this.#addRedactions?.(redactions); + this.impl.addRedactions(redactions); } } diff --git a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts b/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts index 2a5a210cb7..988b907b4c 100644 --- a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts @@ -14,72 +14,11 @@ * limitations under the License. */ -import { - coreServices, - createServiceFactory, -} from '@backstage/backend-plugin-api'; -import { DefaultAuthService } from './DefaultAuthService'; -import { ExternalTokenHandler } from './external/ExternalTokenHandler'; -import { PluginTokenHandler } from './plugin/PluginTokenHandler'; -import { createPluginKeySource } from './plugin/keys/createPluginKeySource'; -import { UserTokenHandler } from './user/UserTokenHandler'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { authServiceFactory as _authServiceFactory } from '../../../../../backend-defaults/src/entrypoints/auth'; -/** @public */ -export const authServiceFactory = createServiceFactory({ - service: coreServices.auth, - deps: { - config: coreServices.rootConfig, - logger: coreServices.rootLogger, - discovery: coreServices.discovery, - plugin: coreServices.pluginMetadata, - database: coreServices.database, - // Re-using the token manager makes sure that we use the same generated keys for - // development as plugins that have not yet been migrated. It's important that this - // keeps working as long as there are plugins that have not been migrated to the - // new auth services in the new backend system. - tokenManager: coreServices.tokenManager, - }, - async factory({ config, discovery, plugin, tokenManager, logger, database }) { - const disableDefaultAuthPolicy = - config.getOptionalBoolean( - 'backend.auth.dangerouslyDisableDefaultAuthPolicy', - ) ?? false; - - const keyDuration = { hours: 1 }; - - const keySource = await createPluginKeySource({ - config, - database, - logger, - keyDuration, - }); - - const userTokens = UserTokenHandler.create({ - discovery, - }); - - const pluginTokens = PluginTokenHandler.create({ - ownPluginId: plugin.getId(), - logger, - keySource, - keyDuration, - discovery, - }); - - const externalTokens = ExternalTokenHandler.create({ - ownPluginId: plugin.getId(), - config, - logger, - }); - - return new DefaultAuthService( - userTokens, - pluginTokens, - externalTokens, - tokenManager, - plugin.getId(), - disableDefaultAuthPolicy, - keySource, - ); - }, -}); +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/auth` instead. + */ +export const authServiceFactory = _authServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/deprecated.ts b/packages/backend-app-api/src/services/implementations/deprecated.ts index 6f4f76e679..347a968bce 100644 --- a/packages/backend-app-api/src/services/implementations/deprecated.ts +++ b/packages/backend-app-api/src/services/implementations/deprecated.ts @@ -14,4 +14,11 @@ * limitations under the License. */ +export * from './auth'; +export * from './httpAuth'; +export * from './httpRouter'; +export * from './logger'; +export * from './rootHttpRouter'; +export * from './rootLogger'; export * from './scheduler'; +export * from './userInfo'; diff --git a/packages/backend-app-api/src/services/implementations/discovery/HostDiscovery.ts b/packages/backend-app-api/src/services/implementations/discovery/HostDiscovery.ts index d337da997a..5909dd1ae6 100644 --- a/packages/backend-app-api/src/services/implementations/discovery/HostDiscovery.ts +++ b/packages/backend-app-api/src/services/implementations/discovery/HostDiscovery.ts @@ -15,10 +15,9 @@ */ import { Config } from '@backstage/config'; -import { readHttpServerOptions } from '@backstage/backend-app-api'; import { DiscoveryService } from '@backstage/backend-plugin-api'; - -type Target = string | { internal: string; external: string }; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { HostDiscovery as _HostDiscovery } from '../../../../../backend-defaults/src/entrypoints/discovery'; /** * HostDiscovery is a basic PluginEndpointDiscovery implementation @@ -57,77 +56,16 @@ export class HostDiscovery implements DiscoveryService { * path for the `catalog` plugin will be `http://localhost:7007/api/catalog`. */ static fromConfig(config: Config, options?: { basePath?: string }) { - const basePath = options?.basePath ?? '/api'; - const externalBaseUrl = config - .getString('backend.baseUrl') - .replace(/\/+$/, ''); - - const { - listen: { host: listenHost = '::', port: listenPort }, - } = readHttpServerOptions(config.getConfig('backend')); - const protocol = config.has('backend.https') ? 'https' : 'http'; - - // Translate bind-all to localhost, and support IPv6 - let host = listenHost; - if (host === '::' || host === '') { - // We use localhost instead of ::1, since IPv6-compatible systems should default - // to using IPv6 when they see localhost, but if the system doesn't support IPv6 - // things will still work. - host = 'localhost'; - } else if (host === '0.0.0.0') { - host = '127.0.0.1'; - } - if (host.includes(':')) { - host = `[${host}]`; - } - - const internalBaseUrl = `${protocol}://${host}:${listenPort}`; - - return new HostDiscovery( - internalBaseUrl + basePath, - externalBaseUrl + basePath, - config.getOptionalConfig('discovery'), - ); + return new HostDiscovery(_HostDiscovery.fromConfig(config, options)); } - private constructor( - private readonly internalBaseUrl: string, - private readonly externalBaseUrl: string, - private readonly discoveryConfig: Config | undefined, - ) {} - - private getTargetFromConfig(pluginId: string, type: 'internal' | 'external') { - const endpoints = this.discoveryConfig?.getOptionalConfigArray('endpoints'); - - const target = endpoints - ?.find(endpoint => endpoint.getStringArray('plugins').includes(pluginId)) - ?.get('target'); - - if (!target) { - const baseUrl = - type === 'external' ? this.externalBaseUrl : this.internalBaseUrl; - - return `${baseUrl}/${encodeURIComponent(pluginId)}`; - } - - if (typeof target === 'string') { - return target.replace( - /\{\{\s*pluginId\s*\}\}/g, - encodeURIComponent(pluginId), - ); - } - - return target[type].replace( - /\{\{\s*pluginId\s*\}\}/g, - encodeURIComponent(pluginId), - ); - } + private constructor(private readonly impl: _HostDiscovery) {} async getBaseUrl(pluginId: string): Promise { - return this.getTargetFromConfig(pluginId, 'internal'); + return this.impl.getBaseUrl(pluginId); } async getExternalBaseUrl(pluginId: string): Promise { - return this.getTargetFromConfig(pluginId, 'external'); + return this.impl.getExternalBaseUrl(pluginId); } } diff --git a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts index c85ba6e4b3..373dd10ead 100644 --- a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts @@ -14,273 +14,11 @@ * limitations under the License. */ -import { - AuthService, - BackstageCredentials, - BackstagePrincipalTypes, - BackstageUserPrincipal, - DiscoveryService, - HttpAuthService, - coreServices, - createServiceFactory, -} from '@backstage/backend-plugin-api'; -import { AuthenticationError, NotAllowedError } from '@backstage/errors'; -import { parse as parseCookie } from 'cookie'; -import { Request, Response } from 'express'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { httpAuthServiceFactory as _httpAuthServiceFactory } from '../../../../../backend-defaults/src/entrypoints/httpAuth'; -const FIVE_MINUTES_MS = 5 * 60 * 1000; - -const BACKSTAGE_AUTH_COOKIE = 'backstage-auth'; - -function getTokenFromRequest(req: Request) { - // TODO: support multiple auth headers (iterate rawHeaders) - const authHeader = req.headers.authorization; - if (typeof authHeader === 'string') { - const matches = authHeader.match(/^Bearer[ ]+(\S+)$/i); - const token = matches?.[1]; - if (token) { - return token; - } - } - - return undefined; -} - -function getCookieFromRequest(req: Request) { - const cookieHeader = req.headers.cookie; - if (cookieHeader) { - const cookies = parseCookie(cookieHeader); - const token = cookies[BACKSTAGE_AUTH_COOKIE]; - if (token) { - return token; - } - } - - return undefined; -} - -function willExpireSoon(expiresAt: Date) { - return Date.now() + FIVE_MINUTES_MS > expiresAt.getTime(); -} - -const credentialsSymbol = Symbol('backstage-credentials'); -const limitedCredentialsSymbol = Symbol('backstage-limited-credentials'); - -type RequestWithCredentials = Request & { - [credentialsSymbol]?: Promise; - [limitedCredentialsSymbol]?: Promise; -}; - -class DefaultHttpAuthService implements HttpAuthService { - readonly #auth: AuthService; - readonly #discovery: DiscoveryService; - readonly #pluginId: string; - - constructor( - auth: AuthService, - discovery: DiscoveryService, - pluginId: string, - ) { - this.#auth = auth; - this.#discovery = discovery; - this.#pluginId = pluginId; - } - - async #extractCredentialsFromRequest(req: Request) { - const token = getTokenFromRequest(req); - if (!token) { - return await this.#auth.getNoneCredentials(); - } - - return await this.#auth.authenticate(token); - } - - async #extractLimitedCredentialsFromRequest(req: Request) { - const token = getTokenFromRequest(req); - if (token) { - return await this.#auth.authenticate(token, { - allowLimitedAccess: true, - }); - } - - const cookie = getCookieFromRequest(req); - if (cookie) { - return await this.#auth.authenticate(cookie, { - allowLimitedAccess: true, - }); - } - - return await this.#auth.getNoneCredentials(); - } - - async #getCredentials(req: RequestWithCredentials) { - return (req[credentialsSymbol] ??= - this.#extractCredentialsFromRequest(req)); - } - - async #getLimitedCredentials(req: RequestWithCredentials) { - return (req[limitedCredentialsSymbol] ??= - this.#extractLimitedCredentialsFromRequest(req)); - } - - async credentials( - req: Request, - options?: { - allow?: Array; - allowLimitedAccess?: boolean; - }, - ): Promise> { - // Limited and full credentials are treated as two separate cases, this lets - // us avoid internal dependencies between the AuthService and - // HttpAuthService implementations - const credentials = options?.allowLimitedAccess - ? await this.#getLimitedCredentials(req) - : await this.#getCredentials(req); - - const allowed = options?.allow; - if (!allowed) { - return credentials as any; - } - - if (this.#auth.isPrincipal(credentials, 'none')) { - if (allowed.includes('none' as TAllowed)) { - return credentials as any; - } - - throw new AuthenticationError('Missing credentials'); - } else if (this.#auth.isPrincipal(credentials, 'user')) { - if (allowed.includes('user' as TAllowed)) { - return credentials as any; - } - - throw new NotAllowedError( - `This endpoint does not allow 'user' credentials`, - ); - } else if (this.#auth.isPrincipal(credentials, 'service')) { - if (allowed.includes('service' as TAllowed)) { - return credentials as any; - } - - throw new NotAllowedError( - `This endpoint does not allow 'service' credentials`, - ); - } - - throw new NotAllowedError( - 'Unknown principal type, this should never happen', - ); - } - - async issueUserCookie( - res: Response, - options?: { credentials?: BackstageCredentials }, - ): Promise<{ expiresAt: Date }> { - if (res.headersSent) { - throw new Error('Failed to issue user cookie, headers were already sent'); - } - - let credentials: BackstageCredentials; - if (options?.credentials) { - if (this.#auth.isPrincipal(options.credentials, 'none')) { - res.clearCookie( - BACKSTAGE_AUTH_COOKIE, - await this.#getCookieOptions(res.req), - ); - return { expiresAt: new Date() }; - } - if (!this.#auth.isPrincipal(options.credentials, 'user')) { - throw new AuthenticationError( - 'Refused to issue cookie for non-user principal', - ); - } - credentials = options.credentials; - } else { - credentials = await this.credentials(res.req, { allow: ['user'] }); - } - - const existingExpiresAt = await this.#existingCookieExpiration(res.req); - if (existingExpiresAt && !willExpireSoon(existingExpiresAt)) { - return { expiresAt: existingExpiresAt }; - } - - const { token, expiresAt } = await this.#auth.getLimitedUserToken( - credentials, - ); - if (!token) { - throw new Error('User credentials is unexpectedly missing token'); - } - - res.cookie(BACKSTAGE_AUTH_COOKIE, token, { - ...(await this.#getCookieOptions(res.req)), - expires: expiresAt, - }); - - return { expiresAt }; - } - - async #getCookieOptions(_req: Request): Promise<{ - domain: string; - httpOnly: true; - secure: boolean; - priority: 'high'; - sameSite: 'none' | 'lax'; - }> { - // TODO: eventually we should read from `${req.protocol}://${req.hostname}` - // once https://github.com/backstage/backstage/issues/24169 has landed - const externalBaseUrlStr = await this.#discovery.getExternalBaseUrl( - this.#pluginId, - ); - const externalBaseUrl = new URL(externalBaseUrlStr); - - const secure = - externalBaseUrl.protocol === 'https:' || - externalBaseUrl.hostname === 'localhost'; - - return { - domain: externalBaseUrl.hostname, - httpOnly: true, - secure, - priority: 'high', - sameSite: secure ? 'none' : 'lax', - }; - } - - async #existingCookieExpiration(req: Request): Promise { - const existingCookie = getCookieFromRequest(req); - if (!existingCookie) { - return undefined; - } - - try { - const existingCredentials = await this.#auth.authenticate( - existingCookie, - { - allowLimitedAccess: true, - }, - ); - if (!this.#auth.isPrincipal(existingCredentials, 'user')) { - return undefined; - } - - return existingCredentials.expiresAt; - } catch (error) { - if (error.name === 'AuthenticationError') { - return undefined; - } - throw error; - } - } -} - -/** @public */ -export const httpAuthServiceFactory = createServiceFactory({ - service: coreServices.httpAuth, - deps: { - auth: coreServices.auth, - discovery: coreServices.discovery, - plugin: coreServices.pluginMetadata, - }, - async factory({ auth, discovery, plugin }) { - return new DefaultHttpAuthService(auth, discovery, plugin.getId()); - }, -}); +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/httpAuth` instead. + */ +export const httpAuthServiceFactory = _httpAuthServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.ts b/packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.ts index 3f8ee3ea69..d4864a23a6 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.ts @@ -14,26 +14,18 @@ * limitations under the License. */ -import { LifecycleService } from '@backstage/backend-plugin-api'; -import { ServiceUnavailableError } from '@backstage/errors'; -import { HumanDuration, durationToMilliseconds } from '@backstage/types'; -import { RequestHandler } from 'express'; - -export const DEFAULT_TIMEOUT = { seconds: 5 }; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { + createLifecycleMiddleware as _createLifecycleMiddleware, + type LifecycleMiddlewareOptions as _LifecycleMiddlewareOptions, +} from '../../../../../backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware'; /** * Options for {@link createLifecycleMiddleware}. * @public + * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead. */ -export interface LifecycleMiddlewareOptions { - lifecycle: LifecycleService; - /** - * The maximum time that paused requests will wait for the service to start, before returning an error. - * - * Defaults to 5 seconds. - */ - startupRequestPauseTimeout?: HumanDuration; -} +export type LifecycleMiddlewareOptions = _LifecycleMiddlewareOptions; /** * Creates a middleware that pauses requests until the service has started. @@ -48,59 +40,6 @@ export interface LifecycleMiddlewareOptions { * {@link @backstage/errors#ServiceUnavailableError}. * * @public + * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead. */ -export function createLifecycleMiddleware( - options: LifecycleMiddlewareOptions, -): RequestHandler { - const { lifecycle, startupRequestPauseTimeout = DEFAULT_TIMEOUT } = options; - - let state: 'init' | 'up' | 'down' = 'init'; - const waiting = new Set<{ - next: (err?: Error) => void; - timeout: NodeJS.Timeout; - }>(); - - lifecycle.addStartupHook(async () => { - if (state === 'init') { - state = 'up'; - for (const item of waiting) { - clearTimeout(item.timeout); - item.next(); - } - waiting.clear(); - } - }); - - lifecycle.addShutdownHook(async () => { - state = 'down'; - - for (const item of waiting) { - clearTimeout(item.timeout); - item.next(new ServiceUnavailableError('Service is shutting down')); - } - waiting.clear(); - }); - - const timeoutMs = durationToMilliseconds(startupRequestPauseTimeout); - - return (_req, _res, next) => { - if (state === 'up') { - next(); - return; - } else if (state === 'down') { - next(new ServiceUnavailableError('Service is shutting down')); - return; - } - - const item = { - next, - timeout: setTimeout(() => { - if (waiting.delete(item)) { - next(new ServiceUnavailableError('Service has not started up yet')); - } - }, timeoutMs), - }; - - waiting.add(item); - }; -} +export const createLifecycleMiddleware = _createLifecycleMiddleware; diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts index 5e3a26252f..9d2b74fb43 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts @@ -14,80 +14,26 @@ * limitations under the License. */ -import { Handler } from 'express'; -import PromiseRouter from 'express-promise-router'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports import { - coreServices, - createServiceFactory, - HttpRouterServiceAuthPolicy, -} from '@backstage/backend-plugin-api'; -import { createLifecycleMiddleware } from './createLifecycleMiddleware'; -import { createCredentialsBarrier } from './createCredentialsBarrier'; -import { createAuthIntegrationRouter } from './createAuthIntegrationRouter'; -import { createCookieAuthRefreshMiddleware } from './createCookieAuthRefreshMiddleware'; + httpRouterServiceFactory as _httpRouterServiceFactory, + type HttpRouterFactoryOptions as _HttpRouterFactoryOptions, +} from '../../../../../backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory'; /** * @public + * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead. */ -export interface HttpRouterFactoryOptions { - /** - * A callback used to generate the path for each plugin, defaults to `/api/{pluginId}`. - */ - getPath?(pluginId: string): string; -} +export type HttpRouterFactoryOptions = _HttpRouterFactoryOptions; -/** @public */ -export const httpRouterServiceFactory = createServiceFactory( - (options?: HttpRouterFactoryOptions) => ({ - service: coreServices.httpRouter, - initialization: 'always', - deps: { - plugin: coreServices.pluginMetadata, - config: coreServices.rootConfig, - logger: coreServices.logger, - lifecycle: coreServices.lifecycle, - rootHttpRouter: coreServices.rootHttpRouter, - auth: coreServices.auth, - httpAuth: coreServices.httpAuth, - }, - async factory({ - auth, - httpAuth, - config, - logger, - plugin, - rootHttpRouter, - lifecycle, - }) { - if (options?.getPath) { - logger.warn( - `DEPRECATION WARNING: The 'getPath' option for HttpRouterService is deprecated. The ability to reconfigure the '/api/' path prefix for plugins will be removed in the future.`, - ); - } - const getPath = options?.getPath ?? (id => `/api/${id}`); - const path = getPath(plugin.getId()); - - const router = PromiseRouter(); - rootHttpRouter.use(path, router); - - const credentialsBarrier = createCredentialsBarrier({ - httpAuth, - config, - }); - - router.use(createAuthIntegrationRouter({ auth })); - router.use(createLifecycleMiddleware({ lifecycle })); - router.use(credentialsBarrier.middleware); - router.use(createCookieAuthRefreshMiddleware({ auth, httpAuth })); - - return { - use(handler: Handler): void { - router.use(handler); - }, - addAuthPolicy(policy: HttpRouterServiceAuthPolicy): void { - credentialsBarrier.addAuthPolicy(policy); - }, - }; - }, - }), -); +/** + * HTTP route registration for plugins. + * + * See {@link @backstage/code-plugin-api#HttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/http-router | the service docs} + * for more information. + * + * @public + * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead. + */ +export const httpRouterServiceFactory = _httpRouterServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/index.ts b/packages/backend-app-api/src/services/implementations/index.ts index e6656801a9..3a2fe819ed 100644 --- a/packages/backend-app-api/src/services/implementations/index.ts +++ b/packages/backend-app-api/src/services/implementations/index.ts @@ -14,22 +14,15 @@ * limitations under the License. */ -export * from './auth'; export * from './cache'; export * from './config'; export * from './database'; export * from './discovery'; -export * from './httpAuth'; -export * from './httpRouter'; export * from './identity'; export * from './lifecycle'; -export * from './logger'; export * from './permissions'; -export * from './rootHttpRouter'; export * from './rootLifecycle'; -export * from './rootLogger'; export * from './tokenManager'; export * from './urlReader'; -export * from './userInfo'; export * from './deprecated'; diff --git a/packages/backend-app-api/src/services/implementations/logger/loggerServiceFactory.ts b/packages/backend-app-api/src/services/implementations/logger/loggerServiceFactory.ts index d9158529ca..7e7b4b98b0 100644 --- a/packages/backend-app-api/src/services/implementations/logger/loggerServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/logger/loggerServiceFactory.ts @@ -14,19 +14,17 @@ * limitations under the License. */ -import { - createServiceFactory, - coreServices, -} from '@backstage/backend-plugin-api'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { loggerServiceFactory as _loggerServiceFactory } from '../../../../../backend-defaults/src/entrypoints/logger/loggerServiceFactory'; -/** @public */ -export const loggerServiceFactory = createServiceFactory({ - service: coreServices.logger, - deps: { - rootLogger: coreServices.rootLogger, - plugin: coreServices.pluginMetadata, - }, - factory({ rootLogger, plugin }) { - return rootLogger.child({ plugin: plugin.getId() }); - }, -}); +/** + * Plugin-level logging. + * + * See {@link @backstage/code-plugin-api#LoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/logger | the service docs} + * for more information. + * + * @public + * @deprecated Please import from `@backstage/backend-defaults/logger` instead. + */ +export const loggerServiceFactory = _loggerServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/rootHttpRouter/DefaultRootHttpRouter.ts b/packages/backend-app-api/src/services/implementations/rootHttpRouter/DefaultRootHttpRouter.ts index 9d7d1de120..617d5055db 100644 --- a/packages/backend-app-api/src/services/implementations/rootHttpRouter/DefaultRootHttpRouter.ts +++ b/packages/backend-app-api/src/services/implementations/rootHttpRouter/DefaultRootHttpRouter.ts @@ -15,101 +15,40 @@ */ import { RootHttpRouterService } from '@backstage/backend-plugin-api'; -import { Handler, Router } from 'express'; -import trimEnd from 'lodash/trimEnd'; - -function normalizePath(path: string): string { - return `${trimEnd(path, '/')}/`; -} +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { + DefaultRootHttpRouter as _DefaultRootHttpRouter, + DefaultRootHttpRouterOptions as _DefaultRootHttpRouterOptions, +} from '../../../../../backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter'; +import { Handler } from 'express'; /** * Options for the {@link DefaultRootHttpRouter} class. * * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. */ -export interface DefaultRootHttpRouterOptions { - /** - * The path to forward all unmatched requests to. Defaults to '/api/app' if - * not given. Disables index path behavior if false is given. - */ - indexPath?: string | false; -} +export type DefaultRootHttpRouterOptions = _DefaultRootHttpRouterOptions; /** * The default implementation of the {@link @backstage/backend-plugin-api#RootHttpRouterService} interface for * {@link @backstage/backend-plugin-api#coreServices.rootHttpRouter}. * * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. */ export class DefaultRootHttpRouter implements RootHttpRouterService { - #indexPath?: string; - - #router = Router(); - #namedRoutes = Router(); - #indexRouter = Router(); - #existingPaths = new Array(); - static create(options?: DefaultRootHttpRouterOptions) { - let indexPath; - if (options?.indexPath === false) { - indexPath = undefined; - } else if (options?.indexPath === undefined) { - indexPath = '/api/app'; - } else if (options?.indexPath === '') { - throw new Error('indexPath option may not be an empty string'); - } else { - indexPath = options.indexPath; - } - return new DefaultRootHttpRouter(indexPath); + return new DefaultRootHttpRouter(_DefaultRootHttpRouter.create(options)); } - private constructor(indexPath?: string) { - this.#indexPath = indexPath; - this.#router.use(this.#namedRoutes); - - // Any request with a /api/ prefix will skip the index router, even if no named router matches - this.#router.use('/api/', (_req, _res, next) => { - next('router'); - }); - - if (this.#indexPath) { - this.#router.use(this.#indexRouter); - } - } + private constructor(private readonly impl: RootHttpRouterService) {} use(path: string, handler: Handler) { - if (path.match(/^[/\s]*$/)) { - throw new Error(`Root router path may not be empty`); - } - const conflictingPath = this.#findConflictingPath(path); - if (conflictingPath) { - throw new Error( - `Path ${path} conflicts with the existing path ${conflictingPath}`, - ); - } - this.#existingPaths.push(path); - this.#namedRoutes.use(path, handler); - - if (this.#indexPath === path) { - this.#indexRouter.use(handler); - } + this.impl.use(path, handler); } handler(): Handler { - return this.#router; - } - - #findConflictingPath(newPath: string): string | undefined { - const normalizedNewPath = normalizePath(newPath); - for (const path of this.#existingPaths) { - const normalizedPath = normalizePath(path); - if (normalizedPath.startsWith(normalizedNewPath)) { - return path; - } - if (normalizedNewPath.startsWith(normalizedPath)) { - return path; - } - } - return undefined; + return (this.impl as any).handler(); } } diff --git a/packages/backend-app-api/src/services/implementations/rootHttpRouter/rootHttpRouterServiceFactory.ts b/packages/backend-app-api/src/services/implementations/rootHttpRouter/rootHttpRouterServiceFactory.ts index a469a2f303..bef1913645 100644 --- a/packages/backend-app-api/src/services/implementations/rootHttpRouter/rootHttpRouterServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/rootHttpRouter/rootHttpRouterServiceFactory.ts @@ -14,100 +14,33 @@ * limitations under the License. */ +// eslint-disable-next-line @backstage/no-relative-monorepo-imports import { - RootConfigService, - coreServices, - createServiceFactory, - LifecycleService, - LoggerService, -} from '@backstage/backend-plugin-api'; -import express, { RequestHandler, Express } from 'express'; -import type { Server } from 'node:http'; -import { - createHttpServer, - MiddlewareFactory, - readHttpServerOptions, -} from '../../../http'; -import { DefaultRootHttpRouter } from './DefaultRootHttpRouter'; + rootHttpRouterServiceFactory as _rootHttpRouterServiceFactory, + RootHttpRouterFactoryOptions as _RootHttpRouterFactoryOptions, + RootHttpRouterConfigureContext as _RootHttpRouterConfigureContext, +} from '../../../../../backend-defaults/src/entrypoints/rootHttpRouter/rootHttpRouterServiceFactory'; /** * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. */ -export interface RootHttpRouterConfigureContext { - app: Express; - server: Server; - middleware: MiddlewareFactory; - routes: RequestHandler; - config: RootConfigService; - logger: LoggerService; - lifecycle: LifecycleService; - applyDefaults: () => void; -} +export type RootHttpRouterConfigureContext = _RootHttpRouterConfigureContext; + +/** + * HTTP route registration for root services. + * + * See {@link @backstage/code-plugin-api#RootHttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-http-router | the service docs} + * for more information. + * + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. + */ +export type RootHttpRouterFactoryOptions = _RootHttpRouterFactoryOptions; /** * @public + * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead. */ -export type RootHttpRouterFactoryOptions = { - /** - * The path to forward all unmatched requests to. Defaults to '/api/app' if - * not given. Disables index path behavior if false is given. - */ - indexPath?: string | false; - - configure?(context: RootHttpRouterConfigureContext): void; -}; - -function defaultConfigure({ applyDefaults }: RootHttpRouterConfigureContext) { - applyDefaults(); -} - -/** @public */ -export const rootHttpRouterServiceFactory = createServiceFactory( - (options?: RootHttpRouterFactoryOptions) => ({ - service: coreServices.rootHttpRouter, - deps: { - config: coreServices.rootConfig, - rootLogger: coreServices.rootLogger, - lifecycle: coreServices.rootLifecycle, - }, - async factory({ config, rootLogger, lifecycle }) { - const { indexPath, configure = defaultConfigure } = options ?? {}; - const logger = rootLogger.child({ service: 'rootHttpRouter' }); - const app = express(); - - const router = DefaultRootHttpRouter.create({ indexPath }); - const middleware = MiddlewareFactory.create({ config, logger }); - const routes = router.handler(); - const server = await createHttpServer( - app, - readHttpServerOptions(config.getOptionalConfig('backend')), - { logger }, - ); - - configure({ - app, - server, - routes, - middleware, - config, - logger, - lifecycle, - applyDefaults() { - app.use(middleware.helmet()); - app.use(middleware.cors()); - app.use(middleware.compression()); - app.use(middleware.logging()); - app.use(routes); - app.use(middleware.notFound()); - app.use(middleware.error()); - }, - }); - - lifecycle.addShutdownHook(() => server.stop()); - - await server.start(); - - return router; - }, - }), -); +export const rootHttpRouterServiceFactory = _rootHttpRouterServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/rootLogger/rootLoggerServiceFactory.ts b/packages/backend-app-api/src/services/implementations/rootLogger/rootLoggerServiceFactory.ts index bd45df383f..af1931c438 100644 --- a/packages/backend-app-api/src/services/implementations/rootLogger/rootLoggerServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/rootLogger/rootLoggerServiceFactory.ts @@ -14,37 +14,17 @@ * limitations under the License. */ -import { - createServiceFactory, - coreServices, -} from '@backstage/backend-plugin-api'; -import { WinstonLogger } from '../../../logging'; -import { transports, format } from 'winston'; -import { createConfigSecretEnumerator } from '../../../config'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { rootLoggerServiceFactory as _rootLoggerServiceFactory } from '../../../../../backend-defaults/src/entrypoints/rootLogger/rootLoggerServiceFactory'; -/** @public */ -export const rootLoggerServiceFactory = createServiceFactory({ - service: coreServices.rootLogger, - deps: { - config: coreServices.rootConfig, - }, - async factory({ config }) { - const logger = WinstonLogger.create({ - meta: { - service: 'backstage', - }, - level: process.env.LOG_LEVEL || 'info', - format: - process.env.NODE_ENV === 'production' - ? format.json() - : WinstonLogger.colorFormat(), - transports: [new transports.Console()], - }); - - const secretEnumerator = await createConfigSecretEnumerator({ logger }); - logger.addRedactions(secretEnumerator(config)); - config.subscribe?.(() => logger.addRedactions(secretEnumerator(config))); - - return logger; - }, -}); +/** + * Root-level logging. + * + * See {@link @backstage/code-plugin-api#RootLoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-logger | the service docs} + * for more information. + * + * @public + * @deprecated Please import from `@backstage/backend-defaults/rootLogger` instead. + */ +export const rootLoggerServiceFactory = _rootLoggerServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/userInfo/userInfoServiceFactory.ts b/packages/backend-app-api/src/services/implementations/userInfo/userInfoServiceFactory.ts index e88acaf4c2..746f480c41 100644 --- a/packages/backend-app-api/src/services/implementations/userInfo/userInfoServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/userInfo/userInfoServiceFactory.ts @@ -14,51 +14,11 @@ * limitations under the License. */ -import { - UserInfoService, - BackstageUserInfo, - coreServices, - createServiceFactory, - BackstageCredentials, -} from '@backstage/backend-plugin-api'; -import { decodeJwt } from 'jose'; -import { toInternalBackstageCredentials } from '../auth/helpers'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { userInfoServiceFactory as _userInfoServiceFactory } from '../../../../../backend-defaults/src/entrypoints/userInfo'; -// TODO: The intention is for this to eventually be replaced by a call to the auth-backend -export class DefaultUserInfoService implements UserInfoService { - async getUserInfo( - credentials: BackstageCredentials, - ): Promise { - const internalCredentials = toInternalBackstageCredentials(credentials); - if (internalCredentials.principal.type !== 'user') { - throw new Error('Only user credentials are supported'); - } - if (!internalCredentials.token) { - throw new Error('User credentials is unexpectedly missing token'); - } - const { sub: userEntityRef, ent: ownershipEntityRefs = [] } = decodeJwt( - internalCredentials.token, - ); - - if (typeof userEntityRef !== 'string') { - throw new Error('User entity ref must be a string'); - } - if ( - !Array.isArray(ownershipEntityRefs) || - ownershipEntityRefs.some(ref => typeof ref !== 'string') - ) { - throw new Error('Ownership entity refs must be an array of strings'); - } - - return { userEntityRef, ownershipEntityRefs }; - } -} - -/** @public */ -export const userInfoServiceFactory = createServiceFactory({ - service: coreServices.userInfo, - deps: {}, - async factory() { - return new DefaultUserInfoService(); - }, -}); +/** + * @public + * @deprecated Please import from `@backstage/backend-defaults/userInfo` instead. + */ +export const userInfoServiceFactory = _userInfoServiceFactory; diff --git a/packages/backend-app-api/src/wiring/BackendInitializer.test.ts b/packages/backend-app-api/src/wiring/BackendInitializer.test.ts index b60eede277..3bbef5a4c0 100644 --- a/packages/backend-app-api/src/wiring/BackendInitializer.test.ts +++ b/packages/backend-app-api/src/wiring/BackendInitializer.test.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +import { rootLifecycleServiceFactory } from '@backstage/backend-defaults/rootLifecycle'; +import { lifecycleServiceFactory } from '@backstage/backend-defaults/lifecycle'; +import { loggerServiceFactory } from '@backstage/backend-defaults/logger'; import { createServiceRef, createServiceFactory, @@ -24,12 +27,6 @@ import { } from '@backstage/backend-plugin-api'; import { BackendInitializer } from './BackendInitializer'; -import { - lifecycleServiceFactory, - loggerServiceFactory, - rootLifecycleServiceFactory, -} from '../services/implementations'; - class MockLogger { debug() {} info() {} @@ -153,7 +150,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); await init.start(); @@ -184,7 +181,7 @@ describe('BackendInitializer', () => { }, }); }, - })(), + }), ); init.add( @@ -201,7 +198,7 @@ describe('BackendInitializer', () => { }, }); }, - })(), + }), ); init.add( @@ -217,7 +214,7 @@ describe('BackendInitializer', () => { }, }); }, - })(), + }), ); await init.start(); }); @@ -235,7 +232,7 @@ describe('BackendInitializer', () => { }, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Plugin 'test' startup failed; caused by Error: NOPE", @@ -257,7 +254,7 @@ describe('BackendInitializer', () => { }, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Module 'mod' for plugin 'test' startup failed; caused by Error: NOPE", @@ -275,7 +272,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); init.add( createBackendPlugin({ @@ -286,7 +283,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Plugin 'test' is already registered", @@ -306,7 +303,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); init.add( createBackendModule({ @@ -318,7 +315,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Module 'mod' for plugin 'test' is already registered", @@ -348,7 +345,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); init.add( createBackendModule({ @@ -361,7 +358,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Circular dependency detected for modules of plugin 'test', 'mod-a' -> 'mod-b' -> 'mod-a'", @@ -381,7 +378,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); init.add(testPlugin); init.add( @@ -394,7 +391,7 @@ describe('BackendInitializer', () => { async init() {}, }); }, - })(), + }), ); await expect(init.start()).rejects.toThrow( "Illegal dependency: Module 'mod' for plugin 'test' attempted to depend on extension point 'a' for plugin 'test-a'. Extension points can only be used within their plugin's scope.", diff --git a/packages/backend-app-api/src/wiring/BackstageBackend.ts b/packages/backend-app-api/src/wiring/BackstageBackend.ts index d523481cf7..0dd3ba4423 100644 --- a/packages/backend-app-api/src/wiring/BackstageBackend.ts +++ b/packages/backend-app-api/src/wiring/BackstageBackend.ts @@ -65,9 +65,11 @@ function unwrapFeature( if (typeof feature === 'function') { return feature(); } + if ('$$type' in feature) { return feature; } + // This is a workaround where default exports get transpiled to `exports['default'] = ...` // in CommonJS modules, which in turn results in a double `{ default: { default: ... } }` nesting // when importing using a dynamic import. @@ -78,5 +80,6 @@ function unwrapFeature( ? defaultFeature() : defaultFeature; } + return feature; } diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 35cfab0d74..8d0ab8984c 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,44 @@ # @backstage/backend-common +## 0.23.0 + +### Minor Changes + +- 395b973: Implemented `readTree` for Harness provider to support TechDocs functionality +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- 9539a0b: Import utility functions from `backend-defaults` instead of `backend-app-api` +- b2c4607: Removed accents on deprecation note +- c6c0919: Updated configuration schema to include the `useRedisSets` cache config option. +- ed3074e: The `database` types, helpers and implementations were moved to the package `@backstage/backend-defaults` and deprecated from the package `@backstage/backend-commons`. +- 9cca724: The `TokenManager` has been deprecated in preparation for the [stable release of the New Backend System](https://github.com/backstage/backstage/issues/24493). Please [migrate](https://backstage.io/docs/tutorials/auth-service-migration) to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead. +- 1779188: In preparation to the new backend system stable release, the `isDatabaseConflictError` helper have been moved to the `@backstage/backend-plugin-api` package and deprecated from `@backstage/backend-common`. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- e171620: Move `cache` implementation and types to the `@backstage/backend-defaults` package. +- 1a6f38a: `ContainerRunner`, `DockerContainerRunner` and `KubernetesContainerRunner` are now deprecated +- 8869b8e: We are deprecating the legacy `createServiceBuilder` factory, so if you are still using it, please checkout the migration guide and [migrate](https://backstage.io/docs/backend-system/building-plugins-and-modules/migrating) your plugin to use the new backend system. +- 0634fdc: Deprecated `dropDatabase` +- b2ee7f3: Moved over all URL reader functionality from `@backstage/backend-common` to `@backstage/backend-defaults/urlReader`. Please update your imports. +- d94a477: Removed the circular dependency on `@backstage/backend-app-api` +- 3bd04bb: We are deprecating the legacy router handlers and contexts in preparation for the new backend system stable release. +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- e9a03c9: Finalizes the deprecation of legacy backend utilities. Deprecated utilities include the `ServiceBuilder` type, `notFoundHandler` and `redactWintonLogLine` functions. +- 6a576dc: Deprecate legacy service logger helpers and stop using `getVoidLogger` in tests. +- 032a7a6: Deprecate the legacy error and request logging handler types, respectively: `ErrorHandlerOptions` and `RequestLoggingHandlerFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/integration@1.12.0 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/backend-dev-utils@0.1.4 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + ## 0.23.0-next.3 ### Patch Changes diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 84328924bd..de00ef6a5a 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -13,7 +13,7 @@ import { AwsCredentialsManager } from '@backstage/integration-aws-node'; import { AwsS3Integration } from '@backstage/integration'; import { AzureDevOpsCredentialsProvider } from '@backstage/integration'; import { AzureIntegration } from '@backstage/integration'; -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { BitbucketCloudIntegration } from '@backstage/integration'; import { BitbucketIntegration } from '@backstage/integration'; import { BitbucketServerIntegration } from '@backstage/integration'; @@ -22,6 +22,7 @@ import { CacheServiceOptions } from '@backstage/backend-plugin-api'; import { CacheServiceSetOptions } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import cors from 'cors'; +import { DatabaseService } from '@backstage/backend-plugin-api'; import { DiscoveryService } from '@backstage/backend-plugin-api'; import Docker from 'dockerode'; import { ErrorRequestHandler } from 'express'; @@ -43,26 +44,25 @@ import { Logger } from 'winston'; import { LoggerService } from '@backstage/backend-plugin-api'; import { MergeResult } from 'isomorphic-git'; import { PermissionsService } from '@backstage/backend-plugin-api'; -import { DatabaseService as PluginDatabaseManager } from '@backstage/backend-plugin-api'; import { PluginMetadataService } from '@backstage/backend-plugin-api'; import { PushResult } from 'isomorphic-git'; import { Readable } from 'stream'; import { ReadCommitResult } from 'isomorphic-git'; -import type { ReadTreeOptions as ReadTreeOptions_2 } from '@backstage/backend-plugin-api'; -import type { ReadTreeResponse as ReadTreeResponse_2 } from '@backstage/backend-plugin-api'; -import type { ReadTreeResponseDirOptions as ReadTreeResponseDirOptions_2 } from '@backstage/backend-plugin-api'; -import type { ReadTreeResponseFile as ReadTreeResponseFile_2 } from '@backstage/backend-plugin-api'; -import type { ReadUrlOptions as ReadUrlOptions_2 } from '@backstage/backend-plugin-api'; -import type { ReadUrlResponse as ReadUrlResponse_2 } from '@backstage/backend-plugin-api'; +import { ReadTreeOptions as ReadTreeOptions_2 } from '@backstage/backend-plugin-api'; +import { ReadTreeResponse as ReadTreeResponse_2 } from '@backstage/backend-plugin-api'; +import { ReadTreeResponseDirOptions as ReadTreeResponseDirOptions_2 } from '@backstage/backend-plugin-api'; +import { ReadTreeResponseFile as ReadTreeResponseFile_2 } from '@backstage/backend-plugin-api'; +import { ReadUrlOptions as ReadUrlOptions_2 } from '@backstage/backend-plugin-api'; +import { ReadUrlResponse as ReadUrlResponse_2 } from '@backstage/backend-plugin-api'; import { RequestHandler } from 'express'; import { resolvePackagePath as resolvePackagePath_2 } from '@backstage/backend-plugin-api'; import { resolveSafeChildPath as resolveSafeChildPath_2 } from '@backstage/backend-plugin-api'; import { RootConfigService } from '@backstage/backend-plugin-api'; import { Router } from 'express'; import { SchedulerService } from '@backstage/backend-plugin-api'; -import type { SearchOptions as SearchOptions_2 } from '@backstage/backend-plugin-api'; -import type { SearchResponse as SearchResponse_2 } from '@backstage/backend-plugin-api'; -import type { SearchResponseFile as SearchResponseFile_2 } from '@backstage/backend-plugin-api'; +import { SearchOptions as SearchOptions_2 } from '@backstage/backend-plugin-api'; +import { SearchResponse as SearchResponse_2 } from '@backstage/backend-plugin-api'; +import { SearchResponseFile as SearchResponseFile_2 } from '@backstage/backend-plugin-api'; import { Server } from 'http'; import { ServiceRef } from '@backstage/backend-plugin-api'; import { TokenManagerService } from '@backstage/backend-plugin-api'; @@ -88,27 +88,27 @@ export type AuthCallbackOptions = { // Warning: (ae-forgotten-export) The symbol "AwsS3UrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const AwsS3UrlReader: typeof AwsS3UrlReader_2; +export class AwsS3UrlReader extends AwsS3UrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "AzureUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const AzureUrlReader: typeof AzureUrlReader_2; +export class AzureUrlReader extends AzureUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "BitbucketCloudUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const BitbucketCloudUrlReader: typeof BitbucketCloudUrlReader_2; +export class BitbucketCloudUrlReader extends BitbucketCloudUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "BitbucketServerUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const BitbucketServerUrlReader: typeof BitbucketServerUrlReader_2; +export class BitbucketServerUrlReader extends BitbucketServerUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "BitbucketUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const BitbucketUrlReader: typeof BitbucketUrlReader_2; +export class BitbucketUrlReader extends BitbucketUrlReader_2 {} // @public @deprecated (undocumented) export type CacheClient = CacheService; @@ -122,7 +122,7 @@ export type CacheClientSetOptions = CacheServiceSetOptions; // Warning: (ae-forgotten-export) The symbol "CacheManager_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const CacheManager: typeof CacheManager_2; +export class CacheManager extends CacheManager_2 {} // Warning: (ae-forgotten-export) The symbol "CacheManagerOptions_2" needs to be exported by the entry point index.d.ts // @@ -137,7 +137,7 @@ export function cacheToPluginCacheManager(cache: CacheService): { // @public @deprecated export const coloredFormat: winston.Logform.Format; -// @public +// @public @deprecated export interface ContainerRunner { runContainer(opts: RunContainerOptions): Promise; } @@ -191,46 +191,48 @@ export function createStatusCheckRouter(options: { statusCheck?: StatusCheck; }): Promise; -// @public +// @public @deprecated (undocumented) export class DatabaseManager implements LegacyRootDatabaseService { + // (undocumented) forPlugin( pluginId: string, - deps?: { - lifecycle: LifecycleService; - pluginMetadata: PluginMetadataService; - }, + deps?: + | { + lifecycle: LifecycleService; + pluginMetadata: PluginMetadataService; + } + | undefined, ): PluginDatabaseManager; + // (undocumented) static fromConfig( config: Config, options?: DatabaseManagerOptions, ): DatabaseManager; } -// @public -export type DatabaseManagerOptions = { - migrations?: PluginDatabaseManager['migrations']; - logger?: LoggerService; -}; +// Warning: (ae-forgotten-export) The symbol "DatabaseManagerOptions_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type DatabaseManagerOptions = DatabaseManagerOptions_2; -// @public +// @public @deprecated export class DockerContainerRunner implements ContainerRunner { constructor(options: { dockerClient: Docker }); // (undocumented) runContainer(options: RunContainerOptions): Promise; } -// @public @deprecated -export function dropDatabase( - dbConfig: Config, - ...databaseNames: string[] -): Promise; +// Warning: (ae-forgotten-export) The symbol "dropDatabase_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export const dropDatabase: typeof dropDatabase_2; // @public @deprecated export function errorHandler( options?: ErrorHandlerOptions, ): ErrorRequestHandler; -// @public +// @public @deprecated export type ErrorHandlerOptions = { showStackTraces?: boolean; logger?: LoggerService; @@ -240,7 +242,7 @@ export type ErrorHandlerOptions = { // Warning: (ae-forgotten-export) The symbol "FetchUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const FetchUrlReader: typeof FetchUrlReader_2; +export class FetchUrlReader extends FetchUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "FromReadableArrayOptions_2" needs to be exported by the entry point index.d.ts // @@ -250,7 +252,7 @@ export type FromReadableArrayOptions = FromReadableArrayOptions_2; // Warning: (ae-forgotten-export) The symbol "GerritUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const GerritUrlReader: typeof GerritUrlReader_2; +export class GerritUrlReader extends GerritUrlReader_2 {} // @public @deprecated export function getRootLogger(): winston.Logger; @@ -337,27 +339,38 @@ export class Git { // Warning: (ae-forgotten-export) The symbol "GiteaUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const GiteaUrlReader: typeof GiteaUrlReader_2; +export class GiteaUrlReader extends GiteaUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "GithubUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const GithubUrlReader: typeof GithubUrlReader_2; +export class GithubUrlReader extends GithubUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "GitlabUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const GitlabUrlReader: typeof GitlabUrlReader_2; +export class GitlabUrlReader extends GitlabUrlReader_2 {} // Warning: (ae-forgotten-export) The symbol "HarnessUrlReader_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const HarnessUrlReader: typeof HarnessUrlReader_2; +export class HarnessUrlReader extends HarnessUrlReader_2 {} -// Warning: (ae-forgotten-export) The symbol "HostDiscovery_2" needs to be exported by the entry point index.d.ts -// // @public @deprecated -export const HostDiscovery: typeof HostDiscovery_2; +class HostDiscovery implements DiscoveryService { + static fromConfig( + config: Config, + options?: { + basePath?: string; + }, + ): HostDiscovery; + // (undocumented) + getBaseUrl(pluginId: string): Promise; + // (undocumented) + getExternalBaseUrl(pluginId: string): Promise; +} +export { HostDiscovery }; +export { HostDiscovery as SingleHostDiscovery }; // @public @deprecated (undocumented) export const isChildPath: typeof isChildPath_2; @@ -365,20 +378,20 @@ export const isChildPath: typeof isChildPath_2; // @public @deprecated (undocumented) export const isDatabaseConflictError: typeof isDatabaseConflictError_2; -// @public +// @public @deprecated export class KubernetesContainerRunner implements ContainerRunner { constructor(options: KubernetesContainerRunnerOptions); // (undocumented) runContainer(options: RunContainerOptions): Promise; } -// @public +// @public @deprecated export type KubernetesContainerRunnerMountBase = { volumeName: string; basePath: string; }; -// @public +// @public @deprecated export type KubernetesContainerRunnerOptions = { kubeConfig: KubeConfig; name: string; @@ -400,7 +413,7 @@ export const legacyPlugin: ( { cache: CacheService; config: RootConfigService; - database: PluginDatabaseManager; + database: DatabaseService; discovery: DiscoveryService; logger: LoggerService; permissions: PermissionsService; @@ -418,12 +431,12 @@ export const legacyPlugin: ( > >; }>, -) => BackendFeature; +) => BackendFeatureCompat; -// @public -export type LegacyRootDatabaseService = { - forPlugin(pluginId: string): PluginDatabaseManager; -}; +// Warning: (ae-forgotten-export) The symbol "LegacyRootDatabaseService_2" needs to be exported by the entry point index.d.ts +// +// @public @deprecated (undocumented) +export type LegacyRootDatabaseService = LegacyRootDatabaseService_2; // @public @deprecated export function loadBackendConfig(options: { @@ -456,7 +469,7 @@ export function makeLegacyPlugin< createRouterImport: Promise<{ default: LegacyCreateRouter>; }>, -) => BackendFeature; +) => BackendFeatureCompat; // @public @deprecated export function notFoundHandler(): RequestHandler; @@ -466,12 +479,13 @@ export function notFoundHandler(): RequestHandler; // @public @deprecated (undocumented) export type PluginCacheManager = PluginCacheManager_2; -export { PluginDatabaseManager }; +// @public @deprecated (undocumented) +export type PluginDatabaseManager = DatabaseService; // @public @deprecated (undocumented) export type PluginEndpointDiscovery = DiscoveryService; -// @public +// @public @deprecated export interface PullOptions { // (undocumented) [key: string]: unknown; @@ -522,7 +536,7 @@ export type ReadUrlResponse = ReadUrlResponse_2; // Warning: (ae-forgotten-export) The symbol "ReadUrlResponseFactory_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const ReadUrlResponseFactory: typeof ReadUrlResponseFactory_2; +export class ReadUrlResponseFactory extends ReadUrlResponseFactory_2 {} // Warning: (ae-forgotten-export) The symbol "ReadUrlResponseFactoryFromStreamOptions_2" needs to be exported by the entry point index.d.ts // @@ -538,7 +552,7 @@ export function redactWinstonLogLine( // @public @deprecated export function requestLoggingHandler(logger?: LoggerService): RequestHandler; -// @public +// @public @deprecated export type RequestLoggingHandlerFactory = ( logger?: LoggerService, ) => RequestHandler; @@ -549,7 +563,7 @@ export const resolvePackagePath: typeof resolvePackagePath_2; // @public @deprecated (undocumented) export const resolveSafeChildPath: typeof resolveSafeChildPath_2; -// @public +// @public @deprecated export type RunContainerOptions = { imageName: string; command?: string | string[]; @@ -623,9 +637,6 @@ export type ServiceBuilder = { // @public @deprecated export function setRootLogger(newLogger: winston.Logger): void; -// @public @deprecated -export const SingleHostDiscovery: typeof HostDiscovery_2; - // @public @deprecated export type StaticAuthOptions = { username?: string; @@ -661,7 +672,7 @@ export type UrlReaderPredicateTuple = UrlReaderPredicateTuple_2; // Warning: (ae-forgotten-export) The symbol "UrlReaders_2" needs to be exported by the entry point index.d.ts // // @public @deprecated (undocumented) -export const UrlReaders: typeof UrlReaders_2; +export class UrlReaders extends UrlReaders_2 {} // Warning: (ae-forgotten-export) The symbol "UrlReadersOptions_2" needs to be exported by the entry point index.d.ts // diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 847fefa697..e993e1f21e 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-common", - "version": "0.23.0-next.3", + "version": "0.23.0", "description": "Common functionality library for Backstage backends", "backstage": { "role": "node-library" @@ -99,12 +99,19 @@ "logform": "^2.3.2", "luxon": "^3.0.0", "minimatch": "^9.0.0", + "minimist": "^1.2.5", + "morgan": "^1.10.0", "mysql2": "^3.0.0", "node-fetch": "^2.6.7", + "node-forge": "^1.3.1", "p-limit": "^3.1.0", + "path-to-regexp": "^6.2.1", "pg": "^8.11.3", "raw-body": "^2.4.1", + "selfsigned": "^2.0.0", + "stoppable": "^1.1.0", "tar": "^6.1.12", + "triple-beam": "^1.4.1", "uuid": "^9.0.0", "winston": "^3.2.1", "winston-transport": "^4.5.0", @@ -121,7 +128,10 @@ "@types/concat-stream": "^2.0.0", "@types/fs-extra": "^11.0.0", "@types/http-errors": "^2.0.0", + "@types/morgan": "^1.9.0", + "@types/node-forge": "^1.3.0", "@types/pg": "^8.6.6", + "@types/stoppable": "^1.1.0", "@types/supertest": "^2.0.8", "@types/tar": "^6.1.1", "@types/webpack-env": "^1.15.2", diff --git a/packages/backend-common/src/alpha.ts b/packages/backend-common/src/alpha.ts index e0a5b2ddc2..0fd15459fe 100644 --- a/packages/backend-common/src/alpha.ts +++ b/packages/backend-common/src/alpha.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './context'; +export * from './deprecated/context'; diff --git a/packages/backend-common/src/auth/createLegacyAuthAdapters.test.ts b/packages/backend-common/src/compat/auth/createLegacyAuthAdapters.test.ts similarity index 100% rename from packages/backend-common/src/auth/createLegacyAuthAdapters.test.ts rename to packages/backend-common/src/compat/auth/createLegacyAuthAdapters.test.ts diff --git a/packages/backend-common/src/auth/createLegacyAuthAdapters.ts b/packages/backend-common/src/compat/auth/createLegacyAuthAdapters.ts similarity index 98% rename from packages/backend-common/src/auth/createLegacyAuthAdapters.ts rename to packages/backend-common/src/compat/auth/createLegacyAuthAdapters.ts index 94f997640d..0f591eac6c 100644 --- a/packages/backend-common/src/auth/createLegacyAuthAdapters.ts +++ b/packages/backend-common/src/compat/auth/createLegacyAuthAdapters.ts @@ -35,15 +35,14 @@ import { createCredentialsWithUserPrincipal, createCredentialsWithNonePrincipal, toInternalBackstageCredentials, -} from '../../../backend-app-api/src/services/implementations/auth/helpers'; +} from '../../../../backend-defaults/src/entrypoints/auth/helpers'; // TODO is this circular thingy a problem? Test in e2e import { type IdentityApiGetIdentityRequest, DefaultIdentityClient, } from '@backstage/plugin-auth-node'; import { decodeJwt } from 'jose'; -import { TokenManager } from '../deprecated'; -import { PluginEndpointDiscovery } from '../discovery'; +import { TokenManager, PluginEndpointDiscovery } from '../../deprecated'; import { JsonObject } from '@backstage/types'; class AuthCompat implements AuthService { diff --git a/packages/backend-common/src/auth/index.ts b/packages/backend-common/src/compat/auth/index.ts similarity index 100% rename from packages/backend-common/src/auth/index.ts rename to packages/backend-common/src/compat/auth/index.ts diff --git a/packages/backend-common/src/cache/cacheToPluginCacheManager.ts b/packages/backend-common/src/compat/cache/cacheToPluginCacheManager.ts similarity index 100% rename from packages/backend-common/src/cache/cacheToPluginCacheManager.ts rename to packages/backend-common/src/compat/cache/cacheToPluginCacheManager.ts diff --git a/packages/backend-common/src/cache/index.ts b/packages/backend-common/src/compat/cache/index.ts similarity index 100% rename from packages/backend-common/src/cache/index.ts rename to packages/backend-common/src/compat/cache/index.ts diff --git a/packages/backend-common/src/util/escapeRegExp.ts b/packages/backend-common/src/compat/index.ts similarity index 64% rename from packages/backend-common/src/util/escapeRegExp.ts rename to packages/backend-common/src/compat/index.ts index bc78967ebe..d702772335 100644 --- a/packages/backend-common/src/util/escapeRegExp.ts +++ b/packages/backend-common/src/compat/index.ts @@ -1,5 +1,5 @@ /* - * Copyright 2021 The Backstage Authors + * Copyright 2024 The Backstage Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,7 @@ * limitations under the License. */ -/** - * Escapes a given string to be used inside a RegExp. - * - * Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions - */ -export const escapeRegExp = (text: string) => { - return text.replace(/[.*+?^${}(\)|[\]\\]/g, '\\$&'); -}; +export * from './legacy'; +export * from './auth'; +export * from './cache'; +export * from './logging'; diff --git a/packages/backend-common/src/compat/legacy/index.ts b/packages/backend-common/src/compat/legacy/index.ts new file mode 100644 index 0000000000..1172084cd7 --- /dev/null +++ b/packages/backend-common/src/compat/legacy/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { legacyPlugin, makeLegacyPlugin } from './legacy'; +export type { LegacyCreateRouter } from './legacy'; diff --git a/packages/backend-common/src/legacy.test.ts b/packages/backend-common/src/compat/legacy/legacy.test.ts similarity index 93% rename from packages/backend-common/src/legacy.test.ts rename to packages/backend-common/src/compat/legacy/legacy.test.ts index 09545daef4..e5d395a8f9 100644 --- a/packages/backend-common/src/legacy.test.ts +++ b/packages/backend-common/src/compat/legacy/legacy.test.ts @@ -21,12 +21,12 @@ import { import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; import { EventEmitter } from 'events'; import { Router } from 'express'; -import { createLegacyAuthAdapters } from './auth'; +import { createLegacyAuthAdapters } from '..'; import { legacyPlugin } from './legacy'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { authServiceFactory } from '../../backend-app-api/src/services/implementations/auth'; +import { authServiceFactory } from '../../../../backend-app-api/src/services/implementations/auth'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { tokenManagerServiceFactory } from '../../backend-app-api/src/services/implementations/tokenManager'; +import { tokenManagerServiceFactory } from '../../../../backend-app-api/src/services/implementations/tokenManager'; describe('legacyPlugin', () => { it('can auth across the new and old systems', async () => { diff --git a/packages/backend-common/src/legacy.ts b/packages/backend-common/src/compat/legacy/legacy.ts similarity index 96% rename from packages/backend-common/src/legacy.ts rename to packages/backend-common/src/compat/legacy/legacy.ts index 420126f519..57220a8430 100644 --- a/packages/backend-common/src/legacy.ts +++ b/packages/backend-common/src/compat/legacy/legacy.ts @@ -21,9 +21,9 @@ import { ServiceRef, } from '@backstage/backend-plugin-api'; import { RequestHandler } from 'express'; -import { cacheToPluginCacheManager } from './cache'; -import { loggerToWinstonLogger } from './logging'; -import { TokenManager } from './deprecated'; +import { cacheToPluginCacheManager } from '../cache'; +import { loggerToWinstonLogger } from '../logging'; +import { TokenManager } from '../../deprecated'; /** * @public diff --git a/packages/backend-common/src/database/index.ts b/packages/backend-common/src/compat/logging/index.ts similarity index 88% rename from packages/backend-common/src/database/index.ts rename to packages/backend-common/src/compat/logging/index.ts index 0e95261d82..10f949050c 100644 --- a/packages/backend-common/src/database/index.ts +++ b/packages/backend-common/src/compat/logging/index.ts @@ -14,5 +14,4 @@ * limitations under the License. */ -export * from './reexport'; -export type { PluginDatabaseManager } from './types'; +export { loggerToWinstonLogger } from './loggerToWinstonLogger'; diff --git a/packages/backend-common/src/logging/loggerToWinstonLogger.ts b/packages/backend-common/src/compat/logging/loggerToWinstonLogger.ts similarity index 100% rename from packages/backend-common/src/logging/loggerToWinstonLogger.ts rename to packages/backend-common/src/compat/logging/loggerToWinstonLogger.ts diff --git a/packages/backend-common/src/database/reexport.ts b/packages/backend-common/src/database/reexport.ts deleted file mode 100644 index 1ecff9be15..0000000000 --- a/packages/backend-common/src/database/reexport.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2024 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * NOTE(freben): This is a temporary hack. We use cross-package imports so that - * we do not have to maintain double implementations for the time being, until - * backend-common is properly removed. When it is, the impleemntation should be - * moved into this part of the repo instead. - */ - -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { - DatabaseManager, - dropDatabase, - type DatabaseManagerOptions, - type LegacyRootDatabaseService, -} from '../../../backend-defaults/src/entrypoints/database/DatabaseManager'; - -export { - DatabaseManager, - dropDatabase, - type DatabaseManagerOptions, - type LegacyRootDatabaseService, -}; diff --git a/packages/backend-common/src/database/types.ts b/packages/backend-common/src/database/types.ts deleted file mode 100644 index a9cceaa1f9..0000000000 --- a/packages/backend-common/src/database/types.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - LifecycleService, - PluginMetadataService, -} from '@backstage/backend-plugin-api'; -import { Config } from '@backstage/config'; -import { Knex } from 'knex'; - -export type { DatabaseService as PluginDatabaseManager } from '@backstage/backend-plugin-api'; - -/** - * Manages an underlying Knex database driver. - */ -export interface DatabaseConnector { - /** - * Provides an instance of a knex database connector. - */ - createClient( - dbConfig: Config, - overrides?: Partial, - deps?: { - lifecycle: LifecycleService; - pluginMetadata: PluginMetadataService; - }, - ): Knex; - - /** - * Provides a partial knex config sufficient to override a database name. - */ - createNameOverride(name: string): Partial; - - /** - * Provides a partial knex config sufficient to override a PostgreSQL schema - * name within utilizing the `searchPath` knex configuration. - */ - createSchemaOverride?(name: string): Partial; - - /** - * Produces a knex connection config object representing a database connection - * string. - */ - parseConnectionString( - connectionString: string, - client?: string, - ): Knex.StaticConnectionConfig; - - /** - * Performs a side-effect to ensure database names passed in are present. - * - * Calling this function on databases which already exist should do nothing. - * Missing databases should be created if needed. - */ - ensureDatabaseExists?( - dbConfig: Config, - ...databases: Array - ): Promise; - - /** - * Performs a side-effect to ensure schema names passed in are present. - * - * Calling this function on schemas which already exist should do nothing. - * Missing schemas should be created if needed. - */ - ensureSchemaExists?( - dbConfig: Config, - ...schemas: Array - ): Promise; - - /** - * Deletes databases. - */ - dropDatabase?(dbConfig: Config, ...databases: Array): Promise; -} - -export interface Connector { - getClient( - pluginId: string, - deps?: { - lifecycle: LifecycleService; - pluginMetadata: PluginMetadataService; - }, - ): Promise; - - dropDatabase(...databaseNames: string[]): Promise; -} diff --git a/packages/backend-common/src/config.ts b/packages/backend-common/src/deprecated/config.ts similarity index 97% rename from packages/backend-common/src/config.ts rename to packages/backend-common/src/deprecated/config.ts index 733cd62390..2d06ca2072 100644 --- a/packages/backend-common/src/config.ts +++ b/packages/backend-common/src/deprecated/config.ts @@ -18,7 +18,7 @@ import { createConfigSecretEnumerator, loadBackendConfig as newLoadBackendConfig, -} from '../../backend-app-api/src/config'; +} from '../../../backend-app-api/src/config'; import { LoggerService } from '@backstage/backend-plugin-api'; import { AppConfig, Config } from '@backstage/config'; import { LoadConfigOptionsRemote } from '@backstage/config-loader'; diff --git a/packages/backend-common/src/context/AbortContext.test.ts b/packages/backend-common/src/deprecated/context/AbortContext.test.ts similarity index 100% rename from packages/backend-common/src/context/AbortContext.test.ts rename to packages/backend-common/src/deprecated/context/AbortContext.test.ts diff --git a/packages/backend-common/src/context/AbortContext.ts b/packages/backend-common/src/deprecated/context/AbortContext.ts similarity index 100% rename from packages/backend-common/src/context/AbortContext.ts rename to packages/backend-common/src/deprecated/context/AbortContext.ts diff --git a/packages/backend-common/src/context/Contexts.test.ts b/packages/backend-common/src/deprecated/context/Contexts.test.ts similarity index 100% rename from packages/backend-common/src/context/Contexts.test.ts rename to packages/backend-common/src/deprecated/context/Contexts.test.ts diff --git a/packages/backend-common/src/context/Contexts.ts b/packages/backend-common/src/deprecated/context/Contexts.ts similarity index 100% rename from packages/backend-common/src/context/Contexts.ts rename to packages/backend-common/src/deprecated/context/Contexts.ts diff --git a/packages/backend-common/src/context/RootContext.test.ts b/packages/backend-common/src/deprecated/context/RootContext.test.ts similarity index 100% rename from packages/backend-common/src/context/RootContext.test.ts rename to packages/backend-common/src/deprecated/context/RootContext.test.ts diff --git a/packages/backend-common/src/context/RootContext.ts b/packages/backend-common/src/deprecated/context/RootContext.ts similarity index 100% rename from packages/backend-common/src/context/RootContext.ts rename to packages/backend-common/src/deprecated/context/RootContext.ts diff --git a/packages/backend-common/src/context/ValueContext.test.ts b/packages/backend-common/src/deprecated/context/ValueContext.test.ts similarity index 100% rename from packages/backend-common/src/context/ValueContext.test.ts rename to packages/backend-common/src/deprecated/context/ValueContext.test.ts diff --git a/packages/backend-common/src/context/ValueContext.ts b/packages/backend-common/src/deprecated/context/ValueContext.ts similarity index 100% rename from packages/backend-common/src/context/ValueContext.ts rename to packages/backend-common/src/deprecated/context/ValueContext.ts diff --git a/packages/backend-common/src/context/index.ts b/packages/backend-common/src/deprecated/context/index.ts similarity index 100% rename from packages/backend-common/src/context/index.ts rename to packages/backend-common/src/deprecated/context/index.ts diff --git a/packages/backend-common/src/context/types.ts b/packages/backend-common/src/deprecated/context/types.ts similarity index 100% rename from packages/backend-common/src/context/types.ts rename to packages/backend-common/src/deprecated/context/types.ts diff --git a/packages/backend-common/src/hot.ts b/packages/backend-common/src/deprecated/hot.ts similarity index 100% rename from packages/backend-common/src/hot.ts rename to packages/backend-common/src/deprecated/hot.ts diff --git a/packages/backend-common/src/deprecated/index.ts b/packages/backend-common/src/deprecated/index.ts index 5309240ccb..e3e4101d25 100644 --- a/packages/backend-common/src/deprecated/index.ts +++ b/packages/backend-common/src/deprecated/index.ts @@ -14,32 +14,175 @@ * limitations under the License. */ +import { Config } from '@backstage/config'; + +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { HostDiscovery as _HostDiscovery } from '../../../backend-defaults/src/entrypoints/discovery/HostDiscovery'; + // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { CacheManager as _CacheManager } from '../../../backend-defaults/src/entrypoints/cache/CacheManager'; + // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { type PluginCacheManager as _PluginCacheManager, type CacheManagerOptions as _CacheManagerOptions, } from '../../../backend-defaults/src/entrypoints/cache/types'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports import { + dropDatabase as _dropDatabase, + DatabaseManager as _DatabaseManager, + type DatabaseManagerOptions as _DatabaseManagerOptions, + type LegacyRootDatabaseService as _LegacyRootDatabaseService, +} from '../../../backend-defaults/src/entrypoints/database/DatabaseManager'; + +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { AzureUrlReader as _AzureUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/AzureUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { BitbucketCloudUrlReader as _BitbucketCloudUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketCloudUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { BitbucketUrlReader as _BitbucketUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { BitbucketServerUrlReader as _BitbucketServerUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketServerUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { GerritUrlReader as _GerritUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GerritUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { GithubUrlReader as _GithubUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { GitlabUrlReader as _GitlabUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GitlabUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { GiteaUrlReader as _GiteaUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GiteaUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { HarnessUrlReader as _HarnessUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/HarnessUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { AwsS3UrlReader as _AwsS3UrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/AwsS3UrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { FetchUrlReader as _FetchUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/FetchUrlReader'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { UrlReaders as _UrlReaders } from '../../../backend-defaults/src/entrypoints/urlReader/lib/UrlReaders'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { ReadUrlResponseFactory as _ReadUrlResponseFactory } from '../../../backend-defaults/src/entrypoints/urlReader/lib/ReadUrlResponseFactory'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import type { UrlReadersOptions as _UrlReadersOptions } from '../../../backend-defaults/src/entrypoints/urlReader/lib/UrlReaders'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import type { FromReadableArrayOptions as _FromReadableArrayOptions } from '../../../backend-defaults/src/entrypoints/urlReader/lib/types'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import type { + ReaderFactory as _ReaderFactory, + ReadTreeResponseFactory as _ReadTreeResponseFactory, + ReadTreeResponseFactoryOptions as _ReadTreeResponseFactoryOptions, + ReadUrlResponseFactoryFromStreamOptions as _ReadUrlResponseFactoryFromStreamOptions, + UrlReaderPredicateTuple as _UrlReaderPredicateTuple, +} from '../../../backend-defaults/src/entrypoints/urlReader/lib/types'; + +import { + DiscoveryService, CacheService, CacheServiceOptions, CacheServiceSetOptions, + DatabaseService as _PluginDatabaseManager, isDatabaseConflictError as _isDatabaseConflictError, resolvePackagePath as _resolvePackagePath, resolveSafeChildPath as _resolveSafeChildPath, isChildPath as _isChildPath, + ReadTreeOptions as _ReadTreeOptions, + ReadTreeResponse as _ReadTreeResponse, + ReadTreeResponseFile as _ReadTreeResponseFile, + ReadTreeResponseDirOptions as _ReadTreeResponseDirOptions, + ReadUrlOptions as _ReadUrlOptions, + ReadUrlResponse as _ReadUrlResponse, + SearchOptions as _SearchOptions, + SearchResponse as _SearchResponse, + SearchResponseFile as _SearchResponseFile, + UrlReaderService as _UrlReaderService, + LifecycleService, + PluginMetadataService, } from '@backstage/backend-plugin-api'; +export * from './hot'; +export * from './config'; export * from './scm'; export * from './tokens'; +export * from './logging'; +export * from './service'; +export * from './middleware'; +export * from './util'; + +/** + * @public + * @deprecated Use `DiscoveryService` from `@backstage/backend-plugin-api` instead + */ +export type PluginEndpointDiscovery = DiscoveryService; + +/** + * HostDiscovery is a basic PluginEndpointDiscovery implementation + * that can handle plugins that are hosted in a single or multiple deployments. + * + * The deployment may be scaled horizontally, as long as the external URL + * is the same for all instances. However, internal URLs will always be + * resolved to the same host, so there won't be any balancing of internal traffic. + * + * @public + * @deprecated Please import from `@backstage/backend-defaults/discovery` instead. + */ +export class HostDiscovery implements DiscoveryService { + /** + * Creates a new HostDiscovery discovery instance by reading + * from the `backend` config section, specifically the `.baseUrl` for + * discovering the external URL, and the `.listen` and `.https` config + * for the internal one. + * + * Can be overridden in config by providing a target and corresponding plugins in `discovery.endpoints`. + * eg. + * ```yaml + * discovery: + * endpoints: + * - target: https://internal.example.com/internal-catalog + * plugins: [catalog] + * - target: https://internal.example.com/secure/api/{{pluginId}} + * plugins: [auth, permission] + * - target: + * internal: https://internal.example.com/search + * external: https://example.com/search + * plugins: [search] + * ``` + * + * The basePath defaults to `/api`, meaning the default full internal + * path for the `catalog` plugin will be `http://localhost:7007/api/catalog`. + */ + static fromConfig(config: Config, options?: { basePath?: string }) { + return new HostDiscovery(_HostDiscovery.fromConfig(config, options)); + } + + private constructor(private readonly impl: _HostDiscovery) {} + + async getBaseUrl(pluginId: string): Promise { + return this.impl.getBaseUrl(pluginId); + } + + async getExternalBaseUrl(pluginId: string): Promise { + return this.impl.getExternalBaseUrl(pluginId); + } +} + +/** + * SingleHostDiscovery is a basic PluginEndpointDiscovery implementation + * that assumes that all plugins are hosted in a single deployment. + * + * The deployment may be scaled horizontally, as long as the external URL + * is the same for all instances. However, internal URLs will always be + * resolved to the same host, so there won't be any balancing of internal traffic. + * + * @public + * @deprecated Use `HostDiscovery` from `@backstage/backend-defaults/discovery` instead + */ +export { HostDiscovery as SingleHostDiscovery }; /** * @public * @deprecated Use `CacheManager` from the `@backstage/backend-defaults` package instead */ -export const CacheManager = _CacheManager; +export class CacheManager extends _CacheManager {} /** * @public @@ -71,6 +214,55 @@ export type CacheClientSetOptions = CacheServiceSetOptions; */ export type CacheClientOptions = CacheServiceOptions; +/** + * @public + * @deprecated Use `DatabaseManager` from the `@backstage/backend-defaults` package instead + */ +export class DatabaseManager implements LegacyRootDatabaseService { + private constructor(private readonly _databaseManager: _DatabaseManager) {} + + static fromConfig( + config: Config, + options?: DatabaseManagerOptions, + ): DatabaseManager { + const _databaseManager = _DatabaseManager.fromConfig(config, options); + return new DatabaseManager(_databaseManager); + } + + forPlugin( + pluginId: string, + deps?: + | { lifecycle: LifecycleService; pluginMetadata: PluginMetadataService } + | undefined, + ): PluginDatabaseManager { + return this._databaseManager.forPlugin(pluginId, deps); + } +} + +/** + * @public + * @deprecated Use `DatabaseManagerOptions` from the `@backstage/backend-defaults` package instead + */ +export type DatabaseManagerOptions = _DatabaseManagerOptions; + +/** + * @public + * @deprecated Use `DatabaseService` from the `@backstage/backend-plugin-api` package instead + */ +export type PluginDatabaseManager = _PluginDatabaseManager; + +/** + * @public + * @deprecated Use `LegacyRootDatabaseService` from the `@backstage/backend-defaults` package instead + */ +export type LegacyRootDatabaseService = _LegacyRootDatabaseService; + +/** + * @public + * @deprecated Use `dropDatabase` from the `@backstage/backend-defaults` package instead + */ +export const dropDatabase = _dropDatabase; + /** * @public * @deprecated This function is deprecated and will be removed in a future release, see https://github.com/backstage/backstage/issues/24493. @@ -98,3 +290,184 @@ export const resolveSafeChildPath = _resolveSafeChildPath; * Please use the `isChildPath` function from the `@backstage/cli-common` package instead. */ export const isChildPath = _isChildPath; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class AzureUrlReader extends _AzureUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class BitbucketCloudUrlReader extends _BitbucketCloudUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class BitbucketUrlReader extends _BitbucketUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class BitbucketServerUrlReader extends _BitbucketServerUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class GerritUrlReader extends _GerritUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class GithubUrlReader extends _GithubUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class GitlabUrlReader extends _GitlabUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class GiteaUrlReader extends _GiteaUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class HarnessUrlReader extends _HarnessUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class AwsS3UrlReader extends _AwsS3UrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class FetchUrlReader extends _FetchUrlReader {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class UrlReaders extends _UrlReaders {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export class ReadUrlResponseFactory extends _ReadUrlResponseFactory {} + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type UrlReadersOptions = _UrlReadersOptions; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type FromReadableArrayOptions = _FromReadableArrayOptions; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type ReaderFactory = _ReaderFactory; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type ReadTreeResponseFactory = _ReadTreeResponseFactory; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type ReadTreeResponseFactoryOptions = _ReadTreeResponseFactoryOptions; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type ReadUrlResponseFactoryFromStreamOptions = + _ReadUrlResponseFactoryFromStreamOptions; + +/** + * @public + * @deprecated Import from `@backstage/backend-defaults/urlReader` instead + */ +export type UrlReaderPredicateTuple = _UrlReaderPredicateTuple; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadTreeOptions` from `@backstage/backend-plugin-api` instead + */ +export type ReadTreeOptions = _ReadTreeOptions; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadTreeResponse` from `@backstage/backend-plugin-api` instead + */ +export type ReadTreeResponse = _ReadTreeResponse; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadTreeResponseFile` from `@backstage/backend-plugin-api` instead + */ +export type ReadTreeResponseFile = _ReadTreeResponseFile; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadTreeResponseDirOptions` from `@backstage/backend-plugin-api` instead + */ +export type ReadTreeResponseDirOptions = _ReadTreeResponseDirOptions; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadUrlOptions` from `@backstage/backend-plugin-api` instead + */ +export type ReadUrlOptions = _ReadUrlOptions; + +/** + * @public + * @deprecated Use `UrlReaderServiceReadUrlResponse` from `@backstage/backend-plugin-api` instead + */ +export type ReadUrlResponse = _ReadUrlResponse; + +/** + * @public + * @deprecated Use `UrlReaderServiceSearchOptions` from `@backstage/backend-plugin-api` instead + */ +export type SearchOptions = _SearchOptions; + +/** + * @public + * @deprecated Use `UrlReaderServiceSearchResponse` from `@backstage/backend-plugin-api` instead + */ +export type SearchResponse = _SearchResponse; + +/** + * @public + * @deprecated Use `UrlReaderServiceSearchResponseFile` from `@backstage/backend-plugin-api` instead + */ +export type SearchResponseFile = _SearchResponseFile; + +/** + * @public + * @deprecated Use `UrlReaderService` from `@backstage/backend-plugin-api` instead + */ +export type UrlReader = _UrlReaderService; diff --git a/packages/backend-common/src/logging/createRootLogger.ts b/packages/backend-common/src/deprecated/logging/createRootLogger.ts similarity index 98% rename from packages/backend-common/src/logging/createRootLogger.ts rename to packages/backend-common/src/deprecated/logging/createRootLogger.ts index 20ee272b79..b177024601 100644 --- a/packages/backend-common/src/logging/createRootLogger.ts +++ b/packages/backend-common/src/deprecated/logging/createRootLogger.ts @@ -15,12 +15,12 @@ */ // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { WinstonLogger } from '../../../backend-app-api/src/logging/WinstonLogger'; +import { WinstonLogger } from '../../../../backend-app-api/src/logging/WinstonLogger'; import { merge } from 'lodash'; import * as winston from 'winston'; import { format, LoggerOptions } from 'winston'; -import { setRootLogger } from './globalLoggers'; import { TransformableInfo } from 'logform'; +import { setRootLogger } from './globalLoggers'; const getRedacter = (() => { let redacter: ReturnType | undefined = diff --git a/packages/backend-common/src/logging/globalLoggers.ts b/packages/backend-common/src/deprecated/logging/globalLoggers.ts similarity index 100% rename from packages/backend-common/src/logging/globalLoggers.ts rename to packages/backend-common/src/deprecated/logging/globalLoggers.ts diff --git a/packages/backend-common/src/logging/index.ts b/packages/backend-common/src/deprecated/logging/index.ts similarity index 92% rename from packages/backend-common/src/logging/index.ts rename to packages/backend-common/src/deprecated/logging/index.ts index e6b29afa15..b223f5c946 100644 --- a/packages/backend-common/src/logging/index.ts +++ b/packages/backend-common/src/deprecated/logging/index.ts @@ -20,4 +20,3 @@ export { redactWinstonLogLine, coloredFormat, } from './createRootLogger'; -export { loggerToWinstonLogger } from './loggerToWinstonLogger'; diff --git a/packages/backend-common/src/middleware/errorHandler.test.ts b/packages/backend-common/src/deprecated/middleware/errorHandler.test.ts similarity index 100% rename from packages/backend-common/src/middleware/errorHandler.test.ts rename to packages/backend-common/src/deprecated/middleware/errorHandler.test.ts index ab07a91022..2544a0a863 100644 --- a/packages/backend-common/src/middleware/errorHandler.test.ts +++ b/packages/backend-common/src/deprecated/middleware/errorHandler.test.ts @@ -14,6 +14,10 @@ * limitations under the License. */ +import express from 'express'; +import { STATUS_CODES } from 'http'; +import createError from 'http-errors'; +import request from 'supertest'; import { AuthenticationError, ConflictError, @@ -23,11 +27,7 @@ import { NotModifiedError, ResponseError, } from '@backstage/errors'; -import express from 'express'; -import createError from 'http-errors'; -import request from 'supertest'; import { errorHandler } from './errorHandler'; -import { STATUS_CODES } from 'http'; describe('errorHandler', () => { it('gives default code and message', async () => { diff --git a/packages/backend-common/src/middleware/errorHandler.ts b/packages/backend-common/src/deprecated/middleware/errorHandler.ts similarity index 91% rename from packages/backend-common/src/middleware/errorHandler.ts rename to packages/backend-common/src/deprecated/middleware/errorHandler.ts index 346fe01645..3664ed0e0a 100644 --- a/packages/backend-common/src/middleware/errorHandler.ts +++ b/packages/backend-common/src/deprecated/middleware/errorHandler.ts @@ -16,15 +16,16 @@ import { ErrorRequestHandler } from 'express'; import { LoggerService } from '@backstage/backend-plugin-api'; -import { getRootLogger } from '../logging'; import { ConfigReader } from '@backstage/config'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { MiddlewareFactory } from '../../../backend-app-api/src/http/MiddlewareFactory'; +import { MiddlewareFactory } from '../../../../backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory'; +import { getRootLogger } from '../logging'; /** * Options passed to the {@link errorHandler} middleware. * * @public + * @deprecated This type is being deprecated along with the {@link @backstage/backend-common#errorHandler} function. */ export type ErrorHandlerOptions = { /** diff --git a/packages/backend-common/src/discovery/index.ts b/packages/backend-common/src/deprecated/middleware/index.ts similarity index 84% rename from packages/backend-common/src/discovery/index.ts rename to packages/backend-common/src/deprecated/middleware/index.ts index 827fd059ad..6c284cc6ec 100644 --- a/packages/backend-common/src/discovery/index.ts +++ b/packages/backend-common/src/deprecated/middleware/index.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -export { - HostDiscovery, - SingleHostDiscovery, - type PluginEndpointDiscovery, -} from './HostDiscovery'; +export * from './errorHandler'; +export * from './notFoundHandler'; +export * from './requestLoggingHandler'; diff --git a/packages/backend-common/src/middleware/notFoundHandler.test.ts b/packages/backend-common/src/deprecated/middleware/notFoundHandler.test.ts similarity index 100% rename from packages/backend-common/src/middleware/notFoundHandler.test.ts rename to packages/backend-common/src/deprecated/middleware/notFoundHandler.test.ts diff --git a/packages/backend-common/src/middleware/notFoundHandler.ts b/packages/backend-common/src/deprecated/middleware/notFoundHandler.ts similarity index 91% rename from packages/backend-common/src/middleware/notFoundHandler.ts rename to packages/backend-common/src/deprecated/middleware/notFoundHandler.ts index 19c01ede9c..bb9504a9ec 100644 --- a/packages/backend-common/src/middleware/notFoundHandler.ts +++ b/packages/backend-common/src/deprecated/middleware/notFoundHandler.ts @@ -15,7 +15,7 @@ */ // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { MiddlewareFactory } from '../../../backend-app-api/src/http/MiddlewareFactory'; +import { MiddlewareFactory } from '../../../../backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory'; import { ConfigReader } from '@backstage/config'; import { RequestHandler } from 'express'; import { getRootLogger } from '../logging'; diff --git a/packages/backend-common/src/middleware/requestLoggingHandler.test.ts b/packages/backend-common/src/deprecated/middleware/requestLoggingHandler.test.ts similarity index 100% rename from packages/backend-common/src/middleware/requestLoggingHandler.test.ts rename to packages/backend-common/src/deprecated/middleware/requestLoggingHandler.test.ts diff --git a/packages/backend-common/src/middleware/requestLoggingHandler.ts b/packages/backend-common/src/deprecated/middleware/requestLoggingHandler.ts similarity index 85% rename from packages/backend-common/src/middleware/requestLoggingHandler.ts rename to packages/backend-common/src/deprecated/middleware/requestLoggingHandler.ts index fd6973f9b6..f30f2de659 100644 --- a/packages/backend-common/src/middleware/requestLoggingHandler.ts +++ b/packages/backend-common/src/deprecated/middleware/requestLoggingHandler.ts @@ -15,11 +15,11 @@ */ // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { MiddlewareFactory } from '../../../backend-app-api/src/http/MiddlewareFactory'; +import { MiddlewareFactory } from '../../../../backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory'; import { RequestHandler } from 'express'; +import { ConfigReader } from '@backstage/config'; import { LoggerService } from '@backstage/backend-plugin-api'; import { getRootLogger } from '../logging'; -import { ConfigReader } from '@backstage/config'; /** * Logs incoming requests. @@ -27,7 +27,7 @@ import { ConfigReader } from '@backstage/config'; * @public * @param logger - An optional logger to use. If not specified, the root logger will be used. * @returns An Express request handler - * @deprecated @deprecated Use {@link @backstage/backend-app-api#MiddlewareFactory.create.logging} instead + * @deprecated Use {@link @backstage/backend-app-api#MiddlewareFactory.create.logging} instead */ export function requestLoggingHandler(logger?: LoggerService): RequestHandler { return MiddlewareFactory.create({ diff --git a/packages/backend-common/src/service/createServiceBuilder.ts b/packages/backend-common/src/deprecated/service/createServiceBuilder.ts similarity index 100% rename from packages/backend-common/src/service/createServiceBuilder.ts rename to packages/backend-common/src/deprecated/service/createServiceBuilder.ts diff --git a/packages/backend-common/src/deprecated/service/index.ts b/packages/backend-common/src/deprecated/service/index.ts new file mode 100644 index 0000000000..a9fc43c22a --- /dev/null +++ b/packages/backend-common/src/deprecated/service/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { createServiceBuilder } from './createServiceBuilder'; +export type { ServiceBuilder, RequestLoggingHandlerFactory } from './types'; diff --git a/packages/backend-common/src/service/lib/ServiceBuilderImpl.test.ts b/packages/backend-common/src/deprecated/service/lib/ServiceBuilderImpl.test.ts similarity index 100% rename from packages/backend-common/src/service/lib/ServiceBuilderImpl.test.ts rename to packages/backend-common/src/deprecated/service/lib/ServiceBuilderImpl.test.ts diff --git a/packages/backend-common/src/service/lib/ServiceBuilderImpl.ts b/packages/backend-common/src/deprecated/service/lib/ServiceBuilderImpl.ts similarity index 98% rename from packages/backend-common/src/service/lib/ServiceBuilderImpl.ts rename to packages/backend-common/src/deprecated/service/lib/ServiceBuilderImpl.ts index 039a9a51eb..b338eb20b1 100644 --- a/packages/backend-common/src/service/lib/ServiceBuilderImpl.ts +++ b/packages/backend-common/src/deprecated/service/lib/ServiceBuilderImpl.ts @@ -37,7 +37,7 @@ import { readHttpServerOptions, HttpServerOptions, createHttpServer, -} from '../../../../backend-app-api/src/http'; +} from '../../../../../backend-defaults/src/entrypoints/rootHttpRouter/http'; export type CspOptions = Record; diff --git a/packages/backend-common/src/service/types.ts b/packages/backend-common/src/deprecated/service/types.ts similarity index 96% rename from packages/backend-common/src/service/types.ts rename to packages/backend-common/src/deprecated/service/types.ts index bb4f98cd1c..ace0712d2f 100644 --- a/packages/backend-common/src/service/types.ts +++ b/packages/backend-common/src/deprecated/service/types.ts @@ -128,6 +128,7 @@ export type ServiceBuilder = { * A factory for request loggers. * * @public + * @deprecated This type is being deprecated along with the {@link @backstage/backend-common#createServiceBuilder} function. */ export type RequestLoggingHandlerFactory = ( logger?: LoggerService, diff --git a/packages/backend-common/src/util/ContainerRunner.ts b/packages/backend-common/src/deprecated/util/ContainerRunner.ts similarity index 87% rename from packages/backend-common/src/util/ContainerRunner.ts rename to packages/backend-common/src/deprecated/util/ContainerRunner.ts index 351a5da613..92081cea16 100644 --- a/packages/backend-common/src/util/ContainerRunner.ts +++ b/packages/backend-common/src/deprecated/util/ContainerRunner.ts @@ -22,6 +22,7 @@ import { Writable } from 'stream'; * {@link https://github.com/apocas/dockerode?tab=readme-ov-file#pull-from-private-repos} * * @public + * @deprecated This interface is deprecated and will be removed in a future release. */ export interface PullOptions { authconfig?: { @@ -39,6 +40,7 @@ export interface PullOptions { * Options passed to the {@link ContainerRunner.runContainer} method. * * @public + * @deprecated This type is deprecated and will be removed in a future release. */ export type RunContainerOptions = { imageName: string; @@ -57,6 +59,7 @@ export type RunContainerOptions = { * Handles the running of containers, on behalf of others. * * @public + * @deprecated This interface is deprecated and will be removed in a future release. */ export interface ContainerRunner { /** diff --git a/packages/backend-common/src/util/DockerContainerRunner.test.ts b/packages/backend-common/src/deprecated/util/DockerContainerRunner.test.ts similarity index 100% rename from packages/backend-common/src/util/DockerContainerRunner.test.ts rename to packages/backend-common/src/deprecated/util/DockerContainerRunner.test.ts diff --git a/packages/backend-common/src/util/DockerContainerRunner.ts b/packages/backend-common/src/deprecated/util/DockerContainerRunner.ts similarity index 98% rename from packages/backend-common/src/util/DockerContainerRunner.ts rename to packages/backend-common/src/deprecated/util/DockerContainerRunner.ts index 89a17fff51..ea576e4a3a 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.ts +++ b/packages/backend-common/src/deprecated/util/DockerContainerRunner.ts @@ -28,6 +28,7 @@ export type UserOptions = { * A {@link ContainerRunner} for Docker containers. * * @public + * @deprecated This class is deprecated and will be removed in a future release. */ export class DockerContainerRunner implements ContainerRunner { private readonly dockerClient: Docker; diff --git a/packages/backend-common/src/util/KubernetesContainerRunner.test.ts b/packages/backend-common/src/deprecated/util/KubernetesContainerRunner.test.ts similarity index 100% rename from packages/backend-common/src/util/KubernetesContainerRunner.test.ts rename to packages/backend-common/src/deprecated/util/KubernetesContainerRunner.test.ts diff --git a/packages/backend-common/src/util/KubernetesContainerRunner.ts b/packages/backend-common/src/deprecated/util/KubernetesContainerRunner.ts similarity index 97% rename from packages/backend-common/src/util/KubernetesContainerRunner.ts rename to packages/backend-common/src/deprecated/util/KubernetesContainerRunner.ts index 4b235caf2c..0402f70079 100644 --- a/packages/backend-common/src/util/KubernetesContainerRunner.ts +++ b/packages/backend-common/src/deprecated/util/KubernetesContainerRunner.ts @@ -37,6 +37,7 @@ import { v4 as uuid } from 'uuid'; * Every mount must start with the 'basePath'. * * @public + * @deprecated This type is deprecated and will be removed in a future release. */ export type KubernetesContainerRunnerMountBase = { volumeName: string; @@ -53,6 +54,7 @@ export type KubernetesContainerRunnerMountBase = { * a volume definition named as the {@link KubernetesContainerRunnerMountBase} 'volumeName'. * * @public + * @deprecated This type is deprecated and will be removed in a future release. */ export type KubernetesContainerRunnerOptions = { kubeConfig: KubeConfig; @@ -69,6 +71,7 @@ export type KubernetesContainerRunnerOptions = { * Runs containers leveraging Jobs on a Kubernetes cluster * * @public + * @deprecated This class is deprecated and will be removed in a future release. */ export class KubernetesContainerRunner implements ContainerRunner { private readonly kubeConfig: KubeConfig; diff --git a/packages/backend-common/src/util/index.ts b/packages/backend-common/src/deprecated/util/index.ts similarity index 100% rename from packages/backend-common/src/util/index.ts rename to packages/backend-common/src/deprecated/util/index.ts diff --git a/packages/backend-common/src/discovery/HostDiscovery.ts b/packages/backend-common/src/discovery/HostDiscovery.ts deleted file mode 100644 index ec8d02cce0..0000000000 --- a/packages/backend-common/src/discovery/HostDiscovery.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { HostDiscovery as _HostDiscovery } from '../../../backend-defaults/src/entrypoints/discovery/HostDiscovery'; -import { DiscoveryService } from '@backstage/backend-plugin-api'; - -/** - * @public - * @deprecated Use `DiscoveryService` from `@backstage/backend-plugin-api` instead - */ -export type PluginEndpointDiscovery = DiscoveryService; - -/** - * HostDiscovery is a basic PluginEndpointDiscovery implementation - * that can handle plugins that are hosted in a single or multiple deployments. - * - * The deployment may be scaled horizontally, as long as the external URL - * is the same for all instances. However, internal URLs will always be - * resolved to the same host, so there won't be any balancing of internal traffic. - * - * @public - * @deprecated Please import from `@backstage/backend-defaults/discovery` instead. - */ -export const HostDiscovery = _HostDiscovery; - -/** - * SingleHostDiscovery is a basic PluginEndpointDiscovery implementation - * that assumes that all plugins are hosted in a single deployment. - * - * The deployment may be scaled horizontally, as long as the external URL - * is the same for all instances. However, internal URLs will always be - * resolved to the same host, so there won't be any balancing of internal traffic. - * - * @public - * @deprecated Use `HostDiscovery` from `@backstage/backend-defaults/discovery` instead - */ -export const SingleHostDiscovery = _HostDiscovery; diff --git a/packages/backend-common/src/index.ts b/packages/backend-common/src/index.ts index bd6fdb2bb6..cb5e236888 100644 --- a/packages/backend-common/src/index.ts +++ b/packages/backend-common/src/index.ts @@ -20,17 +20,7 @@ * @packageDocumentation */ -export { legacyPlugin, makeLegacyPlugin } from './legacy'; -export type { LegacyCreateRouter } from './legacy'; -export { loadBackendConfig } from './config'; -export * from './auth'; -export * from './cache'; export * from './deprecated'; -export * from './database'; -export * from './discovery'; -export * from './hot'; -export * from './logging'; +export * from './compat'; export * from './middleware'; -export * from './reading'; export * from './service'; -export * from './util'; diff --git a/packages/backend-common/src/middleware/index.ts b/packages/backend-common/src/middleware/index.ts index f4f4fcde0b..f1754ef4d8 100644 --- a/packages/backend-common/src/middleware/index.ts +++ b/packages/backend-common/src/middleware/index.ts @@ -14,7 +14,4 @@ * limitations under the License. */ -export * from './errorHandler'; -export * from './notFoundHandler'; -export * from './requestLoggingHandler'; export * from './statusCheckHandler'; diff --git a/packages/backend-common/src/reading/index.ts b/packages/backend-common/src/reading/index.ts deleted file mode 100644 index 14863d2044..0000000000 --- a/packages/backend-common/src/reading/index.ts +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { AzureUrlReader as _AzureUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/AzureUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { BitbucketCloudUrlReader as _BitbucketCloudUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketCloudUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { BitbucketUrlReader as _BitbucketUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { BitbucketServerUrlReader as _BitbucketServerUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/BitbucketServerUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { GerritUrlReader as _GerritUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GerritUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { GithubUrlReader as _GithubUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GithubUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { GitlabUrlReader as _GitlabUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GitlabUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { GiteaUrlReader as _GiteaUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/GiteaUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { HarnessUrlReader as _HarnessUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/HarnessUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { AwsS3UrlReader as _AwsS3UrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/AwsS3UrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { FetchUrlReader as _FetchUrlReader } from '../../../backend-defaults/src/entrypoints/urlReader/lib/FetchUrlReader'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { UrlReaders as _UrlReaders } from '../../../backend-defaults/src/entrypoints/urlReader/lib/UrlReaders'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { ReadUrlResponseFactory as _ReadUrlResponseFactory } from '../../../backend-defaults/src/entrypoints/urlReader/lib/ReadUrlResponseFactory'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import type { UrlReadersOptions as _UrlReadersOptions } from '../../../backend-defaults/src/entrypoints/urlReader/lib/UrlReaders'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import type { FromReadableArrayOptions as _FromReadableArrayOptions } from '../../../backend-defaults/src/entrypoints/urlReader/lib/types'; -// eslint-disable-next-line @backstage/no-relative-monorepo-imports -import type { - ReaderFactory as _ReaderFactory, - ReadTreeResponseFactory as _ReadTreeResponseFactory, - ReadTreeResponseFactoryOptions as _ReadTreeResponseFactoryOptions, - ReadUrlResponseFactoryFromStreamOptions as _ReadUrlResponseFactoryFromStreamOptions, - UrlReaderPredicateTuple as _UrlReaderPredicateTuple, -} from '../../../backend-defaults/src/entrypoints/urlReader/lib/types'; - -import type { - ReadTreeOptions as _ReadTreeOptions, - ReadTreeResponse as _ReadTreeResponse, - ReadTreeResponseFile as _ReadTreeResponseFile, - ReadTreeResponseDirOptions as _ReadTreeResponseDirOptions, - ReadUrlOptions as _ReadUrlOptions, - ReadUrlResponse as _ReadUrlResponse, - SearchOptions as _SearchOptions, - SearchResponse as _SearchResponse, - SearchResponseFile as _SearchResponseFile, - UrlReaderService as _UrlReaderService, -} from '@backstage/backend-plugin-api'; - -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const AzureUrlReader = _AzureUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const BitbucketCloudUrlReader = _BitbucketCloudUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const BitbucketUrlReader = _BitbucketUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const BitbucketServerUrlReader = _BitbucketServerUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const GerritUrlReader = _GerritUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const GithubUrlReader = _GithubUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const GitlabUrlReader = _GitlabUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const GiteaUrlReader = _GiteaUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const HarnessUrlReader = _HarnessUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const AwsS3UrlReader = _AwsS3UrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const FetchUrlReader = _FetchUrlReader; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const UrlReaders = _UrlReaders; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export const ReadUrlResponseFactory = _ReadUrlResponseFactory; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type UrlReadersOptions = _UrlReadersOptions; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type FromReadableArrayOptions = _FromReadableArrayOptions; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type ReaderFactory = _ReaderFactory; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type ReadTreeResponseFactory = _ReadTreeResponseFactory; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type ReadTreeResponseFactoryOptions = _ReadTreeResponseFactoryOptions; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type ReadUrlResponseFactoryFromStreamOptions = - _ReadUrlResponseFactoryFromStreamOptions; -/** - * @public - * @deprecated Import from `@backstage/backend-defaults/urlReader` instead - */ -export type UrlReaderPredicateTuple = _UrlReaderPredicateTuple; - -/** - * @public - * @deprecated Use `UrlReaderServiceReadTreeOptions` from `@backstage/backend-plugin-api` instead - */ -export type ReadTreeOptions = _ReadTreeOptions; -/** - * @public - * @deprecated Use `UrlReaderServiceReadTreeResponse` from `@backstage/backend-plugin-api` instead - */ -export type ReadTreeResponse = _ReadTreeResponse; -/** - * @public - * @deprecated Use `UrlReaderServiceReadTreeResponseFile` from `@backstage/backend-plugin-api` instead - */ -export type ReadTreeResponseFile = _ReadTreeResponseFile; -/** - * @public - * @deprecated Use `UrlReaderServiceReadTreeResponseDirOptions` from `@backstage/backend-plugin-api` instead - */ -export type ReadTreeResponseDirOptions = _ReadTreeResponseDirOptions; -/** - * @public - * @deprecated Use `UrlReaderServiceReadUrlOptions` from `@backstage/backend-plugin-api` instead - */ -export type ReadUrlOptions = _ReadUrlOptions; -/** - * @public - * @deprecated Use `UrlReaderServiceReadUrlResponse` from `@backstage/backend-plugin-api` instead - */ -export type ReadUrlResponse = _ReadUrlResponse; -/** - * @public - * @deprecated Use `UrlReaderServiceSearchOptions` from `@backstage/backend-plugin-api` instead - */ -export type SearchOptions = _SearchOptions; -/** - * @public - * @deprecated Use `UrlReaderServiceSearchResponse` from `@backstage/backend-plugin-api` instead - */ -export type SearchResponse = _SearchResponse; -/** - * @public - * @deprecated Use `UrlReaderServiceSearchResponseFile` from `@backstage/backend-plugin-api` instead - */ -export type SearchResponseFile = _SearchResponseFile; -/** - * @public - * @deprecated Use `UrlReaderService` from `@backstage/backend-plugin-api` instead - */ -export type UrlReader = _UrlReaderService; diff --git a/packages/backend-common/src/service/createStatusCheckRouter.ts b/packages/backend-common/src/service/createStatusCheckRouter.ts index b43bd5585c..1a5953a748 100644 --- a/packages/backend-common/src/service/createStatusCheckRouter.ts +++ b/packages/backend-common/src/service/createStatusCheckRouter.ts @@ -17,7 +17,8 @@ import { LoggerService } from '@backstage/backend-plugin-api'; import Router from 'express-promise-router'; import express from 'express'; -import { errorHandler, statusCheckHandler, StatusCheck } from '../middleware'; +import { errorHandler } from '../deprecated'; +import { statusCheckHandler, StatusCheck } from '../middleware'; /** * Creates a default status checking router, that you can add to your express diff --git a/packages/backend-common/src/service/index.ts b/packages/backend-common/src/service/index.ts index d01f25fad3..c2ae6ba87b 100644 --- a/packages/backend-common/src/service/index.ts +++ b/packages/backend-common/src/service/index.ts @@ -14,6 +14,4 @@ * limitations under the License. */ -export { createServiceBuilder } from './createServiceBuilder'; export { createStatusCheckRouter } from './createStatusCheckRouter'; -export type { ServiceBuilder, RequestLoggingHandlerFactory } from './types'; diff --git a/packages/backend-common/src/util/escapeRegExp.test.ts b/packages/backend-common/src/util/escapeRegExp.test.ts deleted file mode 100644 index 13c6ae4a5a..0000000000 --- a/packages/backend-common/src/util/escapeRegExp.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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 { escapeRegExp } from './escapeRegExp'; - -describe('escapeRegExp', () => { - test('does not escape non-regex characters', () => { - expect(escapeRegExp('Backstage Backstage')).toBe('Backstage Backstage'); - }); - - test('all the characters', () => { - expect(escapeRegExp('^$\\.*+?()[]{}|')).toBe( - '\\^\\$\\\\\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|', - ); - }); - - test('character: ^', () => { - expect(escapeRegExp('^')).toBe('\\^'); - }); - - test('character: $', () => { - expect(escapeRegExp('$')).toBe('\\$'); - }); - - test('character: \\', () => { - expect(escapeRegExp('\\')).toBe('\\\\'); - }); - - test('character: .', () => { - expect(escapeRegExp('.')).toBe('\\.'); - }); - - test('character: *', () => { - expect(escapeRegExp('*')).toBe('\\*'); - }); - - test('character: +', () => { - expect(escapeRegExp('+')).toBe('\\+'); - }); - - test('character: ?', () => { - expect(escapeRegExp('?')).toBe('\\?'); - }); - - test('character: (', () => { - expect(escapeRegExp('(')).toBe('\\('); - }); - - test('character: )', () => { - expect(escapeRegExp(')')).toBe('\\)'); - }); - - test('character: [', () => { - expect(escapeRegExp('[')).toBe('\\['); - }); - - test('character: ]', () => { - expect(escapeRegExp(']')).toBe('\\]'); - }); - - test('character: {', () => { - expect(escapeRegExp('{')).toBe('\\{'); - }); - - test('character: }', () => { - expect(escapeRegExp('}')).toBe('\\}'); - }); - - test('character: |', () => { - expect(escapeRegExp('|')).toBe('\\|'); - }); -}); diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index c88dc8f587..b6cb827e8b 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,46 @@ # @backstage/backend-defaults +## 0.3.0 + +### Minor Changes + +- 662dce8: **BREAKING**: The `workdir` argument have been removed from The `GerritUrlReader` constructor. + + **BREAKING**: The Gerrit `readTree` implementation will now only use the Gitiles api. Support + for using git to clone the repo has been removed. + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- 1897169: Exposed `DefaultSchedulerService` +- b5bc997: Refactor cache manager inline types. +- e171620: Remove dependency with `@backstage/backend-commons` package. +- 6551b3d: Added core service factories and implementations from + `@backstage/backend-app-api`. They are now available as subpath exports, e.g. + `@backstage/backend-defaults/scheduler` is where the service factory and default + implementation of `coreServices.scheduler` now lives. They have been marked as + deprecated in their old locations. +- 8aab451: Internal minor refactors of the database connectors +- 0634fdc: Deprecated `dropDatabase` +- b2ee7f3: Moved over all URL reader functionality from `@backstage/backend-common` to `@backstage/backend-defaults/urlReader`. Please update your imports. +- 9539a0b: Added `@backstage/backend-defaults/auth`, `@backstage/backend-defaults/httpAuth`, and `@backstage/backend-defaults/userInfo` to house their respective backend service factories. You should now import these services from those new locations, instead of `@backstage/backend-app-api`. +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/integration@1.12.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/backend-dev-utils@0.1.4 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + ## 0.3.0-next.3 ### Patch Changes diff --git a/packages/backend-defaults/api-report-auth.md b/packages/backend-defaults/api-report-auth.md new file mode 100644 index 0000000000..d64ce5bc2a --- /dev/null +++ b/packages/backend-defaults/api-report-auth.md @@ -0,0 +1,13 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { AuthService } from '@backstage/backend-plugin-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; + +// @public +export const authServiceFactory: () => ServiceFactory; + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-cache.md b/packages/backend-defaults/api-report-cache.md index 2cd2f3efc9..0bfd7eb463 100644 --- a/packages/backend-defaults/api-report-cache.md +++ b/packages/backend-defaults/api-report-cache.md @@ -11,15 +11,10 @@ import { ServiceFactory } from '@backstage/backend-plugin-api'; // @public export class CacheManager { - forPlugin(pluginId: string): { - getClient(options?: CacheServiceOptions): CacheService; - }; + forPlugin(pluginId: string): PluginCacheManager; static fromConfig( config: Config, - options?: { - logger?: LoggerService; - onError?: (err: Error) => void; - }, + options?: CacheManagerOptions, ): CacheManager; } @@ -29,7 +24,7 @@ export type CacheManagerOptions = { onError?: (err: Error) => void; }; -// @public (undocumented) +// @public export const cacheServiceFactory: () => ServiceFactory; // @public (undocumented) diff --git a/packages/backend-defaults/api-report-database.md b/packages/backend-defaults/api-report-database.md index 728c228899..116830343a 100644 --- a/packages/backend-defaults/api-report-database.md +++ b/packages/backend-defaults/api-report-database.md @@ -31,7 +31,7 @@ export type DatabaseManagerOptions = { logger?: LoggerService; }; -// @public (undocumented) +// @public export const databaseServiceFactory: () => ServiceFactory< DatabaseService, 'plugin' diff --git a/packages/backend-defaults/api-report-discovery.md b/packages/backend-defaults/api-report-discovery.md index 0ff734b8a7..b434dab6fc 100644 --- a/packages/backend-defaults/api-report-discovery.md +++ b/packages/backend-defaults/api-report-discovery.md @@ -7,7 +7,7 @@ import { Config } from '@backstage/config'; import { DiscoveryService } from '@backstage/backend-plugin-api'; import { ServiceFactory } from '@backstage/backend-plugin-api'; -// @public (undocumented) +// @public export const discoveryServiceFactory: () => ServiceFactory< DiscoveryService, 'plugin' diff --git a/packages/backend-defaults/api-report-httpAuth.md b/packages/backend-defaults/api-report-httpAuth.md new file mode 100644 index 0000000000..6ffe3d6539 --- /dev/null +++ b/packages/backend-defaults/api-report-httpAuth.md @@ -0,0 +1,16 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { HttpAuthService } from '@backstage/backend-plugin-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; + +// @public +export const httpAuthServiceFactory: () => ServiceFactory< + HttpAuthService, + 'plugin' +>; + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-httpRouter.md b/packages/backend-defaults/api-report-httpRouter.md new file mode 100644 index 0000000000..a7ca2c8dd3 --- /dev/null +++ b/packages/backend-defaults/api-report-httpRouter.md @@ -0,0 +1,35 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { HttpRouterService } from '@backstage/backend-plugin-api'; +import { HumanDuration } from '@backstage/types'; +import { LifecycleService } from '@backstage/backend-plugin-api'; +import { RequestHandler } from 'express'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; + +// @public +export function createLifecycleMiddleware( + options: LifecycleMiddlewareOptions, +): RequestHandler; + +// @public (undocumented) +export interface HttpRouterFactoryOptions { + getPath?(pluginId: string): string; +} + +// @public +export const httpRouterServiceFactory: ( + options?: HttpRouterFactoryOptions | undefined, +) => ServiceFactory; + +// @public +export interface LifecycleMiddlewareOptions { + // (undocumented) + lifecycle: LifecycleService; + startupRequestPauseTimeout?: HumanDuration; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-logger.md b/packages/backend-defaults/api-report-logger.md new file mode 100644 index 0000000000..fa9018a40c --- /dev/null +++ b/packages/backend-defaults/api-report-logger.md @@ -0,0 +1,16 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { LoggerService } from '@backstage/backend-plugin-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; + +// @public +export const loggerServiceFactory: () => ServiceFactory< + LoggerService, + 'plugin' +>; + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-permissions.md b/packages/backend-defaults/api-report-permissions.md index 9006a62018..c436443ff1 100644 --- a/packages/backend-defaults/api-report-permissions.md +++ b/packages/backend-defaults/api-report-permissions.md @@ -6,7 +6,7 @@ import { PermissionsService } from '@backstage/backend-plugin-api'; import { ServiceFactory } from '@backstage/backend-plugin-api'; -// @public (undocumented) +// @public export const permissionsServiceFactory: () => ServiceFactory< PermissionsService, 'plugin' diff --git a/packages/backend-defaults/api-report-rootConfig.md b/packages/backend-defaults/api-report-rootConfig.md index 60c8fbcb57..317c451e1b 100644 --- a/packages/backend-defaults/api-report-rootConfig.md +++ b/packages/backend-defaults/api-report-rootConfig.md @@ -3,11 +3,21 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import type { Config } from '@backstage/config'; +import { ConfigSchema } from '@backstage/config-loader'; +import { LoggerService } from '@backstage/backend-plugin-api'; import { RemoteConfigSourceOptions } from '@backstage/config-loader'; import { RootConfigService } from '@backstage/backend-plugin-api'; import { ServiceFactory } from '@backstage/backend-plugin-api'; // @public (undocumented) +export function createConfigSecretEnumerator(options: { + logger: LoggerService; + dir?: string; + schema?: ConfigSchema; +}): Promise<(config: Config) => Iterable>; + +// @public export interface RootConfigFactoryOptions { argv?: string[]; remote?: Pick; diff --git a/packages/backend-defaults/api-report-rootHttpRouter.md b/packages/backend-defaults/api-report-rootHttpRouter.md new file mode 100644 index 0000000000..b753406202 --- /dev/null +++ b/packages/backend-defaults/api-report-rootHttpRouter.md @@ -0,0 +1,147 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +/// + +import { Config } from '@backstage/config'; +import { CorsOptions } from 'cors'; +import { ErrorRequestHandler } from 'express'; +import { Express as Express_2 } from 'express'; +import { Handler } from 'express'; +import { HelmetOptions } from 'helmet'; +import * as http from 'http'; +import { LifecycleService } from '@backstage/backend-plugin-api'; +import { LoggerService } from '@backstage/backend-plugin-api'; +import { RequestHandler } from 'express'; +import { RequestListener } from 'http'; +import { RootConfigService } from '@backstage/backend-plugin-api'; +import { RootHttpRouterService } from '@backstage/backend-plugin-api'; +import type { Server } from 'node:http'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; + +// @public +export function createHttpServer( + listener: RequestListener, + options: HttpServerOptions, + deps: { + logger: LoggerService; + }, +): Promise; + +// @public +export class DefaultRootHttpRouter implements RootHttpRouterService { + // (undocumented) + static create(options?: DefaultRootHttpRouterOptions): DefaultRootHttpRouter; + // (undocumented) + handler(): Handler; + // (undocumented) + use(path: string, handler: Handler): void; +} + +// @public +export interface DefaultRootHttpRouterOptions { + indexPath?: string | false; +} + +// @public +export interface ExtendedHttpServer extends http.Server { + // (undocumented) + port(): number; + // (undocumented) + start(): Promise; + // (undocumented) + stop(): Promise; +} + +// @public +export type HttpServerCertificateOptions = + | { + type: 'pem'; + key: string; + cert: string; + } + | { + type: 'generated'; + hostname: string; + }; + +// @public +export type HttpServerOptions = { + listen: { + port: number; + host: string; + }; + https?: { + certificate: HttpServerCertificateOptions; + }; +}; + +// @public +export class MiddlewareFactory { + compression(): RequestHandler; + cors(): RequestHandler; + static create(options: MiddlewareFactoryOptions): MiddlewareFactory; + error(options?: MiddlewareFactoryErrorOptions): ErrorRequestHandler; + helmet(): RequestHandler; + logging(): RequestHandler; + notFound(): RequestHandler; +} + +// @public +export interface MiddlewareFactoryErrorOptions { + logAllErrors?: boolean; + showStackTraces?: boolean; +} + +// @public +export interface MiddlewareFactoryOptions { + // (undocumented) + config: RootConfigService; + // (undocumented) + logger: LoggerService; +} + +// @public +export function readCorsOptions(config?: Config): CorsOptions; + +// @public +export function readHelmetOptions(config?: Config): HelmetOptions; + +// @public +export function readHttpServerOptions(config?: Config): HttpServerOptions; + +// @public (undocumented) +export interface RootHttpRouterConfigureContext { + // (undocumented) + app: Express_2; + // (undocumented) + applyDefaults: () => void; + // (undocumented) + config: RootConfigService; + // (undocumented) + lifecycle: LifecycleService; + // (undocumented) + logger: LoggerService; + // (undocumented) + middleware: MiddlewareFactory; + // (undocumented) + routes: RequestHandler; + // (undocumented) + server: Server; +} + +// @public +export type RootHttpRouterFactoryOptions = { + indexPath?: string | false; + configure?(context: RootHttpRouterConfigureContext): void; +}; + +// @public (undocumented) +export const rootHttpRouterServiceFactory: ( + options?: RootHttpRouterFactoryOptions | undefined, +) => ServiceFactory; + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-rootLogger.md b/packages/backend-defaults/api-report-rootLogger.md new file mode 100644 index 0000000000..70dc0deee6 --- /dev/null +++ b/packages/backend-defaults/api-report-rootLogger.md @@ -0,0 +1,54 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { Format } from 'logform'; +import { JsonObject } from '@backstage/types'; +import { LoggerService } from '@backstage/backend-plugin-api'; +import { RootLoggerService } from '@backstage/backend-plugin-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; +import { transport } from 'winston'; + +// @public +export const rootLoggerServiceFactory: () => ServiceFactory< + RootLoggerService, + 'root' +>; + +// @public +export class WinstonLogger implements RootLoggerService { + // (undocumented) + addRedactions(redactions: Iterable): void; + // (undocumented) + child(meta: JsonObject): LoggerService; + static colorFormat(): Format; + static create(options: WinstonLoggerOptions): WinstonLogger; + // (undocumented) + debug(message: string, meta?: JsonObject): void; + // (undocumented) + error(message: string, meta?: JsonObject): void; + // (undocumented) + info(message: string, meta?: JsonObject): void; + static redacter(): { + format: Format; + add: (redactions: Iterable) => void; + }; + // (undocumented) + warn(message: string, meta?: JsonObject): void; +} + +// @public (undocumented) +export interface WinstonLoggerOptions { + // (undocumented) + format?: Format; + // (undocumented) + level?: string; + // (undocumented) + meta?: JsonObject; + // (undocumented) + transports?: transport[]; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/api-report-urlReader.md b/packages/backend-defaults/api-report-urlReader.md index a1976f5a1c..c56cdba69b 100644 --- a/packages/backend-defaults/api-report-urlReader.md +++ b/packages/backend-defaults/api-report-urlReader.md @@ -425,7 +425,7 @@ export class UrlReaders { static default(options: UrlReadersOptions): UrlReaderService; } -// @public (undocumented) +// @public export const urlReaderServiceFactory: () => ServiceFactory< UrlReaderService, 'plugin' diff --git a/packages/backend-defaults/api-report-userInfo.md b/packages/backend-defaults/api-report-userInfo.md new file mode 100644 index 0000000000..d11fb69718 --- /dev/null +++ b/packages/backend-defaults/api-report-userInfo.md @@ -0,0 +1,16 @@ +## API Report File for "@backstage/backend-defaults" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { ServiceFactory } from '@backstage/backend-plugin-api'; +import { UserInfoService } from '@backstage/backend-plugin-api'; + +// @public +export const userInfoServiceFactory: () => ServiceFactory< + UserInfoService, + 'plugin' +>; + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/backend-defaults/config.d.ts b/packages/backend-defaults/config.d.ts index 569ab436db..ab1e443fc2 100644 --- a/packages/backend-defaults/config.d.ts +++ b/packages/backend-defaults/config.d.ts @@ -15,6 +15,283 @@ */ export interface Config { + backend?: { + /** + * Options used by the default auth, httpAuth and userInfo services. + */ + auth?: { + /** + * This disables the otherwise default auth policy, which requires all + * requests to be authenticated with either user or service credentials. + * + * Disabling this check means that the backend will no longer block + * unauthenticated requests, but instead allow them to pass through to + * plugins. + * + * If permissions are enabled, unauthenticated requests will be treated + * exactly as such, leaving it to the permission policy to determine what + * permissions should be allowed for an unauthenticated identity. Note + * that this will also apply to service-to-service calls between plugins + * unless you configure credentials for service calls. + */ + dangerouslyDisableDefaultAuthPolicy?: boolean; + + /** Controls how to store keys for plugin-to-plugin auth */ + pluginKeyStore?: + | { type: 'database' } + | { + type: 'static'; + static: { + /** + * Must be declared at least once and the first one will be used for signing. + */ + keys: Array<{ + /** + * Path to the public key file in the SPKI format. Should be an absolute path. + */ + publicKeyFile: string; + /** + * Path to the matching private key file in the PKCS#8 format. Should be an absolute path. + * + * The first array entry must specify a private key file, the rest must not. + */ + privateKeyFile?: string; + /** + * ID to uniquely identify this key within the JWK set. + */ + keyId: string; + /** + * JWS "alg" (Algorithm) Header Parameter value. Defaults to ES256. + * Must match the algorithm used to generate the keys in the provided files + */ + algorithm?: string; + }>; + }; + }; + + /** + * Configures methods of external access, ie ways for callers outside of + * the Backstage ecosystem to get authorized for access to APIs that do + * not permit unauthorized access. + */ + externalAccess: Array< + | { + /** + * This is the legacy service-to-service access method, where a set + * of static keys were shared among plugins and used for symmetric + * signing and verification. These correspond to the old + * `backend.auth.keys` set and retain their behavior for backwards + * compatibility. Please migrate to other access methods when + * possible. + * + * Callers generate JWT tokens with the following payload: + * + * ```json + * { + * "sub": "backstage-plugin", + * "exp": + * } + * ``` + * + * And sign them with HS256, using the base64 decoded secret. The + * tokens are then passed along with requests in the Authorization + * header: + * + * ``` + * Authorization: Bearer eyJhbGciOiJIUzI... + * ``` + */ + type: 'legacy'; + options: { + /** + * Any set of base64 encoded random bytes to be used as both the + * signing and verification key. Should be sufficiently long so as + * not to be easy to guess by brute force. + * + * Can be generated eg using + * + * ```sh + * node -p 'require("crypto").randomBytes(24).toString("base64")' + * ``` + * + * @visibility secret + */ + secret: string; + + /** + * Sets the subject of the principal, when matching this token. + * Useful for debugging and tracking purposes. + */ + subject: string; + }; + /** + * Restricts what types of access that are permitted for this access + * method. If no access restrictions are given, it'll have unlimited + * access. This access restriction applies for the framework level; + * individual plugins may have their own access control mechanisms + * on top of this. + */ + accessRestrictions?: Array<{ + /** + * Permit access to make requests to this plugin. + * + * Can be further refined by setting additional fields below. + */ + plugin: string; + /** + * If given, this method is limited to only performing actions + * with these named permissions in this plugin. + * + * Note that this only applies where permissions checks are + * enabled in the first place. Endpoints that are not protected by + * the permissions system at all, are not affected by this + * setting. + */ + permission?: string | Array; + /** + * If given, this method is limited to only performing actions + * whose permissions have these attributes. + * + * Note that this only applies where permissions checks are + * enabled in the first place. Endpoints that are not protected by + * the permissions system at all, are not affected by this + * setting. + */ + permissionAttribute?: { + /** + * One of more of 'create', 'read', 'update', or 'delete'. + */ + action?: string | Array; + }; + }>; + } + | { + /** + * This access method consists of random static tokens that can be + * handed out to callers. + * + * The tokens are then passed along verbatim with requests in the + * Authorization header: + * + * ``` + * Authorization: Bearer eZv5o+fW3KnR3kVabMW4ZcDNLPl8nmMW + * ``` + */ + type: 'static'; + options: { + /** + * A raw token that can be any string, but for security reasons + * should be sufficiently long so as not to be easy to guess by + * brute force. + * + * Can be generated eg using + * + * ```sh + * node -p 'require("crypto").randomBytes(24).toString("base64")' + * ``` + * + * Since the tokens can be any string, you are free to add + * additional identifying data to them if you like. For example, + * adding a `freben-local-dev-` prefix for debugging purposes to a + * token that you know will be handed out for use as a personal + * access token during development. + * + * @visibility secret + */ + token: string; + + /** + * Sets the subject of the principal, when matching this token. + * Useful for debugging and tracking purposes. + */ + subject: string; + }; + /** + * Restricts what types of access that are permitted for this access + * method. If no access restrictions are given, it'll have unlimited + * access. This access restriction applies for the framework level; + * individual plugins may have their own access control mechanisms + * on top of this. + */ + accessRestrictions?: Array<{ + /** + * Permit access to make requests to this plugin. + * + * Can be further refined by setting additional fields below. + */ + plugin: string; + /** + * If given, this method is limited to only performing actions + * with these named permissions in this plugin. + * + * Note that this only applies where permissions checks are + * enabled in the first place. Endpoints that are not protected by + * the permissions system at all, are not affected by this + * setting. + */ + permission?: string | Array; + /** + * If given, this method is limited to only performing actions + * whose permissions have these attributes. + * + * Note that this only applies where permissions checks are + * enabled in the first place. Endpoints that are not protected by + * the permissions system at all, are not affected by this + * setting. + */ + permissionAttribute?: { + /** + * One of more of 'create', 'read', 'update', or 'delete'. + */ + action?: string | Array; + }; + }>; + } + | { + /** + * This access method consists of a JWKS endpoint that can be used to + * verify JWT tokens. + * + * Callers generate JWT tokens via 3rd party tooling + * and pass them in the Authorization header: + * + * ``` + * Authorization: Bearer eZv5o+fW3KnR3kVabMW4ZcDNLPl8nmMW + * ``` + */ + type: 'jwks'; + options: { + /** + * The full URL of the JWKS endpoint. + */ + url: string; + /** + * Sets the algorithm(s) that should be used to verify the JWT tokens. + * The passed JWTs must have been signed using one of the listed algorithms. + */ + algorithm?: string | string[]; + /** + * Sets the issuer(s) that should be used to verify the JWT tokens. + * Passed JWTs must have an `iss` claim which matches one of the specified issuers. + */ + issuer?: string | string[]; + /** + * Sets the audience(s) that should be used to verify the JWT tokens. + * The passed JWTs must have an "aud" claim that matches one of the audiences specified, + * or have no audience specified. + */ + audience?: string | string[]; + /** + * Sets an optional subject prefix. Passes the subject to called plugins. + * Useful for debugging and tracking purposes. + */ + subjectPrefix?: string; + }; + } + >; + }; + }; + /** * Options used by the default discovery service. */ diff --git a/packages/backend-app-api/migrations/20240327104803_public_keys.js b/packages/backend-defaults/migrations/auth/20240327104803_public_keys.js similarity index 100% rename from packages/backend-app-api/migrations/20240327104803_public_keys.js rename to packages/backend-defaults/migrations/auth/20240327104803_public_keys.js diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 2cdf30e0d2..4c34c7f317 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-defaults", - "version": "0.3.0-next.3", + "version": "0.3.0", "description": "Backend defaults used by Backstage backend apps", "backstage": { "role": "node-library" @@ -20,21 +20,31 @@ "license": "Apache-2.0", "exports": { ".": "./src/index.ts", + "./auth": "./src/entrypoints/auth/index.ts", "./cache": "./src/entrypoints/cache/index.ts", "./database": "./src/entrypoints/database/index.ts", "./discovery": "./src/entrypoints/discovery/index.ts", + "./httpAuth": "./src/entrypoints/httpAuth/index.ts", + "./httpRouter": "./src/entrypoints/httpRouter/index.ts", "./lifecycle": "./src/entrypoints/lifecycle/index.ts", + "./logger": "./src/entrypoints/logger/index.ts", "./permissions": "./src/entrypoints/permissions/index.ts", "./rootConfig": "./src/entrypoints/rootConfig/index.ts", + "./rootHttpRouter": "./src/entrypoints/rootHttpRouter/index.ts", "./rootLifecycle": "./src/entrypoints/rootLifecycle/index.ts", + "./rootLogger": "./src/entrypoints/rootLogger/index.ts", "./scheduler": "./src/entrypoints/scheduler/index.ts", "./urlReader": "./src/entrypoints/urlReader/index.ts", + "./userInfo": "./src/entrypoints/userInfo/index.ts", "./package.json": "./package.json" }, "main": "src/index.ts", "types": "src/index.ts", "typesVersions": { "*": { + "auth": [ + "src/entrypoints/auth/index.ts" + ], "cache": [ "src/entrypoints/cache/index.ts" ], @@ -44,24 +54,42 @@ "discovery": [ "src/entrypoints/discovery/index.ts" ], + "httpAuth": [ + "src/entrypoints/httpAuth/index.ts" + ], + "httpRouter": [ + "src/entrypoints/httpRouter/index.ts" + ], "lifecycle": [ "src/entrypoints/lifecycle/index.ts" ], + "logger": [ + "src/entrypoints/logger/index.ts" + ], "permissions": [ "src/entrypoints/permissions/index.ts" ], "rootConfig": [ "src/entrypoints/rootConfig/index.ts" ], + "rootHttpRouter": [ + "src/entrypoints/rootHttpRouter/index.ts" + ], "rootLifecycle": [ "src/entrypoints/rootLifecycle/index.ts" ], + "rootLogger": [ + "src/entrypoints/rootLogger/index.ts" + ], "scheduler": [ "src/entrypoints/scheduler/index.ts" ], "urlReader": [ "src/entrypoints/urlReader/index.ts" ], + "userInfo": [ + "src/entrypoints/userInfo/index.ts" + ], "package.json": [ "package.json" ] @@ -88,42 +116,65 @@ "@aws-sdk/credential-providers": "^3.350.0", "@aws-sdk/types": "^3.347.0", "@backstage/backend-app-api": "workspace:^", + "@backstage/backend-common": "workspace:^", "@backstage/backend-dev-utils": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", + "@backstage/cli-common": "workspace:^", "@backstage/config": "workspace:^", "@backstage/config-loader": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", "@backstage/integration-aws-node": "workspace:^", + "@backstage/plugin-auth-node": "workspace:^", "@backstage/plugin-events-node": "workspace:^", "@backstage/plugin-permission-node": "workspace:^", "@backstage/types": "workspace:^", "@google-cloud/storage": "^7.0.0", "@keyv/memcache": "^1.3.5", "@keyv/redis": "^2.5.3", + "@manypkg/get-packages": "^1.1.3", "@octokit/rest": "^19.0.3", "@opentelemetry/api": "^1.3.0", + "@types/cors": "^2.8.6", + "@types/express": "^4.17.6", "archiver": "^6.0.0", "base64-stream": "^1.0.0", "better-sqlite3": "^9.0.0", + "compression": "^1.7.4", "concat-stream": "^2.0.0", + "cookie": "^0.6.0", + "cors": "^2.8.5", "cron": "^3.0.0", + "express": "^4.17.1", + "express-promise-router": "^4.1.0", "fs-extra": "^11.2.0", "git-url-parse": "^14.0.0", + "helmet": "^6.0.0", "isomorphic-git": "^1.23.0", + "jose": "^5.0.0", "keyv": "^4.5.2", "knex": "^3.0.0", "lodash": "^4.17.21", + "logform": "^2.3.2", "luxon": "^3.0.0", "minimatch": "^9.0.0", + "minimist": "^1.2.5", + "morgan": "^1.10.0", "mysql2": "^3.0.0", "node-fetch": "^2.6.7", + "node-forge": "^1.3.1", "p-limit": "^3.1.0", + "path-to-regexp": "^6.2.1", "pg": "^8.11.3", "pg-connection-string": "^2.3.0", "raw-body": "^2.4.1", + "selfsigned": "^2.0.0", + "stoppable": "^1.1.0", "tar": "^6.1.12", + "triple-beam": "^1.4.1", "uuid": "^9.0.0", + "winston": "^3.2.1", + "winston-transport": "^4.5.0", "yauzl": "^3.0.0", "yn": "^4.0.0", "zod": "^3.22.4" @@ -133,8 +184,14 @@ "@backstage/backend-plugin-api": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", + "@types/http-errors": "^2.0.0", + "@types/morgan": "^1.9.0", + "@types/node-forge": "^1.3.0", + "@types/stoppable": "^1.1.0", "aws-sdk-client-mock": "^4.0.0", + "http-errors": "^2.0.0", "msw": "^1.0.0", + "supertest": "^6.1.3", "wait-for-expect": "^3.0.2" }, "configSchema": "config.d.ts" diff --git a/packages/backend-defaults/src/CreateBackend.ts b/packages/backend-defaults/src/CreateBackend.ts index 823b3c2833..9b3fa5d649 100644 --- a/packages/backend-defaults/src/CreateBackend.ts +++ b/packages/backend-defaults/src/CreateBackend.ts @@ -16,26 +16,26 @@ import { Backend, - authServiceFactory, createSpecializedBackend, - httpAuthServiceFactory, - httpRouterServiceFactory, identityServiceFactory, - loggerServiceFactory, - rootHttpRouterServiceFactory, - rootLoggerServiceFactory, tokenManagerServiceFactory, - userInfoServiceFactory, } from '@backstage/backend-app-api'; +import { authServiceFactory } from '@backstage/backend-defaults/auth'; import { cacheServiceFactory } from '@backstage/backend-defaults/cache'; import { databaseServiceFactory } from '@backstage/backend-defaults/database'; import { discoveryServiceFactory } from '@backstage/backend-defaults/discovery'; +import { httpAuthServiceFactory } from '@backstage/backend-defaults/httpAuth'; +import { httpRouterServiceFactory } from '@backstage/backend-defaults/httpRouter'; import { lifecycleServiceFactory } from '@backstage/backend-defaults/lifecycle'; +import { loggerServiceFactory } from '@backstage/backend-defaults/logger'; import { permissionsServiceFactory } from '@backstage/backend-defaults/permissions'; import { rootConfigServiceFactory } from '@backstage/backend-defaults/rootConfig'; +import { rootHttpRouterServiceFactory } from '@backstage/backend-defaults/rootHttpRouter'; import { rootLifecycleServiceFactory } from '@backstage/backend-defaults/rootLifecycle'; +import { rootLoggerServiceFactory } from '@backstage/backend-defaults/rootLogger'; import { schedulerServiceFactory } from '@backstage/backend-defaults/scheduler'; import { urlReaderServiceFactory } from '@backstage/backend-defaults/urlReader'; +import { userInfoServiceFactory } from '@backstage/backend-defaults/userInfo'; import { eventsServiceFactory } from '@backstage/plugin-events-node'; export const defaultServiceFactories = [ diff --git a/packages/backend-app-api/src/services/implementations/auth/DefaultAuthService.ts b/packages/backend-defaults/src/entrypoints/auth/DefaultAuthService.ts similarity index 95% rename from packages/backend-app-api/src/services/implementations/auth/DefaultAuthService.ts rename to packages/backend-defaults/src/entrypoints/auth/DefaultAuthService.ts index 12ccc5fd00..159da79435 100644 --- a/packages/backend-app-api/src/services/implementations/auth/DefaultAuthService.ts +++ b/packages/backend-defaults/src/entrypoints/auth/DefaultAuthService.ts @@ -49,8 +49,12 @@ export class DefaultAuthService implements AuthService { private readonly pluginKeySource: PluginKeySource, ) {} - // allowLimitedAccess is currently ignored, since we currently always use the full user tokens - async authenticate(token: string): Promise { + async authenticate( + token: string, + options?: { + allowLimitedAccess?: boolean; + }, + ): Promise { const pluginResult = await this.pluginTokenHandler.verifyToken(token); if (pluginResult) { if (pluginResult.limitedUserToken) { @@ -73,6 +77,13 @@ export class DefaultAuthService implements AuthService { const userResult = await this.userTokenHandler.verifyToken(token); if (userResult) { + if ( + !options?.allowLimitedAccess && + this.userTokenHandler.isLimitedUserToken(token) + ) { + throw new AuthenticationError('Illegal limited user token'); + } + return createCredentialsWithUserPrincipal( userResult.userEntityRef, token, diff --git a/packages/backend-app-api/src/services/implementations/auth/JwksClient.ts b/packages/backend-defaults/src/entrypoints/auth/JwksClient.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/JwksClient.ts rename to packages/backend-defaults/src/entrypoints/auth/JwksClient.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.test.ts b/packages/backend-defaults/src/entrypoints/auth/authServiceFactory.test.ts similarity index 89% rename from packages/backend-app-api/src/services/implementations/auth/authServiceFactory.test.ts rename to packages/backend-defaults/src/entrypoints/auth/authServiceFactory.test.ts index 71fbe64963..22357d0f49 100644 --- a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.test.ts +++ b/packages/backend-defaults/src/entrypoints/auth/authServiceFactory.test.ts @@ -19,6 +19,7 @@ import { mockServices, setupRequestMockHandlers, } from '@backstage/backend-test-utils'; +import { tokenManagerServiceFactory } from '@backstage/backend-app-api'; import { authServiceFactory } from './authServiceFactory'; import { base64url, decodeJwt } from 'jose'; import { discoveryServiceFactory } from '../discovery'; @@ -26,7 +27,6 @@ import { BackstageServicePrincipal, BackstageUserPrincipal, } from '@backstage/backend-plugin-api'; -import { tokenManagerServiceFactory } from '../tokenManager'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { InternalBackstageCredentials } from './types'; @@ -218,6 +218,17 @@ describe('authServiceFactory', () => { }); it('should issue limited user tokens', async () => { + /* Corresponding private key in case this test needs to be updated in the future: + { + kty: 'EC', + x: 'c9cPvv_S7zETBKDlAa3oOjr7RvyUueIYIak0TRph7mg', + y: 'bKaxDRAWgmEJ9Ix8e85blH_IsnbQxX31x0oQTVwLZ2c', + crv: 'P-256', + d: '2eJlhCDdGx9fxKDL1D9BnY3CCTEKxL60Bkms0hmubmY', + kid: '8d01c3db-56f9-45f0-86dd-05b3c835b3d3', + alg: 'ES256' + } + */ server.use( rest.get( 'http://localhost:7007/api/auth/.well-known/jwks.json', @@ -227,8 +238,8 @@ describe('authServiceFactory', () => { keys: [ { kty: 'EC', - x: '78-Ei1H3nKM23ZpGMMzte2mVoYCcnfnSiLTm1P7vZM0', - y: 'Z9-PjG_EU598tLLUc2f8sCqxT7bjs8WpoV-lHm9GJHY', + x: 'c9cPvv_S7zETBKDlAa3oOjr7RvyUueIYIak0TRph7mg', + y: 'bKaxDRAWgmEJ9Ix8e85blH_IsnbQxX31x0oQTVwLZ2c', crv: 'P-256', kid: '8d01c3db-56f9-45f0-86dd-05b3c835b3d3', alg: 'ES256', @@ -253,7 +264,7 @@ describe('authServiceFactory', () => { const catalogAuth = await tester.get('catalog'); const fullToken = - 'eyJ0eXAiOiJ2bmQuYmFja3N0YWdlLnVzZXIiLCJhbGciOiJFUzI1NiIsImtpZCI6IjhkMDFjM2RiLTU2ZjktNDVmMC04NmRkLTA1YjNjODM1YjNkMyJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjcwMDcvYXBpL2F1dGgiLCJzdWIiOiJ1c2VyOmRldmVsb3BtZW50L2d1ZXN0IiwiZW50IjpbInVzZXI6ZGV2ZWxvcG1lbnQvZ3Vlc3QiLCJncm91cDpkZWZhdWx0L3RlYW0tYSJdLCJhdWQiOiJiYWNrc3RhZ2UiLCJpYXQiOjE3MTIwNzE3MTQsImV4cCI6MTcxMjA3NTMxNCwidWlwIjoiMDFBUUJfSWpHTXRWc2gyWmgzZEg1NXhOX29pSVlhQ1F3ODJjeDZ5M1BQMXlpTjM4eGMzMVpMS2U0YVNDQlJTTy10cjFzZFUzT29ELUxJYV8tNV9RVUEifQ.mjIrZGqbZ2t68fS4U3crlGw-bYJZnMlhMHf-YL7q_u1HfaLr4NMTcHkxdnNS2wfJxCmUBxRfUS8b3nSAKsxcHA'; + 'eyJ0eXAiOiJ2bmQuYmFja3N0YWdlLnVzZXIiLCJhbGciOiJFUzI1NiIsImtpZCI6IjhkMDFjM2RiLTU2ZjktNDVmMC04NmRkLTA1YjNjODM1YjNkMyJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjcwMDcvYXBpL2F1dGgiLCJzdWIiOiJ1c2VyOmRldmVsb3BtZW50L2d1ZXN0IiwiZW50IjpbInVzZXI6ZGV2ZWxvcG1lbnQvZ3Vlc3QiLCJncm91cDpkZWZhdWx0L3RlYW0tYSJdLCJhdWQiOiJiYWNrc3RhZ2UiLCJpYXQiOjE3MTIwNzE3MTQsImV4cCI6MTcxMjA3NTMxNCwidWlwIjoiSmwxVEpycG9VUjR1NENjUE9nalJMeHpEMi1FMGZPR3ptSm81UWI2eS1aN19meG5oVVBEdWVWRE1CS0l6WF9pc0lvSDhlZm9EUFA5bG9aQnpPblB5Z2cifQ.1gVMq1ofO8PzRctu72D6c4IMqXuIabT79WdGEhW6vIrBRs_qhuWAa94Wvz_KYKpBTb2nxgzXJ5OeddeoYApMyQ'; const credentials = await catalogAuth.authenticate(fullToken); if (!catalogAuth.isPrincipal(credentials, 'user')) { @@ -275,7 +286,6 @@ describe('authServiceFactory', () => { const expectedTokenPayload = base64url.encode( JSON.stringify({ sub: 'user:development/guest', - ent: ['user:development/guest', 'group:default/team-a'], iat: expectedIssuedAt, exp: expectedExpiresAt, }), @@ -312,6 +322,17 @@ describe('authServiceFactory', () => { const catalogAuth = await tester.get('catalog'); const permissionAuth = await tester.get('permission'); + /* Corresponding private key in case this test needs to be updated in the future: + { + kty: 'EC', + x: 'c9cPvv_S7zETBKDlAa3oOjr7RvyUueIYIak0TRph7mg', + y: 'bKaxDRAWgmEJ9Ix8e85blH_IsnbQxX31x0oQTVwLZ2c', + crv: 'P-256', + d: '2eJlhCDdGx9fxKDL1D9BnY3CCTEKxL60Bkms0hmubmY', + kid: '8d01c3db-56f9-45f0-86dd-05b3c835b3d3', + alg: 'ES256' + } + */ server.use( rest.get( 'http://localhost:7007/api/auth/.well-known/jwks.json', @@ -321,8 +342,8 @@ describe('authServiceFactory', () => { keys: [ { kty: 'EC', - x: '78-Ei1H3nKM23ZpGMMzte2mVoYCcnfnSiLTm1P7vZM0', - y: 'Z9-PjG_EU598tLLUc2f8sCqxT7bjs8WpoV-lHm9GJHY', + x: 'c9cPvv_S7zETBKDlAa3oOjr7RvyUueIYIak0TRph7mg', + y: 'bKaxDRAWgmEJ9Ix8e85blH_IsnbQxX31x0oQTVwLZ2c', crv: 'P-256', kid: '8d01c3db-56f9-45f0-86dd-05b3c835b3d3', alg: 'ES256', @@ -360,7 +381,7 @@ describe('authServiceFactory', () => { }); const fullToken = - 'eyJ0eXAiOiJ2bmQuYmFja3N0YWdlLnVzZXIiLCJhbGciOiJFUzI1NiIsImtpZCI6IjhkMDFjM2RiLTU2ZjktNDVmMC04NmRkLTA1YjNjODM1YjNkMyJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjcwMDcvYXBpL2F1dGgiLCJzdWIiOiJ1c2VyOmRldmVsb3BtZW50L2d1ZXN0IiwiZW50IjpbInVzZXI6ZGV2ZWxvcG1lbnQvZ3Vlc3QiLCJncm91cDpkZWZhdWx0L3RlYW0tYSJdLCJhdWQiOiJiYWNrc3RhZ2UiLCJpYXQiOjE3MTIwNzE3MTQsImV4cCI6MTcxMjA3NTMxNCwidWlwIjoiMDFBUUJfSWpHTXRWc2gyWmgzZEg1NXhOX29pSVlhQ1F3ODJjeDZ5M1BQMXlpTjM4eGMzMVpMS2U0YVNDQlJTTy10cjFzZFUzT29ELUxJYV8tNV9RVUEifQ.mjIrZGqbZ2t68fS4U3crlGw-bYJZnMlhMHf-YL7q_u1HfaLr4NMTcHkxdnNS2wfJxCmUBxRfUS8b3nSAKsxcHA'; + 'eyJ0eXAiOiJ2bmQuYmFja3N0YWdlLnVzZXIiLCJhbGciOiJFUzI1NiIsImtpZCI6IjhkMDFjM2RiLTU2ZjktNDVmMC04NmRkLTA1YjNjODM1YjNkMyJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjcwMDcvYXBpL2F1dGgiLCJzdWIiOiJ1c2VyOmRldmVsb3BtZW50L2d1ZXN0IiwiZW50IjpbInVzZXI6ZGV2ZWxvcG1lbnQvZ3Vlc3QiLCJncm91cDpkZWZhdWx0L3RlYW0tYSJdLCJhdWQiOiJiYWNrc3RhZ2UiLCJpYXQiOjE3MTIwNzE3MTQsImV4cCI6MTcxMjA3NTMxNCwidWlwIjoiSmwxVEpycG9VUjR1NENjUE9nalJMeHpEMi1FMGZPR3ptSm81UWI2eS1aN19meG5oVVBEdWVWRE1CS0l6WF9pc0lvSDhlZm9EUFA5bG9aQnpPblB5Z2cifQ.1gVMq1ofO8PzRctu72D6c4IMqXuIabT79WdGEhW6vIrBRs_qhuWAa94Wvz_KYKpBTb2nxgzXJ5OeddeoYApMyQ'; const credentials = await searchAuth.authenticate(fullToken); if (!searchAuth.isPrincipal(credentials, 'user')) { diff --git a/packages/backend-defaults/src/entrypoints/auth/authServiceFactory.ts b/packages/backend-defaults/src/entrypoints/auth/authServiceFactory.ts new file mode 100644 index 0000000000..e275e2be00 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/auth/authServiceFactory.ts @@ -0,0 +1,93 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + coreServices, + createServiceFactory, +} from '@backstage/backend-plugin-api'; +import { DefaultAuthService } from './DefaultAuthService'; +import { ExternalTokenHandler } from './external/ExternalTokenHandler'; +import { PluginTokenHandler } from './plugin/PluginTokenHandler'; +import { createPluginKeySource } from './plugin/keys/createPluginKeySource'; +import { UserTokenHandler } from './user/UserTokenHandler'; + +/** + * Handles token authentication and credentials management. + * + * See {@link @backstage/code-plugin-api#AuthService} + * and {@link https://backstage.io/docs/backend-system/core-services/auth | the service docs} + * for more information. + * + * @public + */ +export const authServiceFactory = createServiceFactory({ + service: coreServices.auth, + deps: { + config: coreServices.rootConfig, + logger: coreServices.rootLogger, + discovery: coreServices.discovery, + plugin: coreServices.pluginMetadata, + database: coreServices.database, + // Re-using the token manager makes sure that we use the same generated keys for + // development as plugins that have not yet been migrated. It's important that this + // keeps working as long as there are plugins that have not been migrated to the + // new auth services in the new backend system. + tokenManager: coreServices.tokenManager, + }, + async factory({ config, discovery, plugin, tokenManager, logger, database }) { + const disableDefaultAuthPolicy = + config.getOptionalBoolean( + 'backend.auth.dangerouslyDisableDefaultAuthPolicy', + ) ?? false; + + const keyDuration = { hours: 1 }; + + const keySource = await createPluginKeySource({ + config, + database, + logger, + keyDuration, + }); + + const userTokens = UserTokenHandler.create({ + discovery, + }); + + const pluginTokens = PluginTokenHandler.create({ + ownPluginId: plugin.getId(), + logger, + keySource, + keyDuration, + discovery, + }); + + const externalTokens = ExternalTokenHandler.create({ + ownPluginId: plugin.getId(), + config, + logger, + }); + + return new DefaultAuthService( + userTokens, + pluginTokens, + externalTokens, + tokenManager, + plugin.getId(), + disableDefaultAuthPolicy, + keySource, + ); + }, +}); diff --git a/packages/backend-app-api/src/services/implementations/auth/external/ExternalTokenHandler.test.ts b/packages/backend-defaults/src/entrypoints/auth/external/ExternalTokenHandler.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/ExternalTokenHandler.test.ts rename to packages/backend-defaults/src/entrypoints/auth/external/ExternalTokenHandler.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/ExternalTokenHandler.ts b/packages/backend-defaults/src/entrypoints/auth/external/ExternalTokenHandler.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/ExternalTokenHandler.ts rename to packages/backend-defaults/src/entrypoints/auth/external/ExternalTokenHandler.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/helpers.test.ts b/packages/backend-defaults/src/entrypoints/auth/external/helpers.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/helpers.test.ts rename to packages/backend-defaults/src/entrypoints/auth/external/helpers.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/helpers.ts b/packages/backend-defaults/src/entrypoints/auth/external/helpers.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/helpers.ts rename to packages/backend-defaults/src/entrypoints/auth/external/helpers.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/jwks.test.ts b/packages/backend-defaults/src/entrypoints/auth/external/jwks.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/jwks.test.ts rename to packages/backend-defaults/src/entrypoints/auth/external/jwks.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/jwks.ts b/packages/backend-defaults/src/entrypoints/auth/external/jwks.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/jwks.ts rename to packages/backend-defaults/src/entrypoints/auth/external/jwks.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/legacy.test.ts b/packages/backend-defaults/src/entrypoints/auth/external/legacy.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/legacy.test.ts rename to packages/backend-defaults/src/entrypoints/auth/external/legacy.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/legacy.ts b/packages/backend-defaults/src/entrypoints/auth/external/legacy.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/legacy.ts rename to packages/backend-defaults/src/entrypoints/auth/external/legacy.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/static.test.ts b/packages/backend-defaults/src/entrypoints/auth/external/static.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/static.test.ts rename to packages/backend-defaults/src/entrypoints/auth/external/static.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/static.ts b/packages/backend-defaults/src/entrypoints/auth/external/static.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/static.ts rename to packages/backend-defaults/src/entrypoints/auth/external/static.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/external/types.ts b/packages/backend-defaults/src/entrypoints/auth/external/types.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/external/types.ts rename to packages/backend-defaults/src/entrypoints/auth/external/types.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/helpers.ts b/packages/backend-defaults/src/entrypoints/auth/helpers.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/helpers.ts rename to packages/backend-defaults/src/entrypoints/auth/helpers.ts diff --git a/packages/backend-defaults/src/entrypoints/auth/index.ts b/packages/backend-defaults/src/entrypoints/auth/index.ts new file mode 100644 index 0000000000..1b55d46a83 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/auth/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { authServiceFactory } from './authServiceFactory'; diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/PluginTokenHandler.test.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/PluginTokenHandler.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/PluginTokenHandler.test.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/PluginTokenHandler.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/PluginTokenHandler.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/PluginTokenHandler.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/PluginTokenHandler.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/PluginTokenHandler.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabaseKeyStore.test.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabaseKeyStore.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabaseKeyStore.test.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabaseKeyStore.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabaseKeyStore.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabaseKeyStore.ts similarity index 98% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabaseKeyStore.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabaseKeyStore.ts index aea126d00a..9f5c278a9c 100644 --- a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabaseKeyStore.ts +++ b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabaseKeyStore.ts @@ -37,8 +37,8 @@ type Row = { export function applyDatabaseMigrations(knex: Knex): Promise { const migrationsDir = resolvePackagePath( - '@backstage/backend-app-api', - 'migrations', + '@backstage/backend-defaults', + 'migrations/auth', ); return knex.migrate.latest({ diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabasePluginKeySource.test.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabasePluginKeySource.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabasePluginKeySource.test.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabasePluginKeySource.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabasePluginKeySource.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabasePluginKeySource.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/DatabasePluginKeySource.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/DatabasePluginKeySource.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/StaticConfigPluginKeySource.test.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/StaticConfigPluginKeySource.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/StaticConfigPluginKeySource.test.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/StaticConfigPluginKeySource.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/StaticConfigPluginKeySource.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/StaticConfigPluginKeySource.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/StaticConfigPluginKeySource.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/StaticConfigPluginKeySource.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/createPluginKeySource.test.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/createPluginKeySource.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/createPluginKeySource.test.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/createPluginKeySource.test.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/createPluginKeySource.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/createPluginKeySource.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/createPluginKeySource.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/createPluginKeySource.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/plugin/keys/types.ts b/packages/backend-defaults/src/entrypoints/auth/plugin/keys/types.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/plugin/keys/types.ts rename to packages/backend-defaults/src/entrypoints/auth/plugin/keys/types.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/types.ts b/packages/backend-defaults/src/entrypoints/auth/types.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/auth/types.ts rename to packages/backend-defaults/src/entrypoints/auth/types.ts diff --git a/packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.test.ts b/packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.test.ts similarity index 99% rename from packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.test.ts rename to packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.test.ts index b0e8418655..76bafb2a8f 100644 --- a/packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.test.ts +++ b/packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.test.ts @@ -346,7 +346,6 @@ describe('UserTokenHandler', () => { header: { typ: 'vnd.backstage.limited-user', alg: 'ES256' }, payload: { sub: 'mock', - ent: ['mock'], iat: 1, exp: 2, }, @@ -384,7 +383,6 @@ describe('UserTokenHandler', () => { new TextEncoder().encode( JSON.stringify({ sub: parts.payload.sub, - ent: parts.payload.ent, iat: parts.payload.iat, exp: parts.payload.exp, }), diff --git a/packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.ts b/packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.ts similarity index 99% rename from packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.ts rename to packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.ts index bd73d8701f..4dd1874843 100644 --- a/packages/backend-app-api/src/services/implementations/auth/user/UserTokenHandler.ts +++ b/packages/backend-defaults/src/entrypoints/auth/user/UserTokenHandler.ts @@ -137,7 +137,6 @@ export class UserTokenHandler { base64url.encode( JSON.stringify({ sub: payload.sub, - ent: payload.ent, iat: payload.iat, exp: payload.exp, }), diff --git a/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts b/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts index 70f952ea46..89fabfe977 100644 --- a/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts +++ b/packages/backend-defaults/src/entrypoints/cache/CacheManager.ts @@ -15,24 +15,16 @@ */ import { - CacheService, CacheServiceOptions, LoggerService, } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import Keyv from 'keyv'; import { DefaultCacheClient } from './CacheClient'; -import { CacheManagerOptions } from './types'; +import { CacheManagerOptions, PluginCacheManager } from './types'; type StoreFactory = (pluginId: string, defaultTtl: number | undefined) => Keyv; -/* - * TODO(freben): This class intentionally inlines the CacheManagerOptions and - * PluginCacheManager types, to not break the api reports in backend-common - * which re-exports it. When backend-common is deprecated, we can stop inlining - * those types. - */ - /** * Implements a Cache Manager which will automatically create new cache clients * for plugins when requested. All requested cache clients are created with the @@ -66,18 +58,7 @@ export class CacheManager { */ static fromConfig( config: Config, - options: { - /** - * An optional logger for use by the PluginCacheManager. - */ - logger?: LoggerService; - - /** - * An optional handler for connection errors emitted from the underlying data - * store. - */ - onError?: (err: Error) => void; - } = {}, + options: CacheManagerOptions = {}, ): CacheManager { // If no `backend.cache` config is provided, instantiate the CacheManager // with an in-memory cache client. @@ -126,9 +107,7 @@ export class CacheManager { * @param pluginId - The plugin that the cache manager should be created for. * Plugin names should be unique. */ - forPlugin(pluginId: string): { - getClient(options?: CacheServiceOptions): CacheService; - } { + forPlugin(pluginId: string): PluginCacheManager { return { getClient: (defaultOptions = {}) => { const clientFactory = (options: CacheServiceOptions) => { diff --git a/packages/backend-defaults/src/entrypoints/cache/cacheServiceFactory.ts b/packages/backend-defaults/src/entrypoints/cache/cacheServiceFactory.ts index f60d770644..f16b306d81 100644 --- a/packages/backend-defaults/src/entrypoints/cache/cacheServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/cache/cacheServiceFactory.ts @@ -21,6 +21,12 @@ import { import { CacheManager } from './CacheManager'; /** + * Key-value store for caching data. + * + * See {@link @backstage/code-plugin-api#CacheService} + * and {@link https://backstage.io/docs/backend-system/core-services/cache | the service docs} + * for more information. + * * @public */ export const cacheServiceFactory = createServiceFactory({ diff --git a/packages/backend-defaults/src/entrypoints/database/databaseServiceFactory.ts b/packages/backend-defaults/src/entrypoints/database/databaseServiceFactory.ts index 0720d05b43..3bdf1790f3 100644 --- a/packages/backend-defaults/src/entrypoints/database/databaseServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/database/databaseServiceFactory.ts @@ -22,6 +22,12 @@ import { ConfigReader } from '@backstage/config'; import { DatabaseManager } from './DatabaseManager'; /** + * Database access and management via `knex`. + * + * See {@link @backstage/code-plugin-api#DatabaseService} + * and {@link https://backstage.io/docs/backend-system/core-services/database | the service docs} + * for more information. + * * @public */ export const databaseServiceFactory = createServiceFactory({ diff --git a/packages/backend-defaults/src/entrypoints/discovery/HostDiscovery.ts b/packages/backend-defaults/src/entrypoints/discovery/HostDiscovery.ts index 180c8706d5..559dda2aa0 100644 --- a/packages/backend-defaults/src/entrypoints/discovery/HostDiscovery.ts +++ b/packages/backend-defaults/src/entrypoints/discovery/HostDiscovery.ts @@ -15,8 +15,8 @@ */ import { Config } from '@backstage/config'; -import { readHttpServerOptions } from '@backstage/backend-app-api'; import { DiscoveryService } from '@backstage/backend-plugin-api'; +import { readHttpServerOptions } from '../rootHttpRouter/http/config'; type Target = string | { internal: string; external: string }; diff --git a/packages/backend-defaults/src/entrypoints/discovery/discoveryServiceFactory.ts b/packages/backend-defaults/src/entrypoints/discovery/discoveryServiceFactory.ts index bfc5a6a489..18ceac4a91 100644 --- a/packages/backend-defaults/src/entrypoints/discovery/discoveryServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/discovery/discoveryServiceFactory.ts @@ -20,7 +20,15 @@ import { } from '@backstage/backend-plugin-api'; import { HostDiscovery } from './HostDiscovery'; -/** @public */ +/** + * Service discovery for inter-plugin communication. + * + * See {@link @backstage/code-plugin-api#DiscoveryService} + * and {@link https://backstage.io/docs/backend-system/core-services/discovery | the service docs} + * for more information. + * + * @public + */ export const discoveryServiceFactory = createServiceFactory({ service: coreServices.discovery, deps: { diff --git a/packages/backend-defaults/src/entrypoints/httpAuth/httpAuthServiceFactory.ts b/packages/backend-defaults/src/entrypoints/httpAuth/httpAuthServiceFactory.ts new file mode 100644 index 0000000000..76550873f6 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/httpAuth/httpAuthServiceFactory.ts @@ -0,0 +1,294 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + AuthService, + BackstageCredentials, + BackstagePrincipalTypes, + BackstageUserPrincipal, + DiscoveryService, + HttpAuthService, + coreServices, + createServiceFactory, +} from '@backstage/backend-plugin-api'; +import { AuthenticationError, NotAllowedError } from '@backstage/errors'; +import { parse as parseCookie } from 'cookie'; +import { Request, Response } from 'express'; + +const FIVE_MINUTES_MS = 5 * 60 * 1000; + +const BACKSTAGE_AUTH_COOKIE = 'backstage-auth'; + +function getTokenFromRequest(req: Request) { + // TODO: support multiple auth headers (iterate rawHeaders) + const authHeader = req.headers.authorization; + if (typeof authHeader === 'string') { + const matches = authHeader.match(/^Bearer[ ]+(\S+)$/i); + const token = matches?.[1]; + if (token) { + return token; + } + } + + return undefined; +} + +function getCookieFromRequest(req: Request) { + const cookieHeader = req.headers.cookie; + if (cookieHeader) { + const cookies = parseCookie(cookieHeader); + const token = cookies[BACKSTAGE_AUTH_COOKIE]; + if (token) { + return token; + } + } + + return undefined; +} + +function willExpireSoon(expiresAt: Date) { + return Date.now() + FIVE_MINUTES_MS > expiresAt.getTime(); +} + +const credentialsSymbol = Symbol('backstage-credentials'); +const limitedCredentialsSymbol = Symbol('backstage-limited-credentials'); + +type RequestWithCredentials = Request & { + [credentialsSymbol]?: Promise; + [limitedCredentialsSymbol]?: Promise; +}; + +class DefaultHttpAuthService implements HttpAuthService { + readonly #auth: AuthService; + readonly #discovery: DiscoveryService; + readonly #pluginId: string; + + constructor( + auth: AuthService, + discovery: DiscoveryService, + pluginId: string, + ) { + this.#auth = auth; + this.#discovery = discovery; + this.#pluginId = pluginId; + } + + async #extractCredentialsFromRequest(req: Request) { + const token = getTokenFromRequest(req); + if (!token) { + return await this.#auth.getNoneCredentials(); + } + + return await this.#auth.authenticate(token); + } + + async #extractLimitedCredentialsFromRequest(req: Request) { + const token = getTokenFromRequest(req); + if (token) { + return await this.#auth.authenticate(token, { + allowLimitedAccess: true, + }); + } + + const cookie = getCookieFromRequest(req); + if (cookie) { + return await this.#auth.authenticate(cookie, { + allowLimitedAccess: true, + }); + } + + return await this.#auth.getNoneCredentials(); + } + + async #getCredentials(req: RequestWithCredentials) { + return (req[credentialsSymbol] ??= + this.#extractCredentialsFromRequest(req)); + } + + async #getLimitedCredentials(req: RequestWithCredentials) { + return (req[limitedCredentialsSymbol] ??= + this.#extractLimitedCredentialsFromRequest(req)); + } + + async credentials( + req: Request, + options?: { + allow?: Array; + allowLimitedAccess?: boolean; + }, + ): Promise> { + // Limited and full credentials are treated as two separate cases, this lets + // us avoid internal dependencies between the AuthService and + // HttpAuthService implementations + const credentials = options?.allowLimitedAccess + ? await this.#getLimitedCredentials(req) + : await this.#getCredentials(req); + + const allowed = options?.allow; + if (!allowed) { + return credentials as any; + } + + if (this.#auth.isPrincipal(credentials, 'none')) { + if (allowed.includes('none' as TAllowed)) { + return credentials as any; + } + + throw new AuthenticationError('Missing credentials'); + } else if (this.#auth.isPrincipal(credentials, 'user')) { + if (allowed.includes('user' as TAllowed)) { + return credentials as any; + } + + throw new NotAllowedError( + `This endpoint does not allow 'user' credentials`, + ); + } else if (this.#auth.isPrincipal(credentials, 'service')) { + if (allowed.includes('service' as TAllowed)) { + return credentials as any; + } + + throw new NotAllowedError( + `This endpoint does not allow 'service' credentials`, + ); + } + + throw new NotAllowedError( + 'Unknown principal type, this should never happen', + ); + } + + async issueUserCookie( + res: Response, + options?: { credentials?: BackstageCredentials }, + ): Promise<{ expiresAt: Date }> { + if (res.headersSent) { + throw new Error('Failed to issue user cookie, headers were already sent'); + } + + let credentials: BackstageCredentials; + if (options?.credentials) { + if (this.#auth.isPrincipal(options.credentials, 'none')) { + res.clearCookie( + BACKSTAGE_AUTH_COOKIE, + await this.#getCookieOptions(res.req), + ); + return { expiresAt: new Date() }; + } + if (!this.#auth.isPrincipal(options.credentials, 'user')) { + throw new AuthenticationError( + 'Refused to issue cookie for non-user principal', + ); + } + credentials = options.credentials; + } else { + credentials = await this.credentials(res.req, { allow: ['user'] }); + } + + const existingExpiresAt = await this.#existingCookieExpiration(res.req); + if (existingExpiresAt && !willExpireSoon(existingExpiresAt)) { + return { expiresAt: existingExpiresAt }; + } + + const { token, expiresAt } = await this.#auth.getLimitedUserToken( + credentials, + ); + if (!token) { + throw new Error('User credentials is unexpectedly missing token'); + } + + res.cookie(BACKSTAGE_AUTH_COOKIE, token, { + ...(await this.#getCookieOptions(res.req)), + expires: expiresAt, + }); + + return { expiresAt }; + } + + async #getCookieOptions(_req: Request): Promise<{ + domain: string; + httpOnly: true; + secure: boolean; + priority: 'high'; + sameSite: 'none' | 'lax'; + }> { + // TODO: eventually we should read from `${req.protocol}://${req.hostname}` + // once https://github.com/backstage/backstage/issues/24169 has landed + const externalBaseUrlStr = await this.#discovery.getExternalBaseUrl( + this.#pluginId, + ); + const externalBaseUrl = new URL(externalBaseUrlStr); + + const secure = + externalBaseUrl.protocol === 'https:' || + externalBaseUrl.hostname === 'localhost'; + + return { + domain: externalBaseUrl.hostname, + httpOnly: true, + secure, + priority: 'high', + sameSite: secure ? 'none' : 'lax', + }; + } + + async #existingCookieExpiration(req: Request): Promise { + const existingCookie = getCookieFromRequest(req); + if (!existingCookie) { + return undefined; + } + + try { + const existingCredentials = await this.#auth.authenticate( + existingCookie, + { + allowLimitedAccess: true, + }, + ); + if (!this.#auth.isPrincipal(existingCredentials, 'user')) { + return undefined; + } + + return existingCredentials.expiresAt; + } catch (error) { + if (error.name === 'AuthenticationError') { + return undefined; + } + throw error; + } + } +} + +/** + * Authentication of HTTP requests. + * + * See {@link @backstage/code-plugin-api#HttpAuthService} + * and {@link https://backstage.io/docs/backend-system/core-services/http-auth | the service docs} + * for more information. + * + * @public + */ +export const httpAuthServiceFactory = createServiceFactory({ + service: coreServices.httpAuth, + deps: { + auth: coreServices.auth, + discovery: coreServices.discovery, + plugin: coreServices.pluginMetadata, + }, + async factory({ auth, discovery, plugin }) { + return new DefaultHttpAuthService(auth, discovery, plugin.getId()); + }, +}); diff --git a/packages/backend-defaults/src/entrypoints/httpAuth/index.ts b/packages/backend-defaults/src/entrypoints/httpAuth/index.ts new file mode 100644 index 0000000000..edd7e53026 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/httpAuth/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { httpAuthServiceFactory } from './httpAuthServiceFactory'; diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createAuthIntegrationRouter.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createAuthIntegrationRouter.ts similarity index 99% rename from packages/backend-app-api/src/services/implementations/httpRouter/createAuthIntegrationRouter.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createAuthIntegrationRouter.ts index 94650199f3..ef36e7ba2d 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/createAuthIntegrationRouter.ts +++ b/packages/backend-defaults/src/entrypoints/httpRouter/createAuthIntegrationRouter.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { AuthService } from '@backstage/backend-plugin-api'; import express from 'express'; import Router from 'express-promise-router'; diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createCookieAuthRefreshMiddleware.test.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createCookieAuthRefreshMiddleware.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/httpRouter/createCookieAuthRefreshMiddleware.test.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createCookieAuthRefreshMiddleware.test.ts diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createCookieAuthRefreshMiddleware.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createCookieAuthRefreshMiddleware.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/httpRouter/createCookieAuthRefreshMiddleware.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createCookieAuthRefreshMiddleware.ts diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createCredentialsBarrier.test.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createCredentialsBarrier.test.ts similarity index 98% rename from packages/backend-app-api/src/services/implementations/httpRouter/createCredentialsBarrier.test.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createCredentialsBarrier.test.ts index a5246c91b2..124acf277b 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/createCredentialsBarrier.test.ts +++ b/packages/backend-defaults/src/entrypoints/httpRouter/createCredentialsBarrier.test.ts @@ -20,7 +20,7 @@ import express from 'express'; import request from 'supertest'; import { createCredentialsBarrier } from './createCredentialsBarrier'; import { mockCredentials, mockServices } from '@backstage/backend-test-utils'; -import { MiddlewareFactory } from '../../../http'; +import { MiddlewareFactory } from '../rootHttpRouter/http'; const errorMiddleware = MiddlewareFactory.create({ config: mockServices.rootConfig(), diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createCredentialsBarrier.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createCredentialsBarrier.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/httpRouter/createCredentialsBarrier.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createCredentialsBarrier.ts diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.test.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/httpRouter/createLifecycleMiddleware.test.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware.test.ts diff --git a/packages/backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware.ts b/packages/backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware.ts new file mode 100644 index 0000000000..3f8ee3ea69 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/httpRouter/createLifecycleMiddleware.ts @@ -0,0 +1,106 @@ +/* + * 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 { LifecycleService } from '@backstage/backend-plugin-api'; +import { ServiceUnavailableError } from '@backstage/errors'; +import { HumanDuration, durationToMilliseconds } from '@backstage/types'; +import { RequestHandler } from 'express'; + +export const DEFAULT_TIMEOUT = { seconds: 5 }; + +/** + * Options for {@link createLifecycleMiddleware}. + * @public + */ +export interface LifecycleMiddlewareOptions { + lifecycle: LifecycleService; + /** + * The maximum time that paused requests will wait for the service to start, before returning an error. + * + * Defaults to 5 seconds. + */ + startupRequestPauseTimeout?: HumanDuration; +} + +/** + * Creates a middleware that pauses requests until the service has started. + * + * @remarks + * + * Requests that arrive before the service has started will be paused until startup is complete. + * If the service does not start within the provided timeout, the request will be rejected with a + * {@link @backstage/errors#ServiceUnavailableError}. + * + * If the service is shutting down, all requests will be rejected with a + * {@link @backstage/errors#ServiceUnavailableError}. + * + * @public + */ +export function createLifecycleMiddleware( + options: LifecycleMiddlewareOptions, +): RequestHandler { + const { lifecycle, startupRequestPauseTimeout = DEFAULT_TIMEOUT } = options; + + let state: 'init' | 'up' | 'down' = 'init'; + const waiting = new Set<{ + next: (err?: Error) => void; + timeout: NodeJS.Timeout; + }>(); + + lifecycle.addStartupHook(async () => { + if (state === 'init') { + state = 'up'; + for (const item of waiting) { + clearTimeout(item.timeout); + item.next(); + } + waiting.clear(); + } + }); + + lifecycle.addShutdownHook(async () => { + state = 'down'; + + for (const item of waiting) { + clearTimeout(item.timeout); + item.next(new ServiceUnavailableError('Service is shutting down')); + } + waiting.clear(); + }); + + const timeoutMs = durationToMilliseconds(startupRequestPauseTimeout); + + return (_req, _res, next) => { + if (state === 'up') { + next(); + return; + } else if (state === 'down') { + next(new ServiceUnavailableError('Service is shutting down')); + return; + } + + const item = { + next, + timeout: setTimeout(() => { + if (waiting.delete(item)) { + next(new ServiceUnavailableError('Service has not started up yet')); + } + }, timeoutMs), + }; + + waiting.add(item); + }; +} diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.test.ts b/packages/backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory.test.ts similarity index 100% rename from packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.test.ts rename to packages/backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory.test.ts diff --git a/packages/backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory.ts b/packages/backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory.ts new file mode 100644 index 0000000000..4a0dec49e6 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/httpRouter/httpRouterServiceFactory.ts @@ -0,0 +1,101 @@ +/* + * 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 { Handler } from 'express'; +import PromiseRouter from 'express-promise-router'; +import { + coreServices, + createServiceFactory, + HttpRouterServiceAuthPolicy, +} from '@backstage/backend-plugin-api'; +import { createLifecycleMiddleware } from './createLifecycleMiddleware'; +import { createCredentialsBarrier } from './createCredentialsBarrier'; +import { createAuthIntegrationRouter } from './createAuthIntegrationRouter'; +import { createCookieAuthRefreshMiddleware } from './createCookieAuthRefreshMiddleware'; + +/** + * @public + */ +export interface HttpRouterFactoryOptions { + /** + * A callback used to generate the path for each plugin, defaults to `/api/{pluginId}`. + */ + getPath?(pluginId: string): string; +} + +/** + * HTTP route registration for plugins. + * + * See {@link @backstage/code-plugin-api#HttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/http-router | the service docs} + * for more information. + * + * @public + */ +export const httpRouterServiceFactory = createServiceFactory( + (options?: HttpRouterFactoryOptions) => ({ + service: coreServices.httpRouter, + initialization: 'always', + deps: { + plugin: coreServices.pluginMetadata, + config: coreServices.rootConfig, + logger: coreServices.logger, + lifecycle: coreServices.lifecycle, + rootHttpRouter: coreServices.rootHttpRouter, + auth: coreServices.auth, + httpAuth: coreServices.httpAuth, + }, + async factory({ + auth, + httpAuth, + config, + logger, + plugin, + rootHttpRouter, + lifecycle, + }) { + if (options?.getPath) { + logger.warn( + `DEPRECATION WARNING: The 'getPath' option for HttpRouterService is deprecated. The ability to reconfigure the '/api/' path prefix for plugins will be removed in the future.`, + ); + } + const getPath = options?.getPath ?? (id => `/api/${id}`); + const path = getPath(plugin.getId()); + + const router = PromiseRouter(); + rootHttpRouter.use(path, router); + + const credentialsBarrier = createCredentialsBarrier({ + httpAuth, + config, + }); + + router.use(createAuthIntegrationRouter({ auth })); + router.use(createLifecycleMiddleware({ lifecycle })); + router.use(credentialsBarrier.middleware); + router.use(createCookieAuthRefreshMiddleware({ auth, httpAuth })); + + return { + use(handler: Handler): void { + router.use(handler); + }, + addAuthPolicy(policy: HttpRouterServiceAuthPolicy): void { + credentialsBarrier.addAuthPolicy(policy); + }, + }; + }, + }), +); diff --git a/packages/backend-defaults/src/entrypoints/httpRouter/index.ts b/packages/backend-defaults/src/entrypoints/httpRouter/index.ts new file mode 100644 index 0000000000..928a232131 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/httpRouter/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { httpRouterServiceFactory } from './httpRouterServiceFactory'; +export type { HttpRouterFactoryOptions } from './httpRouterServiceFactory'; +export { createLifecycleMiddleware } from './createLifecycleMiddleware'; +export type { LifecycleMiddlewareOptions } from './createLifecycleMiddleware'; diff --git a/packages/backend-defaults/src/entrypoints/lifecycle/lifecycleServiceFactory.ts b/packages/backend-defaults/src/entrypoints/lifecycle/lifecycleServiceFactory.ts index 3eb43d6c6e..192886ca61 100644 --- a/packages/backend-defaults/src/entrypoints/lifecycle/lifecycleServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/lifecycle/lifecycleServiceFactory.ts @@ -85,7 +85,11 @@ export class BackendPluginLifecycleImpl implements LifecycleService { } /** - * Allows plugins to register shutdown hooks that are run when the process is about to exit. + * Registration of plugin startup and shutdown lifecycle hooks. + * + * See {@link @backstage/code-plugin-api#LifecycleService} + * and {@link https://backstage.io/docs/backend-system/core-services/lifecycle | the service docs} + * for more information. * * @public */ diff --git a/packages/backend-defaults/src/entrypoints/logger/index.ts b/packages/backend-defaults/src/entrypoints/logger/index.ts new file mode 100644 index 0000000000..ca52bf5193 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/logger/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { loggerServiceFactory } from './loggerServiceFactory'; diff --git a/packages/backend-defaults/src/entrypoints/logger/loggerServiceFactory.ts b/packages/backend-defaults/src/entrypoints/logger/loggerServiceFactory.ts new file mode 100644 index 0000000000..4eff798e11 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/logger/loggerServiceFactory.ts @@ -0,0 +1,40 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + createServiceFactory, + coreServices, +} from '@backstage/backend-plugin-api'; + +/** + * Plugin-level logging. + * + * See {@link @backstage/code-plugin-api#LoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/logger | the service docs} + * for more information. + * + * @public + */ +export const loggerServiceFactory = createServiceFactory({ + service: coreServices.logger, + deps: { + rootLogger: coreServices.rootLogger, + plugin: coreServices.pluginMetadata, + }, + factory({ rootLogger, plugin }) { + return rootLogger.child({ plugin: plugin.getId() }); + }, +}); diff --git a/packages/backend-defaults/src/entrypoints/permissions/permissionsServiceFactory.ts b/packages/backend-defaults/src/entrypoints/permissions/permissionsServiceFactory.ts index f675dd6719..873d6a4fa0 100644 --- a/packages/backend-defaults/src/entrypoints/permissions/permissionsServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/permissions/permissionsServiceFactory.ts @@ -21,6 +21,12 @@ import { import { ServerPermissionClient } from '@backstage/plugin-permission-node'; /** + * Permission system integration for authorization of user actions. + * + * See {@link @backstage/code-plugin-api#PermissionsService} + * and {@link https://backstage.io/docs/backend-system/core-services/permissions | the service docs} + * for more information. + * * @public */ export const permissionsServiceFactory = createServiceFactory({ diff --git a/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.test.ts b/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.test.ts new file mode 100644 index 0000000000..1efb12ad03 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.test.ts @@ -0,0 +1,74 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { loadConfigSchema } from '@backstage/config-loader'; +import { createConfigSecretEnumerator } from './createConfigSecretEnumerator'; +import { mockServices } from '@backstage/backend-test-utils'; + +describe('createConfigSecretEnumerator', () => { + it('should enumerate secrets', async () => { + const logger = mockServices.logger.mock(); + + const enumerate = await createConfigSecretEnumerator({ + logger, + }); + const secrets = enumerate( + mockServices.rootConfig({ + data: { + backend: { auth: { keys: [{ secret: 'my-secret-password' }] } }, + }, + }), + ); + expect(Array.from(secrets)).toEqual(['my-secret-password']); + }, 20_000); // Bit higher timeout since we're loading all config schemas in the repo + + it('should enumerate secrets with explicit schema', async () => { + const logger = mockServices.logger.mock(); + + const enumerate = await createConfigSecretEnumerator({ + logger, + schema: await loadConfigSchema({ + serialized: { + schemas: [ + { + value: { + type: 'object', + properties: { + secret: { + visibility: 'secret', + type: 'string', + }, + }, + }, + path: '/mock', + }, + ], + backstageConfigSchemaVersion: 1, + }, + }), + }); + + const secrets = enumerate( + mockServices.rootConfig({ + data: { + secret: 'my-secret', + other: 'not-secret', + }, + }), + ); + expect(Array.from(secrets)).toEqual(['my-secret']); + }); +}); diff --git a/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.ts b/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.ts new file mode 100644 index 0000000000..421b07c396 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootConfig/createConfigSecretEnumerator.ts @@ -0,0 +1,54 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LoggerService } from '@backstage/backend-plugin-api'; +import type { Config } from '@backstage/config'; +import { ConfigSchema, loadConfigSchema } from '@backstage/config-loader'; +import { getPackages } from '@manypkg/get-packages'; + +/** @public */ +export async function createConfigSecretEnumerator(options: { + logger: LoggerService; + dir?: string; + schema?: ConfigSchema; +}): Promise<(config: Config) => Iterable> { + const { logger, dir = process.cwd() } = options; + const { packages } = await getPackages(dir); + const schema = + options.schema ?? + (await loadConfigSchema({ + dependencies: packages.map(p => p.packageJson.name), + })); + + return (config: Config) => { + const [secretsData] = schema.process( + [{ data: config.getOptional() ?? {}, context: 'schema-enumerator' }], + { + visibility: ['secret'], + ignoreSchemaErrors: true, + }, + ); + const secrets = new Set(); + JSON.parse( + JSON.stringify(secretsData.data), + (_, v) => typeof v === 'string' && secrets.add(v), + ); + logger.info( + `Found ${secrets.size} new secrets in config that will be redacted`, + ); + return secrets; + }; +} diff --git a/packages/backend-defaults/src/entrypoints/rootConfig/index.ts b/packages/backend-defaults/src/entrypoints/rootConfig/index.ts index 1775ef2efc..66f5e8e15f 100644 --- a/packages/backend-defaults/src/entrypoints/rootConfig/index.ts +++ b/packages/backend-defaults/src/entrypoints/rootConfig/index.ts @@ -14,5 +14,8 @@ * limitations under the License. */ -export { rootConfigServiceFactory } from './rootConfigServiceFactory'; -export type { RootConfigFactoryOptions } from './rootConfigServiceFactory'; +export { createConfigSecretEnumerator } from './createConfigSecretEnumerator'; +export { + rootConfigServiceFactory, + type RootConfigFactoryOptions, +} from './rootConfigServiceFactory'; diff --git a/packages/backend-defaults/src/entrypoints/rootConfig/rootConfigServiceFactory.ts b/packages/backend-defaults/src/entrypoints/rootConfig/rootConfigServiceFactory.ts index 92d1a89c0f..5752a9c634 100644 --- a/packages/backend-defaults/src/entrypoints/rootConfig/rootConfigServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/rootConfig/rootConfigServiceFactory.ts @@ -24,6 +24,12 @@ import { } from '@backstage/config-loader'; /** + * Access to static configuration. + * + * See {@link @backstage/code-plugin-api#RootConfigService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-config | the service docs} + * for more information. + * * @public */ export interface RootConfigFactoryOptions { diff --git a/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.test.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.test.ts new file mode 100644 index 0000000000..fc1de9b205 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.test.ts @@ -0,0 +1,124 @@ +/* + * 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 express from 'express'; +import request from 'supertest'; +import { DefaultRootHttpRouter } from './DefaultRootHttpRouter'; + +describe('DefaultRootHttpRouter', () => { + it.each([ + [['/b'], '/a'], + [['/a'], '/aa/b'], + [['/aa'], '/a/b'], + [['/a/b'], '/aa'], + [['/b/a'], '/a'], + [['/a'], '/aa'], + ])(`with existing paths %s, adds %s without conflict`, (existing, added) => { + const router = DefaultRootHttpRouter.create(); + for (const path of existing) { + router.use(path, () => {}); + } + expect(() => router.use(added, () => {})).not.toThrow(); + }); + + it.each([ + [['/a'], '/a', '/a'], + [['/a'], '/a/b', '/a'], + [['/a/b'], '/a', '/a/b'], + ])( + `find conflict when existing paths %s, adds %s`, + (existing, added, conflict) => { + const router = DefaultRootHttpRouter.create(); + for (const path of existing) { + router.use(path, () => {}); + } + expect(() => router.use(added, () => {})).toThrow( + `Path ${added} conflicts with the existing path ${conflict}`, + ); + }, + ); + + it('should not be possible to supply an empty indexPath', () => { + expect(() => DefaultRootHttpRouter.create({ indexPath: '' })).toThrow( + 'indexPath option may not be an empty string', + ); + }); + + it('will always prioritize non-index paths', async () => { + const router = DefaultRootHttpRouter.create({ indexPath: '/x' }); + const app = express(); + app.use(router.handler()); + + const routerX = express.Router(); + routerX.get('/a', (_req, res) => res.status(201).end()); + + const routerY = express.Router(); + routerY.get('/a', (_req, res) => res.status(202).end()); + + await request(app).get('/').expect(404); + await request(app).get('/a').expect(404); + await request(app).get('/x/a').expect(404); + await request(app).get('/y/a').expect(404); + + router.use('/x', routerX); + + await request(app).get('/').expect(404); + await request(app).get('/a').expect(201); + await request(app).get('/x/a').expect(201); + await request(app).get('/y/a').expect(404); + + router.use('/y', routerY); + + await request(app).get('/').expect(404); + await request(app).get('/a').expect(201); + await request(app).get('/x/a').expect(201); + await request(app).get('/y/a').expect(202); + + expect('test').toBe('test'); + }); + + it('should treat unknown /api/ routes as 404', async () => { + const router = DefaultRootHttpRouter.create(); + const app = express(); + app.use(router.handler()); + + router.use('/api/app', (_req, res) => res.status(201).end()); + router.use('/api/catalog', (_req, res) => res.status(202).end()); + + await request(app).get('/').expect(201); + await request(app).get('/api/catalog').expect(202); + await request(app).get('/unknown').expect(201); + await request(app).get('/api/unknown').expect(404); + + expect('test').toBe('test'); + }); + + it('should treat unknown /api/ routes as 404 without an index path', async () => { + const router = DefaultRootHttpRouter.create({ indexPath: false }); + const app = express(); + app.use(router.handler()); + + router.use('/api/app', (_req, res) => res.status(201).end()); + router.use('/api/catalog', (_req, res) => res.status(202).end()); + + await request(app).get('/').expect(404); + await request(app).get('/api/catalog').expect(202); + await request(app).get('/unknown').expect(404); + await request(app).get('/api/unknown').expect(404); + + expect('test').toBe('test'); + }); +}); diff --git a/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.ts new file mode 100644 index 0000000000..9d7d1de120 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootHttpRouter/DefaultRootHttpRouter.ts @@ -0,0 +1,115 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { RootHttpRouterService } from '@backstage/backend-plugin-api'; +import { Handler, Router } from 'express'; +import trimEnd from 'lodash/trimEnd'; + +function normalizePath(path: string): string { + return `${trimEnd(path, '/')}/`; +} + +/** + * Options for the {@link DefaultRootHttpRouter} class. + * + * @public + */ +export interface DefaultRootHttpRouterOptions { + /** + * The path to forward all unmatched requests to. Defaults to '/api/app' if + * not given. Disables index path behavior if false is given. + */ + indexPath?: string | false; +} + +/** + * The default implementation of the {@link @backstage/backend-plugin-api#RootHttpRouterService} interface for + * {@link @backstage/backend-plugin-api#coreServices.rootHttpRouter}. + * + * @public + */ +export class DefaultRootHttpRouter implements RootHttpRouterService { + #indexPath?: string; + + #router = Router(); + #namedRoutes = Router(); + #indexRouter = Router(); + #existingPaths = new Array(); + + static create(options?: DefaultRootHttpRouterOptions) { + let indexPath; + if (options?.indexPath === false) { + indexPath = undefined; + } else if (options?.indexPath === undefined) { + indexPath = '/api/app'; + } else if (options?.indexPath === '') { + throw new Error('indexPath option may not be an empty string'); + } else { + indexPath = options.indexPath; + } + return new DefaultRootHttpRouter(indexPath); + } + + private constructor(indexPath?: string) { + this.#indexPath = indexPath; + this.#router.use(this.#namedRoutes); + + // Any request with a /api/ prefix will skip the index router, even if no named router matches + this.#router.use('/api/', (_req, _res, next) => { + next('router'); + }); + + if (this.#indexPath) { + this.#router.use(this.#indexRouter); + } + } + + use(path: string, handler: Handler) { + if (path.match(/^[/\s]*$/)) { + throw new Error(`Root router path may not be empty`); + } + const conflictingPath = this.#findConflictingPath(path); + if (conflictingPath) { + throw new Error( + `Path ${path} conflicts with the existing path ${conflictingPath}`, + ); + } + this.#existingPaths.push(path); + this.#namedRoutes.use(path, handler); + + if (this.#indexPath === path) { + this.#indexRouter.use(handler); + } + } + + handler(): Handler { + return this.#router; + } + + #findConflictingPath(newPath: string): string | undefined { + const normalizedNewPath = normalizePath(newPath); + for (const path of this.#existingPaths) { + const normalizedPath = normalizePath(path); + if (normalizedPath.startsWith(normalizedNewPath)) { + return path; + } + if (normalizedNewPath.startsWith(normalizedPath)) { + return path; + } + } + return undefined; + } +} diff --git a/packages/backend-app-api/src/http/MiddlewareFactory.test.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory.test.ts similarity index 100% rename from packages/backend-app-api/src/http/MiddlewareFactory.test.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory.test.ts diff --git a/packages/backend-app-api/src/http/MiddlewareFactory.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory.ts similarity index 100% rename from packages/backend-app-api/src/http/MiddlewareFactory.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/MiddlewareFactory.ts diff --git a/packages/backend-app-api/src/http/applyInternalErrorFilter.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/applyInternalErrorFilter.ts similarity index 100% rename from packages/backend-app-api/src/http/applyInternalErrorFilter.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/applyInternalErrorFilter.ts diff --git a/packages/backend-app-api/src/http/config.test.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/config.test.ts similarity index 100% rename from packages/backend-app-api/src/http/config.test.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/config.test.ts diff --git a/packages/backend-app-api/src/http/config.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/config.ts similarity index 100% rename from packages/backend-app-api/src/http/config.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/config.ts diff --git a/packages/backend-app-api/src/http/createHttpServer.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/createHttpServer.ts similarity index 100% rename from packages/backend-app-api/src/http/createHttpServer.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/createHttpServer.ts diff --git a/packages/backend-app-api/src/http/getGeneratedCertificate.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/getGeneratedCertificate.ts similarity index 100% rename from packages/backend-app-api/src/http/getGeneratedCertificate.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/getGeneratedCertificate.ts diff --git a/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/index.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/index.ts new file mode 100644 index 0000000000..4a9ec14cf8 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/index.ts @@ -0,0 +1,30 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { readHttpServerOptions } from './config'; +export { createHttpServer } from './createHttpServer'; +export { MiddlewareFactory } from './MiddlewareFactory'; +export type { + MiddlewareFactoryErrorOptions, + MiddlewareFactoryOptions, +} from './MiddlewareFactory'; +export { readCorsOptions } from './readCorsOptions'; +export { readHelmetOptions } from './readHelmetOptions'; +export type { + ExtendedHttpServer, + HttpServerCertificateOptions, + HttpServerOptions, +} from './types'; diff --git a/packages/backend-app-api/src/http/readCorsOptions.test.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readCorsOptions.test.ts similarity index 100% rename from packages/backend-app-api/src/http/readCorsOptions.test.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readCorsOptions.test.ts diff --git a/packages/backend-app-api/src/http/readCorsOptions.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readCorsOptions.ts similarity index 100% rename from packages/backend-app-api/src/http/readCorsOptions.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readCorsOptions.ts diff --git a/packages/backend-app-api/src/http/readHelmetOptions.test.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readHelmetOptions.test.ts similarity index 100% rename from packages/backend-app-api/src/http/readHelmetOptions.test.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readHelmetOptions.test.ts diff --git a/packages/backend-app-api/src/http/readHelmetOptions.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readHelmetOptions.ts similarity index 100% rename from packages/backend-app-api/src/http/readHelmetOptions.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/readHelmetOptions.ts diff --git a/packages/backend-app-api/src/http/types.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/http/types.ts similarity index 100% rename from packages/backend-app-api/src/http/types.ts rename to packages/backend-defaults/src/entrypoints/rootHttpRouter/http/types.ts diff --git a/packages/backend-defaults/src/entrypoints/rootHttpRouter/index.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/index.ts new file mode 100644 index 0000000000..9c2d96dab2 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootHttpRouter/index.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { + DefaultRootHttpRouter, + type DefaultRootHttpRouterOptions, +} from './DefaultRootHttpRouter'; +export * from './http'; +export { + rootHttpRouterServiceFactory, + type RootHttpRouterConfigureContext, + type RootHttpRouterFactoryOptions, +} from './rootHttpRouterServiceFactory'; diff --git a/packages/backend-defaults/src/entrypoints/rootHttpRouter/rootHttpRouterServiceFactory.ts b/packages/backend-defaults/src/entrypoints/rootHttpRouter/rootHttpRouterServiceFactory.ts new file mode 100644 index 0000000000..ea3dc42eb7 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootHttpRouter/rootHttpRouterServiceFactory.ts @@ -0,0 +1,119 @@ +/* + * 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 { + RootConfigService, + coreServices, + createServiceFactory, + LifecycleService, + LoggerService, +} from '@backstage/backend-plugin-api'; +import express, { RequestHandler, Express } from 'express'; +import type { Server } from 'node:http'; +import { + createHttpServer, + MiddlewareFactory, + readHttpServerOptions, +} from './http'; +import { DefaultRootHttpRouter } from './DefaultRootHttpRouter'; + +/** + * @public + */ +export interface RootHttpRouterConfigureContext { + app: Express; + server: Server; + middleware: MiddlewareFactory; + routes: RequestHandler; + config: RootConfigService; + logger: LoggerService; + lifecycle: LifecycleService; + applyDefaults: () => void; +} + +/** + * HTTP route registration for root services. + * + * See {@link @backstage/code-plugin-api#RootHttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-http-router | the service docs} + * for more information. + * + * @public + */ +export type RootHttpRouterFactoryOptions = { + /** + * The path to forward all unmatched requests to. Defaults to '/api/app' if + * not given. Disables index path behavior if false is given. + */ + indexPath?: string | false; + + configure?(context: RootHttpRouterConfigureContext): void; +}; + +function defaultConfigure({ applyDefaults }: RootHttpRouterConfigureContext) { + applyDefaults(); +} + +/** @public */ +export const rootHttpRouterServiceFactory = createServiceFactory( + (options?: RootHttpRouterFactoryOptions) => ({ + service: coreServices.rootHttpRouter, + deps: { + config: coreServices.rootConfig, + rootLogger: coreServices.rootLogger, + lifecycle: coreServices.rootLifecycle, + }, + async factory({ config, rootLogger, lifecycle }) { + const { indexPath, configure = defaultConfigure } = options ?? {}; + const logger = rootLogger.child({ service: 'rootHttpRouter' }); + const app = express(); + + const router = DefaultRootHttpRouter.create({ indexPath }); + const middleware = MiddlewareFactory.create({ config, logger }); + const routes = router.handler(); + const server = await createHttpServer( + app, + readHttpServerOptions(config.getOptionalConfig('backend')), + { logger }, + ); + + configure({ + app, + server, + routes, + middleware, + config, + logger, + lifecycle, + applyDefaults() { + app.use(middleware.helmet()); + app.use(middleware.cors()); + app.use(middleware.compression()); + app.use(middleware.logging()); + app.use(routes); + app.use(middleware.notFound()); + app.use(middleware.error()); + }, + }); + + lifecycle.addShutdownHook(() => server.stop()); + + await server.start(); + + return router; + }, + }), +); diff --git a/packages/backend-defaults/src/entrypoints/rootLifecycle/rootLifecycleServiceFactory.ts b/packages/backend-defaults/src/entrypoints/rootLifecycle/rootLifecycleServiceFactory.ts index 197f99b97a..e724c2f5cb 100644 --- a/packages/backend-defaults/src/entrypoints/rootLifecycle/rootLifecycleServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/rootLifecycle/rootLifecycleServiceFactory.ts @@ -105,7 +105,11 @@ export class BackendLifecycleImpl implements RootLifecycleService { } /** - * Allows plugins to register shutdown hooks that are run when the process is about to exit. + * Registration of backend startup and shutdown lifecycle hooks. + * + * See {@link @backstage/code-plugin-api#RootLifecycleService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-lifecycle | the service docs} + * for more information. * * @public */ diff --git a/packages/backend-app-api/src/logging/WinstonLogger.test.ts b/packages/backend-defaults/src/entrypoints/rootLogger/WinstonLogger.test.ts similarity index 100% rename from packages/backend-app-api/src/logging/WinstonLogger.test.ts rename to packages/backend-defaults/src/entrypoints/rootLogger/WinstonLogger.test.ts diff --git a/packages/backend-defaults/src/entrypoints/rootLogger/WinstonLogger.ts b/packages/backend-defaults/src/entrypoints/rootLogger/WinstonLogger.ts new file mode 100644 index 0000000000..38d05f6511 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootLogger/WinstonLogger.ts @@ -0,0 +1,192 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + LoggerService, + RootLoggerService, +} from '@backstage/backend-plugin-api'; +import { JsonObject } from '@backstage/types'; +import { Format, TransformableInfo } from 'logform'; +import { + Logger, + format, + createLogger, + transports, + transport as Transport, +} from 'winston'; +import { MESSAGE } from 'triple-beam'; +import { escapeRegExp } from '../../lib/escapeRegExp'; + +/** + * @public + */ +export interface WinstonLoggerOptions { + meta?: JsonObject; + level?: string; + format?: Format; + transports?: Transport[]; +} + +/** + * A {@link @backstage/backend-plugin-api#LoggerService} implementation based on winston. + * + * @public + */ +export class WinstonLogger implements RootLoggerService { + #winston: Logger; + #addRedactions?: (redactions: Iterable) => void; + + /** + * Creates a {@link WinstonLogger} instance. + */ + static create(options: WinstonLoggerOptions): WinstonLogger { + const redacter = WinstonLogger.redacter(); + const defaultFormatter = + process.env.NODE_ENV === 'production' + ? format.json() + : WinstonLogger.colorFormat(); + + let logger = createLogger({ + level: process.env.LOG_LEVEL || options.level || 'info', + format: format.combine( + options.format ?? defaultFormatter, + redacter.format, + ), + transports: options.transports ?? new transports.Console(), + }); + + if (options.meta) { + logger = logger.child(options.meta); + } + + return new WinstonLogger(logger, redacter.add); + } + + /** + * Creates a winston log formatter for redacting secrets. + */ + static redacter(): { + format: Format; + add: (redactions: Iterable) => void; + } { + const redactionSet = new Set(); + + let redactionPattern: RegExp | undefined = undefined; + + return { + format: format((obj: TransformableInfo) => { + if (!redactionPattern || !obj) { + return obj; + } + + obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***'); + + return obj; + })(), + add(newRedactions) { + let added = 0; + for (const redactionToTrim of newRedactions) { + // Trimming the string ensures that we don't accdentally get extra + // newlines or other whitespace interfering with the redaction; this + // can happen for example when using string literals in yaml + const redaction = redactionToTrim.trim(); + // Exclude secrets that are empty or just one character in length. These + // typically mean that you are running local dev or tests, or using the + // --lax flag which sets things to just 'x'. + if (redaction.length <= 1) { + continue; + } + if (!redactionSet.has(redaction)) { + redactionSet.add(redaction); + added += 1; + } + } + if (added > 0) { + const redactions = Array.from(redactionSet) + .map(r => escapeRegExp(r)) + .join('|'); + redactionPattern = new RegExp(`(${redactions})`, 'g'); + } + }, + }; + } + + /** + * Creates a pretty printed winston log formatter. + */ + static colorFormat(): Format { + const colorizer = format.colorize(); + + return format.combine( + format.timestamp(), + format.colorize({ + colors: { + timestamp: 'dim', + prefix: 'blue', + field: 'cyan', + debug: 'grey', + }, + }), + format.printf((info: TransformableInfo) => { + const { timestamp, level, message, plugin, service, ...fields } = info; + const prefix = plugin || service; + const timestampColor = colorizer.colorize('timestamp', timestamp); + const prefixColor = colorizer.colorize('prefix', prefix); + + const extraFields = Object.entries(fields) + .map( + ([key, value]) => + `${colorizer.colorize('field', `${key}`)}=${value}`, + ) + .join(' '); + + return `${timestampColor} ${prefixColor} ${level} ${message} ${extraFields}`; + }), + ); + } + + private constructor( + winston: Logger, + addRedactions?: (redactions: Iterable) => void, + ) { + this.#winston = winston; + this.#addRedactions = addRedactions; + } + + error(message: string, meta?: JsonObject): void { + this.#winston.error(message, meta); + } + + warn(message: string, meta?: JsonObject): void { + this.#winston.warn(message, meta); + } + + info(message: string, meta?: JsonObject): void { + this.#winston.info(message, meta); + } + + debug(message: string, meta?: JsonObject): void { + this.#winston.debug(message, meta); + } + + child(meta: JsonObject): LoggerService { + return new WinstonLogger(this.#winston.child(meta)); + } + + addRedactions(redactions: Iterable) { + this.#addRedactions?.(redactions); + } +} diff --git a/packages/backend-defaults/src/entrypoints/rootLogger/index.ts b/packages/backend-defaults/src/entrypoints/rootLogger/index.ts new file mode 100644 index 0000000000..96ed402520 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootLogger/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { rootLoggerServiceFactory } from './rootLoggerServiceFactory'; +export { WinstonLogger, type WinstonLoggerOptions } from './WinstonLogger'; diff --git a/packages/backend-defaults/src/entrypoints/rootLogger/rootLoggerServiceFactory.ts b/packages/backend-defaults/src/entrypoints/rootLogger/rootLoggerServiceFactory.ts new file mode 100644 index 0000000000..8454cf07d3 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/rootLogger/rootLoggerServiceFactory.ts @@ -0,0 +1,58 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + createServiceFactory, + coreServices, +} from '@backstage/backend-plugin-api'; +import { transports, format } from 'winston'; +import { WinstonLogger } from '../rootLogger/WinstonLogger'; +import { createConfigSecretEnumerator } from '../rootConfig/createConfigSecretEnumerator'; + +/** + * Root-level logging. + * + * See {@link @backstage/code-plugin-api#RootLoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-logger | the service docs} + * for more information. + * + * @public + */ +export const rootLoggerServiceFactory = createServiceFactory({ + service: coreServices.rootLogger, + deps: { + config: coreServices.rootConfig, + }, + async factory({ config }) { + const logger = WinstonLogger.create({ + meta: { + service: 'backstage', + }, + level: process.env.LOG_LEVEL || 'info', + format: + process.env.NODE_ENV === 'production' + ? format.json() + : WinstonLogger.colorFormat(), + transports: [new transports.Console()], + }); + + const secretEnumerator = await createConfigSecretEnumerator({ logger }); + logger.addRedactions(secretEnumerator(config)); + config.subscribe?.(() => logger.addRedactions(secretEnumerator(config))); + + return logger; + }, +}); diff --git a/packages/backend-defaults/src/entrypoints/scheduler/schedulerServiceFactory.ts b/packages/backend-defaults/src/entrypoints/scheduler/schedulerServiceFactory.ts index 1105c86332..effa5c5925 100644 --- a/packages/backend-defaults/src/entrypoints/scheduler/schedulerServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/scheduler/schedulerServiceFactory.ts @@ -21,7 +21,11 @@ import { import { DefaultSchedulerService } from './lib/DefaultSchedulerService'; /** - * The default service factory for {@link @backstage/backend-plugin-api#coreServices.scheduler}. + * Scheduling of distributed background tasks. + * + * See {@link @backstage/code-plugin-api#SchedulerService} + * and {@link https://backstage.io/docs/backend-system/core-services/scheduler | the service docs} + * for more information. * * @public */ diff --git a/packages/backend-defaults/src/entrypoints/urlReader/urlReaderServiceFactory.ts b/packages/backend-defaults/src/entrypoints/urlReader/urlReaderServiceFactory.ts index dae8d692cb..810882edf8 100644 --- a/packages/backend-defaults/src/entrypoints/urlReader/urlReaderServiceFactory.ts +++ b/packages/backend-defaults/src/entrypoints/urlReader/urlReaderServiceFactory.ts @@ -20,7 +20,15 @@ import { createServiceFactory, } from '@backstage/backend-plugin-api'; -/** @public */ +/** + * Reading content from external systems. + * + * See {@link @backstage/code-plugin-api#UrlReaderService} + * and {@link https://backstage.io/docs/backend-system/core-services/url-reader | the service docs} + * for more information. + * + * @public + */ export const urlReaderServiceFactory = createServiceFactory({ service: coreServices.urlReader, deps: { diff --git a/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.test.ts b/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.test.ts new file mode 100644 index 0000000000..b63b24fb18 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.test.ts @@ -0,0 +1,169 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BackstageUserPrincipal } from '@backstage/backend-plugin-api'; +import { + mockServices, + setupRequestMockHandlers, +} from '@backstage/backend-test-utils'; +import { JsonObject } from '@backstage/types'; +import { SignJWT, base64url, importJWK } from 'jose'; +import { rest } from 'msw'; +import { setupServer } from 'msw/node'; +import { InternalBackstageCredentials } from '../auth/types'; +import { DefaultUserInfoService } from './DefaultUserInfoService'; + +describe('DefaultUserInfoService', () => { + const server = setupServer(); + setupRequestMockHandlers(server); + + const mockPublicKey = { + kty: 'EC', + x: 'GHlwg744e8JekzukPTdtix6R868D6fcWy0ooOx-NEZI', + y: 'Lyujcm0M6X9_yQi3l1eH09z0brU8K9cwrLml_fRFKro', + crv: 'P-256', + kid: 'mock', + alg: 'ES256', + }; + const mockPrivateKey = { + ...mockPublicKey, + d: 'KEn_mDqXYbZdRHb-JnCrW53LDOv5x4NL1FnlKcqBsFI', + }; + + function encodeData(data: JsonObject) { + return base64url.encode(JSON.stringify(data)); + } + + async function createToken(options: { + header: JsonObject; + payload: JsonObject; + signature?: string; + }) { + if (options.signature) { + const header = encodeData(options.header); + const payload = encodeData(options.payload); + + return `${header}.${payload}.${options.signature}`; + } + + return await new SignJWT(options.payload) + .setProtectedHeader({ ...options.header, alg: 'ES256' }) + .sign(await importJWK(mockPrivateKey)); + } + + const discovery = mockServices.discovery.mock({ + getBaseUrl: async pluginId => `https://example.com/api/${pluginId}`, + }); + + it('makes the expected call when no ent in the token', async () => { + const token = await createToken({ + header: { + typ: 'vnd.backstage.user', + alg: 'ES256', + kid: mockPublicKey.kid, + }, + payload: { + sub: 'user:default/alice', + }, + }); + const credentials = { + $$type: '@backstage/BackstageCredentials', + version: 'v1', + token: token, + principal: { + type: 'user', + userEntityRef: 'user:default/alice', + }, + } as InternalBackstageCredentials; + + server.use( + rest.get('https://example.com/api/auth/v1/userinfo', (req, res, ctx) => { + expect(req.headers.get('authorization')).toBe(`Bearer ${token}`); + return res(ctx.json({ claims: { ent: ['group:default/my-team'] } })); + }), + ); + + const service = new DefaultUserInfoService({ discovery }); + await expect(service.getUserInfo(credentials)).resolves.toEqual({ + userEntityRef: 'user:default/alice', + ownershipEntityRefs: ['group:default/my-team'], + }); + }); + + it('uses the ent from the token when present', async () => { + const token = await createToken({ + header: { + typ: 'vnd.backstage.user', + alg: 'ES256', + kid: mockPublicKey.kid, + }, + payload: { + sub: 'user:default/alice', + ent: ['group:default/my-team'], + }, + }); + const credentials = { + $$type: '@backstage/BackstageCredentials', + version: 'v1', + token: token, + principal: { + type: 'user', + userEntityRef: 'user:default/alice', + }, + } as InternalBackstageCredentials; + + const service = new DefaultUserInfoService({ discovery }); + await expect(service.getUserInfo(credentials)).resolves.toEqual({ + userEntityRef: 'user:default/alice', + ownershipEntityRefs: ['group:default/my-team'], + }); + }); + + it('passes on server errors', async () => { + const token = await createToken({ + header: { + typ: 'vnd.backstage.user', + alg: 'ES256', + kid: mockPublicKey.kid, + }, + payload: { + sub: 'user:default/alice', + }, + }); + const credentials = { + $$type: '@backstage/BackstageCredentials', + version: 'v1', + token: token, + principal: { + type: 'user', + userEntityRef: 'user:default/alice', + }, + } as InternalBackstageCredentials; + + server.use( + rest.get('https://example.com/api/auth/v1/userinfo', (_req, res, ctx) => { + return res(ctx.status(404)); + }), + ); + + const service = new DefaultUserInfoService({ discovery }); + await expect( + service.getUserInfo(credentials), + ).rejects.toMatchInlineSnapshot( + `[ResponseError: Request failed with 404 Not Found]`, + ); + }); +}); diff --git a/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.ts b/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.ts new file mode 100644 index 0000000000..83bbba89b7 --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/userInfo/DefaultUserInfoService.ts @@ -0,0 +1,90 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + UserInfoService, + BackstageUserInfo, + DiscoveryService, + BackstageCredentials, +} from '@backstage/backend-plugin-api'; +import { ResponseError } from '@backstage/errors'; +import { decodeJwt } from 'jose'; +import fetch from 'node-fetch'; +import { toInternalBackstageCredentials } from '../auth/helpers'; + +export type Options = { + discovery: DiscoveryService; +}; + +export class DefaultUserInfoService implements UserInfoService { + private readonly discovery: DiscoveryService; + + constructor(options: Options) { + this.discovery = options.discovery; + } + + async getUserInfo( + credentials: BackstageCredentials, + ): Promise { + const internalCredentials = toInternalBackstageCredentials(credentials); + if (internalCredentials.principal.type !== 'user') { + throw new Error('Only user credentials are supported'); + } + if (!internalCredentials.token) { + throw new Error('User credentials is unexpectedly missing token'); + } + const { sub: userEntityRef, ent: tokenEnt } = decodeJwt( + internalCredentials.token, + ); + + if (typeof userEntityRef !== 'string') { + throw new Error('User entity ref must be a string'); + } + + let ownershipEntityRefs = tokenEnt; + + if (!ownershipEntityRefs) { + const userInfoResp = await fetch( + `${await this.discovery.getBaseUrl('auth')}/v1/userinfo`, + { + headers: { + Authorization: `Bearer ${internalCredentials.token}`, + }, + }, + ); + + if (!userInfoResp.ok) { + throw await ResponseError.fromResponse(userInfoResp); + } + + const { + claims: { ent }, + } = await userInfoResp.json(); + ownershipEntityRefs = ent; + } + + if (!ownershipEntityRefs) { + throw new Error('Ownership entity refs can not be determined'); + } else if ( + !Array.isArray(ownershipEntityRefs) || + ownershipEntityRefs.some(ref => typeof ref !== 'string') + ) { + throw new Error('Ownership entity refs must be an array of strings'); + } + + return { userEntityRef, ownershipEntityRefs }; + } +} diff --git a/packages/backend-defaults/src/entrypoints/userInfo/index.ts b/packages/backend-defaults/src/entrypoints/userInfo/index.ts new file mode 100644 index 0000000000..13b42f053c --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/userInfo/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { userInfoServiceFactory } from './userInfoServiceFactory'; diff --git a/packages/backend-defaults/src/entrypoints/userInfo/userInfoServiceFactory.ts b/packages/backend-defaults/src/entrypoints/userInfo/userInfoServiceFactory.ts new file mode 100644 index 0000000000..fe8c398bca --- /dev/null +++ b/packages/backend-defaults/src/entrypoints/userInfo/userInfoServiceFactory.ts @@ -0,0 +1,40 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + coreServices, + createServiceFactory, +} from '@backstage/backend-plugin-api'; +import { DefaultUserInfoService } from './DefaultUserInfoService'; + +/** + * Authenticated user information retrieval. + * + * See {@link @backstage/code-plugin-api#UserInfoService} + * and {@link https://backstage.io/docs/backend-system/core-services/user-info | the service docs} + * for more information. + * + * @public + */ +export const userInfoServiceFactory = createServiceFactory({ + service: coreServices.userInfo, + deps: { + discovery: coreServices.discovery, + }, + async factory({ discovery }) { + return new DefaultUserInfoService({ discovery }); + }, +}); diff --git a/packages/backend-app-api/src/lib/escapeRegExp.test.ts b/packages/backend-defaults/src/lib/escapeRegExp.test.ts similarity index 100% rename from packages/backend-app-api/src/lib/escapeRegExp.test.ts rename to packages/backend-defaults/src/lib/escapeRegExp.test.ts diff --git a/packages/backend-app-api/src/lib/escapeRegExp.ts b/packages/backend-defaults/src/lib/escapeRegExp.ts similarity index 100% rename from packages/backend-app-api/src/lib/escapeRegExp.ts rename to packages/backend-defaults/src/lib/escapeRegExp.ts diff --git a/packages/backend-common/src/urls.test.ts b/packages/backend-defaults/src/lib/urls.test.ts similarity index 100% rename from packages/backend-common/src/urls.test.ts rename to packages/backend-defaults/src/lib/urls.test.ts diff --git a/packages/backend-common/src/urls.ts b/packages/backend-defaults/src/lib/urls.ts similarity index 100% rename from packages/backend-common/src/urls.ts rename to packages/backend-defaults/src/lib/urls.ts diff --git a/packages/backend-dynamic-feature-service/CHANGELOG.md b/packages/backend-dynamic-feature-service/CHANGELOG.md index 51943e952d..4363805410 100644 --- a/packages/backend-dynamic-feature-service/CHANGELOG.md +++ b/packages/backend-dynamic-feature-service/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/backend-dynamic-feature-service +## 0.2.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-events-backend@0.3.6 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-app-node@0.1.19 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.11-next.3 ### Patch Changes diff --git a/packages/backend-dynamic-feature-service/api-report.md b/packages/backend-dynamic-feature-service/api-report.md index 57b2228975..20db7db71b 100644 --- a/packages/backend-dynamic-feature-service/api-report.md +++ b/packages/backend-dynamic-feature-service/api-report.md @@ -4,6 +4,7 @@ ```ts import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { BackstagePackageJson } from '@backstage/cli-node'; import { CatalogBuilder } from '@backstage/plugin-catalog-backend'; import { Config } from '@backstage/config'; @@ -119,7 +120,7 @@ export const dynamicPluginsFeatureDiscoveryServiceFactory: () => ServiceFactory< >; // @public (undocumented) -export const dynamicPluginsFrontendSchemas: () => BackendFeature; +export const dynamicPluginsFrontendSchemas: BackendFeatureCompat; // @public (undocumented) export const dynamicPluginsRootLoggerServiceFactory: () => ServiceFactory< diff --git a/packages/backend-dynamic-feature-service/package.json b/packages/backend-dynamic-feature-service/package.json index fb2646f59b..91a7d96ce1 100644 --- a/packages/backend-dynamic-feature-service/package.json +++ b/packages/backend-dynamic-feature-service/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-dynamic-feature-service", "description": "Backstage dynamic feature service", - "version": "0.2.11-next.3", + "version": "0.2.11", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-dynamic-feature-service/src/manager/plugin-manager.test.ts b/packages/backend-dynamic-feature-service/src/manager/plugin-manager.test.ts index 340991b11f..8531624509 100644 --- a/packages/backend-dynamic-feature-service/src/manager/plugin-manager.test.ts +++ b/packages/backend-dynamic-feature-service/src/manager/plugin-manager.test.ts @@ -154,9 +154,9 @@ describe('backend-dynamic-feature-service', () => { const installer: NewBackendPluginInstaller = ( plugins[0] as BackendDynamicPlugin ).installer as NewBackendPluginInstaller; - expect(installer.install()).toEqual< - BackendFeature | BackendFeature[] - >({ $$type: '@backstage/BackendFeature' }); + expect((installer.install() as BackendFeature).$$type).toEqual( + '@backstage/BackendFeature', + ); }, }, { @@ -199,9 +199,9 @@ describe('backend-dynamic-feature-service', () => { const installer: NewBackendPluginInstaller = ( plugins[0] as BackendDynamicPlugin ).installer as NewBackendPluginInstaller; - expect(installer.install()).toEqual< - BackendFeature | BackendFeature[] - >({ $$type: '@backstage/BackendFeature' }); + expect((installer.install() as BackendFeature).$$type).toEqual( + '@backstage/BackendFeature', + ); }, }, { diff --git a/packages/backend-legacy/CHANGELOG.md b/packages/backend-legacy/CHANGELOG.md index 64a7e372db..cfe705fcad 100644 --- a/packages/backend-legacy/CHANGELOG.md +++ b/packages/backend-legacy/CHANGELOG.md @@ -1,5 +1,47 @@ # example-backend-legacy +## 0.2.99 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/plugin-techdocs-backend@1.10.6 + - @backstage/plugin-devtools-backend@0.3.5 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-search-backend@1.5.10 + - @backstage/plugin-proxy-backend@0.5.0 + - @backstage/plugin-app-backend@0.3.68 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-search-backend-module-elasticsearch@1.5.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.36 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-search-backend-module-explore@0.1.25 + - @backstage/plugin-search-backend-module-pg@0.5.28 + - @backstage/plugin-kubernetes-backend@0.18.0 + - @backstage/plugin-permission-backend@0.5.43 + - @backstage/plugin-scaffolder-backend@1.22.9 + - @backstage/plugin-signals-backend@0.1.5 + - @backstage/plugin-events-backend@0.3.6 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-signals-node@0.1.5 + - example-app@0.2.98 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.2.99-next.3 ### Patch Changes diff --git a/packages/backend-legacy/package.json b/packages/backend-legacy/package.json index f19b5205ae..1ee3a9bb31 100644 --- a/packages/backend-legacy/package.json +++ b/packages/backend-legacy/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-legacy", - "version": "0.2.99-next.3", + "version": "0.2.99", "backstage": { "role": "backend" }, diff --git a/packages/backend-legacy/src/plugins/techdocs.ts b/packages/backend-legacy/src/plugins/techdocs.ts index 6e369f8f0f..21048d4bb9 100644 --- a/packages/backend-legacy/src/plugins/techdocs.ts +++ b/packages/backend-legacy/src/plugins/techdocs.ts @@ -14,14 +14,12 @@ * limitations under the License. */ -import { DockerContainerRunner } from '@backstage/backend-common'; import { createRouter, Generators, Preparers, Publisher, } from '@backstage/plugin-techdocs-backend'; -import Docker from 'dockerode'; import { Router } from 'express'; import { PluginEnvironment } from '../types'; @@ -34,14 +32,9 @@ export default async function createPlugin( reader: env.reader, }); - // Docker client (conditionally) used by the generators, based on techdocs.generators config. - const dockerClient = new Docker(); - const containerRunner = new DockerContainerRunner({ dockerClient }); - // Generators are used for generating documentation sites. const generators = await Generators.fromConfig(env.config, { logger: env.logger, - containerRunner, }); // Publisher is used for diff --git a/packages/backend-openapi-utils/CHANGELOG.md b/packages/backend-openapi-utils/CHANGELOG.md index f7a6b90d54..d490618301 100644 --- a/packages/backend-openapi-utils/CHANGELOG.md +++ b/packages/backend-openapi-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/backend-openapi-utils +## 0.1.12 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/errors@1.2.4 + ## 0.1.12-next.2 ### Patch Changes diff --git a/packages/backend-openapi-utils/package.json b/packages/backend-openapi-utils/package.json index 38121282c8..8d4130c95d 100644 --- a/packages/backend-openapi-utils/package.json +++ b/packages/backend-openapi-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-openapi-utils", "description": "OpenAPI typescript support.", - "version": "0.1.12-next.2", + "version": "0.1.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index c947a9627d..bbe2fb68e1 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,52 @@ # @backstage/backend-plugin-api +## 0.6.19 + +### Patch Changes + +- 78a0b08: **DEPRECATION**: You should no longer do a function call on backend features when adding them to backends. The support for doing that is deprecated, and you should remove all trailing `()` parentheses after plugins and modules where you add them to your backend or test backends (e.g. when using `startTestBackend`). + + The background for this is that `createBackendPlugin` and `createBackendModule` function now effectively return a `BackendFeature` rather than a `() => BackendFeature`. This is part of the cleanup efforts for New Backend System 1.0. In the short run this is non-breaking because the feature type has been given a callback signature that returns itself. But we strongly recommend that you remove all now-redundant calls made to feature objects, because that callback signature will be removed in a future release. + + Service factories are still callbacks at this point. + + Example change: + + ```diff + await startTestBackend({ + features: [ + eventsServiceFactory(), // service - stays unchanged + - catalogModuleBitbucketCloudEntityProvider(), // module - remove parentheses + + catalogModuleBitbucketCloudEntityProvider, + ``` + +- 9bdc3e8: In tests, return `null` rather than throwing an error when trying to get the `ExtensionPoint.T` property, so that tests asserting the property are not easily broken. +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- 3aa3fc7: Marked the `TokenManagerService` and `IdentityService` types as deprecated +- b2ee7f3: Deprecated all of the `UrlReader` related type names and replaced them with prefixed versions. Please update your imports. + + - `ReadTreeOptions` was renamed to `UrlReaderServiceReadTreeOptions` + - `ReadTreeResponse` was renamed to `UrlReaderServiceReadTreeResponse` + - `ReadTreeResponseDirOptions` was renamed to `UrlReaderServiceReadTreeResponseDirOptions` + - `ReadTreeResponseFile` was renamed to `UrlReaderServiceReadTreeResponseFile` + - `ReadUrlResponse` was renamed to `UrlReaderServiceReadUrlResponse` + - `ReadUrlOptions` was renamed to `UrlReaderServiceReadUrlOptions` + - `SearchOptions` was renamed to `UrlReaderServiceSearchOptions` + - `SearchResponse` was renamed to `UrlReaderServiceSearchResponse` + - `SearchResponseFile` was renamed to `UrlReaderServiceSearchResponseFile` + +- 9539a0b: Improved `coreServices` doc comments +- 6551b3d: Moved the declaration of the `SchedulerService` here, along with prefixed versions of all of the types it depends on, from `@backstage/backend-tasks` +- 0665b7e: Renamed `BackendPluginConfig`, `BackendModuleConfig`, and `ExtensionPointConfig` respectively to `CreateBackendPluginOptions`, `CreateBackendModuleOptions`, and `CreateExtensionPointOptions` to standardize frontend and backend factories signatures. +- 1779188: Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/cli-common@0.1.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.6.19-next.3 ### Patch Changes diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 140744b5de..258cdefe1b 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -63,6 +63,12 @@ export interface BackendFeature { $$type: '@backstage/BackendFeature'; } +// @public @deprecated (undocumented) +export interface BackendFeatureCompat extends BackendFeature { + // @deprecated (undocumented) + (): this; +} + // @public @deprecated (undocumented) export type BackendModuleConfig = CreateBackendModuleOptions; @@ -208,7 +214,7 @@ export namespace coreServices { // @public export function createBackendModule( options: CreateBackendModuleOptions, -): () => BackendFeature; +): BackendFeatureCompat; // @public export interface CreateBackendModuleOptions { @@ -221,7 +227,7 @@ export interface CreateBackendModuleOptions { // @public export function createBackendPlugin( options: CreateBackendPluginOptions, -): () => BackendFeature; +): BackendFeatureCompat; // @public export interface CreateBackendPluginOptions { diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index 6e3ad58fb5..e8538cece7 100644 --- a/packages/backend-plugin-api/package.json +++ b/packages/backend-plugin-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-plugin-api", - "version": "0.6.19-next.3", + "version": "0.6.19", "description": "Core API used by Backstage backend plugins", "backstage": { "role": "node-library" diff --git a/packages/backend-plugin-api/src/index.ts b/packages/backend-plugin-api/src/index.ts index c2e2a13a89..e6e57db1dc 100644 --- a/packages/backend-plugin-api/src/index.ts +++ b/packages/backend-plugin-api/src/index.ts @@ -21,6 +21,6 @@ */ export * from './services'; -export type { BackendFeature } from './types'; +export type { BackendFeature, BackendFeatureCompat } from './types'; export * from './paths'; export * from './wiring'; diff --git a/packages/backend-plugin-api/src/services/definitions/coreServices.ts b/packages/backend-plugin-api/src/services/definitions/coreServices.ts index 4e02611f80..b0518fb9d4 100644 --- a/packages/backend-plugin-api/src/services/definitions/coreServices.ts +++ b/packages/backend-plugin-api/src/services/definitions/coreServices.ts @@ -23,7 +23,11 @@ import { createServiceRef } from '../system'; */ export namespace coreServices { /** - * The service reference for the plugin scoped {@link AuthService}. + * Handles token authentication and credentials management. + * + * See {@link AuthService} + * and {@link https://backstage.io/docs/backend-system/core-services/auth | the service docs} + * for more information. * * @public */ @@ -32,7 +36,11 @@ export namespace coreServices { }); /** - * The service reference for the plugin scoped {@link UserInfoService}. + * Authenticated user information retrieval. + * + * See {@link UserInfoService} + * and {@link https://backstage.io/docs/backend-system/core-services/user-info | the service docs} + * for more information. * * @public */ @@ -43,7 +51,11 @@ export namespace coreServices { }); /** - * The service reference for the plugin scoped {@link CacheService}. + * Key-value store for caching data. + * + * See {@link CacheService} + * and {@link https://backstage.io/docs/backend-system/core-services/cache | the service docs} + * for more information. * * @public */ @@ -52,7 +64,11 @@ export namespace coreServices { }); /** - * The service reference for the root scoped {@link RootConfigService}. + * Access to static configuration. + * + * See {@link RootConfigService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-config | the service docs} + * for more information. * * @public */ @@ -61,7 +77,11 @@ export namespace coreServices { >({ id: 'core.rootConfig', scope: 'root' }); /** - * The service reference for the plugin scoped {@link DatabaseService}. + * Database access and management via `knex`. + * + * See {@link DatabaseService} + * and {@link https://backstage.io/docs/backend-system/core-services/database | the service docs} + * for more information. * * @public */ @@ -70,7 +90,11 @@ export namespace coreServices { >({ id: 'core.database' }); /** - * The service reference for the plugin scoped {@link DiscoveryService}. + * Service discovery for inter-plugin communication. + * + * See {@link DiscoveryService} + * and {@link https://backstage.io/docs/backend-system/core-services/discovery | the service docs} + * for more information. * * @public */ @@ -79,7 +103,11 @@ export namespace coreServices { >({ id: 'core.discovery' }); /** - * The service reference for the plugin scoped {@link HttpAuthService}. + * Authentication of HTTP requests. + * + * See {@link HttpAuthService} + * and {@link https://backstage.io/docs/backend-system/core-services/http-auth | the service docs} + * for more information. * * @public */ @@ -88,7 +116,11 @@ export namespace coreServices { >({ id: 'core.httpAuth' }); /** - * The service reference for the plugin scoped {@link HttpRouterService}. + * HTTP route registration for plugins. + * + * See {@link HttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/http-router | the service docs} + * for more information. * * @public */ @@ -97,7 +129,11 @@ export namespace coreServices { >({ id: 'core.httpRouter' }); /** - * The service reference for the plugin scoped {@link LifecycleService}. + * Registration of plugin startup and shutdown lifecycle hooks. + * + * See {@link LifecycleService} + * and {@link https://backstage.io/docs/backend-system/core-services/lifecycle | the service docs} + * for more information. * * @public */ @@ -106,7 +142,11 @@ export namespace coreServices { >({ id: 'core.lifecycle' }); /** - * The service reference for the plugin scoped {@link LoggerService}. + * Plugin-level logging. + * + * See {@link LoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/logger | the service docs} + * for more information. * * @public */ @@ -115,7 +155,11 @@ export namespace coreServices { >({ id: 'core.logger' }); /** - * The service reference for the plugin scoped {@link PermissionsService}. + * Permission system integration for authorization of user actions. + * + * See {@link PermissionsService} + * and {@link https://backstage.io/docs/backend-system/core-services/permissions | the service docs} + * for more information. * * @public */ @@ -124,7 +168,11 @@ export namespace coreServices { >({ id: 'core.permissions' }); /** - * The service reference for the plugin scoped {@link PluginMetadataService}. + * Built-in service for accessing metadata about the current plugin. + * + * See {@link PluginMetadataService} + * and {@link https://backstage.io/docs/backend-system/core-services/plugin-metadata | the service docs} + * for more information. * * @public */ @@ -133,7 +181,11 @@ export namespace coreServices { >({ id: 'core.pluginMetadata' }); /** - * The service reference for the root scoped {@link RootHttpRouterService}. + * HTTP route registration for root services. + * + * See {@link RootHttpRouterService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-http-router | the service docs} + * for more information. * * @public */ @@ -142,7 +194,11 @@ export namespace coreServices { >({ id: 'core.rootHttpRouter', scope: 'root' }); /** - * The service reference for the root scoped {@link RootLifecycleService}. + * Registration of backend startup and shutdown lifecycle hooks. + * + * See {@link RootLifecycleService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-lifecycle | the service docs} + * for more information. * * @public */ @@ -151,7 +207,11 @@ export namespace coreServices { >({ id: 'core.rootLifecycle', scope: 'root' }); /** - * The service reference for the root scoped {@link RootLoggerService}. + * Root-level logging. + * + * See {@link RootLoggerService} + * and {@link https://backstage.io/docs/backend-system/core-services/root-logger | the service docs} + * for more information. * * @public */ @@ -160,7 +220,11 @@ export namespace coreServices { >({ id: 'core.rootLogger', scope: 'root' }); /** - * The service reference for the plugin scoped {@link SchedulerService}. + * Scheduling of distributed background tasks. + * + * See {@link SchedulerService} + * and {@link https://backstage.io/docs/backend-system/core-services/scheduler | the service docs} + * for more information. * * @public */ @@ -169,7 +233,11 @@ export namespace coreServices { >({ id: 'core.scheduler' }); /** - * The service reference for the plugin scoped {@link TokenManagerService}. + * Deprecated service authentication service, use the `auth` service instead. + * + * See {@link TokenManagerService} + * and {@link https://backstage.io/docs/backend-system/core-services/token-manager | the service docs} + * for more information. * * @public * @deprecated Please migrate to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead @@ -179,7 +247,11 @@ export namespace coreServices { >({ id: 'core.tokenManager' }); /** - * The service reference for the plugin scoped {@link UrlReaderService}. + * Reading content from external systems. + * + * See {@link UrlReaderService} + * and {@link https://backstage.io/docs/backend-system/core-services/url-reader | the service docs} + * for more information. * * @public */ @@ -188,7 +260,11 @@ export namespace coreServices { >({ id: 'core.urlReader' }); /** - * The service reference for the plugin scoped {@link IdentityService}. + * Deprecated user authentication service, use the `auth` service instead. + * + * See {@link IdentityService} + * and {@link https://backstage.io/docs/backend-system/core-services/identity | the service docs} + * for more information. * * @public * @deprecated Please migrate to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead diff --git a/packages/backend-plugin-api/src/types.ts b/packages/backend-plugin-api/src/types.ts index 59f1106fab..31684b6a38 100644 --- a/packages/backend-plugin-api/src/types.ts +++ b/packages/backend-plugin-api/src/types.ts @@ -27,3 +27,14 @@ export interface BackendFeature { // NOTE: This type is opaque in order to simplify future API evolution. $$type: '@backstage/BackendFeature'; } + +/** + * @public + * @deprecated This type exists only as a helper for old code that relied on `createBackendFeature` and `createBackendPlugin` to return `() => BackendFeature` instead of `BackendFeature`. You should remove the `()` parentheses at the end of your usages. This type will be removed in a future release. + */ +export interface BackendFeatureCompat extends BackendFeature { + /** + * @deprecated You do not need to use this call signature; use the type directly instead by removing the `()` parentheses at the end. This call signature will be removed in a future release. + */ + (): this; +} diff --git a/packages/backend-plugin-api/src/wiring/factories.test.ts b/packages/backend-plugin-api/src/wiring/factories.test.ts index 9f11c9b40b..6d5c1f39cd 100644 --- a/packages/backend-plugin-api/src/wiring/factories.test.ts +++ b/packages/backend-plugin-api/src/wiring/factories.test.ts @@ -33,19 +33,25 @@ describe('createExtensionPoint', () => { describe('createBackendPlugin', () => { it('should create a BackendPlugin', () => { - const plugin = createBackendPlugin({ + const result = createBackendPlugin({ pluginId: 'x', register(r) { r.registerInit({ deps: {}, async init() {} }); }, }); - expect(plugin).toBeDefined(); - expect(plugin()).toEqual({ - $$type: '@backstage/BackendFeature', - version: 'v1', - getRegistrations: expect.any(Function), - }); - expect((plugin() as InternalBackendFeature).getRegistrations()).toEqual([ + + // legacy form + const legacy = result() as unknown as InternalBackendFeature; + expect(legacy.$$type).toEqual('@backstage/BackendFeature'); + expect(legacy.version).toEqual('v1'); + expect(legacy.getRegistrations).toEqual(expect.any(Function)); + + // new form + const plugin = result as unknown as InternalBackendFeature; + expect(plugin.$$type).toEqual('@backstage/BackendFeature'); + expect(plugin.version).toEqual('v1'); + expect(plugin.getRegistrations).toEqual(expect.any(Function)); + expect(plugin.getRegistrations()).toEqual([ { type: 'plugin', pluginId: 'x', @@ -56,6 +62,7 @@ describe('createBackendPlugin', () => { }, }, ]); + // @ts-expect-error expect(plugin({ a: 'a' })).toBeDefined(); }); @@ -63,21 +70,26 @@ describe('createBackendPlugin', () => { describe('createBackendModule', () => { it('should create a BackendModule', () => { - const mod = createBackendModule({ + const result = createBackendModule({ pluginId: 'x', moduleId: 'y', register(r) { r.registerInit({ deps: {}, async init() {} }); }, }); - expect(mod).toBeDefined(); - expect(mod()).toBeDefined(); - expect(mod()).toEqual({ - $$type: '@backstage/BackendFeature', - version: 'v1', - getRegistrations: expect.any(Function), - }); - expect((mod() as InternalBackendFeature).getRegistrations()).toEqual([ + + // legacy form + const legacy = result() as unknown as InternalBackendFeature; + expect(legacy.$$type).toEqual('@backstage/BackendFeature'); + expect(legacy.version).toEqual('v1'); + expect(legacy.getRegistrations).toEqual(expect.any(Function)); + + // new form + const module = result as unknown as InternalBackendFeature; + expect(module.$$type).toEqual('@backstage/BackendFeature'); + expect(module.version).toEqual('v1'); + expect(module.getRegistrations).toEqual(expect.any(Function)); + expect(module.getRegistrations()).toEqual([ { type: 'module', pluginId: 'x', @@ -89,7 +101,8 @@ describe('createBackendModule', () => { }, }, ]); + // @ts-expect-error - expect(mod({ a: 'a' })).toBeDefined(); + expect(module({ a: 'a' })).toBeDefined(); }); }); diff --git a/packages/backend-plugin-api/src/wiring/factories.ts b/packages/backend-plugin-api/src/wiring/factories.ts index 5442bab897..81e2247152 100644 --- a/packages/backend-plugin-api/src/wiring/factories.ts +++ b/packages/backend-plugin-api/src/wiring/factories.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { BackendFeature, BackendFeatureFactory } from '../types'; +import { BackendFeatureCompat } from '../types'; import { BackendModuleRegistrationPoints, BackendPluginRegistrationPoints, @@ -90,63 +90,57 @@ export interface CreateBackendPluginOptions { */ export function createBackendPlugin( options: CreateBackendPluginOptions, -): () => BackendFeature { - const factory: BackendFeatureFactory = () => { - let registrations: InternalBackendPluginRegistration[]; +): BackendFeatureCompat { + function getRegistrations() { + const extensionPoints: InternalBackendPluginRegistration['extensionPoints'] = + []; + let init: InternalBackendPluginRegistration['init'] | undefined = undefined; - return { - $$type: '@backstage/BackendFeature', - version: 'v1', - getRegistrations() { - if (registrations) { - return registrations; + options.register({ + registerExtensionPoint(ext, impl) { + if (init) { + throw new Error('registerExtensionPoint called after registerInit'); } - const extensionPoints: InternalBackendPluginRegistration['extensionPoints'] = - []; - let init: InternalBackendPluginRegistration['init'] | undefined = - undefined; - - options.register({ - registerExtensionPoint(ext, impl) { - if (init) { - throw new Error( - 'registerExtensionPoint called after registerInit', - ); - } - extensionPoints.push([ext, impl]); - }, - registerInit(regInit) { - if (init) { - throw new Error('registerInit must only be called once'); - } - init = { - deps: regInit.deps, - func: regInit.init, - }; - }, - }); - - if (!init) { - throw new Error( - `registerInit was not called by register in ${options.pluginId}`, - ); - } - - registrations = [ - { - type: 'plugin', - pluginId: options.pluginId, - extensionPoints, - init, - }, - ]; - return registrations; + extensionPoints.push([ext, impl]); }, - }; - }; - factory.$$type = '@backstage/BackendFeatureFactory'; + registerInit(regInit) { + if (init) { + throw new Error('registerInit must only be called once'); + } + init = { + deps: regInit.deps, + func: regInit.init, + }; + }, + }); - return factory; + if (!init) { + throw new Error( + `registerInit was not called by register in ${options.pluginId}`, + ); + } + + return [ + { + type: 'plugin', + pluginId: options.pluginId, + extensionPoints, + init, + }, + ]; + } + + function backendFeatureCompatWrapper() { + return backendFeatureCompatWrapper; + } + + Object.assign(backendFeatureCompatWrapper, { + $$type: '@backstage/BackendFeature' as const, + version: 'v1', + getRegistrations, + }); + + return backendFeatureCompatWrapper as BackendFeatureCompat; } /** @@ -180,62 +174,56 @@ export interface CreateBackendModuleOptions { */ export function createBackendModule( options: CreateBackendModuleOptions, -): () => BackendFeature { - const factory: BackendFeatureFactory = () => { - let registrations: InternalBackendModuleRegistration[]; +): BackendFeatureCompat { + function getRegistrations() { + const extensionPoints: InternalBackendPluginRegistration['extensionPoints'] = + []; + let init: InternalBackendModuleRegistration['init'] | undefined = undefined; - return { - $$type: '@backstage/BackendFeature', - version: 'v1', - getRegistrations() { - if (registrations) { - return registrations; + options.register({ + registerExtensionPoint(ext, impl) { + if (init) { + throw new Error('registerExtensionPoint called after registerInit'); } - const extensionPoints: InternalBackendPluginRegistration['extensionPoints'] = - []; - let init: InternalBackendModuleRegistration['init'] | undefined = - undefined; - - options.register({ - registerExtensionPoint(ext, impl) { - if (init) { - throw new Error( - 'registerExtensionPoint called after registerInit', - ); - } - extensionPoints.push([ext, impl]); - }, - registerInit(regInit) { - if (init) { - throw new Error('registerInit must only be called once'); - } - init = { - deps: regInit.deps, - func: regInit.init, - }; - }, - }); - - if (!init) { - throw new Error( - `registerInit was not called by register in ${options.moduleId} module for ${options.pluginId}`, - ); - } - - registrations = [ - { - type: 'module', - pluginId: options.pluginId, - moduleId: options.moduleId, - extensionPoints, - init, - }, - ]; - return registrations; + extensionPoints.push([ext, impl]); }, - }; - }; - factory.$$type = '@backstage/BackendFeatureFactory'; + registerInit(regInit) { + if (init) { + throw new Error('registerInit must only be called once'); + } + init = { + deps: regInit.deps, + func: regInit.init, + }; + }, + }); - return factory; + if (!init) { + throw new Error( + `registerInit was not called by register in ${options.moduleId} module for ${options.pluginId}`, + ); + } + + return [ + { + type: 'module', + pluginId: options.pluginId, + moduleId: options.moduleId, + extensionPoints, + init, + }, + ]; + } + + function backendFeatureCompatWrapper() { + return backendFeatureCompatWrapper; + } + + Object.assign(backendFeatureCompatWrapper, { + $$type: '@backstage/BackendFeature' as const, + version: 'v1', + getRegistrations, + }); + + return backendFeatureCompatWrapper as BackendFeatureCompat; } diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index aa4c786b65..9624df483b 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/backend-tasks +## 0.5.24 + +### Patch Changes + +- 736bc3c: Marked all exports as deprecated and pointed at `@backstage/backend-plugin-api` and `@backstage/backend-defaults` +- ed473cd: Updated the `TaskScheduleDefinitionConfig` deprecated comment to point to `SchedulerServiceTaskScheduleDefinitionConfig` +- 6a576dc: Deprecate the legacy `TaskScheduler.fromConfig` method and stop using the `getVoidlogger` in tests files to reduce the dependency on the soon-to-deprecate `backstage-common` package. +- 1897169: More detailed deprecation messages +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.5.24-next.3 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index f11d0c7788..843a78706d 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.5.24-next.3", + "version": "0.5.24", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 2e3051b85e..4bc1108ead 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/backend-test-utils +## 0.4.0 + +### Minor Changes + +- 805cbe7: Added `TestCaches` that functions just like `TestDatabases` + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 9e63318: Made it possible to give access restrictions to `mockCredentials.service` +- 006b3e8: The type `MockDirectoryOptions` was renamed to `CreateMockDirectoryOptions` so that it's clear these options are exclusive to the mock directory factory. +- 0634fdc: Refactored `TestDatabases` to no longer depend on `backend-common` +- 6a576dc: Fix the logger service mock to prevent returning `undefined` from the `child` method. +- 6c11f6e: Use imports from backend-defaults instead of the deprecated ones from backend-app-api +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.4.0-next.3 ### Patch Changes diff --git a/packages/backend-test-utils/api-report.md b/packages/backend-test-utils/api-report.md index cc30dc8f56..019d398ea6 100644 --- a/packages/backend-test-utils/api-report.md +++ b/packages/backend-test-utils/api-report.md @@ -22,7 +22,7 @@ import { EventsService } from '@backstage/plugin-events-node'; import { ExtendedHttpServer } from '@backstage/backend-app-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { HttpAuthService } from '@backstage/backend-plugin-api'; -import { HttpRouterFactoryOptions } from '@backstage/backend-app-api'; +import { HttpRouterFactoryOptions } from '@backstage/backend-defaults/httpRouter'; import { HttpRouterService } from '@backstage/backend-plugin-api'; import { IdentityService } from '@backstage/backend-plugin-api'; import { JsonObject } from '@backstage/types'; @@ -32,7 +32,7 @@ import { LifecycleService } from '@backstage/backend-plugin-api'; import { LoggerService } from '@backstage/backend-plugin-api'; import { PermissionsService } from '@backstage/backend-plugin-api'; import { RootConfigService } from '@backstage/backend-plugin-api'; -import { RootHttpRouterFactoryOptions } from '@backstage/backend-app-api'; +import { RootHttpRouterFactoryOptions } from '@backstage/backend-defaults/rootHttpRouter'; import { RootHttpRouterService } from '@backstage/backend-plugin-api'; import { RootLifecycleService } from '@backstage/backend-plugin-api'; import { RootLoggerService } from '@backstage/backend-plugin-api'; diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 40523b1e04..9db94acc3e 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-test-utils", - "version": "0.4.0-next.3", + "version": "0.4.0", "description": "Test helpers library for Backstage backends", "backstage": { "role": "node-library" @@ -46,6 +46,7 @@ }, "dependencies": { "@backstage/backend-app-api": "workspace:^", + "@backstage/backend-defaults": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", diff --git a/packages/backend-test-utils/src/next/services/mockServices.ts b/packages/backend-test-utils/src/next/services/mockServices.ts index 57621a9209..24571b634c 100644 --- a/packages/backend-test-utils/src/next/services/mockServices.ts +++ b/packages/backend-test-utils/src/next/services/mockServices.ts @@ -14,48 +14,48 @@ * limitations under the License. */ +import { cacheServiceFactory } from '@backstage/backend-defaults/cache'; +import { databaseServiceFactory } from '@backstage/backend-defaults/database'; import { - RootConfigService, - coreServices, - createServiceFactory, + HostDiscovery, + discoveryServiceFactory, +} from '@backstage/backend-defaults/discovery'; +import { httpRouterServiceFactory } from '@backstage/backend-defaults/httpRouter'; +import { lifecycleServiceFactory } from '@backstage/backend-defaults/lifecycle'; +import { loggerServiceFactory } from '@backstage/backend-defaults/logger'; +import { permissionsServiceFactory } from '@backstage/backend-defaults/permissions'; +import { rootHttpRouterServiceFactory } from '@backstage/backend-defaults/rootHttpRouter'; +import { rootLifecycleServiceFactory } from '@backstage/backend-defaults/rootLifecycle'; +import { schedulerServiceFactory } from '@backstage/backend-defaults/scheduler'; +import { urlReaderServiceFactory } from '@backstage/backend-defaults/urlReader'; +import { + AuthService, + BackstageCredentials, + BackstageUserInfo, + DiscoveryService, + HttpAuthService, IdentityService, LoggerService, + RootConfigService, ServiceFactory, ServiceRef, TokenManagerService, - AuthService, - DiscoveryService, - HttpAuthService, - BackstageCredentials, - BackstageUserInfo, UserInfoService, + coreServices, + createServiceFactory, } from '@backstage/backend-plugin-api'; -import { - cacheServiceFactory, - databaseServiceFactory, - httpRouterServiceFactory, - lifecycleServiceFactory, - loggerServiceFactory, - permissionsServiceFactory, - rootHttpRouterServiceFactory, - rootLifecycleServiceFactory, - schedulerServiceFactory, - urlReaderServiceFactory, - discoveryServiceFactory, - HostDiscovery, -} from '@backstage/backend-app-api'; import { ConfigReader } from '@backstage/config'; -import { JsonObject } from '@backstage/types'; -import { MockIdentityService } from './MockIdentityService'; -import { MockRootLoggerService } from './MockRootLoggerService'; -import { MockAuthService } from './MockAuthService'; -import { MockHttpAuthService } from './MockHttpAuthService'; -import { mockCredentials } from './mockCredentials'; -import { MockUserInfoService } from './MockUserInfoService'; import { eventsServiceFactory, eventsServiceRef, } from '@backstage/plugin-events-node'; +import { JsonObject } from '@backstage/types'; +import { MockAuthService } from './MockAuthService'; +import { MockHttpAuthService } from './MockHttpAuthService'; +import { MockIdentityService } from './MockIdentityService'; +import { MockRootLoggerService } from './MockRootLoggerService'; +import { MockUserInfoService } from './MockUserInfoService'; +import { mockCredentials } from './mockCredentials'; /** @internal */ function createLoggerMock() { diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts index a4b74b5ffa..ecba34290d 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts @@ -144,7 +144,7 @@ describe('TestBackend', () => { }); await startTestBackend({ - features: [testModule(), sf()], + features: [testModule, sf()], }); expect(testFn).toHaveBeenCalledWith('winning'); @@ -169,7 +169,7 @@ describe('TestBackend', () => { }); const backend = await startTestBackend({ - features: [testModule()], + features: [testModule], }); expect(shutdownSpy).not.toHaveBeenCalled(); @@ -212,7 +212,7 @@ describe('TestBackend', () => { }); await startTestBackend({ - features: [testPlugin()], + features: [testPlugin], }); }); @@ -233,7 +233,7 @@ describe('TestBackend', () => { }, }); - const { server } = await startTestBackend({ features: [testPlugin()] }); + const { server } = await startTestBackend({ features: [testPlugin] }); const res = await request(server) .get('/api/test/ping-me') diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.ts index e43353991f..f23883ba3e 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.ts @@ -133,7 +133,7 @@ function createExtensionPointTestModules( ref: ExtensionPoint, impl: unknown, ][], -): Array<() => BackendFeature> { +): Array { if (!extensionPointTuples) { return []; } diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 2a070cd28a..a606e77894 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,42 @@ # example-backend +## 0.0.27 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/plugin-techdocs-backend@1.10.6 + - @backstage/plugin-scaffolder-backend-module-github@0.3.0 + - @backstage/plugin-devtools-backend@0.3.5 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-search-backend@1.5.10 + - @backstage/plugin-proxy-backend@0.5.0 + - @backstage/plugin-app-backend@0.3.68 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.16 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.2.2 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16 + - @backstage/plugin-auth-backend-module-guest-provider@0.1.5 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6 + - @backstage/plugin-catalog-backend-module-openapi@0.1.37 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-search-backend-module-explore@0.1.25 + - @backstage/plugin-notifications-backend@0.3.0 + - @backstage/plugin-kubernetes-backend@0.18.0 + - @backstage/plugin-permission-backend@0.5.43 + - @backstage/plugin-scaffolder-backend@1.22.9 + - @backstage/plugin-signals-backend@0.1.5 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + ## 0.0.27-next.3 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 80a5f5b614..1a0c493a38 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.0.27-next.3", + "version": "0.0.27", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/cli-common/CHANGELOG.md b/packages/cli-common/CHANGELOG.md index 7eb1b29e29..29ffc4984c 100644 --- a/packages/cli-common/CHANGELOG.md +++ b/packages/cli-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/cli-common +## 0.1.14 + +### Patch Changes + +- 142abb0: The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`. + ## 0.1.14-next.0 ### Patch Changes diff --git a/packages/cli-common/package.json b/packages/cli-common/package.json index 63b7d56d03..c316f15322 100644 --- a/packages/cli-common/package.json +++ b/packages/cli-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/cli-common", - "version": "0.1.14-next.0", + "version": "0.1.14", "description": "Common functionality used by cli, backend, and create-app", "backstage": { "role": "node-library" diff --git a/packages/cli-node/CHANGELOG.md b/packages/cli-node/CHANGELOG.md index 72608fb4c4..dcf9073277 100644 --- a/packages/cli-node/CHANGELOG.md +++ b/packages/cli-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/cli-node +## 0.2.6 + +### Patch Changes + +- a1ae9cc: Updated doc link. +- c328131: Added new plugin metadata fields to `BackstagePackageJson` type. +- 93be042: Upgraded @yarnpkg/parsers to stable 3.0 +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.6-next.2 ### Patch Changes diff --git a/packages/cli-node/package.json b/packages/cli-node/package.json index 38525c9854..56cf50a096 100644 --- a/packages/cli-node/package.json +++ b/packages/cli-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/cli-node", - "version": "0.2.6-next.2", + "version": "0.2.6", "description": "Node.js library for Backstage CLIs", "backstage": { "role": "node-library" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 4d769a6772..ecbed0abdc 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/cli +## 0.26.7 + +### Patch Changes + +- 788eca7: Fix readme for new plugins created using cli +- 90c5268: Add `peerDependencies` to `devDependencies` in `package.json.hbs` templates. +- c00f7ee: Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies +- b0f66e9: Updated dependency `vite-plugin-node-polyfills` to `^0.22.0`. +- c328131: Added a new `--publish` flag to the `repo fix` command. This command will validate and if possible generate the metadata required for publishing packages with the Backstage CLI. In addition, a check has been added that the `backstage.pluginId` and `backstage.pluginPackage(s)` fields are present when packing a package for publishing. +- 5afbe1d: Export default module for `scaffolder-action` cli template +- 009da47: Fix `versions:check --fix` when `yarn.lock` has multiple joint versions in the same section +- 9ee948a: Bump `esbuild` target for package builds to `ES2022`. +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/eslint-plugin@0.1.8 + - @backstage/release-manifests@0.0.11 + - @backstage/types@1.1.1 + ## 0.26.7-next.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index bdaf29bc13..573a3ae030 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/cli", - "version": "0.26.7-next.3", + "version": "0.26.7", "description": "CLI for developing Backstage plugins and apps", "backstage": { "role": "cli" @@ -187,13 +187,13 @@ "nodemon": "^3.0.1", "vite": "^4.4.9", "vite-plugin-html": "^3.2.0", - "vite-plugin-node-polyfills": "^0.21.0" + "vite-plugin-node-polyfills": "^0.22.0" }, "peerDependencies": { "@vitejs/plugin-react": "^4.0.4", "vite": "^4.4.9", "vite-plugin-html": "^3.2.0", - "vite-plugin-node-polyfills": "^0.21.0" + "vite-plugin-node-polyfills": "^0.22.0" }, "peerDependenciesMeta": { "@vitejs/plugin-react": { diff --git a/packages/cli/src/commands/versions/bump.ts b/packages/cli/src/commands/versions/bump.ts index 1544240704..d6d5f424ba 100644 --- a/packages/cli/src/commands/versions/bump.ts +++ b/packages/cli/src/commands/versions/bump.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +import { bootstrap } from 'global-agent'; + +if (shouldUseGlobalAgent()) { + bootstrap(); +} + import fs from 'fs-extra'; import chalk from 'chalk'; import ora from 'ora'; @@ -38,10 +44,22 @@ import { getManifestByVersion, ReleaseManifest, } from '@backstage/release-manifests'; -import 'global-agent/bootstrap'; import { PackageGraph } from '@backstage/cli-node'; import { migrateMovedPackages } from './migrate'; +function shouldUseGlobalAgent(): boolean { + // see https://www.npmjs.com/package/global-agent + const namespace = + process.env.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE ?? 'GLOBAL_AGENT_'; + if ( + process.env[`${namespace}HTTP_PROXY`] || + process.env[`${namespace}HTTPS_PROXY`] + ) { + return true; + } + return false; +} + const DEP_TYPES = [ 'dependencies', 'devDependencies', diff --git a/packages/cli/src/lib/new/factories/scaffolderModule.test.ts b/packages/cli/src/lib/new/factories/scaffolderModule.test.ts index b43946228b..d83c2ce3f7 100644 --- a/packages/cli/src/lib/new/factories/scaffolderModule.test.ts +++ b/packages/cli/src/lib/new/factories/scaffolderModule.test.ts @@ -80,6 +80,7 @@ describe('scaffolderModule factory', () => { 'copying example.test.ts', 'copying example.ts', 'copying index.ts', + 'copying module.ts', 'Installing:', `moving plugins${sep}scaffolder-backend-module-test`, ]); diff --git a/packages/cli/src/lib/packager/productionPack.ts b/packages/cli/src/lib/packager/productionPack.ts index 6a59924a30..3c2b5aa89e 100644 --- a/packages/cli/src/lib/packager/productionPack.ts +++ b/packages/cli/src/lib/packager/productionPack.ts @@ -180,7 +180,9 @@ async function prepareExportsEntryPoints( await fs.writeJson( resolvePath(entryPointDir, PKG_PATH), { - name: pkg.name, + // Need a temporary name, as sharing the same name causes some typescript issues with caching of packages names + // And their defined `types` field. + name: `${pkg.name}__${entryPoint.name.toLocaleLowerCase('en-US')}`, version: pkg.version, ...(exp.default ? { main: posixPath.join('..', exp.default) } : {}), ...(exp.import ? { module: posixPath.join('..', exp.import) } : {}), diff --git a/packages/cli/src/lib/versioning/Lockfile.ts b/packages/cli/src/lib/versioning/Lockfile.ts index 6af115a4da..50d0a77cfd 100644 --- a/packages/cli/src/lib/versioning/Lockfile.ts +++ b/packages/cli/src/lib/versioning/Lockfile.ts @@ -98,24 +98,6 @@ export class Lockfile { return Lockfile.parse(lockfileContents); } - static #getRangesFromDataKey(key: string): string[] { - const [, name, ranges] = key.match(ENTRY_PATTERN) ?? []; - if (!name) { - throw new Error(`Failed to parse yarn.lock entry '${key}'`); - } - - return ranges.split(/\s*,\s*/).map(rangePart => { - let range = rangePart; - if (range.startsWith(`${name}@`)) { - range = range.slice(`${name}@`.length); - } - if (range.startsWith('npm:')) { - range = range.slice('npm:'.length); - } - return range; - }); - } - static parse(content: string) { const legacy = LEGACY_REGEX.test(content); @@ -131,7 +113,7 @@ export class Lockfile { for (const [key, value] of Object.entries(data)) { if (SPECIAL_OBJECT_KEYS.includes(key)) continue; - const [, name] = ENTRY_PATTERN.exec(key) ?? []; + const [, name, ranges] = ENTRY_PATTERN.exec(key) ?? []; if (!name) { throw new Error(`Failed to parse yarn.lock entry '${key}'`); } @@ -141,8 +123,13 @@ export class Lockfile { queries = []; packages.set(name, queries); } - const ranges = Lockfile.#getRangesFromDataKey(key); - for (const range of ranges) { + for (let range of ranges.split(/\s*,\s*/)) { + if (range.startsWith(`${name}@`)) { + range = range.slice(`${name}@`.length); + } + if (range.startsWith('npm:')) { + range = range.slice('npm:'.length); + } queries.push({ range, version: value.version, dataKey: key }); } } @@ -289,34 +276,9 @@ export class Lockfile { } remove(name: string, range: string): boolean { - const simpleQuery = `${name}@${range}`; - const query = this.getEntryOf(name, range); - + const query = `${name}@${range}`; const existed = Boolean(this.data[query]); - - if (simpleQuery === query) { - // Single-versioned entry, just delete - delete this.data[query]; - } else { - // Remove this version from the entry key. This modifies the key, so the - // package queries' needs to be updated too. - const newRanges = Lockfile.#getRangesFromDataKey(query).filter( - q => q !== simpleQuery, - ); - const newQuery = newRanges.join(', '); - - // Replace the entry with a new one without this particular range - const entry = this.data[query]; - delete this.data[query]; - this.data[newQuery] = entry; - - // Fix all package queries pointing to the old query - this.packages.get(name)?.forEach(q => { - if (q.dataKey === query) { - q.dataKey = newQuery; - } - }); - } + delete this.data[query]; const newEntries = this.packages.get(name)?.filter(e => e.range !== range); if (newEntries) { @@ -326,35 +288,19 @@ export class Lockfile { return existed; } - getEntryOf(name: string, range: string) { - const query = this.packages.get(name)?.find(q => q.range === range); - if (!query) { - throw new Error(`No entry data for ${name}@${range}`); - } - - return query.dataKey; - } - /** Modifies the lockfile by bumping packages to the suggested versions */ replaceVersions(results: AnalyzeResultNewVersion[]) { - // When replacing versions, we might replace the same version multiple times, - // as a query may contain multiple versions. This keeps the original version, - // to ensure we don't make mistakes. - const oldVersions = Object.fromEntries( - Object.entries(this.data).map(([key, val]) => [key, val.version]), - ); - for (const { name, range, oldVersion, newVersion } of results) { - const query = this.getEntryOf(name, range); + const query = `${name}@${range}`; // Update the backing data const entryData = this.data[query]; if (!entryData) { throw new Error(`No entry data for ${query}`); } - if (oldVersions[query] !== oldVersion) { + if (entryData.version !== oldVersion) { throw new Error( - `Expected existing version data for ${query} to be ${oldVersion}, was ${oldVersions[query]}`, + `Expected existing version data for ${query} to be ${oldVersion}, was ${entryData.version}`, ); } diff --git a/packages/cli/templates/scaffolder-module/src/actions/example/index.ts b/packages/cli/templates/scaffolder-module/src/actions/example/index.ts index e81099f333..06ce5befc0 100644 --- a/packages/cli/templates/scaffolder-module/src/actions/example/index.ts +++ b/packages/cli/templates/scaffolder-module/src/actions/example/index.ts @@ -1 +1,7 @@ +import { scaffolderModule } from './module'; + +/* + @deprecated - this way of importing modules will soon be unsupported, and you should use `backend.add(import(...))` instead. +*/ export { createAcmeExampleAction } from './example'; +export default scaffolderModule; diff --git a/packages/cli/templates/scaffolder-module/src/actions/example/module.ts b/packages/cli/templates/scaffolder-module/src/actions/example/module.ts new file mode 100644 index 0000000000..238268dcec --- /dev/null +++ b/packages/cli/templates/scaffolder-module/src/actions/example/module.ts @@ -0,0 +1,21 @@ +import { createBackendModule } from "@backstage/backend-plugin-api"; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createAcmeExampleAction } from "./example"; + +/** + * A backend module that registers the action into the scaffolder + */ +export const scaffolderModule = createBackendModule({ + moduleId: 'acme:example', + pluginId: 'scaffolder', + register({ registerInit }) { + registerInit({ + deps: { + scaffolderActions: scaffolderActionsExtensionPoint + }, + async init({ scaffolderActions}) { + scaffolderActions.addActions(createAcmeExampleAction()); + } + }); + }, +}) diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 968fd850d3..2a47e34b54 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/codemods +## 0.1.49 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + ## 0.1.49-next.0 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index a490369468..6bab6f3df8 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/codemods", - "version": "0.1.49-next.0", + "version": "0.1.49", "description": "A collection of codemods for Backstage projects", "backstage": { "role": "cli" diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index dc11c1f793..fb048e7237 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/config-loader +## 1.8.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.8.1-next.0 ### Patch Changes diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 1b8c25f14e..28718b8290 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/config-loader", - "version": "1.8.1-next.0", + "version": "1.8.1", "description": "Config loading functionality used by Backstage backend, and CLI", "backstage": { "role": "node-library" diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index 53a9807c61..7d65065bf5 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/core-app-api +## 1.12.6 + +### Patch Changes + +- 35fbe09: Added support for configuration of route bindings through static configuration, and default targets for external route refs. + + In addition to configuring route bindings through code, it is now also possible to configure route bindings under the `app.routes.bindings` key, for example: + + ```yaml + app: + routes: + bindings: + catalog.createComponent: catalog-import.importPage + ``` + + Each key in the route binding object is of the form `.`, where the route name is key used in the `externalRoutes` object passed to `createPlugin`. The value is of the same form, but with the name taken from the plugin `routes` option instead. + + The equivalent of the above configuration in code is the following: + + ```ts + const app = createApp({ + // ... + bindRoutes({ bind }) { + bind(catalogPlugin.externalRoutes, { + createComponent: catalogImportPlugin.routes.importPage, + }); + }, + }); + ``` + +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.12.6-next.0 ### Patch Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index 8c9c31946d..ea953c4ebe 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": "1.12.6-next.0", + "version": "1.12.6", "publishConfig": { "access": "public" }, diff --git a/packages/core-compat-api/CHANGELOG.md b/packages/core-compat-api/CHANGELOG.md index 3c307d7a3b..b51c51eed4 100644 --- a/packages/core-compat-api/CHANGELOG.md +++ b/packages/core-compat-api/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-compat-api +## 0.2.6 + +### Patch Changes + +- 35fbe09: Add support for forwarding default target from legacy external route refs. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/version-bridge@1.0.8 + ## 0.2.6-next.2 ### Patch Changes diff --git a/packages/core-compat-api/package.json b/packages/core-compat-api/package.json index a145668efd..d275332f0b 100644 --- a/packages/core-compat-api/package.json +++ b/packages/core-compat-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/core-compat-api", - "version": "0.2.6-next.2", + "version": "0.2.6", "backstage": { "role": "web-library" }, diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index e10d4f3a1f..af800e77a8 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/core-components +## 0.14.8 + +### Patch Changes + +- a0b46f6: Having tooltip inherit font size for consistency in catalog table columns +- 59cee81: Use `inherit` variant on OverflowTooltip underlying Typography component. +- eae0e4d: Fixed an issue causing `SidebarSubmenu` text to not follow the theme color +- e4811ec: Make number of decimal digits in Gauge configurable via the `decimalDigits` property +- 83c4251: Adds icons to status component +- 3e175c8: Removed max width from `Select` component. +- 57d7582: Fixed a bug in `SupportButton` where the title was rendered with the characteristics of a button. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/version-bridge@1.0.8 + ## 0.14.8-next.2 ### Patch Changes diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 0f71bcb004..597b1a9abf 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -450,6 +450,8 @@ export type GaugeProps = { size?: 'normal' | 'small'; description?: ReactNode; getColor?: GaugePropsGetColor; + relativeToMax?: boolean; + decimalDigits?: number; }; // @public (undocumented) diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 34470eca79..74cb0d7fbb 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.14.8-next.2", + "version": "0.14.8", "publishConfig": { "access": "public" }, diff --git a/packages/core-components/src/components/ProgressBars/Gauge.test.tsx b/packages/core-components/src/components/ProgressBars/Gauge.test.tsx index 2d9e852e6c..2d92391a30 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.test.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.test.tsx @@ -47,6 +47,27 @@ describe('', () => { getByText('10m'); }); + it('handle relativeToMax prop', async () => { + const { getByText } = await renderInTestApp( + , + ); + getByText('7 pts'); + }); + + it('handle decimalDigits prop', async () => { + const { getByText } = await renderInTestApp( + , + ); + getByText('5.50/10'); + }); + const ok = '#111'; const warning = '#222'; const error = '#333'; diff --git a/packages/core-components/src/components/ProgressBars/Gauge.tsx b/packages/core-components/src/components/ProgressBars/Gauge.tsx index e72172fd59..a1ddbff4ea 100644 --- a/packages/core-components/src/components/ProgressBars/Gauge.tsx +++ b/packages/core-components/src/components/ProgressBars/Gauge.tsx @@ -75,6 +75,8 @@ export type GaugeProps = { size?: 'normal' | 'small'; description?: ReactNode; getColor?: GaugePropsGetColor; + relativeToMax?: boolean; + decimalDigits?: number; }; /** @public */ @@ -93,6 +95,7 @@ const defaultGaugeProps = { inverse: false, unit: '%', max: 100, + relativeToMax: false, }; export const getProgressColor: GaugePropsGetColor = ({ @@ -129,13 +132,36 @@ export function Gauge(props: GaugeProps) { const { getColor = getProgressColor, size = 'normal' } = props; const classes = useStyles(props); const { palette } = useTheme(); - const { value, fractional, inverse, unit, max, description } = { + const { + value, + fractional, + inverse, + unit, + max, + description, + relativeToMax, + decimalDigits, + } = { ...defaultGaugeProps, ...props, }; - const asPercentage = fractional ? Math.round(value * max) : value; - const asActual = max !== 100 ? Math.round(value) : asPercentage; + let asPercentage: number; + if (relativeToMax) { + asPercentage = (value / max) * 100; + } else { + asPercentage = fractional ? Math.round(value * max) : value; + } + let asActual: number; + if (relativeToMax) { + asActual = value; + } else { + asActual = max !== 100 ? Math.round(value) : asPercentage; + } + const asDisplay = + decimalDigits === undefined + ? asActual.toString() + : asActual.toFixed(decimalDigits); const [isHovering, setIsHovering] = useState(false); @@ -164,7 +190,12 @@ export function Gauge(props: GaugeProps) { percent={asPercentage} strokeWidth={12} trailWidth={12} - strokeColor={getColor({ palette, value: asActual, inverse, max })} + strokeColor={getColor({ + palette, + value: asPercentage, + inverse, + max: relativeToMax ? 100 : max, + })} className={classes.circle} /> {description && isHovering ? ( @@ -175,7 +206,7 @@ export function Gauge(props: GaugeProps) { [classes.overlaySmall]: size === 'small', })} > - {isNaN(value) ? 'N/A' : `${asActual}${unit}`} + {isNaN(value) ? 'N/A' : `${asDisplay}${unit}`} )} diff --git a/packages/core-plugin-api/CHANGELOG.md b/packages/core-plugin-api/CHANGELOG.md index 80e969d40c..9546a747ca 100644 --- a/packages/core-plugin-api/CHANGELOG.md +++ b/packages/core-plugin-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/core-plugin-api +## 1.9.3 + +### Patch Changes + +- 35fbe09: A new `defaultTarget` option has been added to `createExternalRouteRef`. This allows one to specify a default target of the route by name, for example `'catalog.catalogIndex'`, which will be used if the target route is present in the app and there is no explicit route binding. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.9.3-next.0 ### Patch Changes diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 9cb5dca728..34d626afd9 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": "1.9.3-next.0", + "version": "1.9.3", "publishConfig": { "access": "public" }, diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index a4f3109722..6ab3cb0882 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/create-app +## 0.5.16 + +### Patch Changes + +- cce0495: Bumped create-app version. +- 77da22e: Bumped create-app version. +- 2110d76: Removed `dockerode` dependency. +- 34daaea: Fixed a broken link to the node-postgres documentation +- 78363f6: Bumped TypeScript to version `5.4`. +- 1a212f9: Remove Tech Radar menu item from sidebar of scaffolded app to align with removal of tech-radar plugin from backend +- 81507c8: Updated `node-gyp` to v10 +- Updated dependencies + - @backstage/cli-common@0.1.14 + ## 0.5.16-next.3 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 68420fb52b..066dad2b57 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.5.16-next.3", + "version": "0.5.16", "publishConfig": { "access": "public" }, diff --git a/packages/create-app/templates/default-app/packages/backend/package.json.hbs b/packages/create-app/templates/default-app/packages/backend/package.json.hbs index 049ea1c30c..8d95ee60a5 100644 --- a/packages/create-app/templates/default-app/packages/backend/package.json.hbs +++ b/packages/create-app/templates/default-app/packages/backend/package.json.hbs @@ -40,14 +40,12 @@ "@backstage/plugin-techdocs-backend": "^{{version '@backstage/plugin-techdocs-backend'}}", "app": "link:../app", "better-sqlite3": "^9.0.0", - "dockerode": "^3.3.1", "node-gyp": "^10.0.0", "pg": "^8.11.3", "winston": "^3.2.1" }, "devDependencies": { "@backstage/cli": "^{{version '@backstage/cli'}}", - "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", "@types/luxon": "^2.0.4" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index fda76c1623..b28267c160 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/dev-utils +## 1.0.33 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/catalog-model@1.5.0 + ## 1.0.33-next.2 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index fe58a79069..ed887bce11 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/dev-utils", - "version": "1.0.33-next.2", + "version": "1.0.33", "description": "Utilities for developing Backstage plugins.", "backstage": { "role": "web-library" diff --git a/packages/e2e-test/CHANGELOG.md b/packages/e2e-test/CHANGELOG.md index fe9af03e43..4a4edf005e 100644 --- a/packages/e2e-test/CHANGELOG.md +++ b/packages/e2e-test/CHANGELOG.md @@ -1,5 +1,14 @@ # e2e-test +## 0.2.17 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.5.16 + - @backstage/cli-common@0.1.14 + - @backstage/errors@1.2.4 + ## 0.2.17-next.2 ### Patch Changes diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index c2740a2830..63536bc4a3 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -1,7 +1,7 @@ { "name": "e2e-test", "description": "E2E test for verifying Backstage packages", - "version": "0.2.17-next.2", + "version": "0.2.17", "private": true, "backstage": { "role": "cli" diff --git a/packages/frontend-app-api/CHANGELOG.md b/packages/frontend-app-api/CHANGELOG.md index 65b4e9b0b9..be9eab1863 100644 --- a/packages/frontend-app-api/CHANGELOG.md +++ b/packages/frontend-app-api/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/frontend-app-api +## 0.7.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 0.7.1-next.2 ### Patch Changes diff --git a/packages/frontend-app-api/package.json b/packages/frontend-app-api/package.json index a2db39277a..401fcfc529 100644 --- a/packages/frontend-app-api/package.json +++ b/packages/frontend-app-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-app-api", - "version": "0.7.1-next.2", + "version": "0.7.1", "backstage": { "role": "web-library" }, diff --git a/packages/frontend-plugin-api/CHANGELOG.md b/packages/frontend-plugin-api/CHANGELOG.md index d0336cae85..0ac7968290 100644 --- a/packages/frontend-plugin-api/CHANGELOG.md +++ b/packages/frontend-plugin-api/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/frontend-plugin-api +## 0.6.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 0.6.6-next.2 ### Patch Changes diff --git a/packages/frontend-plugin-api/package.json b/packages/frontend-plugin-api/package.json index 9e4e5eac97..ad8cb41ca9 100644 --- a/packages/frontend-plugin-api/package.json +++ b/packages/frontend-plugin-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-plugin-api", - "version": "0.6.6-next.2", + "version": "0.6.6", "backstage": { "role": "web-library" }, diff --git a/packages/frontend-test-utils/CHANGELOG.md b/packages/frontend-test-utils/CHANGELOG.md index 95064be18b..db6adef523 100644 --- a/packages/frontend-test-utils/CHANGELOG.md +++ b/packages/frontend-test-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/frontend-test-utils +## 0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-app-api@0.7.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/test-utils@1.5.6 + - @backstage/types@1.1.1 + ## 0.1.8-next.2 ### Patch Changes diff --git a/packages/frontend-test-utils/package.json b/packages/frontend-test-utils/package.json index 2671165b13..f51df52828 100644 --- a/packages/frontend-test-utils/package.json +++ b/packages/frontend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-test-utils", - "version": "0.1.8-next.2", + "version": "0.1.8", "backstage": { "role": "web-library" }, diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 703eccbdad..5952b43cbd 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/integration-react +## 1.1.28 + +### Patch Changes + +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- Updated dependencies + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/config@1.2.0 + ## 1.1.28-next.1 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 79cf7694fd..34e91e0110 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/integration-react", - "version": "1.1.28-next.1", + "version": "1.1.28", "description": "Frontend package for managing integrations towards external systems", "backstage": { "role": "web-library" diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 928e62d67f..f50b992f3c 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/integration +## 1.12.0 + +### Minor Changes + +- be1014d: **BREAKING** Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: + + - `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead) + - `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead) + - `GitHubIntegration` (use `GithubIntegration` instead) + - `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead) + - `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead) + - `replaceGitHubUrlType` (use `replaceGithubUrlType` instead) + +- 395b973: Implemented `readTree` for Harness provider to support TechDocs functionality +- 662dce8: **BREAKING**: `gitilesBaseUrl` is now mandatory for the Gerrit integration. The + ability to override this requirement using the `DISABLE_GERRIT_GITILES_REQUIREMENT` + environment variable has been removed. + +### Patch Changes + +- 509e08c: Updated function for getHarnessEditContentsUrl +- 23ee9ab: Fix AWS CodeCommit integration by allowing to change the host +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 1.12.0-next.1 ### Minor Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index 9adc2519f1..56b7b1bd82 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/integration", - "version": "1.12.0-next.1", + "version": "1.12.0", "description": "Helpers for managing integrations towards external systems", "backstage": { "role": "common-library" diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 1a303a9c07..aa65b502a0 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/repo-tools +## 0.9.1 + +### Patch Changes + +- 8721a02: Add `--client-additional-properties` option to `openapi generate` command +- Updated dependencies + - @backstage/cli-node@0.2.6 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + ## 0.9.1-next.3 ### Patch Changes diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 905d783369..30f003aea5 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/repo-tools", "description": "CLI for Backstage repo tooling ", - "version": "0.9.1-next.3", + "version": "0.9.1", "publishConfig": { "access": "public" }, diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index f35df3e326..da77dd57ad 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,24 @@ # techdocs-cli-embedded-app +## 0.2.97 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-techdocs@1.10.6 + - @backstage/cli@0.26.7 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog@1.21.0 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/app-defaults@1.5.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/test-utils@1.5.6 + ## 0.2.97-next.2 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index b19ad856c8..ad2da35606 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,6 +1,6 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.97-next.2", + "version": "0.2.97", "private": true, "backstage": { "role": "frontend" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 59f4d5f7d3..5ff165c4a9 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,17 @@ # @techdocs/cli +## 1.8.12 + +### Patch Changes + +- 2110d76: Removed `dockerode` dependency. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/cli-common@0.1.14 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 1.8.12-next.3 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 74c90b4854..9c87235af7 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.8.12-next.3", + "version": "1.8.12", "publishConfig": { "access": "public" }, @@ -56,14 +56,12 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "workspace:^", + "@backstage/backend-defaults": "workspace:^", "@backstage/catalog-model": "workspace:^", "@backstage/cli-common": "workspace:^", "@backstage/config": "workspace:^", "@backstage/plugin-techdocs-node": "workspace:^", - "@types/dockerode": "^3.3.0", "commander": "^12.0.0", - "dockerode": "^4.0.0", "fs-extra": "^11.0.0", "global-agent": "^3.0.0", "http-proxy": "^1.18.1", diff --git a/packages/techdocs-cli/src/commands/generate/generate.ts b/packages/techdocs-cli/src/commands/generate/generate.ts index bf6910ff4a..4553c18810 100644 --- a/packages/techdocs-cli/src/commands/generate/generate.ts +++ b/packages/techdocs-cli/src/commands/generate/generate.ts @@ -17,16 +17,11 @@ import { resolve } from 'path'; import { OptionValues } from 'commander'; import fs from 'fs-extra'; -import Docker from 'dockerode'; import { TechdocsGenerator, ParsedLocationAnnotation, getMkdocsYml, } from '@backstage/plugin-techdocs-node'; -import { - ContainerRunner, - DockerContainerRunner, -} from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { convertTechDocsRefToLocationAnnotation, @@ -75,14 +70,6 @@ export default async function generate(opts: OptionValues) { }, }); - // Docker client (conditionally) used by the generators, based on techdocs.generators config. - let containerRunner: ContainerRunner | undefined; - - if (opts.docker) { - const dockerClient = new Docker(); - containerRunner = new DockerContainerRunner({ dockerClient }); - } - let parsedLocationAnnotation = {} as ParsedLocationAnnotation; if (opts.techdocsRef) { try { @@ -97,7 +84,6 @@ export default async function generate(opts: OptionValues) { // Generate docs using @backstage/plugin-techdocs-node const techdocsGenerator = await TechdocsGenerator.fromConfig(config, { logger, - containerRunner, }); logger.info('Generating documentation...'); diff --git a/packages/techdocs-cli/src/commands/migrate/migrate.ts b/packages/techdocs-cli/src/commands/migrate/migrate.ts index 1340d852f6..ab11585493 100644 --- a/packages/techdocs-cli/src/commands/migrate/migrate.ts +++ b/packages/techdocs-cli/src/commands/migrate/migrate.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { HostDiscovery } from '@backstage/backend-common'; +import { HostDiscovery } from '@backstage/backend-defaults/discovery'; import { Publisher } from '@backstage/plugin-techdocs-node'; import { OptionValues } from 'commander'; import { createLogger } from '../../lib/utility'; diff --git a/packages/techdocs-cli/src/commands/publish/publish.ts b/packages/techdocs-cli/src/commands/publish/publish.ts index 961f42c73b..ded578546a 100644 --- a/packages/techdocs-cli/src/commands/publish/publish.ts +++ b/packages/techdocs-cli/src/commands/publish/publish.ts @@ -17,7 +17,7 @@ import { resolve } from 'path'; import { OptionValues } from 'commander'; import { createLogger } from '../../lib/utility'; -import { HostDiscovery } from '@backstage/backend-common'; +import { HostDiscovery } from '@backstage/backend-defaults/discovery'; import { Publisher } from '@backstage/plugin-techdocs-node'; import { Entity } from '@backstage/catalog-model'; import { PublisherConfig } from '../../lib/PublisherConfig'; diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index ada9ea4654..893316d288 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/test-utils +## 1.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/core-app-api@1.12.6 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 1.5.6-next.2 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 7ab7a73af7..d2294c27b6 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/test-utils", - "version": "1.5.6-next.2", + "version": "1.5.6", "description": "Utilities to test Backstage plugins and apps.", "backstage": { "role": "web-library" diff --git a/packages/theme/CHANGELOG.md b/packages/theme/CHANGELOG.md index 0cd38f9265..94d85c535a 100644 --- a/packages/theme/CHANGELOG.md +++ b/packages/theme/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/theme +## 0.5.6 + +### Patch Changes + +- 702fa7d: Internal refactor to fix an issue where the MUI 5 `v5-` class prefixing gets removed by tree shaking. + ## 0.5.6-next.0 ### Patch Changes diff --git a/packages/theme/package.json b/packages/theme/package.json index 8cdb23c1ec..b199cb3061 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/theme", - "version": "0.5.6-next.0", + "version": "0.5.6", "description": "material-ui theme for use with Backstage.", "backstage": { "role": "web-library" diff --git a/packages/yarn-plugin/CHANGELOG.md b/packages/yarn-plugin/CHANGELOG.md index 6878933d9f..5a2e9f417f 100644 --- a/packages/yarn-plugin/CHANGELOG.md +++ b/packages/yarn-plugin/CHANGELOG.md @@ -1,5 +1,13 @@ # yarn-plugin-backstage +## 0.0.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.14 + - @backstage/release-manifests@0.0.11 + ## 0.0.1-next.0 ### Patch Changes diff --git a/packages/yarn-plugin/package.json b/packages/yarn-plugin/package.json index 7ff1b72fd8..ad42bdba23 100644 --- a/packages/yarn-plugin/package.json +++ b/packages/yarn-plugin/package.json @@ -1,6 +1,6 @@ { "name": "yarn-plugin-backstage", - "version": "0.0.1-next.0", + "version": "0.0.1", "description": "Yarn plugin for working with Backstage monorepos", "backstage": { "role": "node-library" diff --git a/plugins/api-docs-module-protoc-gen-doc/CHANGELOG.md b/plugins/api-docs-module-protoc-gen-doc/CHANGELOG.md index 9c0e32964e..7ce6311e1f 100644 --- a/plugins/api-docs-module-protoc-gen-doc/CHANGELOG.md +++ b/plugins/api-docs-module-protoc-gen-doc/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-api-docs-module-protoc-gen-doc +## 0.1.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + ## 0.1.7-next.0 ### Patch Changes diff --git a/plugins/api-docs-module-protoc-gen-doc/package.json b/plugins/api-docs-module-protoc-gen-doc/package.json index 3cab38359d..ce2758e528 100644 --- a/plugins/api-docs-module-protoc-gen-doc/package.json +++ b/plugins/api-docs-module-protoc-gen-doc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs-module-protoc-gen-doc", - "version": "0.1.7-next.0", + "version": "0.1.7", "description": "Additional functionalities for the api-docs plugin that renders the output of the protoc-gen-doc", "backstage": { "role": "frontend-plugin-module", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index b8284e69d7..5b8e039c4e 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-api-docs +## 0.11.6 + +### Patch Changes + +- 7f84039: The `registerComponent` external route will now by default bind to the catalog import page if it is available. +- 9cdc651: Make sure that the toggle button state is properly reflected in API cards +- d44a20a: Added additional plugin metadata to `package.json`. +- 96cd13e: `DefaultApiExplorerPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-catalog@1.21.0 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + ## 0.11.6-next.2 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 47526fb80d..b8aed9f360 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs", - "version": "0.11.6-next.2", + "version": "0.11.6", "description": "A Backstage plugin that helps represent API entities in the frontend", "backstage": { "role": "frontend-plugin", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 2dc4f3d1ef..90e9a080dd 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-app-backend +## 0.3.68 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 82c2b90: Restore the support of external config schema in the router of the `app-backend` plugin, which was broken in release `1.26.0`. + This support is critical for dynamic frontend plugins to have access to their config values. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-app-node@0.1.19 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.3.68-next.3 ### Patch Changes diff --git a/plugins/app-backend/api-report-alpha.md b/plugins/app-backend/api-report-alpha.md index 615065efd7..b51096b8f4 100644 --- a/plugins/app-backend/api-report-alpha.md +++ b/plugins/app-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const appPlugin: () => BackendFeature; +const appPlugin: BackendFeatureCompat; export default appPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index dd6a726a00..5071bdaf86 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-backend", - "version": "0.3.68-next.3", + "version": "0.3.68", "description": "A Backstage backend plugin that serves the Backstage frontend app", "backstage": { "role": "backend-plugin", diff --git a/plugins/app-backend/src/service/appPlugin.test.ts b/plugins/app-backend/src/service/appPlugin.test.ts index c239d476bd..1fc4d27cdc 100644 --- a/plugins/app-backend/src/service/appPlugin.test.ts +++ b/plugins/app-backend/src/service/appPlugin.test.ts @@ -47,7 +47,7 @@ describe('appPlugin', () => { it('boots', async () => { const { server } = await startTestBackend({ features: [ - appPlugin(), + appPlugin, mockServices.rootConfig.factory({ data: { app: { diff --git a/plugins/app-node/CHANGELOG.md b/plugins/app-node/CHANGELOG.md index e719fb306e..d16d233b2c 100644 --- a/plugins/app-node/CHANGELOG.md +++ b/plugins/app-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-app-node +## 0.1.19 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config-loader@1.8.1 + ## 0.1.19-next.2 ### Patch Changes diff --git a/plugins/app-node/package.json b/plugins/app-node/package.json index 94566895df..d008a82284 100644 --- a/plugins/app-node/package.json +++ b/plugins/app-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-node", - "version": "0.1.19-next.2", + "version": "0.1.19", "description": "Node.js library for the app plugin", "backstage": { "role": "node-library", diff --git a/plugins/app-visualizer/CHANGELOG.md b/plugins/app-visualizer/CHANGELOG.md index 7fb8f46223..d30dbfc0ca 100644 --- a/plugins/app-visualizer/CHANGELOG.md +++ b/plugins/app-visualizer/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-app-visualizer +## 0.1.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/frontend-plugin-api@0.6.6 + ## 0.1.7-next.2 ### Patch Changes diff --git a/plugins/app-visualizer/package.json b/plugins/app-visualizer/package.json index 6ab7831e09..5d8f9b2649 100644 --- a/plugins/app-visualizer/package.json +++ b/plugins/app-visualizer/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-visualizer", - "version": "0.1.7-next.2", + "version": "0.1.7", "description": "Visualizes the Backstage app structure", "backstage": { "role": "frontend-plugin", diff --git a/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md b/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md index e5cbd93934..ee68bd7df5 100644 --- a/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-auth-backend-module-atlassian-provider +## 0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` and `scopes` config options have been removed and replaced by the standard `additionalScopes` config. In addition, the `offline_access`, `read:jira-work`, and `read:jira-user` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.2.0-next.2 ### Minor Changes diff --git a/plugins/auth-backend-module-atlassian-provider/api-report.md b/plugins/auth-backend-module-atlassian-provider/api-report.md index 8a30e6b493..080206cdf7 100644 --- a/plugins/auth-backend-module-atlassian-provider/api-report.md +++ b/plugins/auth-backend-module-atlassian-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -25,6 +25,6 @@ export namespace atlassianSignInResolvers { } // @public (undocumented) -const authModuleAtlassianProvider: () => BackendFeature; +const authModuleAtlassianProvider: BackendFeatureCompat; export default authModuleAtlassianProvider; ``` diff --git a/plugins/auth-backend-module-atlassian-provider/package.json b/plugins/auth-backend-module-atlassian-provider/package.json index f0b847d6b7..c961892674 100644 --- a/plugins/auth-backend-module-atlassian-provider/package.json +++ b/plugins/auth-backend-module-atlassian-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-atlassian-provider", - "version": "0.2.0-next.2", + "version": "0.2.0", "description": "The atlassian-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md index ec67f5fa79..f96de94fa6 100644 --- a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-auth-backend-module-aws-alb-provider +## 0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + - @backstage/errors@1.2.4 + ## 0.1.11-next.3 ### Patch Changes diff --git a/plugins/auth-backend-module-aws-alb-provider/api-report.md b/plugins/auth-backend-module-aws-alb-provider/api-report.md index 1f95605114..7f4531419a 100644 --- a/plugins/auth-backend-module-aws-alb-provider/api-report.md +++ b/plugins/auth-backend-module-aws-alb-provider/api-report.md @@ -5,7 +5,7 @@ ```ts /// -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { JWTHeaderParameters } from 'jose'; import { KeyObject } from 'crypto'; import type { PassportProfile } from '@backstage/plugin-auth-node/'; @@ -13,7 +13,7 @@ import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleAwsAlbProvider: () => BackendFeature; +const authModuleAwsAlbProvider: BackendFeatureCompat; export { authModuleAwsAlbProvider }; export default authModuleAwsAlbProvider; diff --git a/plugins/auth-backend-module-aws-alb-provider/package.json b/plugins/auth-backend-module-aws-alb-provider/package.json index faf74b1eb6..c65df9e16e 100644 --- a/plugins/auth-backend-module-aws-alb-provider/package.json +++ b/plugins/auth-backend-module-aws-alb-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-aws-alb-provider", - "version": "0.1.11-next.3", + "version": "0.1.11", "description": "The aws-alb provider module for the Backstage auth backend.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-azure-easyauth-provider/CHANGELOG.md b/plugins/auth-backend-module-azure-easyauth-provider/CHANGELOG.md index 95c70cc6ca..2771262546 100644 --- a/plugins/auth-backend-module-azure-easyauth-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-azure-easyauth-provider/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-auth-backend-module-azure-easyauth-provider +## 0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + ## 0.1.2-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-azure-easyauth-provider/api-report.md b/plugins/auth-backend-module-azure-easyauth-provider/api-report.md index 3bdef66181..cb198f54db 100644 --- a/plugins/auth-backend-module-azure-easyauth-provider/api-report.md +++ b/plugins/auth-backend-module-azure-easyauth-provider/api-report.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Profile } from 'passport'; import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleAzureEasyAuthProvider: () => BackendFeature; +const authModuleAzureEasyAuthProvider: BackendFeatureCompat; export default authModuleAzureEasyAuthProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-azure-easyauth-provider/package.json b/plugins/auth-backend-module-azure-easyauth-provider/package.json index 232f80fe1a..8303ada7a9 100644 --- a/plugins/auth-backend-module-azure-easyauth-provider/package.json +++ b/plugins/auth-backend-module-azure-easyauth-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-azure-easyauth-provider", - "version": "0.1.2-next.2", + "version": "0.1.2", "description": "The azure-easyauth-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-bitbucket-provider/CHANGELOG.md b/plugins/auth-backend-module-bitbucket-provider/CHANGELOG.md index f8c3b6390b..3c21cc0498 100644 --- a/plugins/auth-backend-module-bitbucket-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-bitbucket-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-bitbucket-provider +## 0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `account` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.2-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-bitbucket-provider/api-report.md b/plugins/auth-backend-module-bitbucket-provider/api-report.md index 11df004d0e..6b71f62c69 100644 --- a/plugins/auth-backend-module-bitbucket-provider/api-report.md +++ b/plugins/auth-backend-module-bitbucket-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleBitbucketProvider: () => BackendFeature; +const authModuleBitbucketProvider: BackendFeatureCompat; export default authModuleBitbucketProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-bitbucket-provider/package.json b/plugins/auth-backend-module-bitbucket-provider/package.json index 458f65ae47..21653b691a 100644 --- a/plugins/auth-backend-module-bitbucket-provider/package.json +++ b/plugins/auth-backend-module-bitbucket-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-bitbucket-provider", - "version": "0.1.2-next.2", + "version": "0.1.2", "description": "The bitbucket-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md b/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md index bd41ad091d..781c1e2a7d 100644 --- a/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-auth-backend-module-cloudflare-access-provider +## 0.1.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.2-next.3 ### Patch Changes diff --git a/plugins/auth-backend-module-cloudflare-access-provider/api-report.md b/plugins/auth-backend-module-cloudflare-access-provider/api-report.md index 5a1b98e391..b728f52046 100644 --- a/plugins/auth-backend-module-cloudflare-access-provider/api-report.md +++ b/plugins/auth-backend-module-cloudflare-access-provider/api-report.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { CacheService } from '@backstage/backend-plugin-api'; import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public -const authModuleCloudflareAccessProvider: () => BackendFeature; +const authModuleCloudflareAccessProvider: BackendFeatureCompat; export default authModuleCloudflareAccessProvider; // @public diff --git a/plugins/auth-backend-module-cloudflare-access-provider/package.json b/plugins/auth-backend-module-cloudflare-access-provider/package.json index 15e7dfc69d..1d99725963 100644 --- a/plugins/auth-backend-module-cloudflare-access-provider/package.json +++ b/plugins/auth-backend-module-cloudflare-access-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-cloudflare-access-provider", - "version": "0.1.2-next.3", + "version": "0.1.2", "description": "The cloudflare-access-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md b/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md index 2061f04974..f42462e619 100644 --- a/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-auth-backend-module-gcp-iap-provider +## 0.2.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.14-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-gcp-iap-provider/api-report.md b/plugins/auth-backend-module-gcp-iap-provider/api-report.md index e282dd04b1..ccde0b8809 100644 --- a/plugins/auth-backend-module-gcp-iap-provider/api-report.md +++ b/plugins/auth-backend-module-gcp-iap-provider/api-report.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { JsonPrimitive } from '@backstage/types'; import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleGcpIapProvider: () => BackendFeature; +const authModuleGcpIapProvider: BackendFeatureCompat; export default authModuleGcpIapProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-gcp-iap-provider/package.json b/plugins/auth-backend-module-gcp-iap-provider/package.json index b390db9cdf..e8932d908c 100644 --- a/plugins/auth-backend-module-gcp-iap-provider/package.json +++ b/plugins/auth-backend-module-gcp-iap-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-gcp-iap-provider", - "version": "0.2.14-next.2", + "version": "0.2.14", "description": "A GCP IAP auth provider module for the Backstage auth backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-github-provider/CHANGELOG.md b/plugins/auth-backend-module-github-provider/CHANGELOG.md index b509ec3110..8a050e26c3 100644 --- a/plugins/auth-backend-module-github-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-github-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-github-provider +## 0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `read:user` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.16-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-github-provider/api-report.md b/plugins/auth-backend-module-github-provider/api-report.md index 3f2c5030d2..ed8b615033 100644 --- a/plugins/auth-backend-module-github-provider/api-report.md +++ b/plugins/auth-backend-module-github-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleGithubProvider: () => BackendFeature; +const authModuleGithubProvider: BackendFeatureCompat; export default authModuleGithubProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-github-provider/package.json b/plugins/auth-backend-module-github-provider/package.json index 226e51c039..d8d115454e 100644 --- a/plugins/auth-backend-module-github-provider/package.json +++ b/plugins/auth-backend-module-github-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-github-provider", - "version": "0.1.16-next.2", + "version": "0.1.16", "description": "The github-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md b/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md index da9a38f7dc..e448079c05 100644 --- a/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-gitlab-provider +## 0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `read_user` scope has been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.16-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-gitlab-provider/api-report.md b/plugins/auth-backend-module-gitlab-provider/api-report.md index d6ec7ee82a..664d04e856 100644 --- a/plugins/auth-backend-module-gitlab-provider/api-report.md +++ b/plugins/auth-backend-module-gitlab-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleGitlabProvider: () => BackendFeature; +const authModuleGitlabProvider: BackendFeatureCompat; export default authModuleGitlabProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-gitlab-provider/package.json b/plugins/auth-backend-module-gitlab-provider/package.json index a90a70ee19..4b7117e863 100644 --- a/plugins/auth-backend-module-gitlab-provider/package.json +++ b/plugins/auth-backend-module-gitlab-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-gitlab-provider", - "version": "0.1.16-next.2", + "version": "0.1.16", "description": "The gitlab-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-google-provider/CHANGELOG.md b/plugins/auth-backend-module-google-provider/CHANGELOG.md index 6cce19a35c..412e50d6aa 100644 --- a/plugins/auth-backend-module-google-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-google-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-google-provider +## 0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. In addition, the `openid`, `userinfo.email`, and `userinfo.profile` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.16-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-google-provider/api-report.md b/plugins/auth-backend-module-google-provider/api-report.md index 7fab5d33a9..5c6735c117 100644 --- a/plugins/auth-backend-module-google-provider/api-report.md +++ b/plugins/auth-backend-module-google-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleGoogleProvider: () => BackendFeature; +const authModuleGoogleProvider: BackendFeatureCompat; export default authModuleGoogleProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-google-provider/package.json b/plugins/auth-backend-module-google-provider/package.json index 73bea4510e..48271c34b9 100644 --- a/plugins/auth-backend-module-google-provider/package.json +++ b/plugins/auth-backend-module-google-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-google-provider", - "version": "0.1.16-next.2", + "version": "0.1.16", "description": "A Google auth provider module for the Backstage auth backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-guest-provider/CHANGELOG.md b/plugins/auth-backend-module-guest-provider/CHANGELOG.md index a22908f1c4..79f9767571 100644 --- a/plugins/auth-backend-module-guest-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-guest-provider/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-auth-backend-module-guest-provider +## 0.1.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + ## 0.1.5-next.3 ### Patch Changes diff --git a/plugins/auth-backend-module-guest-provider/api-report.md b/plugins/auth-backend-module-guest-provider/api-report.md index 773b80b9ba..85a067affa 100644 --- a/plugins/auth-backend-module-guest-provider/api-report.md +++ b/plugins/auth-backend-module-guest-provider/api-report.md @@ -3,9 +3,9 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @public (undocumented) -const authModuleGuestProvider: () => BackendFeature; +const authModuleGuestProvider: BackendFeatureCompat; export default authModuleGuestProvider; ``` diff --git a/plugins/auth-backend-module-guest-provider/package.json b/plugins/auth-backend-module-guest-provider/package.json index 35ed295f41..cf7491adf4 100644 --- a/plugins/auth-backend-module-guest-provider/package.json +++ b/plugins/auth-backend-module-guest-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-guest-provider", - "version": "0.1.5-next.3", + "version": "0.1.5", "description": "The guest-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md b/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md index 8f93dbdf87..2cb76d0866 100644 --- a/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-auth-backend-module-microsoft-provider +## 0.1.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration. +- d44a20a: Added additional plugin metadata to `package.json`. +- c187a9c: Minor internal type updates +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.14-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-microsoft-provider/api-report.md b/plugins/auth-backend-module-microsoft-provider/api-report.md index 33600c10d8..71a97579d5 100644 --- a/plugins/auth-backend-module-microsoft-provider/api-report.md +++ b/plugins/auth-backend-module-microsoft-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,10 +11,10 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public @deprecated (undocumented) -export const authModuleMicrosoftProvider: () => BackendFeature; +export const authModuleMicrosoftProvider: BackendFeatureCompat; // @public (undocumented) -const authModuleMicrosoftProvider_2: () => BackendFeature; +const authModuleMicrosoftProvider_2: BackendFeatureCompat; export default authModuleMicrosoftProvider_2; // @public (undocumented) diff --git a/plugins/auth-backend-module-microsoft-provider/package.json b/plugins/auth-backend-module-microsoft-provider/package.json index bea5991966..598c69118c 100644 --- a/plugins/auth-backend-module-microsoft-provider/package.json +++ b/plugins/auth-backend-module-microsoft-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-microsoft-provider", - "version": "0.1.14-next.2", + "version": "0.1.14", "description": "The microsoft-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md b/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md index 91e5ab6890..acec3a3065 100644 --- a/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-auth-backend-module-oauth2-provider +## 0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.2.0-next.2 ### Minor Changes diff --git a/plugins/auth-backend-module-oauth2-provider/api-report.md b/plugins/auth-backend-module-oauth2-provider/api-report.md index 5a927428ec..31bfddf18e 100644 --- a/plugins/auth-backend-module-oauth2-provider/api-report.md +++ b/plugins/auth-backend-module-oauth2-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleOauth2Provider: () => BackendFeature; +const authModuleOauth2Provider: BackendFeatureCompat; export default authModuleOauth2Provider; // @public (undocumented) diff --git a/plugins/auth-backend-module-oauth2-provider/package.json b/plugins/auth-backend-module-oauth2-provider/package.json index 959e301038..99a8e04c65 100644 --- a/plugins/auth-backend-module-oauth2-provider/package.json +++ b/plugins/auth-backend-module-oauth2-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-oauth2-provider", - "version": "0.2.0-next.2", + "version": "0.2.0", "description": "The oauth2-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md b/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md index bb6fc711ba..0223e64d35 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-oauth2-proxy-provider +## 0.1.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + ## 0.1.12-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md index 2d464fbdb1..e7295bc65b 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md +++ b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md @@ -5,12 +5,12 @@ ```ts /// -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { IncomingHttpHeaders } from 'http'; import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleOauth2ProxyProvider: () => BackendFeature; +const authModuleOauth2ProxyProvider: BackendFeatureCompat; export default authModuleOauth2ProxyProvider; // @public diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/package.json b/plugins/auth-backend-module-oauth2-proxy-provider/package.json index bbc3bb5a7a..c865a15f47 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/package.json +++ b/plugins/auth-backend-module-oauth2-proxy-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-oauth2-proxy-provider", - "version": "0.1.12-next.2", + "version": "0.1.12", "description": "The oauth2-proxy-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md index 33173baf53..0a10e2e98b 100644 --- a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-auth-backend-module-oidc-provider +## 0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, `profile`, and `email` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 4f21993: if oidc server do not provide revocation_endpoint,we should not call revoke function +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend@0.22.6 + ## 0.2.0-next.3 ### Minor Changes diff --git a/plugins/auth-backend-module-oidc-provider/api-report.md b/plugins/auth-backend-module-oidc-provider/api-report.md index eb9b4fb21e..0e6f807be4 100644 --- a/plugins/auth-backend-module-oidc-provider/api-report.md +++ b/plugins/auth-backend-module-oidc-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { BaseClient } from 'openid-client'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -13,7 +13,7 @@ import { TokenSet } from 'openid-client'; import { UserinfoResponse } from 'openid-client'; // @public (undocumented) -const authModuleOidcProvider: () => BackendFeature; +const authModuleOidcProvider: BackendFeatureCompat; export default authModuleOidcProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index 916b543b28..c42d85652c 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-oidc-provider", - "version": "0.2.0-next.3", + "version": "0.2.0", "description": "The oidc-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-okta-provider/CHANGELOG.md b/plugins/auth-backend-module-okta-provider/CHANGELOG.md index c5331c89b0..d1da6db5fa 100644 --- a/plugins/auth-backend-module-okta-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-okta-provider/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-auth-backend-module-okta-provider +## 0.0.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: Added support for the new shared `additionalScopes` configuration, which means it can now also be specified as an array. In addition, the `openid`, `email`, `profile`, and `offline_access` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.0.12-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-okta-provider/api-report.md b/plugins/auth-backend-module-okta-provider/api-report.md index e04c762fe2..7676d420a8 100644 --- a/plugins/auth-backend-module-okta-provider/api-report.md +++ b/plugins/auth-backend-module-okta-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleOktaProvider: () => BackendFeature; +const authModuleOktaProvider: BackendFeatureCompat; export default authModuleOktaProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-okta-provider/package.json b/plugins/auth-backend-module-okta-provider/package.json index 1b2d861ae0..fa9dcf1ee5 100644 --- a/plugins/auth-backend-module-okta-provider/package.json +++ b/plugins/auth-backend-module-okta-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-okta-provider", - "version": "0.0.12-next.2", + "version": "0.0.12", "description": "The okta-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-onelogin-provider/CHANGELOG.md b/plugins/auth-backend-module-onelogin-provider/CHANGELOG.md index 03954ed3ae..685ce0f1ff 100644 --- a/plugins/auth-backend-module-onelogin-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-onelogin-provider/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-auth-backend-module-onelogin-provider +## 0.1.0 + +### Minor Changes + +- 566d7cb: Separate out the OneLogin provider into its own module + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + ## 0.1.0-next.0 ### Minor Changes diff --git a/plugins/auth-backend-module-onelogin-provider/api-report.md b/plugins/auth-backend-module-onelogin-provider/api-report.md index 8f94b27cab..be4a88dba1 100644 --- a/plugins/auth-backend-module-onelogin-provider/api-report.md +++ b/plugins/auth-backend-module-onelogin-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -11,7 +11,7 @@ import { PassportProfile } from '@backstage/plugin-auth-node'; import { SignInResolverFactory } from '@backstage/plugin-auth-node'; // @public (undocumented) -const authModuleOneLoginProvider: () => BackendFeature; +const authModuleOneLoginProvider: BackendFeatureCompat; export default authModuleOneLoginProvider; // @public (undocumented) diff --git a/plugins/auth-backend-module-onelogin-provider/package.json b/plugins/auth-backend-module-onelogin-provider/package.json index c4c2cfa2af..6724e51cb7 100644 --- a/plugins/auth-backend-module-onelogin-provider/package.json +++ b/plugins/auth-backend-module-onelogin-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-onelogin-provider", - "version": "0.1.0-next.0", + "version": "0.1.0", "description": "The onelogin-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md b/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md index b43ab255b1..ed5fdd4819 100644 --- a/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-auth-backend-module-pinniped-provider +## 0.1.13 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, the `openid`, `pinniped:request-audience`, `username`, and `offline_access` scopes have been set to required and will always be present. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/config@1.2.0 + ## 0.1.13-next.2 ### Patch Changes diff --git a/plugins/auth-backend-module-pinniped-provider/api-report.md b/plugins/auth-backend-module-pinniped-provider/api-report.md index 182ea8ba21..8d1380daff 100644 --- a/plugins/auth-backend-module-pinniped-provider/api-report.md +++ b/plugins/auth-backend-module-pinniped-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { BaseClient } from 'openid-client'; import { Config } from '@backstage/config'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; @@ -11,10 +11,10 @@ import { Strategy } from 'openid-client'; import { TokenSet } from 'openid-client'; // @public @deprecated (undocumented) -export const authModulePinnipedProvider: () => BackendFeature; +export const authModulePinnipedProvider: BackendFeatureCompat; // @public (undocumented) -const authModulePinnipedProvider_2: () => BackendFeature; +const authModulePinnipedProvider_2: BackendFeatureCompat; export default authModulePinnipedProvider_2; // @public (undocumented) diff --git a/plugins/auth-backend-module-pinniped-provider/package.json b/plugins/auth-backend-module-pinniped-provider/package.json index 3416e2f18b..f99d1baabd 100644 --- a/plugins/auth-backend-module-pinniped-provider/package.json +++ b/plugins/auth-backend-module-pinniped-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-pinniped-provider", - "version": "0.1.13-next.2", + "version": "0.1.13", "description": "The pinniped-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md b/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md index 8b3fc7e7fa..5d323e0319 100644 --- a/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-auth-backend-module-vmware-cloud-provider +## 0.2.0 + +### Minor Changes + +- 8efc6cf: **BREAKING**: The `scope` config option have been removed and replaced by the standard `additionalScopes` config. In addition, `openid`, and `offline_access` scopes have been set to required and will always be present. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/catalog-model@1.5.0 + ## 0.2.0-next.2 ### Minor Changes diff --git a/plugins/auth-backend-module-vmware-cloud-provider/api-report.md b/plugins/auth-backend-module-vmware-cloud-provider/api-report.md index ff9e82dd45..32d706f130 100644 --- a/plugins/auth-backend-module-vmware-cloud-provider/api-report.md +++ b/plugins/auth-backend-module-vmware-cloud-provider/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { OAuthAuthenticatorResult } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; @@ -12,7 +12,7 @@ import { SignInResolverFactory } from '@backstage/plugin-auth-node'; import { Strategy } from 'passport-oauth2'; // @public -const authModuleVmwareCloudProvider: () => BackendFeature; +const authModuleVmwareCloudProvider: BackendFeatureCompat; export default authModuleVmwareCloudProvider; // @public diff --git a/plugins/auth-backend-module-vmware-cloud-provider/package.json b/plugins/auth-backend-module-vmware-cloud-provider/package.json index 6375325cc5..ff29719d22 100644 --- a/plugins/auth-backend-module-vmware-cloud-provider/package.json +++ b/plugins/auth-backend-module-vmware-cloud-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-vmware-cloud-provider", - "version": "0.2.0-next.2", + "version": "0.2.0", "description": "The vmware-cloud-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 46abaeafa2..6900d56b24 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-auth-backend +## 0.22.6 + +### Patch Changes + +- 3e823d3: Limited user tokens will no longer include the `ent` field in its payload. Ownership claims will now be fetched from the user info service. + + NOTE: Limited tokens issued prior to this change will no longer be valid. Users may have to clear their browser cookies in order to refresh their auth tokens. + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 3e1bb15: Updated to use the new `@backstage/plugin-auth-backend-module-onelogin-provider` implementation +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/plugin-auth-backend-module-onelogin-provider@0.1.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.1.2 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.12 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.2.0 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.1.2 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.14 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.14 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.16 + - @backstage/plugin-auth-backend-module-google-provider@0.1.16 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.2.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.2.0 + - @backstage/plugin-auth-backend-module-okta-provider@0.0.12 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.22.6-next.3 ### Patch Changes diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index d15399d279..56c2da3a08 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -12,7 +12,7 @@ import { AuthResolverContext as AuthResolverContext_2 } from '@backstage/plugin- import { AuthService } from '@backstage/backend-plugin-api'; import { AwsAlbResult as AwsAlbResult_2 } from '@backstage/plugin-auth-backend-module-aws-alb-provider'; import { AzureEasyAuthResult } from '@backstage/plugin-auth-backend-module-azure-easyauth-provider'; -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { BackstageSignInResult } from '@backstage/plugin-auth-node'; import { CacheService } from '@backstage/backend-plugin-api'; import { CatalogApi } from '@backstage/catalog-client'; @@ -57,7 +57,7 @@ export type AuthHandlerResult = { }; // @public -const authPlugin: () => BackendFeature; +const authPlugin: BackendFeatureCompat; export default authPlugin; // @public @deprecated (undocumented) diff --git a/plugins/auth-backend/migrations/20240510120825_user_info.js b/plugins/auth-backend/migrations/20240510120825_user_info.js new file mode 100644 index 0000000000..63d061a4e7 --- /dev/null +++ b/plugins/auth-backend/migrations/20240510120825_user_info.js @@ -0,0 +1,49 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @ts-check + +/** + * @param {import('knex').Knex} knex + */ +exports.up = async function up(knex) { + await knex.schema.createTable('user_info', table => { + table.comment('User information'); + + table + .string('user_entity_ref') + .primary() + .notNullable() + .comment('User entity reference'); + + table + .text('user_info', 'longtext') + .notNullable() + .comment('User info blob, JSON serialized'); + + table + .timestamp('exp') + .notNullable() + .comment('Expiration timestamp of the user info'); + }); +}; + +/** + * @param {import('knex').Knex} knex + */ +exports.down = async function down(knex) { + await knex.schema.dropTable('user_info'); +}; diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 0ea8518a51..85dd17d311 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.22.6-next.3", + "version": "0.22.6", "description": "A Backstage backend plugin that handles authentication", "backstage": { "role": "backend-plugin", diff --git a/plugins/auth-backend/src/identity/TokenFactory.test.ts b/plugins/auth-backend/src/identity/TokenFactory.test.ts index 5ee0ea83c0..53cec685d1 100644 --- a/plugins/auth-backend/src/identity/TokenFactory.test.ts +++ b/plugins/auth-backend/src/identity/TokenFactory.test.ts @@ -21,8 +21,10 @@ import { decodeProtectedHeader, jwtVerify, } from 'jose'; +import { omit } from 'lodash'; import { MemoryKeyStore } from './MemoryKeyStore'; import { TokenFactory } from './TokenFactory'; +import { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; import { tokenTypes } from '@backstage/plugin-auth-node'; import { mockServices } from '@backstage/backend-test-utils'; @@ -43,6 +45,10 @@ const entityRef = stringifyEntityRef({ }); describe('TokenFactory', () => { + const mockUserInfoDatabaseHandler = { + addUserInfo: jest.fn().mockResolvedValue(undefined), + } as unknown as UserInfoDatabaseHandler; + it('should issue valid tokens signed by a listed key', async () => { const keyDurationSeconds = 5; const factory = new TokenFactory({ @@ -50,6 +56,7 @@ describe('TokenFactory', () => { keyStore: new MemoryKeyStore(), keyDurationSeconds, logger, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); await expect(factory.listPublicKeys()).resolves.toEqual({ keys: [] }); @@ -81,6 +88,10 @@ describe('TokenFactory', () => { verifyResult.payload.iat! + keyDurationSeconds, ); + expect(mockUserInfoDatabaseHandler.addUserInfo).toHaveBeenCalledWith({ + claims: omit(verifyResult.payload, ['aud', 'iat', 'iss', 'uip']), + }); + // Emulate the reconstruction of a limited user token const limitedUserToken = [ base64url.encode( @@ -93,7 +104,6 @@ describe('TokenFactory', () => { base64url.encode( JSON.stringify({ sub: verifyResult.payload.sub, - ent: verifyResult.payload.ent, iat: verifyResult.payload.iat, exp: verifyResult.payload.exp, }), @@ -107,7 +117,6 @@ describe('TokenFactory', () => { ); expect(verifyProofResult.payload).toEqual({ sub: entityRef, - ent: [entityRef], iat: expect.any(Number), exp: expect.any(Number), }); @@ -125,6 +134,7 @@ describe('TokenFactory', () => { keyStore: new MemoryKeyStore(), keyDurationSeconds: 5, logger, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); const token1 = await factory.issueToken({ @@ -170,6 +180,7 @@ describe('TokenFactory', () => { keyStore: new MemoryKeyStore(), keyDurationSeconds, logger, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); await expect(() => { @@ -187,6 +198,7 @@ describe('TokenFactory', () => { keyDurationSeconds, logger, algorithm: '', + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); await expect(() => { @@ -202,6 +214,7 @@ describe('TokenFactory', () => { keyStore: new MemoryKeyStore(), keyDurationSeconds: 5, logger, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); await expect(() => { @@ -220,6 +233,7 @@ describe('TokenFactory', () => { keyStore: new MemoryKeyStore(), keyDurationSeconds, logger, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); const token = await factory.issueToken({ diff --git a/plugins/auth-backend/src/identity/TokenFactory.ts b/plugins/auth-backend/src/identity/TokenFactory.ts index 9277361679..a1643cdbe3 100644 --- a/plugins/auth-backend/src/identity/TokenFactory.ts +++ b/plugins/auth-backend/src/identity/TokenFactory.ts @@ -25,22 +25,22 @@ import { GeneralSign, KeyLike, } from 'jose'; +import { omit } from 'lodash'; import { DateTime } from 'luxon'; import { v4 as uuid } from 'uuid'; import { LoggerService } from '@backstage/backend-plugin-api'; import { TokenParams, tokenTypes } from '@backstage/plugin-auth-node'; import { AnyJWK, KeyStore, TokenIssuer } from './types'; import { JsonValue } from '@backstage/types'; +import { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; const MS_IN_S = 1000; const MAX_TOKEN_LENGTH = 32768; // At 64 bytes per entity ref this still leaves room for about 500 entities /** * The payload contents of a valid Backstage JWT token - * - * @internal */ -interface BackstageTokenPayload { +export interface BackstageTokenPayload { /** * The issuer of the token, currently the discovery URL of the auth backend */ @@ -93,11 +93,6 @@ interface BackstageUserIdentityProofPayload { */ sub: string; - /** - * The ownership entity refs of the user - */ - ent?: string[]; - /** * Standard expiry in epoch seconds */ @@ -124,6 +119,7 @@ type Options = { * If not, add a knex migration file in the migrations folder. * More info on supported algorithms: https://github.com/panva/jose */ algorithm?: string; + userInfoDatabaseHandler: UserInfoDatabaseHandler; }; /** @@ -146,6 +142,7 @@ export class TokenFactory implements TokenIssuer { private readonly keyStore: KeyStore; private readonly keyDurationSeconds: number; private readonly algorithm: string; + private readonly userInfoDatabaseHandler: UserInfoDatabaseHandler; private keyExpiry?: Date; private privateKeyPromise?: Promise; @@ -156,6 +153,7 @@ export class TokenFactory implements TokenIssuer { this.keyStore = options.keyStore; this.keyDurationSeconds = options.keyDurationSeconds; this.algorithm = options.algorithm ?? 'ES256'; + this.userInfoDatabaseHandler = options.userInfoDatabaseHandler; } async issueToken(params: TokenParams): Promise { @@ -190,7 +188,7 @@ export class TokenFactory implements TokenIssuer { alg: key.alg, kid: key.kid, }, - payload: { sub, ent, iat, exp }, + payload: { sub, iat, exp }, key: signingKey, }); @@ -221,6 +219,12 @@ export class TokenFactory implements TokenIssuer { ); } + // Store the user info in the database upon successful token + // issuance so that it can be retrieved later by limited user tokens + await this.userInfoDatabaseHandler.addUserInfo({ + claims: omit(claims, ['aud', 'iat', 'iss', 'uip']), + }); + return token; } @@ -342,7 +346,6 @@ export class TokenFactory implements TokenIssuer { const payload = { sub: options.payload.sub, - ent: options.payload.ent, iat: options.payload.iat, exp: options.payload.exp, }; diff --git a/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.test.ts b/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.test.ts new file mode 100644 index 0000000000..ef3d0f6c8b --- /dev/null +++ b/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.test.ts @@ -0,0 +1,110 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { resolvePackagePath } from '@backstage/backend-common'; +import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; +import { Knex } from 'knex'; +import { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; + +const migrationsDir = resolvePackagePath( + '@backstage/plugin-auth-backend', + 'migrations', +); + +jest.setTimeout(60_000); + +describe('UserInfoDatabaseHandler', () => { + const databases = TestDatabases.create(); + + async function createDatabaseHandler(databaseId: TestDatabaseId) { + const knex = await databases.init(databaseId); + + await knex.migrate.latest({ + directory: migrationsDir, + }); + + return { + knex, + dbHandler: new UserInfoDatabaseHandler(knex), + }; + } + + describe.each(databases.eachSupportedId())( + 'should support database %p', + databaseId => { + let knex: Knex; + let dbHandler: UserInfoDatabaseHandler; + + beforeEach(async () => { + ({ knex, dbHandler } = await createDatabaseHandler(databaseId)); + }); + + it('addUserInfo', async () => { + const userInfo = { + claims: { + sub: 'user:default/foo', + ent: ['group:default/foo-group', 'group:default/bar'], + exp: 1234567890, + }, + }; + + await dbHandler.addUserInfo(userInfo); + + const savedUserInfo = await knex('user_info') + .where('user_entity_ref', 'user:default/foo') + .first(); + expect(savedUserInfo).toEqual({ + user_entity_ref: 'user:default/foo', + user_info: JSON.stringify(userInfo), + exp: expect.anything(), + }); + + userInfo.claims.ent = ['group:default/group1', 'group:default/group2']; + await dbHandler.addUserInfo(userInfo); + + const updatedUserInfo = await knex('user_info') + .where('user_entity_ref', 'user:default/foo') + .first(); + expect(updatedUserInfo).toEqual({ + user_entity_ref: 'user:default/foo', + user_info: JSON.stringify(userInfo), + exp: expect.anything(), + }); + }); + + it('getUserInfo', async () => { + const userInfo = { + claims: { + sub: 'user:default/backstage-user', + ent: ['group:default/group1', 'group:default/group2'], + exp: 1234567890, + }, + }; + + await knex('user_info').insert({ + user_entity_ref: 'user:default/backstage-user', + user_info: JSON.stringify(userInfo), + exp: knex.fn.now(), + }); + + const savedUserInfo = await dbHandler.getUserInfo( + 'user:default/backstage-user', + ); + expect(savedUserInfo).toEqual(userInfo); + }); + }, + ); +}); diff --git a/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.ts b/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.ts new file mode 100644 index 0000000000..c0b31de8e4 --- /dev/null +++ b/plugins/auth-backend/src/identity/UserInfoDatabaseHandler.ts @@ -0,0 +1,62 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DateTime } from 'luxon'; +import { Knex } from 'knex'; + +import { BackstageTokenPayload } from './TokenFactory'; + +const TABLE = 'user_info'; + +type Row = { + user_entity_ref: string; + user_info: string; + exp: string; +}; + +type UserInfo = { + claims: Omit; +}; + +export class UserInfoDatabaseHandler { + constructor(private readonly client: Knex) {} + + async addUserInfo(userInfo: UserInfo): Promise { + await this.client(TABLE) + .insert({ + user_entity_ref: userInfo.claims.sub as string, + user_info: JSON.stringify(userInfo), + exp: DateTime.fromSeconds(userInfo.claims.exp as number, { + zone: 'utc', + }).toSQL({ includeOffset: false }), + }) + .onConflict('user_entity_ref') + .merge(); + } + + async getUserInfo(userEntityRef: string): Promise { + const info = await this.client(TABLE) + .where({ user_entity_ref: userEntityRef }) + .first(); + + if (!info) { + return undefined; + } + + const userInfo = JSON.parse(info.user_info); + return userInfo; + } +} diff --git a/plugins/auth-backend/src/identity/index.ts b/plugins/auth-backend/src/identity/index.ts index 0492836723..6ea025aae9 100644 --- a/plugins/auth-backend/src/identity/index.ts +++ b/plugins/auth-backend/src/identity/index.ts @@ -21,3 +21,4 @@ export { MemoryKeyStore } from './MemoryKeyStore'; export { FirestoreKeyStore } from './FirestoreKeyStore'; export { KeyStores } from './KeyStores'; export type { KeyStore, TokenParams } from './types'; +export { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; diff --git a/plugins/auth-backend/src/identity/router.test.ts b/plugins/auth-backend/src/identity/router.test.ts index 9880d2931c..9ede44f195 100644 --- a/plugins/auth-backend/src/identity/router.test.ts +++ b/plugins/auth-backend/src/identity/router.test.ts @@ -22,10 +22,20 @@ import { mockServices, startTestBackend } from '@backstage/backend-test-utils'; import Router from 'express-promise-router'; import request from 'supertest'; import { bindOidcRouter } from './router'; +import { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; describe('bindOidcRouter', () => { - it('should return user info', async () => { + it('should return user info for full tokens', async () => { const auth = mockServices.auth.mock(); + const mockUserInfoDatabaseHandler = { + getUserInfo: jest.fn().mockResolvedValue({ + claims: { + sub: 'k/ns:n', + ent: ['k/ns:a', 'k/ns:b'], + }, + }), + } as unknown as UserInfoDatabaseHandler; + const { server } = await startTestBackend({ features: [ createBackendPlugin({ @@ -39,6 +49,7 @@ describe('bindOidcRouter', () => { baseUrl: 'http://localhost:7000', auth, tokenIssuer: {} as any, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, }); httpRouter.use(router); httpRouter.addAuthPolicy({ @@ -64,10 +75,73 @@ describe('bindOidcRouter', () => { )}.s`, ) .expect(200, { - sub: 'k/ns:n', - ent: ['k/ns:a', 'k/ns:b'], + claims: { + sub: 'k/ns:n', + ent: ['k/ns:a', 'k/ns:b'], + }, }); - expect('test').toBe('test'); + expect(mockUserInfoDatabaseHandler.getUserInfo).toHaveBeenCalledWith( + 'k/ns:n', + ); + }); + + it('should return user info for limited tokens', async () => { + const auth = mockServices.auth.mock(); + const mockUserInfoDatabaseHandler = { + getUserInfo: jest.fn().mockResolvedValue({ + claims: { + sub: 'k/ns:n', + ent: ['k/ns:a', 'k/ns:b'], + }, + }), + } as unknown as UserInfoDatabaseHandler; + + const { server } = await startTestBackend({ + features: [ + createBackendPlugin({ + pluginId: 'auth', + register(reg) { + reg.registerInit({ + deps: { httpRouter: coreServices.httpRouter }, + async init({ httpRouter }) { + const router = Router(); + bindOidcRouter(router, { + baseUrl: 'http://localhost:7000', + auth, + tokenIssuer: {} as any, + userInfoDatabaseHandler: mockUserInfoDatabaseHandler, + }); + httpRouter.use(router); + httpRouter.addAuthPolicy({ + path: '/', + allow: 'unauthenticated', + }); + }, + }); + }, + }), + ], + }); + + auth.authenticate.mockResolvedValueOnce({} as any); + auth.isPrincipal.mockReturnValueOnce(true); + + await request(server) + .get('/api/auth/v1/userinfo') + .set( + 'Authorization', + `Bearer h.${btoa(JSON.stringify({ sub: 'k/ns:n' }))}.s`, + ) + .expect(200, { + claims: { + sub: 'k/ns:n', + ent: ['k/ns:a', 'k/ns:b'], + }, + }); + + expect(mockUserInfoDatabaseHandler.getUserInfo).toHaveBeenCalledWith( + 'k/ns:n', + ); }); }); diff --git a/plugins/auth-backend/src/identity/router.ts b/plugins/auth-backend/src/identity/router.ts index 3936298c72..3952ec64b5 100644 --- a/plugins/auth-backend/src/identity/router.ts +++ b/plugins/auth-backend/src/identity/router.ts @@ -20,6 +20,7 @@ import { TokenIssuer } from './types'; import { AuthService } from '@backstage/backend-plugin-api'; import { decodeJwt } from 'jose'; import { AuthenticationError, InputError } from '@backstage/errors'; +import { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; export function bindOidcRouter( targetRouter: express.Router, @@ -27,9 +28,10 @@ export function bindOidcRouter( baseUrl: string; auth: AuthService; tokenIssuer: TokenIssuer; + userInfoDatabaseHandler: UserInfoDatabaseHandler; }, ) { - const { baseUrl, auth, tokenIssuer } = options; + const { baseUrl, auth, tokenIssuer, userInfoDatabaseHandler } = options; const router = Router(); targetRouter.use(router); @@ -91,21 +93,18 @@ export function bindOidcRouter( ); } - const { sub: userEntityRef, ent: ownershipEntityRefs = [] } = - decodeJwt(token); + const { sub: userEntityRef } = decodeJwt(token); if (typeof userEntityRef !== 'string') { throw new Error('Invalid user token, user entity ref must be a string'); } - if ( - !Array.isArray(ownershipEntityRefs) || - ownershipEntityRefs.some(ref => typeof ref !== 'string') - ) { - throw new Error( - 'Invalid user token, ownership entity refs must be an array of strings', - ); + + const userInfo = await userInfoDatabaseHandler.getUserInfo(userEntityRef); + if (!userInfo) { + res.status(404).send('User info not found'); + return; } - res.json({ sub: userEntityRef, ent: ownershipEntityRefs }); + res.json(userInfo); }); } diff --git a/plugins/auth-backend/src/migrations.test.ts b/plugins/auth-backend/src/migrations.test.ts index f80b729975..b4a6572a86 100644 --- a/plugins/auth-backend/src/migrations.test.ts +++ b/plugins/auth-backend/src/migrations.test.ts @@ -71,4 +71,40 @@ describe('migrations', () => { await knex.destroy(); }, ); + + it.each(databases.eachSupportedId())( + '20240510120825_user_info.js, %p', + async databaseId => { + const knex = await databases.init(databaseId); + + await migrateUntilBefore(knex, '20240510120825_user_info.js'); + await migrateUpOnce(knex); + + const user_info = JSON.stringify({ + claims: { + ent: ['group:default/group1', 'group:default/group2'], + }, + }); + + await knex + .insert({ + user_entity_ref: 'user:default/backstage-user', + user_info, + exp: knex.fn.now(), + }) + .into('user_info'); + + await expect(knex('user_info')).resolves.toEqual([ + { + user_entity_ref: 'user:default/backstage-user', + user_info, + exp: expect.anything(), + }, + ]); + + await migrateDownOnce(knex); + + await knex.destroy(); + }, + ); }); diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 11c150aa33..4bb42c3abd 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -32,7 +32,12 @@ import { } from '@backstage/backend-common'; import { NotFoundError } from '@backstage/errors'; import { CatalogApi } from '@backstage/catalog-client'; -import { bindOidcRouter, KeyStores, TokenFactory } from '../identity'; +import { + bindOidcRouter, + KeyStores, + TokenFactory, + UserInfoDatabaseHandler, +} from '../identity'; import session from 'express-session'; import connectSessionKnex from 'connect-session-knex'; import passport from 'passport'; @@ -87,6 +92,10 @@ export async function createRouter( database: authDb, }); + const userInfoDatabaseHandler = new UserInfoDatabaseHandler( + await authDb.get(), + ); + let tokenIssuer: TokenIssuer; if (keyStore instanceof StaticKeyStore) { tokenIssuer = new StaticTokenIssuer( @@ -106,6 +115,7 @@ export async function createRouter( algorithm: tokenFactoryAlgorithm ?? config.getOptionalString('auth.identityTokenAlgorithm'), + userInfoDatabaseHandler, }); } @@ -156,6 +166,7 @@ export async function createRouter( auth, tokenIssuer, baseUrl: authUrl, + userInfoDatabaseHandler, }); // Gives a more helpful error message than a plain 404 diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index a860deed71..b91ce2141c 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-auth-node +## 0.4.14 + +### Patch Changes + +- 798ec37: Updated scope management for OAuth providers, where the `createOAuthAuthenticator` now accepts a new collection of `scopes` options: + + - `scopes.persist` - Whether scopes should be persisted, replaces the `shouldPersistScopes` option. + - `scopes.required` - A list of required scopes that will always be requested. + - `scopes.transform` - A function that can be used to transform the scopes before they are requested. + + The `createOAuthProviderFactory` has also received a new `additionalScopes` option, and will also read `additionalScopes` from the auth provider configuration. Both of these can be used to add additional scopes that should always be requested. + + A significant change under the hood that this new scope management brings is that providers that persist scopes will now always merge the already granted scopes with the requested ones. The previous behavior was that the full authorization flow would not include existing scopes, while the refresh flow would only include the existing scopes. + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.4.14-next.3 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index 4c62f191cf..4f42e80c92 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.4.14-next.3", + "version": "0.4.14", "backstage": { "role": "node-library", "pluginId": "auth", diff --git a/plugins/auth-react/CHANGELOG.md b/plugins/auth-react/CHANGELOG.md index f245ac9e50..c36109cb91 100644 --- a/plugins/auth-react/CHANGELOG.md +++ b/plugins/auth-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-react +## 0.1.3 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/errors@1.2.4 + ## 0.1.3-next.2 ### Patch Changes diff --git a/plugins/auth-react/package.json b/plugins/auth-react/package.json index 8fd9008028..c48438d465 100644 --- a/plugins/auth-react/package.json +++ b/plugins/auth-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-react", - "version": "0.1.3-next.2", + "version": "0.1.3", "description": "Web library for the auth plugin", "backstage": { "role": "web-library", diff --git a/plugins/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index 2805e36324..ccd47aa5e4 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.2.20 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/integration@1.12.0 + ## 0.2.20-next.1 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index a43407fd04..a08b0f31bf 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bitbucket-cloud-common", - "version": "0.2.20-next.1", + "version": "0.2.20", "description": "Common functionalities for bitbucket-cloud plugins", "backstage": { "role": "common-library", diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index fa3d233b10..e925fa7de3 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.3.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + ## 0.3.14-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/api-report-alpha.md b/plugins/catalog-backend-module-aws/api-report-alpha.md index 218acc7506..1c01744215 100644 --- a/plugins/catalog-backend-module-aws/api-report-alpha.md +++ b/plugins/catalog-backend-module-aws/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const catalogModuleAwsS3EntityProvider: () => BackendFeature; +const catalogModuleAwsS3EntityProvider: BackendFeatureCompat; export default catalogModuleAwsS3EntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index ef8f828e3f..299da7d302 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", - "version": "0.3.14-next.3", + "version": "0.3.14", "description": "A Backstage catalog backend module that helps integrate towards AWS", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-aws/src/module/catalogModuleAwsS3EntityProvider.test.ts b/plugins/catalog-backend-module-aws/src/module/catalogModuleAwsS3EntityProvider.test.ts index ad1e94cad6..4addd1cb45 100644 --- a/plugins/catalog-backend-module-aws/src/module/catalogModuleAwsS3EntityProvider.test.ts +++ b/plugins/catalog-backend-module-aws/src/module/catalogModuleAwsS3EntityProvider.test.ts @@ -56,7 +56,7 @@ describe('catalogModuleAwsS3EntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleAwsS3EntityProvider(), + catalogModuleAwsS3EntityProvider, mockServices.rootConfig.factory({ data: config }), scheduler.factory, ], diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index 9799f6bb67..dce335f353 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.39 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/config@1.2.0 + ## 0.1.39-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/api-report-alpha.md b/plugins/catalog-backend-module-azure/api-report-alpha.md index eeb5a3c621..8f6c4f0317 100644 --- a/plugins/catalog-backend-module-azure/api-report-alpha.md +++ b/plugins/catalog-backend-module-azure/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const catalogModuleAzureDevOpsEntityProvider: () => BackendFeature; +const catalogModuleAzureDevOpsEntityProvider: BackendFeatureCompat; export default catalogModuleAzureDevOpsEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 06c048647c..aa66f869a6 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", - "version": "0.1.39-next.3", + "version": "0.1.39", "description": "A Backstage catalog backend module that helps integrate towards Azure", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-azure/src/module/catalogModuleAzureDevOpsEntityProvider.test.ts b/plugins/catalog-backend-module-azure/src/module/catalogModuleAzureDevOpsEntityProvider.test.ts index a20921fa3f..2c674a8061 100644 --- a/plugins/catalog-backend-module-azure/src/module/catalogModuleAzureDevOpsEntityProvider.test.ts +++ b/plugins/catalog-backend-module-azure/src/module/catalogModuleAzureDevOpsEntityProvider.test.ts @@ -59,7 +59,7 @@ describe('catalogModuleAzureDevOpsEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleAzureDevOpsEntityProvider(), + catalogModuleAzureDevOpsEntityProvider, mockServices.rootConfig.factory({ data: config }), mockServices.logger.factory(), scheduler.factory, diff --git a/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md b/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md index c4e5324788..7081965cc9 100644 --- a/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-backstage-openapi +## 0.2.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.2.2-next.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-backstage-openapi/api-report.md b/plugins/catalog-backend-module-backstage-openapi/api-report.md index d417be049c..247cc4ba8e 100644 --- a/plugins/catalog-backend-module-backstage-openapi/api-report.md +++ b/plugins/catalog-backend-module-backstage-openapi/api-report.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @public (undocumented) -const catalogModuleInternalOpenApiSpec: () => BackendFeature; +const catalogModuleInternalOpenApiSpec: BackendFeatureCompat; export { catalogModuleInternalOpenApiSpec }; export default catalogModuleInternalOpenApiSpec; diff --git a/plugins/catalog-backend-module-backstage-openapi/package.json b/plugins/catalog-backend-module-backstage-openapi/package.json index 70c1c118c2..b85332a6f0 100644 --- a/plugins/catalog-backend-module-backstage-openapi/package.json +++ b/plugins/catalog-backend-module-backstage-openapi/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-backstage-openapi", - "version": "0.2.2-next.2", + "version": "0.2.2", "backstage": { "role": "backend-plugin-module", "pluginId": "catalog", diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 1aa0e7c3c7..89f45366fa 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.2.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- b51e823: Remove debug console logging statement +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-bitbucket-cloud-common@0.2.20 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.2.6-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/api-report-alpha.md b/plugins/catalog-backend-module-bitbucket-cloud/api-report-alpha.md index 69b2b46e4e..8c91e1454f 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/api-report-alpha.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha (undocumented) -const catalogModuleBitbucketCloudEntityProvider: () => BackendFeature; +const catalogModuleBitbucketCloudEntityProvider: BackendFeatureCompat; export default catalogModuleBitbucketCloudEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index 0288bf3d44..41285c1e49 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", - "version": "0.2.6-next.3", + "version": "0.2.6", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-bitbucket-cloud/src/module/catalogModuleBitbucketCloudEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-cloud/src/module/catalogModuleBitbucketCloudEntityProvider.test.ts index 9fff322eab..db53b0b41b 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/src/module/catalogModuleBitbucketCloudEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-cloud/src/module/catalogModuleBitbucketCloudEntityProvider.test.ts @@ -58,7 +58,7 @@ describe('catalogModuleBitbucketCloudEntityProvider', () => { ], features: [ eventsServiceFactory(), - catalogModuleBitbucketCloudEntityProvider(), + catalogModuleBitbucketCloudEntityProvider, mockServices.rootConfig.factory({ data: { catalog: { diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index e7b67f047e..0724dcffab 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.33 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.33-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/api-report-alpha.md b/plugins/catalog-backend-module-bitbucket-server/api-report-alpha.md index 5e5b4f68cd..0f8da2c4d5 100644 --- a/plugins/catalog-backend-module-bitbucket-server/api-report-alpha.md +++ b/plugins/catalog-backend-module-bitbucket-server/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha (undocumented) -const catalogModuleBitbucketServerEntityProvider: () => BackendFeature; +const catalogModuleBitbucketServerEntityProvider: BackendFeatureCompat; export default catalogModuleBitbucketServerEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 7e6f3a919a..bff2adee0a 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.33-next.3", + "version": "0.1.33", "backstage": { "role": "backend-plugin-module", "pluginId": "catalog", diff --git a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts index ab92e24fd7..56b44b29f5 100644 --- a/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts +++ b/plugins/catalog-backend-module-bitbucket-server/src/module/catalogModuleBitbucketServerEntityProvider.test.ts @@ -63,7 +63,7 @@ describe('catalogModuleBitbucketServerEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleBitbucketServerEntityProvider(), + catalogModuleBitbucketServerEntityProvider, mockServices.rootConfig.factory({ data: config }), mockServices.logger.factory(), scheduler.factory, diff --git a/plugins/catalog-backend-module-gcp/CHANGELOG.md b/plugins/catalog-backend-module-gcp/CHANGELOG.md index 2d8493c2df..756c77cd24 100644 --- a/plugins/catalog-backend-module-gcp/CHANGELOG.md +++ b/plugins/catalog-backend-module-gcp/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-gcp +## 0.1.20 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.1.20-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gcp/api-report.md b/plugins/catalog-backend-module-gcp/api-report.md index 6ac42a1244..ea9a73f0e6 100644 --- a/plugins/catalog-backend-module-gcp/api-report.md +++ b/plugins/catalog-backend-module-gcp/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import * as container from '@google-cloud/container'; import { EntityProvider } from '@backstage/plugin-catalog-node'; @@ -12,7 +12,7 @@ import { LoggerService } from '@backstage/backend-plugin-api'; import { SchedulerService } from '@backstage/backend-plugin-api'; // @public -const catalogModuleGcpGkeEntityProvider: () => BackendFeature; +const catalogModuleGcpGkeEntityProvider: BackendFeatureCompat; export default catalogModuleGcpGkeEntityProvider; // @public diff --git a/plugins/catalog-backend-module-gcp/package.json b/plugins/catalog-backend-module-gcp/package.json index cd6a65e2c6..3f144c7a9c 100644 --- a/plugins/catalog-backend-module-gcp/package.json +++ b/plugins/catalog-backend-module-gcp/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gcp", - "version": "0.1.20-next.3", + "version": "0.1.20", "description": "A Backstage catalog backend module that helps integrate towards GCP", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index 0ef0bfa206..b241cbe499 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.36 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.36-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/api-report-alpha.md b/plugins/catalog-backend-module-gerrit/api-report-alpha.md index dd6c61c5ab..60167b95fa 100644 --- a/plugins/catalog-backend-module-gerrit/api-report-alpha.md +++ b/plugins/catalog-backend-module-gerrit/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha (undocumented) -const catalogModuleGerritEntityProvider: () => BackendFeature; +const catalogModuleGerritEntityProvider: BackendFeatureCompat; export default catalogModuleGerritEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 84183c1e36..207eefd381 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.36-next.3", + "version": "0.1.36", "backstage": { "role": "backend-plugin-module", "pluginId": "catalog", diff --git a/plugins/catalog-backend-module-gerrit/src/module/catalogModuleGerritEntityProvider.test.ts b/plugins/catalog-backend-module-gerrit/src/module/catalogModuleGerritEntityProvider.test.ts index 4afcd8e2d4..66f0cbab2c 100644 --- a/plugins/catalog-backend-module-gerrit/src/module/catalogModuleGerritEntityProvider.test.ts +++ b/plugins/catalog-backend-module-gerrit/src/module/catalogModuleGerritEntityProvider.test.ts @@ -69,7 +69,7 @@ describe('catalogModuleGerritEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleGerritEntityProvider(), + catalogModuleGerritEntityProvider, mockServices.rootConfig.factory({ data: config }), mockServices.logger.factory(), scheduler.factory, diff --git a/plugins/catalog-backend-module-github-org/CHANGELOG.md b/plugins/catalog-backend-module-github-org/CHANGELOG.md index 844f62c572..bac2b053aa 100644 --- a/plugins/catalog-backend-module-github-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-github-org/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-github-org +## 0.1.14 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend-module-github@0.6.2 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + ## 0.1.14-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-github-org/api-report.md b/plugins/catalog-backend-module-github-org/api-report.md index e39c98182c..c0309c9ccf 100644 --- a/plugins/catalog-backend-module-github-org/api-report.md +++ b/plugins/catalog-backend-module-github-org/api-report.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { GithubMultiOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-github'; import { TeamTransformer } from '@backstage/plugin-catalog-backend-module-github'; import { UserTransformer } from '@backstage/plugin-catalog-backend-module-github'; // @public -const catalogModuleGithubOrgEntityProvider: () => BackendFeature; +const catalogModuleGithubOrgEntityProvider: BackendFeatureCompat; export default catalogModuleGithubOrgEntityProvider; export { GithubMultiOrgEntityProvider }; diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json index 45b981e178..3946f1878c 100644 --- a/plugins/catalog-backend-module-github-org/package.json +++ b/plugins/catalog-backend-module-github-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github-org", - "version": "0.1.14-next.3", + "version": "0.1.14", "description": "The github-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-github-org/src/module.test.ts b/plugins/catalog-backend-module-github-org/src/module.test.ts index 9f8e9119d9..6e03d8d9cc 100644 --- a/plugins/catalog-backend-module-github-org/src/module.test.ts +++ b/plugins/catalog-backend-module-github-org/src/module.test.ts @@ -60,7 +60,7 @@ describe('catalogModuleGithubOrgEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleGithubOrgEntityProvider(), + catalogModuleGithubOrgEntityProvider, mockServices.rootConfig.factory({ data: config }), scheduler.factory, ], diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index 720ba05101..fb15cb0de4 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-catalog-backend-module-github +## 0.6.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 67d0530: Fix bug in root repo import where catalog-info.yaml.hcl file is found by search and breaks the import +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.6.2-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/api-report-alpha.md b/plugins/catalog-backend-module-github/api-report-alpha.md index ca3a7b1978..2f9e12d24a 100644 --- a/plugins/catalog-backend-module-github/api-report-alpha.md +++ b/plugins/catalog-backend-module-github/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const githubCatalogModule: () => BackendFeature; +const githubCatalogModule: BackendFeatureCompat; export default githubCatalogModule; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index a88a64f59d..7d3bd62281 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github", - "version": "0.6.2-next.3", + "version": "0.6.2", "description": "A Backstage catalog backend module that helps integrate towards GitHub", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts index b745dd37ba..e5c7eb5896 100644 --- a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts +++ b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.test.ts @@ -112,7 +112,7 @@ describe('GithubLocationAnalyzer', () => { it('should analyze', async () => { octokit.search.code.mockImplementation((opts: { q: string }) => { - if (opts.q === 'filename:catalog-info.yaml repo:foo/bar') { + if (opts.q === 'filename:catalog-info.yaml extension:yaml repo:foo/bar') { return Promise.resolve({ data: { items: [{ path: 'catalog-info.yaml' }], total_count: 1 }, }); @@ -139,7 +139,7 @@ describe('GithubLocationAnalyzer', () => { it('should use the provided entity filename for search', async () => { octokit.search.code.mockImplementation((opts: { q: string }) => { - if (opts.q === 'filename:anvil.yaml repo:foo/bar') { + if (opts.q === 'filename:anvil.yaml extension:yaml repo:foo/bar') { return Promise.resolve({ data: { items: [{ path: 'anvil.yaml' }], total_count: 1 }, }); @@ -162,4 +162,30 @@ describe('GithubLocationAnalyzer', () => { target: 'https://github.com/foo/bar/blob/my_default_branch/anvil.yaml', }); }); + + it('should use the provided entity file extension in search query only if present', async () => { + octokit.search.code.mockImplementation((opts: { q: string }) => { + if (opts.q === 'filename:.gitignore repo:foo/bar') { + return Promise.resolve({ + data: { items: [{ path: '.gitignore' }], total_count: 1 }, + }); + } + return Promise.reject(); + }); + + const analyzer = new GithubLocationAnalyzer({ + discovery: mockDiscoveryApi, + auth: mockAuthService, + config, + }); + const result = await analyzer.analyze({ + url: 'https://github.com/foo/bar', + catalogFilename: '.gitignore', + }); + + expect(result.existing[0].location).toEqual({ + type: 'url', + target: 'https://github.com/foo/bar/blob/my_default_branch/.gitignore', + }); + }); }); diff --git a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.ts b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.ts index 2648b1bcdc..7e6ac73054 100644 --- a/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.ts +++ b/plugins/catalog-backend-module-github/src/analyzers/GithubLocationAnalyzer.ts @@ -22,7 +22,7 @@ import { ScmIntegrations, } from '@backstage/integration'; import { Octokit } from '@octokit/rest'; -import { trimEnd } from 'lodash'; +import { isEmpty, trimEnd } from 'lodash'; import parseGitUrl from 'git-url-parse'; import { AnalyzeOptions, @@ -35,6 +35,7 @@ import { } from '@backstage/backend-common'; import { Config } from '@backstage/config'; import { AuthService } from '@backstage/backend-plugin-api'; +import { extname } from 'path'; /** @public */ export type GithubLocationAnalyzerOptions = { @@ -76,8 +77,12 @@ export class GithubLocationAnalyzer implements ScmLocationAnalyzer { const { owner, name: repo } = parseGitUrl(url); const catalogFile = catalogFilename || 'catalog-info.yaml'; + const extension = extname(catalogFile); + const extensionQuery = !isEmpty(extension) + ? `extension:${extension.replace('.', '')}` + : ''; - const query = `filename:${catalogFile} repo:${owner}/${repo}`; + const query = `filename:${catalogFile} ${extensionQuery} repo:${owner}/${repo}`; const integration = this.integrations.github.byUrl(url); if (!integration) { diff --git a/plugins/catalog-backend-module-github/src/module/githubCatalogModule.test.ts b/plugins/catalog-backend-module-github/src/module/githubCatalogModule.test.ts index 24ee7f7108..59f8b41a6d 100644 --- a/plugins/catalog-backend-module-github/src/module/githubCatalogModule.test.ts +++ b/plugins/catalog-backend-module-github/src/module/githubCatalogModule.test.ts @@ -69,7 +69,7 @@ describe('githubCatalogModule', () => { [catalogAnalysisExtensionPoint, analysisExtensionPoint], ], features: [ - githubCatalogModule(), + githubCatalogModule, mockServices.rootConfig.factory({ data: config }), scheduler.factory, ], diff --git a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md index 78c7ad3e8c..92dc47ec69 100644 --- a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-gitlab-org +## 0.0.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-backend-module-gitlab@0.3.18 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + ## 0.0.2-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab-org/api-report.md b/plugins/catalog-backend-module-gitlab-org/api-report.md index 2a36f49206..d9c5c62b52 100644 --- a/plugins/catalog-backend-module-gitlab-org/api-report.md +++ b/plugins/catalog-backend-module-gitlab-org/api-report.md @@ -3,9 +3,9 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @public -const catalogModuleGitlabOrgDiscoveryEntityProvider: () => BackendFeature; +const catalogModuleGitlabOrgDiscoveryEntityProvider: BackendFeatureCompat; export default catalogModuleGitlabOrgDiscoveryEntityProvider; ``` diff --git a/plugins/catalog-backend-module-gitlab-org/package.json b/plugins/catalog-backend-module-gitlab-org/package.json index 1c7f158277..781dc54706 100644 --- a/plugins/catalog-backend-module-gitlab-org/package.json +++ b/plugins/catalog-backend-module-gitlab-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab-org", - "version": "0.0.2-next.3", + "version": "0.0.2", "description": "The gitlab-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-gitlab-org/src/catalogModuleGitlabOrgDiscoveryEntityProvider.test.ts b/plugins/catalog-backend-module-gitlab-org/src/catalogModuleGitlabOrgDiscoveryEntityProvider.test.ts index 568c91c8e2..1078936950 100644 --- a/plugins/catalog-backend-module-gitlab-org/src/catalogModuleGitlabOrgDiscoveryEntityProvider.test.ts +++ b/plugins/catalog-backend-module-gitlab-org/src/catalogModuleGitlabOrgDiscoveryEntityProvider.test.ts @@ -83,7 +83,7 @@ describe('catalogModuleGitlabOrgDiscoveryEntityProvider', () => { extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ eventsServiceFactory(), - catalogModuleGitlabOrgDiscoveryEntityProvider(), + catalogModuleGitlabOrgDiscoveryEntityProvider, mockServices.rootConfig.factory({ data: config }), mockServices.logger.factory(), scheduler.factory, diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index 2f399995be..ec7bbc1c27 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.3.18 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 150fc77: Fixed an issue in `GitlabOrgDiscoveryEntityProvider` where a missing `orgEnabled` config key was throwing an error. +- f271164: Fixed an issue in `GitlabDiscoveryEntityProvider` where the fallback branch was taking precedence over the GitLab default branch. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.3.18-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/api-report-alpha.md b/plugins/catalog-backend-module-gitlab/api-report-alpha.md index bb466a632e..1c27e1ee6f 100644 --- a/plugins/catalog-backend-module-gitlab/api-report-alpha.md +++ b/plugins/catalog-backend-module-gitlab/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const catalogModuleGitlabDiscoveryEntityProvider: () => BackendFeature; +const catalogModuleGitlabDiscoveryEntityProvider: BackendFeatureCompat; export default catalogModuleGitlabDiscoveryEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index 6d01d225cd..d52b452122 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", - "version": "0.3.18-next.3", + "version": "0.3.18", "description": "A Backstage catalog backend module that helps integrate towards GitLab", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-gitlab/src/module/catalogModuleGitlabDiscoveryEntityProvider.test.ts b/plugins/catalog-backend-module-gitlab/src/module/catalogModuleGitlabDiscoveryEntityProvider.test.ts index 3c93cb98f1..e4cff56bbd 100644 --- a/plugins/catalog-backend-module-gitlab/src/module/catalogModuleGitlabDiscoveryEntityProvider.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/module/catalogModuleGitlabDiscoveryEntityProvider.test.ts @@ -82,7 +82,7 @@ describe('catalogModuleGitlabDiscoveryEntityProvider', () => { extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ eventsServiceFactory(), - catalogModuleGitlabDiscoveryEntityProvider(), + catalogModuleGitlabDiscoveryEntityProvider, mockServices.rootConfig.factory({ data: config }), mockServices.logger.factory(), scheduler.factory, diff --git a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md index 51904c8e97..424baa2321 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md +++ b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-backend-module-incremental-ingestion +## 0.4.24 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.4.24-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-incremental-ingestion/api-report-alpha.md b/plugins/catalog-backend-module-incremental-ingestion/api-report-alpha.md index 6ab775f25b..f6ee4c1414 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/api-report-alpha.md +++ b/plugins/catalog-backend-module-incremental-ingestion/api-report-alpha.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { IncrementalEntityProvider } from '@backstage/plugin-catalog-backend-module-incremental-ingestion'; import { IncrementalEntityProviderOptions } from '@backstage/plugin-catalog-backend-module-incremental-ingestion'; // @alpha -const catalogModuleIncrementalIngestionEntityProvider: () => BackendFeature; +const catalogModuleIncrementalIngestionEntityProvider: BackendFeatureCompat; export default catalogModuleIncrementalIngestionEntityProvider; // @alpha diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index 14e8e37ae9..eba5fc86c1 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-incremental-ingestion", - "version": "0.4.24-next.3", + "version": "0.4.24", "description": "An entity provider for streaming large asset sources into the catalog", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/module/catalogModuleIncrementalIngestionEntityProvider.test.ts b/plugins/catalog-backend-module-incremental-ingestion/src/module/catalogModuleIncrementalIngestionEntityProvider.test.ts index 316a4be7eb..ed57ad9b46 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/module/catalogModuleIncrementalIngestionEntityProvider.test.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/module/catalogModuleIncrementalIngestionEntityProvider.test.ts @@ -45,7 +45,7 @@ describe('catalogModuleIncrementalIngestionEntityProvider', () => { ], features: [ httpRouterMock.factory, - catalogModuleIncrementalIngestionEntityProvider(), + catalogModuleIncrementalIngestionEntityProvider, createBackendModule({ pluginId: 'catalog', moduleId: 'incremental-test', diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/run.ts b/plugins/catalog-backend-module-incremental-ingestion/src/run.ts index 5af31482a6..1a98c478a1 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/run.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/run.ts @@ -63,7 +63,7 @@ async function main() { }), ); backend.add(import('@backstage/plugin-catalog-backend/alpha')); - backend.add(catalogModuleIncrementalIngestionEntityProvider()); + backend.add(catalogModuleIncrementalIngestionEntityProvider); backend.add( createBackendModule({ pluginId: 'catalog', diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 2dd3815850..62b8849ced 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.6.0 + +### Minor Changes + +- debcc8c: Migrate LDAP catalog module to the new backend system. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.6.0-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/api-report.md b/plugins/catalog-backend-module-ldap/api-report.md index 5fcbbc3091..84de581387 100644 --- a/plugins/catalog-backend-module-ldap/api-report.md +++ b/plugins/catalog-backend-module-ldap/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { CatalogProcessor } from '@backstage/plugin-catalog-node'; import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node'; import { Client } from 'ldapjs'; @@ -31,7 +31,7 @@ export type BindConfig = { }; // @public -const catalogModuleLdapOrgEntityProvider: () => BackendFeature; +const catalogModuleLdapOrgEntityProvider: BackendFeatureCompat; export default catalogModuleLdapOrgEntityProvider; // @public diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index dfce5277d2..beacc5e37f 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", - "version": "0.6.0-next.3", + "version": "0.6.0", "description": "A Backstage catalog backend module that helps integrate towards LDAP", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index cb9acc5380..998f9aacd0 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.5.27 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- f7be17a: Added missing `userSelect` property in `readMicrosoftGraphOrg` method +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.5.27-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/api-report-alpha.md b/plugins/catalog-backend-module-msgraph/api-report-alpha.md index b9c96e7798..9b769dba1e 100644 --- a/plugins/catalog-backend-module-msgraph/api-report-alpha.md +++ b/plugins/catalog-backend-module-msgraph/api-report-alpha.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { GroupTransformer } from '@backstage/plugin-catalog-backend-module-msgraph'; import { OrganizationTransformer } from '@backstage/plugin-catalog-backend-module-msgraph'; import { UserTransformer } from '@backstage/plugin-catalog-backend-module-msgraph'; // @alpha -const catalogModuleMicrosoftGraphOrgEntityProvider: () => BackendFeature; +const catalogModuleMicrosoftGraphOrgEntityProvider: BackendFeatureCompat; export default catalogModuleMicrosoftGraphOrgEntityProvider; // @alpha diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 035093e58c..bdaa470dea 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", - "version": "0.5.27-next.3", + "version": "0.5.27", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-msgraph/src/module/catalogModuleMicrosoftGraphOrgEntityProvider.test.ts b/plugins/catalog-backend-module-msgraph/src/module/catalogModuleMicrosoftGraphOrgEntityProvider.test.ts index d36995b1c8..5742fbbc6c 100644 --- a/plugins/catalog-backend-module-msgraph/src/module/catalogModuleMicrosoftGraphOrgEntityProvider.test.ts +++ b/plugins/catalog-backend-module-msgraph/src/module/catalogModuleMicrosoftGraphOrgEntityProvider.test.ts @@ -61,7 +61,7 @@ describe('catalogModuleMicrosoftGraphOrgEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModuleMicrosoftGraphOrgEntityProvider(), + catalogModuleMicrosoftGraphOrgEntityProvider, mockServices.rootConfig.factory({ data: config }), scheduler.factory, ], diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index 876c095e24..f60ec12844 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.37 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-backend@1.23.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.1.37-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/api-report.md b/plugins/catalog-backend-module-openapi/api-report.md index 206cfac291..b1685c3584 100644 --- a/plugins/catalog-backend-module-openapi/api-report.md +++ b/plugins/catalog-backend-module-openapi/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { CatalogProcessor } from '@backstage/plugin-catalog-node'; import { Config } from '@backstage/config'; import { Entity } from '@backstage/catalog-model'; @@ -15,7 +15,7 @@ import { ScmIntegrations } from '@backstage/integration'; import { UrlReader } from '@backstage/backend-common'; // @public -const catalogModuleJsonSchemaRefPlaceholderResolver: () => BackendFeature; +const catalogModuleJsonSchemaRefPlaceholderResolver: BackendFeatureCompat; export default catalogModuleJsonSchemaRefPlaceholderResolver; // @public (undocumented) diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 3691f1fcb3..c05d8dcec4 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", - "version": "0.1.37-next.3", + "version": "0.1.37", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-openapi/src/module/catalogModuleJsonSchemaRefPlaceholderResolver.test.ts b/plugins/catalog-backend-module-openapi/src/module/catalogModuleJsonSchemaRefPlaceholderResolver.test.ts index cfea25341e..6de50af048 100644 --- a/plugins/catalog-backend-module-openapi/src/module/catalogModuleJsonSchemaRefPlaceholderResolver.test.ts +++ b/plugins/catalog-backend-module-openapi/src/module/catalogModuleJsonSchemaRefPlaceholderResolver.test.ts @@ -37,7 +37,7 @@ describe('catalogModuleJsonSchemaRefPlaceholderResolver', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], - features: [catalogModuleJsonSchemaRefPlaceholderResolver()], + features: [catalogModuleJsonSchemaRefPlaceholderResolver], }); expect(Object.keys(registeredPlaceholderResolvers)).toEqual([ diff --git a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md index ef16a4547c..e990331ee9 100644 --- a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md +++ b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-puppetdb +## 0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.1.25-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-puppetdb/api-report-alpha.md b/plugins/catalog-backend-module-puppetdb/api-report-alpha.md index 2f3921012a..41af9e4eca 100644 --- a/plugins/catalog-backend-module-puppetdb/api-report-alpha.md +++ b/plugins/catalog-backend-module-puppetdb/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const catalogModulePuppetDbEntityProvider: () => BackendFeature; +const catalogModulePuppetDbEntityProvider: BackendFeatureCompat; export default catalogModulePuppetDbEntityProvider; // (No @packageDocumentation comment for this package) diff --git a/plugins/catalog-backend-module-puppetdb/package.json b/plugins/catalog-backend-module-puppetdb/package.json index 48997e80a9..3407a6dedd 100644 --- a/plugins/catalog-backend-module-puppetdb/package.json +++ b/plugins/catalog-backend-module-puppetdb/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-puppetdb", - "version": "0.1.25-next.3", + "version": "0.1.25", "description": "A Backstage catalog backend module that helps integrate towards PuppetDB", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-puppetdb/src/module/catalogModulePuppetDbEntityProvider.test.ts b/plugins/catalog-backend-module-puppetdb/src/module/catalogModulePuppetDbEntityProvider.test.ts index f931b2c741..4fee7e2cff 100644 --- a/plugins/catalog-backend-module-puppetdb/src/module/catalogModulePuppetDbEntityProvider.test.ts +++ b/plugins/catalog-backend-module-puppetdb/src/module/catalogModulePuppetDbEntityProvider.test.ts @@ -55,7 +55,7 @@ describe('catalogModulePuppetDbEntityProvider', () => { await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], features: [ - catalogModulePuppetDbEntityProvider(), + catalogModulePuppetDbEntityProvider, mockServices.rootConfig.factory({ data: config }), scheduler.factory, ], diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md index e177994807..a73ea9fbaf 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md +++ b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-scaffolder-entity-model +## 0.1.17 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-model@1.5.0 + ## 0.1.17-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/api-report.md b/plugins/catalog-backend-module-scaffolder-entity-model/api-report.md index f9861959b7..1a0eabbec4 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/api-report.md +++ b/plugins/catalog-backend-module-scaffolder-entity-model/api-report.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { CatalogProcessor } from '@backstage/plugin-catalog-node'; import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node'; import { Entity } from '@backstage/catalog-model'; import { LocationSpec } from '@backstage/plugin-catalog-common'; // @public -const catalogModuleScaffolderEntityModel: () => BackendFeature; +const catalogModuleScaffolderEntityModel: BackendFeatureCompat; export default catalogModuleScaffolderEntityModel; // @public diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/package.json b/plugins/catalog-backend-module-scaffolder-entity-model/package.json index 4b7813d8a3..247dc999db 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/package.json +++ b/plugins/catalog-backend-module-scaffolder-entity-model/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-scaffolder-entity-model", - "version": "0.1.17-next.3", + "version": "0.1.17", "description": "Adds support for the scaffolder specific entity model (e.g. the Template kind) to the catalog backend plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/src/module.test.ts b/plugins/catalog-backend-module-scaffolder-entity-model/src/module.test.ts index f9111c1be5..3b0a41a8f9 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/src/module.test.ts +++ b/plugins/catalog-backend-module-scaffolder-entity-model/src/module.test.ts @@ -24,7 +24,7 @@ describe('catalogModuleScaffolderEntityModel', () => { const extensionPoint = { addProcessor: jest.fn() }; await startTestBackend({ extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]], - features: [catalogModuleScaffolderEntityModel()], + features: [catalogModuleScaffolderEntityModel], }); expect(extensionPoint.addProcessor).toHaveBeenCalledWith( diff --git a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md index 93ff11abaa..c07c7ef7a3 100644 --- a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md +++ b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-unprocessed +## 0.4.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-catalog-unprocessed-entities-common@0.0.2 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + ## 0.4.6-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-unprocessed/api-report.md b/plugins/catalog-backend-module-unprocessed/api-report.md index febde39834..044d6d3501 100644 --- a/plugins/catalog-backend-module-unprocessed/api-report.md +++ b/plugins/catalog-backend-module-unprocessed/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { DiscoveryService } from '@backstage/backend-plugin-api'; import { HttpAuthService } from '@backstage/backend-plugin-api'; import { HttpRouterService } from '@backstage/backend-plugin-api'; @@ -11,7 +11,7 @@ import { Knex } from 'knex'; import { PermissionsService } from '@backstage/backend-plugin-api'; // @public -const catalogModuleUnprocessedEntities: () => BackendFeature; +const catalogModuleUnprocessedEntities: BackendFeatureCompat; export default catalogModuleUnprocessedEntities; // @public diff --git a/plugins/catalog-backend-module-unprocessed/package.json b/plugins/catalog-backend-module-unprocessed/package.json index 22e6d46649..845f5aa9c6 100644 --- a/plugins/catalog-backend-module-unprocessed/package.json +++ b/plugins/catalog-backend-module-unprocessed/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-unprocessed", - "version": "0.4.6-next.3", + "version": "0.4.6", "description": "Backstage Catalog module to view unprocessed entities", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index e1dc06e78b..7b83c21930 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-catalog-backend +## 1.23.0 + +### Minor Changes + +- c7528b0: Pass through `EventsService` too in the new backend system + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- d779e3b: Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. +- 6c5cab1: Fix bug in `getLocationByEntity` +- 0f55f5c: Ensure name and title are both indexed by the DefaultCatalogCollator +- 1779188: Start using the `isDatabaseConflictError` helper from the `@backstage/backend-plugin-api` package in order to avoid dependency with the soon to deprecate `@backstage/backend-common` package. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-backend-module-catalog@0.1.25 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.23.0-next.3 ### Patch Changes diff --git a/plugins/catalog-backend/api-report-alpha.md b/plugins/catalog-backend/api-report-alpha.md index 51a2ec6114..260f59e70f 100644 --- a/plugins/catalog-backend/api-report-alpha.md +++ b/plugins/catalog-backend/api-report-alpha.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ConditionalPolicyDecision } from '@backstage/plugin-permission-common'; import { Conditions } from '@backstage/plugin-permission-node'; import { EntitiesSearchFilter } from '@backstage/plugin-catalog-node'; @@ -75,7 +75,7 @@ export type CatalogPermissionRule< > = PermissionRule; // @alpha -const catalogPlugin: () => BackendFeature; +const catalogPlugin: BackendFeatureCompat; export default catalogPlugin; // @alpha diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index f1a22f839a..574e1c99ea 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend", - "version": "1.23.0-next.3", + "version": "1.23.0", "description": "The Backstage backend plugin that provides the Backstage catalog", "backstage": { "role": "backend-plugin", diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index 75b3c0d6d5..fd3c714f97 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-common +## 1.0.24 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-model@1.5.0 + ## 1.0.24-next.0 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 7bdcfc2bc7..0ea4ce5e3e 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-common", - "version": "1.0.24-next.0", + "version": "1.0.24", "description": "Common functionalities for the catalog plugin", "backstage": { "role": "common-library", diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index c7194dcac9..9f39daa276 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog-graph +## 0.4.6 + +### Patch Changes + +- 8d474d3: Add function to `EntityRelationsGraph` filter that excludes entities from graph +- d44a20a: Added additional plugin metadata to `package.json`. +- cd6aeea: The `catalogEntity` external route will now by default bind to the catalog entity page if it is available. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + ## 0.4.6-next.2 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 5b44c7afa5..17013d199a 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.4.6-next.2", + "version": "0.4.6", "backstage": { "role": "frontend-plugin", "pluginId": "catalog-graph", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index ed04b5a0f8..9bee65367a 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-catalog-import +## 0.12.0 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 3daad61: Integrated Azure DevOps as a catalog import source. This enables Backstage to create Pull Requests to Azure DevOps repositories as it does with GitHub repositories +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.12.0-next.3 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 08c07000d5..2b93e0a7c0 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-import", - "version": "0.12.0-next.3", + "version": "0.12.0", "description": "A Backstage plugin the helps you import entities into your catalog", "backstage": { "role": "frontend-plugin", diff --git a/plugins/catalog-import/src/api/AzureDevops.test.ts b/plugins/catalog-import/src/api/AzureDevops.test.ts new file mode 100644 index 0000000000..4a3dfca42d --- /dev/null +++ b/plugins/catalog-import/src/api/AzureDevops.test.ts @@ -0,0 +1,52 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { parseRepoUrl } from './AzureDevops'; + +describe('parseRepoUrl', () => { + it('parses Azure DevOps Cloud url', async () => { + const result = parseRepoUrl( + 'https://dev.azure.com/organization/project/_git/repository?path=%2Fcatalog-info.yaml', + ); + + expect(result.host).toEqual('dev.azure.com'); + expect(result.org).toEqual('organization'); + expect(result.project).toEqual('project'); + expect(result.repo).toEqual('repository'); + }); + + it('parses Azure DevOps Server url', async () => { + const result = parseRepoUrl( + 'https://server.com/organization/project/_git/repository?path=%2Fcatalog-info.yaml', + ); + + expect(result.host).toEqual('server.com'); + expect(result.org).toEqual('organization'); + expect(result.project).toEqual('project'); + expect(result.repo).toEqual('repository'); + }); + + it('parses TFS subpath Url', async () => { + const result = parseRepoUrl( + 'https://server.com/tfs/organization/project/_git/repository?path=%2Fcatalog-info.yaml', + ); + + expect(result.host).toEqual('server.com/tfs'); + expect(result.org).toEqual('organization'); + expect(result.project).toEqual('project'); + expect(result.repo).toEqual('repository'); + }); +}); diff --git a/plugins/catalog-import/src/api/AzureDevops.ts b/plugins/catalog-import/src/api/AzureDevops.ts new file mode 100644 index 0000000000..f7309d01f8 --- /dev/null +++ b/plugins/catalog-import/src/api/AzureDevops.ts @@ -0,0 +1,104 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { ScmAuthApi } from '@backstage/integration-react'; +import { ConfigApi } from '@backstage/core-plugin-api'; +import { getBranchName, getCatalogFilename } from '../components/helpers'; +import { createAzurePullRequest } from './AzureRepoApiClient'; + +export interface AzureRepoParts { + tenantUrl: string; + repoName: string; + project: string; +} + +export function parseAzureUrl(repoUrl: string): AzureRepoParts { + const { org, repo, project, host } = parseRepoUrl(repoUrl); + if (!org || !repo || !project) { + throw new Error( + 'Invalid AzureDevops Repository. Please use a valid repository url and try again ', + ); + } + const tenantUrl = `https://${host}/${org}`; + + return { tenantUrl, repoName: repo, project: project }; +} + +export async function submitAzurePrToRepo( + options: { + title: string; + body: string; + fileContent: string; + repositoryUrl: string; + }, + scmAuthApi: ScmAuthApi, + configApi: ConfigApi, +) { + const { repositoryUrl, fileContent, title, body } = options; + + const branchName = getBranchName(configApi); + const fileName = getCatalogFilename(configApi); + + const { token } = await scmAuthApi.getCredentials({ + url: repositoryUrl, + additionalScope: { + repoWrite: true, + }, + }); + const { tenantUrl, repoName, project } = parseAzureUrl(repositoryUrl); + const result = await createAzurePullRequest({ + token, + fileContent, + title, + description: body, + project, + repository: repoName, + branchName, + tenantUrl, + fileName, + }); + const catalogLocation = `${result.repository.webUrl}?path=/${fileName}`; + const prLocation = `${result.repository.webUrl}/pullrequest/${result.pullRequestId}`; + return { + link: prLocation!, + location: catalogLocation, + }; +} + +export function parseRepoUrl(sourceUrl: string) { + const url = new URL(sourceUrl); + + let host = url.host; + let org; + let project; + let repo; + + const parts = url.pathname.split('/').map(part => decodeURIComponent(part)); + if (parts[2] === '_git') { + org = parts[1]; + project = repo = parts[3]; + } else if (parts[3] === '_git') { + org = parts[1]; + project = parts[2]; + repo = parts[4]; + } else if (parts[4] === '_git') { + host = `${host}/${parts[1]}`; + org = parts[2]; + project = parts[3]; + repo = parts[5]; + } + + return { host, org, project, repo }; +} diff --git a/plugins/catalog-import/src/api/AzureRepoApiClient.test.ts b/plugins/catalog-import/src/api/AzureRepoApiClient.test.ts new file mode 100644 index 0000000000..a8fbe9db76 --- /dev/null +++ b/plugins/catalog-import/src/api/AzureRepoApiClient.test.ts @@ -0,0 +1,391 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { rest } from 'msw'; +import { + AzurePrOptions, + AzurePrResult, + AzureRef, + AzureRefUpdate, + AzureRepo, + createAzurePullRequest, + CreatePrOptions, + NewBranchOptions, + RepoApiClient, +} from './AzureRepoApiClient'; +import { setupServer } from 'msw/node'; +import { setupRequestMockHandlers } from '@backstage/test-utils'; + +function mockRepoEndpoint() { + return rest.get( + 'https://dev.azure.com/acme/project/_apis/git/repositories/:path', + (req, res, ctx) => { + const { path } = req.params; + if (path === 'success') { + return res( + ctx.json({ + id: '01', + name: 'success', + defaultBranch: 'refs/heads/master', + }), + ); + } + if (path === 'not-found') { + return res( + ctx.status(404), + ctx.json({ + message: 'repository not found', + }), + ); + } + return res(ctx.status(200)); + }, + ); +} + +function mockRefsEndpoint() { + return rest.get( + 'https://dev.azure.com/acme/project/_apis/git/repositories/:repo/refs', + (req, res, ctx) => { + const filter = req.url.searchParams.get('filter'); + const { repo } = req.params; + if (repo !== 'success') { + return res( + ctx.status(404), + ctx.json({ + message: 'repository not found', + }), + ); + } + if (filter === 'heads/main') { + const result = { + value: [ + { + name: 'refs/heads/main', + objectId: '0000000000000000000000000000000000000000', + }, + ], + }; + return res(ctx.json(result)); + } + return res(ctx.json({ value: [] })); + }, + ); +} + +function mockPushEndpoint() { + return rest.post( + 'https://dev.azure.com/acme/project/_apis/git/repositories/:repo/pushes', + (req, res, ctx) => { + const { repo } = req.params; + if (repo === 'success') { + return res( + ctx.json({ + refUpdates: [ + { + repositoryId: '01', + name: 'refs/heads/backstage-integration', + oldObjectId: '0000000000000000000000000000000000000000', + newObjectId: '0000000000000000000000000000000000000001', + }, + ], + } satisfies { refUpdates: AzureRefUpdate[] }), + ); + } + + if (repo === 'error') { + return res( + ctx.status(500), + ctx.json({ + message: 'internal error', + }), + ); + } + + return res( + ctx.status(500), + ctx.json({ + message: 'Unexpected call', + }), + ); + }, + ); +} + +function mockPrEndpoint() { + return rest.post( + 'https://dev.azure.com/acme/project/_apis/git/repositories/:repo/pullrequests', + (req, res, ctx) => { + const { repo } = req.params; + if (repo === 'success') { + return res( + ctx.json({ + pullRequestId: 'PR01', + repository: { + name: 'success', + webUrl: 'https://example.com', + }, + } satisfies AzurePrResult), + ); + } + + return res( + ctx.status(500), + ctx.json({ + message: 'internal error', + }), + ); + }, + ); +} + +describe('RepoApiClient', () => { + const server = setupServer(); + setupRequestMockHandlers(server); + const testToken = new Date().toString(); + const sut = new RepoApiClient({ + project: 'project', + tenantUrl: 'https://dev.azure.com/acme', + } as any); + beforeEach(() => { + server.use( + mockPrEndpoint(), + mockRefsEndpoint(), + mockPushEndpoint(), + mockRepoEndpoint(), + ); + }); + describe('getRepository', () => { + it('should get an existing repository', async () => { + await expect(sut.getRepository('success', testToken)).resolves.toEqual({ + id: '01', + name: 'success', + defaultBranch: 'refs/heads/master', + }); + }); + it('should throw when the repository repository does not exist', async () => { + await expect(sut.getRepository('not-found', testToken)).rejects.toThrow( + new Error('repository not found'), + ); + }); + }); + describe('getDefaultBranch', () => { + it('should return when correct branch', async () => { + const foundRef = await sut.getDefaultBranch( + { + name: 'success', + defaultBranch: 'refs/heads/main', + id: '01', + }, + testToken, + ); + expect(foundRef).toEqual({ + name: 'refs/heads/main', + objectId: '0000000000000000000000000000000000000000', + }); + }); + + it('should throw when the repository does not exist', async () => { + const promise = sut.getDefaultBranch( + { + name: 'fail', + defaultBranch: 'refs/heads/main', + id: '01', + }, + testToken, + ); + await expect(promise).rejects.toThrow(new Error('repository not found')); + }); + + it('should throw when the default branch does not exist', async () => { + const promise = sut.getDefaultBranch( + { + name: 'success', + defaultBranch: 'refs/heads/missing_branch', + id: '01', + }, + testToken, + ); + await expect(promise).rejects.toThrow( + new Error(`The requested ref 'heads/missing_branch' was not found`), + ); + }); + }); + describe('pushNewBranch', () => { + let options: NewBranchOptions; + let expectedResult: AzureRefUpdate; + + beforeEach(() => { + options = { + repoName: 'name', + title: 'title', + sourceBranch: { + name: 'refs/heads/main', + objectId: '0000000000000000000000000000000000000000', + }, + branchName: 'backstage-integration', + fileName: 'catalog-info.yaml', + fileContent: 'This is a test', + }; + expectedResult = { + repositoryId: '01', + name: 'refs/heads/backstage-integration', + oldObjectId: '0000000000000000000000000000000000000000', + newObjectId: '0000000000000000000000000000000000000001', + }; + }); + it('should create a new branch', async () => { + await expect( + sut.pushNewBranch( + { + ...options, + repoName: 'success', + }, + testToken, + ), + ).resolves.toEqual(expectedResult); + }); + it('should throw when api call fails', async () => { + await expect( + sut.pushNewBranch( + { + ...options, + repoName: 'error', + }, + testToken, + ), + ).rejects.toThrow(new Error('internal error')); + }); + }); + describe('createPullRequest', () => { + const options: CreatePrOptions = { + repoName: 'repoName', + sourceName: 'refs/heads/main', + targetName: 'refs/heads/backstage-integration', + title: 'Title', + description: 'Description', + }; + it('should create a new Pull request', async () => { + await expect( + sut.createPullRequest( + { + ...options, + repoName: 'success', + }, + testToken, + ), + ).resolves.toEqual({ + pullRequestId: 'PR01', + repository: { + name: 'success', + webUrl: 'https://example.com', + }, + } satisfies AzurePrResult); + }); + it('should throw when api call fails', async () => { + await expect( + sut.createPullRequest({ ...options, repoName: 'error' }, testToken), + ).rejects.toThrow(new Error('internal error')); + }); + }); +}); +describe('createAzurePullRequest', () => { + let client: RepoApiClient; + let clientMock: Record; + + beforeEach(() => { + clientMock = { + createPullRequest: jest.fn(), + pushNewBranch: jest.fn(), + getRepository: jest.fn(), + getDefaultBranch: jest.fn(), + }; + client = clientMock as any as RepoApiClient; + }); + + it('should create a new Pull request', async () => { + const testToken = new Date().getTime().toString(); + const options: AzurePrOptions = { + tenantUrl: 'https://dev.azure.com/acme', + repository: 'test', + project: 'project', + fileName: 'catalog-info.yaml', + title: 'Test Title', + fileContent: 'content', + branchName: 'backstage-integration', + description: 'Test Description', + token: testToken, + }; + const repo: AzureRepo = { + name: options.repository, + defaultBranch: 'ref/heads/main', + id: '01', + }; + const defaultBranch: AzureRef = { + name: 'ref/heads/main', + objectId: '000000000000000000000000000000000000000', + }; + const expectedResult: AzurePrResult = { + pullRequestId: 'PR01', + repository: { + name: options.repository, + webUrl: 'https://dev.azure.com/acme/project', + }, + }; + + clientMock.getRepository.mockResolvedValue(repo); + clientMock.getDefaultBranch.mockResolvedValue(defaultBranch); + clientMock.pushNewBranch.mockResolvedValue({ + name: options.branchName, + oldObjectId: '000000000000000000000000000000000000000', + newObjectId: '000000000000000000000000000000000000001', + repositoryId: '01', + } satisfies AzureRefUpdate); + clientMock.createPullRequest.mockResolvedValue(expectedResult); + + await expect(createAzurePullRequest(options, client)).resolves.toEqual( + expectedResult, + ); + expect(clientMock.getRepository).toHaveBeenCalledWith( + options.repository, + testToken, + ); + expect(clientMock.getDefaultBranch).toHaveBeenCalledWith(repo, testToken); + const expectedBranchOptions: NewBranchOptions = { + repoName: repo.name, + sourceBranch: defaultBranch, + branchName: options.branchName, + fileContent: options.fileContent, + fileName: options.fileName, + title: options.title, + }; + expect(clientMock.pushNewBranch).toHaveBeenCalledWith( + expectedBranchOptions, + testToken, + ); + + const expectedPrOptions: CreatePrOptions = { + repoName: repo.name, + description: options.description, + title: options.title, + sourceName: options.branchName, + targetName: defaultBranch.name, + }; + expect(clientMock.createPullRequest).toHaveBeenCalledWith( + expectedPrOptions, + testToken, + ); + }); +}); diff --git a/plugins/catalog-import/src/api/AzureRepoApiClient.ts b/plugins/catalog-import/src/api/AzureRepoApiClient.ts new file mode 100644 index 0000000000..56be626f5e --- /dev/null +++ b/plugins/catalog-import/src/api/AzureRepoApiClient.ts @@ -0,0 +1,292 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface AzurePrOptions { + tenantUrl: string; + title: string; + project: string; + branchName: string; + repository: string; + token: string; + fileContent: string; + fileName: string; + description: string; +} + +export interface CreateAzurePr { + sourceRefName: string; + targetRefName: string; + title: string; + description: string; +} + +export interface AzureRepo { + id: string; + name: string; + defaultBranch: string; +} + +export interface AzureRef { + name: string; + objectId: string; +} + +interface RefQueryResult { + value: AzureRef[]; +} + +export interface AzureCommit { + comment: string; + + changes: { + changeType: string; + item: { + path: string; + }; + newContent: { + content: string; + contentType: 'rawtext'; + }; + }[]; +} + +export interface AzureRefUpdate { + repositoryId: string; + name: string; + oldObjectId: string; + newObjectId: string; +} + +export interface AzurePushResult { + refUpdates: AzureRefUpdate[]; +} + +export interface AzurePush { + refUpdates: { + name: string; + oldObjectId: string; + }[]; + commits: AzureCommit[]; +} + +export interface AzurePrResult { + pullRequestId: string; + repository: { + name: string; + webUrl: string; + }; +} + +const apiVersions = '6.0'; + +export interface RepoApiClientOptions { + project: string; + tenantUrl: string; +} + +export interface NewBranchOptions { + fileContent: string; + fileName: string; + title: string; + branchName: string; + repoName: string; + sourceBranch: AzureRef; +} + +export interface CreatePrOptions { + repoName: string; + sourceName: string; + targetName: string; + description: string; + title: string; +} + +export class RepoApiClient { + private createEndpoint = ( + path: string, + version: string, + queryParams: Record | undefined = undefined, + ) => { + const url = new URL( + `${this._options.tenantUrl}/${this._options.project}/_apis/git/repositories`, + ); + url.pathname += path; + + url.searchParams.set('api-version', version); + Object.entries(queryParams ?? {}).forEach(([key, value]) => + url.searchParams.set(key, value), + ); + return url.toString(); + }; + + constructor(private _options: RepoApiClientOptions) {} + + private async get( + path: string, + version: string, + queryParams: Record | undefined = undefined, + token: string, + ): Promise { + const endpoint = this.createEndpoint(path, version, queryParams); + const result = await fetch(endpoint, { + headers: { + Authorization: `Bearer ${token}`, + }, + }); + if (!result.ok) { + return result.json().then(it => Promise.reject(new Error(it.message))); + } + return await result.json(); + } + + private async post( + path: string, + version: string, + payload: unknown, + token: string, + ): Promise { + const endpoint = this.createEndpoint(path, version); + const result = await fetch(endpoint, { + method: 'POST', + headers: { + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + body: JSON.stringify(payload), + }); + if (!result.ok) { + return result.json().then(it => Promise.reject(new Error(it.message))); + } + return await result.json(); + } + + async getRepository( + repositoryName: string, + token: string, + ): Promise { + return this.get(`/${repositoryName}`, apiVersions, undefined, token); + } + + async getDefaultBranch(repo: AzureRepo, token: string): Promise { + const filter = repo.defaultBranch.replace('refs/', ''); + const result: RefQueryResult = await this.get( + `/${repo.name}/refs`, + apiVersions, + { filter }, + token, + ); + if (!result.value?.length) { + return Promise.reject( + new Error(`The requested ref '${filter}' was not found`), + ); + } + return result.value[0]; + } + + async pushNewBranch( + options: NewBranchOptions, + token: string, + ): Promise { + const { sourceBranch, repoName } = options; + const push: AzurePush = { + refUpdates: [ + { + name: `refs/heads/${options.branchName}`, + oldObjectId: sourceBranch.objectId, + }, + ], + commits: [ + { + comment: options.title, + changes: [ + { + changeType: 'add', + item: { + path: `/${options.fileName}`, + }, + newContent: { + content: options.fileContent, + contentType: 'rawtext', + }, + }, + ], + }, + ], + }; + const result = await this.post( + `/${repoName}/pushes`, + apiVersions, + push, + token, + ); + return result.refUpdates[0]; + } + + async createPullRequest( + options: CreatePrOptions, + token: string, + ): Promise { + const { repoName, sourceName, targetName } = options; + const payload: CreateAzurePr = { + title: options.title, + description: options.description, + sourceRefName: sourceName, + targetRefName: targetName, + }; + + return await this.post( + `/${repoName}/pullrequests`, + apiVersions, + payload, + token, + ); + } +} + +export async function createAzurePullRequest( + options: AzurePrOptions, + client: RepoApiClient | undefined = undefined, +): Promise { + const { + title, + repository, + token, + fileContent, + fileName, + branchName, + description, + } = options; + const actualClient = client ?? new RepoApiClient(options); + const repo = await actualClient.getRepository(repository, token); + const defaultBranch = await actualClient.getDefaultBranch(repo, token); + const branchOptions: NewBranchOptions = { + title: title, + repoName: repo.name, + sourceBranch: defaultBranch, + branchName: branchName, + fileContent: fileContent, + fileName: fileName, + }; + const refUpdate = await actualClient.pushNewBranch(branchOptions, token); + const prOptions: CreatePrOptions = { + title, + description, + repoName: repo.name, + sourceName: refUpdate.name, + targetName: defaultBranch.name, + }; + return actualClient.createPullRequest(prOptions, token); +} diff --git a/plugins/catalog-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index 98cf972446..1f16840c33 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -43,9 +43,16 @@ jest.mock('@octokit/rest', () => { return octokit; } } + return { Octokit }; }); +jest.mock('./AzureRepoApiClient', () => { + return { + createAzurePullRequest: jest.fn(), + }; +}); + import { ConfigReader, UrlPatternDiscovery } from '@backstage/core-app-api'; import { ScmIntegrations } from '@backstage/integration'; import { ScmAuthApi } from '@backstage/integration-react'; @@ -55,6 +62,11 @@ import { Octokit } from '@octokit/rest'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { CatalogImportClient } from './CatalogImportClient'; +import { + AzurePrOptions, + AzurePrResult, + createAzurePullRequest, +} from './AzureRepoApiClient'; describe('CatalogImportClient', () => { const server = setupServer(); @@ -262,7 +274,7 @@ describe('CatalogImportClient', () => { }); }); - it('should reject for integrations that are not github ones', async () => { + it('should reject for integrations that are not github or azure', async () => { await expect( catalogImportClient.analyzeUrl( 'https://registered-but-not-github.com/backstage/backstage', @@ -281,7 +293,7 @@ describe('CatalogImportClient', () => { ), ).rejects.toThrow( new Error( - 'This URL was not recognized as a valid GitHub URL because there was no configured integration that matched the given host name. You could try to paste the full URL to a catalog-info.yaml file instead.', + 'This URL was not recognized as a valid git URL because there was no configured integration that matched the given host name. Currently GitHub and Azure DevOps are supported. You could try to paste the full URL to a catalog-info.yaml file instead.', ), ); }); @@ -612,6 +624,61 @@ describe('CatalogImportClient', () => { base: 'main', }); }); + it('should create AzureDevops pull request', async () => { + catalogApi.validateEntity.mockResolvedValueOnce({ + valid: true, + }); + const azureMock = createAzurePullRequest as jest.Mock; + azureMock.mockResolvedValueOnce({ + repository: { + name: 'backstage', + webUrl: 'https://dev.azure.com/spotify/backstage/_git/backstage', + }, + pullRequestId: '01', + } satisfies AzurePrResult); + const expectedPrOptions: AzurePrOptions = { + title: 'A title/message', + description: 'A body', + repository: 'backstage', + fileName: 'catalog-info.yaml', + project: 'backstage', + tenantUrl: 'https://dev.azure.com/spotify', + branchName: 'backstage-integration', + token: 'token', + fileContent: ` + { + "apiVersion": "backstage.io/v1alpha1", + "kind": "Component", + "metadata": { + "name": "valid-name", + "annotations": { + "github.com/project-slug": "backstage/example-repo" + } + }, + "spec": { + "type": "other", + "lifecycle": "unknown", + "owner": "backstage" + } + } + `, + }; + await expect( + catalogImportClient.submitPullRequest({ + repositoryUrl: + 'https://dev.azure.com/spotify/backstage/_git/backstage', + fileContent: expectedPrOptions.fileContent, + title: expectedPrOptions.title, + body: expectedPrOptions.description, + }), + ).resolves.toEqual({ + link: 'https://dev.azure.com/spotify/backstage/_git/backstage/pullrequest/01', + location: + 'https://dev.azure.com/spotify/backstage/_git/backstage?path=/catalog-info.yaml', + }); + + expect(azureMock).toHaveBeenCalledWith(expectedPrOptions); + }); it('Submit Pull Request with invalid component name', async () => { const ErrorMessage = 'Policy check failed for component:default/invalid name; caused by Error: "metadata.name" is not valid; expected a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total but found "invalid name". To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md'; diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index ec5950ec51..78e54ac98c 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -17,18 +17,18 @@ import { CatalogApi } from '@backstage/catalog-client'; import { ConfigApi, DiscoveryApi, FetchApi } from '@backstage/core-plugin-api'; import { - GithubIntegrationConfig, + GithubIntegration, ScmIntegrationRegistry, } from '@backstage/integration'; import { ScmAuthApi } from '@backstage/integration-react'; -import { Octokit } from '@octokit/rest'; -import { Base64 } from 'js-base64'; import { AnalyzeResult, CatalogImportApi } from './CatalogImportApi'; import YAML from 'yaml'; -import { getGithubIntegrationConfig } from './GitHub'; -import { getBranchName, getCatalogFilename } from '../components/helpers'; +import { GitHubOptions, submitGitHubPrToRepo } from './GitHub'; +import { getCatalogFilename } from '../components/helpers'; import { AnalyzeLocationResponse } from '@backstage/plugin-catalog-common'; import { CompoundEntityRef } from '@backstage/catalog-model'; +import parseGitUrl from 'git-url-parse'; +import { submitAzurePrToRepo } from './AzureDevops'; /** * The default implementation of the {@link CatalogImportApi}. @@ -85,19 +85,21 @@ export class CatalogImportClient implements CatalogImportApi { ], }; } - - const ghConfig = getGithubIntegrationConfig(this.scmIntegrationsApi, url); - if (!ghConfig) { - const other = this.scmIntegrationsApi.byUrl(url); + const supportedIntegrations = ['github', 'azure']; + const foundIntegration = this.scmIntegrationsApi.byUrl(url); + const iSupported = + !!foundIntegration && + supportedIntegrations.find(it => it === foundIntegration.type); + if (!iSupported) { const catalogFilename = getCatalogFilename(this.configApi); - if (other) { + if (foundIntegration) { throw new Error( - `The ${other.title} integration only supports full URLs to ${catalogFilename} files. Did you try to pass in the URL of a directory instead?`, + `The ${foundIntegration.title} integration only supports full URLs to ${catalogFilename} files. Did you try to pass in the URL of a directory instead?`, ); } throw new Error( - `This URL was not recognized as a valid GitHub URL because there was no configured integration that matched the given host name. You could try to paste the full URL to a ${catalogFilename} file instead.`, + `This URL was not recognized as a valid git URL because there was no configured integration that matched the given host name. Currently GitHub and Azure DevOps are supported. You could try to paste the full URL to a ${catalogFilename} file instead.`, ); } @@ -140,7 +142,7 @@ export class CatalogImportClient implements CatalogImportApi { return { type: 'repository', - integrationType: 'github', + integrationType: foundIntegration.type, url: url, generatedEntities: analyzation.generateEntities.map(x => x.entity), }; @@ -181,21 +183,40 @@ the component will become available.\n\nFor more information, read an \ if (!validationResponse.valid) { throw new Error(validationResponse.errors[0].message); } - const ghConfig = getGithubIntegrationConfig( - this.scmIntegrationsApi, - repositoryUrl, - ); - if (ghConfig) { - return await this.submitGitHubPrToRepo({ - ...ghConfig, - repositoryUrl, - fileContent, - title, - body, - }); + const provider = this.scmIntegrationsApi.byUrl(repositoryUrl); + + switch (provider?.type) { + case 'github': { + const { config } = provider as GithubIntegration; + const { name, owner } = parseGitUrl(repositoryUrl); + const options2: GitHubOptions = { + githubIntegrationConfig: config, + repo: name, + owner: owner, + repositoryUrl, + fileContent, + title, + body, + }; + return submitGitHubPrToRepo(options2, this.scmAuthApi, this.configApi); + } + case 'azure': { + return submitAzurePrToRepo( + { + repositoryUrl, + fileContent, + title, + body, + }, + this.scmAuthApi, + this.configApi, + ); + } + default: { + throw new Error('unimplemented!'); + } } - throw new Error('unimplemented!'); } // TODO: this could be part of the catalog api @@ -234,125 +255,4 @@ the component will become available.\n\nFor more information, read an \ const payload = await response.json(); return payload; } - - // TODO: extract this function and implement for non-github - private async submitGitHubPrToRepo(options: { - owner: string; - repo: string; - title: string; - body: string; - fileContent: string; - repositoryUrl: string; - githubIntegrationConfig: GithubIntegrationConfig; - }): Promise<{ link: string; location: string }> { - const { - owner, - repo, - title, - body, - fileContent, - repositoryUrl, - githubIntegrationConfig, - } = options; - - const { token } = await this.scmAuthApi.getCredentials({ - url: repositoryUrl, - additionalScope: { - repoWrite: true, - }, - }); - - const octo = new Octokit({ - auth: token, - baseUrl: githubIntegrationConfig.apiBaseUrl, - }); - - const branchName = getBranchName(this.configApi); - const fileName = getCatalogFilename(this.configApi); - - const repoData = await octo.repos - .get({ - owner, - repo, - }) - .catch(e => { - throw new Error(formatHttpErrorMessage("Couldn't fetch repo data", e)); - }); - - const parentRef = await octo.git - .getRef({ - owner, - repo, - ref: `heads/${repoData.data.default_branch}`, - }) - .catch(e => { - throw new Error( - formatHttpErrorMessage("Couldn't fetch default branch data", e), - ); - }); - - await octo.git - .createRef({ - owner, - repo, - ref: `refs/heads/${branchName}`, - sha: parentRef.data.object.sha, - }) - .catch(e => { - throw new Error( - formatHttpErrorMessage( - `Couldn't create a new branch with name '${branchName}'`, - e, - ), - ); - }); - - await octo.repos - .createOrUpdateFileContents({ - owner, - repo, - path: fileName, - message: title, - content: Base64.encode(fileContent), - branch: branchName, - }) - .catch(e => { - throw new Error( - formatHttpErrorMessage( - `Couldn't create a commit with ${fileName} file added`, - e, - ), - ); - }); - - const pullRequestResponse = await octo.pulls - .create({ - owner, - repo, - title, - head: branchName, - body, - base: repoData.data.default_branch, - }) - .catch(e => { - throw new Error( - formatHttpErrorMessage( - `Couldn't create a pull request for ${branchName} branch`, - e, - ), - ); - }); - - return { - link: pullRequestResponse.data.html_url, - location: `https://${githubIntegrationConfig.host}/${owner}/${repo}/blob/${repoData.data.default_branch}/${fileName}`, - }; - } -} - -function formatHttpErrorMessage( - message: string, - error: { status: number; message: string }, -) { - return `${message}, received http response status code ${error.status}: ${error.message}`; } diff --git a/plugins/catalog-import/src/api/GitHub.ts b/plugins/catalog-import/src/api/GitHub.ts index b659832c10..4eb56b3a97 100644 --- a/plugins/catalog-import/src/api/GitHub.ts +++ b/plugins/catalog-import/src/api/GitHub.ts @@ -14,9 +14,26 @@ * limitations under the License. */ -import { ScmIntegrationRegistry } from '@backstage/integration'; +import { + GithubIntegrationConfig, + ScmIntegrationRegistry, +} from '@backstage/integration'; import parseGitUrl from 'git-url-parse'; +import { ScmAuthApi } from '@backstage/integration-react'; +import { Octokit } from '@octokit/rest'; +import { getBranchName, getCatalogFilename } from '../components/helpers'; +import { ConfigApi } from '@backstage/core-plugin-api'; +import { Base64 } from 'js-base64'; +export interface GitHubOptions { + owner: string; + repo: string; + title: string; + body: string; + fileContent: string; + repositoryUrl: string; + githubIntegrationConfig: GithubIntegrationConfig; +} export const getGithubIntegrationConfig = ( scmIntegrationsApi: ScmIntegrationRegistry, location: string, @@ -33,3 +50,119 @@ export const getGithubIntegrationConfig = ( githubIntegrationConfig: integration.config, }; }; + +export async function submitGitHubPrToRepo( + options: GitHubOptions, + scmAuthApi: ScmAuthApi, + configApi: ConfigApi, +): Promise<{ link: string; location: string }> { + const { + owner, + repo, + title, + body, + fileContent, + repositoryUrl, + githubIntegrationConfig, + } = options; + + const { token } = await scmAuthApi.getCredentials({ + url: repositoryUrl, + additionalScope: { + repoWrite: true, + }, + }); + + const octo = new Octokit({ + auth: token, + baseUrl: githubIntegrationConfig.apiBaseUrl, + }); + + const branchName = getBranchName(configApi); + const fileName = getCatalogFilename(configApi); + + const repoData = await octo.repos + .get({ + owner, + repo, + }) + .catch(e => { + throw new Error(formatHttpErrorMessage("Couldn't fetch repo data", e)); + }); + + const parentRef = await octo.git + .getRef({ + owner, + repo, + ref: `heads/${repoData.data.default_branch}`, + }) + .catch(e => { + throw new Error( + formatHttpErrorMessage("Couldn't fetch default branch data", e), + ); + }); + + await octo.git + .createRef({ + owner, + repo, + ref: `refs/heads/${branchName}`, + sha: parentRef.data.object.sha, + }) + .catch(e => { + throw new Error( + formatHttpErrorMessage( + `Couldn't create a new branch with name '${branchName}'`, + e, + ), + ); + }); + + await octo.repos + .createOrUpdateFileContents({ + owner, + repo, + path: fileName, + message: title, + content: Base64.encode(fileContent), + branch: branchName, + }) + .catch(e => { + throw new Error( + formatHttpErrorMessage( + `Couldn't create a commit with ${fileName} file added`, + e, + ), + ); + }); + + const pullRequestResponse = await octo.pulls + .create({ + owner, + repo, + title, + head: branchName, + body, + base: repoData.data.default_branch, + }) + .catch(e => { + throw new Error( + formatHttpErrorMessage( + `Couldn't create a pull request for ${branchName} branch`, + e, + ), + ); + }); + + return { + link: pullRequestResponse.data.html_url, + location: `https://${githubIntegrationConfig.host}/${owner}/${repo}/blob/${repoData.data.default_branch}/${fileName}`, + }; +} + +function formatHttpErrorMessage( + message: string, + error: { status: number; message: string }, +) { + return `${message}, received http response status code ${error.status}: ${error.message}`; +} diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index 2c4bf5025d..f476ca301a 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-node +## 1.12.1 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.12.1-next.2 ### Patch Changes diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index e750a32249..c6bb7854b6 100644 --- a/plugins/catalog-node/package.json +++ b/plugins/catalog-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-node", - "version": "1.12.1-next.2", + "version": "1.12.1", "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend", "backstage": { "role": "node-library", diff --git a/plugins/catalog-node/src/catalogService.test.ts b/plugins/catalog-node/src/catalogService.test.ts index ec3e5ccf1b..cf7b10009c 100644 --- a/plugins/catalog-node/src/catalogService.test.ts +++ b/plugins/catalog-node/src/catalogService.test.ts @@ -38,7 +38,7 @@ describe('catalogServiceRef', () => { }); await startTestBackend({ - features: [testModule()], + features: [testModule], }); }); }); diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index a4f2bf8980..f4e0b0c708 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-catalog-react +## 1.12.1 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- fa8560e: Prevents Autocomplete dropdown from overlapping sidebar on hovering it +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.12.1-next.2 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 64cbc27fb1..961dad0e0e 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-react", - "version": "1.12.1-next.2", + "version": "1.12.1", "description": "A frontend library that helps other Backstage plugins interact with the catalog", "backstage": { "role": "web-library", diff --git a/plugins/catalog-unprocessed-entities-common/CHANGELOG.md b/plugins/catalog-unprocessed-entities-common/CHANGELOG.md index f399f80bc0..f2f489b6a0 100644 --- a/plugins/catalog-unprocessed-entities-common/CHANGELOG.md +++ b/plugins/catalog-unprocessed-entities-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-unprocessed-entities-common +## 0.0.2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + ## 0.0.2-next.0 ### Patch Changes diff --git a/plugins/catalog-unprocessed-entities-common/package.json b/plugins/catalog-unprocessed-entities-common/package.json index 9367e4d17d..f491d27157 100644 --- a/plugins/catalog-unprocessed-entities-common/package.json +++ b/plugins/catalog-unprocessed-entities-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-unprocessed-entities-common", - "version": "0.0.2-next.0", + "version": "0.0.2", "description": "Common functionalities for the catalog-unprocessed-entities plugin", "backstage": { "role": "common-library", diff --git a/plugins/catalog-unprocessed-entities/CHANGELOG.md b/plugins/catalog-unprocessed-entities/CHANGELOG.md index a87b0b1957..8d39848d54 100644 --- a/plugins/catalog-unprocessed-entities/CHANGELOG.md +++ b/plugins/catalog-unprocessed-entities/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-unprocessed-entities +## 0.2.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/catalog-unprocessed-entities/package.json b/plugins/catalog-unprocessed-entities/package.json index 7411123c6c..32abaa1bbb 100644 --- a/plugins/catalog-unprocessed-entities/package.json +++ b/plugins/catalog-unprocessed-entities/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-unprocessed-entities", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "frontend-plugin", "pluginId": "catalog-unprocessed-entities", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 0434b0262b..f74c71e66c 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-catalog +## 1.21.0 + +### Minor Changes + +- 863a800: Added the following default targets for external routes: + + - `createComponent` binds to the Scaffolder page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + - `createFromTemplate` binds to the Scaffolder selected template page. + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- e04e57d: Fix bug with missing Actions column after adding "pagination" prop to catalog table +- a2d2649: Export `catalogTranslationRef` under `/alpha` +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.21.0-next.3 ### Patch Changes diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index a26099d613..c1fb52fb94 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -334,7 +334,7 @@ export interface DependsOnResourcesCardProps { variant?: InfoCardVariants; } -// @public (undocumented) +// @public export const EntityAboutCard: (props: AboutCardProps) => JSX.Element; // @public (undocumented) diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index dba938217f..5b7aea1449 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "1.21.0-next.3", + "version": "1.21.0", "description": "The Backstage plugin for browsing the Backstage catalog", "backstage": { "role": "frontend-plugin", diff --git a/plugins/catalog/src/components/AboutCard/AboutCard.tsx b/plugins/catalog/src/components/AboutCard/AboutCard.tsx index ee6147c54e..ce975f28ad 100644 --- a/plugins/catalog/src/components/AboutCard/AboutCard.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutCard.tsx @@ -100,6 +100,10 @@ export interface AboutCardProps { /** * Exported publicly via the EntityAboutCard + * + * NOTE: We generally do not accept pull requests to extend this class with more + * props and cusomizability. If you need to tweak it, consider making a bespoke + * card in your own repository instead, that is perfect for your own needs. */ export function AboutCard(props: AboutCardProps) { const { variant } = props; diff --git a/plugins/catalog/src/plugin.ts b/plugins/catalog/src/plugin.ts index f41fefe404..33ceaef632 100644 --- a/plugins/catalog/src/plugin.ts +++ b/plugins/catalog/src/plugin.ts @@ -115,7 +115,18 @@ export const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide( }), ); -/** @public */ +/** + * An example About card to show at the top of entity pages. + * + * @public + * @remarks + * + * This card collects some high level information about the entity, but is just + * an example component. Many organizations will want to replace it with a + * custom card that is more tailored to their specific needs. The card itself is + * not extremely customizable; feel free to make a copy of it as a starting + * point if you like. + */ export const EntityAboutCard: (props: AboutCardProps) => JSX.Element = catalogPlugin.provide( createComponentExtension({ diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 59430dca35..582368aca4 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-config-schema +## 0.1.56 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.1.56-next.2 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 8a0f1fb1c7..0aa4d1dc6c 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-config-schema", - "version": "0.1.56-next.2", + "version": "0.1.56", "description": "A Backstage plugin that lets you browse the configuration schema of your app", "backstage": { "role": "frontend-plugin", diff --git a/plugins/devtools-backend/CHANGELOG.md b/plugins/devtools-backend/CHANGELOG.md index ef2e9801d5..fbcae07d37 100644 --- a/plugins/devtools-backend/CHANGELOG.md +++ b/plugins/devtools-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-devtools-backend +## 0.3.5 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-devtools-common@0.1.10 + - @backstage/cli-common@0.1.14 + - @backstage/config-loader@1.8.1 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.3.5-next.3 ### Patch Changes diff --git a/plugins/devtools-backend/api-report.md b/plugins/devtools-backend/api-report.md index d0632fd912..482422e66f 100644 --- a/plugins/devtools-backend/api-report.md +++ b/plugins/devtools-backend/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { ConfigInfo } from '@backstage/plugin-devtools-common'; import { DevToolsInfo } from '@backstage/plugin-devtools-common'; @@ -29,7 +29,7 @@ export class DevToolsBackendApi { } // @public -const devtoolsPlugin: () => BackendFeature; +const devtoolsPlugin: BackendFeatureCompat; export default devtoolsPlugin; // @public (undocumented) diff --git a/plugins/devtools-backend/package.json b/plugins/devtools-backend/package.json index 415199f0f8..106950a4a4 100644 --- a/plugins/devtools-backend/package.json +++ b/plugins/devtools-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools-backend", - "version": "0.3.5-next.3", + "version": "0.3.5", "backstage": { "role": "backend-plugin", "pluginId": "devtools", diff --git a/plugins/devtools-common/CHANGELOG.md b/plugins/devtools-common/CHANGELOG.md index f887a90338..3e060571ad 100644 --- a/plugins/devtools-common/CHANGELOG.md +++ b/plugins/devtools-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-devtools-common +## 0.1.10 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/types@1.1.1 + ## 0.1.10-next.0 ### Patch Changes diff --git a/plugins/devtools-common/package.json b/plugins/devtools-common/package.json index 06577b2c0f..24b17d6742 100644 --- a/plugins/devtools-common/package.json +++ b/plugins/devtools-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools-common", - "version": "0.1.10-next.0", + "version": "0.1.10", "description": "Common functionalities for the devtools plugin", "backstage": { "role": "common-library", diff --git a/plugins/devtools/CHANGELOG.md b/plugins/devtools/CHANGELOG.md index 448734d4c8..db8e1701f1 100644 --- a/plugins/devtools/CHANGELOG.md +++ b/plugins/devtools/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-devtools +## 0.1.15 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-devtools-common@0.1.10 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + ## 0.1.15-next.2 ### Patch Changes diff --git a/plugins/devtools/package.json b/plugins/devtools/package.json index fd16205104..3e9d697965 100644 --- a/plugins/devtools/package.json +++ b/plugins/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools", - "version": "0.1.15-next.2", + "version": "0.1.15", "backstage": { "role": "frontend-plugin", "pluginId": "devtools", diff --git a/plugins/events-backend-module-aws-sqs/CHANGELOG.md b/plugins/events-backend-module-aws-sqs/CHANGELOG.md index 917c613b7a..0c80bac266 100644 --- a/plugins/events-backend-module-aws-sqs/CHANGELOG.md +++ b/plugins/events-backend-module-aws-sqs/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-events-backend-module-aws-sqs +## 0.3.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.3.5-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-aws-sqs/api-report-alpha.md b/plugins/events-backend-module-aws-sqs/api-report-alpha.md index 4faed2a162..ee14cc5b5b 100644 --- a/plugins/events-backend-module-aws-sqs/api-report-alpha.md +++ b/plugins/events-backend-module-aws-sqs/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleAwsSqsConsumingEventPublisher: () => BackendFeature; +const eventsModuleAwsSqsConsumingEventPublisher: BackendFeatureCompat; export default eventsModuleAwsSqsConsumingEventPublisher; // (No @packageDocumentation comment for this package) diff --git a/plugins/events-backend-module-aws-sqs/package.json b/plugins/events-backend-module-aws-sqs/package.json index 625dff4e6f..6d58fe4436 100644 --- a/plugins/events-backend-module-aws-sqs/package.json +++ b/plugins/events-backend-module-aws-sqs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-aws-sqs", - "version": "0.3.5-next.3", + "version": "0.3.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-aws-sqs/src/service/eventsModuleAwsSqsConsumingEventPublisher.test.ts b/plugins/events-backend-module-aws-sqs/src/service/eventsModuleAwsSqsConsumingEventPublisher.test.ts index cbf29f96cd..a25d2ef947 100644 --- a/plugins/events-backend-module-aws-sqs/src/service/eventsModuleAwsSqsConsumingEventPublisher.test.ts +++ b/plugins/events-backend-module-aws-sqs/src/service/eventsModuleAwsSqsConsumingEventPublisher.test.ts @@ -36,7 +36,7 @@ describe('eventsModuleAwsSqsConsumingEventPublisher', () => { await startTestBackend({ features: [ eventsServiceFactory(), - eventsModuleAwsSqsConsumingEventPublisher(), + eventsModuleAwsSqsConsumingEventPublisher, mockServices.rootConfig.factory({ data: { events: { diff --git a/plugins/events-backend-module-azure/CHANGELOG.md b/plugins/events-backend-module-azure/CHANGELOG.md index 9d41baa75c..22171cbd33 100644 --- a/plugins/events-backend-module-azure/CHANGELOG.md +++ b/plugins/events-backend-module-azure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-events-backend-module-azure +## 0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/events-backend-module-azure/api-report-alpha.md b/plugins/events-backend-module-azure/api-report-alpha.md index d07f8852f3..03e807242f 100644 --- a/plugins/events-backend-module-azure/api-report-alpha.md +++ b/plugins/events-backend-module-azure/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleAzureDevOpsEventRouter: () => BackendFeature; +const eventsModuleAzureDevOpsEventRouter: BackendFeatureCompat; export default eventsModuleAzureDevOpsEventRouter; export { eventsModuleAzureDevOpsEventRouter }; diff --git a/plugins/events-backend-module-azure/package.json b/plugins/events-backend-module-azure/package.json index 6e124a6703..bb0bce7753 100644 --- a/plugins/events-backend-module-azure/package.json +++ b/plugins/events-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-azure", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-azure/src/service/eventsModuleAzureDevOpsEventRouter.test.ts b/plugins/events-backend-module-azure/src/service/eventsModuleAzureDevOpsEventRouter.test.ts index d2afb81851..b9271ece10 100644 --- a/plugins/events-backend-module-azure/src/service/eventsModuleAzureDevOpsEventRouter.test.ts +++ b/plugins/events-backend-module-azure/src/service/eventsModuleAzureDevOpsEventRouter.test.ts @@ -32,7 +32,7 @@ describe('eventsModuleAzureDevOpsEventRouter', () => { }); await startTestBackend({ - features: [eventsServiceFactory(), eventsModuleAzureDevOpsEventRouter()], + features: [eventsServiceFactory(), eventsModuleAzureDevOpsEventRouter], }); expect(events.subscribed).toHaveLength(1); diff --git a/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md index 7b5a3c4e5e..b71ef0dadf 100644 --- a/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-events-backend-module-bitbucket-cloud +## 0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/events-backend-module-bitbucket-cloud/api-report-alpha.md b/plugins/events-backend-module-bitbucket-cloud/api-report-alpha.md index fa7cdfa9f6..71c106ef01 100644 --- a/plugins/events-backend-module-bitbucket-cloud/api-report-alpha.md +++ b/plugins/events-backend-module-bitbucket-cloud/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleBitbucketCloudEventRouter: () => BackendFeature; +const eventsModuleBitbucketCloudEventRouter: BackendFeatureCompat; export default eventsModuleBitbucketCloudEventRouter; export { eventsModuleBitbucketCloudEventRouter }; diff --git a/plugins/events-backend-module-bitbucket-cloud/package.json b/plugins/events-backend-module-bitbucket-cloud/package.json index efb4809dd6..83e5f3528b 100644 --- a/plugins/events-backend-module-bitbucket-cloud/package.json +++ b/plugins/events-backend-module-bitbucket-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-bitbucket-cloud", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-bitbucket-cloud/src/service/eventsModuleBitbucketCloudEventRouter.test.ts b/plugins/events-backend-module-bitbucket-cloud/src/service/eventsModuleBitbucketCloudEventRouter.test.ts index 337e2206e4..799a71de8f 100644 --- a/plugins/events-backend-module-bitbucket-cloud/src/service/eventsModuleBitbucketCloudEventRouter.test.ts +++ b/plugins/events-backend-module-bitbucket-cloud/src/service/eventsModuleBitbucketCloudEventRouter.test.ts @@ -32,10 +32,7 @@ describe('eventsModuleBitbucketCloudEventRouter', () => { }); await startTestBackend({ - features: [ - eventsServiceFactory(), - eventsModuleBitbucketCloudEventRouter(), - ], + features: [eventsServiceFactory(), eventsModuleBitbucketCloudEventRouter], }); expect(events.subscribed).toHaveLength(1); diff --git a/plugins/events-backend-module-gerrit/CHANGELOG.md b/plugins/events-backend-module-gerrit/CHANGELOG.md index ff33bde8ec..4ff865f60b 100644 --- a/plugins/events-backend-module-gerrit/CHANGELOG.md +++ b/plugins/events-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-events-backend-module-gerrit +## 0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/events-backend-module-gerrit/api-report-alpha.md b/plugins/events-backend-module-gerrit/api-report-alpha.md index 66dea72747..8922f317e9 100644 --- a/plugins/events-backend-module-gerrit/api-report-alpha.md +++ b/plugins/events-backend-module-gerrit/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsModuleGerritEventRouter: () => BackendFeature; +const eventsModuleGerritEventRouter: BackendFeatureCompat; export default eventsModuleGerritEventRouter; export { eventsModuleGerritEventRouter }; diff --git a/plugins/events-backend-module-gerrit/package.json b/plugins/events-backend-module-gerrit/package.json index 7a708a8fe5..5fbc339191 100644 --- a/plugins/events-backend-module-gerrit/package.json +++ b/plugins/events-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-gerrit", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-gerrit/src/service/eventsModuleGerritEventRouter.test.ts b/plugins/events-backend-module-gerrit/src/service/eventsModuleGerritEventRouter.test.ts index 4fc971fcce..ca661215de 100644 --- a/plugins/events-backend-module-gerrit/src/service/eventsModuleGerritEventRouter.test.ts +++ b/plugins/events-backend-module-gerrit/src/service/eventsModuleGerritEventRouter.test.ts @@ -32,7 +32,7 @@ describe('eventsModuleGerritEventRouter', () => { }); await startTestBackend({ - features: [eventsServiceFactory(), eventsModuleGerritEventRouter()], + features: [eventsServiceFactory(), eventsModuleGerritEventRouter], }); expect(events.subscribed).toHaveLength(1); diff --git a/plugins/events-backend-module-github/CHANGELOG.md b/plugins/events-backend-module-github/CHANGELOG.md index 1447cb2c6d..77882e3711 100644 --- a/plugins/events-backend-module-github/CHANGELOG.md +++ b/plugins/events-backend-module-github/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-events-backend-module-github +## 0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/events-backend-module-github/api-report-alpha.md b/plugins/events-backend-module-github/api-report-alpha.md index c233df8634..50d899f71d 100644 --- a/plugins/events-backend-module-github/api-report-alpha.md +++ b/plugins/events-backend-module-github/api-report-alpha.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -export const eventsModuleGithubEventRouter: () => BackendFeature; +export const eventsModuleGithubEventRouter: BackendFeatureCompat; // @alpha -export const eventsModuleGithubWebhook: () => BackendFeature; +export const eventsModuleGithubWebhook: BackendFeatureCompat; // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/events-backend-module-github/package.json b/plugins/events-backend-module-github/package.json index 80681a2228..cf1bb2c7a5 100644 --- a/plugins/events-backend-module-github/package.json +++ b/plugins/events-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-github", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-github/src/service/eventsModuleGithubEventRouter.test.ts b/plugins/events-backend-module-github/src/service/eventsModuleGithubEventRouter.test.ts index f147bbcb69..ba0c71f158 100644 --- a/plugins/events-backend-module-github/src/service/eventsModuleGithubEventRouter.test.ts +++ b/plugins/events-backend-module-github/src/service/eventsModuleGithubEventRouter.test.ts @@ -32,7 +32,7 @@ describe('eventsModuleGithubEventRouter', () => { }); await startTestBackend({ - features: [eventsServiceFactory(), eventsModuleGithubEventRouter()], + features: [eventsServiceFactory(), eventsModuleGithubEventRouter], }); expect(events.subscribed).toHaveLength(1); diff --git a/plugins/events-backend-module-github/src/service/eventsModuleGithubWebhook.test.ts b/plugins/events-backend-module-github/src/service/eventsModuleGithubWebhook.test.ts index 4effa62dd0..460022b04d 100644 --- a/plugins/events-backend-module-github/src/service/eventsModuleGithubWebhook.test.ts +++ b/plugins/events-backend-module-github/src/service/eventsModuleGithubWebhook.test.ts @@ -48,7 +48,7 @@ describe('eventsModuleGithubWebhook', () => { await startTestBackend({ extensionPoints: [[eventsExtensionPoint, extensionPoint]], features: [ - eventsModuleGithubWebhook(), + eventsModuleGithubWebhook, mockServices.rootConfig.factory({ data: { events: { diff --git a/plugins/events-backend-module-gitlab/CHANGELOG.md b/plugins/events-backend-module-gitlab/CHANGELOG.md index 601b6061fa..ec96ba8f73 100644 --- a/plugins/events-backend-module-gitlab/CHANGELOG.md +++ b/plugins/events-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-events-backend-module-gitlab +## 0.2.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + ## 0.2.5-next.2 ### Patch Changes diff --git a/plugins/events-backend-module-gitlab/api-report-alpha.md b/plugins/events-backend-module-gitlab/api-report-alpha.md index bf61f66a4b..4e81eb4269 100644 --- a/plugins/events-backend-module-gitlab/api-report-alpha.md +++ b/plugins/events-backend-module-gitlab/api-report-alpha.md @@ -3,13 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -export const eventsModuleGitlabEventRouter: () => BackendFeature; +export const eventsModuleGitlabEventRouter: BackendFeatureCompat; // @alpha -export const eventsModuleGitlabWebhook: () => BackendFeature; +export const eventsModuleGitlabWebhook: BackendFeatureCompat; // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/events-backend-module-gitlab/package.json b/plugins/events-backend-module-gitlab/package.json index 7ee53328ef..e6ed2d9b16 100644 --- a/plugins/events-backend-module-gitlab/package.json +++ b/plugins/events-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-gitlab", - "version": "0.2.5-next.2", + "version": "0.2.5", "backstage": { "role": "backend-plugin-module", "pluginId": "events", diff --git a/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabEventRouter.test.ts b/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabEventRouter.test.ts index 9195be7a73..44e90d1b7e 100644 --- a/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabEventRouter.test.ts +++ b/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabEventRouter.test.ts @@ -32,7 +32,7 @@ describe('eventsModuleGitlabEventRouter', () => { }); await startTestBackend({ - features: [eventsServiceFactory(), eventsModuleGitlabEventRouter()], + features: [eventsServiceFactory(), eventsModuleGitlabEventRouter], }); expect(events.subscribed).toHaveLength(1); diff --git a/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabWebhook.test.ts b/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabWebhook.test.ts index 1ab116ee3d..9a4f4326da 100644 --- a/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabWebhook.test.ts +++ b/plugins/events-backend-module-gitlab/src/service/eventsModuleGitlabWebhook.test.ts @@ -43,7 +43,7 @@ describe('gitlabWebhookEventsModule', () => { await startTestBackend({ extensionPoints: [[eventsExtensionPoint, extensionPoint]], features: [ - eventsModuleGitlabWebhook(), + eventsModuleGitlabWebhook, mockServices.rootConfig.factory({ data: { events: { diff --git a/plugins/events-backend-test-utils/CHANGELOG.md b/plugins/events-backend-test-utils/CHANGELOG.md index 1c72ddb329..4f04a9c277 100644 --- a/plugins/events-backend-test-utils/CHANGELOG.md +++ b/plugins/events-backend-test-utils/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-events-backend-test-utils +## 0.1.29 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-events-node@0.3.5 + ## 0.1.29-next.2 ### Patch Changes diff --git a/plugins/events-backend-test-utils/package.json b/plugins/events-backend-test-utils/package.json index 6b97deb195..89dffd2e2c 100644 --- a/plugins/events-backend-test-utils/package.json +++ b/plugins/events-backend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-test-utils", - "version": "0.1.29-next.2", + "version": "0.1.29", "description": "The plugin-events-backend-test-utils for @backstage/plugin-events-node", "backstage": { "role": "node-library", diff --git a/plugins/events-backend/CHANGELOG.md b/plugins/events-backend/CHANGELOG.md index 0e4baec5bb..a5699c8d9f 100644 --- a/plugins/events-backend/CHANGELOG.md +++ b/plugins/events-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-events-backend +## 0.3.6 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + ## 0.3.6-next.3 ### Patch Changes diff --git a/plugins/events-backend/api-report-alpha.md b/plugins/events-backend/api-report-alpha.md index b9475b3133..a3cc7148ce 100644 --- a/plugins/events-backend/api-report-alpha.md +++ b/plugins/events-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const eventsPlugin: () => BackendFeature; +const eventsPlugin: BackendFeatureCompat; export default eventsPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/events-backend/package.json b/plugins/events-backend/package.json index 9aa7f160ff..d3ff69d254 100644 --- a/plugins/events-backend/package.json +++ b/plugins/events-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend", - "version": "0.3.6-next.3", + "version": "0.3.6", "backstage": { "role": "backend-plugin", "pluginId": "events", diff --git a/plugins/events-backend/src/service/EventsPlugin.test.ts b/plugins/events-backend/src/service/EventsPlugin.test.ts index e39951e8dc..bb923bbed6 100644 --- a/plugins/events-backend/src/service/EventsPlugin.test.ts +++ b/plugins/events-backend/src/service/EventsPlugin.test.ts @@ -57,8 +57,8 @@ describe('eventsPlugin', () => { extensionPoints: [], features: [ eventsServiceFactory(), - eventsPlugin(), - testModule(), + eventsPlugin, + testModule, mockServices.logger.factory(), mockServices.rootConfig.factory({ data: { diff --git a/plugins/events-node/CHANGELOG.md b/plugins/events-node/CHANGELOG.md index 3c3ecb48ba..18da615383 100644 --- a/plugins/events-node/CHANGELOG.md +++ b/plugins/events-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-events-node +## 0.3.5 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + ## 0.3.5-next.2 ### Patch Changes diff --git a/plugins/events-node/package.json b/plugins/events-node/package.json index cd3ed6a8d9..5e0e375d48 100644 --- a/plugins/events-node/package.json +++ b/plugins/events-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-node", - "version": "0.3.5-next.2", + "version": "0.3.5", "description": "The plugin-events-node module for @backstage/plugin-events-backend", "backstage": { "role": "node-library", diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index 303f21317c..c3bb326175 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @internal/plugin-todo-list-backend +## 1.0.28 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/errors@1.2.4 + ## 1.0.28-next.3 ### Patch Changes diff --git a/plugins/example-todo-list-backend/api-report.md b/plugins/example-todo-list-backend/api-report.md index 51733d1a43..69c6bdf239 100644 --- a/plugins/example-todo-list-backend/api-report.md +++ b/plugins/example-todo-list-backend/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import express from 'express'; import { IdentityApi } from '@backstage/plugin-auth-node'; import { LoggerService } from '@backstage/backend-plugin-api'; @@ -12,7 +12,7 @@ import { LoggerService } from '@backstage/backend-plugin-api'; export function createRouter(options: RouterOptions): Promise; // @public -const exampleTodoListPlugin: () => BackendFeature; +const exampleTodoListPlugin: BackendFeatureCompat; export default exampleTodoListPlugin; // @public diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index d562e96e6e..36bd9f86c6 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.28-next.3", + "version": "1.0.28", "backstage": { "role": "backend-plugin", "pluginId": "todo-list", diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index a1434bbe2e..3761ead6a3 100644 --- a/plugins/example-todo-list-common/CHANGELOG.md +++ b/plugins/example-todo-list-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @internal/plugin-todo-list-common +## 1.0.19 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + ## 1.0.19-next.0 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index ad53bfd0bb..317cfa991d 100644 --- a/plugins/example-todo-list-common/package.json +++ b/plugins/example-todo-list-common/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-common", - "version": "1.0.19-next.0", + "version": "1.0.19", "backstage": { "role": "common-library", "pluginId": "todo-list", diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index 93ea989354..43873757cf 100644 --- a/plugins/example-todo-list/CHANGELOG.md +++ b/plugins/example-todo-list/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-todo-list +## 1.0.28 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + ## 1.0.28-next.2 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index a46216f52f..5e5f76ec6b 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list", - "version": "1.0.28-next.2", + "version": "1.0.28", "backstage": { "role": "frontend-plugin", "pluginId": "todo-list", diff --git a/plugins/home-react/CHANGELOG.md b/plugins/home-react/CHANGELOG.md index fb76366dba..4ac5fa4b93 100644 --- a/plugins/home-react/CHANGELOG.md +++ b/plugins/home-react/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-home-react +## 0.1.14 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + ## 0.1.14-next.2 ### Patch Changes diff --git a/plugins/home-react/package.json b/plugins/home-react/package.json index 9a4b1f6d7e..ad2bf6c7b2 100644 --- a/plugins/home-react/package.json +++ b/plugins/home-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-home-react", - "version": "0.1.14-next.2", + "version": "0.1.14", "description": "A Backstage plugin that contains react components helps you build a home page", "backstage": { "role": "web-library", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 4ef99e645a..fc163b8757 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-home +## 0.7.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-home-react@0.1.14 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.7.5-next.2 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index c484ec8132..6dda6cbfc2 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-home", - "version": "0.7.5-next.2", + "version": "0.7.5", "description": "A Backstage plugin that helps you build a home page", "backstage": { "role": "frontend-plugin", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index a1a4d9135b..5d0b4c6f37 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-kubernetes-backend +## 0.18.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-kubernetes-node@0.1.13 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + ## 0.18.0-next.3 ### Patch Changes diff --git a/plugins/kubernetes-backend/api-report-alpha.md b/plugins/kubernetes-backend/api-report-alpha.md index f6eeec5b4c..c3a86779e9 100644 --- a/plugins/kubernetes-backend/api-report-alpha.md +++ b/plugins/kubernetes-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const kubernetesPlugin: () => BackendFeature; +const kubernetesPlugin: BackendFeatureCompat; export default kubernetesPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 0df77bfe8b..ad05c481c0 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-backend", - "version": "0.18.0-next.3", + "version": "0.18.0", "description": "A Backstage backend plugin that integrates towards Kubernetes", "backstage": { "role": "backend-plugin", diff --git a/plugins/kubernetes-cluster/CHANGELOG.md b/plugins/kubernetes-cluster/CHANGELOG.md index 9f169fbbf2..e27d874ccc 100644 --- a/plugins/kubernetes-cluster/CHANGELOG.md +++ b/plugins/kubernetes-cluster/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-kubernetes-cluster +## 0.0.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-kubernetes-react@0.4.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-model@1.5.0 + ## 0.0.12-next.3 ### Patch Changes diff --git a/plugins/kubernetes-cluster/package.json b/plugins/kubernetes-cluster/package.json index 3d8ba47acb..9555fdbf79 100644 --- a/plugins/kubernetes-cluster/package.json +++ b/plugins/kubernetes-cluster/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-cluster", - "version": "0.0.12-next.3", + "version": "0.0.12", "description": "A Backstage plugin that shows details of Kubernetes clusters", "backstage": { "role": "frontend-plugin", diff --git a/plugins/kubernetes-common/CHANGELOG.md b/plugins/kubernetes-common/CHANGELOG.md index c00b9eb41b..e4de39bfd9 100644 --- a/plugins/kubernetes-common/CHANGELOG.md +++ b/plugins/kubernetes-common/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-kubernetes-common +## 0.8.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + ## 0.8.0-next.1 ### Patch Changes diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index 25160b7bf2..9005c5ffe9 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-common", - "version": "0.8.0-next.1", + "version": "0.8.0", "description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin", "backstage": { "role": "common-library", diff --git a/plugins/kubernetes-node/CHANGELOG.md b/plugins/kubernetes-node/CHANGELOG.md index 713a9e64d7..47a7fbba76 100644 --- a/plugins/kubernetes-node/CHANGELOG.md +++ b/plugins/kubernetes-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kubernetes-node +## 0.1.13 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + ## 0.1.13-next.3 ### Patch Changes diff --git a/plugins/kubernetes-node/package.json b/plugins/kubernetes-node/package.json index 80f521b699..90fb172405 100644 --- a/plugins/kubernetes-node/package.json +++ b/plugins/kubernetes-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-node", - "version": "0.1.13-next.3", + "version": "0.1.13", "description": "Node.js library for the kubernetes plugin", "backstage": { "role": "node-library", diff --git a/plugins/kubernetes-react/CHANGELOG.md b/plugins/kubernetes-react/CHANGELOG.md index 3aadf6f633..8ebe85459a 100644 --- a/plugins/kubernetes-react/CHANGELOG.md +++ b/plugins/kubernetes-react/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-kubernetes-react +## 0.4.0 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.4.0-next.3 ### Patch Changes diff --git a/plugins/kubernetes-react/package.json b/plugins/kubernetes-react/package.json index 645d532c0a..481b264d27 100644 --- a/plugins/kubernetes-react/package.json +++ b/plugins/kubernetes-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-react", - "version": "0.4.0-next.3", + "version": "0.4.0", "description": "Web library for the kubernetes-react plugin", "backstage": { "role": "web-library", diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index 022a64512d..2320219483 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-kubernetes +## 0.11.11 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/plugin-kubernetes-react@0.4.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-kubernetes-common@0.8.0 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-model@1.5.0 + ## 0.11.11-next.3 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index be1b61ecf2..339e26a246 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes", - "version": "0.11.11-next.3", + "version": "0.11.11", "description": "A Backstage plugin that integrates towards Kubernetes", "backstage": { "role": "frontend-plugin", diff --git a/plugins/notifications-backend-module-email/CHANGELOG.md b/plugins/notifications-backend-module-email/CHANGELOG.md index 20de4f3288..30862ed64e 100644 --- a/plugins/notifications-backend-module-email/CHANGELOG.md +++ b/plugins/notifications-backend-module-email/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-notifications-backend-module-email +## 0.1.0 + +### Minor Changes + +- 07a789b: add notification filters + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/integration-aws-node@0.1.12 + - @backstage/types@1.1.1 + ## 0.1.0-next.3 ### Patch Changes diff --git a/plugins/notifications-backend-module-email/api-report.md b/plugins/notifications-backend-module-email/api-report.md index 26563bde85..7e8eac6cb7 100644 --- a/plugins/notifications-backend-module-email/api-report.md +++ b/plugins/notifications-backend-module-email/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { Notification as Notification_2 } from '@backstage/plugin-notifications-common'; @@ -17,7 +17,7 @@ export interface NotificationsEmailTemplateExtensionPoint { export const notificationsEmailTemplateExtensionPoint: ExtensionPoint; // @public (undocumented) -const notificationsModuleEmail: () => BackendFeature; +const notificationsModuleEmail: BackendFeatureCompat; export default notificationsModuleEmail; // @public (undocumented) diff --git a/plugins/notifications-backend-module-email/package.json b/plugins/notifications-backend-module-email/package.json index 2b92c78c74..4f2c8a6876 100644 --- a/plugins/notifications-backend-module-email/package.json +++ b/plugins/notifications-backend-module-email/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-backend-module-email", - "version": "0.1.0-next.3", + "version": "0.1.0", "description": "The email backend module for the notifications plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/notifications-backend/CHANGELOG.md b/plugins/notifications-backend/CHANGELOG.md index 993d75036d..66885a07bd 100644 --- a/plugins/notifications-backend/CHANGELOG.md +++ b/plugins/notifications-backend/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/plugin-notifications-backend +## 0.3.0 + +### Minor Changes + +- 07a789b: adding filtering of notifications by processors + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.3.0-next.3 ### Patch Changes diff --git a/plugins/notifications-backend/api-report.md b/plugins/notifications-backend/api-report.md index 6add3000f1..de5441f85e 100644 --- a/plugins/notifications-backend/api-report.md +++ b/plugins/notifications-backend/api-report.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @public -const notificationsPlugin: () => BackendFeature; +const notificationsPlugin: BackendFeatureCompat; export default notificationsPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/notifications-backend/package.json b/plugins/notifications-backend/package.json index 12d2b760ba..34fe472f42 100644 --- a/plugins/notifications-backend/package.json +++ b/plugins/notifications-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-backend", - "version": "0.3.0-next.3", + "version": "0.3.0", "backstage": { "role": "backend-plugin", "pluginId": "notifications", diff --git a/plugins/notifications-common/CHANGELOG.md b/plugins/notifications-common/CHANGELOG.md index 68d5a816eb..17231f0147 100644 --- a/plugins/notifications-common/CHANGELOG.md +++ b/plugins/notifications-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-notifications-common +## 0.0.4 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. + ## 0.0.4-next.0 ### Patch Changes diff --git a/plugins/notifications-common/package.json b/plugins/notifications-common/package.json index 28dcf719b8..744cf52cba 100644 --- a/plugins/notifications-common/package.json +++ b/plugins/notifications-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-common", - "version": "0.0.4-next.0", + "version": "0.0.4", "description": "Common functionalities for the notifications plugin", "backstage": { "role": "common-library", diff --git a/plugins/notifications-node/CHANGELOG.md b/plugins/notifications-node/CHANGELOG.md index 165abf6e62..5611c7c6c4 100644 --- a/plugins/notifications-node/CHANGELOG.md +++ b/plugins/notifications-node/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-notifications-node +## 0.2.0 + +### Minor Changes + +- 07a789b: add notifications filtering by processors + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + ## 0.2.0-next.3 ### Patch Changes diff --git a/plugins/notifications-node/package.json b/plugins/notifications-node/package.json index 143131b8e7..973182be4e 100644 --- a/plugins/notifications-node/package.json +++ b/plugins/notifications-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-node", - "version": "0.2.0-next.3", + "version": "0.2.0", "description": "Node.js library for the notifications plugin", "backstage": { "role": "node-library", diff --git a/plugins/notifications/CHANGELOG.md b/plugins/notifications/CHANGELOG.md index c89dbb0e72..3b3def49cc 100644 --- a/plugins/notifications/CHANGELOG.md +++ b/plugins/notifications/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-notifications +## 0.2.2 + +### Patch Changes + +- 7f02684: Do not always show scrollbars in notification description +- 6d196b4: Fixes performance issue with Notifications title counter. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.2-next.3 ### Patch Changes diff --git a/plugins/notifications/package.json b/plugins/notifications/package.json index c1c896db64..f375ae702e 100644 --- a/plugins/notifications/package.json +++ b/plugins/notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications", - "version": "0.2.2-next.3", + "version": "0.2.2", "backstage": { "role": "frontend-plugin", "pluginId": "notifications", diff --git a/plugins/org-react/CHANGELOG.md b/plugins/org-react/CHANGELOG.md index 8c55d3d5d0..9d0ffacd97 100644 --- a/plugins/org-react/CHANGELOG.md +++ b/plugins/org-react/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-org-react +## 0.1.25 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + ## 0.1.25-next.2 ### Patch Changes diff --git a/plugins/org-react/package.json b/plugins/org-react/package.json index 85376bf50e..32d46ef1a3 100644 --- a/plugins/org-react/package.json +++ b/plugins/org-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org-react", - "version": "0.1.25-next.2", + "version": "0.1.25", "backstage": { "role": "web-library", "pluginId": "org", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index f1d41f42ee..e14b1afcec 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-org +## 0.6.26 + +### Patch Changes + +- d8e2f53: The `catalogIndex` external route is now optional and will by default bind to the catalog index page if it is available. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + ## 0.6.26-next.2 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index f86c532595..af3c54f1a2 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org", - "version": "0.6.26-next.2", + "version": "0.6.26", "description": "A Backstage plugin that helps you create entity pages for your organization", "backstage": { "role": "frontend-plugin", diff --git a/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md b/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md index 6661f22b2b..3c0a8d1bcb 100644 --- a/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md +++ b/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-permission-backend-module-allow-all-policy +## 0.1.16 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + ## 0.1.16-next.2 ### Patch Changes diff --git a/plugins/permission-backend-module-policy-allow-all/api-report.md b/plugins/permission-backend-module-policy-allow-all/api-report.md index 081655578d..02a4255424 100644 --- a/plugins/permission-backend-module-policy-allow-all/api-report.md +++ b/plugins/permission-backend-module-policy-allow-all/api-report.md @@ -3,9 +3,9 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @public -const permissionModuleAllowAllPolicy: () => BackendFeature; +const permissionModuleAllowAllPolicy: BackendFeatureCompat; export default permissionModuleAllowAllPolicy; ``` diff --git a/plugins/permission-backend-module-policy-allow-all/package.json b/plugins/permission-backend-module-policy-allow-all/package.json index c41c09094a..e0108c6541 100644 --- a/plugins/permission-backend-module-policy-allow-all/package.json +++ b/plugins/permission-backend-module-policy-allow-all/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend-module-allow-all-policy", - "version": "0.1.16-next.2", + "version": "0.1.16", "description": "Allow all policy backend module for the permission plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 0517a7d5fb..baaaefef70 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-permission-backend +## 0.5.43 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.5.43-next.3 ### Patch Changes diff --git a/plugins/permission-backend/api-report-alpha.md b/plugins/permission-backend/api-report-alpha.md index acface76a4..7448c4eed0 100644 --- a/plugins/permission-backend/api-report-alpha.md +++ b/plugins/permission-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const permissionPlugin: () => BackendFeature; +const permissionPlugin: BackendFeatureCompat; export default permissionPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 8c563caef6..a3020e1dd3 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.43-next.3", + "version": "0.5.43", "backstage": { "role": "backend-plugin", "pluginId": "permission", diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index 3eaa31b8d4..e6b637a092 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-common +## 0.7.14 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.7.14-next.0 ### Patch Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index f97ff53aa4..ee54459589 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-common", - "version": "0.7.14-next.0", + "version": "0.7.14", "description": "Isomorphic types and client for Backstage permissions and authorization", "backstage": { "role": "common-library", diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index a42053297e..2e12639437 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-permission-node +## 0.7.30 + +### Patch Changes + +- 9e63318: Ensure that service token access restrictions, when present, are taken into account +- d44a20a: Added additional plugin metadata to `package.json`. +- c7b0dd1: Import `tokenManager` definition from `@backstage/backend-plugin-api` +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.7.30-next.3 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 072a23e7cc..1c29b97db0 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-node", - "version": "0.7.30-next.3", + "version": "0.7.30", "description": "Common permission and authorization utilities for backend plugins", "backstage": { "role": "node-library", diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index 38a0f79dcb..1eb951e625 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-react +## 0.4.23 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/config@1.2.0 + ## 0.4.23-next.1 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index 2f7a2060cc..9ebb13e633 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.4.23-next.1", + "version": "0.4.23", "backstage": { "role": "web-library", "pluginId": "permission", diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index fd64cb957d..deeaf2621b 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,63 @@ # @backstage/plugin-proxy-backend +## 0.5.0 + +### Minor Changes + +- 88480e4: **BREAKING**: The proxy backend plugin is now protected by Backstage auth, by + default. Unless specifically configured (see below), all proxy endpoints will + reject requests immediately unless a valid Backstage user or service token is + passed along with the request. This aligns the proxy with how other Backstage + backends behave out of the box, and serves to protect your upstreams from + unauthorized access. + + A proxy configuration section can now look as follows: + + ```yaml + proxy: + endpoints: + '/pagerduty': + target: https://api.pagerduty.com + credentials: require # NEW! + headers: + Authorization: Token token=${PAGERDUTY_TOKEN} + ``` + + There are three possible `credentials` settings at this point: + + - `require`: Callers must provide Backstage user or service credentials with + each request. The credentials are not forwarded to the proxy target. + - `forward`: Callers must provide Backstage user or service credentials with + each request, and those credentials are forwarded to the proxy target. + - `dangerously-allow-unauthenticated`: No Backstage credentials are required to + access this proxy target. The target can still apply its own credentials + checks, but the proxy will not help block non-Backstage-blessed callers. If + you also add `allowedHeaders: ['Authorization']` to an endpoint configuration, + then the Backstage token (if provided) WILL be forwarded. + + The value `dangerously-allow-unauthenticated` was the old default. + + The value `require` is the new default, so requests that were previously + permitted may now start resulting in `401 Unauthorized` responses. If you have + `backend.auth.dangerouslyDisableDefaultAuthPolicy` set to `true`, this does not + apply; the proxy will behave as if all endpoints were set to + `dangerously-allow-unauthenticated`. + + If you have proxy endpoints that require unauthenticated access still, please + add `credentials: dangerously-allow-unauthenticated` to their declarations in + your app-config. + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.5.0-next.3 ### Patch Changes diff --git a/plugins/proxy-backend/api-report-alpha.md b/plugins/proxy-backend/api-report-alpha.md index 73c3052acb..bbd891b014 100644 --- a/plugins/proxy-backend/api-report-alpha.md +++ b/plugins/proxy-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 39df8539dc..4b990e57f7 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-proxy-backend", - "version": "0.5.0-next.3", + "version": "0.5.0", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", "backstage": { "role": "backend-plugin", diff --git a/plugins/scaffolder-backend-module-azure/CHANGELOG.md b/plugins/scaffolder-backend-module-azure/CHANGELOG.md index 06dc87373d..7c1115e7fa 100644 --- a/plugins/scaffolder-backend-module-azure/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-azure/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-azure +## 0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- b4169ee: Use `GitRepository.webUrl` instead of `GitRepository.remoteUrl` to set the value of `repoContentsUrl` as `remoteUrl` can sometimes return an URL with the wrong format (e.g. `https://@dev.azure.com///\_git/`). +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.11-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-azure/api-report.md b/plugins/scaffolder-backend-module-azure/api-report.md index d48d00e0e0..be5ab117e4 100644 --- a/plugins/scaffolder-backend-module-azure/api-report.md +++ b/plugins/scaffolder-backend-module-azure/api-report.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; // @public -const azureModule: () => BackendFeature; +const azureModule: BackendFeatureCompat; export default azureModule; // @public diff --git a/plugins/scaffolder-backend-module-azure/package.json b/plugins/scaffolder-backend-module-azure/package.json index 4bc8f6348e..ece29a8866 100644 --- a/plugins/scaffolder-backend-module-azure/package.json +++ b/plugins/scaffolder-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-azure", - "version": "0.1.11-next.2", + "version": "0.1.11", "description": "The azure module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md index 0510656db6..01bcce124f 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket-cloud +## 0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.9-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/api-report.md b/plugins/scaffolder-backend-module-bitbucket-cloud/api-report.md index fc7e0cd494..a484f49f77 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/api-report.md +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/api-report.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; // @public -const bitbucketCloudModule: () => BackendFeature; +const bitbucketCloudModule: BackendFeatureCompat; export default bitbucketCloudModule; // @public diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/package.json b/plugins/scaffolder-backend-module-bitbucket-cloud/package.json index f846f751cc..8e1fd1facd 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/package.json +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket-cloud", - "version": "0.1.9-next.2", + "version": "0.1.9", "description": "The Bitbucket Cloud module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md index 445e38129a..3eefd69ab7 100644 --- a/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket-server +## 0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.9-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket-server/api-report.md b/plugins/scaffolder-backend-module-bitbucket-server/api-report.md index 4d75a3dbda..50377f8db2 100644 --- a/plugins/scaffolder-backend-module-bitbucket-server/api-report.md +++ b/plugins/scaffolder-backend-module-bitbucket-server/api-report.md @@ -3,14 +3,14 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; // @public -const bitbucketServerModule: () => BackendFeature; +const bitbucketServerModule: BackendFeatureCompat; export default bitbucketServerModule; // @public diff --git a/plugins/scaffolder-backend-module-bitbucket-server/package.json b/plugins/scaffolder-backend-module-bitbucket-server/package.json index ca5b6a5520..cc321ccd33 100644 --- a/plugins/scaffolder-backend-module-bitbucket-server/package.json +++ b/plugins/scaffolder-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket-server", - "version": "0.1.9-next.2", + "version": "0.1.9", "description": "The Bitbucket Server module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md index 7e55079855..97b68baf15 100644 --- a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket +## 0.2.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.2.9-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket/api-report.md b/plugins/scaffolder-backend-module-bitbucket/api-report.md index ce16b0038f..db73dcbf2c 100644 --- a/plugins/scaffolder-backend-module-bitbucket/api-report.md +++ b/plugins/scaffolder-backend-module-bitbucket/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import * as bitbucketCloud from '@backstage/plugin-scaffolder-backend-module-bitbucket-cloud'; import * as bitbucketServer from '@backstage/plugin-scaffolder-backend-module-bitbucket-server'; import { Config } from '@backstage/config'; @@ -12,7 +12,7 @@ import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; // @public @deprecated -const bitbucketModule: () => BackendFeature; +const bitbucketModule: BackendFeatureCompat; export default bitbucketModule; // @public @deprecated (undocumented) diff --git a/plugins/scaffolder-backend-module-bitbucket/package.json b/plugins/scaffolder-backend-module-bitbucket/package.json index 8c4e810190..bc3a578fdb 100644 --- a/plugins/scaffolder-backend-module-bitbucket/package.json +++ b/plugins/scaffolder-backend-module-bitbucket/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket", - "version": "0.2.9-next.2", + "version": "0.2.9", "description": "The bitbucket module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md index dd01e3894c..45cb0bc6fc 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-confluence-to-markdown +## 0.2.20 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.2.20-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md b/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md index e5701bfadb..b56ade73a2 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; @@ -11,7 +11,7 @@ import { TemplateAction } from '@backstage/plugin-scaffolder-node'; import { UrlReader } from '@backstage/backend-common'; // @public -const confluenceToMarkdownModule: () => BackendFeature; +const confluenceToMarkdownModule: BackendFeatureCompat; export default confluenceToMarkdownModule; // @public (undocumented) diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json index c161ab1358..02fa559e56 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown", - "version": "0.2.20-next.3", + "version": "0.2.20", "description": "The confluence-to-markdown module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index cf6a482a0f..8df8ef83e5 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.43 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.43-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/README.md b/plugins/scaffolder-backend-module-cookiecutter/README.md index 62c6eede97..643154c826 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/README.md +++ b/plugins/scaffolder-backend-module-cookiecutter/README.md @@ -23,7 +23,6 @@ const actions = [ createFetchCookiecutterAction({ integrations, reader: env.reader, - containerRunner, }), ...createBuiltInActions({ ... diff --git a/plugins/scaffolder-backend-module-cookiecutter/api-report.md b/plugins/scaffolder-backend-module-cookiecutter/api-report.md index ed2b044189..2dbf462063 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/api-report.md +++ b/plugins/scaffolder-backend-module-cookiecutter/api-report.md @@ -5,7 +5,7 @@ ```ts /// -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ContainerRunner } from '@backstage/backend-common'; import { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; @@ -13,7 +13,7 @@ import { TemplateAction } from '@backstage/plugin-scaffolder-node'; import { UrlReader } from '@backstage/backend-common'; // @public -const cookiecutterModule: () => BackendFeature; +const cookiecutterModule: BackendFeatureCompat; export default cookiecutterModule; // @public diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index ab7a49d700..a6e9cfbf66 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", - "version": "0.2.43-next.3", + "version": "0.2.43", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md index b815b20b95..2703b15871 100644 --- a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-gerrit +## 0.1.11 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.11-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gerrit/api-report.md b/plugins/scaffolder-backend-module-gerrit/api-report.md index e61de671a8..60cd91355f 100644 --- a/plugins/scaffolder-backend-module-gerrit/api-report.md +++ b/plugins/scaffolder-backend-module-gerrit/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -43,6 +43,6 @@ export function createPublishGerritReviewAction(options: { >; // @public -const gerritModule: () => BackendFeature; +const gerritModule: BackendFeatureCompat; export default gerritModule; ``` diff --git a/plugins/scaffolder-backend-module-gerrit/package.json b/plugins/scaffolder-backend-module-gerrit/package.json index b77c51c6b5..15aac0cceb 100644 --- a/plugins/scaffolder-backend-module-gerrit/package.json +++ b/plugins/scaffolder-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gerrit", - "version": "0.1.11-next.2", + "version": "0.1.11", "description": "The gerrit module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md index 330aaea23b..d2604729c2 100644 --- a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-gitea +## 0.1.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.9-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitea/api-report.md b/plugins/scaffolder-backend-module-gitea/api-report.md index b5e20b7b13..1dca414fa9 100644 --- a/plugins/scaffolder-backend-module-gitea/api-report.md +++ b/plugins/scaffolder-backend-module-gitea/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -28,6 +28,6 @@ export function createPublishGiteaAction(options: { >; // @public -const giteaModule: () => BackendFeature; +const giteaModule: BackendFeatureCompat; export default giteaModule; ``` diff --git a/plugins/scaffolder-backend-module-gitea/package.json b/plugins/scaffolder-backend-module-gitea/package.json index f87f8695ec..55f948b87e 100644 --- a/plugins/scaffolder-backend-module-gitea/package.json +++ b/plugins/scaffolder-backend-module-gitea/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitea", - "version": "0.1.9-next.3", + "version": "0.1.9", "description": "The gitea module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-github/CHANGELOG.md b/plugins/scaffolder-backend-module-github/CHANGELOG.md index baefd5bddb..16d121113e 100644 --- a/plugins/scaffolder-backend-module-github/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-github/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-scaffolder-backend-module-github +## 0.3.0 + +### Minor Changes + +- 403394a: Allow empty author info in createPullRequest action for Github + +### Patch Changes + +- f145a04: Added handling for dry run to githubPullRequest and githubWebhook and added tests for this functionality +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.3.0-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-github/api-report.md b/plugins/scaffolder-backend-module-github/api-report.md index 2bb4342bbf..beabdfaaf6 100644 --- a/plugins/scaffolder-backend-module-github/api-report.md +++ b/plugins/scaffolder-backend-module-github/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { createPullRequest } from 'octokit-plugin-create-pull-request'; import { GithubCredentialsProvider } from '@backstage/integration'; @@ -406,6 +406,6 @@ export function getOctokitOptions(options: { }): Promise; // @public -const githubModule: () => BackendFeature; +const githubModule: BackendFeatureCompat; export default githubModule; ``` diff --git a/plugins/scaffolder-backend-module-github/package.json b/plugins/scaffolder-backend-module-github/package.json index 800309627c..c86a10fb49 100644 --- a/plugins/scaffolder-backend-module-github/package.json +++ b/plugins/scaffolder-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-github", - "version": "0.3.0-next.3", + "version": "0.3.0", "description": "The github module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md index f90872bbbb..eb1386679c 100644 --- a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-scaffolder-backend-module-gitlab +## 0.4.1 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- cf96041: Added `gitlab:issue:edit` action to edit existing GitLab issues +- d44a20a: Added additional plugin metadata to `package.json`. +- 829e0ec: Add new `gitlab:pipeline:trigger` action to trigger GitLab pipelines. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.4.1-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitlab/README.md b/plugins/scaffolder-backend-module-gitlab/README.md index bb31769cef..3aee2b6681 100644 --- a/plugins/scaffolder-backend-module-gitlab/README.md +++ b/plugins/scaffolder-backend-module-gitlab/README.md @@ -47,7 +47,6 @@ const actions = [ // Create Scaffolder Router return await createRouter({ - containerRunner, catalogClient, actions, logger: env.logger, diff --git a/plugins/scaffolder-backend-module-gitlab/api-report.md b/plugins/scaffolder-backend-module-gitlab/api-report.md index 65f279b7f7..4f9239e9b2 100644 --- a/plugins/scaffolder-backend-module-gitlab/api-report.md +++ b/plugins/scaffolder-backend-module-gitlab/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -254,7 +254,7 @@ export const editGitlabIssueAction: (options: { >; // @public -const gitlabModule: () => BackendFeature; +const gitlabModule: BackendFeatureCompat; export default gitlabModule; // @public diff --git a/plugins/scaffolder-backend-module-gitlab/package.json b/plugins/scaffolder-backend-module-gitlab/package.json index 71cb12c659..096cf9d077 100644 --- a/plugins/scaffolder-backend-module-gitlab/package.json +++ b/plugins/scaffolder-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitlab", - "version": "0.4.1-next.3", + "version": "0.4.1", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md index e8b308afb2..a1828b9546 100644 --- a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-notifications +## 0.0.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-notifications-node@0.2.0 + - @backstage/plugin-notifications-common@0.0.4 + - @backstage/plugin-scaffolder-node@0.4.5 + ## 0.0.2-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-notifications/api-report.md b/plugins/scaffolder-backend-module-notifications/api-report.md index 8b12210fe9..4befadf403 100644 --- a/plugins/scaffolder-backend-module-notifications/api-report.md +++ b/plugins/scaffolder-backend-module-notifications/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { JsonObject } from '@backstage/types'; import { NotificationService } from '@backstage/plugin-notifications-node'; import { NotificationSeverity } from '@backstage/plugin-notifications-common'; @@ -27,6 +27,6 @@ export function createSendNotificationAction(options: { >; // @public -const scaffolderModuleNotifications: () => BackendFeature; +const scaffolderModuleNotifications: BackendFeatureCompat; export default scaffolderModuleNotifications; ``` diff --git a/plugins/scaffolder-backend-module-notifications/package.json b/plugins/scaffolder-backend-module-notifications/package.json index 57baab7b6f..8f9c150d1b 100644 --- a/plugins/scaffolder-backend-module-notifications/package.json +++ b/plugins/scaffolder-backend-module-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-notifications", - "version": "0.0.2-next.3", + "version": "0.0.2", "description": "The notifications backend module for the scaffolder plugin.", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 1771640389..5bf7ac953b 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.36 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.4.36-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/README.md b/plugins/scaffolder-backend-module-rails/README.md index a7afd1429e..18e16a7567 100644 --- a/plugins/scaffolder-backend-module-rails/README.md +++ b/plugins/scaffolder-backend-module-rails/README.md @@ -27,12 +27,10 @@ const actions = [ createFetchRailsAction({ integrations, reader: env.reader, - containerRunner, }), ]; return await createRouter({ - containerRunner, catalogClient, actions, logger: env.logger, diff --git a/plugins/scaffolder-backend-module-rails/api-report.md b/plugins/scaffolder-backend-module-rails/api-report.md index 33ad052b14..9b663d33d6 100644 --- a/plugins/scaffolder-backend-module-rails/api-report.md +++ b/plugins/scaffolder-backend-module-rails/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ContainerRunner } from '@backstage/backend-common'; import { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; @@ -27,6 +27,6 @@ export function createFetchRailsAction(options: { >; // @public -const railsModule: () => BackendFeature; +const railsModule: BackendFeatureCompat; export default railsModule; ``` diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index e2d2d678a5..9da87efa1d 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", - "version": "0.4.36-next.3", + "version": "0.4.36", "description": "A module for the scaffolder backend that lets you template projects using Rails", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md index a02aaab7b6..922b8fd274 100644 --- a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-sentry +## 0.1.27 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.27-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-sentry/api-report.md b/plugins/scaffolder-backend-module-sentry/api-report.md index 960fe4ba24..69d164a2f3 100644 --- a/plugins/scaffolder-backend-module-sentry/api-report.md +++ b/plugins/scaffolder-backend-module-sentry/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { JsonObject } from '@backstage/types'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; @@ -23,7 +23,7 @@ export function createSentryCreateProjectAction(options: { >; // @public -const sentryModule: () => BackendFeature; +const sentryModule: BackendFeatureCompat; export default sentryModule; // (No @packageDocumentation comment for this package) diff --git a/plugins/scaffolder-backend-module-sentry/package.json b/plugins/scaffolder-backend-module-sentry/package.json index 2566c82596..efde9aa2fe 100644 --- a/plugins/scaffolder-backend-module-sentry/package.json +++ b/plugins/scaffolder-backend-module-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-sentry", - "version": "0.1.27-next.3", + "version": "0.1.27", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index 80f976c1c0..7be229cdea 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.3.2 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-scaffolder-node-test-utils@0.1.5 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/types@1.1.1 + ## 0.3.2-next.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/api-report.md b/plugins/scaffolder-backend-module-yeoman/api-report.md index b466ee152b..278c9b41ae 100644 --- a/plugins/scaffolder-backend-module-yeoman/api-report.md +++ b/plugins/scaffolder-backend-module-yeoman/api-report.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { JsonObject } from '@backstage/types'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; @@ -18,6 +18,6 @@ export function createRunYeomanAction(): TemplateAction< >; // @public -const yeomanModule: () => BackendFeature; +const yeomanModule: BackendFeatureCompat; export default yeomanModule; ``` diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index 7172b4ae38..be380ac160 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.3.2-next.2", + "version": "0.3.2", "backstage": { "role": "backend-plugin-module", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index b920fc7e9c..fa81406ba0 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,47 @@ # @backstage/plugin-scaffolder-backend +## 1.22.9 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 5c65785: Fixing issues with log redaction in the scaffolder logs +- d44a20a: Added additional plugin metadata to `package.json`. +- 7d30d95: Fixing issue with log meta fields possibly being circular refs +- d617103: Updating the logger redaction message to something less dramatic +- f4c8486: Increase max wait time in debug:wait action to 10 minutes +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-scaffolder-backend-module-github@0.3.0 + - @backstage/integration@1.12.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.9 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.11 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1 + - @backstage/plugin-scaffolder-backend-module-azure@0.1.11 + - @backstage/plugin-scaffolder-backend-module-gitea@0.1.9 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.22.8-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend/api-report-alpha.md b/plugins/scaffolder-backend/api-report-alpha.md index e2add838a6..5bb6cb1701 100644 --- a/plugins/scaffolder-backend/api-report-alpha.md +++ b/plugins/scaffolder-backend/api-report-alpha.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ConditionalPolicyDecision } from '@backstage/plugin-permission-common'; import { Conditions } from '@backstage/plugin-permission-node'; import { JsonObject } from '@backstage/types'; @@ -78,7 +78,7 @@ export const scaffolderActionConditions: Conditions<{ }>; // @alpha -const scaffolderPlugin: () => BackendFeature; +const scaffolderPlugin: BackendFeatureCompat; export default scaffolderPlugin; // @alpha diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 4060529421..0ca98ed300 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "1.22.8-next.3", + "version": "1.22.9", "description": "The Backstage backend plugin that helps you create new things", "backstage": { "role": "backend-plugin", diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index b26c36b793..12f3f9e235 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-scaffolder-common +## 1.5.3 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + ## 1.5.3-next.1 ### Patch Changes diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index 84aedbf963..3e56510daf 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-common", - "version": "1.5.3-next.1", + "version": "1.5.3", "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", "backstage": { "role": "common-library", diff --git a/plugins/scaffolder-node-test-utils/CHANGELOG.md b/plugins/scaffolder-node-test-utils/CHANGELOG.md index ada4c38a67..ebdf3092b7 100644 --- a/plugins/scaffolder-node-test-utils/CHANGELOG.md +++ b/plugins/scaffolder-node-test-utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-node-test-utils +## 0.1.5 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-test-utils@0.4.0 + - @backstage/plugin-scaffolder-node@0.4.5 + - @backstage/types@1.1.1 + ## 0.1.5-next.3 ### Patch Changes diff --git a/plugins/scaffolder-node-test-utils/package.json b/plugins/scaffolder-node-test-utils/package.json index 2419074362..e15b33dad3 100644 --- a/plugins/scaffolder-node-test-utils/package.json +++ b/plugins/scaffolder-node-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node-test-utils", - "version": "0.1.5-next.3", + "version": "0.1.5", "backstage": { "role": "node-library", "pluginId": "scaffolder", diff --git a/plugins/scaffolder-node/CHANGELOG.md b/plugins/scaffolder-node/CHANGELOG.md index c4e974c297..f5da44ae1e 100644 --- a/plugins/scaffolder-node/CHANGELOG.md +++ b/plugins/scaffolder-node/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-node +## 0.4.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.4.5-next.3 ### Patch Changes diff --git a/plugins/scaffolder-node/package.json b/plugins/scaffolder-node/package.json index 233619ba99..ed3c016257 100644 --- a/plugins/scaffolder-node/package.json +++ b/plugins/scaffolder-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node", - "version": "0.4.5-next.3", + "version": "0.4.5", "description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "node-library", diff --git a/plugins/scaffolder-react/CHANGELOG.md b/plugins/scaffolder-react/CHANGELOG.md index c33fbc059b..666fe36e24 100644 --- a/plugins/scaffolder-react/CHANGELOG.md +++ b/plugins/scaffolder-react/CHANGELOG.md @@ -1,5 +1,2912 @@ # @backstage/plugin-scaffolder-react +## 1.9.0 + +### Minor Changes + +- 62bd9eb: Replace `ui:widget: password` with the a warning message stating that it's not secure and to use the build in `SecretField`. + + You can do this by updating your `template.yaml` files that have the reference `ui:widget: password` to `ui:field: Secret` instead. + + ```diff + apiVersion: backstage.io/v1alpha1 + kind: Template + metadata: + ... + + spec: + parameters: + - title: collect some information + schema: + type: object + properties: + password: + title: Password + type: string + - ui:widget: password + + ui:field: Secret + steps: + - id: collect-info + name: Collect some information + action: acme:do:something + input: + - password: ${{ parameters.password }} + + password: ${{ secrets.password }} + ``` + +### Patch Changes + +- 86dc29d: Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. +- d44a20a: Added additional plugin metadata to `package.json`. +- fa8560e: Prevents Autocomplete dropdown from overlapping sidebar on hovering it +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- 928cfa0: Fixed a typo ' + +## 1.8.7-next.3 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- fa8560e: Prevents Autocomplete dropdown from overlapping sidebar on hovering it +- Updated dependencies + - @backstage/core-components@0.14.8-next.2 + - @backstage/plugin-scaffolder-common@1.5.3-next.1 + - @backstage/plugin-permission-react@0.4.23-next.1 + - @backstage/plugin-catalog-react@1.12.1-next.2 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/core-plugin-api@1.9.3-next.0 + - @backstage/theme@0.5.6-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## 1.8.7-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.8-next.1 + - @backstage/core-plugin-api@1.9.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.1 + - @backstage/plugin-permission-react@0.4.23-next.0 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/theme@0.5.6-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + +## 1.8.7-next.1 + +### Patch Changes + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- 928cfa0: Fixed a typo ' + +## 1.8.6-next.0 + +### Patch Changes + +- 86dc29d: Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. +- Updated dependencies + - @backstage/theme@0.5.6-next.0 + - @backstage/core-components@0.14.8-next.0 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + - @backstage/plugin-catalog-react@1.12.1-next.0 + - @backstage/plugin-scaffolder-common@1.5.2 + +## 1.8.5 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2 + - @backstage/core-components@0.14.7 + - @backstage/catalog-model@1.5.0 + - @backstage/plugin-catalog-react@1.12.0 + - @backstage/theme@0.5.4 + - @backstage/catalog-client@1.6.5 + +## 1.8.5-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.0-next.2 + - @backstage/core-components@0.14.7-next.2 + +## 1.8.5-next.1 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2-next.1 + - @backstage/core-components@0.14.6-next.1 + - @backstage/plugin-catalog-react@1.11.4-next.1 + +## 1.8.5-next.0 + +### Patch Changes + +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/catalog-model@1.5.0-next.0 + - @backstage/theme@0.5.4-next.0 + - @backstage/core-components@0.14.5-next.0 + - @backstage/catalog-client@1.6.5-next.0 + - @backstage/plugin-catalog-react@1.11.4-next.0 + - @backstage/plugin-scaffolder-common@1.5.2-next.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## 1.8.4 + +### Patch Changes + +- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`. +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`. +- 0e692cf: Added ESLint rule `no-top-level-material-ui-4-imports` to migrate the Material UI imports. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/version-bridge@1.0.8 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.1 + +### Patch Changes + +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/catalog-client@1.6.4-next.0 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4-next.0 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.4-next.0 + - @backstage/catalog-client@1.6.3 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.0 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.3 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.3 + - @backstage/core-components@0.14.3 + - @backstage/plugin-catalog-react@1.11.2 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.2 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.2 + - @backstage/core-components@0.14.2 + - @backstage/plugin-catalog-react@1.11.1 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/core-components@0.14.1 + - @backstage/theme@0.5.2 + - @backstage/plugin-catalog-react@1.11.0 + - @backstage/catalog-client@1.6.1 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.2 + - @backstage/plugin-catalog-react@1.11.0-next.2 + - @backstage/catalog-client@1.6.1-next.1 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.1 + - @backstage/plugin-catalog-react@1.10.1-next.1 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.0 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/theme@0.5.2-next.0 + - @backstage/core-components@0.14.1-next.0 + - @backstage/plugin-catalog-react@1.10.1-next.0 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.0 + +## 1.8.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 0b0c6b6: Allow defining default output text to be shown +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- 3dff4b0: Remove unused deps +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/plugin-catalog-react@1.10.0 + - @backstage/core-components@0.14.0 + - @backstage/catalog-model@1.4.4 + - @backstage/theme@0.5.1 + - @backstage/core-plugin-api@1.9.0 + - @backstage/catalog-client@1.6.0 + - @backstage/plugin-scaffolder-common@1.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.8.0-next.3 + +### Patch Changes + +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- Updated dependencies + - @backstage/theme@0.5.1-next.1 + - @backstage/core-components@0.14.0-next.2 + - @backstage/plugin-catalog-react@1.10.0-next.3 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.2 + +### Patch Changes + +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/core-components@0.14.0-next.1 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/plugin-catalog-react@1.10.0-next.2 + - @backstage/theme@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.1 + +### Minor Changes + +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- Updated dependencies + - @backstage/core-components@0.14.0-next.0 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/core-plugin-api@1.8.3-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- 0b0c6b6: Allow defining default output text to be shown +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 0b9ce2b: Fix for a step with no properties +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- 4016f21: Remove some unused dependencies +- d16f85f: Show first scaffolder output text by default +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/plugin-scaffolder-common@1.4.5 + - @backstage/core-plugin-api@1.8.2 + - @backstage/catalog-client@1.5.2 + - @backstage/plugin-catalog-react@1.9.3 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1-next.2 + +### Patch Changes + +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.3-next.2 + +## 1.7.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.8.2-next.0 + - @backstage/core-components@0.13.10-next.1 + - @backstage/plugin-catalog-react@1.9.3-next.1 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.1-next.0 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 4016f21: Remove some unused dependencies +- Updated dependencies + - @backstage/core-components@0.13.10-next.0 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.9.3-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.0 + +### Minor Changes + +- 33edf50: Added support for dealing with user provided secrets using a new field extension `ui:field: Secret` + +### Patch Changes + +- 670c7cc: Fix bug where `properties` is set to empty object when it should be empty for schema dependencies +- fa66d1b: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- e516bf4: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3: Minor updates for TypeScript 5.2.2+ compatibility +- 2aee53b: Add horizontal slider if stepper overflows +- 2b72591: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- 6cd12f2: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- a518c5a: Updated dependency `@react-hookz/web` to `^23.0.0`. +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- 63c494e: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- c8908d4: Use new option from RJSF 5.15 +- 0cbb03b: Fixing regular expression ReDoS with zod packages. Upgrading to latest. ref: https://security.snyk.io/vuln/SNYK-JS-ZOD-5925617 +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/core-plugin-api@1.8.1 + - @backstage/plugin-catalog-react@1.9.2 + - @backstage/core-components@0.13.9 + - @backstage/theme@0.5.0 + - @backstage/catalog-client@1.5.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.6.2-next.3 + +### Patch Changes + +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- c8908d4: Use new option from RJSF 5.15 +- Updated dependencies + - @backstage/core-components@0.13.9-next.3 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.9.2-next.3 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.2 + +### Patch Changes + +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/theme@0.5.0-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.2 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-components@0.13.9-next.2 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.1 + +### Patch Changes + +- fa66d1b5b3: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- 2aee53bbeb: Add horizontal slider if stepper overflows +- 2b725913c1: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- a518c5a25b: Updated dependency `@react-hookz/web` to `^23.0.0`. +- Updated dependencies + - @backstage/core-components@0.13.9-next.1 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.1 + - @backstage/catalog-client@1.5.0-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.0 + +### Patch Changes + +- e516bf4da8: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3bc9: Minor updates for TypeScript 5.2.2+ compatibility +- 6cd12f277b: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- 63c494ef22: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- Updated dependencies + - @backstage/core-plugin-api@1.8.1-next.0 + - @backstage/plugin-catalog-react@1.9.2-next.0 + - @backstage/core-components@0.13.9-next.0 + - @backstage/theme@0.5.0-next.0 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- 171a99816b: Fixed `backstage:featureFlag` in `scaffolder/next` by sorting out `manifest.steps`. +- c838da0edd: Updated dependency `@rjsf/utils` to `5.13.6`. + Updated dependency `@rjsf/core` to `5.13.6`. + Updated dependency `@rjsf/material-ui` to `5.13.6`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.6`. +- 69c14904b6: Use `EntityRefLinks` with `hideIcons` property to avoid double icons +- 62b5922916: Internal theme type updates +- dda56ae265: Preserve step's time execution for a non-running task. +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0 + - @backstage/core-components@0.13.8 + - @backstage/plugin-scaffolder-common@1.4.3 + - @backstage/core-plugin-api@1.8.0 + - @backstage/version-bridge@1.0.7 + - @backstage/theme@0.4.4 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.6.0-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.8-next.2 + - @backstage/plugin-catalog-react@1.9.0-next.2 + +## 1.6.0-next.1 + +### Patch Changes + +- 62b5922916: Internal theme type updates +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0-next.1 + - @backstage/plugin-scaffolder-common@1.4.3-next.1 + - @backstage/core-components@0.13.8-next.1 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/errors@1.2.3 + - @backstage/theme@0.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7-next.0 + +## 1.6.0-next.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- Updated dependencies + - @backstage/core-components@0.13.7-next.0 + - @backstage/plugin-scaffolder-common@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.9.0-next.0 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/version-bridge@1.0.7-next.0 + - @backstage/theme@0.4.4-next.0 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.5.6 + +### Patch Changes + +- 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`. +- f95af4e540: Updated dependency `@testing-library/dom` to `^9.0.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5 + - @backstage/core-plugin-api@1.7.0 + - @backstage/core-components@0.13.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/version-bridge@1.0.6 + - @backstage/theme@0.4.3 + - @backstage/catalog-client@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.4.2 + +## 1.5.6-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.2 + - @backstage/core-plugin-api@1.7.0-next.1 + - @backstage/catalog-model@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.8.5-next.2 + - @backstage/errors@1.2.3-next.0 + - @backstage/theme@0.4.3-next.0 + - @backstage/catalog-client@1.4.5-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.2-next.0 + +## 1.5.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.1 + - @backstage/plugin-catalog-react@1.8.5-next.1 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5-next.0 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/core-components@0.13.6-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.5 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4 + - @backstage/core-components@0.13.5 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/core-plugin-api@1.6.0 + - @backstage/errors@1.2.2 + - @backstage/plugin-scaffolder-common@1.4.1 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + +## 1.5.5-next.3 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- Updated dependencies + - @backstage/catalog-client@1.4.4-next.2 + - @backstage/catalog-model@1.4.2-next.2 + - @backstage/core-components@0.13.5-next.3 + - @backstage/core-plugin-api@1.6.0-next.3 + - @backstage/errors@1.2.2-next.0 + - @backstage/plugin-catalog-react@1.8.4-next.3 + - @backstage/plugin-scaffolder-common@1.4.1-next.2 + - @backstage/theme@0.4.2-next.0 + - @backstage/types@1.1.1-next.0 + - @backstage/version-bridge@1.0.5-next.0 + +## 1.5.5-next.2 + +### Patch Changes + +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/core-components@0.13.5-next.2 + - @backstage/core-plugin-api@1.6.0-next.2 + - @backstage/plugin-catalog-react@1.8.4-next.2 + - @backstage/catalog-model@1.4.2-next.1 + - @backstage/catalog-client@1.4.4-next.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.4.1-next.1 + +## 1.5.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4-next.1 + - @backstage/core-components@0.13.5-next.1 + - @backstage/catalog-model@1.4.2-next.0 + - @backstage/core-plugin-api@1.6.0-next.1 + - @backstage/catalog-client@1.4.4-next.0 + - @backstage/plugin-scaffolder-common@1.4.1-next.0 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.6.0-next.0 + - @backstage/core-components@0.13.5-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.8.3-next.0 + - @backstage/plugin-scaffolder-common@1.4.0 + +## 1.5.2 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4 + - @backstage/plugin-catalog-react@1.8.1 + - @backstage/plugin-scaffolder-common@1.4.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.1-next.1 + +## 1.5.2-next.0 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4-next.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/plugin-catalog-react@1.8.1-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1 + - @backstage/errors@1.2.1 + - @backstage/plugin-catalog-react@1.8.0 + - @backstage/core-components@0.13.3 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.0-next.2 + - @backstage/theme@0.4.1-next.1 + - @backstage/core-plugin-api@1.5.3-next.1 + - @backstage/core-components@0.13.3-next.2 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/errors@1.2.1-next.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.1-next.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1-next.0 + - @backstage/core-components@0.13.3-next.1 + - @backstage/core-plugin-api@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.7.1-next.1 + +## 1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.2.1-next.0 + - @backstage/core-components@0.13.3-next.0 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.2 + - @backstage/theme@0.4.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.1-next.0 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.0 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/core-plugin-api@1.5.2 + - @backstage/catalog-client@1.4.2 + - @backstage/core-components@0.13.2 + - @backstage/types@1.1.0 + - @backstage/theme@0.4.0 + - @backstage/plugin-catalog-react@1.7.0 + - @backstage/catalog-model@1.4.0 + - @backstage/errors@1.2.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.1 + +## 1.5.0-next.3 + +### Minor Changes + +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.2-next.3 + - @backstage/catalog-model@1.4.0-next.1 + - @backstage/catalog-client@1.4.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/errors@1.2.0-next.0 + - @backstage/theme@0.4.0-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.0-next.3 + - @backstage/plugin-scaffolder-common@1.3.1-next.1 + +## 1.5.0-next.2 + +### Patch Changes + +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- Updated dependencies + - @backstage/theme@0.4.0-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.2 + - @backstage/core-components@0.13.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + +## 1.5.0-next.1 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/errors@1.2.0-next.0 + - @backstage/core-components@0.13.2-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.1 + - @backstage/catalog-model@1.4.0-next.0 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/catalog-client@1.4.2-next.1 + - @backstage/plugin-scaffolder-common@1.3.1-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.1-next.0 + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- Updated dependencies + - @backstage/catalog-client@1.4.2-next.0 + - @backstage/plugin-catalog-react@1.7.0-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/core-components@0.13.2-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.0 + +## 1.4.0 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/theme@0.3.0 + - @backstage/plugin-catalog-react@1.6.0 + - @backstage/plugin-scaffolder-common@1.3.0 + - @backstage/core-components@0.13.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.0-next.2 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- Updated dependencies + - @backstage/theme@0.3.0-next.0 + - @backstage/plugin-scaffolder-common@1.3.0-next.0 + - @backstage/core-components@0.13.1-next.1 + - @backstage/plugin-catalog-react@1.6.0-next.2 + - @backstage/core-plugin-api@1.5.1 + +## 1.3.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.1-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/plugin-catalog-react@1.6.0-next.1 + +## 1.3.1-next.0 + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/plugin-catalog-react@1.6.0-next.0 + - @backstage/core-components@0.13.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.2.7 + +## 1.3.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- 7e1d900413a: `scaffolder/next`: Bump `@rjsf/*` dependencies to 5.5.2 +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 0435174b06f: Accessibility issues identified using lighthouse fixed. +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- d2488f5e54c: Add an indication that the validators are running when clicking `next` on each step of the form. +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- e0c6e8b9c3c: Update peer dependencies +- cf71c3744a5: scaffolder/next: Bump `@rjsf/*` dependencies to 5.6.0 +- Updated dependencies + - @backstage/core-components@0.13.0 + - @backstage/plugin-scaffolder-common@1.2.7 + - @backstage/catalog-client@1.4.1 + - @backstage/plugin-catalog-react@1.5.0 + - @backstage/theme@0.2.19 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/version-bridge@1.0.4 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.3 + +### Patch Changes + +- d2488f5e54c: Add indication that the validators are running +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.5.0-next.3 + - @backstage/catalog-model@1.3.0-next.0 + - @backstage/core-components@0.13.0-next.3 + - @backstage/catalog-client@1.4.1-next.1 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.2 + +## 1.3.0-next.2 + +### Patch Changes + +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- Updated dependencies + - @backstage/catalog-client@1.4.1-next.0 + - @backstage/core-components@0.12.6-next.2 + - @backstage/plugin-catalog-react@1.4.1-next.2 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + +## 1.3.0-next.1 + +### Patch Changes + +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- e0c6e8b9c3c: Update peer dependencies +- Updated dependencies + - @backstage/core-components@0.12.6-next.1 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + - @backstage/core-plugin-api@1.5.1-next.0 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.1 + - @backstage/theme@0.2.19-next.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.2.7-next.0 + - @backstage/core-components@0.12.6-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.2.0 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- c8d78b9ae9d: fix bug with `hasErrors` returning false when dealing with empty objects +- 9b8c374ace5: Remove timer for skipped steps in Scaffolder Next's TaskSteps +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- d9893263ba9: scaffolder/next: Fix for steps without properties +- 928a12a9b3e: Internal refactor of `/alpha` exports. +- cc418d652a7: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec42: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0 + - @backstage/core-components@0.12.5 + - @backstage/plugin-catalog-react@1.4.0 + - @backstage/errors@1.1.5 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-model@1.2.1 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6 + +## 1.2.0-next.2 + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- d9893263ba9: scaffolder/next: Fix for steps without properties +- Updated dependencies + - @backstage/core-components@0.12.5-next.2 + - @backstage/plugin-catalog-react@1.4.0-next.2 + - @backstage/core-plugin-api@1.5.0-next.2 + +## 1.2.0-next.1 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- Updated dependencies + - @backstage/core-components@0.12.5-next.1 + - @backstage/errors@1.1.5-next.0 + - @backstage/catalog-client@1.4.0-next.1 + - @backstage/core-plugin-api@1.4.1-next.1 + - @backstage/theme@0.2.18-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.1 + - @backstage/catalog-model@1.2.1-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.1 + +## 1.1.1-next.0 + +### Patch Changes + +- c8d78b9ae9: fix bug with `hasErrors` returning false when dealing with empty objects +- 928a12a9b3: Internal refactor of `/alpha` exports. +- cc418d652a: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec4: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.0 + - @backstage/core-plugin-api@1.4.1-next.0 + - @backstage/catalog-model@1.2.1-next.0 + - @backstage/core-components@0.12.5-next.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.17 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.0 + +## 1.1.0 + +### Minor Changes + +- a07750745b: Added `DescriptionField` field override to the `next/scaffolder` +- a521379688: Migrating the `TemplateEditorPage` to work with the new components from `@backstage/plugin-scaffolder-react` +- 8c2966536b: Embed scaffolder workflow in other components +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/core-components@0.12.4 + - @backstage/catalog-model@1.2.0 + - @backstage/theme@0.2.17 + - @backstage/core-plugin-api@1.4.0 + - @backstage/plugin-catalog-react@1.3.0 + - @backstage/catalog-client@1.3.1 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5 + +## 1.1.0-next.2 + +### Minor Changes + +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- Updated dependencies + - @backstage/catalog-model@1.2.0-next.1 + - @backstage/core-components@0.12.4-next.1 + - @backstage/catalog-client@1.3.1-next.1 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-catalog-react@1.3.0-next.2 + - @backstage/plugin-scaffolder-common@1.2.5-next.1 + +## 1.1.0-next.1 + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- Updated dependencies + - @backstage/core-components@0.12.4-next.0 + - @backstage/plugin-catalog-react@1.3.0-next.1 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.1.0-next.0 + +### Minor Changes + +- 8c2966536b: Embed scaffolder workflow in other components + +### Patch Changes + +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/plugin-catalog-react@1.3.0-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.0.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5 + - @backstage/plugin-scaffolder-common@1.2.4 + - @backstage/catalog-client@1.3.0 + - @backstage/plugin-catalog-react@1.2.4 + - @backstage/core-components@0.12.3 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.0.0-next.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.3.0-next.1 + - @backstage/catalog-client@1.3.0-next.2 + - @backstage/plugin-catalog-react@1.2.4-next.2 + - @backstage/catalog-model@1.1.5-next.1 + - @backstage/core-components@0.12.3-next.2 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.4-next.1 + in the review step label +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## 1.8.6-next.0 + +### Patch Changes + +- 86dc29d: Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. +- Updated dependencies + - @backstage/theme@0.5.6-next.0 + - @backstage/core-components@0.14.8-next.0 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + - @backstage/plugin-catalog-react@1.12.1-next.0 + - @backstage/plugin-scaffolder-common@1.5.2 + +## 1.8.5 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2 + - @backstage/core-components@0.14.7 + - @backstage/catalog-model@1.5.0 + - @backstage/plugin-catalog-react@1.12.0 + - @backstage/theme@0.5.4 + - @backstage/catalog-client@1.6.5 + +## 1.8.5-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.0-next.2 + - @backstage/core-components@0.14.7-next.2 + +## 1.8.5-next.1 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2-next.1 + - @backstage/core-components@0.14.6-next.1 + - @backstage/plugin-catalog-react@1.11.4-next.1 + +## 1.8.5-next.0 + +### Patch Changes + +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/catalog-model@1.5.0-next.0 + - @backstage/theme@0.5.4-next.0 + - @backstage/core-components@0.14.5-next.0 + - @backstage/catalog-client@1.6.5-next.0 + - @backstage/plugin-catalog-react@1.11.4-next.0 + - @backstage/plugin-scaffolder-common@1.5.2-next.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## 1.8.4 + +### Patch Changes + +- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`. +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`. +- 0e692cf: Added ESLint rule `no-top-level-material-ui-4-imports` to migrate the Material UI imports. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/version-bridge@1.0.8 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.1 + +### Patch Changes + +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/catalog-client@1.6.4-next.0 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4-next.0 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.4-next.0 + - @backstage/catalog-client@1.6.3 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.0 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.3 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.3 + - @backstage/core-components@0.14.3 + - @backstage/plugin-catalog-react@1.11.2 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.2 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.2 + - @backstage/core-components@0.14.2 + - @backstage/plugin-catalog-react@1.11.1 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/core-components@0.14.1 + - @backstage/theme@0.5.2 + - @backstage/plugin-catalog-react@1.11.0 + - @backstage/catalog-client@1.6.1 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.2 + - @backstage/plugin-catalog-react@1.11.0-next.2 + - @backstage/catalog-client@1.6.1-next.1 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.1 + - @backstage/plugin-catalog-react@1.10.1-next.1 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.0 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/theme@0.5.2-next.0 + - @backstage/core-components@0.14.1-next.0 + - @backstage/plugin-catalog-react@1.10.1-next.0 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.0 + +## 1.8.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 0b0c6b6: Allow defining default output text to be shown +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- 3dff4b0: Remove unused deps +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/plugin-catalog-react@1.10.0 + - @backstage/core-components@0.14.0 + - @backstage/catalog-model@1.4.4 + - @backstage/theme@0.5.1 + - @backstage/core-plugin-api@1.9.0 + - @backstage/catalog-client@1.6.0 + - @backstage/plugin-scaffolder-common@1.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.8.0-next.3 + +### Patch Changes + +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- Updated dependencies + - @backstage/theme@0.5.1-next.1 + - @backstage/core-components@0.14.0-next.2 + - @backstage/plugin-catalog-react@1.10.0-next.3 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.2 + +### Patch Changes + +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/core-components@0.14.0-next.1 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/plugin-catalog-react@1.10.0-next.2 + - @backstage/theme@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.1 + +### Minor Changes + +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- Updated dependencies + - @backstage/core-components@0.14.0-next.0 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/core-plugin-api@1.8.3-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- 0b0c6b6: Allow defining default output text to be shown +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 0b9ce2b: Fix for a step with no properties +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- 4016f21: Remove some unused dependencies +- d16f85f: Show first scaffolder output text by default +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/plugin-scaffolder-common@1.4.5 + - @backstage/core-plugin-api@1.8.2 + - @backstage/catalog-client@1.5.2 + - @backstage/plugin-catalog-react@1.9.3 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1-next.2 + +### Patch Changes + +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.3-next.2 + +## 1.7.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.8.2-next.0 + - @backstage/core-components@0.13.10-next.1 + - @backstage/plugin-catalog-react@1.9.3-next.1 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.1-next.0 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 4016f21: Remove some unused dependencies +- Updated dependencies + - @backstage/core-components@0.13.10-next.0 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.9.3-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.0 + +### Minor Changes + +- 33edf50: Added support for dealing with user provided secrets using a new field extension `ui:field: Secret` + +### Patch Changes + +- 670c7cc: Fix bug where `properties` is set to empty object when it should be empty for schema dependencies +- fa66d1b: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- e516bf4: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3: Minor updates for TypeScript 5.2.2+ compatibility +- 2aee53b: Add horizontal slider if stepper overflows +- 2b72591: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- 6cd12f2: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- a518c5a: Updated dependency `@react-hookz/web` to `^23.0.0`. +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- 63c494e: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- c8908d4: Use new option from RJSF 5.15 +- 0cbb03b: Fixing regular expression ReDoS with zod packages. Upgrading to latest. ref: https://security.snyk.io/vuln/SNYK-JS-ZOD-5925617 +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/core-plugin-api@1.8.1 + - @backstage/plugin-catalog-react@1.9.2 + - @backstage/core-components@0.13.9 + - @backstage/theme@0.5.0 + - @backstage/catalog-client@1.5.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.6.2-next.3 + +### Patch Changes + +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- c8908d4: Use new option from RJSF 5.15 +- Updated dependencies + - @backstage/core-components@0.13.9-next.3 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.9.2-next.3 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.2 + +### Patch Changes + +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/theme@0.5.0-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.2 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-components@0.13.9-next.2 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.1 + +### Patch Changes + +- fa66d1b5b3: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- 2aee53bbeb: Add horizontal slider if stepper overflows +- 2b725913c1: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- a518c5a25b: Updated dependency `@react-hookz/web` to `^23.0.0`. +- Updated dependencies + - @backstage/core-components@0.13.9-next.1 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.1 + - @backstage/catalog-client@1.5.0-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.0 + +### Patch Changes + +- e516bf4da8: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3bc9: Minor updates for TypeScript 5.2.2+ compatibility +- 6cd12f277b: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- 63c494ef22: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- Updated dependencies + - @backstage/core-plugin-api@1.8.1-next.0 + - @backstage/plugin-catalog-react@1.9.2-next.0 + - @backstage/core-components@0.13.9-next.0 + - @backstage/theme@0.5.0-next.0 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- 171a99816b: Fixed `backstage:featureFlag` in `scaffolder/next` by sorting out `manifest.steps`. +- c838da0edd: Updated dependency `@rjsf/utils` to `5.13.6`. + Updated dependency `@rjsf/core` to `5.13.6`. + Updated dependency `@rjsf/material-ui` to `5.13.6`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.6`. +- 69c14904b6: Use `EntityRefLinks` with `hideIcons` property to avoid double icons +- 62b5922916: Internal theme type updates +- dda56ae265: Preserve step's time execution for a non-running task. +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0 + - @backstage/core-components@0.13.8 + - @backstage/plugin-scaffolder-common@1.4.3 + - @backstage/core-plugin-api@1.8.0 + - @backstage/version-bridge@1.0.7 + - @backstage/theme@0.4.4 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.6.0-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.8-next.2 + - @backstage/plugin-catalog-react@1.9.0-next.2 + +## 1.6.0-next.1 + +### Patch Changes + +- 62b5922916: Internal theme type updates +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0-next.1 + - @backstage/plugin-scaffolder-common@1.4.3-next.1 + - @backstage/core-components@0.13.8-next.1 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/errors@1.2.3 + - @backstage/theme@0.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7-next.0 + +## 1.6.0-next.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- Updated dependencies + - @backstage/core-components@0.13.7-next.0 + - @backstage/plugin-scaffolder-common@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.9.0-next.0 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/version-bridge@1.0.7-next.0 + - @backstage/theme@0.4.4-next.0 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.5.6 + +### Patch Changes + +- 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`. +- f95af4e540: Updated dependency `@testing-library/dom` to `^9.0.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5 + - @backstage/core-plugin-api@1.7.0 + - @backstage/core-components@0.13.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/version-bridge@1.0.6 + - @backstage/theme@0.4.3 + - @backstage/catalog-client@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.4.2 + +## 1.5.6-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.2 + - @backstage/core-plugin-api@1.7.0-next.1 + - @backstage/catalog-model@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.8.5-next.2 + - @backstage/errors@1.2.3-next.0 + - @backstage/theme@0.4.3-next.0 + - @backstage/catalog-client@1.4.5-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.2-next.0 + +## 1.5.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.1 + - @backstage/plugin-catalog-react@1.8.5-next.1 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5-next.0 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/core-components@0.13.6-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.5 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4 + - @backstage/core-components@0.13.5 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/core-plugin-api@1.6.0 + - @backstage/errors@1.2.2 + - @backstage/plugin-scaffolder-common@1.4.1 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + +## 1.5.5-next.3 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- Updated dependencies + - @backstage/catalog-client@1.4.4-next.2 + - @backstage/catalog-model@1.4.2-next.2 + - @backstage/core-components@0.13.5-next.3 + - @backstage/core-plugin-api@1.6.0-next.3 + - @backstage/errors@1.2.2-next.0 + - @backstage/plugin-catalog-react@1.8.4-next.3 + - @backstage/plugin-scaffolder-common@1.4.1-next.2 + - @backstage/theme@0.4.2-next.0 + - @backstage/types@1.1.1-next.0 + - @backstage/version-bridge@1.0.5-next.0 + +## 1.5.5-next.2 + +### Patch Changes + +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/core-components@0.13.5-next.2 + - @backstage/core-plugin-api@1.6.0-next.2 + - @backstage/plugin-catalog-react@1.8.4-next.2 + - @backstage/catalog-model@1.4.2-next.1 + - @backstage/catalog-client@1.4.4-next.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.4.1-next.1 + +## 1.5.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4-next.1 + - @backstage/core-components@0.13.5-next.1 + - @backstage/catalog-model@1.4.2-next.0 + - @backstage/core-plugin-api@1.6.0-next.1 + - @backstage/catalog-client@1.4.4-next.0 + - @backstage/plugin-scaffolder-common@1.4.1-next.0 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.6.0-next.0 + - @backstage/core-components@0.13.5-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.8.3-next.0 + - @backstage/plugin-scaffolder-common@1.4.0 + +## 1.5.2 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4 + - @backstage/plugin-catalog-react@1.8.1 + - @backstage/plugin-scaffolder-common@1.4.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.1-next.1 + +## 1.5.2-next.0 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4-next.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/plugin-catalog-react@1.8.1-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1 + - @backstage/errors@1.2.1 + - @backstage/plugin-catalog-react@1.8.0 + - @backstage/core-components@0.13.3 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.0-next.2 + - @backstage/theme@0.4.1-next.1 + - @backstage/core-plugin-api@1.5.3-next.1 + - @backstage/core-components@0.13.3-next.2 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/errors@1.2.1-next.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.1-next.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1-next.0 + - @backstage/core-components@0.13.3-next.1 + - @backstage/core-plugin-api@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.7.1-next.1 + +## 1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.2.1-next.0 + - @backstage/core-components@0.13.3-next.0 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.2 + - @backstage/theme@0.4.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.1-next.0 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.0 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/core-plugin-api@1.5.2 + - @backstage/catalog-client@1.4.2 + - @backstage/core-components@0.13.2 + - @backstage/types@1.1.0 + - @backstage/theme@0.4.0 + - @backstage/plugin-catalog-react@1.7.0 + - @backstage/catalog-model@1.4.0 + - @backstage/errors@1.2.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.1 + +## 1.5.0-next.3 + +### Minor Changes + +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.2-next.3 + - @backstage/catalog-model@1.4.0-next.1 + - @backstage/catalog-client@1.4.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/errors@1.2.0-next.0 + - @backstage/theme@0.4.0-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.0-next.3 + - @backstage/plugin-scaffolder-common@1.3.1-next.1 + +## 1.5.0-next.2 + +### Patch Changes + +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- Updated dependencies + - @backstage/theme@0.4.0-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.2 + - @backstage/core-components@0.13.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + +## 1.5.0-next.1 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/errors@1.2.0-next.0 + - @backstage/core-components@0.13.2-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.1 + - @backstage/catalog-model@1.4.0-next.0 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/catalog-client@1.4.2-next.1 + - @backstage/plugin-scaffolder-common@1.3.1-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.1-next.0 + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- Updated dependencies + - @backstage/catalog-client@1.4.2-next.0 + - @backstage/plugin-catalog-react@1.7.0-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/core-components@0.13.2-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.0 + +## 1.4.0 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/theme@0.3.0 + - @backstage/plugin-catalog-react@1.6.0 + - @backstage/plugin-scaffolder-common@1.3.0 + - @backstage/core-components@0.13.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.0-next.2 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- Updated dependencies + - @backstage/theme@0.3.0-next.0 + - @backstage/plugin-scaffolder-common@1.3.0-next.0 + - @backstage/core-components@0.13.1-next.1 + - @backstage/plugin-catalog-react@1.6.0-next.2 + - @backstage/core-plugin-api@1.5.1 + +## 1.3.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.1-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/plugin-catalog-react@1.6.0-next.1 + +## 1.3.1-next.0 + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/plugin-catalog-react@1.6.0-next.0 + - @backstage/core-components@0.13.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.2.7 + +## 1.3.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- 7e1d900413a: `scaffolder/next`: Bump `@rjsf/*` dependencies to 5.5.2 +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 0435174b06f: Accessibility issues identified using lighthouse fixed. +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- d2488f5e54c: Add an indication that the validators are running when clicking `next` on each step of the form. +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- e0c6e8b9c3c: Update peer dependencies +- cf71c3744a5: scaffolder/next: Bump `@rjsf/*` dependencies to 5.6.0 +- Updated dependencies + - @backstage/core-components@0.13.0 + - @backstage/plugin-scaffolder-common@1.2.7 + - @backstage/catalog-client@1.4.1 + - @backstage/plugin-catalog-react@1.5.0 + - @backstage/theme@0.2.19 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/version-bridge@1.0.4 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.3 + +### Patch Changes + +- d2488f5e54c: Add indication that the validators are running +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.5.0-next.3 + - @backstage/catalog-model@1.3.0-next.0 + - @backstage/core-components@0.13.0-next.3 + - @backstage/catalog-client@1.4.1-next.1 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.2 + +## 1.3.0-next.2 + +### Patch Changes + +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- Updated dependencies + - @backstage/catalog-client@1.4.1-next.0 + - @backstage/core-components@0.12.6-next.2 + - @backstage/plugin-catalog-react@1.4.1-next.2 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + +## 1.3.0-next.1 + +### Patch Changes + +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- e0c6e8b9c3c: Update peer dependencies +- Updated dependencies + - @backstage/core-components@0.12.6-next.1 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + - @backstage/core-plugin-api@1.5.1-next.0 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.1 + - @backstage/theme@0.2.19-next.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.2.7-next.0 + - @backstage/core-components@0.12.6-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.2.0 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- c8d78b9ae9d: fix bug with `hasErrors` returning false when dealing with empty objects +- 9b8c374ace5: Remove timer for skipped steps in Scaffolder Next's TaskSteps +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- d9893263ba9: scaffolder/next: Fix for steps without properties +- 928a12a9b3e: Internal refactor of `/alpha` exports. +- cc418d652a7: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec42: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0 + - @backstage/core-components@0.12.5 + - @backstage/plugin-catalog-react@1.4.0 + - @backstage/errors@1.1.5 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-model@1.2.1 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6 + +## 1.2.0-next.2 + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- d9893263ba9: scaffolder/next: Fix for steps without properties +- Updated dependencies + - @backstage/core-components@0.12.5-next.2 + - @backstage/plugin-catalog-react@1.4.0-next.2 + - @backstage/core-plugin-api@1.5.0-next.2 + +## 1.2.0-next.1 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- Updated dependencies + - @backstage/core-components@0.12.5-next.1 + - @backstage/errors@1.1.5-next.0 + - @backstage/catalog-client@1.4.0-next.1 + - @backstage/core-plugin-api@1.4.1-next.1 + - @backstage/theme@0.2.18-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.1 + - @backstage/catalog-model@1.2.1-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.1 + +## 1.1.1-next.0 + +### Patch Changes + +- c8d78b9ae9: fix bug with `hasErrors` returning false when dealing with empty objects +- 928a12a9b3: Internal refactor of `/alpha` exports. +- cc418d652a: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec4: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.0 + - @backstage/core-plugin-api@1.4.1-next.0 + - @backstage/catalog-model@1.2.1-next.0 + - @backstage/core-components@0.12.5-next.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.17 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.0 + +## 1.1.0 + +### Minor Changes + +- a07750745b: Added `DescriptionField` field override to the `next/scaffolder` +- a521379688: Migrating the `TemplateEditorPage` to work with the new components from `@backstage/plugin-scaffolder-react` +- 8c2966536b: Embed scaffolder workflow in other components +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/core-components@0.12.4 + - @backstage/catalog-model@1.2.0 + - @backstage/theme@0.2.17 + - @backstage/core-plugin-api@1.4.0 + - @backstage/plugin-catalog-react@1.3.0 + - @backstage/catalog-client@1.3.1 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5 + +## 1.1.0-next.2 + +### Minor Changes + +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- Updated dependencies + - @backstage/catalog-model@1.2.0-next.1 + - @backstage/core-components@0.12.4-next.1 + - @backstage/catalog-client@1.3.1-next.1 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-catalog-react@1.3.0-next.2 + - @backstage/plugin-scaffolder-common@1.2.5-next.1 + +## 1.1.0-next.1 + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- Updated dependencies + - @backstage/core-components@0.12.4-next.0 + - @backstage/plugin-catalog-react@1.3.0-next.1 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.1.0-next.0 + +### Minor Changes + +- 8c2966536b: Embed scaffolder workflow in other components + +### Patch Changes + +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/plugin-catalog-react@1.3.0-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.0.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5 + - @backstage/plugin-scaffolder-common@1.2.4 + - @backstage/catalog-client@1.3.0 + - @backstage/plugin-catalog-react@1.2.4 + - @backstage/core-components@0.12.3 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.0.0-next.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.3.0-next.1 + - @backstage/catalog-client@1.3.0-next.2 + - @backstage/plugin-catalog-react@1.2.4-next.2 + - @backstage/catalog-model@1.1.5-next.1 + - @backstage/core-components@0.12.3-next.2 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.4-next.1 + in the review step label +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.8.7-next.3 ### Patch Changes diff --git a/plugins/scaffolder-react/api-report-alpha.md b/plugins/scaffolder-react/api-report-alpha.md index 683b8cf8be..4655cbfd62 100644 --- a/plugins/scaffolder-react/api-report-alpha.md +++ b/plugins/scaffolder-react/api-report-alpha.md @@ -33,6 +33,7 @@ import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react'; import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react'; import { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common'; import { UiSchema } from '@rjsf/utils'; +import { WidgetProps } from '@rjsf/utils'; // @alpha (undocumented) export type BackstageOverrides = Overrides & { @@ -149,6 +150,11 @@ export type ScaffolderReactComponentsNameToClassKey = { // @alpha (undocumented) export type ScaffolderReactTemplateCategoryPickerClassKey = 'root' | 'label'; +// @alpha +export const SecretWidget: ( + props: Pick, +) => React_2.JSX.Element; + // @alpha export const Stepper: (stepperProps: StepperProps) => React_2.JSX.Element; diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index 86406fd915..4bb86ca98d 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-react", - "version": "1.8.7-next.3", + "version": "1.9.0", "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder", "backstage": { "role": "web-library", diff --git a/plugins/scaffolder-react/src/next/components/PasswordWidget/PasswordWidget.tsx b/plugins/scaffolder-react/src/next/components/PasswordWidget/PasswordWidget.tsx new file mode 100644 index 0000000000..6c1c2c176f --- /dev/null +++ b/plugins/scaffolder-react/src/next/components/PasswordWidget/PasswordWidget.tsx @@ -0,0 +1,53 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WidgetProps } from '@rjsf/utils'; +import InputLabel from '@material-ui/core/InputLabel'; +import Input from '@material-ui/core/Input'; +import React from 'react'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import { MarkdownContent } from '@backstage/core-components'; + +export const PasswordWidget = ( + props: Pick, +) => { + const { + value, + onChange, + schema: { title }, + } = props; + + return ( + <> + {title} + { + onChange(e.target.value); + }} + value={value} + autoComplete="off" + /> + + + + + ); +}; diff --git a/plugins/scaffolder-react/src/next/components/SecretWidget/SecretWidget.tsx b/plugins/scaffolder-react/src/next/components/SecretWidget/SecretWidget.tsx new file mode 100644 index 0000000000..e2d139f98b --- /dev/null +++ b/plugins/scaffolder-react/src/next/components/SecretWidget/SecretWidget.tsx @@ -0,0 +1,53 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WidgetProps } from '@rjsf/utils'; +import { useTemplateSecrets } from '@backstage/plugin-scaffolder-react'; +import InputLabel from '@material-ui/core/InputLabel'; +import Input from '@material-ui/core/Input'; +import React from 'react'; + +/** + * Secret Widget for overriding the default password input widget + * @alpha + */ +export const SecretWidget = ( + props: Pick, +) => { + const { setSecrets, secrets } = useTemplateSecrets(); + const { + name, + onChange, + schema: { title }, + } = props; + + return ( + <> + {title} + { + onChange(Array(e.target?.value.length).fill('*').join('')); + setSecrets({ [name]: e.target?.value }); + }} + value={secrets[name] ?? ''} + type="password" + autoComplete="off" + /> + + ); +}; diff --git a/plugins/scaffolder-react/src/next/components/SecretWidget/index.ts b/plugins/scaffolder-react/src/next/components/SecretWidget/index.ts new file mode 100644 index 0000000000..9f0964516c --- /dev/null +++ b/plugins/scaffolder-react/src/next/components/SecretWidget/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export * from './SecretWidget'; diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 5bfdf1a44a..269b6a11d5 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -20,7 +20,6 @@ import MuiStep from '@material-ui/core/Step'; import MuiStepLabel from '@material-ui/core/StepLabel'; import Button from '@material-ui/core/Button'; import LinearProgress from '@material-ui/core/LinearProgress'; -import { makeStyles } from '@material-ui/core/styles'; import { type IChangeEvent } from '@rjsf/core'; import { ErrorSchema } from '@rjsf/utils'; import React, { @@ -49,6 +48,8 @@ import { } from '@backstage/plugin-scaffolder-react'; import { ReviewStepProps } from '@backstage/plugin-scaffolder-react'; import { ErrorListTemplate } from './ErrorListTemplate'; +import { makeStyles } from '@material-ui/core/styles'; +import { PasswordWidget } from '../PasswordWidget/PasswordWidget'; const useStyles = makeStyles(theme => ({ backButton: { @@ -232,6 +233,7 @@ export const Stepper = (stepperProps: StepperProps) => { showErrorList="top" templates={{ ErrorListTemplate }} onChange={handleChange} + widgets={{ password: PasswordWidget }} experimental_defaultFormStateBehavior={{ allOf: 'populateDefaults', }} diff --git a/plugins/scaffolder-react/src/next/components/index.ts b/plugins/scaffolder-react/src/next/components/index.ts index 119f983a9f..02f00bb1a8 100644 --- a/plugins/scaffolder-react/src/next/components/index.ts +++ b/plugins/scaffolder-react/src/next/components/index.ts @@ -26,3 +26,4 @@ export * from './TaskLogStream'; export * from './TemplateCategoryPicker'; export * from './ScaffolderPageContextMenu'; export * from './ScaffolderField'; +export * from './SecretWidget'; diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index f42ddfa0e1..43e1d5eab7 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,79 @@ # @backstage/plugin-scaffolder +## 1.21.0 + +### Minor Changes + +- d57ebbc: Changed the way to display entities in EntityPicker to use entityPresentationApi instead of humanizeEntityRef +- 62bd9eb: Replace `ui:widget: password` with the a warning message stating that it's not secure and to use the build in `SecretField`. + + You can do this by updating your `template.yaml` files that have the reference `ui:widget: password` to `ui:field: Secret` instead. + + ```diff + apiVersion: backstage.io/v1alpha1 + kind: Template + metadata: + ... + + spec: + parameters: + - title: collect some information + schema: + type: object + properties: + password: + title: Password + type: string + - ui:widget: password + + ui:field: Secret + steps: + - id: collect-info + name: Collect some information + action: acme:do:something + input: + - password: ${{ parameters.password }} + + password: ${{ secrets.password }} + ``` + +- 60085dd: Added the following default targets for external routes: + + - `registerComponent` binds to the catalog import page. + - `viewTechDoc` binds to the TechDocs entity documentation page. + +### Patch Changes + +- cbebad1: Internal updates to allow reusing Backstage's `fetchApi` implementation for event source requests. This allows you to for example, override the `Authorization` header. +- 1ea7679: Removed waiting for the workspace and repository fields to be filled in before requesting user credentials +- d44a20a: Added additional plugin metadata to `package.json`. +- 6cb4886: Updated dependency `@rjsf/utils` to `5.18.4`. + Updated dependency `@rjsf/core` to `5.18.4`. + Updated dependency `@rjsf/material-ui` to `5.18.4`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.4`. +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- 612a453: Change owner to project for azure host +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-scaffolder-react@1.9.0 + - @backstage/plugin-scaffolder-common@1.5.3 + - @backstage/plugin-permission-react@0.4.23 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.21.0-next.3 ### Minor Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index a209ceb9f3..f2c96eee58 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "1.21.0-next.3", + "version": "1.21.0", "description": "The Backstage plugin that helps you create new things", "backstage": { "role": "frontend-plugin", diff --git a/plugins/scaffolder/src/components/fields/SecretInput/SecretInput.tsx b/plugins/scaffolder/src/components/fields/SecretInput/SecretInput.tsx index aac0cf809a..a588286d97 100644 --- a/plugins/scaffolder/src/components/fields/SecretInput/SecretInput.tsx +++ b/plugins/scaffolder/src/components/fields/SecretInput/SecretInput.tsx @@ -14,18 +14,15 @@ * limitations under the License. */ import React from 'react'; -import { useTemplateSecrets } from '@backstage/plugin-scaffolder-react'; import { ScaffolderRJSFFieldProps } from '@backstage/plugin-scaffolder-react'; -import { ScaffolderField } from '@backstage/plugin-scaffolder-react/alpha'; -import Input from '@material-ui/core/Input'; -import InputLabel from '@material-ui/core/InputLabel'; +import { + ScaffolderField, + SecretWidget, +} from '@backstage/plugin-scaffolder-react/alpha'; export const SecretInput = (props: ScaffolderRJSFFieldProps) => { - const { setSecrets, secrets } = useTemplateSecrets(); const { - name, - onChange, - schema: { title, description }, + schema: { description }, rawErrors, disabled, errors, @@ -40,18 +37,7 @@ export const SecretInput = (props: ScaffolderRJSFFieldProps) => { errors={errors} required={required} > - {title} - { - onChange(Array(e.target?.value.length).fill('*').join('')); - setSecrets({ [name]: e.target?.value }); - }} - value={secrets[name] ?? ''} - type="password" - autoComplete="off" - /> + ); }; diff --git a/plugins/search-backend-module-catalog/CHANGELOG.md b/plugins/search-backend-module-catalog/CHANGELOG.md index 880053dff5..7e14c40bd6 100644 --- a/plugins/search-backend-module-catalog/CHANGELOG.md +++ b/plugins/search-backend-module-catalog/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-search-backend-module-catalog +## 0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 0.1.25-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-catalog/api-report-alpha.md b/plugins/search-backend-module-catalog/api-report-alpha.md index f840884f68..a645532384 100644 --- a/plugins/search-backend-module-catalog/api-report-alpha.md +++ b/plugins/search-backend-module-catalog/api-report-alpha.md @@ -3,7 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { CatalogCollatorEntityTransformer } from '@backstage/plugin-search-backend-module-catalog'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; @@ -16,7 +16,7 @@ export type CatalogCollatorExtensionPoint = { export const catalogCollatorExtensionPoint: ExtensionPoint; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/search-backend-module-catalog/package.json b/plugins/search-backend-module-catalog/package.json index cf6a9a3e18..7c1d8cb0c0 100644 --- a/plugins/search-backend-module-catalog/package.json +++ b/plugins/search-backend-module-catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-catalog", - "version": "0.1.25-next.3", + "version": "0.1.25", "description": "A module for the search backend that exports catalog modules", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-catalog/src/alpha.test.ts b/plugins/search-backend-module-catalog/src/alpha.test.ts index eb2a795ecc..94c585161b 100644 --- a/plugins/search-backend-module-catalog/src/alpha.test.ts +++ b/plugins/search-backend-module-catalog/src/alpha.test.ts @@ -28,7 +28,7 @@ describe('searchModuleCatalogCollator', () => { extensionPoints: [ [searchIndexRegistryExtensionPoint, extensionPointMock], ], - features: [searchModuleCatalogCollator()], + features: [searchModuleCatalogCollator], }); expect(extensionPointMock.addCollator).toHaveBeenCalledTimes(1); @@ -50,7 +50,7 @@ describe('searchModuleCatalogCollator', () => { ], ], features: [ - searchModuleCatalogCollator(), + searchModuleCatalogCollator, mockServices.rootConfig.factory({ data: { search: { diff --git a/plugins/search-backend-module-elasticsearch/CHANGELOG.md b/plugins/search-backend-module-elasticsearch/CHANGELOG.md index 81b6dfdeba..5a2d59e43e 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 1.5.0 + +### Minor Changes + +- b186701: **BREAKING**: The ElasticSearch indexer will now delete stale indices matching the indexer's pattern. + The method `getAliases` of `ElasticSearchClientWrapper` has been deprecated and might be removed in future releases. + + An indexer using the `some-type-index__*` pattern will remove indices matching this pattern after indexation + to prevent stale indices leading to shards exhaustion. + + Before upgrading ensure that the index pattern doesn't match indices that are not managed by Backstage + and thus shouldn't be deleted. + + Note: The ElasticSearch indexer already uses wildcards patterns to remove aliases on these indices. + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + - @backstage/integration-aws-node@0.1.12 + ## 1.4.2-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/api-report-alpha.md b/plugins/search-backend-module-elasticsearch/api-report-alpha.md index c0c30f7f2b..ca1858f9c8 100644 --- a/plugins/search-backend-module-elasticsearch/api-report-alpha.md +++ b/plugins/search-backend-module-elasticsearch/api-report-alpha.md @@ -3,12 +3,12 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ElasticSearchQueryTranslator } from '@backstage/plugin-search-backend-module-elasticsearch'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // @alpha (undocumented) diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index bf6c48910f..6f5d8e3b02 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-elasticsearch", - "version": "1.4.2-next.3", + "version": "1.5.0", "description": "A module for the search backend that implements search using ElasticSearch", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-explore/CHANGELOG.md b/plugins/search-backend-module-explore/CHANGELOG.md index 9ce0c3ce31..f16e3019c3 100644 --- a/plugins/search-backend-module-explore/CHANGELOG.md +++ b/plugins/search-backend-module-explore/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-search-backend-module-explore +## 0.1.25 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + ## 0.1.25-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-explore/api-report-alpha.md b/plugins/search-backend-module-explore/api-report-alpha.md index e1ecb85886..052860b957 100644 --- a/plugins/search-backend-module-explore/api-report-alpha.md +++ b/plugins/search-backend-module-explore/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/search-backend-module-explore/package.json b/plugins/search-backend-module-explore/package.json index 88239e5853..d1960f1f01 100644 --- a/plugins/search-backend-module-explore/package.json +++ b/plugins/search-backend-module-explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-explore", - "version": "0.1.25-next.3", + "version": "0.1.25", "description": "A module for the search backend that exports explore modules", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-explore/src/alpha.test.ts b/plugins/search-backend-module-explore/src/alpha.test.ts index fa6ab8a909..2ba01ec478 100644 --- a/plugins/search-backend-module-explore/src/alpha.test.ts +++ b/plugins/search-backend-module-explore/src/alpha.test.ts @@ -35,7 +35,7 @@ describe('searchModuleExploreCollator', () => { [searchIndexRegistryExtensionPoint, extensionPointMock], ], features: [ - searchModuleExploreCollator(), + searchModuleExploreCollator, mockServices.rootConfig.factory({ data: { search: { diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index f02ea765b4..bd0d338f71 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-search-backend-module-pg +## 0.5.28 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-app-api@0.7.6 + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + ## 0.5.28-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-pg/api-report-alpha.md b/plugins/search-backend-module-pg/api-report-alpha.md index b021f6884f..ea2f6afece 100644 --- a/plugins/search-backend-module-pg/api-report-alpha.md +++ b/plugins/search-backend-module-pg/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 236adaac63..114fde5f37 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-pg", - "version": "0.5.28-next.3", + "version": "0.5.28", "description": "A module for the search backend that implements search using PostgreSQL", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md index 10705399e0..a435215096 100644 --- a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md +++ b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-search-backend-module-stack-overflow-collator +## 0.1.12 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + ## 0.1.12-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-stack-overflow-collator/api-report.md b/plugins/search-backend-module-stack-overflow-collator/api-report.md index d70b5f79fd..bf5ebb5408 100644 --- a/plugins/search-backend-module-stack-overflow-collator/api-report.md +++ b/plugins/search-backend-module-stack-overflow-collator/api-report.md @@ -5,7 +5,7 @@ ```ts /// -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { DocumentCollatorFactory } from '@backstage/plugin-search-common'; import { IndexableDocument } from '@backstage/plugin-search-common'; @@ -13,7 +13,7 @@ import { LoggerService } from '@backstage/backend-plugin-api'; import { Readable } from 'stream'; // @public -const searchStackOverflowCollatorModule: () => BackendFeature; +const searchStackOverflowCollatorModule: BackendFeatureCompat; export default searchStackOverflowCollatorModule; // @public diff --git a/plugins/search-backend-module-stack-overflow-collator/package.json b/plugins/search-backend-module-stack-overflow-collator/package.json index b35262a949..c817100356 100644 --- a/plugins/search-backend-module-stack-overflow-collator/package.json +++ b/plugins/search-backend-module-stack-overflow-collator/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-stack-overflow-collator", - "version": "0.1.12-next.3", + "version": "0.1.12", "description": "A module for the search backend that exports stack overflow modules", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-stack-overflow-collator/src/module/SearchStackOverflowCollatorModule.test.ts b/plugins/search-backend-module-stack-overflow-collator/src/module/SearchStackOverflowCollatorModule.test.ts index a785ead6eb..4e9bc05b73 100644 --- a/plugins/search-backend-module-stack-overflow-collator/src/module/SearchStackOverflowCollatorModule.test.ts +++ b/plugins/search-backend-module-stack-overflow-collator/src/module/SearchStackOverflowCollatorModule.test.ts @@ -35,7 +35,7 @@ describe('searchStackOverflowCollatorModule', () => { [searchIndexRegistryExtensionPoint, extensionPointMock], ], features: [ - searchStackOverflowCollatorModule(), + searchStackOverflowCollatorModule, mockServices.rootConfig.factory({ data: { stackoverflow: { diff --git a/plugins/search-backend-module-techdocs/CHANGELOG.md b/plugins/search-backend-module-techdocs/CHANGELOG.md index d3173bcf2c..e6ec7acec3 100644 --- a/plugins/search-backend-module-techdocs/CHANGELOG.md +++ b/plugins/search-backend-module-techdocs/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-search-backend-module-techdocs +## 0.1.24 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/plugin-catalog-node@1.12.1 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + ## 0.1.24-next.3 ### Patch Changes diff --git a/plugins/search-backend-module-techdocs/api-report-alpha.md b/plugins/search-backend-module-techdocs/api-report-alpha.md index df98623631..ed1e72b3bf 100644 --- a/plugins/search-backend-module-techdocs/api-report-alpha.md +++ b/plugins/search-backend-module-techdocs/api-report-alpha.md @@ -3,12 +3,12 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { TechDocsCollatorEntityTransformer } from '@backstage/plugin-search-backend-module-techdocs'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // @alpha (undocumented) diff --git a/plugins/search-backend-module-techdocs/package.json b/plugins/search-backend-module-techdocs/package.json index 5646ac0b6d..ffb4eb0042 100644 --- a/plugins/search-backend-module-techdocs/package.json +++ b/plugins/search-backend-module-techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-techdocs", - "version": "0.1.24-next.3", + "version": "0.1.24", "description": "A module for the search backend that exports techdocs modules", "backstage": { "role": "backend-plugin-module", diff --git a/plugins/search-backend-module-techdocs/src/alpha.test.ts b/plugins/search-backend-module-techdocs/src/alpha.test.ts index a278614b75..f1875a881b 100644 --- a/plugins/search-backend-module-techdocs/src/alpha.test.ts +++ b/plugins/search-backend-module-techdocs/src/alpha.test.ts @@ -35,7 +35,7 @@ describe('searchModuleTechDocsCollator', () => { [searchIndexRegistryExtensionPoint, extensionPointMock], ], features: [ - searchModuleTechDocsCollator(), + searchModuleTechDocsCollator, mockServices.rootConfig.factory({ data: { search: { diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index 87f7db5616..9ff9f409e7 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-search-backend-node +## 1.2.24 + +### Patch Changes + +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5b6f979: Split backend search plugin startup into "init" and "start" stages to ensure necessary initialization has happened before startup +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-tasks@0.5.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 1.2.24-next.3 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 932404902e..4298ea10ff 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-node", - "version": "1.2.24-next.3", + "version": "1.2.24", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", "backstage": { "role": "node-library", diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index f4e94b34b9..56191eb595 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-search-backend +## 1.5.10 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5b6f979: Split backend search plugin startup into "init" and "start" stages to ensure necessary initialization has happened before startup +- 34dc47d: Move @backstage/repo-tools to devDependencies +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/backend-defaults@0.3.0 + - @backstage/plugin-search-backend-node@1.2.24 + - @backstage/plugin-permission-node@0.7.30 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-search-common@1.2.12 + - @backstage/backend-openapi-utils@0.1.12 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 1.5.10-next.3 ### Patch Changes diff --git a/plugins/search-backend/api-report-alpha.md b/plugins/search-backend/api-report-alpha.md index 548f4c6608..2e5de660cb 100644 --- a/plugins/search-backend/api-report-alpha.md +++ b/plugins/search-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index 1f44819562..513446f170 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend", - "version": "1.5.10-next.3", + "version": "1.5.10", "description": "The Backstage backend plugin that provides your backstage app with search", "backstage": { "role": "backend-plugin", diff --git a/plugins/search-backend/src/alpha.test.ts b/plugins/search-backend/src/alpha.test.ts index a18ab7e104..dfe80987d4 100644 --- a/plugins/search-backend/src/alpha.test.ts +++ b/plugins/search-backend/src/alpha.test.ts @@ -21,7 +21,7 @@ import searchPlugin from './alpha'; describe('searchPlugin', () => { it('should serve search results on query endpoint', async () => { const { server } = await startTestBackend({ - features: [searchPlugin()], + features: [searchPlugin], }); const response = await request(server).get('/api/search/query'); diff --git a/plugins/search-common/CHANGELOG.md b/plugins/search-common/CHANGELOG.md index e0c9991457..e034c62315 100644 --- a/plugins/search-common/CHANGELOG.md +++ b/plugins/search-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-common +## 1.2.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-permission-common@0.7.14 + - @backstage/types@1.1.1 + ## 1.2.12-next.0 ### Patch Changes diff --git a/plugins/search-common/package.json b/plugins/search-common/package.json index 19657dee23..61edfd13f3 100644 --- a/plugins/search-common/package.json +++ b/plugins/search-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-common", - "version": "1.2.12-next.0", + "version": "1.2.12", "description": "Common functionalities for Search, to be shared between various search-enabled plugins", "backstage": { "role": "common-library", diff --git a/plugins/search-react/CHANGELOG.md b/plugins/search-react/CHANGELOG.md index d0ca8d04f6..a8e19d9649 100644 --- a/plugins/search-react/CHANGELOG.md +++ b/plugins/search-react/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-search-react +## 1.7.12 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-search-common@1.2.12 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.7.12-next.2 ### Patch Changes diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index bca09316da..d2496923d3 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-react", - "version": "1.7.12-next.2", + "version": "1.7.12", "backstage": { "role": "web-library", "pluginId": "search", diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 6d2bcc0418..97f03fb61e 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-search +## 1.4.12 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + ## 1.4.12-next.3 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index ec5d704e87..68279bfab6 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search", - "version": "1.4.12-next.3", + "version": "1.4.12", "description": "The Backstage plugin that provides your backstage app with search", "backstage": { "role": "frontend-plugin", diff --git a/plugins/signals-backend/CHANGELOG.md b/plugins/signals-backend/CHANGELOG.md index aed8136b7b..068c2be032 100644 --- a/plugins/signals-backend/CHANGELOG.md +++ b/plugins/signals-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-signals-backend +## 0.1.5 + +### Patch Changes + +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 6a576dc: Replace the usage of `getVoidLogger` with `mockServices.logger.mock` in order to remove the dependency with the soon-to-be-deprecated `backend-common` package. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-events-node@0.3.5 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.1.5-next.3 ### Patch Changes diff --git a/plugins/signals-backend/api-report.md b/plugins/signals-backend/api-report.md index d59ca8e5ad..b85bbc4c03 100644 --- a/plugins/signals-backend/api-report.md +++ b/plugins/signals-backend/api-report.md @@ -4,7 +4,7 @@ ```ts import { AuthService } from '@backstage/backend-plugin-api'; -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { EventsService } from '@backstage/plugin-events-node'; import express from 'express'; @@ -38,7 +38,7 @@ export interface RouterOptions { } // @public -const signalsPlugin: () => BackendFeature; +const signalsPlugin: BackendFeatureCompat; export default signalsPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/signals-backend/package.json b/plugins/signals-backend/package.json index 33fd9e5020..420a5f7a93 100644 --- a/plugins/signals-backend/package.json +++ b/plugins/signals-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals-backend", - "version": "0.1.5-next.3", + "version": "0.1.5", "backstage": { "role": "backend-plugin", "pluginId": "signals", diff --git a/plugins/signals-node/CHANGELOG.md b/plugins/signals-node/CHANGELOG.md index 3563cbd5e2..825a9f9e04 100644 --- a/plugins/signals-node/CHANGELOG.md +++ b/plugins/signals-node/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-signals-node +## 0.1.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-events-node@0.3.5 + - @backstage/config@1.2.0 + - @backstage/types@1.1.1 + ## 0.1.5-next.3 ### Patch Changes diff --git a/plugins/signals-node/package.json b/plugins/signals-node/package.json index eb40dc897a..3a000d8fdd 100644 --- a/plugins/signals-node/package.json +++ b/plugins/signals-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals-node", - "version": "0.1.5-next.3", + "version": "0.1.5", "description": "Node.js library for the signals plugin", "backstage": { "role": "node-library", diff --git a/plugins/signals-react/CHANGELOG.md b/plugins/signals-react/CHANGELOG.md index 12810ba0b0..7d2af3c4d6 100644 --- a/plugins/signals-react/CHANGELOG.md +++ b/plugins/signals-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-signals-react +## 0.0.4 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-plugin-api@1.9.3 + - @backstage/types@1.1.1 + ## 0.0.4-next.1 ### Patch Changes diff --git a/plugins/signals-react/package.json b/plugins/signals-react/package.json index 7ea1bbafcd..b970c8e5dd 100644 --- a/plugins/signals-react/package.json +++ b/plugins/signals-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals-react", - "version": "0.0.4-next.1", + "version": "0.0.4", "description": "Web library for the signals plugin", "backstage": { "role": "web-library", diff --git a/plugins/signals/CHANGELOG.md b/plugins/signals/CHANGELOG.md index 6c35f82895..406f2d5a2d 100644 --- a/plugins/signals/CHANGELOG.md +++ b/plugins/signals/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-signals +## 0.0.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/types@1.1.1 + ## 0.0.7-next.2 ### Patch Changes diff --git a/plugins/signals/package.json b/plugins/signals/package.json index c19f9cd3dc..bda5c4bcac 100644 --- a/plugins/signals/package.json +++ b/plugins/signals/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals", - "version": "0.0.7-next.2", + "version": "0.0.7", "backstage": { "role": "frontend-plugin", "pluginId": "signals", diff --git a/plugins/techdocs-addons-test-utils/CHANGELOG.md b/plugins/techdocs-addons-test-utils/CHANGELOG.md index 67c17b6e9d..323053ee29 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.33 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/plugin-techdocs@1.10.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-catalog@1.21.0 + - @backstage/core-app-api@1.12.6 + - @backstage/integration-react@1.1.28 + - @backstage/test-utils@1.5.6 + ## 1.0.33-next.2 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index b805b05ae7..e21b7efdab 100644 --- a/plugins/techdocs-addons-test-utils/package.json +++ b/plugins/techdocs-addons-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-addons-test-utils", - "version": "1.0.33-next.2", + "version": "1.0.33", "backstage": { "role": "web-library", "pluginId": "techdocs-addons", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 05d8f1fd46..2bfb317da5 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-techdocs-backend +## 1.10.6 + +### Patch Changes + +- e64bfb2: Allow defining custom build log transport for techdocs builder +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- 2110d76: Removed `dockerode` dependency. +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-techdocs-node@1.12.5 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.24 + - @backstage/plugin-permission-common@0.7.14 + - @backstage/plugin-catalog-common@1.0.24 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 1.10.6-next.3 ### Patch Changes diff --git a/plugins/techdocs-backend/api-report-alpha.md b/plugins/techdocs-backend/api-report-alpha.md index 311dafd9a8..241c1cdbd2 100644 --- a/plugins/techdocs-backend/api-report-alpha.md +++ b/plugins/techdocs-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const techdocsPlugin: () => BackendFeature; +const techdocsPlugin: BackendFeatureCompat; export default techdocsPlugin; // (No @packageDocumentation comment for this package) diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 1abf653784..081b8ab46d 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "1.10.6-next.3", + "version": "1.10.6", "description": "The Backstage backend plugin that renders technical documentation for your components", "backstage": { "role": "backend-plugin", @@ -69,7 +69,6 @@ "@backstage/plugin-search-backend-module-techdocs": "workspace:^", "@backstage/plugin-techdocs-node": "workspace:^", "@types/express": "^4.17.6", - "dockerode": "^4.0.0", "express": "^4.17.1", "express-promise-router": "^4.1.0", "fs-extra": "^11.2.0", @@ -83,7 +82,6 @@ "@backstage/backend-defaults": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", - "@types/dockerode": "^3.3.0", "msw": "^1.0.0", "supertest": "^6.1.3" }, diff --git a/plugins/techdocs-backend/src/plugin.ts b/plugins/techdocs-backend/src/plugin.ts index 094335a0f0..e3a0c60a15 100644 --- a/plugins/techdocs-backend/src/plugin.ts +++ b/plugins/techdocs-backend/src/plugin.ts @@ -16,7 +16,6 @@ import { cacheToPluginCacheManager, - DockerContainerRunner, loggerToWinstonLogger, } from '@backstage/backend-common'; import { @@ -36,7 +35,6 @@ import { techdocsGeneratorExtensionPoint, techdocsPreparerExtensionPoint, } from '@backstage/plugin-techdocs-node'; -import Docker from 'dockerode'; import { createRouter } from '@backstage/plugin-techdocs-backend'; import * as winston from 'winston'; @@ -118,14 +116,9 @@ export const techdocsPlugin = createBackendPlugin({ preparers.register(protocol, preparer); } - // Docker client (conditionally) used by the generators, based on techdocs.generators config. - const dockerClient = new Docker(); - const containerRunner = new DockerContainerRunner({ dockerClient }); - // Generators are used for generating documentation sites. const generators = await Generators.fromConfig(config, { logger: winstonLogger, - containerRunner, customGenerator: customTechdocsGenerator, }); diff --git a/plugins/techdocs-module-addons-contrib/CHANGELOG.md b/plugins/techdocs-module-addons-contrib/CHANGELOG.md index a5631f2492..50fc80dc51 100644 --- a/plugins/techdocs-module-addons-contrib/CHANGELOG.md +++ b/plugins/techdocs-module-addons-contrib/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-techdocs-module-addons-contrib +## 1.1.11 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/integration-react@1.1.28 + ## 1.1.11-next.2 ### Patch Changes diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index 1b456ec300..1bc6b81393 100644 --- a/plugins/techdocs-module-addons-contrib/package.json +++ b/plugins/techdocs-module-addons-contrib/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-module-addons-contrib", - "version": "1.1.11-next.2", + "version": "1.1.11", "description": "Plugin module for contributed TechDocs Addons", "backstage": { "role": "frontend-plugin-module", diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index 0c15e12faf..5eb1e136d5 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-techdocs-node +## 1.12.5 + +### Patch Changes + +- e64bfb2: Allow defining custom build log transport for techdocs builder +- 48c38f0: `TechdocsGenerator` won't require a `containerRunner` option anymore for generating TechDocs in docker. +- d44a20a: Added additional plugin metadata to `package.json`. +- 5db7536: Updated `getRepoUrlFromLocationAnnotation` to check for Harness SCM integration +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/integration@1.12.0 + - @backstage/plugin-search-common@1.2.12 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/integration-aws-node@0.1.12 + ## 1.12.5-next.3 ### Patch Changes diff --git a/plugins/techdocs-node/api-report.md b/plugins/techdocs-node/api-report.md index 2d3ca90983..3966b7d2d8 100644 --- a/plugins/techdocs-node/api-report.md +++ b/plugins/techdocs-node/api-report.md @@ -48,8 +48,8 @@ export type GeneratorBuilder = { // @public export type GeneratorOptions = { - containerRunner?: ContainerRunner; logger: Logger; + containerRunner?: ContainerRunner; }; // @public @@ -72,7 +72,7 @@ export class Generators implements GeneratorBuilder { config: Config, options: { logger: Logger; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; customGenerator?: TechdocsGenerator; }, ): Promise; diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index 7ef38c56ff..ea88766af8 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-node", - "version": "1.12.5-next.3", + "version": "1.12.5", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", "backstage": { "role": "node-library", @@ -64,6 +64,7 @@ "@smithy/node-http-handler": "^2.1.7", "@trendyol-js/openstack-swift-sdk": "^0.0.7", "@types/express": "^4.17.6", + "dockerode": "^4.0.0", "express": "^4.17.1", "fs-extra": "^11.2.0", "git-url-parse": "^14.0.0", diff --git a/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.test.ts b/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.test.ts new file mode 100644 index 0000000000..4a9e364af3 --- /dev/null +++ b/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.test.ts @@ -0,0 +1,218 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs-extra'; +import Stream, { PassThrough } from 'stream'; +import { DockerContainerRunner, UserOptions } from './DockerContainerRunner'; +import { createMockDirectory } from '@backstage/backend-test-utils'; + +const mockPull = jest.fn(); +const mockRun = jest.fn(); +const mockPing = jest.fn(); + +jest.mock( + 'dockerode', + () => + function MockDocker() { + return { + pull: mockPull, + run: mockRun, + ping: mockPing, + }; + }, +); + +describe('DockerContainerRunner', () => { + let containerTaskApi: DockerContainerRunner; + + const inputDir = createMockDirectory(); + const outputDir = createMockDirectory(); + + beforeEach(() => { + inputDir.clear(); + outputDir.clear(); + + mockPull.mockImplementation( + ( + _repoTag: string, + _options: {}, + callback: (error?: any, result?: any) => void, + ) => { + const mockStream = new PassThrough(); + callback(undefined, mockStream); + mockStream.end(); + }, + ); + mockRun.mockResolvedValue([{ Error: null, StatusCode: 0 }]); + mockPing.mockResolvedValue(Buffer.from('OK', 'utf-8')); + + containerTaskApi = new DockerContainerRunner(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + const imageName = 'dockerorg/image'; + const args = ['bash', '-c', 'echo test']; + const mountDirs = { + [inputDir.path]: '/input', + [outputDir.path]: '/output', + }; + const workingDir = inputDir.path; + const envVars = { HOME: '/tmp', LOG_LEVEL: 'debug' }; + const envVarsArray = ['HOME=/tmp', 'LOG_LEVEL=debug']; + + it('should pull the docker container', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + }); + + expect(mockPull).toHaveBeenCalledWith(imageName, {}, expect.any(Function)); + + expect(mockRun).toHaveBeenCalled(); + }); + + it('should not pull the docker container when pullImage is false', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + pullImage: false, + }); + + expect(mockPull).not.toHaveBeenCalled(); + expect(mockRun).toHaveBeenCalled(); + }); + + it('should call the dockerClient run command with the correct arguments passed through', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + mountDirs, + envVars, + workingDir, + }); + + expect(mockRun).toHaveBeenCalledWith( + imageName, + args, + expect.any(Stream), + expect.objectContaining({ + Env: envVarsArray, + WorkingDir: workingDir, + HostConfig: { + AutoRemove: true, + Binds: expect.arrayContaining([ + `${await fs.realpath(inputDir.path)}:/input`, + `${await fs.realpath(outputDir.path)}:/output`, + ]), + }, + Volumes: { + '/input': {}, + '/output': {}, + }, + }), + ); + }); + + it('should ping docker to test availability', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + }); + + expect(mockPing).toHaveBeenCalled(); + }); + + it('should pass through the user and group id from the host machine and set the home dir', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + }); + + const userOptions: UserOptions = {}; + if (process.getuid && process.getgid) { + userOptions.User = `${process.getuid()}:${process.getgid()}`; + } + + expect(mockRun).toHaveBeenCalledWith( + imageName, + args, + expect.any(Stream), + expect.objectContaining({ + ...userOptions, + }), + ); + }); + + it('throws a correct error if the command fails in docker', async () => { + mockRun.mockResolvedValueOnce([ + { + Error: new Error('Something went wrong with docker'), + StatusCode: 0, + }, + ]); + + await expect( + containerTaskApi.runContainer({ + imageName, + args, + }), + ).rejects.toThrow(/Something went wrong with docker/); + }); + + describe('where docker is unavailable', () => { + const dockerError = 'a docker error'; + + beforeEach(() => { + mockPing.mockImplementationOnce(() => { + throw new Error(dockerError); + }); + }); + + it('should throw with a descriptive error message including the docker error message', async () => { + await expect( + containerTaskApi.runContainer({ + imageName, + args, + }), + ).rejects.toThrow(new RegExp(`.+: ${dockerError}`)); + }); + }); + + it('should pass through the log stream to the docker client', async () => { + const logStream = new PassThrough(); + await containerTaskApi.runContainer({ + imageName, + args, + logStream, + }); + + expect(mockRun).toHaveBeenCalledWith( + imageName, + args, + logStream, + expect.objectContaining({ + HostConfig: { + AutoRemove: true, + Binds: [], + }, + Volumes: {}, + }), + ); + }); +}); diff --git a/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.ts b/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.ts new file mode 100644 index 0000000000..b7cb7f1c86 --- /dev/null +++ b/plugins/techdocs-node/src/stages/generate/DockerContainerRunner.ts @@ -0,0 +1,145 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Docker from 'dockerode'; +import fs from 'fs-extra'; +import { ForwardedError } from '@backstage/errors'; +import { PassThrough } from 'stream'; +import { pipeline as pipelineStream } from 'stream'; +import { promisify } from 'util'; +import { Writable } from 'stream'; + +const pipeline = promisify(pipelineStream); + +export type UserOptions = { + User?: string; +}; + +/** + * @internal + */ +export class DockerContainerRunner { + private readonly dockerClient: Docker; + + constructor() { + this.dockerClient = new Docker(); + } + + async runContainer(options: { + imageName: string; + command?: string | string[]; + args: string[]; + logStream?: Writable; + mountDirs?: Record; + workingDir?: string; + envVars?: Record; + pullImage?: boolean; + defaultUser?: boolean; + }) { + const { + imageName, + command, + args, + logStream = new PassThrough(), + mountDirs = {}, + workingDir, + envVars = {}, + pullImage = true, + defaultUser = false, + } = options; + + // Show a better error message when Docker is unavailable. + try { + await this.dockerClient.ping(); + } catch (e) { + throw new ForwardedError( + 'This operation requires Docker. Docker does not appear to be available. Docker.ping() failed with', + e, + ); + } + + if (pullImage) { + await new Promise((resolve, reject) => { + this.dockerClient.pull(imageName, {}, (err, stream) => { + if (err) { + reject(err); + return; + } + + pipeline(stream, logStream, { end: false }) + .then(resolve) + .catch(reject); + }); + }); + } + + const userOptions: UserOptions = {}; + if (!defaultUser && process.getuid && process.getgid) { + // Files that are created inside the Docker container will be owned by + // root on the host system on non Mac systems, because of reasons. Mainly the fact that + // volume sharing is done using NFS on Mac and actual mounts in Linux world. + // So we set the user in the container as the same user and group id as the host. + // On Windows we don't have process.getuid nor process.getgid + userOptions.User = `${process.getuid()}:${process.getgid()}`; + } + + // Initialize volumes to mount based on mountDirs map + const Volumes: { [T: string]: object } = {}; + for (const containerDir of Object.values(mountDirs)) { + Volumes[containerDir] = {}; + } + + // Create bind volumes + const Binds: string[] = []; + for (const [hostDir, containerDir] of Object.entries(mountDirs)) { + // Need to use realpath here as Docker mounting does not like + // symlinks for binding volumes + const realHostDir = await fs.realpath(hostDir); + Binds.push(`${realHostDir}:${containerDir}`); + } + + // Create docker environment variables array + const Env = []; + for (const [key, value] of Object.entries(envVars)) { + Env.push(`${key}=${value}`); + } + + const [{ Error: error, StatusCode: statusCode }] = + await this.dockerClient.run(imageName, args, logStream, { + Volumes, + HostConfig: { + AutoRemove: true, + Binds, + }, + ...(workingDir ? { WorkingDir: workingDir } : {}), + Entrypoint: command, + Env, + ...userOptions, + } as Docker.ContainerCreateOptions); + + if (error) { + throw new Error( + `Docker failed to run with the following error message: ${error}`, + ); + } + + if (statusCode !== 0) { + throw new Error( + `Docker container returned a non-zero exit code (${statusCode})`, + ); + } + } +} diff --git a/plugins/techdocs-node/src/stages/generate/generators.test.ts b/plugins/techdocs-node/src/stages/generate/generators.test.ts index 3e0571af54..f80f070796 100644 --- a/plugins/techdocs-node/src/stages/generate/generators.test.ts +++ b/plugins/techdocs-node/src/stages/generate/generators.test.ts @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - ContainerRunner, - loggerToWinstonLogger, -} from '@backstage/backend-common'; +import { loggerToWinstonLogger } from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { Generators } from './generators'; import { TechdocsGenerator } from './techdocs'; @@ -34,10 +31,6 @@ const mockEntity = { }; describe('generators', () => { - const containerRunner: jest.Mocked = { - runContainer: jest.fn(), - }; - it('should return error if no generator is registered', async () => { const generators = new Generators(); @@ -50,7 +43,6 @@ describe('generators', () => { const generators = new Generators(); const techdocs = TechdocsGenerator.fromConfig(new ConfigReader({}), { logger, - containerRunner, }); generators.register('techdocs', techdocs); diff --git a/plugins/techdocs-node/src/stages/generate/generators.ts b/plugins/techdocs-node/src/stages/generate/generators.ts index 603c714370..0c20ac1588 100644 --- a/plugins/techdocs-node/src/stages/generate/generators.ts +++ b/plugins/techdocs-node/src/stages/generate/generators.ts @@ -42,7 +42,7 @@ export class Generators implements GeneratorBuilder { config: Config, options: { logger: Logger; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; customGenerator?: TechdocsGenerator; }, ): Promise { diff --git a/plugins/techdocs-node/src/stages/generate/techdocs.ts b/plugins/techdocs-node/src/stages/generate/techdocs.ts index a5bd0fea09..599457ee5a 100644 --- a/plugins/techdocs-node/src/stages/generate/techdocs.ts +++ b/plugins/techdocs-node/src/stages/generate/techdocs.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { ContainerRunner } from '@backstage/backend-common'; import { Config } from '@backstage/config'; import path from 'path'; import { Logger } from 'winston'; @@ -43,6 +42,8 @@ import { GeneratorRunOptions, } from './types'; import { ForwardedError } from '@backstage/errors'; +import { DockerContainerRunner } from './DockerContainerRunner'; +import { ContainerRunner } from '@backstage/backend-common'; /** * Generates documentation files @@ -155,13 +156,10 @@ export class TechdocsGenerator implements GeneratorBase { `Successfully generated docs from ${inputDir} into ${outputDir} using local mkdocs`, ); break; - case 'docker': - if (this.containerRunner === undefined) { - throw new Error( - "Invalid state: containerRunner cannot be undefined when runIn is 'docker'", - ); - } - await this.containerRunner.runContainer({ + case 'docker': { + const containerRunner = + this.containerRunner || new DockerContainerRunner(); + await containerRunner.runContainer({ imageName: this.options.dockerImage ?? TechdocsGenerator.defaultDockerImage, args: ['build', '-d', '/output'], @@ -178,6 +176,7 @@ export class TechdocsGenerator implements GeneratorBase { `Successfully generated docs from ${inputDir} into ${outputDir} using techdocs-container`, ); break; + } default: throw new Error( `Invalid config value "${this.options.runIn}" provided in 'techdocs.generators.techdocs'.`, diff --git a/plugins/techdocs-node/src/stages/generate/types.ts b/plugins/techdocs-node/src/stages/generate/types.ts index 149c3c2195..ca816d560f 100644 --- a/plugins/techdocs-node/src/stages/generate/types.ts +++ b/plugins/techdocs-node/src/stages/generate/types.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { ContainerRunner } from '@backstage/backend-common'; import { Entity } from '@backstage/catalog-model'; import { Writable } from 'stream'; import { Logger } from 'winston'; import { ParsedLocationAnnotation } from '../../helpers'; +import { ContainerRunner } from '@backstage/backend-common'; // Determines where the generator will be run export type GeneratorRunInType = 'docker' | 'local'; @@ -28,8 +28,12 @@ export type GeneratorRunInType = 'docker' | 'local'; * @public */ export type GeneratorOptions = { - containerRunner?: ContainerRunner; logger: Logger; + /** + * @deprecated containerRunner is now instantiated in + * the generator and this option will be removed in the future + */ + containerRunner?: ContainerRunner; }; /** diff --git a/plugins/techdocs-react/CHANGELOG.md b/plugins/techdocs-react/CHANGELOG.md index 8a681308d5..19fce86d6f 100644 --- a/plugins/techdocs-react/CHANGELOG.md +++ b/plugins/techdocs-react/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-techdocs-react +## 1.2.5 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-plugin-api@1.9.3 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/version-bridge@1.0.8 + ## 1.2.5-next.2 ### Patch Changes diff --git a/plugins/techdocs-react/api-report.md b/plugins/techdocs-react/api-report.md index c158bbd81e..7d787c4da6 100644 --- a/plugins/techdocs-react/api-report.md +++ b/plugins/techdocs-react/api-report.md @@ -116,6 +116,8 @@ export type TechDocsReaderPageValue = { entityMetadata: AsyncState; shadowRoot?: ShadowRoot; setShadowRoot: Dispatch>; + shadowRootVersion: number; + incShadowRootVersion: () => void; title: string; setTitle: Dispatch>; subtitle: string; diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json index 233ec010bc..05bd66a014 100644 --- a/plugins/techdocs-react/package.json +++ b/plugins/techdocs-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-react", - "version": "1.2.5-next.2", + "version": "1.2.5", "description": "Shared frontend utilities for TechDocs and Addons", "backstage": { "role": "web-library", diff --git a/plugins/techdocs-react/src/context.tsx b/plugins/techdocs-react/src/context.tsx index 43fdada98e..2e7cd9586d 100644 --- a/plugins/techdocs-react/src/context.tsx +++ b/plugins/techdocs-react/src/context.tsx @@ -25,6 +25,7 @@ import React, { } from 'react'; import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import useAsyncRetry from 'react-use/esm/useAsyncRetry'; +import useCounter from 'react-use/esm/useCounter'; import { CompoundEntityRef, @@ -64,6 +65,8 @@ export type TechDocsReaderPageValue = { entityMetadata: AsyncState; shadowRoot?: ShadowRoot; setShadowRoot: Dispatch>; + shadowRootVersion: number; + incShadowRootVersion: () => void; title: string; setTitle: Dispatch>; subtitle: string; @@ -80,6 +83,8 @@ const defaultTechDocsReaderPageValue: TechDocsReaderPageValue = { setTitle: () => {}, setSubtitle: () => {}, setShadowRoot: () => {}, + shadowRootVersion: 0, + incShadowRootVersion: () => {}, metadata: { loading: true }, entityMetadata: { loading: true }, entityRef: { kind: '', name: '', namespace: '' }, @@ -134,6 +139,7 @@ export const TechDocsReaderPageProvider = memo( const [shadowRoot, setShadowRoot] = useState( defaultTechDocsReaderPageValue.shadowRoot, ); + const [shadowRootVersion, { inc: incShadowRootVersion }] = useCounter(0); useEffect(() => { if (shadowRoot && !metadata.value && !metadata.loading) { @@ -153,6 +159,8 @@ export const TechDocsReaderPageProvider = memo( entityMetadata, shadowRoot, setShadowRoot, + shadowRootVersion, + incShadowRootVersion, title, setTitle, subtitle, @@ -190,6 +198,5 @@ export const useTechDocsReaderPage = () => { if (context === undefined) { throw new Error('No context found for version 1.'); } - return context; }; diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 4065b4f341..3701cb652d 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/plugin-techdocs +## 1.10.6 + +### Patch Changes + +- 654af4a: mkdocs-material have updated their CSS variable template, and a few are unset in Backstage. This patch adds the missing variables to ensure coverage. +- cbebad1: Internal updates to allow reusing Backstage's `fetchApi` implementation for event source requests. This allows you to for example, override the `Authorization` header. +- 96cd13e: `TechDocsIndexPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`, exposing a new mode `` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog. +- e40bd9a: Fixed bug in `CopyToClipboardButton` component where positioning of the "Copy to clipboard" button in techdocs code snippets was broken in some cases. +- d44a20a: Added additional plugin metadata to `package.json`. +- 1256d88: Fixed an issue preventing the `TechDocsSearchBar` component from opening when clicking on the arrow icon. +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/integration@1.12.0 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-techdocs-react@1.2.5 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-search-common@1.2.12 + - @backstage/plugin-search-react@1.7.12 + - @backstage/plugin-auth-react@0.1.3 + - @backstage/integration-react@1.1.28 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/catalog-model@1.5.0 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + ## 1.10.6-next.2 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 2ec4ff38f0..194a8575d0 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs", - "version": "1.10.6-next.2", + "version": "1.10.6", "description": "The Backstage plugin that renders technical documentation for your components", "backstage": { "role": "frontend-plugin", diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx index 3692ed22d3..00df73cab3 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.tsx @@ -80,6 +80,7 @@ export const TechDocsReaderPageContent = withTechDocsReaderProvider( entityMetadata: { value: entityMetadata, loading: entityMetadataLoading }, entityRef, setShadowRoot, + incShadowRootVersion, } = useTechDocsReaderPage(); const dom = useTechDocsReaderDom(entityRef); const path = window.location.pathname; @@ -102,11 +103,12 @@ export const TechDocsReaderPageContent = withTechDocsReaderProvider( const handleAppend = useCallback( (newShadowRoot: ShadowRoot) => { setShadowRoot(newShadowRoot); + incShadowRootVersion(); if (onReady instanceof Function) { onReady(); } }, - [setShadowRoot, onReady], + [setShadowRoot, incShadowRootVersion, onReady], ); // No entity metadata = 404. Don't render content at all. diff --git a/plugins/user-settings-backend/CHANGELOG.md b/plugins/user-settings-backend/CHANGELOG.md index bddd6f9fb3..489315b458 100644 --- a/plugins/user-settings-backend/CHANGELOG.md +++ b/plugins/user-settings-backend/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-user-settings-backend +## 0.2.18 + +### Patch Changes + +- 8869b8e: Updated local development setup. +- 78a0b08: Internal refactor to handle `BackendFeature` contract change. +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions +- Updated dependencies + - @backstage/backend-common@0.23.0 + - @backstage/backend-plugin-api@0.6.19 + - @backstage/plugin-auth-node@0.4.14 + - @backstage/plugin-user-settings-common@0.0.1 + - @backstage/plugin-signals-node@0.1.5 + - @backstage/config@1.2.0 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.2.18-next.3 ### Patch Changes diff --git a/plugins/user-settings-backend/api-report-alpha.md b/plugins/user-settings-backend/api-report-alpha.md index aa6b246616..d4b15a5717 100644 --- a/plugins/user-settings-backend/api-report-alpha.md +++ b/plugins/user-settings-backend/api-report-alpha.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { BackendFeature } from '@backstage/backend-plugin-api'; +import { BackendFeatureCompat } from '@backstage/backend-plugin-api'; // @alpha -const _default: () => BackendFeature; +const _default: BackendFeatureCompat; export default _default; // (No @packageDocumentation comment for this package) diff --git a/plugins/user-settings-backend/package.json b/plugins/user-settings-backend/package.json index e08e63ad05..556b0d3e4a 100644 --- a/plugins/user-settings-backend/package.json +++ b/plugins/user-settings-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings-backend", - "version": "0.2.18-next.3", + "version": "0.2.18", "description": "The Backstage backend plugin to manage user settings", "backstage": { "role": "backend-plugin", diff --git a/plugins/user-settings-common/CHANGELOG.md b/plugins/user-settings-common/CHANGELOG.md index 768c2af894..652a308252 100644 --- a/plugins/user-settings-common/CHANGELOG.md +++ b/plugins/user-settings-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-user-settings-common +## 0.0.1 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions + ## 0.0.1-next.0 ### Patch Changes diff --git a/plugins/user-settings-common/package.json b/plugins/user-settings-common/package.json index f9a6b32d93..82c5db84f1 100644 --- a/plugins/user-settings-common/package.json +++ b/plugins/user-settings-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings-common", - "version": "0.0.1-next.0", + "version": "0.0.1", "description": "Common functionalities for the user-settings plugin", "backstage": { "role": "common-library", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index e373503785..bde8fa4408 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-user-settings +## 0.8.7 + +### Patch Changes + +- d44a20a: Added additional plugin metadata to `package.json`. +- e6ec179: Use signals to update user settings across sessions +- Updated dependencies + - @backstage/core-components@0.14.8 + - @backstage/core-compat-api@0.2.6 + - @backstage/core-plugin-api@1.9.3 + - @backstage/theme@0.5.6 + - @backstage/plugin-user-settings-common@0.0.1 + - @backstage/plugin-catalog-react@1.12.1 + - @backstage/plugin-signals-react@0.0.4 + - @backstage/core-app-api@1.12.6 + - @backstage/frontend-plugin-api@0.6.6 + - @backstage/errors@1.2.4 + - @backstage/types@1.1.1 + ## 0.8.7-next.2 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 1d2fd3131c..05d594d85e 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings", - "version": "0.8.7-next.2", + "version": "0.8.7", "description": "A Backstage plugin that provides a settings page", "backstage": { "role": "frontend-plugin", diff --git a/yarn.lock b/yarn.lock index 9513149eaa..7f0bd34e43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3457,6 +3457,7 @@ __metadata: resolution: "@backstage/backend-app-api@workspace:packages/backend-app-api" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-tasks": "workspace:^" "@backstage/backend-test-utils": "workspace:^" @@ -3496,6 +3497,7 @@ __metadata: minimist: ^1.2.5 morgan: ^1.10.0 msw: ^1.0.0 + node-fetch: ^2.6.7 node-forge: ^1.3.1 path-to-regexp: ^6.2.1 selfsigned: ^2.0.0 @@ -3546,7 +3548,10 @@ __metadata: "@types/fs-extra": ^11.0.0 "@types/http-errors": ^2.0.0 "@types/luxon": ^3.0.0 + "@types/morgan": ^1.9.0 + "@types/node-forge": ^1.3.0 "@types/pg": ^8.6.6 + "@types/stoppable": ^1.1.0 "@types/supertest": ^2.0.8 "@types/tar": ^6.1.1 "@types/webpack-env": ^1.15.2 @@ -3573,14 +3578,21 @@ __metadata: logform: ^2.3.2 luxon: ^3.0.0 minimatch: ^9.0.0 + minimist: ^1.2.5 + morgan: ^1.10.0 msw: ^1.0.0 mysql2: ^3.0.0 node-fetch: ^2.6.7 + node-forge: ^1.3.1 p-limit: ^3.1.0 + path-to-regexp: ^6.2.1 pg: ^8.11.3 raw-body: ^2.4.1 + selfsigned: ^2.0.0 + stoppable: ^1.1.0 supertest: ^6.1.3 tar: ^6.1.12 + triple-beam: ^1.4.1 uuid: ^9.0.0 winston: ^3.2.1 winston-transport: ^4.5.0 @@ -3605,47 +3617,76 @@ __metadata: "@aws-sdk/types": ^3.347.0 "@aws-sdk/util-stream-node": ^3.350.0 "@backstage/backend-app-api": "workspace:^" + "@backstage/backend-common": "workspace:^" "@backstage/backend-dev-utils": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" + "@backstage/cli-common": "workspace:^" "@backstage/config": "workspace:^" "@backstage/config-loader": "workspace:^" "@backstage/errors": "workspace:^" "@backstage/integration": "workspace:^" "@backstage/integration-aws-node": "workspace:^" + "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-events-node": "workspace:^" "@backstage/plugin-permission-node": "workspace:^" "@backstage/types": "workspace:^" "@google-cloud/storage": ^7.0.0 "@keyv/memcache": ^1.3.5 "@keyv/redis": ^2.5.3 + "@manypkg/get-packages": ^1.1.3 "@octokit/rest": ^19.0.3 "@opentelemetry/api": ^1.3.0 + "@types/cors": ^2.8.6 + "@types/express": ^4.17.6 + "@types/http-errors": ^2.0.0 + "@types/morgan": ^1.9.0 + "@types/node-forge": ^1.3.0 + "@types/stoppable": ^1.1.0 archiver: ^6.0.0 aws-sdk-client-mock: ^4.0.0 base64-stream: ^1.0.0 better-sqlite3: ^9.0.0 + compression: ^1.7.4 concat-stream: ^2.0.0 + cookie: ^0.6.0 + cors: ^2.8.5 cron: ^3.0.0 + express: ^4.17.1 + express-promise-router: ^4.1.0 fs-extra: ^11.2.0 git-url-parse: ^14.0.0 + helmet: ^6.0.0 + http-errors: ^2.0.0 isomorphic-git: ^1.23.0 + jose: ^5.0.0 keyv: ^4.5.2 knex: ^3.0.0 lodash: ^4.17.21 + logform: ^2.3.2 luxon: ^3.0.0 minimatch: ^9.0.0 + minimist: ^1.2.5 + morgan: ^1.10.0 msw: ^1.0.0 mysql2: ^3.0.0 node-fetch: ^2.6.7 + node-forge: ^1.3.1 p-limit: ^3.1.0 + path-to-regexp: ^6.2.1 pg: ^8.11.3 pg-connection-string: ^2.3.0 raw-body: ^2.4.1 + selfsigned: ^2.0.0 + stoppable: ^1.1.0 + supertest: ^6.1.3 tar: ^6.1.12 + triple-beam: ^1.4.1 uuid: ^9.0.0 wait-for-expect: ^3.0.2 + winston: ^3.2.1 + winston-transport: ^4.5.0 yauzl: ^3.0.0 yn: ^4.0.0 zod: ^3.22.4 @@ -3765,6 +3806,7 @@ __metadata: resolution: "@backstage/backend-test-utils@workspace:packages/backend-test-utils" dependencies: "@backstage/backend-app-api": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -3796,7 +3838,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/catalog-client@^1.6.5, @backstage/catalog-client@workspace:^, @backstage/catalog-client@workspace:packages/catalog-client": +"@backstage/catalog-client@workspace:^, @backstage/catalog-client@workspace:packages/catalog-client": version: 0.0.0-use.local resolution: "@backstage/catalog-client@workspace:packages/catalog-client" dependencies: @@ -3809,7 +3851,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/catalog-model@^1.4.3, @backstage/catalog-model@^1.4.5, @backstage/catalog-model@^1.5.0, @backstage/catalog-model@workspace:^, @backstage/catalog-model@workspace:packages/catalog-model": +"@backstage/catalog-model@^1.4.3, @backstage/catalog-model@^1.4.5, @backstage/catalog-model@workspace:^, @backstage/catalog-model@workspace:packages/catalog-model": version: 0.0.0-use.local resolution: "@backstage/catalog-model@workspace:packages/catalog-model" dependencies: @@ -3989,7 +4031,7 @@ __metadata: util: ^0.12.3 vite: ^4.4.9 vite-plugin-html: ^3.2.0 - vite-plugin-node-polyfills: ^0.21.0 + vite-plugin-node-polyfills: ^0.22.0 webpack: ^5.70.0 webpack-dev-server: ^5.0.0 webpack-node-externals: ^3.0.0 @@ -4001,7 +4043,7 @@ __metadata: "@vitejs/plugin-react": ^4.0.4 vite: ^4.4.9 vite-plugin-html: ^3.2.0 - vite-plugin-node-polyfills: ^0.21.0 + vite-plugin-node-polyfills: ^0.22.0 peerDependenciesMeta: "@vitejs/plugin-react": optional: true @@ -4061,7 +4103,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/config@^1.1.1, @backstage/config@^1.2.0, @backstage/config@workspace:^, @backstage/config@workspace:packages/config": +"@backstage/config@^1.1.1, @backstage/config@workspace:^, @backstage/config@workspace:packages/config": version: 0.0.0-use.local resolution: "@backstage/config@workspace:packages/config" dependencies: @@ -4133,107 +4175,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/core-components@npm:^0.13.10": - version: 0.13.10 - resolution: "@backstage/core-components@npm:0.13.10" - dependencies: - "@backstage/config": ^1.1.1 - "@backstage/core-plugin-api": ^1.8.2 - "@backstage/errors": ^1.2.3 - "@backstage/theme": ^0.5.0 - "@backstage/version-bridge": ^1.0.7 - "@date-io/core": ^1.3.13 - "@material-table/core": ^3.1.0 - "@material-ui/core": ^4.12.2 - "@material-ui/icons": ^4.9.1 - "@material-ui/lab": 4.0.0-alpha.61 - "@react-hookz/web": ^23.0.0 - "@types/react": ^16.13.1 || ^17.0.0 - "@types/react-sparklines": ^1.7.0 - "@types/react-text-truncate": ^0.14.0 - ansi-regex: ^6.0.1 - classnames: ^2.2.6 - d3-selection: ^3.0.0 - d3-shape: ^3.0.0 - d3-zoom: ^3.0.0 - dagre: ^0.8.5 - linkify-react: 4.1.3 - linkifyjs: 4.1.3 - lodash: ^4.17.21 - pluralize: ^8.0.0 - qs: ^6.9.4 - rc-progress: 3.5.1 - react-helmet: 6.1.0 - react-hook-form: ^7.12.2 - react-idle-timer: 5.6.2 - react-markdown: ^8.0.0 - react-sparklines: ^1.7.0 - react-syntax-highlighter: ^15.4.5 - react-text-truncate: ^0.19.0 - react-use: ^17.3.2 - react-virtualized-auto-sizer: ^1.0.11 - react-window: ^1.8.6 - remark-gfm: ^3.0.1 - zen-observable: ^0.10.0 - zod: ^3.22.4 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: ec2a0d0a27bc4d6b9d4da97f0b4df600148529ee51bf2c8e7d3adc45c3950adac662535d3beabc451db346f2c7e3c412ceaa756fc774012b43dff5e2695f2271 - languageName: node - linkType: hard - -"@backstage/core-components@npm:^0.14.4, @backstage/core-components@npm:^0.14.7": - version: 0.14.7 - resolution: "@backstage/core-components@npm:0.14.7" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/errors": ^1.2.4 - "@backstage/theme": ^0.5.4 - "@backstage/version-bridge": ^1.0.8 - "@date-io/core": ^1.3.13 - "@material-table/core": ^3.1.0 - "@material-ui/core": ^4.12.2 - "@material-ui/icons": ^4.9.1 - "@material-ui/lab": 4.0.0-alpha.61 - "@react-hookz/web": ^24.0.0 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - "@types/react-sparklines": ^1.7.0 - ansi-regex: ^6.0.1 - classnames: ^2.2.6 - d3-selection: ^3.0.0 - d3-shape: ^3.0.0 - d3-zoom: ^3.0.0 - dagre: ^0.8.5 - linkify-react: 4.1.3 - linkifyjs: 4.1.3 - lodash: ^4.17.21 - pluralize: ^8.0.0 - qs: ^6.9.4 - rc-progress: 3.5.1 - react-helmet: 6.1.0 - react-hook-form: ^7.12.2 - react-idle-timer: 5.7.2 - react-markdown: ^8.0.0 - react-sparklines: ^1.7.0 - react-syntax-highlighter: ^15.4.5 - react-use: ^17.3.2 - react-virtualized-auto-sizer: ^1.0.11 - react-window: ^1.8.6 - remark-gfm: ^3.0.1 - zen-observable: ^0.10.0 - zod: ^3.22.4 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: e3906347c197d741dbff24d20af5cd0117e4bf1667c34a4a3a70d8c0f3c0c92bd768b53c417ca78f8b87560a3623f497938f531be86c8727f83822a11e9aa4e5 - languageName: node - linkType: hard - -"@backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": +"@backstage/core-components@^0.14.4, @backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": version: 0.0.0-use.local resolution: "@backstage/core-components@workspace:packages/core-components" dependencies: @@ -4304,25 +4246,58 @@ __metadata: languageName: unknown linkType: soft -"@backstage/core-plugin-api@npm:^1.8.2, @backstage/core-plugin-api@npm:^1.9.2": - version: 1.9.2 - resolution: "@backstage/core-plugin-api@npm:1.9.2" +"@backstage/core-components@npm:^0.13.10": + version: 0.13.10 + resolution: "@backstage/core-components@npm:0.13.10" dependencies: - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - "@backstage/version-bridge": ^1.0.8 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - history: ^5.0.0 + "@backstage/config": ^1.1.1 + "@backstage/core-plugin-api": ^1.8.2 + "@backstage/errors": ^1.2.3 + "@backstage/theme": ^0.5.0 + "@backstage/version-bridge": ^1.0.7 + "@date-io/core": ^1.3.13 + "@material-table/core": ^3.1.0 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.61 + "@react-hookz/web": ^23.0.0 + "@types/react": ^16.13.1 || ^17.0.0 + "@types/react-sparklines": ^1.7.0 + "@types/react-text-truncate": ^0.14.0 + ansi-regex: ^6.0.1 + classnames: ^2.2.6 + d3-selection: ^3.0.0 + d3-shape: ^3.0.0 + d3-zoom: ^3.0.0 + dagre: ^0.8.5 + linkify-react: 4.1.3 + linkifyjs: 4.1.3 + lodash: ^4.17.21 + pluralize: ^8.0.0 + qs: ^6.9.4 + rc-progress: 3.5.1 + react-helmet: 6.1.0 + react-hook-form: ^7.12.2 + react-idle-timer: 5.6.2 + react-markdown: ^8.0.0 + react-sparklines: ^1.7.0 + react-syntax-highlighter: ^15.4.5 + react-text-truncate: ^0.19.0 + react-use: ^17.3.2 + react-virtualized-auto-sizer: ^1.0.11 + react-window: ^1.8.6 + remark-gfm: ^3.0.1 + zen-observable: ^0.10.0 + zod: ^3.22.4 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: 2df505c14853b3b35b8644d66f3e58d235bc6ee7f7b81785ec163aa9f089fc03a6c03e3b191d001b247f19d97063e02e585d67661720a8b6a13ab67a2403c218 + checksum: ec2a0d0a27bc4d6b9d4da97f0b4df600148529ee51bf2c8e7d3adc45c3950adac662535d3beabc451db346f2c7e3c412ceaa756fc774012b43dff5e2695f2271 languageName: node linkType: hard -"@backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": +"@backstage/core-plugin-api@^1.8.2, @backstage/core-plugin-api@^1.9.2, @backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": version: 0.0.0-use.local resolution: "@backstage/core-plugin-api@workspace:packages/core-plugin-api" dependencies: @@ -4469,26 +4444,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/frontend-plugin-api@npm:^0.6.5": - version: 0.6.5 - resolution: "@backstage/frontend-plugin-api@npm:0.6.5" - dependencies: - "@backstage/core-components": ^0.14.7 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/types": ^1.1.1 - "@backstage/version-bridge": ^1.0.8 - "@material-ui/core": ^4.12.4 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - lodash: ^4.17.21 - zod: ^3.22.4 - zod-to-json-schema: ^3.21.4 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: be880b5a3bb86d4e2c32a90ca64265b529901dabcdcbf5a87b5cbdfd68fc347297359550da195034e671e074db9db7c659d663d4fd46ed3836896bd1878fae2f - languageName: node - linkType: hard - "@backstage/frontend-plugin-api@workspace:^, @backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api": version: 0.0.0-use.local resolution: "@backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api" @@ -4552,24 +4507,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/integration-react@npm:^1.1.27": - version: 1.1.27 - resolution: "@backstage/integration-react@npm:1.1.27" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/integration": ^1.11.0 - "@material-ui/core": ^4.12.2 - "@material-ui/icons": ^4.9.1 - "@types/react": ^16.13.1 || ^17.0.0 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: 136bdfeb7c4ba91eb2405a82ae99fd5d935056d7fe77064bf799a8d375a2b5c645e0df7deaee7e1e0ad6fb48dcac94c82e4b29e3d3a00f80555116b1902102b2 - languageName: node - linkType: hard - "@backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": version: 0.0.0-use.local resolution: "@backstage/integration-react@workspace:packages/integration-react" @@ -4594,23 +4531,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/integration@npm:^1.11.0": - version: 1.11.0 - resolution: "@backstage/integration@npm:1.11.0" - dependencies: - "@azure/identity": ^4.0.0 - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@octokit/auth-app": ^4.0.0 - "@octokit/rest": ^19.0.3 - cross-fetch: ^4.0.0 - git-url-parse: ^14.0.0 - lodash: ^4.17.21 - luxon: ^3.0.0 - checksum: 57ea46e57da004cdab41e82f558105f78f84f65d58163e93363dc775d42ab29401d3a38390ace012bf388eec57350d432a415d8fed27e57419e21522044fcc33 - languageName: node - linkType: hard - "@backstage/integration@workspace:^, @backstage/integration@workspace:packages/integration": version: 0.0.0-use.local resolution: "@backstage/integration@workspace:packages/integration" @@ -5683,18 +5603,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-common@npm:^1.0.20, @backstage/plugin-catalog-common@npm:^1.0.23": - version: 1.0.23 - resolution: "@backstage/plugin-catalog-common@npm:1.0.23" - dependencies: - "@backstage/catalog-model": ^1.5.0 - "@backstage/plugin-permission-common": ^0.7.13 - "@backstage/plugin-search-common": ^1.2.11 - checksum: 071456b301689b9b349bdb1bea0d81cc41b0e8055e68096655a0abd198ea21afdc27bda7135d5c800ba8074fbc20d2d8d3a2244578fa8f6547205bee57c31c3d - languageName: node - linkType: hard - -"@backstage/plugin-catalog-common@workspace:^, @backstage/plugin-catalog-common@workspace:plugins/catalog-common": +"@backstage/plugin-catalog-common@^1.0.20, @backstage/plugin-catalog-common@workspace:^, @backstage/plugin-catalog-common@workspace:plugins/catalog-common": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-common@workspace:plugins/catalog-common" dependencies: @@ -5803,43 +5712,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-react@npm:^1.11.3, @backstage/plugin-catalog-react@npm:^1.9.3": - version: 1.12.0 - resolution: "@backstage/plugin-catalog-react@npm:1.12.0" - dependencies: - "@backstage/catalog-client": ^1.6.5 - "@backstage/catalog-model": ^1.5.0 - "@backstage/core-components": ^0.14.7 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/errors": ^1.2.4 - "@backstage/frontend-plugin-api": ^0.6.5 - "@backstage/integration-react": ^1.1.27 - "@backstage/plugin-catalog-common": ^1.0.23 - "@backstage/plugin-permission-common": ^0.7.13 - "@backstage/plugin-permission-react": ^0.4.22 - "@backstage/types": ^1.1.1 - "@backstage/version-bridge": ^1.0.8 - "@material-ui/core": ^4.12.2 - "@material-ui/icons": ^4.9.1 - "@material-ui/lab": 4.0.0-alpha.61 - "@react-hookz/web": ^24.0.0 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - classnames: ^2.2.6 - lodash: ^4.17.21 - material-ui-popup-state: ^1.9.3 - qs: ^6.9.4 - react-use: ^17.2.4 - yaml: ^2.0.0 - zen-observable: ^0.10.0 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: 8079c6c1f4c5b07df5cfb2873f4c3ba16759a3a1ac36a1e1ff61fb428cece5baca40b5c2bc41a2d402ad9a60e73fd545c0a95eec274189423f40a04551a5f337 - languageName: node - linkType: hard - -"@backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": +"@backstage/plugin-catalog-react@^1.11.3, @backstage/plugin-catalog-react@^1.9.3, @backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-react@workspace:plugins/catalog-react" dependencies: @@ -6682,20 +6555,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-common@npm:^0.7.13": - version: 0.7.13 - resolution: "@backstage/plugin-permission-common@npm:0.7.13" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - cross-fetch: ^4.0.0 - uuid: ^9.0.0 - zod: ^3.22.4 - checksum: 3abea60e1016d352b99700d331af39b8c2b6f84ce7e19e02026f909e53a709b23c1ac9fadc591658252c458bb4d381545574ca66374db0912efe6640c8d58020 - languageName: node - linkType: hard - "@backstage/plugin-permission-common@workspace:^, @backstage/plugin-permission-common@workspace:plugins/permission-common": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-common@workspace:plugins/permission-common" @@ -6734,23 +6593,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-react@npm:^0.4.22": - version: 0.4.22 - resolution: "@backstage/plugin-permission-react@npm:0.4.22" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/plugin-permission-common": ^0.7.13 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - swr: ^2.0.0 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: c91ad5a336358ae3a2e6030e7ea7a8584735544a14aa6ada061ca0c01ee32b2e16bd2fe24c9327cbdb959eec185bac045b1211b0a03a5c9d45b350f0a6c031ca - languageName: node - linkType: hard - "@backstage/plugin-permission-react@workspace:^, @backstage/plugin-permission-react@workspace:plugins/permission-react": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-react@workspace:plugins/permission-react" @@ -7499,16 +7341,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-search-common@npm:^1.2.11": - version: 1.2.11 - resolution: "@backstage/plugin-search-common@npm:1.2.11" - dependencies: - "@backstage/plugin-permission-common": ^0.7.13 - "@backstage/types": ^1.1.1 - checksum: 861ba64fd733511bad58d2b3f6b2af60426d71b8e8d74838b85a15a5870d54c0de984681a33f5adb8e97284da9167655982bcf5e543436d0f4160a2c0cbece1f - languageName: node - linkType: hard - "@backstage/plugin-search-common@workspace:^, @backstage/plugin-search-common@workspace:plugins/search-common": version: 0.0.0-use.local resolution: "@backstage/plugin-search-common@workspace:plugins/search-common" @@ -7727,9 +7559,7 @@ __metadata: "@backstage/plugin-permission-common": "workspace:^" "@backstage/plugin-search-backend-module-techdocs": "workspace:^" "@backstage/plugin-techdocs-node": "workspace:^" - "@types/dockerode": ^3.3.0 "@types/express": ^4.17.6 - dockerode: ^4.0.0 express: ^4.17.1 express-promise-router: ^4.1.0 fs-extra: ^11.2.0 @@ -7801,6 +7631,7 @@ __metadata: "@types/recursive-readdir": ^2.2.0 "@types/supertest": ^2.0.8 aws-sdk-client-mock: ^4.0.0 + dockerode: ^4.0.0 express: ^4.17.1 fs-extra: ^11.2.0 git-url-parse: ^14.0.0 @@ -8060,23 +7891,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/theme@npm:^0.5.0, @backstage/theme@npm:^0.5.4": - version: 0.5.5 - resolution: "@backstage/theme@npm:0.5.5" - dependencies: - "@emotion/react": ^11.10.5 - "@emotion/styled": ^11.10.5 - "@mui/material": ^5.12.2 - peerDependencies: - "@material-ui/core": ^4.12.2 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - checksum: a5ba7b39d41773a4a73a07d1a9a6bcf0815835a196a31c1ec1d5eac61ec801bfe875f31823a6ae6aa5033b21bd04b4fa692fd3fddc71a12e2126b1d222738b34 - languageName: node - linkType: hard - -"@backstage/theme@workspace:^, @backstage/theme@workspace:packages/theme": +"@backstage/theme@^0.5.0, @backstage/theme@workspace:^, @backstage/theme@workspace:packages/theme": version: 0.0.0-use.local resolution: "@backstage/theme@workspace:packages/theme" dependencies: @@ -8107,7 +7922,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/version-bridge@^1.0.7, @backstage/version-bridge@^1.0.8, @backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": +"@backstage/version-bridge@^1.0.7, @backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": version: 0.0.0-use.local resolution: "@backstage/version-bridge@workspace:packages/version-bridge" dependencies: @@ -16600,21 +16415,19 @@ __metadata: version: 0.0.0-use.local resolution: "@techdocs/cli@workspace:packages/techdocs-cli" dependencies: - "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/cli-common": "workspace:^" "@backstage/config": "workspace:^" "@backstage/plugin-techdocs-node": "workspace:^" "@types/commander": ^2.12.2 - "@types/dockerode": ^3.3.0 "@types/fs-extra": ^11.0.0 "@types/http-proxy": ^1.17.4 "@types/node": ^18.17.8 "@types/serve-handler": ^6.1.0 "@types/webpack-env": ^1.15.3 commander: ^12.0.0 - dockerode: ^4.0.0 find-process: ^1.4.5 fs-extra: ^11.0.0 global-agent: ^3.0.0 @@ -17360,6 +17173,13 @@ __metadata: languageName: node linkType: hard +"@types/global-agent@npm:^2.1.3": + version: 2.1.3 + resolution: "@types/global-agent@npm:2.1.3" + checksum: 6129b6d5ba871b9d111ddf91e6f9a1725d3f28bf2aa6869ec83bebd14c688cde4275ebea6fa45b0b1c00d78109d022c935f952e9e4876d76289d4706484776c3 + languageName: node + linkType: hard + "@types/google-protobuf@npm:^3.7.2": version: 3.15.12 resolution: "@types/google-protobuf@npm:3.15.12" @@ -26364,7 +26184,7 @@ __metadata: react-use: ^17.2.4 vite: ^4.4.9 vite-plugin-html: ^3.2.0 - vite-plugin-node-polyfills: ^0.21.0 + vite-plugin-node-polyfills: ^0.22.0 zen-observable: ^0.10.0 languageName: unknown linkType: soft @@ -26438,7 +26258,7 @@ __metadata: react-use: ^17.2.4 vite: ^4.4.9 vite-plugin-html: ^3.2.0 - vite-plugin-node-polyfills: ^0.21.0 + vite-plugin-node-polyfills: ^0.22.0 zen-observable: ^0.10.0 languageName: unknown linkType: soft @@ -27056,15 +26876,6 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: ^4.0.0 - checksum: f67802d3334809048c69b3d458f672e1b6d26daefda701761c81f203b80149c35dea04d78ea4238969dd617678e530876722a0634c43031a0957f10cc3ed190f - languageName: node - linkType: hard - "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -27262,16 +27073,6 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: ^3.2.9 - keyv: ^4.5.4 - checksum: 899fc86bf6df093547d76e7bfaeb900824b869d7d457d02e9b8aae24836f0a99fbad79328cfd6415ee8908f180699bf259dc7614f793447cb14f707caf5996f6 - languageName: node - linkType: hard - "flatstr@npm:^1.0.12": version: 1.0.12 resolution: "flatstr@npm:1.0.12" @@ -27279,7 +27080,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:3.3.1, flatted@npm:^3.1.0, flatted@npm:^3.2.9": +"flatted@npm:3.3.1, flatted@npm:^3.1.0": version: 3.3.1 resolution: "flatted@npm:3.3.1" checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 @@ -31497,7 +31298,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.2, json5@npm:^2.1.3, json5@npm:^2.2.3": +"json5@npm:^2.1.2, json5@npm:^2.1.3, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -31802,7 +31603,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:*, keyv@npm:^4.0.0, keyv@npm:^4.5.2, keyv@npm:^4.5.4": +"keyv@npm:*, keyv@npm:^4.0.0, keyv@npm:^4.5.2": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -31881,15 +31682,14 @@ __metadata: linkType: hard "knip@npm:^5.0.0": - version: 5.19.0 - resolution: "knip@npm:5.19.0" + version: 5.22.2 + resolution: "knip@npm:5.22.2" dependencies: "@ericcornelissen/bash-parser": 0.5.3 "@nodelib/fs.walk": 2.0.0 "@snyk/github-codeowners": 1.1.0 easy-table: 1.2.0 fast-glob: ^3.3.2 - file-entry-cache: 8.0.0 jiti: ^1.21.0 js-yaml: ^4.1.0 minimist: ^1.2.8 @@ -31900,6 +31700,7 @@ __metadata: smol-toml: ^1.1.4 strip-json-comments: 5.0.1 summary: 2.1.0 + tsconfig-paths: ^4.2.0 zod: ^3.22.4 zod-validation-error: ^3.0.3 peerDependencies: @@ -31908,7 +31709,7 @@ __metadata: bin: knip: bin/knip.js knip-bun: bin/knip-bun.js - checksum: de4c564e1242fff2d005ee5626c509b8ccf3b0b7e2402766363ac193b607d5742e7a336e321b964c38c143832839b3e361ef6cb8d83add7163ee48902dd6995c + checksum: 995924973618391af39ba6bfb324f1f4dac427879a944eeecbcf48b61ec165f10f18196f27a7d079076f351223ed067bb917bc863e0424153c3fae2dd65582d6 languageName: node linkType: hard @@ -39582,6 +39383,7 @@ __metadata: "@spotify/eslint-plugin": ^15.0.0 "@spotify/prettier-config": ^15.0.0 "@techdocs/cli": "workspace:*" + "@types/global-agent": ^2.1.3 "@types/node": ^18.17.8 "@types/webpack": ^5.28.0 "@useoptic/optic": ^0.50.10 @@ -42495,6 +42297,17 @@ __metadata: languageName: node linkType: hard +"tsconfig-paths@npm:^4.2.0": + version: 4.2.0 + resolution: "tsconfig-paths@npm:4.2.0" + dependencies: + json5: ^2.2.2 + minimist: ^1.2.6 + strip-bom: ^3.0.0 + checksum: 28c5f7bbbcabc9dabd4117e8fdc61483f6872a1c6b02a4b1c4d68c5b79d06896c3cc9547610c4c3ba64658531caa2de13ead1ea1bf321c7b53e969c4752b98c7 + languageName: node + linkType: hard + "tslib@npm:2.6.2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:^2.4.1 || ^1.9.3, tslib@npm:^2.5.0, tslib@npm:^2.6.0, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" @@ -43753,15 +43566,15 @@ __metadata: languageName: node linkType: hard -"vite-plugin-node-polyfills@npm:^0.21.0": - version: 0.21.0 - resolution: "vite-plugin-node-polyfills@npm:0.21.0" +"vite-plugin-node-polyfills@npm:^0.22.0": + version: 0.22.0 + resolution: "vite-plugin-node-polyfills@npm:0.22.0" dependencies: "@rollup/plugin-inject": ^5.0.5 node-stdlib-browser: ^1.2.0 peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 - checksum: 923379f0205911d13ffdcdc841a6565a191a6fe199eb7c0d38b6ea1f53bbdf3d42ad12a9ae8d5f49c14e3f4e2cb56fc7ea8c24a51eeedfbe64c6ebbca4a2966a + checksum: c08d3df0d5cc3102280483d3f7b216f92a18e0708fcb9f67f78f01ab865474254756bacee17caa90b3f46afe5834cb9d8de0dd0e58c1bbbdae1b949edc1e6b57 languageName: node linkType: hard @@ -44429,8 +44242,8 @@ __metadata: linkType: hard "ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.14.2, ws@npm:^8.16.0, ws@npm:^8.17.0, ws@npm:^8.8.0": - version: 8.17.0 - resolution: "ws@npm:8.17.0" + version: 8.17.1 + resolution: "ws@npm:8.17.1" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -44439,7 +44252,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 147ef9eab0251364e1d2c55338ad0efb15e6913923ccbfdf20f7a8a6cb8f88432bcd7f4d8f66977135bfad35575644f9983201c1a361019594a4e53977bf6d4e + checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf languageName: node linkType: hard @@ -44459,8 +44272,8 @@ __metadata: linkType: hard "ws@npm:^7, ws@npm:^7.4.6, ws@npm:^7.5.5": - version: 7.5.9 - resolution: "ws@npm:7.5.9" + version: 7.5.10 + resolution: "ws@npm:7.5.10" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -44469,7 +44282,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + checksum: f9bb062abf54cc8f02d94ca86dcd349c3945d63851f5d07a3a61c2fcb755b15a88e943a63cf580cbdb5b74436d67ef6b67f745b8f7c0814e411379138e1863cb languageName: node linkType: hard