From 99819da87354f7f6535215f96c7bd6cc42c3ddc2 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 23 Dec 2022 12:04:34 +0100 Subject: [PATCH] chore: updating api-reports Signed-off-by: blam --- .../TemplateCard/TemplateCard.test.tsx | 2 +- .../components/TemplateCard/TemplateCard.tsx | 6 ++-- plugins/scaffolder-react/src/next/index.ts | 1 + plugins/scaffolder-react/src/next/routes.ts | 36 +++++++++++++++++++ plugins/scaffolder-react/src/routes.ts | 19 ---------- 5 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 plugins/scaffolder-react/src/next/routes.ts diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.test.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.test.tsx index a0fb1ad74e..228d8af4e3 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.test.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.test.tsx @@ -27,7 +27,7 @@ import { TemplateCard } from './TemplateCard'; import React from 'react'; import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; import { RELATION_OWNED_BY } from '@backstage/catalog-model'; -import { nextRouteRef } from '../../../routes'; +import { nextRouteRef } from '../../routes'; describe('TemplateCard', () => { it('should render the card title', async () => { diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx index b1e94b7b8e..1176b01e5d 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx @@ -39,10 +39,8 @@ import { } from '@material-ui/core'; import LanguageIcon from '@material-ui/icons/Language'; import React from 'react'; -import { - nextSelectedTemplateRouteRef, - viewTechDocRouteRef, -} from '../../../routes'; +import { nextSelectedTemplateRouteRef } from '../../routes'; +import { viewTechDocRouteRef } from '../../../routes'; import { CardHeader } from './CardHeader'; import { CardLink } from './CardLink'; diff --git a/plugins/scaffolder-react/src/next/index.ts b/plugins/scaffolder-react/src/next/index.ts index a18649f506..fe12e38ad9 100644 --- a/plugins/scaffolder-react/src/next/index.ts +++ b/plugins/scaffolder-react/src/next/index.ts @@ -18,3 +18,4 @@ export * from './extensions'; export * from './types'; export * from './lib'; export * from './hooks'; +export * from './routes'; diff --git a/plugins/scaffolder-react/src/next/routes.ts b/plugins/scaffolder-react/src/next/routes.ts new file mode 100644 index 0000000000..620122ee60 --- /dev/null +++ b/plugins/scaffolder-react/src/next/routes.ts @@ -0,0 +1,36 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api'; + +/** @alpha */ +export const nextRouteRef = createRouteRef({ + id: 'scaffolder/next', +}); + +/** @alpha */ +export const nextSelectedTemplateRouteRef = createSubRouteRef({ + id: 'scaffolder/next/selected-template', + parent: nextRouteRef, + path: '/templates/:namespace/:templateName', +}); + +/** @alpha */ +export const nextScaffolderTaskRouteRef = createSubRouteRef({ + id: 'scaffolder/next/task', + parent: nextRouteRef, + path: '/tasks/:taskId', +}); diff --git a/plugins/scaffolder-react/src/routes.ts b/plugins/scaffolder-react/src/routes.ts index e8a003cfc1..93c194360a 100644 --- a/plugins/scaffolder-react/src/routes.ts +++ b/plugins/scaffolder-react/src/routes.ts @@ -47,11 +47,6 @@ export const legacySelectedTemplateRouteRef = createSubRouteRef({ path: '/templates/:templateName', }); -/** @alpha */ -export const nextRouteRef = createRouteRef({ - id: 'scaffolder/next', -}); - /** @public */ export const selectedTemplateRouteRef = createSubRouteRef({ id: 'scaffolder/selected-template', @@ -59,13 +54,6 @@ export const selectedTemplateRouteRef = createSubRouteRef({ path: '/templates/:namespace/:templateName', }); -/** @alpha */ -export const nextSelectedTemplateRouteRef = createSubRouteRef({ - id: 'scaffolder/next/selected-template', - parent: nextRouteRef, - path: '/templates/:namespace/:templateName', -}); - /** @public */ export const scaffolderTaskRouteRef = createSubRouteRef({ id: 'scaffolder/task', @@ -73,13 +61,6 @@ export const scaffolderTaskRouteRef = createSubRouteRef({ path: '/tasks/:taskId', }); -/** @alpha */ -export const nextScaffolderTaskRouteRef = createSubRouteRef({ - id: 'scaffolder/next/task', - parent: nextRouteRef, - path: '/tasks/:taskId', -}); - /** @public */ export const scaffolderListTaskRouteRef = createSubRouteRef({ id: 'scaffolder/list-tasks',