diff --git a/src/core/types.ts b/src/core/types.ts index 699955e..6836b2e 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -1,13 +1,31 @@ -export type EnvType = 'string' | 'number' | 'boolean' | 'port' | 'email' | 'url' | 'json' | 'enum'; +export type EnvType = + | 'string' + | 'number' + | 'int' + | 'boolean' + | 'email' + | 'url' + | 'port' + | 'json' + | 'enum' + | 'host'; export interface EnvVariableConfig { type: EnvType; - required?: boolean; + required: boolean; + desc?: string; default?: string | number | boolean; - options?: string[]; + choices?: string[]; } -export type EnvVariableSchema = Record; +export interface EnvSchema { + variables: Record; +} + +export interface ParsedEnv { + flat: Record; + nested: Record; +} export interface ValidationError { field: string; @@ -16,7 +34,7 @@ export interface ValidationError { } export interface ValidationResult { - isValid: boolean; + valid: boolean; errors: ValidationError[]; - cleanedEnv: Record; + output: Record; }