diff --git a/.changeset/petite-candies-tan.md b/.changeset/petite-candies-tan.md index e5a65f8066..6ec5c9c813 100644 --- a/.changeset/petite-candies-tan.md +++ b/.changeset/petite-candies-tan.md @@ -4,18 +4,18 @@ Added a new optional `info` option to `createFrontendPlugin` that lets you provide a loaders for different sources of metadata information about the plugin. -There are two available loaders. The first one is `info.packageJson`, which can be used to point to a `package.json` file for the plugin.This is recommended for any plugin that is defined within its own package, especially all plugins that are published to a package registry. Typical usage looks like this: +There are two available loaders. The first one is `info.packageJson`, which can be used to point to a `package.json` file for the plugin. This is recommended for any plugin that is defined within its own package, especially all plugins that are published to a package registry. Typical usage looks like this: ```ts export default createFrontendPlugin({ pluginId: '...', info: { - info: { packageJson: () => import('../package.json') }, + packageJson: () => import('../package.json'), }, }); ``` -The second loader is `info.manifest`, which can be used to point to an opaque plugin manifest. This **MUST ONLY** be used by plugins that intended for use within a single organization. Plugins that are published to an open package registry should **NOT** use this loader. The loader is useful to add additional internal metadata associated with the plugin, and it is up to the Backstage app to decide how these manifests are parsed and used. The default manifest parser in an app created with `createApp` from `@backstage/frontend-defaults` is able to parse the default `catalog-info.yaml` format and built-in fields such as `spec.owner`. +The second loader is `info.manifest`, which can be used to point to an opaque plugin manifest. This **MUST ONLY** be used by plugins that are intended for use within a single organization. Plugins that are published to an open package registry should **NOT** use this loader. The loader is useful for adding additional internal metadata associated with the plugin, and it is up to the Backstage app to decide how these manifests are parsed and used. The default manifest parser in an app created with `createApp` from `@backstage/frontend-defaults` is able to parse the default `catalog-info.yaml` format and built-in fields such as `spec.owner`. Typical usage looks like this: diff --git a/.changeset/stupid-flies-speak.md b/.changeset/stupid-flies-speak.md index cad07ae611..5156a5b8b6 100644 --- a/.changeset/stupid-flies-speak.md +++ b/.changeset/stupid-flies-speak.md @@ -2,4 +2,4 @@ '@backstage/frontend-app-api': patch --- -Implemented support for the `plugin.info()` method in specialized apps with a default resolved for `package.json` and `catalog-info.yaml`. The default resolution logic can be overriden via the `pluginInfoResolver` option to `createSpecializedApp`, and plugin-specific overrides can be applied via the new `app.pluginOverrides` key in static configuration. +Implemented support for the `plugin.info()` method in specialized apps with a default resolved for `package.json` and `catalog-info.yaml`. The default resolution logic can be overridden via the `pluginInfoResolver` option to `createSpecializedApp`, and plugin-specific overrides can be applied via the new `app.pluginOverrides` key in static configuration. diff --git a/packages/frontend-app-api/src/wiring/createPluginInfoAttacher.ts b/packages/frontend-app-api/src/wiring/createPluginInfoAttacher.ts index 27a6ca73ac..2b6f3a57f7 100644 --- a/packages/frontend-app-api/src/wiring/createPluginInfoAttacher.ts +++ b/packages/frontend-app-api/src/wiring/createPluginInfoAttacher.ts @@ -90,7 +90,7 @@ function normalizePluginInfo(info: FrontendPluginInfo) { ownerEntityRefs: info.ownerEntityRefs?.map(ref => stringifyEntityRef( parseEntityRef(ref, { - defaultKind: 'group', + defaultKind: 'Group', }), ), ), @@ -161,7 +161,7 @@ function resolveManifestInfo(manifest?: JsonValue) { info.ownerEntityRefs = [ stringifyEntityRef( parseEntityRef(manifest.spec.owner, { - defaultKind: 'group', + defaultKind: 'Group', defaultNamespace: manifest.metadata.namespace?.toString(), }), ), diff --git a/packages/frontend-defaults/report.api.md b/packages/frontend-defaults/report.api.md index 600f0a27de..72f212b3b1 100644 --- a/packages/frontend-defaults/report.api.md +++ b/packages/frontend-defaults/report.api.md @@ -9,8 +9,8 @@ import { CreateAppRouteBinder } from '@backstage/frontend-app-api'; import { ExtensionFactoryMiddleware } from '@backstage/frontend-plugin-api'; import { FrontendFeature } from '@backstage/frontend-plugin-api'; import { FrontendFeatureLoader } from '@backstage/frontend-plugin-api'; -import { JSX as JSX_2 } from 'react'; import { FrontendPluginInfoResolver } from '@backstage/frontend-app-api'; +import { JSX as JSX_2 } from 'react'; import { ReactNode } from 'react'; // @public