europa-build
Version:
Tool for generating and maintaining Europa plugins and presets
56 lines (55 loc) • 1.81 kB
TypeScript
/// <reference types="node" />
import { Writable } from 'stream';
declare const _cwd: unique symbol;
declare const _command: unique symbol;
declare const _logger: unique symbol;
declare const _onError: unique symbol;
declare const _outputStream: unique symbol;
/**
* A command-line interface for generating and maintaining Europa plugins and presets.
*/
export declare class Cli {
private [_command];
private readonly [_cwd];
private readonly [_logger];
private readonly [_onError];
private readonly [_outputStream];
/**
* Creates an instance of {@link Cli} using the `options` provided.
*
* @param [options] - The options to be used.
*/
constructor(options?: CliOptions);
/**
* Parses the specified `args` and executes the relevant sub-command.
*
* @param [args] - The command-line arguments to be parsed. Defaults to those passed to the Node.js process.
*/
parse(args?: string[]): Promise<void>;
private activateDebugLogging;
private createCommand;
private static createDebugOption;
private createGenerateSubCommand;
private createRunScriptSubCommand;
private static createTemplateOption;
private createTemplateSubCommand;
private getCommand;
}
/**
* The options used by {@link Cli}.
*/
export declare type CliOptions = {
/**
* The current working directory to be used to resolve relative file paths. Defaults to the current working directory.
*/
readonly cwd?: string;
/**
* A handler for any errors that occur while processing a command.
*/
readonly onError?: (error: unknown) => void;
/**
* The `Writable` to which logging output should be written. Defaults to the standard output stream.
*/
readonly outputStream?: Writable;
};
export {};