Change constant export

Signed-off-by: sblausten <sam@roadie.io>
This commit is contained in:
sblausten
2023-03-30 15:35:53 +02:00
parent 7565b49832
commit fb8c2971ae
6 changed files with 25 additions and 9 deletions
+3 -3
View File
@@ -113,6 +113,9 @@ export class BuiltinKindsEntityProcessor implements CatalogProcessor_2 {
validateEntityKind(entity: Entity): Promise<boolean>;
}
// @public (undocumented)
export const CATALOG_CONFLICTS_TOPIC = 'catalog.conflict';
// @public
export class CatalogBuilder {
addEntityPolicy(
@@ -167,9 +170,6 @@ export class CatalogBuilder {
export type CatalogCollatorEntityTransformer =
CatalogCollatorEntityTransformer_2;
// @public (undocumented)
export const catalogConflictsTopic = 'catalog.conflict';
// @public (undocumented)
export type CatalogEnvironment = {
logger: Logger;
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** @public */
export const CATALOG_CONFLICTS_TOPIC = 'catalog.conflict';
@@ -46,7 +46,7 @@ import { updateUnprocessedEntity } from './operations/refreshState/updateUnproce
import { generateStableHash } from './util';
import { EventBroker } from '@backstage/plugin-events-node';
import { DateTime } from 'luxon';
import { catalogConflictsTopic } from '../service';
import { CATALOG_CONFLICTS_TOPIC } from '../constants';
// The number of items that are sent per batch to the database layer, when
// doing .batchInsert calls to knex. This needs to be low enough to not cause
@@ -362,7 +362,7 @@ export class DefaultProcessingDatabase implements ProcessingDatabase {
);
if (this.options.eventBroker) {
await this.options.eventBroker?.publish({
topic: catalogConflictsTopic,
topic: CATALOG_CONFLICTS_TOPIC,
eventPayload: {
entity,
entityRef,
+1
View File
@@ -27,6 +27,7 @@ export * from './processing';
export * from './search';
export * from './service';
export * from './deprecated';
export * from './constants';
import {
DefaultCatalogCollatorFactory as _DefaultCatalogCollatorFactory,
@@ -118,9 +118,6 @@ export type CatalogEnvironment = {
permissions: PermissionEvaluator | PermissionAuthorizer;
};
/** @public */
export const catalogConflictsTopic = 'catalog.conflict';
/**
* A builder that helps wire up all of the component parts of the catalog.
*
+1 -1
View File
@@ -18,4 +18,4 @@ export type {
CatalogEnvironment,
CatalogPermissionRuleInput,
} from './CatalogBuilder';
export { CatalogBuilder, catalogConflictsTopic } from './CatalogBuilder';
export { CatalogBuilder } from './CatalogBuilder';