/** * `.brewing/dev-env.yaml` (legacy) and `.brewing/serve.yaml` (new) — * profile-aware config for `slowcook serve `. * * Trade-off resolution from `docs/plans/0.20-design-discussions.md` * design #5: KEEP the `dev-env.yaml` filename forever. The schema * grows a `profiles:` map for multi-profile use; legacy flat shape * (no `profiles:` key) is wrapped as `profiles.dev = {...flat}` on * load. Migration cost for existing consumers: zero. * * Phase 1 (this cut): only the `dev` profile is consumed by * `slowcook serve dev up|sync|down|logs`. `mock` and `staging` * profiles parse into the same shape but are stubs until Phase 2 + 3. */ import { z } from "zod"; export declare const DEV_ENV_CONFIG_PATH = ".brewing/dev-env.yaml"; export declare const SERVE_CONFIG_PATH = ".brewing/serve.yaml"; declare const AppModeSchema: z.ZodEnum<{ start: "start"; dev: "dev"; "nest-watch": "nest-watch"; static: "static"; none: "none"; "nest-prod": "nest-prod"; "next-dev": "next-dev"; "next-start": "next-start"; "vite-dev": "vite-dev"; }>; export declare const ProfileConfigSchema: z.ZodObject<{ mode: z.ZodDefault>>; source_branch: z.ZodDefault; compose_files: z.ZodOptional>; compose_overlay: z.ZodOptional; bringup_cmd: z.ZodOptional; apps: z.ZodDefault; port: z.ZodNumber; autoheal: z.ZodDefault>; container: z.ZodOptional; }, z.core.$strip>>>; persistence: z.ZodDefault; uploads_volume: z.ZodOptional; }, z.core.$strip>>>; ssh_target: z.ZodOptional; }, z.core.$strip>>; seed_script: z.ZodOptional; seed: z.ZodOptional>; }, z.core.$strip>>>; guard_env: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type ProfileConfig = z.infer; export type AppMode = z.infer; /** * Normalised shape after loading EITHER `.brewing/serve.yaml` * (explicit `profiles:` key) OR `.brewing/dev-env.yaml` (legacy flat * shape — wrapped as `{profiles: {dev: {...flat}}}`). */ export declare const ServeConfigSchema: z.ZodObject<{ $schema: z.ZodOptional; schema_version: z.ZodLiteral<1>; profiles: z.ZodRecord>>; source_branch: z.ZodDefault; compose_files: z.ZodOptional>; compose_overlay: z.ZodOptional; bringup_cmd: z.ZodOptional; apps: z.ZodDefault; port: z.ZodNumber; autoheal: z.ZodDefault>; container: z.ZodOptional; }, z.core.$strip>>>; persistence: z.ZodDefault; uploads_volume: z.ZodOptional; }, z.core.$strip>>>; ssh_target: z.ZodOptional; }, z.core.$strip>>; seed_script: z.ZodOptional; seed: z.ZodOptional>; }, z.core.$strip>>>; guard_env: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>; export type ServeConfig = z.infer; /** * Loader: prefer `.brewing/serve.yaml` if present, else fall back to * `.brewing/dev-env.yaml`. Legacy flat shapes get wrapped to the * `{profiles: {dev: {...flat}}}` form. Returns the normalised * `ServeConfig`. */ export declare function loadServeConfig(repoRoot: string): ServeConfig; /** * Detect legacy vs new shape + normalise. Exported for tests + the * legacy `slowcook dev-env` callers that want the same loader. */ export declare function normaliseConfig(raw: unknown, source: string): ServeConfig; /** Convenience: lookup a profile by name (case-sensitive). */ export declare function getProfile(config: ServeConfig, name: string): ProfileConfig | undefined; /** * Return the ordered list of compose files for `docker compose -f ... -f ...`. * Prefers `compose_files` (the multi-file shape sc#173 #2 surfaced); falls * back to `compose_overlay` (legacy single-file). Empty when neither is set. */ export declare function composeFiles(profile: ProfileConfig): string[]; /** * Whether `docker compose up` should pass `--build`. * * - `bind-mount-source`: NEVER. The whole point of the mode is to skip * docker build (rsync source into a bind-mounted container). Passing * `--build` triggers a rebuild that takes minutes per up. sc#173 #2. * - `built-image`: usually no — the consumer's bring-up rebuilds out of * band. But the explicit `--build` from `up` is conventional for * built-image so the local docker daemon picks up image edits. */ export declare function shouldBuildOnUp(profile: ProfileConfig): boolean; export {}; //# sourceMappingURL=config.d.ts.map