use crate::error::CliResult;
use crate::output::{self, kv};
const VERSION: &str = env!("CARGO_PKG_VERSION");
const NAME: &str = env!("CARGO_PKG_NAME");
pub async fn run() -> CliResult<()> {
output::logo();
output::newline();
kv("Version", VERSION);
kv("Binary", NAME);
#[cfg(debug_assertions)]
let build_mode = "debug";
#[cfg(not(debug_assertions))]
let build_mode = "release";
kv("Build", build_mode);
let mut features = Vec::new();
#[cfg(feature = "postgres")]
features.push("postgres");
#[cfg(feature = "mysql")]
features.push("mysql");
#[cfg(feature = "sqlite")]
features.push("sqlite");
if features.is_empty() {
features.push("none");
}
kv("Features", &features.join(", "));
output::newline();
output::section("Components");
kv("prax-schema", env!("CARGO_PKG_VERSION"));
kv("prax-query", env!("CARGO_PKG_VERSION"));
kv("prax-codegen", env!("CARGO_PKG_VERSION"));
kv("prax-migrate", env!("CARGO_PKG_VERSION"));
output::newline();
output::dim("https://prax.dev");
Ok(())
}