diff --git a/.changeset/odd-beds-confess.md b/.changeset/odd-beds-confess.md new file mode 100644 index 0000000000..5a766beb9d --- /dev/null +++ b/.changeset/odd-beds-confess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Replace uses of deprecated types with replacements internally. diff --git a/plugins/catalog-backend/api-report.md b/plugins/catalog-backend/api-report.md index 8b7565bd1f..a38a964d48 100644 --- a/plugins/catalog-backend/api-report.md +++ b/plugins/catalog-backend/api-report.md @@ -12,7 +12,7 @@ import { AnalyzeLocationRequest as AnalyzeLocationRequest_2 } from '@backstage/p import { AnalyzeLocationResponse as AnalyzeLocationResponse_2 } from '@backstage/plugin-catalog-common'; import { AnalyzeOptions as AnalyzeOptions_2 } from '@backstage/plugin-catalog-node'; import { CatalogApi } from '@backstage/catalog-client'; -import type { CatalogCollatorEntityTransformer as CatalogCollatorEntityTransformer_2 } from '@backstage/plugin-search-backend-module-catalog'; +import { CatalogCollatorEntityTransformer as CatalogCollatorEntityTransformer_2 } from '@backstage/plugin-search-backend-module-catalog'; import { CatalogEntityDocument } from '@backstage/plugin-catalog-common'; import { CatalogProcessor as CatalogProcessor_2 } from '@backstage/plugin-catalog-node'; import { CatalogProcessorCache as CatalogProcessorCache_2 } from '@backstage/plugin-catalog-node'; @@ -26,7 +26,7 @@ import { CatalogProcessorRelationResult as CatalogProcessorRelationResult_2 } fr import { CatalogProcessorResult as CatalogProcessorResult_2 } from '@backstage/plugin-catalog-node'; import { Config } from '@backstage/config'; import { DefaultCatalogCollatorFactory as DefaultCatalogCollatorFactory_2 } from '@backstage/plugin-search-backend-module-catalog'; -import type { DefaultCatalogCollatorFactoryOptions as DefaultCatalogCollatorFactoryOptions_2 } from '@backstage/plugin-search-backend-module-catalog'; +import { DefaultCatalogCollatorFactoryOptions as DefaultCatalogCollatorFactoryOptions_2 } from '@backstage/plugin-search-backend-module-catalog'; import { DeferredEntity as DeferredEntity_2 } from '@backstage/plugin-catalog-node'; import { EntitiesSearchFilter as EntitiesSearchFilter_2 } from '@backstage/plugin-catalog-node'; import { Entity } from '@backstage/catalog-model'; @@ -38,7 +38,6 @@ import { EntityProviderMutation as EntityProviderMutation_2 } from '@backstage/p import { EntityRelationSpec as EntityRelationSpec_2 } from '@backstage/plugin-catalog-node'; import { EventBroker } from '@backstage/plugin-events-node'; import { GetEntitiesRequest } from '@backstage/catalog-client'; -import { JsonValue } from '@backstage/types'; import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common'; import { locationSpecToLocationEntity as locationSpecToLocationEntity_2 } from '@backstage/plugin-catalog-node'; import { locationSpecToMetadataName as locationSpecToMetadataName_2 } from '@backstage/plugin-catalog-node'; @@ -48,6 +47,10 @@ import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; import { PermissionRule } from '@backstage/plugin-permission-node'; import { PermissionRuleParams } from '@backstage/plugin-permission-common'; +import { PlaceholderResolver as PlaceholderResolver_2 } from '@backstage/plugin-catalog-node'; +import { PlaceholderResolverParams as PlaceholderResolverParams_2 } from '@backstage/plugin-catalog-node'; +import { PlaceholderResolverRead as PlaceholderResolverRead_2 } from '@backstage/plugin-catalog-node'; +import { PlaceholderResolverResolveUrl as PlaceholderResolverResolveUrl_2 } from '@backstage/plugin-catalog-node'; import { PluginDatabaseManager } from '@backstage/backend-common'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { PluginTaskScheduler } from '@backstage/backend-tasks'; @@ -160,7 +163,7 @@ export class CatalogBuilder { setLocationAnalyzer(locationAnalyzer: LocationAnalyzer): CatalogBuilder; setPlaceholderResolver( key: string, - resolver: PlaceholderResolver, + resolver: PlaceholderResolver_2, ): CatalogBuilder; setProcessingInterval( processingInterval: ProcessingIntervalFunction, @@ -349,8 +352,8 @@ export class FileReaderProcessor implements CatalogProcessor_2 { // @public (undocumented) export type LocationAnalyzer = { analyzeLocation( - location: AnalyzeLocationRequest, - ): Promise; + location: AnalyzeLocationRequest_2, + ): Promise; }; // @public @deprecated @@ -401,34 +404,22 @@ export class PlaceholderProcessor implements CatalogProcessor_2 { // @public (undocumented) export type PlaceholderProcessorOptions = { - resolvers: Record; + resolvers: Record; reader: UrlReader; integrations: ScmIntegrationRegistry; }; // @public @deprecated (undocumented) -export type PlaceholderResolver = ( - params: PlaceholderResolverParams, -) => Promise; +export type PlaceholderResolver = PlaceholderResolver_2; // @public @deprecated (undocumented) -export type PlaceholderResolverParams = { - key: string; - value: JsonValue; - baseUrl: string; - read: PlaceholderResolverRead; - resolveUrl: PlaceholderResolverResolveUrl; - emit: CatalogProcessorEmit_2; -}; +export type PlaceholderResolverParams = PlaceholderResolverParams_2; // @public @deprecated (undocumented) -export type PlaceholderResolverRead = (url: string) => Promise; +export type PlaceholderResolverRead = PlaceholderResolverRead_2; // @public @deprecated (undocumented) -export type PlaceholderResolverResolveUrl = ( - url: string, - base: string, -) => string; +export type PlaceholderResolverResolveUrl = PlaceholderResolverResolveUrl_2; // @public export type ProcessingIntervalFunction = () => number; diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts index 080958da9b..71095adefc 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts @@ -29,7 +29,7 @@ import { DbRefreshStateRow, DbRelationsRow, } from './tables'; -import { createRandomProcessingInterval } from '../processing/refresh'; +import { createRandomProcessingInterval } from '../processing'; import { timestampToDateTime } from './conversion'; import { generateStableHash } from './util'; diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts index 2daf8e6fc5..6eea03e0d9 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts @@ -20,7 +20,7 @@ import { DeferredEntity } from '@backstage/plugin-catalog-node'; import { Knex } from 'knex'; import lodash from 'lodash'; import type { Logger } from 'winston'; -import { ProcessingIntervalFunction } from '../processing/refresh'; +import { ProcessingIntervalFunction } from '../processing'; import { rethrowError, timestampToDateTime } from './conversion'; import { initDatabaseMetrics } from './metrics'; import { diff --git a/plugins/catalog-backend/src/deprecated.ts b/plugins/catalog-backend/src/deprecated.ts index 2201bbbab4..72c3cad225 100644 --- a/plugins/catalog-backend/src/deprecated.ts +++ b/plugins/catalog-backend/src/deprecated.ts @@ -14,6 +14,14 @@ * limitations under the License. */ +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, +} from '@backstage/plugin-catalog-common'; import { locationSpecToMetadataName as _locationSpecToMetadataName, locationSpecToLocationEntity as _locationSpecToLocationEntity, @@ -36,9 +44,18 @@ import { type EntityProviderConnection as _EntityProviderConnection, type EntityProviderMutation as _EntityProviderMutation, type AnalyzeOptions as _AnalyzeOptions, + type PlaceholderResolver as _PlaceholderResolver, + type PlaceholderResolverParams as _PlaceholderResolverParams, + type PlaceholderResolverRead as _PlaceholderResolverRead, + type PlaceholderResolverResolveUrl as _PlaceholderResolverResolveUrl, type ScmLocationAnalyzer as _ScmLocationAnalyzer, } from '@backstage/plugin-catalog-node'; -import { type LocationSpec as _LocationSpec } from '@backstage/plugin-catalog-common'; +import { + defaultCatalogCollatorEntityTransformer as _defaultCatalogCollatorEntityTransformer, + DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory, + type CatalogCollatorEntityTransformer as _CatalogCollatorEntityTransformer, + type DefaultCatalogCollatorFactoryOptions as _DefaultCatalogCollatorFactoryOptions, +} from '@backstage/plugin-search-backend-module-catalog'; /** * @public @@ -165,3 +182,95 @@ export type AnalyzeOptions = _AnalyzeOptions; * @deprecated import from `@backstage/plugin-catalog-node` instead */ export type ScmLocationAnalyzer = _ScmLocationAnalyzer; + +/** + * @public + * @deprecated import from `@backstage/plugin-catalog-node` instead + */ +export type PlaceholderResolver = _PlaceholderResolver; + +/** + * @public + * @deprecated import from `@backstage/plugin-catalog-node` instead + */ +export type PlaceholderResolverParams = _PlaceholderResolverParams; + +/** + * @public + * @deprecated import from `@backstage/plugin-catalog-node` instead + */ +export type PlaceholderResolverRead = _PlaceholderResolverRead; + +/** + * @public + * @deprecated import from `@backstage/plugin-catalog-node` instead + */ +export type PlaceholderResolverResolveUrl = _PlaceholderResolverResolveUrl; + +/** + * @public + * @deprecated use the same type from `@backstage/plugin-catalog-common` instead + */ +export type AnalyzeLocationRequest = _AnalyzeLocationRequest; +/** + * @public + * @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/CatalogRules.test.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts index 592b1dda21..19c231884c 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts @@ -17,7 +17,7 @@ import { Entity } from '@backstage/catalog-model'; import { ConfigReader } from '@backstage/config'; import { DefaultCatalogRulesEnforcer } from './CatalogRules'; -import { LocationSpec } from '@backstage/plugin-catalog-node'; +import { LocationSpec } from '@backstage/plugin-catalog-common'; const entity = { user: { diff --git a/plugins/catalog-backend/src/ingestion/index.ts b/plugins/catalog-backend/src/ingestion/index.ts index c97d029b5c..a6555dd98d 100644 --- a/plugins/catalog-backend/src/ingestion/index.ts +++ b/plugins/catalog-backend/src/ingestion/index.ts @@ -14,11 +14,4 @@ * limitations under the License. */ -export type { - AnalyzeLocationEntityField, - AnalyzeLocationExistingEntity, - AnalyzeLocationGenerateEntity, - AnalyzeLocationRequest, - AnalyzeLocationResponse, - 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 3875d3af03..6ca0ab259b 100644 --- a/plugins/catalog-backend/src/ingestion/types.ts +++ b/plugins/catalog-backend/src/ingestion/types.ts @@ -15,57 +15,10 @@ */ import { - AnalyzeLocationRequest as NonDeprecatedAnalyzeLocationRequest, - AnalyzeLocationResponse as NonDeprecatedAnalyzeLocationResponse, - AnalyzeLocationExistingEntity as NonDeprecatedAnalyzeLocationExistingEntity, - AnalyzeLocationGenerateEntity as NonDeprecatedAnalyzeLocationGenerateEntity, - AnalyzeLocationEntityField as NonDeprecatedAnalyzeLocationEntityField, + AnalyzeLocationRequest, + AnalyzeLocationResponse, } from '@backstage/plugin-catalog-common'; -/** - * @public - * @deprecated use the same type from `@backstage/plugin-catalog-common` instead - */ -export type AnalyzeLocationRequest = NonDeprecatedAnalyzeLocationRequest; -/** - * @public - * @deprecated use the same type from `@backstage/plugin-catalog-common` instead - */ -export type AnalyzeLocationResponse = NonDeprecatedAnalyzeLocationResponse; - -/** - * 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 = { /** diff --git a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts index 2ce7975e41..094f8f1df8 100644 --- a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts +++ b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts @@ -17,13 +17,15 @@ import { UrlReader } from '@backstage/backend-common'; import { Entity } from '@backstage/catalog-model'; import { ConfigReader } from '@backstage/config'; import { ScmIntegrations } from '@backstage/integration'; -import { CatalogProcessorResult } from '@backstage/plugin-catalog-node'; import { - jsonPlaceholderResolver, - PlaceholderProcessor, + CatalogProcessorResult, PlaceholderResolver, PlaceholderResolverParams, PlaceholderResolverRead, +} from '@backstage/plugin-catalog-node'; +import { + jsonPlaceholderResolver, + PlaceholderProcessor, textPlaceholderResolver, yamlPlaceholderResolver, } from './PlaceholderProcessor'; diff --git a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts index ee61e931e3..f6431cc9f5 100644 --- a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts +++ b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.ts @@ -23,45 +23,11 @@ import { LocationSpec } from '@backstage/plugin-catalog-common'; import { CatalogProcessor, CatalogProcessorEmit, + PlaceholderResolver, + PlaceholderResolverParams, processingResult, } from '@backstage/plugin-catalog-node'; -/** - * @public - * @deprecated Use the exported value from `@backstage/plugin-catalog-node` instead. - */ -export type PlaceholderResolverRead = (url: string) => Promise; - -/** - * @public - * @deprecated Use the exported value from `@backstage/plugin-catalog-node` instead. - */ -export type PlaceholderResolverResolveUrl = ( - url: string, - base: string, -) => string; - -/** - * @public - * @deprecated Use the exported value from `@backstage/plugin-catalog-node` instead. - */ -export type PlaceholderResolverParams = { - key: string; - value: JsonValue; - baseUrl: string; - read: PlaceholderResolverRead; - resolveUrl: PlaceholderResolverResolveUrl; - emit: CatalogProcessorEmit; -}; - -/** - * @public - * @deprecated Use the exported value from `@backstage/plugin-catalog-node` instead. - */ -export type PlaceholderResolver = ( - params: PlaceholderResolverParams, -) => Promise; - /** @public */ export type PlaceholderProcessorOptions = { resolvers: Record; diff --git a/plugins/catalog-backend/src/modules/core/index.ts b/plugins/catalog-backend/src/modules/core/index.ts index 364cede069..365def0bfe 100644 --- a/plugins/catalog-backend/src/modules/core/index.ts +++ b/plugins/catalog-backend/src/modules/core/index.ts @@ -21,12 +21,6 @@ export { FileReaderProcessor } from './FileReaderProcessor'; export { LocationEntityProcessor } from './LocationEntityProcessor'; export type { LocationEntityProcessorOptions } from './LocationEntityProcessor'; export { PlaceholderProcessor } from './PlaceholderProcessor'; -export type { - PlaceholderProcessorOptions, - PlaceholderResolver, - PlaceholderResolverParams, - PlaceholderResolverRead, - PlaceholderResolverResolveUrl, -} from './PlaceholderProcessor'; +export type { PlaceholderProcessorOptions } from './PlaceholderProcessor'; export { UrlReaderProcessor } from './UrlReaderProcessor'; export { parseEntityYaml } from '../util/parse'; diff --git a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts index ce9221e16e..4fe0311fff 100644 --- a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts +++ b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.test.ts @@ -18,7 +18,7 @@ import { NotAllowedError } from '@backstage/errors'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; import { createConditionTransformer } from '@backstage/plugin-permission-node'; import { isEntityKind } from '../permissions/rules/isEntityKind'; -import { CatalogPermissionRule } from '../permissions/rules'; +import { CatalogPermissionRule } from '../permissions'; import { AuthorizedEntitiesCatalog } from './AuthorizedEntitiesCatalog'; import { Cursor, QueryEntitiesResponse } from '../catalog/types'; import { Entity } from '@backstage/catalog-model'; diff --git a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts index 6a04c4d7a1..f302a2b75a 100644 --- a/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts +++ b/plugins/catalog-backend/src/service/AuthorizedEntitiesCatalog.ts @@ -38,7 +38,7 @@ import { QueryEntitiesRequest, QueryEntitiesResponse, } from '../catalog/types'; -import { basicEntityFilter } from './request/basicEntityFilter'; +import { basicEntityFilter } from './request'; import { isQueryEntitiesCursorRequest } from './util'; import { EntityFilter } from '@backstage/plugin-catalog-node'; diff --git a/plugins/catalog-backend/src/service/CatalogBuilder.ts b/plugins/catalog-backend/src/service/CatalogBuilder.ts index f8ed166118..0abaf2ec0a 100644 --- a/plugins/catalog-backend/src/service/CatalogBuilder.ts +++ b/plugins/catalog-backend/src/service/CatalogBuilder.ts @@ -39,6 +39,7 @@ import { CatalogProcessorParser, EntitiesSearchFilter, EntityProvider, + PlaceholderResolver, ScmLocationAnalyzer, } from '@backstage/plugin-catalog-node'; import { @@ -47,7 +48,6 @@ import { CodeOwnersProcessor, FileReaderProcessor, PlaceholderProcessor, - PlaceholderResolver, UrlReaderProcessor, } from '../modules'; import { ConfigLocationEntityProvider } from '../modules/core/ConfigLocationEntityProvider'; @@ -59,7 +59,7 @@ import { yamlPlaceholderResolver, } from '../modules/core/PlaceholderProcessor'; import { defaultEntityDataParser } from '../modules/util/parse'; -import { LocationAnalyzer } from '../ingestion/types'; +import { LocationAnalyzer } from '../ingestion'; import { CatalogProcessingEngine } from '../processing'; import { DefaultProcessingDatabase } from '../database/DefaultProcessingDatabase'; import { applyDatabaseMigrations } from '../database/migrations'; @@ -71,7 +71,7 @@ import { DefaultStitcher } from '../stitching/DefaultStitcher'; import { createRandomProcessingInterval, ProcessingIntervalFunction, -} from '../processing/refresh'; +} from '../processing'; import { createRouter } from './createRouter'; import { DefaultRefreshService } from './DefaultRefreshService'; import { AuthorizedRefreshService } from './AuthorizedRefreshService'; @@ -92,7 +92,7 @@ import { createPermissionIntegrationRouter, } from '@backstage/plugin-permission-node'; import { AuthorizedEntitiesCatalog } from './AuthorizedEntitiesCatalog'; -import { basicEntityFilter } from './request/basicEntityFilter'; +import { basicEntityFilter } from './request'; import { catalogPermissions, RESOURCE_TYPE_CATALOG_ENTITY, diff --git a/plugins/catalog-backend/src/service/CatalogPlugin.ts b/plugins/catalog-backend/src/service/CatalogPlugin.ts index 538fe4a69e..bfe8ef5a16 100644 --- a/plugins/catalog-backend/src/service/CatalogPlugin.ts +++ b/plugins/catalog-backend/src/service/CatalogPlugin.ts @@ -30,10 +30,10 @@ import { import { CatalogProcessor, EntityProvider, + PlaceholderResolver, ScmLocationAnalyzer, } from '@backstage/plugin-catalog-node'; import { loggerToWinstonLogger } from '@backstage/backend-common'; -import { PlaceholderResolver } from '../modules'; class CatalogProcessingExtensionPointImpl implements CatalogProcessingExtensionPoint diff --git a/plugins/catalog-backend/src/service/createRouter.ts b/plugins/catalog-backend/src/service/createRouter.ts index 70b15c640d..2522966408 100644 --- a/plugins/catalog-backend/src/service/createRouter.ts +++ b/plugins/catalog-backend/src/service/createRouter.ts @@ -29,7 +29,7 @@ import { Logger } from 'winston'; import yn from 'yn'; import { z } from 'zod'; import { EntitiesCatalog } from '../catalog/types'; -import { LocationAnalyzer } from '../ingestion/types'; +import { LocationAnalyzer } from '../ingestion'; import { CatalogProcessingOrchestrator } from '../processing/types'; import { validateEntityEnvelope } from '../processing/util'; import { diff --git a/plugins/catalog-backend/src/tests/integration.test.ts b/plugins/catalog-backend/src/tests/integration.test.ts index 5511677851..f3101a04e0 100644 --- a/plugins/catalog-backend/src/tests/integration.test.ts +++ b/plugins/catalog-backend/src/tests/integration.test.ts @@ -49,7 +49,7 @@ import { } from '../processing/DefaultCatalogProcessingEngine'; import { DefaultCatalogProcessingOrchestrator } from '../processing/DefaultCatalogProcessingOrchestrator'; import { connectEntityProviders } from '../processing/connectEntityProviders'; -import { CatalogProcessingEngine } from '../processing/types'; +import { CatalogProcessingEngine } from '../processing'; import { DefaultEntitiesCatalog } from '../service/DefaultEntitiesCatalog'; import { DefaultRefreshService } from '../service/DefaultRefreshService'; import { RefreshOptions, RefreshService } from '../service/types';