/** * `slowcook init from-prod` — 0.18.0 — generate a perfect mock by * mirroring the consumer's prod src/ into mock/ with fixture-backed * data wiring. Pure deterministic; no LLM. * * Encodes the 4-strategy taxonomy from docs/plans/0.17-brownfield-pipeline.md * (informed by the hand-built rewo perfect-mock at mock/LESSONS.md): * * A — verbatim copy (pure UI / pure data; no I/O) * B — DI seam (client component with `fetch()` → api-client wrapper) * C2 — server-mock + import-alias swap (Server Component / Supabase) * D — skip with @slowcook-mock-skip marker (server actions, websockets) * * Strategy detection: * - File contains `import.*supabase` AND under `src/utils/supabase/` * → C2 (re-export shim) * - File contains `"use server"` directive → D (skip with marker) * - File is a Server Component (top-of-file `export default async function` * in src/app/, NO "use client") → C2-eligible (server-mock import alias * handles it transparently) * - File is a Client Component (`"use client"`) AND contains `fetch(` * → B (DI seam: fetch wrapped in api-client function) * - Anything else → A (verbatim copy) * * The agent ALSO emits: * - `mock/src/lib/server-mock/supabase-server.ts` — fluent Supabase * mock client (the C2 swap target) * - `mock/src/lib/api-client/` — one file per detected fetch endpoint * (the B swap target) * - `mock/src/fixtures/` — one file per detected DB table (extracted * from supabase/migrations/) * - `mock/src/utils/supabase/server.ts` and `client.ts` — re-export * shims to the server-mock layer * - `mock/package.json`, `next.config.js`, `tsconfig.json`, etc. * — Next.js shell with the same major versions as prod * * Idempotent: re-running on an existing mock/ skips files that already * have a `@slowcook-mock-from` marker matching their prod source. * * 0.18.0 ships the SCAFFOLDING; 0.18.1+ refines the strategy detector * + auto-generates the per-table fixture handlers from migrations. */ import { copyFileSync } from "node:fs"; type Strategy = "A-verbatim" | "B-di-seam" | "C2-server-mock" | "D-skip"; export declare function initFromProd(argv: string[], _cliVersion: string): Promise; export declare function detectStrategy(absFile: string): Strategy; export { copyFileSync }; //# sourceMappingURL=from-prod.d.ts.map