/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/total@0.2.3/dist/cli.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
#!/usr/bin/env node
"use strict";var __awaiter=this&&this.__awaiter||function(e,n,o,t){return new(o||(o=Promise))((function(i,r){function a(e){try{s(t.next(e))}catch(e){r(e)}}function c(e){try{s(t.throw(e))}catch(e){r(e)}}function s(e){e.done?i(e.value):new o((function(n){n(e.value)})).then(a,c)}s((t=t.apply(e,n||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),require("module-alias/register");const getStdin=require("get-stdin"),path=require("path"),pck=require(path.join(__dirname,"../package.json")),command_1=require("lib/command"),program=require("commander");function registerCommand(e,n){const o=new n,t=o.config(),i=program.command(t.name).description(t.description);for(const e of t.options)i.option(e.flags,e.description);i.action((n=>{const r=t.options.filter((e=>n[e.name])).map((e=>Object.assign({},e,{value:n[e.name]})));o.onRun(e,r).catch((e=>console.log(e.message))).then((e=>void 0!==e?console.log(e):i.help()))}))}(()=>{__awaiter(this,void 0,void 0,(function*(){const[e,n]=yield Promise.all([getStdin(),command_1.loadCommands()]);n.forEach(registerCommand.bind(this,e)),program.version(pck.version).parse(process.argv)}))})();
//# sourceMappingURL=/sm/7a8f51532e35c2fe508028d3ca1e3d4a803473f7766cd88d047d08e2dc1506d2.map