@backstage/core-compat-api 0.5.7-next.0 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,19 +1,14 @@
1
1
  # @backstage/core-compat-api
2
2
 
3
- ## 0.5.7-next.0
3
+ ## 0.5.7
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - c38b74d: Internal updates for blueprint moves to `@backstage/plugin-app-react`.
8
- - 53b6549: Plugins in the new frontend system now have a `pluginId` field rather than `id` to better align with naming conventions used throughout the frontend and backend systems. The old field is still present but marked as deprecated. All internal code has been updated to prefer `pluginId` while maintaining backward compatibility by falling back to `id` when needed.
9
- - 69d880e: Bump to latest zod to ensure it has the latest features
7
+ - 5683c85: Bump to latest zod to ensure it has the latest features
10
8
  - Updated dependencies
11
- - @backstage/plugin-catalog-react@1.21.6-next.0
12
- - @backstage/frontend-plugin-api@0.14.0-next.0
13
- - @backstage/core-plugin-api@1.12.2-next.0
14
- - @backstage/plugin-app-react@0.1.1-next.0
15
- - @backstage/types@1.2.2
16
- - @backstage/version-bridge@1.0.11
9
+ - @backstage/frontend-plugin-api@0.13.4
10
+ - @backstage/core-plugin-api@1.12.2
11
+ - @backstage/plugin-catalog-react@1.21.6
17
12
 
18
13
  ## 0.5.6
19
14
 
@@ -20,7 +20,7 @@ function toLegacyPlugin(plugin) {
20
20
  };
21
21
  legacy = {
22
22
  getId() {
23
- return plugin.pluginId ?? plugin.id;
23
+ return plugin.id;
24
24
  },
25
25
  get routes() {
26
26
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"BackwardsCompatProvider.esm.js","sources":["../../src/compatWrapper/BackwardsCompatProvider.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { ReactNode } from 'react';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppContextProvider } from '../../../core-app-api/src/app/AppContext';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { RouteResolver } from '../../../core-plugin-api/src/routing/useRouteRef';\nimport {\n createFrontendPlugin as createNewPlugin,\n FrontendPlugin as NewFrontendPlugin,\n appTreeApiRef,\n iconsApiRef,\n useApi,\n routeResolutionApiRef,\n ErrorDisplay,\n NotFoundErrorPage,\n Progress,\n} from '@backstage/frontend-plugin-api';\nimport {\n AppComponents,\n IconComponent,\n BackstagePlugin as LegacyBackstagePlugin,\n RouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n VersionedValue,\n createVersionedContext,\n createVersionedValueMap,\n getOrCreateGlobalSingleton,\n} from '@backstage/version-bridge';\nimport { convertLegacyRouteRef } from '../convertLegacyRouteRef';\n\n// Make sure that we only convert each new plugin instance to its legacy equivalent once\nconst legacyPluginStore = getOrCreateGlobalSingleton(\n 'legacy-plugin-compatibility-store',\n () => new WeakMap<NewFrontendPlugin, LegacyBackstagePlugin>(),\n);\n\nexport function toLegacyPlugin(\n plugin: NewFrontendPlugin,\n): LegacyBackstagePlugin {\n let legacy = legacyPluginStore.get(plugin);\n if (legacy) {\n return legacy;\n }\n\n const errorMsg = 'Not implemented in legacy plugin compatibility layer';\n const notImplemented = () => {\n throw new Error(errorMsg);\n };\n\n legacy = {\n getId(): string {\n return plugin.pluginId ?? plugin.id;\n },\n get routes() {\n return {};\n },\n get externalRoutes() {\n return {};\n },\n getApis: notImplemented,\n getFeatureFlags: notImplemented,\n provide: notImplemented,\n };\n\n legacyPluginStore.set(plugin, legacy);\n return legacy;\n}\n\n// TODO: Currently a very naive implementation, may need some more work\nfunction toNewPlugin(plugin: LegacyBackstagePlugin): NewFrontendPlugin {\n return createNewPlugin({\n pluginId: plugin.getId(),\n });\n}\n\n// Recreates the old AppContext APIs using the various new APIs that replaced it\nfunction LegacyAppContextProvider(props: { children: ReactNode }) {\n const appTreeApi = useApi(appTreeApiRef);\n const iconsApi = useApi(iconsApiRef);\n\n const appContext = useMemo(() => {\n const { tree } = appTreeApi.getTree();\n\n let gatheredPlugins: LegacyBackstagePlugin[] | undefined = undefined;\n\n const ErrorBoundaryFallbackWrapper: AppComponents['ErrorBoundaryFallback'] =\n ({ plugin, ...rest }) => (\n <ErrorDisplay {...rest} plugin={plugin && toNewPlugin(plugin)} />\n );\n\n return {\n getPlugins(): LegacyBackstagePlugin[] {\n if (gatheredPlugins) {\n return gatheredPlugins;\n }\n\n const pluginSet = new Set<LegacyBackstagePlugin>();\n for (const node of tree.nodes.values()) {\n const plugin = node.spec.plugin;\n if (plugin) {\n pluginSet.add(toLegacyPlugin(plugin));\n }\n }\n gatheredPlugins = Array.from(pluginSet);\n\n return gatheredPlugins;\n },\n\n getSystemIcon(key: string): IconComponent | undefined {\n return iconsApi.getIcon(key);\n },\n\n getSystemIcons(): Record<string, IconComponent> {\n return Object.fromEntries(\n iconsApi.listIconKeys().map(key => [key, iconsApi.getIcon(key)!]),\n );\n },\n\n getComponents(): AppComponents {\n return {\n NotFoundErrorPage: NotFoundErrorPage,\n BootErrorPage() {\n throw new Error(\n 'The BootErrorPage app component should not be accessed by plugins',\n );\n },\n Progress: Progress,\n Router() {\n throw new Error(\n 'The Router app component should not be accessed by plugins',\n );\n },\n ErrorBoundaryFallback: ErrorBoundaryFallbackWrapper,\n };\n },\n };\n }, [appTreeApi, iconsApi]);\n\n return (\n <AppContextProvider appContext={appContext}>\n {props.children}\n </AppContextProvider>\n );\n}\n\nconst RoutingContext = createVersionedContext<{ 1: RouteResolver }>(\n 'routing-context',\n);\n\nfunction LegacyRoutingProvider(props: { children: ReactNode }) {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n\n const value = useMemo<VersionedValue<{ 1: RouteResolver }>>(() => {\n return createVersionedValueMap({\n 1: {\n resolve(anyRouteRef, location) {\n const sourcePath =\n typeof location === 'string' ? location : location.pathname ?? '';\n\n return routeResolutionApi.resolve(\n // This removes the requirement to use convertLegacyRouteRef inside plugins, but\n // they still need to converted when passed to the plugin instance\n convertLegacyRouteRef(anyRouteRef as RouteRef),\n { sourcePath },\n );\n },\n },\n });\n }, [routeResolutionApi]);\n\n return (\n <RoutingContext.Provider value={value}>\n {props.children}\n </RoutingContext.Provider>\n );\n}\n\nexport function BackwardsCompatProvider(props: { children: ReactNode }) {\n return (\n <LegacyRoutingProvider>\n <LegacyAppContextProvider>{props.children}</LegacyAppContextProvider>\n </LegacyRoutingProvider>\n );\n}\n"],"names":["createNewPlugin"],"mappings":";;;;;;;AAgDA,MAAM,iBAAA,GAAoB,0BAAA;AAAA,EACxB,mCAAA;AAAA,EACA,0BAAU,OAAA;AACZ,CAAA;AAEO,SAAS,eACd,MAAA,EACuB;AACvB,EAAA,IAAI,MAAA,GAAS,iBAAA,CAAkB,GAAA,CAAI,MAAM,CAAA;AACzC,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,MAAM,QAAA,GAAW,sDAAA;AACjB,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,QAAQ,CAAA;AAAA,EAC1B,CAAA;AAEA,EAAA,MAAA,GAAS;AAAA,IACP,KAAA,GAAgB;AACd,MAAA,OAAO,MAAA,CAAO,YAAY,MAAA,CAAO,EAAA;AAAA,IACnC,CAAA;AAAA,IACA,IAAI,MAAA,GAAS;AACX,MAAA,OAAO,EAAC;AAAA,IACV,CAAA;AAAA,IACA,IAAI,cAAA,GAAiB;AACnB,MAAA,OAAO,EAAC;AAAA,IACV,CAAA;AAAA,IACA,OAAA,EAAS,cAAA;AAAA,IACT,eAAA,EAAiB,cAAA;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A;AAAA;AAAA,YAGxB,sBAAsB,WAAuB,CAAA;AAAA,YAC7C,EAAE,UAAA;AAAW,WACf;AAAA,QACF;AAAA;AACF,KACD,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,kBAAkB,CAAC,CAAA;AAEvB,EAAA,2BACG,cAAA,CAAe,QAAA,EAAf,EAAwB,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,SAAS,wBAAwB,KAAA,EAAgC;AACtE,EAAA,2BACG,qBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,wBAAA,EAAA,EAA0B,QAAA,EAAA,KAAA,CAAM,UAAS,CAAA,EAC5C,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"BackwardsCompatProvider.esm.js","sources":["../../src/compatWrapper/BackwardsCompatProvider.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { ReactNode } from 'react';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppContextProvider } from '../../../core-app-api/src/app/AppContext';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { RouteResolver } from '../../../core-plugin-api/src/routing/useRouteRef';\nimport {\n createFrontendPlugin as createNewPlugin,\n FrontendPlugin as NewFrontendPlugin,\n appTreeApiRef,\n iconsApiRef,\n useApi,\n routeResolutionApiRef,\n ErrorDisplay,\n NotFoundErrorPage,\n Progress,\n} from '@backstage/frontend-plugin-api';\nimport {\n AppComponents,\n IconComponent,\n BackstagePlugin as LegacyBackstagePlugin,\n RouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n VersionedValue,\n createVersionedContext,\n createVersionedValueMap,\n getOrCreateGlobalSingleton,\n} from '@backstage/version-bridge';\nimport { convertLegacyRouteRef } from '../convertLegacyRouteRef';\n\n// Make sure that we only convert each new plugin instance to its legacy equivalent once\nconst legacyPluginStore = getOrCreateGlobalSingleton(\n 'legacy-plugin-compatibility-store',\n () => new WeakMap<NewFrontendPlugin, LegacyBackstagePlugin>(),\n);\n\nexport function toLegacyPlugin(\n plugin: NewFrontendPlugin,\n): LegacyBackstagePlugin {\n let legacy = legacyPluginStore.get(plugin);\n if (legacy) {\n return legacy;\n }\n\n const errorMsg = 'Not implemented in legacy plugin compatibility layer';\n const notImplemented = () => {\n throw new Error(errorMsg);\n };\n\n legacy = {\n getId(): string {\n return plugin.id;\n },\n get routes() {\n return {};\n },\n get externalRoutes() {\n return {};\n },\n getApis: notImplemented,\n getFeatureFlags: notImplemented,\n provide: notImplemented,\n };\n\n legacyPluginStore.set(plugin, legacy);\n return legacy;\n}\n\n// TODO: Currently a very naive implementation, may need some more work\nfunction toNewPlugin(plugin: LegacyBackstagePlugin): NewFrontendPlugin {\n return createNewPlugin({\n pluginId: plugin.getId(),\n });\n}\n\n// Recreates the old AppContext APIs using the various new APIs that replaced it\nfunction LegacyAppContextProvider(props: { children: ReactNode }) {\n const appTreeApi = useApi(appTreeApiRef);\n const iconsApi = useApi(iconsApiRef);\n\n const appContext = useMemo(() => {\n const { tree } = appTreeApi.getTree();\n\n let gatheredPlugins: LegacyBackstagePlugin[] | undefined = undefined;\n\n const ErrorBoundaryFallbackWrapper: AppComponents['ErrorBoundaryFallback'] =\n ({ plugin, ...rest }) => (\n <ErrorDisplay {...rest} plugin={plugin && toNewPlugin(plugin)} />\n );\n\n return {\n getPlugins(): LegacyBackstagePlugin[] {\n if (gatheredPlugins) {\n return gatheredPlugins;\n }\n\n const pluginSet = new Set<LegacyBackstagePlugin>();\n for (const node of tree.nodes.values()) {\n const plugin = node.spec.plugin;\n if (plugin) {\n pluginSet.add(toLegacyPlugin(plugin));\n }\n }\n gatheredPlugins = Array.from(pluginSet);\n\n return gatheredPlugins;\n },\n\n getSystemIcon(key: string): IconComponent | undefined {\n return iconsApi.getIcon(key);\n },\n\n getSystemIcons(): Record<string, IconComponent> {\n return Object.fromEntries(\n iconsApi.listIconKeys().map(key => [key, iconsApi.getIcon(key)!]),\n );\n },\n\n getComponents(): AppComponents {\n return {\n NotFoundErrorPage: NotFoundErrorPage,\n BootErrorPage() {\n throw new Error(\n 'The BootErrorPage app component should not be accessed by plugins',\n );\n },\n Progress: Progress,\n Router() {\n throw new Error(\n 'The Router app component should not be accessed by plugins',\n );\n },\n ErrorBoundaryFallback: ErrorBoundaryFallbackWrapper,\n };\n },\n };\n }, [appTreeApi, iconsApi]);\n\n return (\n <AppContextProvider appContext={appContext}>\n {props.children}\n </AppContextProvider>\n );\n}\n\nconst RoutingContext = createVersionedContext<{ 1: RouteResolver }>(\n 'routing-context',\n);\n\nfunction LegacyRoutingProvider(props: { children: ReactNode }) {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n\n const value = useMemo<VersionedValue<{ 1: RouteResolver }>>(() => {\n return createVersionedValueMap({\n 1: {\n resolve(anyRouteRef, location) {\n const sourcePath =\n typeof location === 'string' ? location : location.pathname ?? '';\n\n return routeResolutionApi.resolve(\n // This removes the requirement to use convertLegacyRouteRef inside plugins, but\n // they still need to converted when passed to the plugin instance\n convertLegacyRouteRef(anyRouteRef as RouteRef),\n { sourcePath },\n );\n },\n },\n });\n }, [routeResolutionApi]);\n\n return (\n <RoutingContext.Provider value={value}>\n {props.children}\n </RoutingContext.Provider>\n );\n}\n\nexport function BackwardsCompatProvider(props: { children: ReactNode }) {\n return (\n <LegacyRoutingProvider>\n <LegacyAppContextProvider>{props.children}</LegacyAppContextProvider>\n </LegacyRoutingProvider>\n );\n}\n"],"names":["createNewPlugin"],"mappings":";;;;;;;AAgDA,MAAM,iBAAA,GAAoB,0BAAA;AAAA,EAC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BAAA,EAAuB;AAAA,SACzB;AAAA,MACF;AAAA,KACF;AAAA,EACF,CAAA,EAAG,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAEzB,EAAA,uBACE,GAAA,CAAC,kBAAA,EAAA,EAAmB,UAAA,EACjB,QAAA,EAAA,KAAA,CAAM,QAAA,EACT,CAAA;AAEJ;AAEA,MAAM,cAAA,GAAiB,sBAAA;AAAA,EACrB;AACF,CAAA;AAEA,SAAS,sBAAsB,KAAA,EAAgC;AAC7D,EAAA,MAAM,kBAAA,GAAqB,OAAO,qBAAqB,CAAA;AAEvD,EAAA,MAAM,KAAA,GAAQ,QAA8C,MAAM;AAChE,IAAA,OAAO,uBAAA,CAAwB;AAAA,MAC7B,CAAA,EAAG;AAAA,QACD,OAAA,CAAQ,aAAa,QAAA,EAAU;AAC7B,UAAA,MAAM,aACJ,OAAO,QAAA,KAAa,QAAA,GAAW,QAAA,GAAW,SAAS,QAAA,IAAY,EAAA;AAEjE,UAAA,OAAO,kBAAA,CAAmB,OAAA;AAAA;AAAA;AAAA,YAGxB,sBAAsB,WAAuB,CAAA;AAAA,YAC7C,EAAE,UAAA;AAAW,WACf;AAAA,QACF;AAAA;AACF,KACD,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,kBAAkB,CAAC,CAAA;AAEvB,EAAA,2BACG,cAAA,CAAe,QAAA,EAAf,EAAwB,KAAA,EACtB,gBAAM,QAAA,EACT,CAAA;AAEJ;AAEO,SAAS,wBAAwB,KAAA,EAAgC;AACtE,EAAA,2BACG,qBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,wBAAA,EAAA,EAA0B,QAAA,EAAA,KAAA,CAAM,UAAS,CAAA,EAC5C,CAAA;AAEJ;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { ApiBlueprint, createExtension, Progress, NotFoundErrorPage, ErrorDisplay, createFrontendModule } from '@backstage/frontend-plugin-api';
3
- import { IconBundleBlueprint, ThemeBlueprint, RouterBlueprint, SignInPageBlueprint, SwappableComponentBlueprint } from '@backstage/plugin-app-react';
2
+ import { ApiBlueprint, IconBundleBlueprint, createExtension, ThemeBlueprint, RouterBlueprint, SignInPageBlueprint, SwappableComponentBlueprint, Progress, NotFoundErrorPage, ErrorDisplay, createFrontendModule } from '@backstage/frontend-plugin-api';
4
3
  import { toLegacyPlugin } from './compatWrapper/BackwardsCompatProvider.esm.js';
5
4
  import { compatWrapper } from './compatWrapper/compatWrapper.esm.js';
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"convertLegacyAppOptions.esm.js","sources":["../src/convertLegacyAppOptions.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentType } from 'react';\nimport {\n ApiBlueprint,\n ErrorDisplayProps,\n createExtension,\n createFrontendModule,\n ExtensionDefinition,\n FrontendModule,\n ErrorDisplay as SwappableErrorDisplay,\n NotFoundErrorPage as SwappableNotFoundErrorPage,\n Progress as SwappableProgress,\n} from '@backstage/frontend-plugin-api';\nimport {\n IconBundleBlueprint,\n RouterBlueprint,\n SignInPageBlueprint,\n SwappableComponentBlueprint,\n ThemeBlueprint,\n} from '@backstage/plugin-app-react';\nimport {\n AnyApiFactory,\n AppComponents,\n AppTheme,\n BackstagePlugin,\n FeatureFlag,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport { toLegacyPlugin } from './compatWrapper/BackwardsCompatProvider';\nimport { compatWrapper } from './compatWrapper';\n\nfunction componentCompatWrapper<TProps extends {}>(\n Component: ComponentType<TProps>,\n) {\n return (props: TProps) => compatWrapper(<Component {...props} />);\n}\n\n/**\n * @public\n */\nexport function convertLegacyAppOptions(\n options: {\n apis?: Iterable<AnyApiFactory>;\n\n icons?: { [key in string]: IconComponent };\n\n plugins?: Array<BackstagePlugin>;\n\n components?: Partial<AppComponents>;\n\n themes?: AppTheme[];\n\n featureFlags?: (FeatureFlag & Omit<FeatureFlag, 'pluginId'>)[];\n } = {},\n): FrontendModule {\n const { apis, icons, plugins, components, themes, featureFlags } = options;\n\n const allApis = [\n ...(plugins?.flatMap(plugin => [...plugin.getApis()]) ?? []),\n ...(apis ?? []),\n ];\n const deduplicatedApis = Array.from(\n new Map(allApis.map(api => [api.api.id, api])).values(),\n );\n const extensions: ExtensionDefinition[] = deduplicatedApis.map(factory =>\n ApiBlueprint.make({\n name: factory.api.id,\n params: defineParams => defineParams(factory),\n }),\n );\n\n if (icons) {\n extensions.push(\n IconBundleBlueprint.make({\n name: 'app-options',\n params: { icons },\n }),\n );\n }\n\n if (themes) {\n // IF any themes are provided we need to disable the default ones, unless they are overridden\n for (const id of ['light', 'dark']) {\n if (!themes.some(theme => theme.id === id)) {\n extensions.push(\n createExtension({\n kind: 'theme',\n name: id,\n attachTo: { id: 'api:app/app-theme', input: 'themes' },\n disabled: true,\n output: [],\n factory: () => [],\n }),\n );\n }\n }\n extensions.push(\n ...themes.map(theme =>\n ThemeBlueprint.make({\n name: theme.id,\n params: { theme },\n }),\n ),\n );\n }\n\n if (components) {\n const {\n BootErrorPage,\n ErrorBoundaryFallback,\n NotFoundErrorPage,\n Progress,\n Router,\n SignInPage,\n ThemeProvider,\n } = components;\n\n if (BootErrorPage) {\n throw new Error(\n 'components.BootErrorPage is not supported by convertLegacyAppOptions',\n );\n }\n if (ThemeProvider) {\n throw new Error(\n 'components.ThemeProvider is not supported by convertLegacyAppOptions',\n );\n }\n if (Router) {\n extensions.push(\n RouterBlueprint.make({\n params: { component: componentCompatWrapper(Router) },\n }),\n );\n }\n if (SignInPage) {\n extensions.push(\n SignInPageBlueprint.make({\n params: {\n loader: () => Promise.resolve(componentCompatWrapper(SignInPage)),\n },\n }),\n );\n }\n if (Progress) {\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableProgress,\n loader: () => componentCompatWrapper(Progress),\n }),\n }),\n );\n }\n\n if (NotFoundErrorPage) {\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableNotFoundErrorPage,\n loader: () => componentCompatWrapper(NotFoundErrorPage),\n }),\n }),\n );\n }\n\n if (ErrorBoundaryFallback) {\n const WrappedErrorBoundaryFallback = (props: ErrorDisplayProps) =>\n compatWrapper(\n <ErrorBoundaryFallback\n {...props}\n plugin={props.plugin && toLegacyPlugin(props.plugin)}\n />,\n );\n\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableErrorDisplay,\n loader: () =>\n componentCompatWrapper(WrappedErrorBoundaryFallback),\n }),\n }),\n );\n }\n }\n\n return createFrontendModule({\n pluginId: 'app',\n extensions,\n featureFlags,\n });\n}\n"],"names":["NotFoundErrorPage","Progress","SwappableProgress","SwappableNotFoundErrorPage","SwappableErrorDisplay"],"mappings":";;;;;;AA8CA,SAAS,uBACP,SAAA,EACA;AACA,EAAA,OAAO,CAAC,KAAA,KAAkB,aAAA,qBAAe,SAAA,EAAA,EAAW,GAAG,OAAO,CAAE,CAAA;AAClE;AAKO,SAAS,uBAAA,CACd,OAAA,GAYI,EAAC,EACW;AAChB,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,SAAS,UAAA,EAAY,MAAA,EAAQ,cAAa,GAAI,OAAA;AAEnE,EAAA,MAAM,OAAA,GAAU;AAAA,IACd,GAAI,OAAA,EAAS,OAAA,CAAQ,CAAA,MAAA,KAAU,CAAC,GAAG,MAAA,CAAO,OAAA,EAAS,CAAC,CAAA,IAAK,EAAC;AAAA,IAC1D,GAAI,QAAQ;AAAC,GACf;AACA,EAAA,MAAM,mBAAmB,KAAA,CAAM,IAAA;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AA,CAAK;AAAA,UAC/B,MAAA,EAAQ,YACN,MAAA,CAAO;AAAA,YACL,SAAA,EAAWG,iBAAA;AAAA,YACX,MAAA,EAAQ,MAAM,sBAAA,CAAuBH,mBAAiB;AAAA,WACvD;AAAA,SACJ;AAAA,OACH;AAAA,IACF;AAEA,IAAA,IAAI,qBAAA,EAAuB;AACzB,MAAA,MAAM,4BAAA,GAA+B,CAAC,KAAA,KACpC,aAAA;AAAA,wBACE,GAAA;AAAA,UAAC,qBAAA;AAAA,UAAA;AAAA,YACE,GAAG,KAAA;AAAA,YACJ,MAAA,EAAQ,KAAA,CAAM,MAAA,IAAU,cAAA,CAAe,MAAM,MAAM;AAAA;AAAA;AACrD,OACF;AAEF,MAAA,UAAA,CAAW,IAAA;AAAA,QACT,4BAA4B,IAAA,CAAK;AAAA,UAC/B,MAAA,EAAQ,YACN,MAAA,CAAO;AAAA,YACL,SAAA,EAAWI,YAAA;AAAA,YACX,MAAA,EAAQ,MACN,sBAAA,CAAuB,4BAA4B;AAAA,WACtD;AAAA,SACJ;AAAA,OACH;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,oBAAA,CAAqB;AAAA,IAC1B,QAAA,EAAU,KAAA;AAAA,IACV,UAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"convertLegacyAppOptions.esm.js","sources":["../src/convertLegacyAppOptions.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentType } from 'react';\nimport {\n SwappableComponentBlueprint,\n ApiBlueprint,\n ErrorDisplayProps,\n createExtension,\n createFrontendModule,\n ExtensionDefinition,\n FrontendModule,\n IconBundleBlueprint,\n RouterBlueprint,\n SignInPageBlueprint,\n ThemeBlueprint,\n ErrorDisplay as SwappableErrorDisplay,\n NotFoundErrorPage as SwappableNotFoundErrorPage,\n Progress as SwappableProgress,\n} from '@backstage/frontend-plugin-api';\nimport {\n AnyApiFactory,\n AppComponents,\n AppTheme,\n BackstagePlugin,\n FeatureFlag,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport { toLegacyPlugin } from './compatWrapper/BackwardsCompatProvider';\nimport { compatWrapper } from './compatWrapper';\n\nfunction componentCompatWrapper<TProps extends {}>(\n Component: ComponentType<TProps>,\n) {\n return (props: TProps) => compatWrapper(<Component {...props} />);\n}\n\n/**\n * @public\n */\nexport function convertLegacyAppOptions(\n options: {\n apis?: Iterable<AnyApiFactory>;\n\n icons?: { [key in string]: IconComponent };\n\n plugins?: Array<BackstagePlugin>;\n\n components?: Partial<AppComponents>;\n\n themes?: AppTheme[];\n\n featureFlags?: (FeatureFlag & Omit<FeatureFlag, 'pluginId'>)[];\n } = {},\n): FrontendModule {\n const { apis, icons, plugins, components, themes, featureFlags } = options;\n\n const allApis = [\n ...(plugins?.flatMap(plugin => [...plugin.getApis()]) ?? []),\n ...(apis ?? []),\n ];\n const deduplicatedApis = Array.from(\n new Map(allApis.map(api => [api.api.id, api])).values(),\n );\n const extensions: ExtensionDefinition[] = deduplicatedApis.map(factory =>\n ApiBlueprint.make({\n name: factory.api.id,\n params: defineParams => defineParams(factory),\n }),\n );\n\n if (icons) {\n extensions.push(\n IconBundleBlueprint.make({\n name: 'app-options',\n params: { icons },\n }),\n );\n }\n\n if (themes) {\n // IF any themes are provided we need to disable the default ones, unless they are overridden\n for (const id of ['light', 'dark']) {\n if (!themes.some(theme => theme.id === id)) {\n extensions.push(\n createExtension({\n kind: 'theme',\n name: id,\n attachTo: { id: 'api:app/app-theme', input: 'themes' },\n disabled: true,\n output: [],\n factory: () => [],\n }),\n );\n }\n }\n extensions.push(\n ...themes.map(theme =>\n ThemeBlueprint.make({\n name: theme.id,\n params: { theme },\n }),\n ),\n );\n }\n\n if (components) {\n const {\n BootErrorPage,\n ErrorBoundaryFallback,\n NotFoundErrorPage,\n Progress,\n Router,\n SignInPage,\n ThemeProvider,\n } = components;\n\n if (BootErrorPage) {\n throw new Error(\n 'components.BootErrorPage is not supported by convertLegacyAppOptions',\n );\n }\n if (ThemeProvider) {\n throw new Error(\n 'components.ThemeProvider is not supported by convertLegacyAppOptions',\n );\n }\n if (Router) {\n extensions.push(\n RouterBlueprint.make({\n params: { component: componentCompatWrapper(Router) },\n }),\n );\n }\n if (SignInPage) {\n extensions.push(\n SignInPageBlueprint.make({\n params: {\n loader: () => Promise.resolve(componentCompatWrapper(SignInPage)),\n },\n }),\n );\n }\n if (Progress) {\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableProgress,\n loader: () => componentCompatWrapper(Progress),\n }),\n }),\n );\n }\n\n if (NotFoundErrorPage) {\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableNotFoundErrorPage,\n loader: () => componentCompatWrapper(NotFoundErrorPage),\n }),\n }),\n );\n }\n\n if (ErrorBoundaryFallback) {\n const WrappedErrorBoundaryFallback = (props: ErrorDisplayProps) =>\n compatWrapper(\n <ErrorBoundaryFallback\n {...props}\n plugin={props.plugin && toLegacyPlugin(props.plugin)}\n />,\n );\n\n extensions.push(\n SwappableComponentBlueprint.make({\n params: define =>\n define({\n component: SwappableErrorDisplay,\n loader: () =>\n componentCompatWrapper(WrappedErrorBoundaryFallback),\n }),\n }),\n );\n }\n }\n\n return createFrontendModule({\n pluginId: 'app',\n extensions,\n featureFlags,\n });\n}\n"],"names":["NotFoundErrorPage","Progress","SwappableProgress","SwappableNotFoundErrorPage","SwappableErrorDisplay"],"mappings":";;;;;AA4CA,SAAS,uBACP,SAAA,EACA;AACA,EAAA,OAAO,CAAC,KAAA,KA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AA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/core-compat-api",
3
- "version": "0.5.7-next.0",
3
+ "version": "0.5.7",
4
4
  "backstage": {
5
5
  "role": "web-library"
6
6
  },
@@ -31,23 +31,22 @@
31
31
  "test": "backstage-cli package test"
32
32
  },
33
33
  "dependencies": {
34
- "@backstage/core-plugin-api": "1.12.2-next.0",
35
- "@backstage/frontend-plugin-api": "0.14.0-next.0",
36
- "@backstage/plugin-app-react": "0.1.1-next.0",
37
- "@backstage/plugin-catalog-react": "1.21.6-next.0",
38
- "@backstage/types": "1.2.2",
39
- "@backstage/version-bridge": "1.0.11",
34
+ "@backstage/core-plugin-api": "^1.12.2",
35
+ "@backstage/frontend-plugin-api": "^0.13.4",
36
+ "@backstage/plugin-catalog-react": "^1.21.6",
37
+ "@backstage/types": "^1.2.2",
38
+ "@backstage/version-bridge": "^1.0.11",
40
39
  "lodash": "^4.17.21",
41
40
  "zod": "^3.25.76"
42
41
  },
43
42
  "devDependencies": {
44
- "@backstage/cli": "0.35.3-next.0",
45
- "@backstage/core-app-api": "1.19.4-next.0",
46
- "@backstage/frontend-app-api": "0.14.1-next.0",
47
- "@backstage/frontend-test-utils": "0.4.5-next.0",
48
- "@backstage/plugin-catalog": "1.32.3-next.0",
49
- "@backstage/test-utils": "1.7.15-next.0",
50
- "@backstage/types": "1.2.2",
43
+ "@backstage/cli": "^0.35.3",
44
+ "@backstage/core-app-api": "^1.19.4",
45
+ "@backstage/frontend-app-api": "^0.14.1",
46
+ "@backstage/frontend-test-utils": "^0.4.5",
47
+ "@backstage/plugin-catalog": "^1.32.2",
48
+ "@backstage/test-utils": "^1.7.14",
49
+ "@backstage/types": "^1.2.2",
51
50
  "@testing-library/jest-dom": "^6.0.0",
52
51
  "@testing-library/react": "^16.0.0",
53
52
  "@types/react": "^18.0.0",