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:
Hellgren Heikki
2026-04-15 10:54:23 +03:00
parent a321fc0c47
commit cad156e797
47 changed files with 332 additions and 285 deletions
+2 -1
View File
@@ -66,7 +66,8 @@
"p-limit": "^3.1.0",
"pluralize": "^8.0.0",
"qs": "^6.10.1",
"react-use": "^17.2.4"
"react-use": "^17.2.4",
"zod": "^3.25.76 || ^4.0.0"
},
"devDependencies": {
"@backstage/catalog-client": "workspace:^",
+3 -3
View File
@@ -69,8 +69,8 @@ const _default: OverridableFrontendPlugin<
type: 'content' | 'info' | undefined;
};
configInput: {
showAggregateMembersToggle?: boolean | undefined;
initialRelationAggregation?: 'direct' | 'aggregated' | undefined;
showAggregateMembersToggle?: boolean | undefined;
filter?: FilterPredicate | undefined;
type?: 'content' | 'info' | undefined;
};
@@ -115,8 +115,8 @@ const _default: OverridableFrontendPlugin<
type: 'content' | 'info' | undefined;
};
configInput: {
showAggregateMembersToggle?: boolean | undefined;
initialRelationAggregation?: 'direct' | 'aggregated' | undefined;
showAggregateMembersToggle?: boolean | undefined;
ownedKinds?: string[] | undefined;
filter?: FilterPredicate | undefined;
type?: 'content' | 'info' | undefined;
@@ -161,8 +161,8 @@ const _default: OverridableFrontendPlugin<
type: 'content' | 'info' | undefined;
};
configInput: {
hideIcons?: boolean | undefined;
maxRelations?: number | undefined;
hideIcons?: boolean | undefined;
filter?: FilterPredicate | undefined;
type?: 'content' | 'info' | undefined;
};
+11 -18
View File
@@ -15,6 +15,7 @@
*/
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
import { z } from 'zod/v4';
import { RiTeamLine } from '@remixicon/react';
import { catalogIndexRouteRef } from './routes';
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
@@ -35,12 +36,9 @@ const EntityGroupProfileCard = EntityCardBlueprint.make({
/** @alpha */
const EntityMembersListCard = EntityCardBlueprint.makeWithOverrides({
name: 'members-list',
config: {
schema: {
initialRelationAggregation: z =>
z.enum(['direct', 'aggregated']).optional(),
showAggregateMembersToggle: z => z.boolean().optional(),
},
configSchema: {
initialRelationAggregation: z.enum(['direct', 'aggregated']).optional(),
showAggregateMembersToggle: z.boolean().optional(),
},
factory(originalFactory, { config }) {
return originalFactory({
@@ -61,13 +59,10 @@ const EntityMembersListCard = EntityCardBlueprint.makeWithOverrides({
/** @alpha */
const EntityOwnershipCard = EntityCardBlueprint.makeWithOverrides({
name: 'ownership',
config: {
schema: {
initialRelationAggregation: z =>
z.enum(['direct', 'aggregated']).optional(),
showAggregateMembersToggle: z => z.boolean().optional(),
ownedKinds: z => z.array(z.string()).optional(),
},
configSchema: {
initialRelationAggregation: z.enum(['direct', 'aggregated']).optional(),
showAggregateMembersToggle: z.boolean().optional(),
ownedKinds: z.array(z.string()).optional(),
},
factory(originalFactory, { config }) {
return originalFactory({
@@ -93,11 +88,9 @@ const EntityOwnershipCard = EntityCardBlueprint.makeWithOverrides({
/** @alpha */
const EntityUserProfileCard = EntityCardBlueprint.makeWithOverrides({
name: 'user-profile',
config: {
schema: {
maxRelations: z => z.number().optional(),
hideIcons: z => z.boolean().default(false),
},
configSchema: {
maxRelations: z.number().optional(),
hideIcons: z.boolean().default(false),
},
factory(originalFactory, { config }) {
return originalFactory({