Merge pull request #9661 from backstage/rugvip/noentityspec
catalog-model: move EntityRelationSpec to catalog-backend
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Added `EntityRelationSpec`, which was moved over from `@backstage/catalog-model`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': minor
|
||||
---
|
||||
|
||||
**BREAKING**: Removed `EntityRelationSpec` as it is only used during the catalog during the catalog processing.
|
||||
@@ -233,13 +233,6 @@ export type EntityRelation = {
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type EntityRelationSpec = {
|
||||
source: EntityName;
|
||||
type: string;
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
// @public
|
||||
export function entitySchemaValidator<T extends Entity = Entity>(
|
||||
schema?: unknown,
|
||||
|
||||
@@ -201,28 +201,6 @@ export type EntityRelation = {
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
/**
|
||||
* Holds the relation data for entities.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type EntityRelationSpec = {
|
||||
/**
|
||||
* The source entity of this relation.
|
||||
*/
|
||||
source: EntityName;
|
||||
|
||||
/**
|
||||
* The type of the relation.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* The target entity of this relation.
|
||||
*/
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
/**
|
||||
* A link to external information that is related to the entity.
|
||||
*
|
||||
|
||||
@@ -29,7 +29,6 @@ export type {
|
||||
EntityLink,
|
||||
EntityMeta,
|
||||
EntityRelation,
|
||||
EntityRelationSpec,
|
||||
} from './Entity';
|
||||
export type { EntityEnvelope } from './EntityEnvelope';
|
||||
export type {
|
||||
|
||||
@@ -12,8 +12,8 @@ import { Conditions } from '@backstage/plugin-permission-node';
|
||||
import { Config } from '@backstage/config';
|
||||
import { DocumentCollator } from '@backstage/search-common';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityName } from '@backstage/catalog-model';
|
||||
import { EntityPolicy } from '@backstage/catalog-model';
|
||||
import { EntityRelationSpec } from '@backstage/catalog-model';
|
||||
import express from 'express';
|
||||
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
||||
import { GithubCredentialsProvider } from '@backstage/integration';
|
||||
@@ -704,6 +704,13 @@ export type EntityProviderMutation =
|
||||
removed: DeferredEntity[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export type EntityRelationSpec = {
|
||||
source: EntityName;
|
||||
type: string;
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "FileReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Entity, EntityRelationSpec } from '@backstage/catalog-model';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { DateTime } from 'luxon';
|
||||
import { DeferredEntity } from '../processing/types';
|
||||
import { DeferredEntity, EntityRelationSpec } from '../processing/types';
|
||||
|
||||
/**
|
||||
* An abstraction for transactions of the underlying database technology.
|
||||
|
||||
@@ -15,12 +15,9 @@
|
||||
*/
|
||||
|
||||
import { InputError, NotFoundError } from '@backstage/errors';
|
||||
import {
|
||||
Entity,
|
||||
EntityRelationSpec,
|
||||
LocationSpec,
|
||||
} from '@backstage/catalog-model';
|
||||
import { Entity, LocationSpec } from '@backstage/catalog-model';
|
||||
import { CatalogProcessorResult } from './types';
|
||||
import { EntityRelationSpec } from '../../processing/types';
|
||||
|
||||
export function notFoundError(
|
||||
atLocation: LocationSpec,
|
||||
|
||||
@@ -14,12 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
Entity,
|
||||
EntityRelationSpec,
|
||||
LocationSpec,
|
||||
} from '@backstage/catalog-model';
|
||||
import { Entity, LocationSpec } from '@backstage/catalog-model';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { EntityRelationSpec } from '../../processing/types';
|
||||
|
||||
export type CatalogProcessor = {
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import {
|
||||
Entity,
|
||||
EntityRelationSpec,
|
||||
ANNOTATION_LOCATION,
|
||||
ANNOTATION_ORIGIN_LOCATION,
|
||||
stringifyLocationRef,
|
||||
@@ -25,7 +24,7 @@ import { assertError } from '@backstage/errors';
|
||||
import { Logger } from 'winston';
|
||||
import { CatalogProcessorResult } from '../ingestion';
|
||||
import { locationSpecToLocationEntity } from '../util/conversion';
|
||||
import { DeferredEntity } from './types';
|
||||
import { DeferredEntity, EntityRelationSpec } from './types';
|
||||
import {
|
||||
getEntityLocationRef,
|
||||
getEntityOriginLocationRef,
|
||||
|
||||
@@ -19,6 +19,7 @@ export type {
|
||||
CatalogProcessingEngine,
|
||||
EntityProcessingRequest,
|
||||
EntityProcessingResult,
|
||||
EntityRelationSpec,
|
||||
DeferredEntity,
|
||||
} from './types';
|
||||
export { DefaultCatalogProcessingOrchestrator } from './DefaultCatalogProcessingOrchestrator';
|
||||
|
||||
@@ -14,9 +14,31 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Entity, EntityRelationSpec } from '@backstage/catalog-model';
|
||||
import { Entity, EntityName } from '@backstage/catalog-model';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
|
||||
/**
|
||||
* Holds the relation data for entities.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type EntityRelationSpec = {
|
||||
/**
|
||||
* The source entity of this relation.
|
||||
*/
|
||||
source: EntityName;
|
||||
|
||||
/**
|
||||
* The type of the relation.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* The target entity of this relation.
|
||||
*/
|
||||
target: EntityName;
|
||||
};
|
||||
|
||||
export type EntityProcessingRequest = {
|
||||
entity: Entity;
|
||||
state?: JsonObject; // Versions for multiple deployments etc
|
||||
|
||||
Reference in New Issue
Block a user