axiodb
Version:
The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor
30 lines (29 loc) • 1.08 kB
TypeScript
/**
* Provides methods to execute and spawn worker processes.
*/
export default class WorkerProcess {
/**
* Executes a shell command and returns its standard output as a string.
*
* @param command - The command to execute.
* @returns A promise that resolves with the command's standard output.
* @throws If the command fails to execute.
*/
execCommand(command: string): Promise<string>;
/**
* Spawns a new process using the given command and arguments, inheriting stdio.
*
* @param command - The command to run.
* @param args - Optional array of arguments for the command.
* @returns A promise that resolves when the process exits with code 0, or rejects on error.
* @throws If the process fails to spawn.
*/
spawnCommand(command: string, args?: string[]): Promise<void>;
/**
* Returns the operating system type.
*
* @returns A string representing the OS type: "windows", "macos", or "linux".
* @throws If the platform is unsupported.
*/
static getOS(): string;
}