import type { CliConfig } from './cli-config.js'; /** * Reads a JSON Schema off disk, or loads a module and converts it via its adapter. * * For JSON input, a schema whose only references are same-document `#/...` * pointers is parsed as-is — the generator resolves those internal `$ref`s * itself into named type files, so inlining them here would collapse that * structure. When a cross-file or remote `$ref` is present (which the generator * cannot follow on its own), the schema is *bundled* with `@amritk/resolve-refs`: * every external target is pulled into the root's `$defs` once and its refs point * there, so the generator sees a single document and still turns each shared * schema into one named type. Inlining instead lost those names for internal refs * too — any one external `$ref` turned every shared schema into a copy at each use, * which on layered schemas is exponential in the output. Any resolve failures are surfaced as a CLI error rather than silently yielding * a half-resolved schema. * * Avro splits the difference, and is the reason this is not a plain * json/not-json branch: a `.avsc` is a JSON *document*, not a module exporting a * value, so it is read and parsed like a JSON Schema and only the conversion is * delegated to the adapter. Nothing is imported, which also means an Avro schema * — unlike a Zod or TypeBox one — never reaches module evaluation. Its `$ref`s * are Avro names resolved by the adapter, not JSON Pointers, so the resolver * does not run over it either. */ export declare const loadSchema: (config: Partial, schemaPath: string) => Promise;