Merge branch 'master' into add-support-for-plugin-specific-db

This commit is contained in:
Patrik Oldsberg
2021-06-15 17:49:50 +02:00
committed by GitHub
253 changed files with 2621 additions and 2492 deletions
+26
View File
@@ -1,5 +1,31 @@
# example-backend
## 0.2.32
### Patch Changes
- Updated dependencies [9c63be545]
- Updated dependencies [92963779b]
- Updated dependencies [27a9b503a]
- Updated dependencies [66c6bfebd]
- Updated dependencies [55a253de2]
- Updated dependencies [70bc30c5b]
- Updated dependencies [db1c8f93b]
- Updated dependencies [5aff84759]
- Updated dependencies [f26e6008f]
- Updated dependencies [eda9dbd5f]
- Updated dependencies [4f8cf50fe]
- Updated dependencies [875809a59]
- @backstage/plugin-catalog-backend@0.10.2
- @backstage/backend-common@0.8.2
- @backstage/catalog-model@0.8.2
- @backstage/plugin-scaffolder-backend@0.12.0
- @backstage/catalog-client@0.3.13
- @backstage/plugin-search-backend-node@0.2.0
- @backstage/plugin-search-backend@0.2.0
- @backstage/plugin-proxy-backend@0.2.9
- example-app@0.2.32
## 0.2.30
### Patch Changes
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.30",
"version": "0.2.32",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,30 +27,30 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.8.0",
"@backstage/catalog-client": "^0.3.12",
"@backstage/catalog-model": "^0.8.0",
"@backstage/backend-common": "^0.8.2",
"@backstage/catalog-client": "^0.3.13",
"@backstage/catalog-model": "^0.8.2",
"@backstage/config": "^0.1.5",
"@backstage/plugin-app-backend": "^0.3.13",
"@backstage/plugin-auth-backend": "^0.3.12",
"@backstage/plugin-badges-backend": "^0.1.6",
"@backstage/plugin-catalog-backend": "^0.10.0",
"@backstage/plugin-catalog-backend": "^0.10.2",
"@backstage/plugin-code-coverage-backend": "^0.1.6",
"@backstage/plugin-graphql-backend": "^0.1.8",
"@backstage/plugin-kubernetes-backend": "^0.3.8",
"@backstage/plugin-kafka-backend": "^0.2.6",
"@backstage/plugin-proxy-backend": "^0.2.8",
"@backstage/plugin-proxy-backend": "^0.2.9",
"@backstage/plugin-rollbar-backend": "^0.1.11",
"@backstage/plugin-scaffolder-backend": "^0.11.4",
"@backstage/plugin-search-backend": "^0.1.5",
"@backstage/plugin-search-backend-node": "^0.1.3",
"@backstage/plugin-scaffolder-backend": "^0.12.0",
"@backstage/plugin-search-backend": "^0.2.0",
"@backstage/plugin-search-backend-node": "^0.2.0",
"@backstage/plugin-techdocs-backend": "^0.8.2",
"@backstage/plugin-todo-backend": "^0.1.6",
"@gitbeaker/node": "^30.2.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^10.1.1",
"dockerode": "^3.2.1",
"example-app": "^0.2.30",
"example-app": "^0.2.32",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"knex": "^0.95.1",
@@ -60,7 +60,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.6.13",
"@backstage/cli": "^0.7.0",
"@types/dockerode": "^3.2.1",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
+5 -39
View File
@@ -14,13 +14,9 @@
* limitations under the License.
*/
import { useHotCleanup } from '@backstage/backend-common';
import {
CatalogBuilder,
createRouter,
NextCatalogBuilder,
runPeriodically,
createNextRouter,
} from '@backstage/plugin-catalog-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
@@ -28,50 +24,20 @@ import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
/*
* ** WARNING **
* DO NOT enable the experimental catalog, it will brick your database migrations.
* This is solely for internal backstage development.
*/
if (process.env.EXPERIMENTAL_CATALOG === '1') {
const builder = new NextCatalogBuilder(env);
const {
entitiesCatalog,
locationAnalyzer,
processingEngine,
locationService,
} = await builder.build();
// TODO(jhaals): run and manage in background.
await processingEngine.start();
return await createNextRouter({
entitiesCatalog,
locationAnalyzer,
locationService,
logger: env.logger,
config: env.config,
});
}
const builder = new CatalogBuilder(env);
const builder = await CatalogBuilder.create(env);
const {
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer,
processingEngine,
locationService,
} = await builder.build();
useHotCleanup(
module,
runPeriodically(() => higherOrderOperation.refreshAllLocations(), 100000),
);
await processingEngine.start();
return await createRouter({
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer,
locationService,
logger: env.logger,
config: env.config,
});