Framework
StopContext<TConfig>
Interface: StopContext<TConfig>
Context provided to stop hooks. Runs SEQUENTIALLY: project first → plugins in REVERSE order.
Extends
StartContext<TConfig>
Type Parameters
| Type Parameter | Default type |
|---|---|
TConfig | unknown |
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
env | typeof Env | Environment variable access. | StartContext.env |
logger | Logger | Logger instance prefixed with plugin name. | StartContext.logger |
meta | { name: string; version: string; } | Plugin metadata. | StartContext.meta |
meta.name | string | Package name | - |
meta.version | string | Package version | - |
mode | string | Current runtime mode (supports custom modes like 'beta', 'staging', etc.). | StartContext.mode |
pluginConfig | TConfig | Plugin's configuration from user's /config/plugins/. Typed based on plugin's config schema. | StartContext.pluginConfig |
portal? | unknown | Portal access scoped to this plugin's routes. Reserved for future route system (Phase 3). | StartContext.portal |
projectConfig | Config | Full project configuration. | StartContext.projectConfig |
reason | "error" | "signal" | "restart" | Reason for shutdown. - 'signal': SIGTERM/SIGINT received - 'error': Uncaught exception - 'restart': HMR restart (though stop hooks typically don't run on restart) | - |
state | PluginState | Plugin-scoped state storage. Isolated from other plugins. | StartContext.state |
