/** * Active deployments command for CLI — goes through SDK. * * @module */ import { runList, formatStatus } from "../actions.js"; import type { ICoolifyDeployment } from "../../coolify/types.js"; /** List all active deployments. */ export const activeDeploymentsCommand = () => runList( "active deployment(s)", (s) => s.deployments.active(), [ { header: "UUID", value: (d) => d.uuid }, { header: "Status", value: (d) => formatStatus(d.status) }, { header: "Commit", value: (d) => d.commit?.slice(0, 7) || "-" }, { header: "Created", value: (d) => new Date(d.created_at).toLocaleString(), }, ], );