definePlugin
Import from @varavel/vdl-plugin-sdk.
Wraps a plugin handler so it can be exported as the canonical VDL entry point.
definePlugin wraps your implementation with a global safety net.
Any thrown error is converted into the PluginOutput diagnostic contract,
so VDL can report failures cleanly instead of crashing with a raw stack trace.
Parameters
| Parameter | Type | Description |
|---|---|---|
handler |
VdlPluginHandler |
The plugin implementation to expose as the runtime entry point. |
Returns
A safe handler that always returns PluginOutput.