/** * Application Constants and Defaults * * Consolidated configuration values for the entire application. * This file merges environment schemas, default values, and application constants. */ import { z } from 'zod'; /** * Environment variable names */ export declare const ENV_VARS: { /** Custom policy directory path (highest priority) */ readonly CUSTOM_POLICY_PATH: "CUSTOM_POLICY_PATH"; }; /** * Environment Schema * Zod schema for environment validation across the application. */ export declare const environmentSchema: z.ZodEnum<["development", "staging", "production", "testing"]>; export type Environment = z.infer; /** * Default ports by programming language/framework */ export declare const DEFAULT_PORTS: { readonly javascript: readonly [3000, 8080]; readonly typescript: readonly [3000, 8080]; readonly python: readonly [8000, 5000]; readonly java: readonly [8080, 8081]; readonly go: readonly [8080, 3000]; readonly rust: readonly [8080, 3000]; readonly ruby: readonly [3000, 9292]; readonly php: readonly [8080, 80]; readonly csharp: readonly [8080, 5000]; readonly dotnet: readonly [8080, 5000]; readonly default: readonly [3000, 8080]; }; /** * Default timeout values in milliseconds */ export declare const DEFAULT_TIMEOUTS: { /** Cache expiration timeout: 5 minutes. */ readonly cache: 300000; /** Cache cleanup interval: 5 minutes. */ readonly cacheCleanup: 300000; /** Docker operations timeout: 30 seconds. */ readonly docker: 30000; /** Docker build timeout: 5 minutes. */ readonly dockerBuild: 300000; /** Kubernetes operations timeout: 30 seconds. */ readonly kubernetes: 30000; /** Security scan timeout: 5 minutes. */ readonly 'scan-image': 300000; /** Deployment timeout: 3 minutes. */ readonly deployment: 180000; /** Deployment status poll interval: 5 seconds. */ readonly deploymentPoll: 5000; /** Deployment verification timeout: 1 minute. */ readonly verification: 60000; /** Health check timeout: 5 seconds. */ readonly healthCheck: 5000; /** Trivy version check timeout: 15 seconds. */ readonly trivyVersionCheck: 15000; /** Cluster stabilization wait: 5 seconds. */ readonly clusterStabilization: 5000; }; /** * Default network configuration */ export declare const DEFAULT_NETWORK: { readonly host: "localhost"; readonly loopback: "127.0.0.1"; readonly dockerHost: "0.0.0.0"; }; /** * Validation limits */ export declare const LIMITS: { /** Maximum Dockerfile size (bytes): 1MB */ readonly MAX_DOCKERFILE_SIZE: 1048576; /** Maximum manifest size (bytes): 10MB */ readonly MAX_MANIFEST_SIZE: 10485760; /** Maximum log lines to retain */ readonly MAX_LOG_LINES: 1000; /** Maximum buffer size for scan results: 50MB (large for highly vulnerable test images) */ readonly MAX_SCAN_BUFFER: number; /** Maximum characters for AI prompt context */ readonly MAX_PROMPT_CHARS: 5000; /** Maximum snippets for AI prompt context */ readonly MAX_PROMPT_SNIPPETS: 25; }; /** * Retry configuration */ export declare const RETRY: { /** Default max retry attempts */ readonly MAX_ATTEMPTS: 3; /** Initial backoff delay (ms) */ readonly INITIAL_DELAY: 1000; /** Maximum backoff delay (ms) */ readonly MAX_DELAY: 10000; /** Backoff multiplier */ readonly MULTIPLIER: 2; }; /** * Docker-related constants */ export declare const DOCKER: { /** Default Dockerfile name */ readonly DEFAULT_DOCKERFILE: "Dockerfile"; /** Default build context */ readonly DEFAULT_CONTEXT: "."; /** Default registry */ readonly DEFAULT_REGISTRY: "docker.io"; /** Standard registry port for both external and internal access (default starting point, actual port may vary) */ readonly REGISTRY_PORT: 6000; /** Registry port search range start */ readonly REGISTRY_PORT_START: 6000; /** Registry port search range end */ readonly REGISTRY_PORT_END: 6100; /** Registry container name */ readonly REGISTRY_CONTAINER_NAME: "ca-registry"; /** Registry host for external access */ readonly REGISTRY_HOST: "localhost"; /** Registry internal port (inside container) */ readonly REGISTRY_INTERNAL_PORT: 5000; }; /** * Kubernetes constants */ export declare const KUBERNETES: { /** Default namespace */ readonly DEFAULT_NAMESPACE: "default"; /** Deployment check interval (ms) */ readonly DEPLOYMENT_CHECK_INTERVAL: 5000; /** Max deployment checks */ readonly MAX_DEPLOYMENT_CHECKS: 60; /** Wait timeout in seconds */ readonly WAIT_TIMEOUT_SECONDS: 300; /** Default replicas */ readonly DEFAULT_REPLICAS: 1; /** Default environment */ readonly DEFAULT_ENVIRONMENT: "development"; /** Default cluster */ readonly DEFAULT_CLUSTER: "default"; /** Default HTTP port */ readonly DEFAULT_HTTP_PORT: 80; /** Default HTTPS port */ readonly DEFAULT_HTTPS_PORT: 443; /** Pending LoadBalancer URL placeholder */ readonly PENDING_LB_URL: "http://pending-loadbalancer"; /** Default ingress host */ readonly DEFAULT_INGRESS_HOST: "app.example.com"; }; /** * Framework-specific default ports */ export declare const FRAMEWORK_PORTS: { readonly next: 3000; readonly react: 3000; readonly angular: 4200; readonly nuxt: 3000; readonly vue: 3000; readonly django: 8000; readonly flask: 5000; readonly fastapi: 8000; readonly 'aspnet-core': 5000; readonly 'aspnet-core-https': 5001; }; /** * Get default port for a given language */ export declare function getDefaultPort(language: string): number; /** * Get default port for a given framework */ export declare function getFrameworkPort(framework: string): number | undefined; //# sourceMappingURL=constants.d.ts.map