2019-09-07 04:23:15 +00:00
|
|
|
import { injectable, postConstruct } from "inversify";
|
|
|
|
|
|
|
|
export namespace interfaces {
|
|
|
|
@injectable()
|
|
|
|
export abstract class Plugin {
|
|
|
|
public description: PluginMetadata;
|
2019-09-10 09:22:00 +00:00
|
|
|
public logger: Console;
|
2019-09-07 04:23:15 +00:00
|
|
|
|
|
|
|
public load() { }
|
|
|
|
public enable() { }
|
|
|
|
public disable() { }
|
|
|
|
}
|
|
|
|
export interface PluginMetadata {
|
|
|
|
name: string;
|
|
|
|
version: string;
|
|
|
|
author: string | string[];
|
2019-09-19 10:59:32 +00:00
|
|
|
source: string;
|
2019-09-07 04:23:15 +00:00
|
|
|
target?: any;
|
|
|
|
}
|
2019-09-19 10:59:32 +00:00
|
|
|
export interface CommandMetadata {
|
|
|
|
name?: string;
|
|
|
|
executor?: string;
|
|
|
|
paramtypes?: string[];
|
|
|
|
}
|
|
|
|
export interface TabCompleterMetadata {
|
|
|
|
name?: string;
|
|
|
|
executor?: string;
|
|
|
|
paramtypes?: string[];
|
|
|
|
}
|
|
|
|
export interface ListenerMetadata {
|
|
|
|
name?: string;
|
|
|
|
executor?: string;
|
|
|
|
}
|
|
|
|
export type PluginLike = Plugin | string;
|
2019-09-07 04:23:15 +00:00
|
|
|
}
|