{"_id":"@aljesusg/backstage-plugin-apicurio-backend","name":"@aljesusg/backstage-plugin-apicurio-backend","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aljesusg/backstage-plugin-apicurio-backend","version":"0.1.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"},"repository":{"type":"git","url":"git+https://github.com/janus-idp/backstage-plugins.git"},"dependencies":{"@backstage/backend-common":"^0.18.4","@backstage/config":"^1.0.7","@backstage/errors":"^1.1.5","@aljesusg/backstage-plugin-apicurio-common":"*","@types/express":"*","express":"^4.17.1","express-promise-router":"^4.1.0","node-fetch":"^2.6.7","winston":"^3.2.1","yn":"^4.0.0"},"devDependencies":{"@backstage/cli":"^0.22.6","@types/supertest":"2.0.12","msw":"^1.0.0","supertest":"^6.2.4"},"gitHead":"f887d2354fc8b2570aedd61f1c10b1ed8376805c","description":"Welcome to the apicurio backend plugin!","bugs":{"url":"https://github.com/janus-idp/backstage-plugins/issues"},"homepage":"https://github.com/janus-idp/backstage-plugins#readme","_id":"@aljesusg/backstage-plugin-apicurio-backend@0.1.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-fFea8jrlmN6oyo++CMMii9mGsE/Q7sk4MQ/cNPoNtGnmsC5Upk3q3uc0lbDXVOM8BUbXV1dHszAU19Mprt34uQ==","shasum":"1faf24451f7356453c03df55e465b254e839d396","tarball":"https://registry.npmjs.org/@aljesusg/backstage-plugin-apicurio-backend/-/backstage-plugin-apicurio-backend-0.1.0.tgz","fileCount":5,"unpackedSize":29622,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtjWU4UvXkUooWg0jKZvk3Hw6KtlA+jJdpEUWVLQ0mBwIhAM/gavFAj3vBVHBxT+7vdixNfk4euJ9vIKqGFzC4Yu+J"}]},"_npmUser":{"name":"aljesusg","email":"agutierr@redhat.com"},"directories":{},"maintainers":[{"name":"aljesusg","email":"agutierr@redhat.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/backstage-plugin-apicurio-backend_0.1.0_1686905916611_0.601608840718524"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-16T08:58:36.529Z","0.1.0":"2023-06-16T08:58:36.754Z","modified":"2023-06-16T08:58:36.934Z"},"maintainers":[{"name":"aljesusg","email":"agutierr@redhat.com"}],"description":"Welcome to the apicurio backend plugin!","homepage":"https://github.com/janus-idp/backstage-plugins#readme","repository":{"type":"git","url":"git+https://github.com/janus-idp/backstage-plugins.git"},"bugs":{"url":"https://github.com/janus-idp/backstage-plugins/issues"},"license":"Apache-2.0","readme":"# apicurio\n\nWelcome to the apicurio backend plugin!\n\n_This plugin was created through the Backstage CLI_\n\n## Getting started\n\nYour plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn\nstart` in the root directory, and then navigating to [/apicurio](http://localhost:3000/apicurio).\n\nYou can also serve the plugin in isolation by running `yarn start` in the plugin directory.\nThis method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.\nIt is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory.\n\n## Install apicurio backend plugin\n\n```bash\n# From your Backstage root directory\nyarn add --cwd packages/backend @backstage/backstage-plugin-apicurio-backend\n```\n\nCreate a file called `apicurio.ts` inside `packages/backend/src/plugins/` and\nadd the following:\n\n```ts title=\"packages/backend/src/plugins/apicurio.ts\"\nimport { createRouter } from '@janus-idp/backstage-plugin-apicurio-backend';\nimport { Router } from 'express';\nimport { PluginEnvironment } from '../types';\n\nexport 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\nAnd import the plugin to `packages/backend/src/index.ts`. There are three lines\nof code you'll need to add, and they should be added near similar code in your\nexisting Backstage backend.\n\n```typescript title=\"packages/backend/src/index.ts\"\n// ..\n/* highlight-add-next-line */\nimport apicurio from './plugins/apicurio';\n\nasync function main() {\n  // ...\n  /* highlight-add-next-line */\n  const apicurioEnv = useHotMemoize(module, () => createEnv('apicurio'));\n  // ...\n  /* highlight-add-next-line */\n  apiRouter.use('/apicurio', await apicurio(apicurioEnv));\n```\n\nThat's it! The Apicurio backend have now been added to your Backstage app.\n\n# Setup configuration\n\nAdd in app-config under catalog\n\n```yaml\ncatalog:\n  providers:\n    apicurio:\n      url: http://localhost:8080\n```\n","readmeFilename":"README.md"}