Skip to main content
Module

x/proc/mod3.ts>Process

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Go to Latest
class Process
implements [Deno.Closer]
import { Process } from "https://deno.land/x/proc@0.20.7/mod3.ts";

A wrapper for Deno.ChildProcess that converts streams to AsyncIterable<...>, corrects error handling, and adds other custom stuff.

Constructors

new
Process(
cmd: string | URL,
args: readonly string[],
)

Properties

private
_isClosed: boolean
private
_passError: Error | undefined
private
_stderr: AsyncIterable<Uint8Array> | undefined
private
_stdin: WritableIterable<
| Uint8Array
| Uint8Array[]
| string
| string[]
> | undefined
private
_stdout: AsyncIterable<Uint8Array> | undefined
private
stderrResult: Promise<S> | undefined
readonly
isClosed: boolean
readonly
pid
readonly
stderr: AsyncIterable<Uint8Array>
readonly
stdin: WritableIterable<
| Uint8Array
| Uint8Array[]
| string
| string[]
>
readonly
stdout: AsyncIterable<Uint8Array>

Methods

close(): Promise<void>