import type { EnvField } from "../introspect.js"; export type ComposeStyle = "service" | "env-file"; export interface ComposeFragmentOptions { /** * Output style: * - `"service"` (default) — a `services:` fragment with one entry * under `environment:`, ready to merge into a `compose.yml`. * Values use `${VAR}` interpolation so Compose resolves them * from the host shell / `.env`. * - `"env-file"` — a plain `.env`-style file you can reference as * `env_file:` in compose. Defaults match the schema; secrets get * a REPLACE_ME placeholder unless overridden via `values`. */ style?: ComposeStyle; /** * Service name used in the `services:` fragment. Default: `"app"`. * Ignored when `style === "env-file"`. */ serviceName?: string; /** * Pre-fill specific variables with concrete values (overrides * `${VAR}` interpolation for `service` style, or REPLACE_ME for * `env-file` style). */ values?: Record; /** Header banner placed at the top of the output. */ header?: string; /** End-of-line. Default: `"\n"`. */ eol?: string; } /** * Generate a Docker Compose fragment from introspected env fields. * * `style: "service"` (default) — a complete `services:` snippet that * you can paste / `cat >> compose.yml`: * * ```yaml * services: * app: * environment: * APP_ENV: "${APP_ENV:-local}" * DB_HOST: "${DB_HOST}" * DB_PASSWORD: "${DB_PASSWORD}" * ``` * * `style: "env-file"` — a flat `.env`-style file with placeholders, * intended for `env_file:` references in your compose file. * * Secret values are never inlined unless explicitly overridden via * `options.values` — they always resolve through Compose's * `${VAR}` mechanism so they stay in the host environment. */ export declare function generateComposeFragment(fields: readonly EnvField[], options?: ComposeFragmentOptions): string; //# sourceMappingURL=compose.d.ts.map