vlt
Version:
The vlt CLI
51 lines (49 loc) • 1.41 kB
JavaScript
var global = globalThis;
import {Buffer} from "node:buffer";
import {setTimeout,clearTimeout,setImmediate,clearImmediate,setInterval,clearInterval} from "node:timers";
import {createRequire as _vlt_createRequire} from "node:module";
var require = _vlt_createRequire(import.meta.filename);
import {
loadCommand
} from "./chunk-G3BQHLJP.js";
import {
commandUsage
} from "./chunk-2Y5QRO5N.js";
import {
getCommand
} from "./chunk-BNCOU5ZT.js";
import {
error
} from "./chunk-RV3EHS4P.js";
import "./chunk-AECDW3EJ.js";
// ../../src/cli-sdk/src/commands/help.ts
var usage = () => commandUsage({
command: "help",
usage: "[<command>]",
description: "Print the full help output for the CLI, or help for a specific command",
examples: {
"": { description: "Show general CLI help" },
install: { description: "Show help for the install command" },
run: { description: "Show help for the run command" }
}
});
var command = async (conf) => {
if (conf.positionals.length === 0) {
return conf.jack.usage();
}
const cmdName = conf.positionals[0];
const canonicalCmd = getCommand(cmdName);
if (!canonicalCmd) {
throw error(`Unknown command: ${cmdName}`, {
found: cmdName,
code: "EUSAGE"
});
}
const command2 = await loadCommand(canonicalCmd);
return command2.usage().usage();
};
export {
command,
usage
};
//# sourceMappingURL=help-TDDHR42M.js.map