/// import { SpawnOptions } from 'child_process'; import { PromptModule } from 'inquirer'; import yargs, { Argv } from 'yargs'; export { Argv, yargs }; export interface Logger { warn: (msg: string) => void; error: (msg: string) => void; log: (msg: string) => void; notice: (msg: string) => void; } export declare class BasicLogger implements Logger { logger: typeof console; previousNotice: string; warn(msg: string): void; error(msg: string): void; log(msg: string): void; notice(msg: string): void; } export declare type PinionTrace = { name: string; timestamp: number; info: unknown; }; export declare type Configuration = { cwd: string; logger: Logger; force: boolean; prompt: PromptModule; trace: PinionTrace[]; exec: (command: string, args: string[], options?: SpawnOptions) => Promise; }; export declare type PinionContext = { cwd: string; _?: (number | string)[]; pinion: Configuration; }; export declare type ContextCallable = (ctx: C) => T | Promise; export declare type Callable = T | ContextCallable; export declare type Promisable = T | Promise; export declare const getCallable: (callable: Callable, context: C) => Promise; export declare const mapCallables: (callables: Callable[], context: C) => Promise[]>; export declare const getConfig: (initialConfig?: Partial) => Configuration; export declare const getContext: (initialCtx: Partial, initialConfig?: Partial) => T; export declare const generator: (initialContext: T) => Promise; export declare const runModule: (file: string, ctx: PinionContext) => Promise;