fix: replace old config schemas for extensions and blueprints
to overcome a lot of warnings given during for example testing where these extensions are used. Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -86,7 +86,8 @@
|
||||
"git-url-parse": "^15.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"react-helmet": "6.1.0",
|
||||
"react-use": "^17.2.4"
|
||||
"react-use": "^17.2.4",
|
||||
"zod": "^3.25.76 || ^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
|
||||
@@ -229,9 +229,9 @@ const _default: OverridableFrontendPlugin<
|
||||
filter: FilterPredicate | undefined;
|
||||
};
|
||||
configInput: {
|
||||
filter?: FilterPredicate | undefined;
|
||||
label?: string | undefined;
|
||||
title?: string | undefined;
|
||||
filter?: FilterPredicate | undefined;
|
||||
};
|
||||
output:
|
||||
| ExtensionDataRef<
|
||||
@@ -262,8 +262,12 @@ const _default: OverridableFrontendPlugin<
|
||||
'nav-item:techdocs': OverridableExtensionDefinition<{
|
||||
kind: 'nav-item';
|
||||
name: undefined;
|
||||
config: {};
|
||||
configInput: {};
|
||||
config: {
|
||||
title: string | undefined;
|
||||
};
|
||||
configInput: {
|
||||
title?: string | undefined;
|
||||
};
|
||||
output: ExtensionDataRef<
|
||||
{
|
||||
title: string;
|
||||
@@ -288,8 +292,8 @@ const _default: OverridableFrontendPlugin<
|
||||
title: string | undefined;
|
||||
};
|
||||
configInput: {
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
title?: string | undefined;
|
||||
};
|
||||
output:
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
@@ -366,8 +370,8 @@ const _default: OverridableFrontendPlugin<
|
||||
configInput: {
|
||||
withoutSearch?: boolean | undefined;
|
||||
withoutHeader?: boolean | undefined;
|
||||
title?: string | undefined;
|
||||
path?: string | undefined;
|
||||
title?: string | undefined;
|
||||
};
|
||||
output:
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
@@ -470,8 +474,8 @@ const _default: OverridableFrontendPlugin<
|
||||
configInput: {
|
||||
title?: string | undefined;
|
||||
lineClamp?: number | undefined;
|
||||
asListItem?: boolean | undefined;
|
||||
asLink?: boolean | undefined;
|
||||
asListItem?: boolean | undefined;
|
||||
noTrack?: boolean | undefined;
|
||||
};
|
||||
output: ExtensionDataRef<
|
||||
@@ -504,8 +508,8 @@ export const techDocsSearchResultListItemExtension: OverridableExtensionDefiniti
|
||||
configInput: {
|
||||
title?: string | undefined;
|
||||
lineClamp?: number | undefined;
|
||||
asListItem?: boolean | undefined;
|
||||
asLink?: boolean | undefined;
|
||||
asListItem?: boolean | undefined;
|
||||
noTrack?: boolean | undefined;
|
||||
};
|
||||
output: ExtensionDataRef<
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Suspense } from 'react';
|
||||
import { z } from 'zod/v4';
|
||||
import { RiArticleLine } from '@remixicon/react';
|
||||
import {
|
||||
createFrontendPlugin,
|
||||
@@ -107,13 +108,11 @@ const techDocsClientApi = ApiBlueprint.make({
|
||||
/** @alpha */
|
||||
export const techDocsSearchResultListItemExtension =
|
||||
SearchResultListItemBlueprint.makeWithOverrides({
|
||||
config: {
|
||||
schema: {
|
||||
title: z => z.string().optional(),
|
||||
lineClamp: z => z.number().default(5),
|
||||
asLink: z => z.boolean().default(true),
|
||||
asListItem: z => z.boolean().default(true),
|
||||
},
|
||||
configSchema: {
|
||||
title: z.string().optional(),
|
||||
lineClamp: z.number().default(5),
|
||||
asLink: z.boolean().default(true),
|
||||
asListItem: z.boolean().default(true),
|
||||
},
|
||||
factory(originalFactory, { config }) {
|
||||
return originalFactory({
|
||||
@@ -157,11 +156,9 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
|
||||
inputs: {
|
||||
addons: createExtensionInput([AddonBlueprint.dataRefs.addon]),
|
||||
},
|
||||
config: {
|
||||
schema: {
|
||||
withoutSearch: z => z.boolean().default(false),
|
||||
withoutHeader: z => z.boolean().default(false),
|
||||
},
|
||||
configSchema: {
|
||||
withoutSearch: z.boolean().default(false),
|
||||
withoutHeader: z.boolean().default(false),
|
||||
},
|
||||
factory(originalFactory, { apis, inputs, config }) {
|
||||
const addonsApi = apis.get(techdocsAddonsApiRef);
|
||||
|
||||
Reference in New Issue
Block a user