UNPKG

@storm-software/config-tools

Version:

⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.

36 lines (33 loc) 1.43 kB
import * as child_process from 'child_process'; import { StormWorkspaceConfig } from '@storm-software/config'; declare const LARGE_BUFFER: number; type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>; /** * Run a command line process * * @remarks * A wrapper around `execSync` to run our command line processes * * @param config - The Storm configuration object * @param command - The command to run * @param cwd - The current working directory * @param stdio - The standard input/output options * @param env - The environment variables * @returns The result of the command */ declare const run: (config: Partial<StormWorkspaceConfig>, command: string, cwd?: string, stdio?: StdioOptions, env?: NodeJS.ProcessEnv) => Buffer<ArrayBufferLike>; /** * Run an asynchronous command line process * * @remarks * A wrapper around `exec` to run our command line processes * * @param config - The Storm configuration object * @param command - The command to run * @param cwd - The current working directory * @param env - The environment variables * @returns A promise with the result of the command */ declare const runAsync: (config: Partial<StormWorkspaceConfig>, command: string, cwd?: string, env?: NodeJS.ProcessEnv) => child_process.ChildProcess; export { type IOType, LARGE_BUFFER, type StdioOptions, run, runAsync };