2020-07-05 05:00:54 +03:00
|
|
|
import { BasePluginType, PluginClass, PluginOptions } from "knub";
|
2019-07-11 12:23:57 +03:00
|
|
|
import * as t from "io-ts";
|
2020-07-05 05:00:54 +03:00
|
|
|
import { TZeppelinKnub, ZeppelinPluginInfo } from "../types";
|
|
|
|
import { pluginConfigPreprocessor } from "../pluginUtils";
|
2019-10-13 00:21:35 +03:00
|
|
|
|
2020-06-30 17:48:18 +03:00
|
|
|
export class ZeppelinPluginClass<TPluginType extends BasePluginType = BasePluginType> extends PluginClass<TPluginType> {
|
2020-07-05 05:00:54 +03:00
|
|
|
public static pluginInfo: ZeppelinPluginInfo;
|
2019-08-22 01:22:26 +03:00
|
|
|
public static showInDocs: boolean = true;
|
2019-08-22 02:58:32 +03:00
|
|
|
public static configSchema: t.TypeC<any>;
|
2019-04-20 17:36:28 +03:00
|
|
|
|
2020-01-12 13:37:43 +02:00
|
|
|
protected readonly knub: TZeppelinKnub;
|
|
|
|
|
2020-07-05 05:00:54 +03:00
|
|
|
public static configPreprocessor(options: PluginOptions<any>) {
|
|
|
|
return pluginConfigPreprocessor.bind(this)(options);
|
2019-10-13 00:21:35 +03:00
|
|
|
}
|
2018-11-25 17:04:26 +02:00
|
|
|
}
|