/** * The JSON type each config key accepts, mirroring `config.schema.json`. * `boolean|string` is `banner`'s `"type": ["boolean", "string"]`, and * `string|string[]` is `formats`' `"type": ["string", "array"]` — a union the * label spells by its element type rather than by the bare word `array`, since * "expected string|array" tells a reader less than "expected string|string[]". */ type ConfigValueType = 'string' | 'boolean' | 'boolean|string' | 'string[]' | 'string|string[]'; /** One key's contract: its JSON type, plus the closed value set when it has one. */ type ConfigKeySpec = { readonly type: ConfigValueType; readonly enum?: readonly string[]; }; /** * Every key a config file may carry, kept in lockstep with `config.schema.json` * by `validate-config.test.ts`. * * The schema itself would be the obvious thing to validate against at runtime, * but it is deliberately not shipped in the published package (see `help-text.ts` * for the same trade-off), and `@amritk/runtime-validators` — the interpreter that * would run it — is not a declared dependency of this package. So the contract * lives here as data, and the test pins it to the schema so the two cannot drift. * (Exported for exactly that test — nothing else should read it.) */ export declare const CONFIG_KEYS: Record; /** * Checks a parsed config file against the key contract, throwing with every * problem found (JSON Pointer + what was expected). * * Before this, each key was guarded by a `typeof` check whose failure branch was * "drop it": `{"strcit": true, "strict": "true"}` generated non-strict output and * exited 0, while the very same typo on the command line was rejected. A config * file has to be at least as strict as the flags it stands in for. * * Note what this does *not* buy: a config is still trusted code. `schema` plus a * module-loading `input` (every format except `json` and `avro`, both of which * are parsed as data) makes `load-schema-module.ts` `import()` whatever path the * config names, so an untrusted `mjst.config.json` still reaches arbitrary module * evaluation. Validating the shape does not change that — do not run mjst against * a config file you would not run as a script. */ export declare const validateConfig: (parsed: Record, configPath: string) => void; export {};