diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index b4d2862d6f..14eb36a3a6 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -70,7 +70,6 @@ backend.add(searchLoader); backend.add(import('@backstage/plugin-techdocs-backend')); backend.add(import('@backstage/plugin-signals-backend')); backend.add(import('@backstage/plugin-notifications-backend')); -backend.add(import('./systemMetadataPlugin')); backend.add(rootSystemMetadataServiceFactory); backend.add(import('@backstage/plugin-events-backend-module-google-pubsub')); diff --git a/packages/backend/src/systemMetadataPlugin.ts b/packages/backend/src/systemMetadataPlugin.ts deleted file mode 100644 index df74962d6f..0000000000 --- a/packages/backend/src/systemMetadataPlugin.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2025 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 { - coreServices, - createBackendPlugin, -} from '@backstage/backend-plugin-api'; -import { rootSystemMetadataServiceRef } from '@backstage/backend-plugin-api/alpha'; -import Router from 'express-promise-router'; - -/** - * Example plugin that shows how to reveal all installed plugins with the - * system metadata API. - */ -export default createBackendPlugin({ - pluginId: 'system-metadata-router', - register: reg => { - reg.registerInit({ - deps: { - systemMetadata: rootSystemMetadataServiceRef, - rootHttpRouter: coreServices.rootHttpRouter, - }, - async init({ systemMetadata, rootHttpRouter }) { - const router = Router(); - router.get('/plugins', async (_, res) => { - const plugins = (await systemMetadata.getInstalledPlugins()).toSorted( - (a, b) => a.pluginId.localeCompare(b.pluginId), - ); - res.json(plugins); - }); - - rootHttpRouter.use('/.backstage/systemMetadata', router); - }, - }); - }, -});