Skip to main content
Module

x/denoexec/mod.ts

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
import * as denoexec from "https://deno.land/x/denoexec@v1.1.5/mod.ts";

Classes

This looks like an initiated Deno.Process<Deno.RunOptions> object as well as a Promise<ProcessResults> object at the same time.

This wraps Deno.ProcessStatus and provides some additional data and functionality.

Functions

f
_

_ is a short cut for exec({ cmds: [...args] }).

f
$

$ emulates a sub shell, essentially it sets inheritStdio to false & captureStdio to true and then returns the result of stdioCombined().

If set to true, the default; then output from STDOUT & STDERR will be captured into buffers for later use.

Set a custom current working directory for the child process.

Set a custom environment for the child process.

This is the primary export of the denoexec module & a factory method for a new Process instance.

If set to true, the default; then output from STDOUT & STDERR will be copied on to the Writers set by stdout & stderr.

If inheritStdio=true & a value is provided here, each line of output will be prefixed with this value.

If prefix is set then this will be suffixed on to the prefix. Defaults to |.

Provide an alternative Writer for the STDERR stream.

Send data to the child process via the STDIN stream.

Provide an alternative Writer for the STDOUT stream.

If set to true then a NonZeroExitCode error will be thrown when the process exists with a non-zero exit code.

If set to true then a NonEmptyStderrBuffer error will be thrown when the stderr buffer contains data.