diff --git a/plugins/sentry-backend/.eslintrc.js b/plugins/sentry-backend/.eslintrc.js deleted file mode 100644 index 16a033dbc6..0000000000 --- a/plugins/sentry-backend/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: [require.resolve('@backstage/cli/config/eslint.backend')], -}; diff --git a/plugins/sentry-backend/CHANGELOG.md b/plugins/sentry-backend/CHANGELOG.md deleted file mode 100644 index 9ddc9e1005..0000000000 --- a/plugins/sentry-backend/CHANGELOG.md +++ /dev/null @@ -1,97 +0,0 @@ -# @backstage/plugin-sentry-backend - -## 0.2.0 - -### Minor Changes - -- 075d3dc5a: The plugin uses the `proxy-backend` instead of a custom `sentry-backend`. - It requires a proxy configuration: - - `app-config.yaml`: - - ```yaml - proxy: - '/sentry/api': - target: https://sentry.io/api/ - allowedMethods: ['GET'] - headers: - Authorization: - $env: SENTRY_TOKEN # export SENTRY_TOKEN="Bearer " - ``` - - The `MockApiBackend` is no longer configured by the `NODE_ENV` variable. - Instead, the mock backend can be used with an api-override: - - `packages/app/src/apis.ts`: - - ```ts - import { createApiFactory } from '@backstage/core'; - import { MockSentryApi, sentryApiRef } from '@backstage/plugin-sentry'; - - export const apis = [ - // ... - - createApiFactory(sentryApiRef, new MockSentryApi()), - ]; - ``` - - If you already use the Sentry backend, you must remove it from the backend: - - Delete `packages/backend/src/plugins/sentry.ts`. - - ```diff - # packages/backend/package.json - - ... - "@backstage/plugin-scaffolder-backend": "^0.3.2", - - "@backstage/plugin-sentry-backend": "^0.1.3", - "@backstage/plugin-techdocs-backend": "^0.3.0", - ... - ``` - - ```diff - // packages/backend/src/index.html - - const apiRouter = Router(); - apiRouter.use('/catalog', await catalog(catalogEnv)); - apiRouter.use('/rollbar', await rollbar(rollbarEnv)); - apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); - - apiRouter.use('/sentry', await sentry(sentryEnv)); - apiRouter.use('/auth', await auth(authEnv)); - apiRouter.use('/techdocs', await techdocs(techdocsEnv)); - apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv)); - apiRouter.use('/proxy', await proxy(proxyEnv)); - apiRouter.use('/graphql', await graphql(graphqlEnv)); - apiRouter.use(notFoundHandler()); - ``` - -### Patch Changes - -- Updated dependencies [38e24db00] -- Updated dependencies [12bbd748c] - - @backstage/backend-common@0.4.0 - -## 0.1.3 - -### Patch Changes - -- Updated dependencies [1722cb53c] -- Updated dependencies [1722cb53c] -- Updated dependencies [7b37e6834] -- Updated dependencies [8e2effb53] - - @backstage/backend-common@0.3.0 - -## 0.1.2 - -### Patch Changes - -- Updated dependencies [5249594c5] -- Updated dependencies [56e4eb589] -- Updated dependencies [e37c0a005] -- Updated dependencies [f00ca3cb8] -- Updated dependencies [6579769df] -- Updated dependencies [8c2b76e45] -- Updated dependencies [440a17b39] -- Updated dependencies [8afce088a] -- Updated dependencies [7bbeb049f] - - @backstage/backend-common@0.2.0 diff --git a/plugins/sentry-backend/README.md b/plugins/sentry-backend/README.md deleted file mode 100644 index 7a559276be..0000000000 --- a/plugins/sentry-backend/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# sentry-backend - -> DEPRECATED - -Please use the [proxy-backend](../proxy-backend) instead. See [CHANGELOG.md](./CHANGELOG.md). diff --git a/plugins/sentry-backend/package.json b/plugins/sentry-backend/package.json deleted file mode 100644 index b3a10b4481..0000000000 --- a/plugins/sentry-backend/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@backstage/plugin-sentry-backend", - "version": "0.2.0", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", - "private": false, - "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" - }, - "scripts": { - "start": "backstage-cli backend:dev", - "build": "backstage-cli backend:build", - "lint": "backstage-cli lint", - "test": "backstage-cli test --passWithNoTests", - "prepack": "backstage-cli prepack", - "postpack": "backstage-cli postpack", - "clean": "backstage-cli clean" - }, - "dependencies": { - "@backstage/backend-common": "^0.4.0", - "@types/express": "^4.17.6", - "axios": "^0.20.0", - "compression": "^1.7.4", - "cors": "^2.8.5", - "express": "^4.17.1", - "express-promise-router": "^3.0.3", - "fs-extra": "^9.0.0", - "helmet": "^4.0.0", - "morgan": "^1.10.0", - "winston": "^3.2.1", - "yn": "^4.0.0" - }, - "devDependencies": { - "@backstage/cli": "^0.4.1" - }, - "files": [ - "dist" - ] -} diff --git a/plugins/sentry-backend/src/index.ts b/plugins/sentry-backend/src/index.ts deleted file mode 100644 index 6e1d12359e..0000000000 --- a/plugins/sentry-backend/src/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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 { Router } from 'express'; -import { Logger } from 'winston'; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const createRouter = async (_: Logger): Promise => Router(); - -throw new Error( - 'The sentry-backend has been deprecated and replaced by the proxy-backend. See the ' + - 'changelog on how to migrate to the proxy backend: https://github.com/backstage/backstage/blob/master/plugins/sentry/CHANGELOG.md.', -);