import { StandardSchemaV1 } from "@standard-schema/spec"; import { z } from "zod"; //#region src/types.d.ts type EnvDefinition = { server?: z.ZodRawShape; client?: z.ZodRawShape; /** * Retained from defineEnv for validation-time platform detection. * Gating relies on schema reference identity — cloning or serializing * the definition disables it (preset keys become permanently strict). */ presets?: EnvPreset[]; }; type StandardEnvDefinition = { server?: Record; client?: Record; /** @internal */ readonly _standard: true; }; type EnvPreset = { server?: z.ZodRawShape; client?: z.ZodRawShape; /** * Returns true when running on the platform that injects these vars. * When false, preset vars validate as optional (user overrides excluded) * so local dev passes without platform-injected vars. */ detect?: (env: Record) => boolean; }; type AnyEnvDefinition = EnvDefinition | StandardEnvDefinition; type ValidationResult = { success: true; data: Record; errors: []; } | { success: false; data: null; errors: z.core.$ZodIssue[]; }; type StandardValidationIssue = { message: string; path: readonly (PropertyKey | StandardSchemaV1.PathSegment)[]; }; type StandardValidationResult = { success: true; data: Record; errors: []; } | { success: false; data: null; errors: StandardValidationIssue[]; }; type OrEmptyShape = T extends z.ZodRawShape ? T : Record; type InferClientEnv = z.infer>>; type InferServerEnv = z.infer & OrEmptyShape>>; //#endregion export { InferServerEnv as a, StandardValidationResult as c, InferClientEnv as i, ValidationResult as l, EnvDefinition as n, StandardEnvDefinition as o, EnvPreset as r, StandardValidationIssue as s, AnyEnvDefinition as t }; //# sourceMappingURL=types-DudMh278.d.cts.map