{"_id":"@axis-backstage-staging/plugin-statuspage-backend","name":"@axis-backstage-staging/plugin-statuspage-backend","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@axis-backstage-staging/plugin-statuspage-backend","version":"0.2.0","main":"src/index.ts","types":"src/index.ts","license":"Apache-2.0","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin"},"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@axis-backstage-staging/plugin-statuspage-common":"workspace:^","@backstage/backend-common":"^0.20.1","@backstage/backend-plugin-api":"^0.6.9","@backstage/config":"^1.1.1","@types/express":"*","cross-fetch":"^4.0.0","express":"^4.17.1","express-promise-router":"^4.1.0","winston":"^3.2.1"},"devDependencies":{"@backstage/cli":"^0.25.1"},"configSchema":"config.d.ts","_id":"@axis-backstage-staging/plugin-statuspage-backend@0.2.0","gitHead":"cc32eb925bac4c544aa398d29e0edced640c3264","description":"Welcome to the Statuspage backend plugin!","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-qgRsEMZdVO7fPoi5ClAfe5zcGAizQp+hoLjWZN+Od3XINZBzlnAnKcnmINCn5CaiBYJwrRdpcidhdDfJPHWSxg==","shasum":"4511b67f242e31514d9b28384452c76a08ae1629","tarball":"https://registry.npmjs.org/@axis-backstage-staging/plugin-statuspage-backend/-/plugin-statuspage-backend-0.2.0.tgz","fileCount":6,"unpackedSize":17277,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDS/qAu9slfFxcWumq9XAF/LZnPGOuGd4S+pPVFCvET+AiEAnYs8XkDPRytOOEGNFfq7IEvp63Kv6CzE9aEYzvIOEi4="}]},"_npmUser":{"name":"glundh","email":"gustaf.lundh@axis.com"},"directories":{},"maintainers":[{"name":"glundh","email":"gustaf.lundh@axis.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-statuspage-backend_0.2.0_1711036856519_0.5572260902538508"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-21T16:00:56.412Z","0.2.0":"2024-03-21T16:00:56.668Z","modified":"2024-03-21T16:00:57.245Z"},"maintainers":[{"name":"glundh","email":"gustaf.lundh@axis.com"}],"description":"Welcome to the Statuspage backend plugin!","license":"Apache-2.0","readme":"# Statuspage backend\n\nWelcome to the Statuspage backend plugin!\n\nThe plugin retrieves component status information the statuspage.io api.\n\n## Setup\n\nThe following sections will help you get the Readme Backend plugin setup and running.\n\n### Installation\n\nInstall the plugin by following the example below:\n\n```bash\n# From your Backstage root directory\nyarn --cwd packages/backend add @axis-backstage/plugin-statuspage-backend\n```\n\n### Integrating\n\nHere's how to get the backend plugin up and running:\n\n1. Create a new file named `packages/backend/src/plugins/statuspage.ts`, and add the following to it:\n\n   ```ts\n   import { PluginEnvironment } from '../types';\n   import { createRouter } from '@axis-backstage/plugin-statuspage-backend';\n   import { Router } from 'express';\n\n   export default async function createPlugin(\n     env: PluginEnvironment,\n   ): Promise<Router> {\n     return await createRouter({\n       logger: env.logger,\n       config: env.config,\n     });\n   }\n   ```\n\n2. Wire this into the overall backend router by adding the following to `packages/backend/src/index.ts`:\n\n   ```ts\n   import statuspage from './plugins/statuspage';\n   ...\n\n   async function main() {\n     // Add this line under the other lines that follow the useHotMemoize pattern\n    const statuspageEnv = useHotMemoize(module, () => createEnv('statuspage'));\n\n    ....\n\n     // Add this under the lines that add their routers to apiRouter\n    apiRouter.use('/statuspage', authMiddleware, await statuspage(statuspageEnv));\n   }\n   ```\n","readmeFilename":"README.md"}