Initial upload with CI/CD workflow
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-01-31 20:27:36 +00:00
parent 4dd7b2cd69
commit 54fd8f8343

63
src/core/types.ts Normal file
View File

@@ -0,0 +1,63 @@
export interface EnvVariable {
name: string;
value: string;
required: boolean;
type: EnvType;
description?: string;
default?: string | number | boolean;
choices?: string[];
}
export type EnvType =
| 'string'
| 'number'
| 'boolean'
| 'enum'
| 'port'
| 'url'
| 'email'
| 'json'
| 'int'
| 'host';
export interface EnvSchema {
variables: Record<string, EnvVariableSchema>;
}
export interface EnvVariableSchema {
type: EnvType;
required?: boolean;
default?: string | number | boolean;
choices?: string[];
desc?: string;
name?: string;
}
export interface ParsedEnv {
flat: Record<string, string>;
nested: Record<string, unknown>;
}
export interface ValidationResult {
valid: boolean;
errors: ValidationError[];
output: Record<string, unknown>;
}
export interface ValidationError {
field: string;
message: string;
value?: unknown;
}
export interface GenerateOptions {
envPath?: string;
schemaPath?: string;
outputPath?: string;
interfaceName?: string;
}
export interface MigrateOptions {
envPath?: string;
outputPath?: string;
}