import { Plugin, Predicates } from '@boost/core'; import { Event, ConcurrentEvent } from '@boost/event'; import DriverContext from './contexts/DriverContext'; import ConfigContext from './contexts/ConfigContext'; import { Argv, DriverCommandOptions, DriverOptions, DriverMetadata, Execution } from './types'; export default abstract class Driver extends Plugin { command: DriverCommandOptions; config: Config; metadata: DriverMetadata; onLoadModuleConfig: Event<[ConfigContext, string, Config], string>; onLoadPackageConfig: Event<[ConfigContext, Config], string>; onMergeConfig: Event<[ConfigContext, Config], string>; onCreateConfigFile: Event<[ConfigContext, string, Config], string>; onCopyConfigFile: Event<[ConfigContext, string, Config], string>; onReferenceConfigFile: Event<[ConfigContext, string, Config], string>; onDeleteConfigFile: Event<[ConfigContext, string], string>; onBeforeExecute: ConcurrentEvent<[DriverContext, string[]], string>; onAfterExecute: ConcurrentEvent<[DriverContext, unknown], string>; onFailedExecute: ConcurrentEvent<[DriverContext, Error], string>; blueprint(predicates: Predicates): any; /** * Special case for merging arrays. */ doMerge(prevValue: any, nextValue: any): any; /** * Extract the error message when the driver fails to execute. */ extractErrorMessage(error: Error): string; /** * Format the configuration file before it's written. */ formatConfig(data: Config): string; /** * Return a list of user defined arguments. */ getArgs(): Argv; /** * Return a list of dependent drivers. */ getDependencies(): string[]; /** * Return a list of supported CLI options. */ getSupportedOptions(): string[]; /** * Extract the current version of the installed driver via its binary. */ getVersion(): string; /** * Merge multiple configuration objects. */ mergeConfig(prev: Config, next: Config): Config; /** * Handle command failures according to this driver. */ processFailure(error: Execution): void; /** * Handle successful commands according to this driver. */ processSuccess(response: Execution): void; /** * Setup additional command options. */ setCommandOptions(options: DriverCommandOptions): this; /** * Set metadata about the binary/executable in which this driver wraps. */ setMetadata(metadata: Partial): this; } //# sourceMappingURL=Driver.d.ts.map