/** * Defense-in-depth redaction of MODYO_TOKEN material from CLI output. * * Two passes compose: * * 1. Regex pass — targets the `MODYO_TOKEN=` (or `: `) * form. Catches the contract `KEY=value` even when the token * rotates, since the key is what we match on. * 2. Value pass — targets every literal occurrence of the actual token * passed in. Catches forms the regex misses: tokens embedded in * URLs (`?token=...`), in `Authorization: Bearer ...` headers, or * echoed bare inside an error string. * * The regex pass is form-aware but value-agnostic; the value pass is * value-aware but form-agnostic. Together they cover the cartesian * product of "form of echo" × "value at echo time" — important because * the CLI can change its echo format in a future release without * warning, leaving a single-form regex silently stale. * * Guard: an empty/undefined `tokenValue` SKIPS the value pass — * `String.prototype.replaceAll('', '***')` would insert `***` between * every character of the output. The preflight already rejects empty * tokens, so the guard exists as belt-and-suspenders only. * * This helper has no external dependencies on purpose — kept in its * own module so test files can import it without dragging in the * spawn/fs surface of WidgetsScaffold.ts (which interferes with vi.mock * factory hoisting). */ export declare function sanitize(text: string, tokenValue?: string): string; //# sourceMappingURL=_sanitize.d.ts.map