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:133
Properties
_config
• Protected
_config: BootConfig
Defined in
packages/core/src/Bootstrap.ts:125
_oc
• Protected
_oc: ObjectContainer
Defined in
packages/core/src/Bootstrap.ts:124
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:266
_bindPluginDependencies
▸ _bindPluginDependencies(name
, plugin
): 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. |
plugin | InitPluginConfig | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:298
_initPluginServices
▸ _initPluginServices(plugin
): void
Service initialization for the dynamically loaded plugins.
Parameters
Name | Type | Description |
---|---|---|
plugin | InitPluginConfig | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:336
_initPluginSettings
▸ _initPluginSettings(name
, plugin
): 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. |
plugin | InitPluginConfig | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:230
_initRoutes
▸ _initRoutes(): void
Initializes the routes.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:311
_initServices
▸ _initServices(): void
Initializes the basic application services.
Returns
void
Defined in
packages/core/src/Bootstrap.ts:319
_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:186
initPlugin
▸ initPlugin(name
, plugin?
): void
Initializes dynamically loaded plugin. This is explicitly called from within the Plugin Loader instance.
Parameters
Name | Type | Description |
---|---|---|
name | string | Plugin name. |
plugin? | InitPluginConfig | Plugin interface (object with init functions). |
Returns
void
Defined in
packages/core/src/Bootstrap.ts:169
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 | BootConfig | The application environment configuration for the current environment. |
Returns
void