UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

28 lines (26 loc) • 921 B
import { colors, icons } from "../../utils/theme.mjs"; //#region src/cli/render/deploy.ts const DEPLOY_LEG_NAMES = [ "image", "smoke", "railway" ]; /** The per-leg ✓/-/✗ table under a deploy result. */ function renderDeployLegs(legs) { if (!legs) return; const rows = DEPLOY_LEG_NAMES.map((name) => [name, legs[name]]); console.log(); for (const [name, leg] of rows) { if (!leg) continue; const mark = leg.status === "ok" ? colors.green(icons.ok) : leg.status === "skipped" ? colors.dim("-") : colors.error(icons.err); console.log(` ${mark} ${name}${leg.detail ? colors.dim(` ${leg.detail}`) : ""}`); } } /** Names of the failed deploy legs — the exit-code signal. */ function failedDeployLegs(legs) { if (!legs) return []; return DEPLOY_LEG_NAMES.filter((name) => legs[name]?.status === "failed"); } //#endregion export { failedDeployLegs, renderDeployLegs }; //# sourceMappingURL=deploy.mjs.map