import { Application } from "../application"; import { InputValue, InputValues } from "../contracts"; import { InputDefinition } from "./definition"; import { InputValidator } from "./validator"; /** * @class Input */ export declare class Input { /** * @private * @type {Application} * @memberof ComponentFactory */ protected readonly app: Application; /** * @private * @type {InputValidator} * @memberof ComponentFactory */ protected readonly validator: InputValidator; /** * The parsed input arguments. * * @type {InputArgument} * @memberof Input */ args: InputValues; /** * The parsed input flags. * * @type {InputArgument} * @memberof Input */ flags: InputValues; /** * Indicates whether the CLI should be interactive, i.e. show prompts. * * @type {boolean} * @memberof Input */ interactive: boolean; /** * The raw input arguments. * * @private * @type {InputArgument} * @memberof Input */ private definition; /** * The raw input arguments. * * @private * @type {InputArgument} * @memberof Input */ private rawArgs; /** * The raw input flags. * * @private * @type {InputArgument} * @memberof Input */ private rawFlags; /** * Parse the command line arguments. * * @param {string[]} argv * @param {InputDefinition} definition * @memberof Input */ parse(argv: string[], definition: InputDefinition): void; /** * Bind the command line arguments. * * @memberof Input */ bind(): void; /** * Validate the arguments and flags. * * @memberof Input */ validate(): void; /** * Returns all the given arguments merged with the default values. * * @param {object} [values] * @returns * @memberof Input */ getArguments(values?: object): Record; /** * Returns the argument value for a given argument name. * * @param {string} name * @returns {InputValue} * @memberof Input */ getArgument(name: string): InputValue; /** * Sets an argument value by name. * * @param {string} name * @param {InputValue} value * @memberof Input */ setArgument(name: string, value: InputValue): void; /** * Returns true if an argument exists by name or position. * * @param {string} name * @returns {boolean} * @memberof Input */ hasArgument(name: string): boolean; /** * Returns all the given flags merged with the default values. * * @param {object} [values] * @returns * @memberof Input */ getFlags(values?: object): Record; /** * Returns the flag value for a given flag name. * * @param {string} name * @returns {InputValue} * @memberof Input */ getFlag(name: string): InputValue; /** * Sets a flag value by name. * * @param {string} name * @param {InputValue} value * @memberof Input */ setFlag(name: string, value: InputValue): void; /** * Returns true if a flag exists by name. * * @param {string} name * @returns {boolean} * @memberof Input */ hasFlag(name: string): boolean; /** * @returns {boolean} * @memberof Input */ isInteractive(): boolean; } //# sourceMappingURL=input.d.ts.map