1 | import execa, { Options as ExecaOptions } from 'execa';
|
2 | import { Arguments, ParserOptions } from '@boost/args';
|
3 | import { Blueprint, Predicates } from '@boost/common';
|
4 | import { ConcurrentEvent } from '@boost/event';
|
5 | import { Plugin } from '@boost/plugin';
|
6 | import { ScriptContext } from './contexts/ScriptContext';
|
7 | import { Argv, BeemoTool, Scriptable } from './types';
|
8 | export declare abstract class Script<O extends object = {}, Options extends object = {}> extends Plugin<BeemoTool, Options> implements Scriptable<O> {
|
9 | tool: BeemoTool;
|
10 | readonly onBeforeExecute: ConcurrentEvent<[ScriptContext, Argv], string>;
|
11 | readonly onAfterExecute: ConcurrentEvent<[ScriptContext, unknown], string>;
|
12 | readonly onFailedExecute: ConcurrentEvent<[ScriptContext, Error], string>;
|
13 | static validate(script: Script): void;
|
14 | blueprint(preds: Predicates): Blueprint<object>;
|
15 | bootstrap(): void;
|
16 | startup(tool: BeemoTool): void;
|
17 | |
18 |
|
19 |
|
20 | parse(): ParserOptions<O>;
|
21 | |
22 |
|
23 |
|
24 | executeCommand(command: string, args: string[], options?: ExecaOptions): Promise<execa.ExecaReturnValue<string>>;
|
25 | |
26 |
|
27 |
|
28 | abstract execute(context: ScriptContext, args: Arguments<O>): Promise<unknown>;
|
29 | }
|
30 |
|
\ | No newline at end of file |