/** * Macro loader + expander. * * Loads the bundled `macros.yaml` once at module init and exposes * `expandMacro(name, overrides?)` which deep-merges the named macro with any * adopter overrides. The merge is "adopter wins": objects merge recursively, * arrays and primitives are replaced wholesale (no element-wise array merge). * * The shipped macro file is at `link-auth/macros.yaml`, copied into the dist * tree by `packages/dev-tools/src/copy-yaml-assets.ts` during build so the * runtime `fs.readFileSync(new URL('./macros.yaml', import.meta.url))` * resolves in both source-mode (vitest) and built-mode (dist). * * Per design issue #113 ยง5 (macros are config, not a privileged code path). */ /** * Thrown when a `use: ` references a macro not in the shipped set. * Message lists the available macros so a typo surfaces clearly. */ export declare class UnknownMacroError extends Error { constructor(name: string, available: readonly string[]); } /** * Look up a macro by name and deep-merge optional adopter overrides on top. * * Merge semantics: * - Plain objects merge recursively (sibling keys preserved). * - Arrays are replaced wholesale (override's array wins; no concat). * - Primitives are replaced. * - `undefined` in an override is treated as "not provided" (base wins). * * The returned object and all nested plain objects use null prototypes so * `__proto__` / `constructor` keys can never poison consumers. * * @throws {UnknownMacroError} if `name` is not in the shipped macro set */ export declare function expandMacro(name: string, overrides?: Record): Record; //# sourceMappingURL=expand-macro.d.ts.map