ReleaseDeepInfraDeepInfrapublished Nov 12, 2026seen 2w

deepinfra/deepinfra-node 2.2.0

deepinfra/deepinfra-node

Open original ↗

Captured source

source ↗
published Nov 12, 2026seen 2wcaptured 2whttp 200method plain

2.2.0 | Sandbox exec streaming

Repository: deepinfra/deepinfra-node

Tag: 2.2.0

Published: 2026-11-12T12:01:59Z

Prerelease: no

Release notes:

New: streaming exec

execStream() yields a command's output while it runs, then its exit code:

import { Sandbox } from "deepinfra";

const sb = await Sandbox.create({ plan: "nano", timeout: "5m" });
const countdown = "for i in 3 2 1; do echo $i; sleep 1; done";
for await (const event of sb.execStream("bash", "-c", countdown)) {
if (event.type === "stdout") process.stdout.write(event.data);
else if (event.type === "stderr") process.stderr.write(event.data);
else console.log("exit code", event.returncode);
}
await sb.terminate();
  • execStream(cmd, ...args, options?) yields { type: "stdout" | "stderr", data } chunks as they arrive, then one { type: "exit", returncode }. exec() still returns the whole output at once.
  • exec() and execStream() take an AbortSignal ({ signal }). Aborting makes the pending call or loop throw the signal's reason.
  • Neither aborting nor leaving the loop early stops the command: it keeps running in the sandbox until it exits or reaches its timeout (60 seconds by default).

See the Sandboxes section of the README.

Other changes

  • 2.1.0 was tagged but never published to npm, so this is the first npm release with the Sandbox API.
  • The published package no longer includes a test mock.
  • Releases are now staged on npm through trusted publishing and go live only after a maintainer approves them.

Full diff: https://github.com/deepinfra/deepinfra-node/compare/2.1.0...2.2.0