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.
Very Popular
Go to Latest
import * as proc from "https://deno.land/x/proc@0.20.18/mod3.ts";

Classes

A factory for Process.

Enumerable wrapper for AsyncIterable.

Thrown because the process returned an exit code that indicates an error occurred. By default, this indicates a non-zero exit code but may be overridden.

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

c
ProcessError
abstract

A generic process error.

Thrown because the process exited due to a signal. By default, this is thrown for any signal but may be overridden.

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

Thrown to indicate an error occurred upstream and is being passed forward.

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.

Options for a to range. The to range is exclusive.

Options for an until range. The until value is inclusive.

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).

Pipe kinds, matching Deno.Command.

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.