use std::path::PathBuf;
use crate::sdk::pm2;
pub async fn pm2_list(debug: bool) -> Result<(), String> {
pm2::list(debug).await
}
pub async fn pm2_logs(project: Option<String>, debug: bool) -> Result<(), String> {
pm2::logs(project, debug).await
}
pub async fn pm2_stop(name: &str, debug: bool) -> Result<(), String> {
pm2::stop(name, debug).await
}
pub async fn pm2_delete(name: &str, debug: bool) -> Result<(), String> {
pm2::delete(name, debug).await
}
pub async fn pm2_start(
name: &str,
command: &str,
log_dir: Option<&PathBuf>,
debug: bool,
) -> Result<(), String> {
pm2::start(name, command, log_dir, debug).await
}
pub async fn pm2_cleanup(debug: bool) -> Result<(), String> {
pm2::cleanup(debug).await
}
pub async fn pm2_save(debug: bool) -> Result<(), String> {
pm2::save(debug).await
}