@onboardbase/cli
Version:
[](https://www.npmjs.com/package/@onboardbase/cli) [](https://www.npmjs.com/package/@onboardbase/cli) [ • 1.38 kB
TypeScript
import { Command } from "@oclif/command";
import { ConfigManager } from "../config";
import { IBaseCommandService } from "./base.service";
import { BaseError } from "./errors/base.error";
export declare type ArgsFlags<F = IFlags> = {
args: IArgs;
flags: F;
};
export declare type IFlags = Record<string, any>;
export declare type IArgs = Record<string, any>;
interface IBaseCommand {
execute(): void;
getService(configManager: ConfigManager): IBaseCommandService;
getArgsAndFlags(): ArgsFlags;
}
export declare class BaseCommand extends Command implements IBaseCommand {
/**
* Indicates whether to skip the configuration step completely.
*/
skipConfig: boolean;
/**
* Indicates whether the configuration should be loaded partially.
* If set to `true`, only a partial configuration will be loaded.
* Defaults to `false`, meaning the entire configuration will be loaded.
*/
loadConfigPartially: boolean;
haltOnConfigError: boolean;
configManager: ConfigManager;
catch(err: BaseError): Promise<any>;
writeLogfile(err: any): void;
getErrorLogFile(): string;
finally(err: Error): Promise<any>;
init(): Promise<void>;
execute(): Promise<void>;
getService(configManager?: ConfigManager): IBaseCommandService;
getArgsAndFlags(): ArgsFlags;
run(): Promise<void>;
}
export {};