Class JsPluginNpmPackageRegistration

java.lang.Object
io.deephaven.server.plugin.js.JsPluginNpmPackageRegistration
All Implemented Interfaces:
Registration

public final class JsPluginNpmPackageRegistration extends Object implements Registration
Registers the JS plugins sourced from the NPM package roots as specified via the configuration properties that start with "deephaven.jsPlugins.". This configuration is meant for development-oriented use-cases and is done on a "best-effort" basis.

The configuration value of the above property corresponds to the JsPlugin.path() directory. A "package.json" must exist in this directory (as specified via package-json). The "name" json value corresponds to JsPlugin.name(), the "version" json value corresponds to JsPlugin.version(), and the "main" json value corresponds to JsPlugin.main(). Furthermore, the top-level directory of the "main" json value will be used to set JsPlugin.paths() using Paths.ofPrefixes(Path); for example, a "main" of "build/index.js" will limit the resources to the "build/" directory; a "main" of "dist/bundle/index.js" will limit the resources to the "dist/" directory.