import { s as StandardValidationIssue } from "./types-Ctg8aeXQ.mjs"; import { core } from "zod"; //#region src/guard.d.ts type GuardMode = "error" | "stub" | "warn"; type GuardResult = { allowed: true; } | { allowed: false; mode: GuardMode; envName: string; importer: string | undefined; }; type GuardFail = Extract; //#endregion //#region src/format.d.ts declare function formatZodError(issues: core.$ZodIssue[]): string; declare function formatStandardSchemaError(issues: StandardValidationIssue[]): string; /** Maximum visible character length for an importer path inside the warning box. */ declare const IMPORTER_MAX_LEN: number; /** * Truncates an importer path to fit within maxLen visible characters. * Adds a leading '…' when truncation occurs so the rightmost (most specific) part is preserved. */ declare function truncateImporter(importerPath: string, maxLen: number): string; /** * Renders the colored terminal warning box for 'warn' mode. * Every line is exactly 66 characters wide (visible chars, excluding ANSI codes), * assuming Vite environment names are short (≤19 chars). Longer names will extend * the line beyond 66 chars without crashing — Math.max(0) prevents negative padding. * Use in logger.warn() calls — not in log files. */ declare function formatGuardWarning(fail: GuardFail): string; /** * Renders the plain-text hard error message thrown in 'error' mode. * No ANSI — thrown as an Error message, not printed via logger. */ declare function formatHardError(fail: GuardFail): string; /** * Renders a single ANSI-free log entry for vite-env-warnings.log. * Uses the same (unknown) convention as formatGuardWarning for missing importers. */ declare function formatGuardLogEntry(fail: GuardFail, timestamp: string): string; //#endregion export { IMPORTER_MAX_LEN, formatGuardLogEntry, formatGuardWarning, formatHardError, formatStandardSchemaError, formatZodError, truncateImporter }; //# sourceMappingURL=format.d.mts.map