Files
kuber/command/main.ts
T
dmgnr 6c8c8e0c1b feat: implement rollback command for deployments
- Added a new `rollback` command to roll back deployments to their previous release.
- Introduced `findRollbackCandidates` and `rollbackDeployment` functions to handle rollback logic.
- Updated CLI command definitions to include the new `rollback` command with an alias.
- Enhanced deployment conversion to use resolved images for buildable services.
- Introduced a new `graph` module to visualize Kubernetes resources and their relationships.
- Added tests for the new rollback functionality and graph rendering.
- Updated package version to 1.3.0.
2026-08-30 23:47:38 +07:00

50 lines
1.0 KiB
TypeScript

import tab from "@bomb.sh/tab/citty";
import { defineCommand } from "citty";
import { db } from "./db";
import { down } from "./down";
import { exec } from "./exec";
import { exportCommand } from "./export";
import { logs } from "./logs";
import { ps } from "./ps";
import { restart } from "./restart";
import { rollback } from "./rollback";
import { s3 } from "./s3";
import { start } from "./start";
import { stop } from "./stop";
import { up } from "./up";
export const main = defineCommand({
meta: {
name: "kuber",
version: "1.3.0",
description: "Docker Compose -> K8s translation layer",
},
args: {
config: {
type: "string",
description: "Path to a kuber configuration file",
},
},
subCommands: {
db,
down,
export: exportCommand,
exec,
logs,
ps,
restart,
rollback,
s3,
start,
stop,
up,
},
});
let completion: ReturnType<typeof tab> | undefined;
export function initializeCompletion() {
completion ??= tab(main);
return completion;
}