catalog/next: Wire API with locationStore, fix filtering

Co-authored-by: Ben Lambert <ben@blam.sh>
Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-05-05 16:38:14 +02:00
parent 4ac335883b
commit 1f1511e768
7 changed files with 290 additions and 30 deletions
+4 -3
View File
@@ -20,6 +20,7 @@ import {
createRouter,
NextCatalogBuilder,
runPeriodically,
createNextRouter,
} from '@backstage/plugin-catalog-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
@@ -36,18 +37,18 @@ export default async function createPlugin(
const builder = new NextCatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
locationAnalyzer,
processingEngine,
locationService,
} = await builder.build();
// TODO(jhaals): run and manage in background.
await processingEngine.start();
return await createRouter({
return await createNextRouter({
entitiesCatalog,
locationsCatalog,
locationAnalyzer,
locationService,
logger: env.logger,
config: env.config,
});