Merge pull request #1158 from spotify/freben/location-processors-3

RFC: Improve the way that locations are read
This commit is contained in:
Fredrik Adelöw
2020-06-08 15:07:29 +02:00
committed by GitHub
24 changed files with 677 additions and 564 deletions
+4 -11
View File
@@ -19,24 +19,17 @@ import {
DatabaseEntitiesCatalog,
DatabaseLocationsCatalog,
DatabaseManager,
DescriptorParsers,
LocationReaders,
IngestionModels,
runPeriodically,
HigherOrderOperations,
LocationReaders,
runPeriodically,
} from '@backstage/plugin-catalog-backend';
import { PluginEnvironment } from '../types';
import { EntityPolicies } from '@backstage/catalog-model';
export default async function createPlugin({
logger,
database,
}: PluginEnvironment) {
const ingestionModel = new IngestionModels(
new LocationReaders(),
new DescriptorParsers(),
new EntityPolicies(),
);
const locationReader = new LocationReaders(logger);
const db = await DatabaseManager.createDatabase(database, logger);
const entitiesCatalog = new DatabaseEntitiesCatalog(db);
@@ -44,7 +37,7 @@ export default async function createPlugin({
const higherOrderOperation = new HigherOrderOperations(
entitiesCatalog,
locationsCatalog,
ingestionModel,
locationReader,
logger,
);
+1 -1
View File
@@ -9,7 +9,7 @@
"target": "es2019",
"module": "commonjs",
"esModuleInterop": true,
"lib": ["es2019"],
"lib": ["es2019", "dom"],
"types": ["node", "jest"]
}
}