Class: Bootstrap
@ima/core.Bootstrap
Application bootstrap used to initialize the environment and the application itself.
Constructors
constructor
• new Bootstrap(oc
)
Initializes the bootstrap.
Parameters
Name | Type | Description |
---|---|---|
oc | ObjectContainer | The application's object container to use for managing dependencies. |
Defined in
packages/core/src/Bootstrap.ts:76
Properties
_config
• Protected
_config: Config
Defined in
packages/core/src/Bootstrap.ts:69
_oc
• Protected
_oc: ObjectContainer
Defined in
packages/core/src/Bootstrap.ts:68
Methods
_bindDependencies
▸ _bindDependencies(): void
Binds the constants, service providers and class dependencies to the object container.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:213
_bindPluginDependencies
▸ _bindPluginDependencies(name
, module
): void
Binds the constants, service providers and class dependencies to the object container for dynamically imported plugins.
Parameters
Name | Type | Description |
---|---|---|
name | string | Plugin name. |
module | Module | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:245
_initPluginServices
▸ _initPluginServices(module
): void
Service initialization for the dynamically loaded plugins.
Parameters
Name | Type | Description |
---|---|---|
module | Module | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:285
_initPluginSettings
▸ _initPluginSettings(name
, module
): void
Initializes dynamically loaded plugin settings (if the init function is provided). The settings are merged into the application the same way as with non-dynamic import, meaning the app setting overrides are prioritized over the default plugin settings.
Parameters
Name | Type | Description |
---|---|---|
name | string | Plugin name. |
module | Module | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:180
_initRoutes
▸ _initRoutes(): void
Initializes the routes.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:260
_initServices
▸ _initServices(): void
Initializes the basic application services.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:268
_initSettings
▸ _initSettings(): void
Initializes the application settings. The method loads the settings for all environments and then picks the settings for the current environment.
The method also handles using the values in the production environment as default values for configuration items in other environments.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:136
initPlugin
▸ initPlugin(name
, module?
): void
Initializes dynamically loaded plugin. This is explicitly called from within the Plugin Loader instance.
Parameters
Name | Type | Description |
---|---|---|
name | string | Plugin name. |
module? | Module | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:119
run
▸ run(config
): void
Initializes the application by running the bootstrap sequence. The sequence initializes the components of the application in the following order:
- application settings
- constants, service providers and class dependencies configuration
- services
- UI components
- routing
Parameters
Name | Type | Description |
---|---|---|
config | Config | The application environment configuration for the current environment. |
Returns
void