/** * Diagnostic routing for the `yaml` library. * * `yaml` writes its own diagnostics straight to the process's warning channel * (`process.emitWarning`) whenever its `logLevel` option allows it — the default * is `'warn'`. On a Helm chart that surfaced as, four times per `openlore * analyze` on kustomize: * * (node:NNN) Warning: Keys with collection values will be stringified due to * JS Object restrictions: "{ .Name }". Set mapAsMap: true to use object keys. * * That is not a user-actionable fact about the user's repository: it is a * consequence of OUR tolerant Go-template masking turning `{{ .Name }}` into a * YAML flow map, and of OUR choice to call `toJS()` without `mapAsMap`. The * information still belongs somewhere, so instead of discarding it: * * - every OpenLore `yaml` parse passes {@link YAML_QUIET}, so the library * never writes to the terminal itself; and * - {@link reportStringifiedCollectionKeys} re-derives the same fact * deterministically from the parsed document and reports it on OpenLore's * own logger at debug level, where `--verbose` shows it with the file path * the library's warning never carried. * * Nothing we read is lost by the stringification: the readers only consume * string-keyed fields (`kind`, `metadata.name`, …), and a collection-valued key * is never one of them. The debug line says which key it was, so a reader who * needs it can go look. */ /** * Parse options that keep the `yaml` library off the terminal. * * Spread into every `parse` / `parseDocument` / `parseAllDocuments` call: * `parseDocument(src, { ...YAML_QUIET, lineCounter })`. * * `'error'`, deliberately NOT `'silent'`. The library's `log.warn` fires only at * `'debug'` and `'warn'`, so `'error'` already silences every warning — while * `'silent'` additionally changes ERROR semantics: `yaml.parse()` stops throwing * on a malformed document and returns partial data instead, and `parseDocument` * stops reporting a multi-document source. Silencing a warning must never * silence an error. */ export declare const YAML_QUIET: { readonly logLevel: "error"; }; type MaybeDocument = { contents?: unknown; } | null | undefined; /** * Report, on OpenLore's own logger at debug level, every map key in `docs` whose * value side is itself a collection — the keys `yaml` would have warned about * when the document is converted with `toJS()`. * * Deterministic and read-only: it inspects the already-parsed document and * never re-parses or mutates it. */ export declare function reportStringifiedCollectionKeys(docs: MaybeDocument | readonly MaybeDocument[], filePath: string): void; export {}; //# sourceMappingURL=yaml-diagnostics.d.ts.map