liveperson-functions-cli
Version:
LivePerson Functions CLI
48 lines (47 loc) • 1.69 kB
TypeScript
import { PrettyPrintableError } from '@oclif/core/lib/interfaces';
import { Answers } from 'inquirer';
import { ILambda } from '../types';
import { ErrorMessage, LogMessage, TaskList } from './printer';
import { Prompt } from './printer/prompt';
interface IDeployViewConfig {
prompt?: Prompt;
log?: LogMessage;
error?: ErrorMessage;
tasklist?: TaskList;
chalk?: any;
}
export declare class DeployView {
private readonly prompt;
private readonly log;
private readonly error;
private tasklist;
private readonly chalk;
constructor({ prompt, log, error, tasklist, chalk, }?: IDeployViewConfig);
/**
* Runs a prompt and asks the user for confirmation about the passed lambdas
* @param {*} lambdas - lambda functions
* @returns {Promise<Answers>} - prompt answers
* @memberof DeployView
*/
askForConfirmation(lambdas: any): Promise<Answers>;
/**
* Runs a tasklist with all functions to deploy.
* Checks every 3sec if the deployment is finished.
* @param {ILambda[]} confirmedFunctionsToDeploy - Functions to deploy
* @param {boolean} [noWatch] - Changes the renderer of the tasklist, so no rendering is displayed in the console
* @returns
* @memberof DeployView
*/
showDeployments({ confirmedFunctionsToDeploy, noWatch, }: {
confirmedFunctionsToDeploy: ILambda[];
noWatch?: boolean;
}): Promise<void>;
/**
* Shows an error message
* @param {string|PrettyPrintableError} message - message
* @memberof DeployView
*/
showErrorMessage(message: string | PrettyPrintableError): void;
private preparePromptMessage;
}
export {};