import TemplateProcessor from './TemplateProcessor.js'; import minimist from "minimist"; import { Levels } from "./ConsoleLogger.js"; /** * Base class for building CLIs. By itself can be used for a CLI that does not support the tail command. Tail command * uses Node repl class that is not implemented in other JS runtimes such as Bun. CliCoreBase should run in Bun. */ export declare class CliCoreBase { protected templateProcessor: TemplateProcessor; private logLevel; protected currentDirectory: string; private server; onInit: () => Promise | void; constructor(templateProcessor: TemplateProcessor); close(): Promise; static minimistArgs(replCmdInputStr: string): minimist.ParsedArgs; static parseInitArgs(replCmdInputStr: string): { filepath: any; tags: any; oneshot: any; options: any; ctx: any; "--"?: string[] | undefined; _: string[]; }; static readFileAndParse(filepath: string, importPath?: string): Promise; static isNodeEnvironment(): boolean; static resolveImportPath(filepath: any, importPath: any): string; /** * replCmdInoutStr example: -f "example/restoreSnapshot.json" --tags=["PEACE"] --xf=example/myEnv.json * @param replCmdInputStr - the command line string that will be parsed into arguments */ restore(replCmdInputStr: string): Promise; /** * This Cli core command may be invoked directly from the REPL init command or from restore command * * - fromSnapshot=false, replCmdInoutStr example: -f "example/ex23.json" --tags=["PEACE"] --xf=example/myEnv.json * - fromSnapshot=true, replCmdInoutStr example: -f "example/restoreSnapshot.json" --tags=["PEACE"] --xf=example/myEnv.json * * @param replCmdInputStr * @param fromSnapshot - when set to true, template processor will treat input as a snapshot of a previous * templateProcessor state */ init(replCmdInputStr: string, fromSnapshot?: boolean): Promise; private openFile; set(args: string): Promise<{}>; in(): any; out(replCmdInputStr: string): object | null; state(): Record; from(args: string): string[] | import("./MetaInfoProducer.js").JsonPointerStructureArray[]; to(args: string): string[] | import("./MetaInfoProducer.js").JsonPointerStructureArray[]; flow(replCmdInputStr: string): Promise; plan(): Promise; log(level: Levels): { "log level": Levels; }; note(): string; debug(replCmdInputStr: string): Promise; errors(): Promise<{ [key: string]: any; }>; protected extractArgsInfo(args: string): { format: string; jsonPointer: string; number: number; jsonataExpression?: undefined; } | { format: string; jsonPointer: string; jsonataExpression: string; number?: undefined; }; cd(newDirectory: string): string; svg(replCmdInputStr: string): string; /** * this method is just here as a stub to allow tests to pass. Color is in reality handled only by StatedRepl, * it is not something that is possible to 'see' from the CLI since CLI returns pure JSON which has no concept * of terminal colors. */ color(): void; getTemplateProcessor(): TemplateProcessor; tail(args: string): Promise; } //# sourceMappingURL=CliCoreBase.d.ts.map