@xgheaven/nos-cli
Version:
A Cli tools to manage NOS
33 lines (32 loc) • 848 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Command = /** @class */ (function () {
function Command() {
this.describe = '';
}
Command.prototype.builder = function (args) {
return args;
};
Command.prototype.handler = function (args) {
return;
};
Command.prototype.panic = function (msg, code) {
if (msg === void 0) { msg = ''; }
if (code === void 0) { code = 1; }
msg = msg.trim();
if (msg) {
console.error(msg);
}
process.exit(code);
};
Command.prototype.done = function (msg) {
if (msg === void 0) { msg = ''; }
msg = msg.trim();
if (msg) {
console.log(msg);
}
process.exit(0);
};
return Command;
}());
exports.Command = Command;