UNPKG

@lenne.tech/cli-plugin-helper

Version:

Helper plugin for Gluegun CLI Projects

62 lines (61 loc) 1.48 kB
import { IHelperExtendedGluegunToolbox } from '../interfaces/extended-gluegun-toolbox.interface'; /** * Common helper functions */ export declare class Helper { protected toolbox: IHelperExtendedGluegunToolbox; /** * Constructor for integration of toolbox */ constructor(toolbox: IHelperExtendedGluegunToolbox); /** * Get configuration */ getConfig(): Promise<any>; /** * Get prepared directory path */ getDir(...dirPath: string[]): string; /** * Get input if not set */ getInput(input: string, options?: { errorMessage?: string; initial?: string; name?: string; showError?: boolean; }): Promise<string>; /** * String with minutes and seconds */ msToMinutesAndSeconds(ms: number): string; /** * Read a file */ readFile(path: string): Promise<unknown>; /** * Trim and remove linebreaks from input */ trim(input: any): any; /** * Run update for cli */ updateCli(options?: { global?: boolean; packageName?: string; showInfos?: boolean; }): Promise<string>; /** * Show menu */ showMenu(parentCommands?: string, options?: { checkUpdate?: boolean; headline?: string; level?: number; }): Promise<void>; } /** * Extend toolbox */ declare const _default: (toolbox: IHelperExtendedGluegunToolbox) => void; export default _default;