Constructs an imports factory around a DappConfig configuration
object. The resulting imports differ depending on the scopes
field
in the configuration as well as the scheduler
field, for cronjobs.
Note that this constructor is private to prevent the instanciation of
multiple instances of this class. Use the ScopeFactory.create method
to create the instance once.
An instance of DappConfig that will be used to initialize {@link ConfigModule}.
The imports that are always returned. This includes currently
only the ConfigModule
that is available with nest. The module
is automatically initialized with the DappConfig object.
Base imports consist in imports that are used with both types of
processes: scoped modules and scheduler modules.
The singleton instance. This instance is created once per process and will be re-used afterwards.
Returns an array of nest AbstractAppModule
that are enabled
(opt-in) through the dApp configuration with the field
named scopes
(config/dapp.json).
i.e. if you enable the discovery
scope by setting
"scopes": ["discovery"]
in your config/dapp.json, this
method will return the DiscoveryModule.
Note that this method returns only Scopes
modules.
A list of dynamic modules that are enabled as modules.
Returns an array of nest AbstractAppModule
that are enabled
(opt-in) through the dApp configuration with the field
named scopes
(config/dapp.json). This method returns all
cronjobs (schedulers / commands) that must be registered
for a given scope.
i.e. if you enable the discovery
scope by setting
"scopes": ["discovery"]
in your config/dapp.json, this
method will register the DiscoveryAccountsModule and the
DiscoverAccountsCommand.
Note that this method returns only Schedulers
modules.
A list of dynamic modules that are enabled as schedulers.
Creates an imports factory around a DappConfig configuration object. This class is intended to be used with the singleton pattern and thereby authorizes the creation of only one class instance per running process.
The singleton instance of the class configured around a DappConfig.
Generated using TypeDoc
COMMON
Singleton class that serves as a helper to aggregate and dynamically configure nest module imports. A differentiation is done around scoped- and scheduler imports. In fact, the configuration of the dApp may enable (opt-in) specific scopes and schedulers.
v0.1.0