Registry <Plugin, Tool>
Hierarchy
- Contract<RegistryOptions<Plugin>>
- Registry
Index
Events
readonlyonAfterRegister
readonlyonAfterUnregister
Called after a plugin is unregistered.
readonlyonBeforeRegister
Called before a plugin is registered and the startup
life-cycle.
readonlyonBeforeUnregister
Called before a plugin is unregistered and the shutdown
life-cycle.
readonlyonLoad
Called after a plugin is loaded but before it's registered.
Other
constructor
Type parameters
- Plugin: Pluggable<any>
- Tool = unknown
readonlydebug
readonlyoptions
Validated and configured options.
readonlypluralName
readonlyprojectName
readonlysingularName
blueprint
configure
Set an options object by merging the new partial and existing options with the defined blueprint, while running all validation checks. Freeze and return the options object.
object.configure({ name: 'Boost' });
object.configure((prevOptions) => ({
nestedObject: {
...prevOptions.nestedObject,
some: 'value',
},
}));
formatModuleName
Format a name into a fully qualified and compatible Node/npm module name, with the tool and type names being used as scopes and prefixes.
get
Return a single registered plugin by module name. If the plugin cannot be found, an error will be thrown.
Type parameters
- T: Pluggable<any> = Plugin
getAll
Return all registered plugins.
getMany
Return multiple registered plugins by module name.
isRegistered
Return true if a plugin has been registered.
load
Load and register a single plugin by name, or with an explicit instance.
loadMany
Load and register multiple plugins based on a list of settings.
register
Register a plugin and trigger startup with the provided tool.
unregister
Unregister a plugin by name and trigger shutdown process.
Called after a plugin is registered.