pub mod alembic;
pub mod dbt;
pub mod flyway;
pub mod spark;

/// Route data engineering tool output to the right compressor.
pub fn compress_data(prog: &str, subcmd: &str, raw: &str) -> String {
    match prog {
        "dbt" => dbt::compress_dbt(subcmd, raw),
        "alembic" => alembic::compress_alembic(subcmd, raw),
        "flyway" => flyway::compress_flyway(subcmd, raw),
        "spark-submit" | "spark-shell" | "pyspark" => spark::compress_spark(subcmd, raw),
        _ => forge::signal::compactor::collapse_blanks(&forge::signal::compactor::normalise(raw)),
    }
}
