deprecate EntityName, introduce CompoundEntityRef

deprecate getEntityName, introduce getCompoundEntityRef

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-03-02 21:26:22 +01:00
parent 80d2674a31
commit 36aa63022b
84 changed files with 393 additions and 268 deletions
@@ -27,7 +27,7 @@ import { Logger } from 'winston';
import { DateTime } from 'luxon';
import { PersistenceContext } from './persistence/persistenceContext';
import {
EntityName,
CompoundEntityRef,
parseEntityRef,
stringifyEntityRef,
} from '@backstage/catalog-model';
@@ -99,8 +99,10 @@ export async function createRouter<
});
router.post('/checks/run', async (req, res) => {
const { checks, entities }: { checks: string[]; entities: EntityName[] } =
req.body;
const {
checks,
entities,
}: { checks: string[]; entities: CompoundEntityRef[] } = req.body;
const tasks = entities.map(async entity => {
const entityTriplet =
typeof entity === 'string' ? entity : stringifyEntityRef(entity);