import type { Tagged } from "type-fest"; import type { FileBaseName } from "../utils.js"; export type ValidEnvName = Tagged; export type ValidScriptFormat = Tagged; export type ValidScriptFileName = Tagged; export type ValidScriptTimestamp = Tagged; export type ValidScriptName = Tagged; /** * Validates that a string is a valid environment name. * Throws if invalid. * * Environments: * - Cannot be empty or whitespace-only * - Cannot contain dots (used as delimiters in filenames) * - Must match pattern: alphanumeric, hyphens, underscores */ export declare function toValidEnvName(env: string): ValidEnvName; /** * Validates that a string is a valid script format (file extension). * Throws if invalid. * * Formats: * - Cannot be empty or whitespace-only * - Cannot contain dots (used as delimiters in filenames) * - Must only contain alphanumeric characters */ export declare function toValidScriptFormat(format: string): ValidScriptFormat; /** * Formats a Date as a timestamp string in the format used for migration * prefixes. Validates it in the process (date's time cannot be NaN). * * Format: YYYY.MM.DDTHH.MM.SS (e.g., "2024.02.04T19.00.00") */ export declare function toValidScriptTimestamp(date: Date): ValidScriptTimestamp; /** * Validates that a string is a valid script name (user-provided portion). * Throws if invalid. * * Names: * - Cannot be empty or whitespace-only * - Cannot contain dots (used as delimiters in filenames) * - Must match pattern: alphanumeric, hyphens, underscores */ export declare function toValidScriptName(name: string, allowSnapshotNames: boolean): ValidScriptName; //# sourceMappingURL=name-component-validation.d.ts.map