Merge branch 'master' of github.com:spotify/backstage into shmidt-i/proxy-plugin

This commit is contained in:
Ivan Shmidt
2020-07-08 09:27:09 +02:00
47 changed files with 430 additions and 190 deletions
+15 -14
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.1.1-alpha.12",
"version": "0.1.1-alpha.13",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
@@ -18,16 +18,17 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.1.1-alpha.12",
"@backstage/catalog-model": "^0.1.1-alpha.12",
"@backstage/config": "^0.1.1-alpha.12",
"@backstage/config-loader": "^0.1.1-alpha.12",
"@backstage/plugin-auth-backend": "^0.1.1-alpha.12",
"@backstage/plugin-catalog-backend": "^0.1.1-alpha.12",
"@backstage/plugin-identity-backend": "^0.1.1-alpha.12",
"@backstage/plugin-proxy-backend": "^0.1.1-alpha.12",
"@backstage/plugin-scaffolder-backend": "^0.1.1-alpha.12",
"@backstage/plugin-sentry-backend": "^0.1.1-alpha.12",
"@backstage/plugin-proxy-backend": "^0.1.1-alpha.13",
"@backstage/backend-common": "^0.1.1-alpha.13",
"@backstage/catalog-model": "^0.1.1-alpha.13",
"@backstage/config": "^0.1.1-alpha.13",
"@backstage/config-loader": "^0.1.1-alpha.13",
"@backstage/plugin-auth-backend": "^0.1.1-alpha.13",
"@backstage/plugin-catalog-backend": "^0.1.1-alpha.13",
"@backstage/plugin-identity-backend": "^0.1.1-alpha.13",
"@backstage/plugin-scaffolder-backend": "^0.1.1-alpha.13",
"@backstage/plugin-sentry-backend": "^0.1.1-alpha.13",
"@backstage/plugin-techdocs-backend": "^0.1.1-alpha.13",
"dockerode": "^3.2.0",
"express": "^4.17.1",
"knex": "^0.21.1",
@@ -35,10 +36,10 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.1.1-alpha.12",
"@backstage/cli": "^0.1.1-alpha.13",
"@types/dockerode": "^2.5.32",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
"@types/helmet": "^0.0.47",
"@types/dockerode": "^2.5.32"
"@types/helmet": "^0.0.47"
}
}
+3
View File
@@ -36,6 +36,7 @@ import identity from './plugins/identity';
import scaffolder from './plugins/scaffolder';
import sentry from './plugins/sentry';
import proxy from './plugins/proxy';
import techdocs from './plugins/techdocs';
import { PluginEnvironment } from './types';
function makeCreateEnv(loadedConfigs: AppConfig[]) {
@@ -65,6 +66,7 @@ async function main() {
const authEnv = useHotMemoize(module, () => createEnv('auth'));
const identityEnv = useHotMemoize(module, () => createEnv('identity'));
const proxyEnv = useHotMemoize(module, () => createEnv('proxy'));
const techdocsEnv = useHotMemoize(module, () => createEnv('techdocs'));
const service = createServiceBuilder(module)
.loadConfig(configReader)
@@ -76,6 +78,7 @@ async function main() {
)
.addRouter('/auth', await auth(authEnv))
.addRouter('/identity', await identity(identityEnv))
.addRouter('/techdocs', await techdocs(techdocsEnv))
.addRouter('/', await proxy(proxyEnv));
await service.start().catch(err => {
+22
View File
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Spotify AB
*
* 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.
*/
import { createRouter } from '@backstage/plugin-techdocs-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin({ logger }: PluginEnvironment) {
return await createRouter({ logger });
}