@crestron/ch5-shell-utilities-cli
Version:
CH5 Shell Utilities CLI for command scripts
80 lines (79 loc) • 2.26 kB
TypeScript
import { Ch5BaseClassForCli } from "../Ch5BaseClassForCli";
import { ICh5Cli } from "../ICh5Cli";
export declare class Ch5GeneratePageCli extends Ch5BaseClassForCli implements ICh5Cli {
showOutputMessages: boolean;
private readonly MIN_LENGTH_OF_PAGE_NAME;
private readonly MAX_LENGTH_OF_PAGE_NAME;
private outputResponse;
constructor(showOutputMessages?: boolean);
/**
* Initialize
*/
private initialize;
/**
* Method for generating page
*/
run(): Promise<any>;
/**
* Verify input parameters
*/
private verifyInputParams;
/**
* Check if there are questions to be prompted to the developer
*/
private checkPromptQuestions;
/**
* Implement this component's main purpose
*/
private processRequest;
/**
* Clean up
*/
private cleanUp;
/**
* Log Final Response Message
*/
private logOutput;
/**
* Create Folder for the Pages to be created
*/
private createFolder;
/**
* Create New File based on templates
* @param {string} fileExtension - File extension - applicable values are .html, .js, .scss
* @param {string} templateFile - Template file name
*/
private createNewFile;
/**
* Creates the page object in project-config.json.
* If the menuOrientation is horizontal, then iconPosition is set to bottom by default.
* If the menuOrientation is vertical, then iconPosition is set to empty by default.
* If the menuOrientation is none, then iconPosition and iconUrl are set to empty.
*/
private createPageObject;
/**
* Loop and check the next valid page to set
* @param {*} pages
*/
private loopAndCheckPage;
/**
* Method to validate Page Name
* @param {string} pageName
*/
private validatePageName;
/**
* Gets the keywords that are not allowed for pages to start
*/
private getInvalidPageStartWithValues;
/**
* Checks if the pageName has disallowed keywords
* @param {*} pageName
* @param {*} type
*/
private checkPageNameForDisallowedKeywords;
/**
* Validate Menu Option
* @param {*} menuOption
*/
private validateMenuOption;
}