pub mod ansible;
pub mod argocd;
pub mod aws;
pub mod az;
pub mod docker;
pub mod docker_compose;
pub mod fly;
pub mod gcloud;
pub mod helm;
pub mod kubectl;
pub mod linkerd;
pub mod pulumi;
pub mod skaffold;
pub mod supabase;
pub mod terraform;
pub mod vercel;
pub mod wrangler;

/// Legacy single-arg shim for docker build output (used by existing tests and FilterMesh nodes).
pub fn compress_docker(raw: &str) -> String {
    docker::compress_build(raw)
}

/// Route infra command output to the right compressor.
pub fn compress_infra(prog: &str, subcmd: &str, raw: &str) -> String {
    match prog {
        "docker" if subcmd.starts_with("compose") => {
            docker_compose::compress_compose(subcmd.trim_start_matches("compose").trim(), raw)
        }
        "docker-compose" => docker_compose::compress_compose(subcmd, raw),
        "docker" => docker::compress_docker(subcmd, raw),
        "kubectl" | "k" => kubectl::compress_kubectl(subcmd, raw),
        "terraform" => terraform::compress_terraform(subcmd, raw),
        "aws" => aws::compress_aws(subcmd, raw),
        "az" => az::compress_az(subcmd, raw),
        "gcloud" => gcloud::compress_gcloud(subcmd, raw),
        "pulumi" => pulumi::compress_pulumi(subcmd, raw),
        "wrangler" => wrangler::compress_wrangler(subcmd, raw),
        "vercel" => vercel::compress_vercel(subcmd, raw),
        "fly" | "flyctl" => fly::compress_fly(subcmd, raw),
        "supabase" => supabase::compress_supabase(subcmd, raw),
        "helm" => helm::compress_helm(subcmd, raw),
        _ => forge::signal::compactor::normalise(raw),
    }
}
