github →

Features

Features & components

Directory-grouped modules and the architectural components they roll up into.

Architecture

Public API & Type Facadeentryshared

Exposes the library’s main entry points (index.js / index.d.ts), method variants (async, sync, script, command, node), output converters (iterable, duplex, readable), and the comprehensive TypeScript type system.

Library facade and method variants

Subprocess Runtime & Stream Processingcoreprocessing

Drives the full subprocess lifecycle—spawning, waiting, collecting stdout/stderr, resolving exit states, applying timeouts/kills/cancellation, piping between processes, and running user-defined generator transforms.

Subprocess lifecycle and stream pipeline

Argument & Stdio Configurationcoreshared

Normalizes and validates call-time options (commands, encoding, file URLs, FD options, CWD, escaping) and stdio direction/type mappings into internal structures consumed by the runtime engine.

Option normalization and descriptor setup

Inter-Process Communicationcoreprocessing

Manages Node.js IPC channels between parent and child processes, including message buffering, validation, graceful forwarding, and request/response patterns.

Parent-child message passing

Internal Utilities & Diagnosticsshared

Low-level primitives and cross-cutting helpers used across the codebase, such as deferred promises, abort-signal composition, standard-stream detection, and verbose runtime diagnostics.

Shared primitives and logging helpers

Test & Verification Infrastructureinfra

Comprehensive functional test suites, TypeScript type tests (test-d), shared test helpers, and fixture scripts used to validate behavior across the full matrix of supported options and platforms.

Automated testing and type verification

Features (13)

  • lib/ipc14 files

    ipc forwards, buffers, and retrieves individual or multiple IPC messages between processes.

  • lib/methods10 files

    methods binds command strings and creates the main synchronous and asynchronous execution entry points.

  • lib/verbose10 files

    verbose logs command completion, errors, and info using default, custom, or built-in formatters.

  • lib/arguments9 files

    arguments parses command strings, escapes arguments, and normalizes cwd, encoding, and file descriptor options.

  • lib/stdio9 files

    stdio determines stream direction, duplicates file descriptors, and handles standard I/O setup for sync and async runs.

  • lib/io8 files

    io reads input synchronously, retrieves output asynchronously, iterates over streams, and enforces max buffer limits.

  • lib/transform8 files

    transform applies encoding and generator transforms, normalizes chunks, and runs asynchronous conversions in object mode.

  • lib/convert7 files

    convert constructs readable, duplex, and iterable streams while supporting concurrent and additive conversion logic.

  • lib/resolve7 files

    resolve waits for process exit and collects all standard I/O results in both synchronous and asynchronous modes.

  • lib/pipe6 files

    pipe sequences multiple commands into streaming pipelines, configuring setup, arguments, and abort behavior.

  • lib/return6 files

    assembles process results from duration, messages, early errors, final errors, and promise rejections.

  • lib/terminate6 files

    exposes process cancellation, cleanup, graceful shutdown, forceful killing, and signal handling.

  • lib/utils5 files

    implements abort signals, deferred promises, max-listener guards, standard-stream helpers, and uint-array utilities.