Merge pull request #32527 from backstage/rugvip/pluginId

frontend-plugin-api: plugins now have pluginId
This commit is contained in:
Patrik Oldsberg
2026-01-27 13:10:59 +01:00
committed by GitHub
12 changed files with 51 additions and 15 deletions
+2 -1
View File
@@ -1383,9 +1383,10 @@ export interface FrontendPlugin<
readonly $$type: '@backstage/FrontendPlugin';
// (undocumented)
readonly externalRoutes: TExternalRoutes;
// (undocumented)
// @deprecated
readonly id: string;
info(): Promise<FrontendPluginInfo>;
readonly pluginId: string;
// (undocumented)
readonly routes: TRoutes;
}
@@ -90,7 +90,7 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
);
const plugin = node.spec.plugin;
const pluginId = plugin.id ?? 'app';
const pluginId = plugin.pluginId ?? 'app';
const pluginWrapperApi = useOptionalPluginWrapperApi();
@@ -130,6 +130,15 @@ export interface FrontendPlugin<
},
> {
readonly $$type: '@backstage/FrontendPlugin';
/**
* The plugin ID.
*/
readonly pluginId: string;
/**
* Deprecated alias for `pluginId`.
*
* @deprecated Use `pluginId` instead.
*/
readonly id: string;
readonly routes: TRoutes;
readonly externalRoutes: TExternalRoutes;
@@ -231,6 +240,7 @@ export function createFrontendPlugin<
}
return OpaqueFrontendPlugin.createInstance('v1', {
pluginId,
id: pluginId,
routes: options.routes ?? ({} as TRoutes),
externalRoutes: options.externalRoutes ?? ({} as TExternalRoutes),