import { type CommandOptions } from '../../types/ace.ts'; import { BaseCommand } from '../../modules/ace/main.ts'; declare const ALLOWED_TYPES: readonly ["string", "boolean", "number", "enum"]; type AllowedTypes = (typeof ALLOWED_TYPES)[number]; /** * Command to add a new environment variable to the application. * Updates .env, .env.example, and start/env.ts files with the new variable, * including appropriate validation schema based on the variable type. * * @example * ``` * ace env:add * ace env:add DATABASE_URL postgres://localhost:5432/mydb * ace env:add API_KEY secret --type=string * ace env:add PORT 3333 --type=number * ace env:add DEBUG true --type=boolean * ace env:add LOG_LEVEL info --type=enum --enum-values=debug,info,warn,error * ``` */ export default class EnvAdd extends BaseCommand { #private; /** * The command name */ static commandName: string; /** * The command description */ static description: string; /** * Command options configuration. * Allows unknown flags to be passed through. */ static options: CommandOptions; /** * Environment variable name (will be converted to SCREAMING_SNAKE_CASE) */ name: string; /** * Environment variable value */ value: string; /** * Data type of the environment variable (string, boolean, number, enum) */ type: AllowedTypes; /** * Allowed values for enum type variables */ enumValues: string[]; /** * Execute the command to add a new environment variable. * Prompts for missing values, validates inputs, and updates all relevant files. */ run(): Promise; } export {};