/** * Thin wasm glue for the carve-out advisor (#214 T1): read a Terraform estate's * `.tf` files, run them through `@cdktf/hcl2json`, merge into one tree, and hand * off to the pure `buildGraph`. * * `@cdktf/hcl2json` is NOT a chant dependency — it carries a ~1.8 MB wasm blob * and only carve-out users need it. It is lazy-loaded here and, if absent, the * advisor fails with a one-line install hint. */ import type { Hcl2JsonTree, TfGraph } from "./types.js"; /** Minimal shape of the parser exports we depend on. */ export interface Hcl2Json { parse: (filename: string, hcl: string) => Promise; /** Expression-AST reference extraction (#998) — one traversal accessor per reference. */ getReferencesInExpression: (filename: string, expression: string) => Promise>; } export declare class Hcl2JsonNotInstalled extends Error { constructor(cause: unknown); } /** * Lazy-load the optional HCL parser. Throws `Hcl2JsonNotInstalled` with an * install hint when the package is missing, rather than a raw MODULE_NOT_FOUND. */ export declare function loadHcl2json(): Promise; export interface ParseTerraformOptions { /** Opt-in `.tfstate` path (#214 T2): overlays state-expanded instance counts. */ statePath?: string; } /** * Parse a Terraform directory into a dependency graph. Reads only `.tf` unless * `statePath` is given. Pure `.tf` estates parse fully; `count`/`for_each` * blocks report a single instance and are flagged `hasDynamic`. With state, the * instance counts become accurate (see `state.ts`). */ export declare function parseTerraformDir(dir: string, opts?: ParseTerraformOptions): Promise; //# sourceMappingURL=parse.d.ts.map