UNPKG

@crestron/ch5-shell-utilities-cli

Version:
76 lines (75 loc) 2.07 kB
import { Ch5BaseClassForCli } from "../Ch5BaseClassForCli"; import { ICh5Cli } from "../ICh5Cli"; export declare class Ch5GenerateWidgetCli extends Ch5BaseClassForCli implements ICh5Cli { showOutputMessages: boolean; private readonly MIN_LENGTH_OF_WIDGET_NAME; private readonly MAX_LENGTH_OF_WIDGET_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 */ checkPromptQuestions(): Promise<void>; /** * Clean up */ private cleanUp; /** * Log Final Response Message */ private logOutput; /** * Create Folder for the Widgets 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 widget object in project-config.json. */ createWidgetObject(): { widgetName: any; fullPath: any; fileName: string; }; /** * Method to validate Widget Name * @param {string} widgetName */ validateWidgetName(widgetName: string): any; /** * Loop and check the next valid widget to set * @param {*} widgets */ private loopAndCheckWidget; /** * Gets the keywords that are not allowed for widgets to start */ private getInvalidWidgetStartWithValues; /** * Checks if the widget name has disallowed keywords * @param {*} widgetName * @param {*} type */ checkWidgetNameForDisallowedKeywords(widgetName: string, type: string): boolean; /** * Implement this component's main purpose */ processRequest(): Promise<void>; }