@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
30 lines • 1.19 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCatCi = void 0;
const vorpal_1 = __importDefault(require("vorpal"));
const packageInfos_1 = __importDefault(require("../../packageInfos"));
const commands_1 = __importDefault(require("./commands/security/commands"));
function reconstructArgs(args) {
return [args[0], ...args.slice(1).map((arg) => `"${arg}"`)].join(" ");
}
async function runCatCi() {
const vorpal = new vorpal_1.default();
process.exitCode = 0;
vorpal.delimiter("catci $").history("catci").version(packageInfos_1.default.version);
(0, commands_1.default)(vorpal);
const isInteractive = process.argv.length <= 2;
if (isInteractive) {
vorpal.log(`Catladder CI Tools 😻🔨 version ${packageInfos_1.default.version}`).show();
}
else {
process.exitCode = 1;
const args = reconstructArgs(process.argv.slice(2));
await vorpal.exec(args);
process.exit();
}
}
exports.runCatCi = runCatCi;
//# sourceMappingURL=catci.js.map