feat: improve deployment workflows

This commit is contained in:
2026-08-29 06:38:37 +00:00 Unverified
parent a1705487f2
commit 6ab5123f00
23 changed files with 1392 additions and 111 deletions
+8 -31
View File
@@ -1,14 +1,5 @@
import { defineCommand, runMain } from "citty";
import { db } from "./command/db";
import { down } from "./command/down";
import { exportCommand } from "./command/export";
import { exec } from "./command/exec";
import { logs } from "./command/logs";
import { ps } from "./command/ps";
import { restart } from "./command/restart";
import { start } from "./command/start";
import { stop } from "./command/stop";
import { up } from "./command/up";
import { createMain } from "citty";
import { initializeCompletion, main } from "./command/main";
import { provideContext } from "./lib/context";
import z, { ZodError } from "zod";
@@ -27,27 +18,13 @@ function formatUnknownError(error: unknown): string {
}
}
const main = defineCommand({
meta: {
name: "kuber",
version: "1.0.0",
description: "Docker Compose -> K8s translation layer",
},
subCommands: {
db,
down,
export: exportCommand,
exec,
logs,
ps,
restart,
start,
stop,
up,
},
});
async function run() {
await initializeCompletion();
const cli = createMain(main);
await provideContext(() => cli());
}
provideContext(() => runMain(main)).catch((e) => {
run().catch((e) => {
console.error(formatUnknownError(e));
process.exitCode = 1;
});