Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.17/mod3.ts";

Classes

A factory for [[Process]].

Enumerable wrapper for AsyncIterable.

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

c
ProcessError
abstract

Enumerable which may be substituted when we know we are returning Uint8Array data.

Functions

Transformer that conditionally forces buffering of a Uint8Array stream.

Fast-concatenate Uint8Arrays arrays together, returning a single array containing the result.

Enumerable factory.

Convert JSON-encoded lines into objects.

Convert objects into JSON.

Lazily produce a range of numbers.

Open a file for reading.

Run a process.

Sleep for a while.

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.

Converts specific types to Uint8Array chunks.

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

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

Interfaces

Options for Enumerable.concurrentMap and Enumerable.concurrentUnorderedMap.

Options passed to a process.

Command options.

A to range.

An until range.

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 text lines), and also optionally return a value that is passed to your custom ErrorHandler. You are not allowed to throw an error from this function. If you wish to throw an error based on stderr data, the ErrorHandler function is where you do that.