UNPKG

buildahcker

Version:

Buildahcker is a node.js library to create and run commands in OCI (Open Container Initiative) container images (or docker images), based on Buildah and a hash-based cache. It also contains utilities to easily create a partitioned bootable disk image of a

23 lines (22 loc) 828 B
import type { SpawnOptionsWithoutStdio } from "child_process"; import { Writable } from "stream"; export declare class WritableBuffer extends Writable { #private; promise: Promise<Buffer>; constructor(); _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null | undefined) => void): void; } export declare class CommandFailed extends Error { command: string[]; exitCode: number; stdout: Buffer; stderr: Buffer; constructor(command: string[], exitCode: number, stdout: Buffer, stderr: Buffer); } export interface ExecOptions { logger?: Writable; } export declare const exec: (command: string[], { logger }?: ExecOptions, spawnOptions?: Omit<SpawnOptionsWithoutStdio, "stdio">) => Promise<{ stdout: Buffer<ArrayBufferLike>; stderr: Buffer<ArrayBufferLike>; }>;