1 | import { Blueprint, Contract, PackageStructure, Path, PortablePath, Predicates, Project } from '@boost/common';
|
2 | import { Debugger } from '@boost/debug';
|
3 | import { Event } from '@boost/event';
|
4 | import { Writable } from '@boost/log';
|
5 | import { Registry } from '@boost/plugin';
|
6 | import { Translator } from '@boost/translate';
|
7 | import { Config } from './Config';
|
8 | import { ConfigContext } from './contexts/ConfigContext';
|
9 | import { Context } from './contexts/Context';
|
10 | import { DriverContext } from './contexts/DriverContext';
|
11 | import { ScaffoldContext } from './contexts/ScaffoldContext';
|
12 | import { ScriptContext } from './contexts/ScriptContext';
|
13 | import { Driver } from './Driver';
|
14 | import { Script } from './Script';
|
15 | import { Argv, ConfigFile } from './types';
|
16 | export interface ToolOptions {
|
17 | argv: Argv;
|
18 | cwd?: PortablePath;
|
19 | projectName?: string;
|
20 | resourcePaths?: string[];
|
21 | }
|
22 | export declare class Tool extends Contract<ToolOptions> {
|
23 | config: ConfigFile;
|
24 | context?: Context;
|
25 | errStream?: Writable;
|
26 | outStream?: Writable;
|
27 | package: PackageStructure;
|
28 | readonly argv: Argv;
|
29 | readonly configManager: Config;
|
30 | readonly cwd: Path;
|
31 | readonly debug: Debugger;
|
32 | readonly driverRegistry: Registry<Driver>;
|
33 | readonly msg: Translator;
|
34 | readonly project: Project;
|
35 | readonly onResolveDependencies: Event<[ConfigContext<{}>, Driver<{}, import("./types").DriverOptions>[]], string>;
|
36 | readonly onRunCreateConfig: Event<[ConfigContext<{}>, string[]], string>;
|
37 | readonly onRunDriver: Event<[DriverContext<import("./contexts/DriverContext").DriverContextOptions>, Driver<{}, import("./types").DriverOptions>], string>;
|
38 | readonly onRunScaffold: Event<[ScaffoldContext, string, string, (string | undefined)?], string>;
|
39 | readonly onRunScript: Event<[ScriptContext], string>;
|
40 | readonly scriptRegistry: Registry<Script>;
|
41 | constructor(options: ToolOptions);
|
42 | blueprint({ array, instance, string, union }: Predicates): Blueprint<ToolOptions>;
|
43 | bootstrap(): Promise<void>;
|
44 | /**
|
45 | * If the config module has an index that exports a function,
|
46 | * execute it with the current tool instance.
|
47 | */
|
48 | bootstrapConfigModule(): Promise<this>;
|
49 | /**
|
50 | * Validate the configuration module and return an absolute path to its root folder.
|
51 | */
|
52 | getConfigModuleRoot(): Path;
|
53 | /**
|
54 | * Delete config files if a process fails.
|
55 | */
|
56 | cleanupOnFailure(error?: Error): void;
|
57 | /**
|
58 | * Create a pipeline to run the create config files flow.
|
59 | */
|
60 | createConfigurePipeline(args: ConfigContext['args'], driverNames?: string[]): import("@boost/pipeline").SerialPipeline<{}, ConfigContext<{}>, Path[], Path[]>;
|
61 | |
62 |
|
63 |
|
64 | createRunDriverPipeline(args: DriverContext['args'], driverName: string, parallelArgv?: Argv[]): import("@boost/pipeline").SerialPipeline<{}, DriverContext<import("./contexts/DriverContext").DriverContextOptions>, unknown, unknown>;
|
65 | |
66 |
|
67 |
|
68 | createRunScriptPipeline(args: ScriptContext['args'], scriptName: string): import("@boost/pipeline").SerialPipeline<{}, ScriptContext, unknown, unknown>;
|
69 | |
70 |
|
71 |
|
72 | createScaffoldPipeline(args: ScaffoldContext['args'], generator: string, action: string, name?: string): import("@boost/pipeline").SerialPipeline<{}, ScaffoldContext, unknown, unknown>;
|
73 | |
74 |
|
75 |
|
76 |
|
77 |
|
78 | resolveForPnP(id: string): string;
|
79 | |
80 |
|
81 |
|
82 | protected prepareContext<T extends Context>(context: T): T;
|
83 | }
|
84 |
|
\ | No newline at end of file |