import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import * as Bundle from "../../Bundle/Bundle.ts"; import { Stack } from "../../Stack.ts"; /** * The AWS-managed base image MicroVM Dockerfiles build on. The MicroVM build * runs the Dockerfile server-side and snapshots the result with Firecracker. */ export declare const MICROVM_BASE_DOCKER_IMAGE = "public.ecr.aws/lambda/microvms:al2023-minimal"; /** The default port the in-VM HTTP server listens on. */ export declare const DEFAULT_MICROVM_PORT = 8080; /** * Build the final Dockerfile for an effectful MicroVM image. Starts from the * user-provided base (or the managed MicroVM base), installs the JS runtime, * copies the bundled program, and runs it as the entrypoint. Mirrors the * Cloudflare Container `buildFinalDockerfile`, but targets the MicroVM base. */ export declare const buildMicrovmDockerfile: (userDockerfile: string | undefined, runtime: "bun" | "node", port: number) => string; /** * Bundle an Effect-native MicroVM program with Rolldown and wrap it in a * generated bootstrap that boots an HTTP server (the MicroVM endpoint). Returns * every emitted file so the full set can be zipped into the code artifact. * * Mirrors `bundleContainerProgram`; the bootstrap provides AWS runtime services * (FetchHttpClient + region from env) so in-VM HTTP capability bindings * (e.g. S3 `*Http`) resolve against the MicroVM's execution role. */ export declare const bundleMicrovmProgram: (args_0: { main: string; runtime: "bun" | "node"; handler?: string | undefined; isExternal?: boolean; external?: string[]; port: number; build?: Bundle.BundleConfig; }) => Effect.Effect<{ files: { path: string; content: Uint8Array; }[]; hash: string; }, Bundle.BundleError | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path | Stack>; export interface ArtifactFile { path: string; content: string | Uint8Array; } /** * Zip a flat list of files into a deterministic (fixed mtime) archive. Used to * package the MicroVM code artifact (Dockerfile + bundled program, or a build * context) before uploading it to S3. */ export declare const zipFiles: (files: readonly ArtifactFile[]) => Effect.Effect, never, never>; /** * Recursively read a build-context directory into a flat list of files * (relative paths + bytes) for zipping into the code artifact. Used by the * external (bring-your-own-Dockerfile) MicroVM mode. */ export declare const readContextDirectory: (dir: string) => Effect.Effect<{ path: string; content: Uint8Array; }[], any, FileSystem.FileSystem | Path.Path>; //# sourceMappingURL=MicrovmBundle.d.ts.map