import * as node_child_process from 'node: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) => string;
/**
 *  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) => node_child_process.ChildProcess;

export { type IOType, LARGE_BUFFER, type StdioOptions, run, runAsync };
