UNPKG

gaunt-sloth-assistant

Version:

[![Tests and Lint](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests](https://github.co

52 lines (51 loc) 2.08 kB
import { Command } from 'commander'; import { createInterface, type Interface as ReadLineInterface } from 'node:readline/promises'; export declare const waitForEscape: (callback: () => void, enabled: boolean) => void; export declare const stopWaitingForEscape: () => void; export declare const setRawMode: (rawMode: boolean) => void; export declare const initLogStream: (logFileName: string) => void; export declare const writeToLogStream: (message: string) => void; export declare const closeLogStream: () => void; export declare const getProjectDir: () => string; export declare const getInstallDir: () => string; /** * Cached string from stdin. Should only be called after readStdin completes execution. */ export declare const getStringFromStdin: () => string; /** * Get the current useColour setting. */ export declare const getUseColour: () => boolean; /** * Set the useColour setting. */ export declare const setUseColour: (useColour: boolean) => void; export declare const isTTY: () => boolean; export declare const exit: (code?: number) => never; export declare const stdin: NodeJS.ReadStream & { fd: 0; }; export declare const stdout: NodeJS.WriteStream & { fd: 1; }; export declare const argv: string[]; export declare const env: NodeJS.ProcessEnv; export { createInterface }; export type { ReadLineInterface }; /** * Provide the path to the entry point of the application. * This is used to set the install directory. * This is called from cli.js root entry point. */ export declare const setEntryPoint: (indexJs: string) => void; /** * Asynchronously reads the stdin and stores it as a string, * it can later be retrieved with getStringFromStdin. */ export declare function readStdin(program: Command): Promise<void>; export declare const log: (message: string) => void; export declare const error: (message: string) => void; export declare const warn: (message: string) => void; export declare const info: (message: string) => void; export declare const debug: (message: string) => void; export declare const stream: (chunk: string) => boolean;