|
@@ -3,6 +3,7 @@ import { buffer } from "node:stream/consumers"
|
|
|
|
|
|
|
|
export namespace Process {
|
|
export namespace Process {
|
|
|
export type Stdio = "inherit" | "pipe" | "ignore"
|
|
export type Stdio = "inherit" | "pipe" | "ignore"
|
|
|
|
|
+ export type Shell = boolean | string
|
|
|
|
|
|
|
|
export interface Options {
|
|
export interface Options {
|
|
|
cwd?: string
|
|
cwd?: string
|
|
@@ -10,6 +11,7 @@ export namespace Process {
|
|
|
stdin?: Stdio
|
|
stdin?: Stdio
|
|
|
stdout?: Stdio
|
|
stdout?: Stdio
|
|
|
stderr?: Stdio
|
|
stderr?: Stdio
|
|
|
|
|
+ shell?: Shell
|
|
|
abort?: AbortSignal
|
|
abort?: AbortSignal
|
|
|
kill?: NodeJS.Signals | number
|
|
kill?: NodeJS.Signals | number
|
|
|
timeout?: number
|
|
timeout?: number
|
|
@@ -60,6 +62,7 @@ export namespace Process {
|
|
|
cwd: opts.cwd,
|
|
cwd: opts.cwd,
|
|
|
env: opts.env === null ? {} : opts.env ? { ...process.env, ...opts.env } : undefined,
|
|
env: opts.env === null ? {} : opts.env ? { ...process.env, ...opts.env } : undefined,
|
|
|
stdio: [opts.stdin ?? "ignore", opts.stdout ?? "ignore", opts.stderr ?? "ignore"],
|
|
stdio: [opts.stdin ?? "ignore", opts.stdout ?? "ignore", opts.stderr ?? "ignore"],
|
|
|
|
|
+ shell: opts.shell,
|
|
|
windowsHide: process.platform === "win32",
|
|
windowsHide: process.platform === "win32",
|
|
|
})
|
|
})
|
|
|
|
|
|