Add changesets

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-09-13 16:55:51 +02:00
parent c45976d0f1
commit 89fd81a1ab
2 changed files with 42 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
---
'@backstage/create-app': patch
---
This change adds an API endpoint for requesting a catalog refresh at `/refresh`, which is activated if a `CatalogProcessingEngine` is passed to `createRouter`.
The creation of the router has been abstracted behind the `CatalogBuilder` to simplify usage and future changes. The following changes are **changes are required** to your `catalog.ts`.
```diff
- import {
- CatalogBuilder,
- createRouter,
- } from '@backstage/plugin-catalog-backend';
+ import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
- const {
- entitiesCatalog,
- locationAnalyzer,
- processingEngine,
- locationService,
- } = await builder.build();
+ const { processingEngine, router } = await builder.build();
await processingEngine.start();
- return await createRouter({
- entitiesCatalog,
- locationAnalyzer,
- locationService,
- logger: env.logger,
- config: env.config,
- });
+ return router;
}
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': minor
---
Add API endpoint for requesting a catalog refresh at `/refresh`, which is activated if a `CatalogProcessingEngine` is passed to `createRouter`.