import ora from 'ora'; /** * Log helper * @returns - {start, info, success, error} functions */ export declare const logger: () => { spinner: ora.Ora; start: (value: string) => ora.Ora; info: (value: string) => ora.Ora; success: (value: string) => ora.Ora; error: (value: string) => ora.Ora; }; /** * Check extension file string by array * @param file * @param exts * @returns regex */ export declare const checkFileExt: (file: string, exts: string[]) => boolean; /** * Copy files from input dir to output dir * @param pathIn * @param pathOut * @param exts */ export declare const copyFiles: (pathIn: string, pathOut: string, exts?: string[] | undefined, includes?: string | undefined) => void; /** * Create dir if not exist, remove file on output dir. * @param pathOut * @param exts * @param remove */ export declare const prepareOutputDir: (pathOut: string, exts: string[], remove?: boolean | undefined) => void; /** * Get UID * @param size * @returns */ export declare const getUID: (size?: number | undefined) => string; /** * Pipeline * @param [...fns] * @returns (props, options, callback) => Promise */ export declare const pipeline: (...fns: any) => (props: TypeToolProp, options?: any, callback?: any) => any; /** * Watch pathIn changes and reload pipeline * @param pipeline * @param props * @param options * @param callback */ export declare const watchPipeline: (pipeline: (props: TypeToolProp, options: any, callback: any) => Promise, props: TypeToolProp, options: any, callback: any) => void; export declare const changeExtension: (file: string, extension?: string | undefined) => string; export interface TypeToolProp { pathIn?: string; pathOut: string; copy?: boolean; verbose?: boolean; includes?: string; } export interface TypeLogger { start: ora.Ora; info: ora.Ora; success: ora.Ora; error: ora.Ora; } export interface TypeProps { exts?: string[]; name?: string; removePrevFile?: boolean; [key: string]: any; } export interface TypeOnEveryFile { pathIn?: string; pathOut: string; file: string; props: any; options: any; wrapperProps: TypeProps; log: any; next: (value: void | PromiseLike) => void; } export interface TypeOnBody { pathIn?: string; pathOut: string; props: any; options: any; wrapperProps: TypeProps; log: any; } export interface TypeToolOptions { copy?: boolean; verbose?: boolean; excludes?: string; } export declare const wrapper: (onEveryFile?: (({ pathIn, pathOut, file, props, options, wrapperProps }: TypeOnEveryFile) => void) | undefined, onBody?: (({ pathIn, pathOut, props, options, wrapperProps }: TypeOnBody) => Promise | void) | undefined, props?: TypeProps | undefined) => (_props: TypeToolProp, _options?: TypeToolOptions | undefined) => Promise;