UNPKG

liveperson-functions-cli

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