@crestron/ch5-shell-utilities-cli
Version:
CH5 Shell Utilities CLI for command scripts
82 lines (81 loc) • 3.22 kB
TypeScript
import { Ch5BaseClassForCli } from "../Ch5BaseClassForCli";
import { ICh5Cli } from "../ICh5Cli";
export declare class Ch5ImportComponentsCli extends Ch5BaseClassForCli implements ICh5Cli {
showOutputMessages: boolean;
private outputResponse;
private folderPaths;
constructor(showOutputMessages?: boolean);
/**
* Initialize all variables and set module level constants
*/
initialize(): void;
/**
* Utils function so that we can mock zl library in our test cases
*/
get getZl(): any;
/**
* Method for importing components
*/
run(): Promise<any>;
/**
* Verify input parameters
*/
verifyInputParams(): Promise<void>;
/**
*
* @param {*} fileName
*/
isFileToBeAvoided(fileName: string): boolean;
/**
*
* @param {*} input
*/
replaceDistFolderPathNameInInput(input: string[]): string[];
/**
*
* @param {*} sourcePath
*/
getAllFiles(sourcePath: string): any;
/**
* Check if there are questions to be prompted to the developer
*/
checkPromptQuestions(): Promise<void>;
/**
* Implement this component's main purpose
* Unzip the export-components.zip file, copy files as per user input in command-terminal from source (extracted export-components.zip file) to destination (./ project folder).
*/
processRequest(): Promise<void>;
/**
* Log Final Response Message
*/
logOutput(): void;
/**
* Clean up method
*/
cleanUp(): Promise<void>;
/**
*
* @param {*} arrayOfFiles
* @param {*} newFile
*/
checkIfNewFileInput(arrayOfFiles: any[], newFile: any): boolean;
/**
* Check if the file is a zip file and exists, and follows proper folder structure
* Suggestion - Export and import should have version number
* Note that we are not checking for export-components.zip file as filename because the
* user can rename his file if required.
* @param {*} fileName
*/
isZipFileValid(fileName: string): boolean;
/**
* For 'page' type components without conflicting name
* - The target project content view should be appended with the imported pages in the same order they were in the source project.
* - If the navigation buttons were defined in source project, the target project navigation buttons should be appended with buttons for imported page in same order they were in the source project.
* For 'page' type components with conflicting name
* - the location in the content view of the imported page should remain the same as before the import
* - if navigation buttons were defined in both the source and target project, the order should remain the same
* - if navigation button was defined in source project, but not the target project, an imported navigation button should be appended to end of navigation buttons
* - if navigation button was not defined in source project, but was defined in target project, the target project button should be removed.
*/
processExportedProjectConfigJSON(selectedPages: string | any[], selectedWidgets: string | any[]): Promise<void>;
}