plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { FieldExtensionOptions } from '@backstage/plugin-scaffolder-react';
|
||||
import { FormField } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
@@ -28,10 +28,11 @@ import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { PathParams } from '@backstage/core-plugin-api';
|
||||
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { ScaffolderFormFieldsApi } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { SubRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { SubRouteRef } from '@backstage/core-plugin-api';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
@@ -50,12 +51,15 @@ const _default: OverridableFrontendPlugin<
|
||||
templatingExtensions: SubRouteRef<undefined>;
|
||||
},
|
||||
{
|
||||
registerComponent: ExternalRouteRef<undefined>;
|
||||
viewTechDoc: ExternalRouteRef<{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
}>;
|
||||
registerComponent: ExternalRouteRef<undefined, true>;
|
||||
viewTechDoc: ExternalRouteRef<
|
||||
{
|
||||
name: string;
|
||||
kind: string;
|
||||
namespace: string;
|
||||
},
|
||||
true
|
||||
>;
|
||||
},
|
||||
{
|
||||
'api:scaffolder': OverridableExtensionDefinition<{
|
||||
@@ -175,7 +179,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -184,7 +188,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:scaffolder': OverridableExtensionDefinition<{
|
||||
@@ -198,7 +202,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -223,7 +227,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
'scaffolder-form-field:scaffolder/entity-name-picker': OverridableExtensionDefinition<{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createExtensionInput,
|
||||
@@ -42,7 +41,7 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({
|
||||
i.get(FormFieldBlueprint.dataRefs.formFieldLoader),
|
||||
);
|
||||
return originalFactory({
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
path: '/create',
|
||||
loader: () =>
|
||||
import('../components/Router/Router').then(m => (
|
||||
@@ -54,7 +53,7 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({
|
||||
|
||||
export const scaffolderNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
title: 'Create...',
|
||||
icon: CreateComponentIcon,
|
||||
},
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import {
|
||||
actionsRouteRef,
|
||||
@@ -60,7 +59,7 @@ const scaffolderEntityIconLink = EntityIconLinkBlueprint.make({
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'scaffolder',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: convertLegacyRouteRefs({
|
||||
routes: {
|
||||
root: rootRouteRef,
|
||||
selectedTemplate: selectedTemplateRouteRef,
|
||||
ongoingTask: scaffolderTaskRouteRef,
|
||||
@@ -68,11 +67,11 @@ export default createFrontendPlugin({
|
||||
listTasks: scaffolderListTaskRouteRef,
|
||||
edit: editRouteRef,
|
||||
templatingExtensions: templatingExtensionsRouteRef,
|
||||
}),
|
||||
externalRoutes: convertLegacyRouteRefs({
|
||||
},
|
||||
externalRoutes: {
|
||||
registerComponent: registerComponentRouteRef,
|
||||
viewTechDoc: viewTechDocRouteRef,
|
||||
}),
|
||||
},
|
||||
extensions: [
|
||||
scaffolderApi,
|
||||
scaffolderPage,
|
||||
|
||||
Reference in New Issue
Block a user