dependabit / plugins/registry/src / Plugin
Interface: Plugin
Defined in: packages/plugins/registry/src/registry.ts:70
Contract that all dependabit plugins must satisfy.
Remarks
Plugins are loaded and validated by PluginLoader before being registered. The optional lifecycle hooks initialize and destroy are called by PluginLoader.load and PluginRegistry.unregister respectively.
Use When
Implementing a custom access method (e.g., a proprietary package registry, an internal documentation API, or a new public API).
Pitfalls
- Do NOT perform network calls or resource allocation in the constructor — use
initializeinstead so that errors are surfaced at load time, not at registration. destroymust be idempotent;PluginRegistry.clearmay call it even ifinitializewas never called.
Properties
| Property | Type | Defined in |
|---|---|---|
metadata | { accessMethod: string; apiVersion?: string; description?: string; name: string; supportedTypes?: string[]; version: string; } | packages/plugins/registry/src/registry.ts:71 |
metadata.accessMethod | string | packages/plugins/registry/src/registry.ts:41 |
metadata.apiVersion? | string | packages/plugins/registry/src/registry.ts:43 |
metadata.description? | string | packages/plugins/registry/src/registry.ts:40 |
metadata.name | string | packages/plugins/registry/src/registry.ts:38 |
metadata.supportedTypes? | string[] | packages/plugins/registry/src/registry.ts:42 |
metadata.version | string | packages/plugins/registry/src/registry.ts:39 |
Methods
check()
check(url): Promise<PluginCheckResult>;Defined in: packages/plugins/registry/src/registry.ts:76
Fetch the current state of the resource at url and return a snapshot.
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The dependency URL to check. |
Returns
Promise<PluginCheckResult>
destroy()?
optional destroy(): Promise<void>;Defined in: packages/plugins/registry/src/registry.ts:80
Optional async teardown called when the plugin is removed from the registry.
Returns
Promise<void>
initialize()?
optional initialize(): Promise<void>;Defined in: packages/plugins/registry/src/registry.ts:78
Optional async setup called by PluginLoader after validation.
Returns
Promise<void>