Skip to main content
Module

x/proc/mod3.ts

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Go to Latest
import * as proc from "https://deno.land/x/proc@0.20.8/mod3.ts";

Classes

A factory for [[Process]].

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

c
ProcessError
abstract

Functions

Concatenate arrays together, returning a single array containing the result.

Wrap in an Enumerable.

Run a process.

Convert an AsyncIterable<Uint8Array> into an AsyncIterable<Uint8Array[]> (an array of lines chunked together based on buffer size) split on lf and also suppressing trailing cr. lf and trailing cr is removed from the returned lines.

Convert an AsyncIterable<Uint8Array> into an AsyncIterable<string> of lines.

Interfaces

Options passed to a process.

Command options.

Type Aliases

The type signature for a command.

Optionally change or suppress the error before it is thrown. Note that this will only be called if either one or both of error and stderrData is defined (non-null).

Optionally handle lines of stderr (passed as arrays of lines as available), and also optionally return a value that is passed to your custom ErrorHandler. This function may not throw an error. If you wish to throw an error based on stderr data, the ErrorHandler function is where you do that.