import { ErrorHandler } from './error-handler'; import { Type } from '../common/cli-types'; import { Provider } from '../dependency-injection/providers'; /** * The Cli application responsible by validating and resolving the root module, as well as maintaining the global components registry * * @publicApi */ export declare class CliApp { /** * The global components registry for registering of different application components such as command, global providers, options e.t.c */ private registry; /** * The root module constructor */ private root; /** * The module reference of the root module */ private rootModule; /** * Name of the Cli when set at the application level */ private nameValue; /** * Version of the Cli when set at the application level */ private versionValue; /** * Creates a new app instance * @param root constructor of the root module */ constructor(root: Type); /** * Adds a provider to the global scope * @param provider provider to be registered */ withGlobalProvider(provider: Provider): this; /** * Adds a provider to the global scope * @param provider provider to be registered */ setErrorHandler(handler: ErrorHandler | Type): this; /** * Overwrites the cli name, meaning that it cannot be changed through the name in the package.json or through the option in the build command */ setName(name: string): this; /** * Overwrites the cli version, meaning that it cannot be changed through the name in the package.json or through the option in the build command */ setVersion(version: string): this; /** * Executes the CLI application * @param args Overwrites arguments taken from process.argv */ execute(args?: string[]): Promise; } /** * A factory function that creates a new cli application * @param rootModule the root module of the application which must be decorated with CliModule * @publicApi */ export declare const createCli: (rootModule: Type) => CliApp;