From 9a7906089c1e877d564aac18a800f241eb40f337 Mon Sep 17 00:00:00 2001 From: Patrick Jungermann Date: Wed, 17 Jan 2024 01:20:55 +0100 Subject: [PATCH] chore: more deprecated (re-)exports to `deprecated.ts` Signed-off-by: Patrick Jungermann --- plugins/catalog-backend/src/deprecated.ts | 66 +++++++++++++++++++ plugins/catalog-backend/src/index.ts | 37 ----------- .../catalog-backend/src/ingestion/index.ts | 7 +- .../catalog-backend/src/ingestion/types.ts | 36 ---------- 4 files changed, 67 insertions(+), 79 deletions(-) diff --git a/plugins/catalog-backend/src/deprecated.ts b/plugins/catalog-backend/src/deprecated.ts index d935150d7e..72c3cad225 100644 --- a/plugins/catalog-backend/src/deprecated.ts +++ b/plugins/catalog-backend/src/deprecated.ts @@ -15,6 +15,9 @@ */ import { + type AnalyzeLocationEntityField as _AnalyzeLocationEntityField, + type AnalyzeLocationExistingEntity as _AnalyzeLocationExistingEntity, + type AnalyzeLocationGenerateEntity as _AnalyzeLocationGenerateEntity, type AnalyzeLocationRequest as _AnalyzeLocationRequest, type AnalyzeLocationResponse as _AnalyzeLocationResponse, type LocationSpec as _LocationSpec, @@ -47,6 +50,12 @@ import { type PlaceholderResolverResolveUrl as _PlaceholderResolverResolveUrl, type ScmLocationAnalyzer as _ScmLocationAnalyzer, } from '@backstage/plugin-catalog-node'; +import { + defaultCatalogCollatorEntityTransformer as _defaultCatalogCollatorEntityTransformer, + DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory, + type CatalogCollatorEntityTransformer as _CatalogCollatorEntityTransformer, + type DefaultCatalogCollatorFactoryOptions as _DefaultCatalogCollatorFactoryOptions, +} from '@backstage/plugin-search-backend-module-catalog'; /** * @public @@ -208,3 +217,60 @@ export type AnalyzeLocationRequest = _AnalyzeLocationRequest; * @deprecated use the same type from `@backstage/plugin-catalog-common` instead */ export type AnalyzeLocationResponse = _AnalyzeLocationResponse; + +/** + * If the folder pointed to already contained catalog info yaml files, they are + * read and emitted like this so that the frontend can inform the user that it + * located them and can make sure to register them as well if they weren't + * already + * @public + * @deprecated use the same type from `@backstage/plugin-catalog-common` instead + */ +export type AnalyzeLocationExistingEntity = _AnalyzeLocationExistingEntity; +/** + * This is some form of representation of what the analyzer could deduce. + * We should probably have a chat about how this can best be conveyed to + * the frontend. It'll probably contain a (possibly incomplete) entity, plus + * enough info for the frontend to know what form data to show to the user + * for overriding/completing the info. + * @public + * @deprecated use the same type from `@backstage/plugin-catalog-common` instead + */ +export type AnalyzeLocationGenerateEntity = _AnalyzeLocationGenerateEntity; + +/** + * + * This is where I get really vague. Something like this perhaps? Or it could be + * something like a json-schema that contains enough info for the frontend to + * be able to present a form and explanations + * @public + * @deprecated use the same type from `@backstage/plugin-catalog-common` instead + */ +export type AnalyzeLocationEntityField = _AnalyzeLocationEntityField; + +/** + * @public + * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead + */ +export const DefaultCatalogCollatorFactory = _DefaultCatalogCollatorFactory; + +/** + * @public + * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead + */ +export const defaultCatalogCollatorEntityTransformer = + _defaultCatalogCollatorEntityTransformer; + +/** + * @public + * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead + */ +export type DefaultCatalogCollatorFactoryOptions = + _DefaultCatalogCollatorFactoryOptions; + +/** + * @public + * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead + */ +export type CatalogCollatorEntityTransformer = + _CatalogCollatorEntityTransformer; diff --git a/plugins/catalog-backend/src/index.ts b/plugins/catalog-backend/src/index.ts index d2f20d24d8..6a479babdc 100644 --- a/plugins/catalog-backend/src/index.ts +++ b/plugins/catalog-backend/src/index.ts @@ -27,40 +27,3 @@ export * from './search'; export * from './service'; export * from './deprecated'; export * from './constants'; - -import { - DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory, - defaultCatalogCollatorEntityTransformer as _defaultCatalogCollatorEntityTransformer, -} from '@backstage/plugin-search-backend-module-catalog'; - -/** - * @public - * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead - */ -export const DefaultCatalogCollatorFactory = _DefaultCatalogCollatorFactory; - -/** - * @public - * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead - */ -export const defaultCatalogCollatorEntityTransformer = - _defaultCatalogCollatorEntityTransformer; - -import type { - DefaultCatalogCollatorFactoryOptions as _DefaultCatalogCollatorFactoryOptions, - CatalogCollatorEntityTransformer as _CatalogCollatorEntityTransformer, -} from '@backstage/plugin-search-backend-module-catalog'; - -/** - * @public - * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead - */ -export type DefaultCatalogCollatorFactoryOptions = - _DefaultCatalogCollatorFactoryOptions; - -/** - * @public - * @deprecated import from `@backstage/plugin-search-backend-module-catalog` instead - */ -export type CatalogCollatorEntityTransformer = - _CatalogCollatorEntityTransformer; diff --git a/plugins/catalog-backend/src/ingestion/index.ts b/plugins/catalog-backend/src/ingestion/index.ts index 8e61b316cc..a6555dd98d 100644 --- a/plugins/catalog-backend/src/ingestion/index.ts +++ b/plugins/catalog-backend/src/ingestion/index.ts @@ -14,9 +14,4 @@ * limitations under the License. */ -export type { - AnalyzeLocationEntityField, - AnalyzeLocationExistingEntity, - AnalyzeLocationGenerateEntity, - LocationAnalyzer, -} from './types'; +export type { LocationAnalyzer } from './types'; diff --git a/plugins/catalog-backend/src/ingestion/types.ts b/plugins/catalog-backend/src/ingestion/types.ts index 6f6bdd84ad..6ca0ab259b 100644 --- a/plugins/catalog-backend/src/ingestion/types.ts +++ b/plugins/catalog-backend/src/ingestion/types.ts @@ -17,44 +17,8 @@ import { AnalyzeLocationRequest, AnalyzeLocationResponse, - AnalyzeLocationExistingEntity as NonDeprecatedAnalyzeLocationExistingEntity, - AnalyzeLocationGenerateEntity as NonDeprecatedAnalyzeLocationGenerateEntity, - AnalyzeLocationEntityField as NonDeprecatedAnalyzeLocationEntityField, } from '@backstage/plugin-catalog-common'; -/** - * If the folder pointed to already contained catalog info yaml files, they are - * read and emitted like this so that the frontend can inform the user that it - * located them and can make sure to register them as well if they weren't - * already - * @public - * @deprecated use the same type from `@backstage/plugin-catalog-common` instead - */ -export type AnalyzeLocationExistingEntity = - NonDeprecatedAnalyzeLocationExistingEntity; -/** - * This is some form of representation of what the analyzer could deduce. - * We should probably have a chat about how this can best be conveyed to - * the frontend. It'll probably contain a (possibly incomplete) entity, plus - * enough info for the frontend to know what form data to show to the user - * for overriding/completing the info. - * @public - * @deprecated use the same type from `@backstage/plugin-catalog-common` instead - */ -export type AnalyzeLocationGenerateEntity = - NonDeprecatedAnalyzeLocationGenerateEntity; - -/** - * - * This is where I get really vague. Something like this perhaps? Or it could be - * something like a json-schema that contains enough info for the frontend to - * be able to present a form and explanations - * @public - * @deprecated use the same type from `@backstage/plugin-catalog-common` instead - */ -export type AnalyzeLocationEntityField = - NonDeprecatedAnalyzeLocationEntityField; - /** @public */ export type LocationAnalyzer = { /**