Plugin
Base class for an HTTP plugin, binding this.core to the HTTP Core.
A plugin that runs on either transport extends the base from @seedcord/core/plugin, whose this.core is typed to the shared members only.
abstract class Plugin<
Opts extends HttpPluginOptions = { transport: "http" }
> extends Plugin<Opts, Core>Member visibility
Filter class members by access level.
constructor
Constructs a new instance of the Plugin class
Plugin(host: CoreBase, spec?: PluginLifecycleSpec)Inherited from:Plugin
Showing members with Protected visibility and higher.
Opts
The transport and runtime the plugin declares.
Opts extends HttpPluginOptions = { transport: 'http'; }- optional
dispose()
Runs during teardown, only when init() resolved.
init()
onHmr()
Override to reload plugin state on an HMR update.
async onHmr(_event: HmrUpdateEvent): Promise<void>Inherited from:Plugin
- optional
ready()
Runs in the startup Ready phase, after init(). The gateway client is logged in by this phase, and the http host binds its server in the same phase.
registerCriticalFiles()
Registers critical file patterns that should trigger a full restart when changed in Dev HMR.
rejectOptions()
Throws a SeedcordError that contains the plugin class name and the reason.