{"_id":"@adityasinghal26/plugin-oracle-cloud-backend","_rev":"3-e2b5bd0e866ca05a51d84246961ac78f","name":"@adityasinghal26/plugin-oracle-cloud-backend","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@adityasinghal26/plugin-oracle-cloud-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"},"repository":{"type":"git","url":"git+https://github.com/adityasinghal26/backstage-plugins.git","directory":"plugins/oracle-cloud-backend"},"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":{"@backstage/backend-common":"^0.20.0","@backstage/config":"^1.1.1","@types/express":"*","express":"^4.17.1","express-promise-router":"^4.1.0","node-fetch":"^2.6.7","oci-artifacts":"^2.76.0","oci-common":"^2.76.0","oci-identity":"^2.76.0","winston":"^3.2.1","yn":"^4.0.0"},"devDependencies":{"@backstage/cli":"^0.25.0","@types/supertest":"^2.0.12","msw":"^1.0.0","supertest":"^6.2.4"},"configSchema":"config.d.ts","_id":"@adityasinghal26/plugin-oracle-cloud-backend@0.1.0","gitHead":"824bfd800c367372bc7359c0a2956ecb5f0ebd96","description":"A backend plugin implementation to connect to the Oracle Cloud API.","bugs":{"url":"https://github.com/adityasinghal26/backstage-plugins/issues"},"homepage":"https://github.com/adityasinghal26/backstage-plugins#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-dP2dB5romCdLipJO+Nf5OXzT8hrohP1jmmV3ZCR0n3Cy5h66bXND7xmEdxPJlgBYBFzRut55ictWU/HTx+lZMg==","shasum":"f632ba326634314def59a1929147b7126a5e60f5","tarball":"https://registry.npmjs.org/@adityasinghal26/plugin-oracle-cloud-backend/-/plugin-oracle-cloud-backend-0.1.0.tgz","fileCount":6,"unpackedSize":69943,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8kZ97zT722gGPO72jxJyFc02/cCjteu7kZDViMeNSbAiEA0vczzjfLhV8M2iicvq93qJXG7pE5N64zdkpFZMrNTTE="}]},"_npmUser":{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"},"directories":{},"maintainers":[{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-oracle-cloud-backend_0.1.0_1704217205659_0.751349646600096"},"_hasShrinkwrap":false},"0.2.0":{"name":"@adityasinghal26/plugin-oracle-cloud-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"},"repository":{"type":"git","url":"https://github.com/adityasinghal26/backstage-plugins","directory":"plugins/oracle-cloud-backend"},"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":{"@backstage/backend-common":"^0.20.0","@backstage/config":"^1.1.1","@types/express":"*","express":"^4.17.1","express-promise-router":"^4.1.0","node-fetch":"^2.6.7","oci-artifacts":"^2.76.0","oci-common":"^2.76.0","oci-identity":"^2.76.0","winston":"^3.2.1","yn":"^4.0.0"},"devDependencies":{"@backstage/cli":"^0.25.0","@types/supertest":"^2.0.12","msw":"^1.0.0","supertest":"^6.2.4"},"keywords":["backstage","plugin","backend","oracle","oracle-cloud","oracle-cloud-infrastructure"],"configSchema":"config.d.ts","description":"A backend plugin implementation to connect to the Oracle Cloud API.","_id":"@adityasinghal26/plugin-oracle-cloud-backend@0.2.0","dist":{"shasum":"49a7dc25e2a5f653cf4ccb09a836ad6806ba972c","integrity":"sha512-iR1Pn4BF/4LBemZ2tewrP5Dl0Fbxx4kKRHrTf5AklGJ0xsTb5B4RMWvG9pIJz6GN3c3/c7/Ve4MnrooOa5dZqQ==","tarball":"https://registry.npmjs.org/@adityasinghal26/plugin-oracle-cloud-backend/-/plugin-oracle-cloud-backend-0.2.0.tgz","fileCount":12,"unpackedSize":72023,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfBwJ+EwLfXlXPxgR8WQIfvuFafuaCZ/Zi24C4Z+e/GQIgAw/RFmRZnk0WnfQuvOBItxCY4qZgcgsSYA6aGeYXnkQ="}]},"_npmUser":{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"},"directories":{},"maintainers":[{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-oracle-cloud-backend_0.2.0_1704218931958_0.1051470665902079"},"_hasShrinkwrap":false},"0.2.1":{"name":"@adityasinghal26/plugin-oracle-cloud-backend","version":"0.2.1","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"},"repository":{"type":"git","url":"git+https://github.com/adityasinghal26/backstage-plugins.git","directory":"plugins/oracle-cloud-backend"},"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":{"@backstage/backend-common":"^0.20.0","@backstage/config":"^1.1.1","@types/express":"*","express":"^4.17.1","express-promise-router":"^4.1.0","node-fetch":"^2.6.7","oci-artifacts":"^2.76.0","oci-common":"^2.76.0","oci-identity":"^2.76.0","winston":"^3.2.1","yn":"^4.0.0"},"devDependencies":{"@backstage/cli":"^0.25.0","@types/supertest":"^2.0.12","msw":"^1.0.0","supertest":"^6.2.4"},"keywords":["backstage","plugin","backend","oracle","oracle-cloud","oracle-cloud-infrastructure"],"configSchema":"config.d.ts","_id":"@adityasinghal26/plugin-oracle-cloud-backend@0.2.1","gitHead":"a96319f1e6d41bce541ee17f176a08524b3f0628","description":"A backend plugin implementation to connect to the Oracle Cloud API.","bugs":{"url":"https://github.com/adityasinghal26/backstage-plugins/issues"},"homepage":"https://github.com/adityasinghal26/backstage-plugins#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ohPgvIou8Ft7TCQq9DNZB94JyxfoPnHnwN3xt1SwBq7UtqzWm6FWoI7rMe0eB7a8IGMVsqQVumQUvSRdZ8jLxQ==","shasum":"3ef68688dd86ab01045d16c5e4c2cebf35cfe665","tarball":"https://registry.npmjs.org/@adityasinghal26/plugin-oracle-cloud-backend/-/plugin-oracle-cloud-backend-0.2.1.tgz","fileCount":7,"unpackedSize":76545,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFXbtaKhskJ4X/ah0QM3XG6zL/E8x3AI6WmzsUTVPi+cAiBn6y663l8NIfj6DWnz27NpdcqfBNvnClQvGGpTXq3WEA=="}]},"_npmUser":{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"},"directories":{},"maintainers":[{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-oracle-cloud-backend_0.2.1_1704219464235_0.006583787815918729"},"_hasShrinkwrap":false},"0.3.0":{"name":"@adityasinghal26/plugin-oracle-cloud-backend","version":"0.3.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"},"repository":{"type":"git","url":"git+https://github.com/adityasinghal26/backstage-plugins.git","directory":"plugins/oracle-cloud-backend"},"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":{"@backstage/backend-common":"^0.20.0","@backstage/config":"^1.1.1","@types/express":"*","express":"^4.17.1","express-promise-router":"^4.1.0","node-fetch":"^2.6.7","oci-artifacts":"^2.76.0","oci-common":"^2.76.0","oci-identity":"^2.76.0","winston":"^3.2.1","yn":"^4.0.0"},"devDependencies":{"@backstage/cli":"^0.25.0","@types/supertest":"^2.0.12","msw":"^1.0.0","supertest":"^6.2.4"},"keywords":["backstage","plugin","backend","oracle","oracle-cloud","oracle-cloud-infrastructure"],"configSchema":"config.d.ts","_id":"@adityasinghal26/plugin-oracle-cloud-backend@0.3.0","gitHead":"25de76b22a88db82939830d83c232fefd23bc86a","description":"A backend plugin implementation to connect to the Oracle Cloud API.","bugs":{"url":"https://github.com/adityasinghal26/backstage-plugins/issues"},"homepage":"https://github.com/adityasinghal26/backstage-plugins#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-yoMznfH626xDUioCuBYTonzqOqEyQI6Q6gZIbBial1qnu5NWQz3tFARyki4lyTIi46H5Y6lw6P7m9GgiF9Hglg==","shasum":"bc2c7fcefad1eed174478abadaa415fafaef508f","tarball":"https://registry.npmjs.org/@adityasinghal26/plugin-oracle-cloud-backend/-/plugin-oracle-cloud-backend-0.3.0.tgz","fileCount":7,"unpackedSize":82089,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC54grB6h2ufbi5v1NXBxtyuH6Muj2IByZfxo/O4zHemAiA++xC9EJIFm2mwlWYSSw9Pp3QS543Jv0hneUYXyrY9wg=="}]},"_npmUser":{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"},"directories":{},"maintainers":[{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-oracle-cloud-backend_0.3.0_1704302314040_0.0349894673107245"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-02T17:40:05.570Z","0.1.0":"2024-01-02T17:40:05.915Z","modified":"2024-01-03T17:18:34.345Z","0.2.0":"2024-01-02T18:08:52.217Z","0.2.1":"2024-01-02T18:17:44.393Z","0.3.0":"2024-01-03T17:18:34.203Z"},"maintainers":[{"name":"adityasinghal26","email":"adityasinghal2608@gmail.com"}],"description":"A backend plugin implementation to connect to the Oracle Cloud API.","repository":{"type":"git","url":"git+https://github.com/adityasinghal26/backstage-plugins.git","directory":"plugins/oracle-cloud-backend"},"license":"Apache-2.0","readme":"# Oracle Cloud Backend Plugin\r\n\r\nA backend plugin implementation to connect to the Oracle Cloud API.\r\n\r\n## Setup into a Backstage Instance\r\n\r\nThe plugin needs to be configured and then installed as per the steps in following section. \r\n\r\n### Configuration\r\n\r\nThe Oracle Cloud plugin allows either single or multiple Oracle Cloud tenancies, allowing to trigger REST APIs with the tenancy and profile name. The tenancy name (tenancyName) and the profile name (profile) in the API query parameters is optional, which if not provided, will utilise the default tenancy and the profile in the configuration.\r\n\r\n#### Oracle Configuration File\r\n\r\nBelow is a sample reference for Oracle configuration file. Here, the profile name is in square brackets '[]' and other details such as user ID, tenancy ID and region can be configured. You will also need to provide a path to your private PEM file for authentication.\r\n\r\n**Note:** It is advised to create one config file for each tenancy where different profiles such as DEFAULT, and test (in this example) can be configured with different users and regions.\r\n\r\n```\r\n[DEFAULT]\r\nuser=ocid1.user.oc1..<your_unique_id>\r\nfingerprint=<your_fingerprint>\r\ntenancy=ocid1.tenancy.oc1..<your_unique_id>\r\nregion=<your_region>\r\nkey_file=~/.oci/oci_api_key.pem\r\n\r\n[test]\r\nuser=ocid1.user.oc1..<your_unique_id_test>\r\nfingerprint=<your_fingerprint_test>\r\ntenancy=ocid1.tenancy.oc1..<your_unique_id>\r\nregion=<your_region>\r\nkey_file=~/.oci/oci_api_key.pem\r\n```\r\n\r\n#### Single Configuration\r\n\r\n```yaml\r\noracleCloud:\r\n  configFilePath: ./config\r\n  defaultProfile: test\r\n```\r\n\r\n#### Multiple Configurations\r\n\r\n```yaml\r\noracleCloud:\r\n  configFilePath: ./config\r\n  defaultProfile: test\r\n  tenancies:\r\n  - tenancyName: companyA\r\n    configFilePath: ./configA\r\n    defaultProfile: profileA1\r\n  - tenancyName: companyB\r\n    configFilePath: ./configB\r\n    defaultProfile: profileB1\r\n```\r\n\r\n#### Sample API to get tenancy details based on tenancy and profile configurations\r\n\r\nIf the query parameters tenancyName and profile are omitted or left empty, the plugin will consider the default values for both tenancy and profile configuration.\r\n\r\n```bash\r\ncurl --location 'http://localhost:7007/api/oracle-cloud/identity/tenancy?tenancyName=companyA&profile=profileA1'\r\n```\r\n\r\n### Up and Running\r\n\r\nFollow the below steps and integrate Oracle Cloud Backend plugin into your Backstage instance.\r\n\r\n1. First we need to add the `@backstage/plugin-oracle-cloud-backend` package to your backend:\r\n\r\n   ```sh\r\n   # From your Backstage root directory\r\n   yarn add --cwd packages/backend @adityasinghal26/plugin-oracle-cloud-backend\r\n   ```\r\n\r\n2. Then we will create a new file named `packages/backend/src/plugins/oracle-cloud.ts`, and add the\r\n   following to it:\r\n\r\n   ```ts\r\n   import { createRouter } from '@adityasinghal26/plugin-oracle-cloud-backend';\r\n   import { Router } from 'express';\r\n   import type { PluginEnvironment } from '../types';\r\n\r\n   export default function createPlugin(\r\n     env: PluginEnvironment,\r\n   ): Promise<Router> {\r\n     return createRouter({\r\n       logger: env.logger,\r\n       config: env.config,\r\n     });\r\n   }\r\n   ```\r\n\r\n3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`:\r\n\r\n   ```ts\r\n   import oracleCloud from './plugins/oracle-cloud';\r\n   // ...\r\n   async function main() {\r\n     // ...\r\n     // Add this line under the other lines that follow the useHotMemoize pattern\r\n     const oracleEnv = useHotMemoize(module, () => createEnv('oracleCloud'));\r\n     // ...\r\n     // Insert this line under the other lines that add their routers to apiRouter in the same way\r\n     apiRouter.use('/oracle-cloud', await oracleCloud(oracleEnv));\r\n   ```\r\n\r\n4. Now run `yarn start-backend` from the repo root\r\n5. Finally open `http://localhost:7007/api/oracle-cloud/health` in a browser/or from Postman and it should return `{\"status\":\"ok\"}`\r\n\r\n### New Backend System\r\n\r\nThe Oracle Cloud Backend plugin does not support the [new backend system](https://backstage.io/docs/backend-system/) currently. The plugin will be extended to support the same in upcoming versions.\r\n","readmeFilename":"README.md","keywords":["backstage","plugin","backend","oracle","oracle-cloud","oracle-cloud-infrastructure"],"homepage":"https://github.com/adityasinghal26/backstage-plugins#readme","bugs":{"url":"https://github.com/adityasinghal26/backstage-plugins/issues"}}