Minor typo entites -> entities and remove unused type

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-04-28 18:31:26 +02:00
parent 8a59346490
commit a7a68535e1
3 changed files with 7 additions and 19 deletions
@@ -105,7 +105,7 @@ export class DefaultCatalogProcessingEngine implements CatalogProcessingEngine {
state: result.state,
errors: result.errors,
relations: result.relations,
deferredEntities: result.deferredEntites,
deferredEntities: result.deferredEntities,
});
const setOfThingsToStitch = new Set<string>([
@@ -179,7 +179,7 @@ export class DefaultCatalogProcessingOrchestrator
);
}
// Backwards compatible processing of location entites
// Backwards compatible processing of location entities
if (isLocationEntity(entity)) {
const { type = location.type } = entity.spec;
const targets = new Array<string>();
@@ -268,7 +268,7 @@ function createEmitter(logger: Logger, parentEntity: Entity) {
const errors = new Array<Error>();
const relations = new Array<EntityRelationSpec>();
const deferredEntites = new Array<Entity>();
const deferredEntities = new Array<Entity>();
const emit = (i: CatalogProcessorResult) => {
if (done) {
@@ -282,7 +282,7 @@ function createEmitter(logger: Logger, parentEntity: Entity) {
if (i.type === 'entity') {
const originLocation = getEntityOriginLocationRef(parentEntity);
deferredEntites.push({
deferredEntities.push({
...i.entity,
metadata: {
...i.entity.metadata,
@@ -294,7 +294,7 @@ function createEmitter(logger: Logger, parentEntity: Entity) {
},
});
} else if (i.type === 'location') {
deferredEntites.push(
deferredEntities.push(
locationSpecToLocationEntity(i.location, parentEntity),
);
} else if (i.type === 'relation') {
@@ -311,7 +311,7 @@ function createEmitter(logger: Logger, parentEntity: Entity) {
return {
errors,
relations,
deferredEntites,
deferredEntities,
};
},
};
+1 -13
View File
@@ -22,18 +22,6 @@ import {
} from '@backstage/catalog-model';
import { JsonObject } from '@backstage/config';
export interface LocationEntity {
apiVersion: 'backstage.io/v1alpha1';
kind: 'Location';
metadata: {
name: string; // type:target
namespace: 'default';
};
spec: {
location: { type: string; target: string };
};
}
export interface LocationService {
createLocation(
spec: LocationSpec,
@@ -80,7 +68,7 @@ export type EntityProcessingResult =
ok: true;
state: Map<string, JsonObject>;
completedEntity: Entity;
deferredEntites: Entity[];
deferredEntities: Entity[];
relations: EntityRelationSpec[];
errors: Error[];
}