1 | import { PrimitiveType } from '@boost/args';
|
2 | import { Blueprint, Path, Predicates } from '@boost/common';
|
3 | import { ConcurrentEvent, Event } from '@boost/event';
|
4 | import { Plugin } from '@boost/plugin';
|
5 | import { ConfigContext } from './contexts/ConfigContext';
|
6 | import { DriverContext } from './contexts/DriverContext';
|
7 | import { Argv, BeemoTool, ConfigObject, Driverable, DriverCommandConfig, DriverCommandRegistration, DriverCommandRunner, DriverMetadata, DriverOptions, DriverOutput, DriverOutputStrategy, Execution } from './types';
|
8 | export declare abstract class Driver<Config extends object = {}, Options extends DriverOptions = DriverOptions> extends Plugin<BeemoTool, Options> implements Driverable {
|
9 | commands: DriverCommandRegistration<any, any>[];
|
10 | config: Config;
|
11 | metadata: DriverMetadata;
|
12 | tool: BeemoTool;
|
13 | output: DriverOutput;
|
14 | readonly onLoadProviderConfig: Event<[ConfigContext<{}>, Path, Config], string>;
|
15 | readonly onLoadConsumerConfig: Event<[ConfigContext<{}>, Config], string>;
|
16 | readonly onMergeConfig: Event<[ConfigContext<{}>, Config], string>;
|
17 | readonly onCreateConfigFile: Event<[ConfigContext<{}>, Path, Config], string>;
|
18 | readonly onCopyConfigFile: Event<[ConfigContext<{}>, Path, Config], string>;
|
19 | readonly onReferenceConfigFile: Event<[ConfigContext<{}>, Path, Config], string>;
|
20 | readonly onTemplateConfigFile: Event<[ConfigContext<{}>, Path, string | ConfigObject], string>;
|
21 | readonly onDeleteConfigFile: Event<[ConfigContext<{}>, Path], string>;
|
22 | readonly onBeforeExecute: ConcurrentEvent<[DriverContext<import("./contexts/DriverContext").DriverContextOptions>, Argv], string>;
|
23 | readonly onAfterExecute: ConcurrentEvent<[DriverContext<import("./contexts/DriverContext").DriverContextOptions>, unknown], string>;
|
24 | readonly onFailedExecute: ConcurrentEvent<[DriverContext<import("./contexts/DriverContext").DriverContextOptions>, Error], string>;
|
25 | static validate(driver: Driver): void;
|
26 | blueprint({ array, object, string, bool }: Predicates): Blueprint<DriverOptions>;
|
27 | bootstrap(): void;
|
28 | startup(tool: BeemoTool): void;
|
29 | |
30 |
|
31 |
|
32 | doMerge(prevValue: unknown, nextValue: unknown): unknown;
|
33 | |
34 |
|
35 |
|
36 | extractErrorMessage(error: {
|
37 | message: string;
|
38 | }): string;
|
39 | |
40 |
|
41 |
|
42 | formatConfig(data: Config): string;
|
43 | |
44 |
|
45 |
|
46 | getName(): string;
|
47 | |
48 |
|
49 |
|
50 | getArgs(): Argv;
|
51 | |
52 |
|
53 |
|
54 | getDependencies(): string[];
|
55 | |
56 |
|
57 |
|
58 | getOutputStrategy(): DriverOutputStrategy;
|
59 | |
60 |
|
61 |
|
62 | getSupportedOptions(): string[];
|
63 | |
64 |
|
65 |
|
66 | getVersion(): string;
|
67 | |
68 |
|
69 |
|
70 | mergeConfig(prev: Config, next: Config): Config;
|
71 | |
72 |
|
73 |
|
74 | processFailure(error: Execution): void;
|
75 | |
76 |
|
77 |
|
78 | processSuccess(response: Execution): void;
|
79 | |
80 |
|
81 |
|
82 | registerCommand<O extends object, P extends PrimitiveType[]>(path: string, config: DriverCommandConfig<O, P>, runner: DriverCommandRunner<O, P>): this;
|
83 | |
84 |
|
85 |
|
86 | setMetadata(metadata: Partial<DriverMetadata>): this;
|
87 | |
88 |
|
89 |
|
90 | setOutput(type: keyof DriverOutput, value: string): this;
|
91 | }
|
92 |
|
\ | No newline at end of file |