Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@janus-idp/backend-plugin-manager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@janus-idp/backend-plugin-manager

Backstage plugin management backend

  • 0.0.2-janus.5
  • latest
  • v1.19.6
  • 493c4f8a6c156135377221c873a148c7095da1f3
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@backstage/backend-plugin-manager

This package adds experimental support for dynamic backend plugins, according to the content of the proposal in RFC 18390

Status

This package is EXPERIMENTAL, and is subject to change according to the discussions and conclusions that happen around the RFC mentioned above.

Testing the backend dynamic plugins feature

In order to test the dynamic backend plugins feature provided by this package, example applications, as well as example dynamic plugins have been provided in provided in the showcase repository, and instructions are provided in the related Readme.

How it works

The backend plugin manager is a service that scans a configured root directory (dynamicPlugins.rootDirectory in the app config) for dynamic plugin packages, and loads them dynamically.

In the backend-next application, it can be enabled by adding the backend-plugin-manager as a dependency in the package.json and the following lines in the src/index.ts file:

const backend = createBackend();
+
+ backend.add(dynamicPluginsFeatureDiscoveryServiceFactory()) // overridden version of the FeatureDiscoveryService which provides features loaded by dynamic plugins
+ backend.add(dynamicPluginsServiceFactory())
+

About the expected dynamic plugin structure

Due to some limitations of the current backstage codebase, the plugins need to be completed and repackaged to by used as dynamic plugins:

  1. they must provide a named entry point (dynamicPluginInstaller) of a specific type (BackendDynamicPluginInstaller), as can be found in the src/dynamic sub-folder of each dynamic plugin example provided in the showcase repository.
  2. they would have a modified package.json file in which dependencies are updated to share @backstage dependencies with the main application.
  3. they may embed some dependency whose code is then merged with the plugin code.

Points 2 and 3 can be done by the export-dynamic-plugin CLI command used to perform the repackaging

About the export-dynamic-plugin command

The export-dynamic-plugin CLI command, used the dynamic plugin examples provided in the showcase repository, is part of a @backstage/cli fork (@dfatwork-pkgs/backstage-cli@0.22.9-next.6), and can be used to help packaging the dynamic plugins according to the constraints mentioned above, in order to allow straightforward testing of the dynamic plugins feature.

However the backend-plugin-manager experimental package does not depend on the use of this additional CLI command, and in future steps of this backend dynamic plugin work, the use of such a dedicated command might not even be necessary.

About the support of the legacy backend system

The backend dynamic plugins feature clearly targets the new backend system. However some level of compatibility is provided with current backstage codebase, which still uses the legacy backend system, in order to allow testing and exploring dynamic backend plugin support on the widest range of contexts and installations. However, this is temporary and will be removed once the next backend is ready to be used and has completely replaced the old one. This is why the API related to the old backend is already marked as deprecated.

Future work

The current implementation of the backend plugin manager is a first step towards the final implementation of the dynamic backend plugins feature, which will be completed / simplified in future steps, as the status of the backstage codebase allows it.

Keywords

FAQs

Package last updated on 30 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc