Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
Hexagon/pup-pluginThis package works with Node.js, Deno, Bun
JSR Score
100%
Published
5 months ago (1.0.1)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455/** * Common base classes and interfaces related to the plugin feature of Pup * * @file @pup/plugin/mod.ts * @license MIT */ /** * User configuration of a Pup plugin */ export interface PluginConfiguration { url: string; options?: unknown; } /** * Metadata of a Pup plugin */ export interface PluginMetadata { name: string; version: string; api: string; repository: string; } /** * Every Pup Plugin should extend this Class */ export class PluginImplementation { public meta = { name: "unset", version: "unset", api: "unset", repository: "unset", }; constructor( _config: PluginConfiguration, _apiUrl: string, _apiToken: string, ) {} /** * Pup will periodically send new api tokens * * Make sure to override this and receive the new tokens */ public async refreshApiToken(_apiToken: string): Promise<unknown> { return await false; } /** * Default implemetation of the cleanup function */ public async cleanup(): Promise<unknown> { return await false; } }