plugin-catalog-import: move NFS page export to alpha entry point

Move NfsDefaultImportPage out of the public API and export it as
DefaultImportPage from the alpha entry point instead.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-28 14:03:00 +01:00
parent daaaa72ebb
commit 3cf1950a3f
5 changed files with 13 additions and 10 deletions
+8 -4
View File
@@ -11,7 +11,8 @@ import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
import { ExtensionInput } from '@backstage/frontend-plugin-api';
import { IconElement } from '@backstage/frontend-plugin-api';
import { JSX as JSX_2 } from 'react';
import { JSX as JSX_2 } from 'react/jsx-runtime';
import { JSX as JSX_3 } from 'react';
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';
@@ -133,7 +134,7 @@ const _default: OverridableFrontendPlugin<
optional: true;
}
>
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
| ExtensionDataRef<JSX_3.Element, 'core.reactElement', {}>
| ExtensionDataRef<
string,
'core.title',
@@ -150,7 +151,7 @@ const _default: OverridableFrontendPlugin<
>;
inputs: {
pages: ExtensionInput<
| ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
| ConfigurableExtensionDataRef<JSX_3.Element, 'core.reactElement', {}>
| ConfigurableExtensionDataRef<string, 'core.routing.path', {}>
| ConfigurableExtensionDataRef<
RouteRef_2<AnyRouteRefParams>,
@@ -184,7 +185,7 @@ const _default: OverridableFrontendPlugin<
path: string;
title?: string;
icon?: IconElement;
loader?: () => Promise<JSX_2.Element>;
loader?: () => Promise<JSX_3.Element>;
routeRef?: RouteRef_2;
noHeader?: boolean;
};
@@ -193,5 +194,8 @@ const _default: OverridableFrontendPlugin<
>;
export default _default;
// @alpha (undocumented)
export const DefaultImportPage: () => JSX_2.Element;
// (No @packageDocumentation comment for this package)
```
-3
View File
@@ -298,9 +298,6 @@ export interface ImportStepperProps {
variant?: InfoCardVariants;
}
// @public (undocumented)
export const NfsDefaultImportPage: () => JSX_2.Element;
// @public
export const PreparePullRequestForm: <TFieldValues extends Record<string, any>>(
props: PreparePullRequestFormProps<TFieldValues>,
+3 -1
View File
@@ -44,6 +44,8 @@ import { catalogImportTranslationRef as _catalogImportTranslationRef } from './t
*/
export const catalogImportTranslationRef = _catalogImportTranslationRef;
export { NfsDefaultImportPage as DefaultImportPage } from './components/DefaultImportPage/DefaultImportPage';
// TODO: It's currently possible to override the import page with a custom one. We need to decide
// whether this type of override is typically done with an input or by overriding the entire extension.
const catalogImportPage = PageBlueprint.make({
@@ -51,7 +53,7 @@ const catalogImportPage = PageBlueprint.make({
path: '/catalog-import',
routeRef: rootRouteRef,
loader: () =>
import('./components/DefaultImportPage').then(m => (
import('./components/DefaultImportPage/DefaultImportPage').then(m => (
<RequirePermission permission={catalogEntityCreatePermission}>
<m.NfsDefaultImportPage />
</RequirePermission>
@@ -82,7 +82,7 @@ export const DefaultImportPage = () => {
};
/**
* @public
* @alpha
*/
export const NfsDefaultImportPage = () => {
const { t } = useTranslationRef(catalogImportTranslationRef);
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { DefaultImportPage, NfsDefaultImportPage } from './DefaultImportPage';
export { DefaultImportPage } from './DefaultImportPage';