feat: release 2.7.1
This commit is contained in:
+28
-11
@@ -3,6 +3,7 @@ import { wrapCommandErrors } from "../lib/error";
|
||||
|
||||
function lazyCommand<T extends object>(
|
||||
load: () => Promise<T>,
|
||||
options: { hidden?: boolean } = {},
|
||||
): () => Promise<T> {
|
||||
let pending: Promise<T> | undefined;
|
||||
return () =>
|
||||
@@ -11,6 +12,12 @@ function lazyCommand<T extends object>(
|
||||
// Keep the exported command objects pristine: tests and callers may
|
||||
// import them directly while the CLI needs wrapped handlers.
|
||||
const cliCommand = cloneCommand(command);
|
||||
if (options.hidden) {
|
||||
const definition = cliCommand as T & {
|
||||
meta?: Record<string, unknown>;
|
||||
};
|
||||
definition.meta = { ...definition.meta, hidden: true };
|
||||
}
|
||||
wrapCommandErrors(cliCommand);
|
||||
return cliCommand;
|
||||
})
|
||||
@@ -37,8 +44,8 @@ function cloneCommand<T extends object>(command: T): T {
|
||||
export const main = defineCommand({
|
||||
meta: {
|
||||
name: "kuber",
|
||||
version: "2.7.0",
|
||||
description: "Docker Compose -> K8s translation layer",
|
||||
version: "2.7.1",
|
||||
description: "Deploy and manage projects on Kubernetes",
|
||||
},
|
||||
args: {
|
||||
config: {
|
||||
@@ -48,21 +55,27 @@ export const main = defineCommand({
|
||||
},
|
||||
subCommands: {
|
||||
add: lazyCommand(() => import("./add").then((m) => m.add)),
|
||||
audit: lazyCommand(() => import("./audit").then((m) => m.audit)),
|
||||
ci: lazyCommand(() => import("./ci").then((m) => m.ci)),
|
||||
audit: lazyCommand(() => import("./audit").then((m) => m.audit), {
|
||||
hidden: true,
|
||||
}),
|
||||
ci: lazyCommand(() => import("./ci").then((m) => m.ci), { hidden: true }),
|
||||
db: lazyCommand(() => import("./db").then((m) => m.db)),
|
||||
down: lazyCommand(() => import("./down").then((m) => m.down)),
|
||||
export: lazyCommand(() => import("./export").then((m) => m.exportCommand)),
|
||||
exec: lazyCommand(() => import("./exec").then((m) => m.exec)),
|
||||
init: lazyCommand(() => import("./init").then((m) => m.init)),
|
||||
logs: lazyCommand(() => import("./logs").then((m) => m.logs)),
|
||||
maintenance: lazyCommand(() =>
|
||||
import("./maintenance").then((m) => m.maintenance),
|
||||
maintenance: lazyCommand(
|
||||
() => import("./maintenance").then((m) => m.maintenance),
|
||||
{ hidden: true },
|
||||
),
|
||||
login: lazyCommand(() => import("./auth").then((m) => m.login)),
|
||||
logout: lazyCommand(() => import("./auth").then((m) => m.logout)),
|
||||
operations: lazyCommand(() =>
|
||||
import("./operations").then((m) => m.operations),
|
||||
logout: lazyCommand(() => import("./auth").then((m) => m.logout), {
|
||||
hidden: true,
|
||||
}),
|
||||
operations: lazyCommand(
|
||||
() => import("./operations").then((m) => m.operations),
|
||||
{ hidden: true },
|
||||
),
|
||||
ps: lazyCommand(() => import("./ps").then((m) => m.ps)),
|
||||
restart: lazyCommand(() => import("./restart").then((m) => m.restart)),
|
||||
@@ -71,9 +84,13 @@ export const main = defineCommand({
|
||||
start: lazyCommand(() => import("./start").then((m) => m.start)),
|
||||
stop: lazyCommand(() => import("./stop").then((m) => m.stop)),
|
||||
up: lazyCommand(() => import("./up").then((m) => m.up)),
|
||||
users: lazyCommand(() => import("./users").then((m) => m.users)),
|
||||
users: lazyCommand(() => import("./users").then((m) => m.users), {
|
||||
hidden: true,
|
||||
}),
|
||||
trust: lazyCommand(() => import("./trust").then((m) => m.trust)),
|
||||
whoami: lazyCommand(() => import("./auth").then((m) => m.whoami)),
|
||||
whoami: lazyCommand(() => import("./auth").then((m) => m.whoami), {
|
||||
hidden: true,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user