From f170e17d38035b92d8880a97aa382a6b88712d56 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 25 Jan 2024 13:25:34 +0100 Subject: [PATCH] chore: remove azure sites from example backend Signed-off-by: blam --- packages/backend/package.json | 1 - packages/backend/src/index.ts | 3 -- packages/backend/src/plugins/azure-sites.ts | 34 --------------------- yarn.lock | 3 +- 4 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 packages/backend/src/plugins/azure-sites.ts diff --git a/packages/backend/package.json b/packages/backend/package.json index f76a40a8f0..a7c80adfdb 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -37,7 +37,6 @@ "@backstage/plugin-auth-backend": "workspace:^", "@backstage/plugin-auth-node": "workspace:^", "@backstage/plugin-azure-devops-backend": "workspace:^", - "@backstage/plugin-azure-sites-backend": "workspace:^", "@backstage/plugin-azure-sites-common": "workspace:^", "@backstage/plugin-badges-backend": "workspace:^", "@backstage/plugin-catalog-backend": "workspace:^", diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 323fc27005..bade028597 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -41,7 +41,6 @@ import healthcheck from './plugins/healthcheck'; import { metricsHandler, metricsInit } from './metrics'; import auth from './plugins/auth'; import azureDevOps from './plugins/azure-devops'; -import azureSites from './plugins/azure-sites'; import catalog from './plugins/catalog'; import codeCoverage from './plugins/codecoverage'; import entityFeedback from './plugins/entityFeedback'; @@ -146,7 +145,6 @@ async function main() { const createEnv = makeCreateEnv(config); - const azureSitesEnv = useHotMemoize(module, () => createEnv('azure-sites')); const healthcheckEnv = useHotMemoize(module, () => createEnv('healthcheck')); const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); const codeCoverageEnv = useHotMemoize(module, () => @@ -191,7 +189,6 @@ async function main() { apiRouter.use('/tech-insights', await techInsights(techInsightsEnv)); apiRouter.use('/auth', await auth(authEnv)); apiRouter.use('/azure-devops', await azureDevOps(azureDevOpsEnv)); - apiRouter.use('/azure-sites', await azureSites(azureSitesEnv)); apiRouter.use('/search', await search(searchEnv)); apiRouter.use('/techdocs', await techdocs(techdocsEnv)); apiRouter.use('/todo', await todo(todoEnv)); diff --git a/packages/backend/src/plugins/azure-sites.ts b/packages/backend/src/plugins/azure-sites.ts deleted file mode 100644 index 54c7746cb2..0000000000 --- a/packages/backend/src/plugins/azure-sites.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2023 The Backstage Authors - * - * 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, - AzureSitesApi, -} from '@backstage/plugin-azure-sites-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; -import { CatalogClient } from '@backstage/catalog-client'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const catalogApi = new CatalogClient({ discoveryApi: env.discovery }); - return await createRouter({ - logger: env.logger, - permissions: env.permissions, - azureSitesApi: AzureSitesApi.fromConfig(env.config), - catalogApi, - }); -} diff --git a/yarn.lock b/yarn.lock index 0e3d81bc7f..740da02ff9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4961,7 +4961,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-azure-sites-backend@workspace:^, @backstage/plugin-azure-sites-backend@workspace:plugins/azure-sites-backend": +"@backstage/plugin-azure-sites-backend@workspace:plugins/azure-sites-backend": version: 0.0.0-use.local resolution: "@backstage/plugin-azure-sites-backend@workspace:plugins/azure-sites-backend" dependencies: @@ -26746,7 +26746,6 @@ __metadata: "@backstage/plugin-auth-backend": "workspace:^" "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-azure-devops-backend": "workspace:^" - "@backstage/plugin-azure-sites-backend": "workspace:^" "@backstage/plugin-azure-sites-common": "workspace:^" "@backstage/plugin-badges-backend": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^"