1 | import Config from '@cli-engine/config';
|
2 | import { ICommandInfo } from './command';
|
3 | import { IPluginModule, IPluginPJSON } from './plugins/plugin';
|
4 | export declare abstract class Hook<T extends keyof IHooks> {
|
5 | protected config: Config;
|
6 | protected options: IHooks[T];
|
7 | constructor(config: Config, options?: IHooks[T]);
|
8 | abstract run(): Promise<void>;
|
9 | }
|
10 | export interface IHooks {
|
11 | init: {};
|
12 | update: {};
|
13 | 'plugins:parse': {
|
14 | module: IPluginModule;
|
15 | pjson: IPluginPJSON;
|
16 | };
|
17 | prerun: {
|
18 | Command: ICommandInfo;
|
19 | argv: string[];
|
20 | };
|
21 | }
|
22 | export declare class Hooks {
|
23 | private config;
|
24 | constructor(config: Config);
|
25 | run<T extends keyof IHooks>(event: T, options?: IHooks[T]): Promise<void>;
|
26 | private isLegacyHook<T>(Hook);
|
27 | }
|