{"_id":"@dhelfand/rh1-devquote-plugin","name":"@dhelfand/rh1-devquote-plugin","dist-tags":{"latest":"0.2.6"},"versions":{"0.2.6":{"name":"@dhelfand/rh1-devquote-plugin","version":"0.2.6","main":"src/index.ts","types":"src/index.ts","license":"Apache-2.0","publishConfig":{"access":"public"},"backstage":{"role":"frontend-plugin"},"dependencies":{"@parsifal-m/plugin-dev-quotes-homepage":"^3.0.3","react":"^18.2.0","react-dom":"^18.2.0"},"devDependencies":{"@backstage/cli":"0.23.1","@janus-idp/cli":"1.4.3"},"scripts":{"clean":"backstage-cli package clean","build":"backstage-cli package build","export-dynamic":"janus-cli package export-dynamic-plugin"},"scalprum":{"name":"bbalasub.rh1-devquote-plugin","exposedModules":{"PluginRoot":"./src/index.ts"}},"description":"1. Clone this repository. 2. Create `app-config.yaml` at the project root with the following contents. ``` app: baseUrl: \"https://plugin.com\" ``` 3. Execute the following command: ``` yarn install yarn tsc yarn build yarn run export-dynamic yarn publish `","_id":"@dhelfand/rh1-devquote-plugin@0.2.6","dist":{"shasum":"f7bfdb09236951835092c2cefbe0c4e7bb4cebed","integrity":"sha512-02eL3+gluhMqZ/YJJxLZajPgX7CkxIrRKiKPp4qIATR8x0cZf4FBsnpzu5vdN/jScLR6MomRke4Pz7RHVj/llA==","tarball":"https://registry.npmjs.org/@dhelfand/rh1-devquote-plugin/-/rh1-devquote-plugin-0.2.6.tgz","fileCount":29,"unpackedSize":962513,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9iqvm6lld/WP4GHVIU73/AP11EB3/s+SjRXO4K+OTzQIhAMWpaFi3C+YJJ3pgQZh/dHVgUT9G5y5h7IoxISO8qsfG"}]},"_npmUser":{"name":"dhelfand","email":"helfand.4@gmail.com"},"directories":{},"maintainers":[{"name":"dhelfand","email":"helfand.4@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rh1-devquote-plugin_0.2.6_1728061076294_0.28541388418020075"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-04T16:57:56.218Z","0.2.6":"2024-10-04T16:57:56.641Z","modified":"2024-10-04T16:57:56.875Z"},"maintainers":[{"name":"dhelfand","email":"helfand.4@gmail.com"}],"description":"1. Clone this repository. 2. Create `app-config.yaml` at the project root with the following contents. ``` app: baseUrl: \"https://plugin.com\" ``` 3. Execute the following command: ``` yarn install yarn tsc yarn build yarn run export-dynamic yarn publish `","license":"Apache-2.0","readme":"## Steps to create a RHDH dynamic frontend wrapper plugin\n\n1. Clone this repository.\n2. Create `app-config.yaml` at the project root with the following contents.\n```\napp:\n  baseUrl: \"https://plugin.com\"\n```\n3. Execute the following command:\n```\nyarn install\nyarn tsc\nyarn build\nyarn run export-dynamic\nyarn publish \n```\n4. Setup RHDH using the Helm chart available in OpenShift. Use the following configuration. Note: Replace the value of `clusterRouterBase` with a relevant value.\n```\nglobal:\n  auth:\n    backend:\n      enabled: true\n      existingSecret: ''\n      value: ''\n  clusterRouterBase: <REPLACE>\n  dynamic:\n    includes:\n      - dynamic-plugins.default.yaml\n    plugins:\n      - integrity: >-\n          sha512-v+R2v0N0bWhJ9LVXy8WcJpl7TfvvPOPZbJe1O8Ej+2+A63FUevk3q9kCi5G1NB8EmSg52hgsv1KgUg1ZR+I7fg==\n        package: '@bbalasub/rh1-devquote-plugin@0.2.3'\n        pluginConfig:\n          dynamicPlugins:\n            frontend:\n              bbalasub.rh1-devquote-plugin:\n                dynamicRoutes:\n                  - importName: DevQuote\n                    menuItem:\n                      text: Quote\n                    path: /devquote\n                mountPoints:\n                  - config:\n                      layout:\n                        gridColumnEnd:\n                          lg: span 4\n                          md: span 6\n                          xs: span 12\n                    importName: DevQuote\n                    mountPoint: entity.page.overview/cards\n  host: ''\nroute:\n  annotations: {}\n  enabled: true\n  host: '{{ .Values.global.host }}'\n  path: /\n  tls:\n    caCertificate: ''\n    certificate: ''\n    destinationCACertificate: ''\n    enabled: true\n    insecureEdgeTerminationPolicy: Redirect\n    key: ''\n    termination: edge\n  wildcardPolicy: None\nupstream:\n  backstage:\n    appConfig:\n      app:\n        baseUrl: 'https://{{- include \"janus-idp.hostname\" . }}'\n      backend:\n        auth:\n          keys:\n            - secret: '${BACKEND_SECRET}'\n        baseUrl: 'https://{{- include \"janus-idp.hostname\" . }}'\n        cors:\n          origin: 'https://{{- include \"janus-idp.hostname\" . }}'\n        database:\n          connection:\n            password: '${POSTGRESQL_ADMIN_PASSWORD}'\n            user: postgres\n      catalog:\n        locations:\n          - target: >-\n              https://github.com/bbalakriz/rhdh-demo-catalog/blob/master/catalog-entities/all.yaml\n            type: url\n    args:\n      - '--config'\n      - dynamic-plugins-root/app-config.dynamic-plugins.yaml\n    command: []\n    extraEnvVars:\n      - name: BACKEND_SECRET\n        valueFrom:\n          secretKeyRef:\n            key: backend-secret\n            name: '{{ include \"janus-idp.backend-secret-name\" $ }}'\n      - name: POSTGRESQL_ADMIN_PASSWORD\n        valueFrom:\n          secretKeyRef:\n            key: postgres-password\n            name: '{{- include \"janus-idp.postgresql.secretName\" . }}'\n    extraVolumeMounts:\n      - mountPath: /opt/app-root/src/dynamic-plugins-root\n        name: dynamic-plugins-root\n    extraVolumes:\n      - ephemeral:\n          volumeClaimTemplate:\n            spec:\n              accessModes:\n                - ReadWriteOnce\n              resources:\n                requests:\n                  storage: 1Gi\n        name: dynamic-plugins-root\n      - configMap:\n          defaultMode: 420\n          name: dynamic-plugins\n          optional: true\n        name: dynamic-plugins\n      - name: dynamic-plugins-npmrc\n        secret:\n          defaultMode: 420\n          optional: true\n          secretName: dynamic-plugins-npmrc\n    image:\n      pullSecrets: []\n      registry: registry.redhat.io\n      repository: rhdh/rhdh-hub-rhel9\n      tag: 1.0-200\n    initContainers:\n      - command:\n          - ./install-dynamic-plugins.sh\n          - /dynamic-plugins-root\n        env:\n          - name: NPM_CONFIG_USERCONFIG\n            value: /opt/app-root/src/.npmrc.dynamic-plugins\n        image: '{{ include \"backstage.image\" . }}'\n        imagePullPolicy: Always\n        name: install-dynamic-plugins\n        volumeMounts:\n          - mountPath: /dynamic-plugins-root\n            name: dynamic-plugins-root\n          - mountPath: /opt/app-root/src/dynamic-plugins.yaml\n            name: dynamic-plugins\n            readOnly: true\n            subPath: dynamic-plugins.yaml\n          - mountPath: /opt/app-root/src/.npmrc.dynamic-plugins\n            name: dynamic-plugins-npmrc\n            readOnly: true\n            subPath: .npmrc\n        workingDir: /opt/app-root/src\n    installDir: /opt/app-root/src\n    livenessProbe:\n      failureThreshold: 3\n      httpGet:\n        path: /healthcheck\n        port: 7007\n        scheme: HTTP\n      initialDelaySeconds: 60\n      periodSeconds: 10\n      successThreshold: 1\n      timeoutSeconds: 2\n    podAnnotations:\n      checksum/dynamic-plugins: >-\n        {{- include \"common.tplvalues.render\" ( dict \"value\"\n        .Values.global.dynamic \"context\" $) | sha256sum }}\n    readinessProbe:\n      failureThreshold: 3\n      httpGet:\n        path: /healthcheck\n        port: 7007\n        scheme: HTTP\n      initialDelaySeconds: 30\n      periodSeconds: 10\n      successThreshold: 2\n      timeoutSeconds: 2\n  ingress:\n    host: '{{ .Values.global.host }}'\n  nameOverride: developer-hub\n  postgresql:\n    auth:\n      secretKeys:\n        adminPasswordKey: postgres-password\n        userPasswordKey: password\n    enabled: true\n    image:\n      registry: registry.redhat.io\n      repository: rhel9/postgresql-15\n      tag: latest\n    postgresqlDataDir: /var/lib/pgsql/data/userdata\n    primary:\n      containerSecurityContext:\n        enabled: false\n      extraEnvVars:\n        - name: POSTGRESQL_ADMIN_PASSWORD\n          valueFrom:\n            secretKeyRef:\n              key: postgres-password\n              name: '{{- include \"postgresql.v1.secretName\" . }}'\n      persistence:\n        enabled: true\n        mountPath: /var/lib/pgsql/data\n        size: 1Gi\n      podSecurityContext:\n        enabled: false\n```\n5. Log into RHDH portal. Access the `Overview` tab of the catalog item 'RH1 Dynamic Wrapper Plugin`. You should see a quote on the right side of the `Links` panel.\n6. On the side navigation bar that's available on the left side of the portal, you should see a link called \"Quote\". Click that to see a quote displayed on a new page. \n","readmeFilename":"README.md"}