wgutils
Version:
Tools for managing working groups
49 lines • 2.53 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const yargs_1 = __importDefault(require("yargs"));
const helpers_1 = require("yargs/helpers");
const agendasCmd = __importStar(require("./agendas/cli.js"));
const initCmd = __importStar(require("./init/cli.js"));
const canAutomergeCmd = __importStar(require("./canAutomerge/cli.js"));
(0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
.strict()
.showHelpOnFail(false, "Specify --help for available options")
.wrap(yargs_1.default.terminalWidth())
.parserConfiguration({
// Last option wins - do NOT make duplicates into arrays!
"duplicate-arguments-array": false,
})
.example("$0 agenda gen 2024 1", "Generate the agendas for January 2024")
.command("init", "Initialize wgutils", (yargs) => initCmd.options(yargs), initCmd.run)
.command("agenda", "Tools for helping with agendas", (yargs) => agendasCmd.options(yargs), agendasCmd.run)
.command("can-automerge [pr] [hash]", "Designed to run in CI to see if the given PR (at the given hash) can be auto-merged - be certain to ensure all the necessary checks are in place!", canAutomergeCmd.options, canAutomergeCmd.run)
.demandCommand().argv;
// Note: the above 'argv' property access actually triggers yargs to start; don't remove it.
//# sourceMappingURL=cli.js.map