basalt / core/src / BasaltPlugin
Interface: BasaltPlugin<TConfig>
Defined in: core/src/plugin.ts:18
Type Parameters
TConfig
TConfig = unknown
Properties
configSchema?
> optional configSchema?: ConfigSchema<TConfig>
Defined in: core/src/plugin.ts:24
Validates the plugin's config slice at boot — fail fast
dependsOn?
> optional dependsOn?: string[]
Defined in: core/src/plugin.ts:22
Names of plugins that must register/boot before this one
name
> name: string
Defined in: core/src/plugin.ts:20
Unique name, by convention basalt:<package> or app:<name>
Methods
boot()?
> optional boot(context): void | Promise<void>
Defined in: core/src/plugin.ts:28
Phase 2: connect, subscribe to hooks, start resources.
Parameters
context
PluginContext<TConfig>
Returns
void | Promise<void>
register()?
> optional register(context): void | Promise<void>
Defined in: core/src/plugin.ts:26
Phase 1: register bindings in the container. No I/O side effects.
Parameters
context
PluginContext<TConfig>
Returns
void | Promise<void>
shutdown()?
> optional shutdown(context): void | Promise<void>
Defined in: core/src/plugin.ts:30
Graceful shutdown, in reverse boot order.
Parameters
context
PluginContext<TConfig>
Returns
void | Promise<void>