Skip to main content

Class: Bootstrap

Defined in: packages/core/src/Bootstrap.ts:122

Application bootstrap used to initialize the environment and the application itself.

Constructors

Constructor

new Bootstrap(oc): Bootstrap

Defined in: packages/core/src/Bootstrap.ts:132

Initializes the bootstrap.

Parameters

oc

ObjectContainer

The application's object container to use for managing dependencies.

Returns

Bootstrap

Properties

_config

protected _config: BootConfig

Defined in: packages/core/src/Bootstrap.ts:124


_oc

protected _oc: ObjectContainer

Defined in: packages/core/src/Bootstrap.ts:123

Methods

_bindDependencies()

_bindDependencies(): Promise<void>

Defined in: packages/core/src/Bootstrap.ts:309

Binds the constants, service providers and class dependencies to the object container.

Returns

Promise<void>


_bindPluginDependencies()

_bindPluginDependencies(name, plugin): void

Defined in: packages/core/src/Bootstrap.ts:344

Binds the constants, service providers and class dependencies to the object container for dynamically imported plugins.

Parameters

name

string

Plugin name.

plugin

InitPluginConfig

Plugin interface (object with init functions).

Returns

void


_initPluginServices()

_initPluginServices(plugin): void

Defined in: packages/core/src/Bootstrap.ts:385

Service initialization for the dynamically loaded plugins.

Parameters

plugin

InitPluginConfig

Plugin interface (object with init functions).

Returns

void


_initPluginSettings()

_initPluginSettings(name, plugin): void

Defined in: packages/core/src/Bootstrap.ts:273

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

string

Plugin name.

plugin

InitPluginConfig

Plugin interface (object with init functions).

Returns

void


_initRoutes()

_initRoutes(): void

Defined in: packages/core/src/Bootstrap.ts:357

Initializes the routes.

Returns

void


_initServices()

_initServices(): Promise<void>

Defined in: packages/core/src/Bootstrap.ts:365

Initializes the basic application services.

Returns

Promise<void>


_initSettings()

_initSettings(): void

Defined in: packages/core/src/Bootstrap.ts:197

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


initPlugin()

initPlugin(name, plugin?): Promise<void>

Defined in: packages/core/src/Bootstrap.ts:175

Initializes dynamically loaded plugin. This is explicitly called from within the Plugin Loader instance.

Parameters

name

string

Plugin name.

plugin?

InitPluginConfig

Plugin interface (object with init functions).

Returns

Promise<void>


run()

run(config): Promise<void>

Defined in: packages/core/src/Bootstrap.ts:152

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

config

BootConfig

The application environment configuration for the current environment.

Returns

Promise<void>