Release a plugin
Share your plugin from a GitHub repository, a local directory, or an installed package, and state which SDK and host capabilities it needs.
On this page
You release a plugin by publishing its source or its package where DSUI can load it. Four numbers are separate: the version of the Plugin SDK that you build with, your plugin’s metadata.version, the plugin API version metadata.apiVersion, and the DSUI version that runs it. A Plugin SDK release doesn’t publish the product or change installed DSUI.
Prepare the package#
DSUI finds a plugin’s server entry in package.json, in this order:
main, orexports["."](alsoexportsas a string)src/plugin.ts, when the package names neither
The entry must be a TypeScript file whose default export is the plugin from definePlugin. DSUI doesn’t read dsui.entry for plugins. For a browser component, add dsui.browser with the path of the browser entry. See custom components.
Pin the exact version of @northgraindata/dsui-plugin-sdk that you tested. Set metadata.apiVersion to 1, the plugin API that DSUI supports. State the lowest DSUI version and the optional host capabilities that your plugin needs in its README and release notes. See versions and compatibility.
Choose how people load it#
source: git: DSUI downloads a GitHub repository and builds it on start. People setrepository, and optionallyref(defaultmain),path, andtokenfor a private repository. Tell them to setrefto a tag or a commit SHAsource: local: DSUI builds a directory on the machine. Use it while you developpackage: an npm package that is already installed where DSUI can resolve it, such asnode_modulesnext to where DSUI starts. DSUI doesn’t download it. A package can setbrowserBundleto the specifier of its browser entry
plugins:
example-plugin:
package: "@your_org/dsui-plugin-example"
browserBundle: "@your_org/dsui-plugin-example/browser"DSUI doesn’t load prebuilt GitHub artifacts that are pinned with commit and integrity. It rejects those fields as an invalid configuration, so use source: git.
Trust and security#
A plugin runs inside the DSUI server, with the access of the server. DSUI disables dependency lifecycle scripts when it installs, and the plugin’s code still runs. People who load your plugin should read its source first. A plugin that handles authentication must also be loaded with critical: true. See authentication and authorization.
Releases of the SDK#
The Plugin SDK has its own versions, changelog, and plugin-sdk-vX.Y.Z tags. New plugins use @northgraindata/dsui-plugin-sdk. See versions and compatibility.