The property name within package.json that holds the Imperative configuration object.
Used for internal imperative logging.
Internal reference to the set of configuration properties for all loaded plugins.
Internal reference to the overrides provided by plugins.
A set of bright dependencies used by plugins. Each item in the set contains the dependency's property name, and the the version of that dependency.
A class with recorded issues for each plugin for which problems were detected.
Used as a short-name access to PMF constants.
The CLI command tree with module globs already resolved.
The semantic versioning module (which does not have the typing to do an 'import').
Tracker to ensure that [init]{@link PluginManagementFacility#init} was called. Most methods cannot be used unless init was called first.
This is the variable that stores the specific instance of the PMF. Defined as static so that it can be accessed from anywhere.
Get the set of configuration properties for all loaded plugins.
Object that defines what overrides will be provided by all plugins.
Gets a single instance of the PMF. On the first call of PluginManagementFacility.instance, a new PMF is initialized and returned. Every subsequent call will use the one that was first created.
Add all installed plugins' commands and profiles into the host CLI's command tree.
The CLI command tree with module globs already resolved.
Add a new command group into the host CLI's resolved command tree. We had to wait until the host CLI was resolved, so that we could check for name conflicts. So each plugin's commands are added to the host CLI command tree after both have been resolved.
the name of the plugin to initialize
command definition group to to be added.
True upon success. False upon error, and errors are recorded in pluginIssues.
Add the specified plugin to the imperative command tree.
The configuration properties for this plugin
Compare the version of a plugin version property with a version property of its base CLI.
If the versions do not intersect (according so semver rules), then a PluginIssue is recorded.
The name of the plugin.
The name of the plugin property containing a version.
value of the plugin's version.
The name of the base CLI property containing a version.
value of the base CLI's version.
Does the supplied pluginGroupNm match an existing top-level name or alias in the imperative command tree? If a conflict occurs, plugIssues.doesPluginHaveError() will return true.
The name of the plugin that we are checking.
A plugin's command group definition..
A top-level command tree definition against which we compare the supplied pluginGroupNm. It is typically the imperative command tree.
False when find no conflicts.
message: the message describing the conflict
Form the absolute path to a runtime file for a plugin from a path name that is relative to the plugin's root directory (where its package.json lives).
The name of the plugin.
A relative path from plugin's root.
Typically supplied as ./lib/blah/blah/blah.
If not supplied, (or supplied as an an empty string,
the result will be a path to
Get the package name of our base CLI.
The CLI package name contained in the package.json 'name' property.
Initialize the PMF. Must be called to enable the various commands provided by the facility.
Loads the configuration properties of each plugin. The configuration information is used when overriding a piece of the imperative infrastructure with a plugin's capability, when validating each plugin, and when adding each plugin's commands to the CLI command tree. Errors are recorded in PluginIssues.
Read a plugin's configuration properties. The properties are obtained from the plugins package.json file, including it's imperative property.
the name of the plugin
Remove a command group that was previously added. We remove a command group if we discover errors after adding the command group.
command definition to be removed.
Produces a function that requires a module from a plugin using a relative path name from the plugin's root to the module. Used as a callback function from the ConfigurationLoader to load configuration handlers.
The name of the plugin/module to load.
Due to configuration errors, we use an override that purposely fails.
The name of the setting being processed.
The display name of override being processed.
The name of plugin supplying the override.
The text describing the reason for the error.
Validates that the semver range strings specified by the plugin for versions of the imperative framework and host CLI program are compatible with those specified in the host CLI.
Both range strings come from the package.json files of the plugin and the hosting CLI. We consider the version ranges to be compatible if the two ranges intersect. This should allow npm to download one common version of core and of imperative to be owned by the base CLI and shared by the plugin.
Any errors are recorded in PluginIssues.
The configuration properties for this plugin
Validate the plugin.
The configuration properties for this plugin
The command group to be added for this plugin, with all commands resolved into its children property.
PluginIssues contains the set of issues.
Validate a plugin's array of command definitions at the specified depth within the plugin's command definition tree. This is a recursive function used to navigate down through the command tree, validating as we go. If errors occur, they are recorded in PlugIssues.
The name of the plugin.
Array of plugin commands.
The depth within the plugin command tree at which we are validating. It is used within error messages.
Validate a plugin's array of profiles If errors occur, they are recorded in PlugIssues.
The name of the plugin.
Array of profiles.
Generated using TypeDoc
This class is the main engine for the Plugin Management Facility. The underlying class should be treated as a singleton and should be accessed via PluginManagmentFacility.instance.