@api-buddy/plugin-utils
Version:
Shared utilities for API Buddy plugins
22 lines (18 loc) • 487 B
text/typescript
// Core types for the plugin system
export interface Logger {
info: (message: string) => void;
warn: (message: string) => void;
error: (message: string) => void;
debug: (message: string) => void;
level?: 'info' | 'warn' | 'error' | 'debug';
}
export interface PluginContext {
logger: Logger;
cwd: string;
}
export interface Plugin {
name: string;
version?: string;
init?: (context: PluginContext) => Promise<void> | void;
destroy?: () => Promise<void> | void;
}