@crestron/ch5-shell-utilities-cli
Version:
CH5 Shell Utilities CLI for command scripts
88 lines (87 loc) • 3.16 kB
TypeScript
import * as commander from "commander";
import { Ch5CliUtil } from "./Ch5CliUtil";
import { Ch5CliLogger } from "./Ch5CliLogger";
import { Ch5CliNamingHelper } from "./Ch5CliNamingHelper";
import { Ch5CliProjectConfig } from "./Ch5CliProjectConfig";
import { Ch5CliConfigFileReader } from "./Ch5CliConfigFileReader";
import { ICh5CliConfigFile } from "./ICh5CliConfigFile";
export declare abstract class Ch5BaseClassForCliUpgrade {
private readonly _cliUtil;
private readonly _cliLogger;
private readonly _cliConfigFileReader;
private readonly _cliNamingHelper;
private readonly _cliProjectConfig;
private _folderPath;
private CONFIG_FILE;
private TRANSLATION_FILE;
private _inputArgs;
protected outputResponse: any;
get getEnquirer(): any;
get getPrompt(): any;
get getSelect(): any;
get getConfirm(): any;
protected get inputArgs(): any;
protected get utils(): Ch5CliUtil;
protected get logger(): Ch5CliLogger;
get configFileReader(): Ch5CliConfigFileReader;
protected get configFile(): ICh5CliConfigFile;
protected get configFileArgs(): Ch5CliConfigFileReader;
protected get namingHelper(): Ch5CliNamingHelper;
protected get projectConfig(): Ch5CliProjectConfig;
constructor(folderPath: string);
protected initBase(): void;
processArgs(): any;
processArgsAnalyze(args: any): any;
mergeJSON(...args: any): {};
private merger;
protected validateCLIInputArgument(inputObj: any, key: string, value: string, errorMessage: string): {
value: any;
warning: string;
error?: undefined;
} | {
value: null;
warning: any;
error?: undefined;
} | {
value: string;
error: string;
warning?: undefined;
};
private validateProjectType;
/**
*
* @param program
*/
setupCommand(program: commander.Command): Promise<commander.Command | undefined>;
private compareVersions;
checkVersionToExecute(): void;
run(): Promise<any>;
private convertArrayToCommaSeparatedString;
/**
* DO NOT DELETE
*/
initialize(): Promise<void>;
verifyInputParams(): Promise<void>;
checkPromptQuestions(): Promise<void>;
processRequest(): Promise<void>;
cleanUp(): Promise<void>;
private logOutput;
protected getConfigNode(nodeName: string): string | boolean | string[] | import("./ICh5CliConfigFile").ICh5CliConfigFileParamOptions[] | null;
private validatePackageJsonProjectName;
/**
* Get the String output from default.json file in config
* @param {*} key
* @param {...any} values
*/
getText(key: string, ...values: string[]): any;
logError(e: any): any;
/**
* Adds error message to the array
* @param {string} heading
* @param {string} message
* @param {string} resolution
*/
protected addError(heading: string, message: string, resolution: string): void;
protected isConfigFileValid(filePath: string, schemaFilePath: string, preBuildValidationOnly?: boolean): Promise<boolean>;
protected isConfigFileExist(fileName: string): boolean;
}