import type { ComposePortMapping, ComposeServicePorts, AllocatedComposePort } from '../../shared/types.js'; interface ComposeService { ports?: (string | number | PortObject)[]; [key: string]: unknown; } interface PortObject { target: number; published?: number | string; protocol?: 'tcp' | 'udp'; } interface ComposeConfig { services?: Record; [key: string]: unknown; } /** * 포트 문자열을 파싱하여 호스트/컨테이너 포트 추출 * 지원 형식: * - "3000" → 3000:3000 * - "3000:8000" → 3000:8000 * - "127.0.0.1:3000:8000" → 3000:8000 (IP 무시) * - "3000:8000/tcp" → 3000:8000 (tcp) */ export declare function parsePortString(portStr: string | number): ComposePortMapping; /** * docker-compose.yml 파일을 파싱 */ export declare function parseComposeFile(cwd: string, filename?: string): ComposeConfig; /** * 서비스 이름 목록 추출 (명령어에서 특정 서비스가 지정된 경우) */ export declare function extractServiceNames(command: string): string[]; /** * 특정 서비스의 포트 매핑 추출 */ export declare function extractServicePorts(config: ComposeConfig, serviceName: string): ComposePortMapping[]; /** * 모든 서비스의 포트 매핑 추출 */ export declare function getAllServicePorts(config: ComposeConfig, serviceNames?: string[]): ComposeServicePorts[]; /** * Override YAML 파일 생성 */ export declare function generateOverrideYaml(allocatedPorts: Map): string; /** * Override 파일 작성 */ export declare function writeOverrideFile(cwd: string, content: string): string; /** * docker compose 명령어를 override 파일을 포함하도록 변환 */ export declare function transformComposeCommand(originalCommand: string, overridePath: string): string; /** * Override 파일 경로 반환 */ export declare function getOverrideFilePath(cwd: string): string; export {};