# 本地开发脚本共享配置（被 lib.ps1 / clean.ps1 / start.ps1 引用）

$script:DevConfig = @{
    ProjectRoot   = (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
    DevDir        = Join-Path (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path ".dev"
    PidDir        = Join-Path (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path ".dev/pids"
    LogDir        = Join-Path (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path ".dev/logs"
    NextPort      = 3000
    # LAN share: "auto" = detect Wi-Fi/Ethernet IP (never use WSL 172.x virtual adapter)
    LanHost       = "auto"
    NextBindHost  = "0.0.0.0"
    # 曾出现多实例漂移端口，一并清理
    ExtraPorts    = @(3001, 3002, 5173)
    DockerServices = @("mysql", "redis")
    HttpTimeoutSec = 120
    DockerWaitSec  = 60
    DockerDaemonWaitSec = 60
    DockerRepairMaxAttempts = 1
    ComposeFiles = @("docker-compose.yml", "docker-compose.dev.yml")
}
