{"_id":"@edubois10/plugin-entity-feedback-backend-dynamic","name":"@edubois10/plugin-entity-feedback-backend-dynamic","dist-tags":{"latest":"0.2.20"},"versions":{"0.2.20":{"name":"@edubois10/plugin-entity-feedback-backend-dynamic","version":"0.2.20","backstage":{"role":"backend-plugin","pluginId":"entity-feedback","pluginPackages":["@backstage-community/plugin-entity-feedback","@backstage-community/plugin-entity-feedback-backend","@backstage-community/plugin-entity-feedback-common"]},"publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"homepage":"https://backstage.io","repository":{"type":"git","url":"git+https://github.com/backstage/community-plugins.git","directory":"workspaces/entity-feedback/plugins/entity-feedback-backend"},"license":"Apache-2.0","main":"dist/index.cjs.js","types":"dist/index.d.ts","dependencies":{"@backstage-community/plugin-entity-feedback-common":"0.1.8","@types/express":"*","express":"^4.18.1","express-promise-router":"^4.1.0","knex":"^3.0.0","node-fetch":"^2.6.7","yn":"^4.0.0"},"bundleDependencies":["@backstage-community/plugin-entity-feedback-common","@types/express","express","express-promise-router","knex","node-fetch","yn"],"peerDependencies":{"@backstage/backend-common":"^0.23.3","@backstage/backend-plugin-api":"^0.7.0","@backstage/catalog-client":"^1.6.5","@backstage/catalog-model":"^1.5.0","@backstage/config":"^1.2.0","@backstage/errors":"^1.2.4","@backstage/plugin-auth-node":"^0.4.17"},"overrides":{"@aws-sdk/util-utf8-browser":{"@smithy/util-utf8":"^2.0.0"}},"resolutions":{"@aws-sdk/util-utf8-browser":"npm:@smithy/util-utf8@~2","@backstage-community/plugin-entity-feedback-common":"file:./embedded/backstage-community-plugin-entity-feedback-common"},"_id":"@edubois10/plugin-entity-feedback-backend-dynamic@0.2.20","description":"Welcome to the entity-feedback backend plugin!","bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"_integrity":"sha512-21mmbZTI24QIBVFESZ8cKuqtKuIJjteOn84jU8BAQ6XuLbMxNvZcztTyhD2mNMn3hA40seKnW6JqCtioszZA8Q==","_resolved":"/Users/etiennedubois/RedHat/rhdh/rhdh-community-plugin/dynamic-plugin-packages/edubois10-plugin-entity-feedback-backend-dynamic-0.2.20.tgz","_from":"file:edubois10-plugin-entity-feedback-backend-dynamic-0.2.20.tgz","_nodeVersion":"18.19.0","_npmVersion":"10.8.0","dist":{"integrity":"sha512-21mmbZTI24QIBVFESZ8cKuqtKuIJjteOn84jU8BAQ6XuLbMxNvZcztTyhD2mNMn3hA40seKnW6JqCtioszZA8Q==","shasum":"ec0d05f610966b1298d98f4cf3e04714f20898bb","tarball":"https://registry.npmjs.org/@edubois10/plugin-entity-feedback-backend-dynamic/-/plugin-entity-feedback-backend-dynamic-0.2.20.tgz","fileCount":2201,"unpackedSize":8155380,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpKiwENvQC5qnVI7w1Acl6vWTq7ggcDRIGz4BLtr9WkAiALirnPukU1AZl9N9QrIzUyIlj8W1+hkMyAthVKBR2okg=="}]},"_npmUser":{"name":"edubois10","email":"edubois@redhat.com"},"directories":{},"maintainers":[{"name":"edubois10","email":"edubois@redhat.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-entity-feedback-backend-dynamic_0.2.20_1736766479737_0.06185697323959216"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-13T11:07:59.667Z","0.2.20":"2025-01-13T11:08:00.030Z","modified":"2025-01-13T11:08:00.302Z"},"maintainers":[{"name":"edubois10","email":"edubois@redhat.com"}],"description":"Welcome to the entity-feedback backend plugin!","homepage":"https://backstage.io","repository":{"type":"git","url":"git+https://github.com/backstage/community-plugins.git","directory":"workspaces/entity-feedback/plugins/entity-feedback-backend"},"bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"license":"Apache-2.0","readme":"# Entity Feedback Backend\n\nWelcome to the entity-feedback backend plugin!\n\n## Installation\n\nNote: this plugin requires authentication and identity configured so Backstage can identify\nwhich user has rated the entity. If you are using the guest identity provider which comes\nout of the box, this plugin will not work when you test it.\n\n### Install the package\n\n```bash\n# From your Backstage root directory\nyarn --cwd packages/backend add @backstage-community/plugin-entity-feedback-backend\n```\n\n### Adding the plugin to your `packages/backend`\n\nYou'll need to add the plugin to the router in your `backend` package. You can do this by creating a file called `packages/backend/src/plugins/entityFeedback.ts`\n\n```tsx\nimport { createRouter } from '@backstage-community/plugin-entity-feedback-backend';\nimport { Router } from 'express';\nimport { PluginEnvironment } from '../types';\n\nexport default function createPlugin(env: PluginEnvironment): Promise<Router> {\n  return createRouter({\n    database: env.database,\n    discovery: env.discovery,\n    identity: env.identity,\n    logger: env.logger,\n  });\n}\n```\n\nWith the `entityFeedback.ts` router setup in place, add the router to `packages/backend/src/index.ts`:\n\n```diff\n+import entityFeedback from './plugins/entityFeedback';\n\nasync function main() {\n  ...\n  const createEnv = makeCreateEnv(config);\n\n  const catalogEnv = useHotMemoize(module, () => createEnv('catalog'));\n+ const entityFeedbackEnv = useHotMemoize(module, () => createEnv('entityFeedback'));\n\n  const apiRouter = Router();\n+ apiRouter.use('/entity-feedback', await entityFeedback(entityFeedbackEnv));\n  ...\n  apiRouter.use(notFoundHandler());\n\n```\n\n### New Backend System\n\nThe Entity Feedback backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up:\nIn your `packages/backend/src/index.ts` make the following changes:\n\n```diff\n  import { createBackend } from '@backstage/backend-defaults';\n\n  const backend = createBackend();\n\n  // ... other feature additions\n\n+ backend.add(import(@backstage-community/plugin-entity-feedback-backend));\n\nbackend.start();\n```\n","readmeFilename":"README.md"}