#!/usr/bin/env node /** * Parses CLI arguments into fixHeaders options and control flags. * @param {string[]} argv - Process argument vector without node/script items. * @returns {{ * options: Record, * help: boolean, * json: boolean, * diff: boolean * }} Parsed CLI payload. */ export function parseCliArgs(argv: string[]): { options: Record; help: boolean; json: boolean; diff: boolean; }; /** * Loads extra options from the JSON config file named by `--config` (and everything it * `extends`); options given on the command line win over the file. * @param {Record} options - Current options object. * @returns {Promise>} Merged options object. */ export function applyConfigFile(options: Record): Promise>; /** * Executes CLI flow and returns process-like exit code. * @param {string[]} argv - CLI arguments. * @param {{ * runner?: (options: Record) => Promise, * stdout?: (message: string) => void, * stderr?: (message: string) => void * }} [deps={}] - Dependency overrides for tests. * @returns {Promise} Exit code. */ export function runCli(argv: string[], deps?: { runner?: (options: Record) => Promise; stdout?: (message: string) => void; stderr?: (message: string) => void; }): Promise; /** * Executes CLI flow when the module is the process entrypoint. * @param {string[]} [argv=process.argv] - Process argument vector. * @param {string} [moduleUrl=import.meta.url] - Current module URL. * @param {(args: string[]) => Promise} [executor=runCli] - CLI executor. * @returns {boolean} Whether the entrypoint branch was executed. */ export function runCliAsMain(argv?: string[], moduleUrl?: string, executor?: (args: string[]) => Promise): boolean; export type CliChangeEntry = { file?: string; changed?: boolean; sample?: { previousValue?: string | null; newValue?: string; diff?: string; issues?: Array<{ field?: string; previous?: string | null; detected?: string | null; }>; detectedValues?: Record; }; };