@beecode/msh-cli 2.0.4 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controller/cli-menu/main-menu.d.ts.map +1 -1
- package/dist/controller/cli-menu/main-menu.js +3 -2
- package/dist/controller/yargs-router/cli-router.d.ts +1 -1
- package/dist/controller/yargs-router/cli-router.d.ts.map +1 -1
- package/dist/controller/yargs-router/cli-router.js +1 -1
- package/dist/controller/yargs-router/git-router.d.ts +1 -1
- package/dist/controller/yargs-router/git-router.d.ts.map +1 -1
- package/dist/controller/yargs-router/git-router.js +1 -1
- package/dist/controller/yargs-router/npm-router.d.ts +1 -1
- package/dist/controller/yargs-router/npm-router.d.ts.map +1 -1
- package/dist/controller/yargs-router/npm-router.js +1 -1
- package/dist/dal/shell-dal.d.ts.map +1 -1
- package/dist/index-cli.js +5 -3
- package/dist/model/command/init-config.d.ts +1 -1
- package/dist/model/command/init-config.d.ts.map +1 -1
- package/dist/model/command/init-config.js +2 -1
- package/dist/model/command/project-command/git-clone-project-command.d.ts +1 -1
- package/dist/model/command/project-command/git-clone-project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/git-clone-project-command.js +2 -1
- package/dist/model/command/project-command/git-simple-project-command.d.ts +1 -1
- package/dist/model/command/project-command/git-simple-project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/git-simple-project-command.js +2 -1
- package/dist/model/command/project-command/git-tag-project-command.d.ts +1 -1
- package/dist/model/command/project-command/git-tag-project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/git-tag-project-command.js +2 -1
- package/dist/model/command/project-command/npm-global-project-command.d.ts +1 -1
- package/dist/model/command/project-command/npm-global-project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/npm-global-project-command.js +4 -2
- package/dist/model/command/project-command/npm-install-project-command.d.ts +1 -1
- package/dist/model/command/project-command/npm-install-project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/npm-install-project-command.js +2 -1
- package/dist/model/command/project-command/project-command.d.ts +2 -2
- package/dist/model/command/project-command/project-command.d.ts.map +1 -1
- package/dist/model/command/project-command/project-command.js +1 -1
- package/dist/service/init-config-service.d.ts.map +1 -1
- package/dist/service/shell-service.d.ts +1 -1
- package/dist/service/shell-service.d.ts.map +1 -1
- package/dist/service/shell-service.js +1 -2
- package/dist/service/terminal-wrapper.d.ts +1 -1
- package/dist/service/terminal-wrapper.d.ts.map +1 -1
- package/dist/service/terminal-wrapper.js +1 -1
- package/dist/util/base-menu.d.ts +1 -2
- package/dist/util/base-menu.d.ts.map +1 -1
- package/dist/util/base-menu.js +2 -1
- package/dist/util/constant.d.ts +2 -2
- package/dist/util/constant.d.ts.map +1 -1
- package/dist/util/constant.js +1 -2
- package/dist/util/object-util.d.ts.map +1 -1
- package/dist/util/object-util.js +2 -1
- package/dist/util/sub-menu.d.ts +1 -1
- package/dist/util/sub-menu.d.ts.map +1 -1
- package/dist/util/sub-menu.js +3 -2
- package/dist/util/update-notifier-util.d.ts +1 -1
- package/dist/util/update-notifier-util.d.ts.map +1 -1
- package/dist/util/update-notifier-util.js +2 -3
- package/lib/app/cli-app.js +8 -8
- package/lib/app/http-server-app.js +8 -8
- package/lib/app/init/parse-and-route-args.js +12 -12
- package/lib/app/tui-app.js +8 -8
- package/lib/controller/cli-menu/main-menu.d.ts.map +1 -1
- package/lib/controller/cli-menu/main-menu.js +13 -12
- package/lib/controller/yargs-router/cli-router.d.ts +1 -1
- package/lib/controller/yargs-router/cli-router.d.ts.map +1 -1
- package/lib/controller/yargs-router/cli-router.js +11 -11
- package/lib/controller/yargs-router/git-router.d.ts +1 -1
- package/lib/controller/yargs-router/git-router.d.ts.map +1 -1
- package/lib/controller/yargs-router/git-router.js +10 -10
- package/lib/controller/yargs-router/npm-router.d.ts +1 -1
- package/lib/controller/yargs-router/npm-router.d.ts.map +1 -1
- package/lib/controller/yargs-router/npm-router.js +7 -7
- package/lib/dal/shell-dal.d.ts.map +1 -1
- package/lib/dal/shell-dal.js +1 -1
- package/lib/index-cli.js +3 -5
- package/lib/model/command/init-config.d.ts +1 -1
- package/lib/model/command/init-config.d.ts.map +1 -1
- package/lib/model/command/init-config.js +6 -6
- package/lib/model/command/project-command/git-clone-project-command.d.ts +1 -1
- package/lib/model/command/project-command/git-clone-project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/git-clone-project-command.js +6 -6
- package/lib/model/command/project-command/git-simple-project-command.d.ts +1 -1
- package/lib/model/command/project-command/git-simple-project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/git-simple-project-command.js +6 -6
- package/lib/model/command/project-command/git-tag-project-command.d.ts +1 -1
- package/lib/model/command/project-command/git-tag-project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/git-tag-project-command.js +6 -6
- package/lib/model/command/project-command/npm-global-project-command.d.ts +1 -1
- package/lib/model/command/project-command/npm-global-project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/npm-global-project-command.js +16 -15
- package/lib/model/command/project-command/npm-install-project-command.d.ts +1 -1
- package/lib/model/command/project-command/npm-install-project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/npm-install-project-command.js +7 -7
- package/lib/model/command/project-command/project-command.d.ts +2 -2
- package/lib/model/command/project-command/project-command.d.ts.map +1 -1
- package/lib/model/command/project-command/project-command.js +7 -7
- package/lib/service/init-config-service.d.ts.map +1 -1
- package/lib/service/init-config-service.js +4 -4
- package/lib/service/shell-service.d.ts +1 -1
- package/lib/service/shell-service.d.ts.map +1 -1
- package/lib/service/shell-service.js +5 -6
- package/lib/service/terminal-wrapper.d.ts +1 -1
- package/lib/service/terminal-wrapper.d.ts.map +1 -1
- package/lib/service/terminal-wrapper.js +13 -13
- package/lib/util/base-menu.d.ts +1 -2
- package/lib/util/base-menu.d.ts.map +1 -1
- package/lib/util/base-menu.js +16 -15
- package/lib/util/config.js +1 -1
- package/lib/util/constant.d.ts +2 -2
- package/lib/util/constant.d.ts.map +1 -1
- package/lib/util/constant.js +1 -3
- package/lib/util/object-util.d.ts.map +1 -1
- package/lib/util/object-util.js +1 -0
- package/lib/util/sub-menu.d.ts +1 -1
- package/lib/util/sub-menu.d.ts.map +1 -1
- package/lib/util/sub-menu.js +18 -15
- package/lib/util/update-notifier-util.d.ts +1 -1
- package/lib/util/update-notifier-util.d.ts.map +1 -1
- package/lib/util/update-notifier-util.js +6 -24
- package/package.json +47 -55
package/lib/util/base-menu.js
CHANGED
|
@@ -5,24 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.BaseMenu = void 0;
|
|
7
7
|
var _inquirer = _interopRequireDefault(require("inquirer"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
10
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
11
|
-
function asyncGeneratorStep(
|
|
12
|
-
function _asyncToGenerator(
|
|
13
|
-
function _toConsumableArray(
|
|
11
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
12
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
14
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
function _unsupportedIterableToArray(
|
|
16
|
-
function _iterableToArray(
|
|
17
|
-
function _arrayWithoutHoles(
|
|
18
|
-
function _arrayLikeToArray(
|
|
19
|
-
function _classCallCheck(
|
|
20
|
-
function _defineProperties(
|
|
21
|
-
function _createClass(
|
|
22
|
-
function _defineProperty(
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
21
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
24
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
25
|
var BaseMenu = exports.BaseMenu = /*#__PURE__*/function () {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
27
|
function BaseMenu(message, choices, exitChoices) {
|
|
27
28
|
_classCallCheck(this, BaseMenu);
|
|
28
29
|
_defineProperty(this, "__name", '__menu');
|
|
@@ -49,7 +50,7 @@ var BaseMenu = exports.BaseMenu = /*#__PURE__*/function () {
|
|
|
49
50
|
return _createClass(BaseMenu, [{
|
|
50
51
|
key: "__execute",
|
|
51
52
|
value: function () {
|
|
52
|
-
var _execute = _asyncToGenerator(
|
|
53
|
+
var _execute = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(command) {
|
|
53
54
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
54
55
|
while (1) switch (_context.prev = _context.next) {
|
|
55
56
|
case 0:
|
|
@@ -72,7 +73,7 @@ var BaseMenu = exports.BaseMenu = /*#__PURE__*/function () {
|
|
|
72
73
|
}, {
|
|
73
74
|
key: "run",
|
|
74
75
|
value: function () {
|
|
75
|
-
var _run = _asyncToGenerator(
|
|
76
|
+
var _run = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(preSelected) {
|
|
76
77
|
var selected;
|
|
77
78
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
78
79
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -104,7 +105,7 @@ var BaseMenu = exports.BaseMenu = /*#__PURE__*/function () {
|
|
|
104
105
|
}, {
|
|
105
106
|
key: "_getSelectedValue",
|
|
106
107
|
value: function () {
|
|
107
|
-
var _getSelectedValue2 = _asyncToGenerator(
|
|
108
|
+
var _getSelectedValue2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(perSelected) {
|
|
108
109
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
109
110
|
while (1) switch (_context3.prev = _context3.next) {
|
|
110
111
|
case 0:
|
package/lib/util/config.js
CHANGED
|
@@ -11,7 +11,7 @@ var _console = require("@beecode/msh-logger/logger-strategy/console");
|
|
|
11
11
|
var _simple = require("@beecode/msh-logger/logger-strategy/console/log-strategy/simple");
|
|
12
12
|
var _pattern = require("@beecode/msh-util/singleton/pattern");
|
|
13
13
|
var _dotenv = _interopRequireDefault(require("dotenv"));
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
15
|
(0, _logger.setEnvLogger)(new _console.LoggerStrategyConsole({
|
|
16
16
|
consoleLogStrategy: new _simple.ConsoleLogStrategySimple(),
|
|
17
17
|
logLevel: _mshLogger.LogLevel.INFO
|
package/lib/util/constant.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/util/constant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/util/constant.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;GAKpB,CAAA"}
|
package/lib/util/constant.js
CHANGED
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.constant = void 0;
|
|
7
7
|
var _pattern = require("@beecode/msh-util/singleton/pattern");
|
|
8
8
|
var _packageJson = _interopRequireDefault(require(".."));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
// @ts-expect-error
|
|
11
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
10
|
var constant = exports.constant = (0, _pattern.singletonPattern)(function () {
|
|
13
11
|
return Object.freeze({
|
|
14
12
|
projectName: _packageJson["default"].name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-util.d.ts","sourceRoot":"","sources":["../../src/util/object-util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;
|
|
1
|
+
{"version":3,"file":"object-util.d.ts","sourceRoot":"","sources":["../../src/util/object-util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;uBAEH,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,KAAG,CAAC;CAUlE,CAAA"}
|
package/lib/util/object-util.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.objectUtil = void 0;
|
|
7
7
|
var objectUtil = exports.objectUtil = {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
9
|
sortObjectByKeys: function sortObjectByKeys(unordered) {
|
|
9
10
|
return Object.keys(unordered).sort().reduce(function (obj, key) {
|
|
10
11
|
// @ts-expect-error
|
package/lib/util/sub-menu.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-menu.d.ts","sourceRoot":"","sources":["../../src/util/sub-menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sub-menu.d.ts","sourceRoot":"","sources":["../../src/util/sub-menu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAG9C,8BAAsB,OAAQ,SAAQ,QAAQ;YAG/B,UAAU;IAIxB,SAAS,aAAa,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB;IAK1D,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
package/lib/util/sub-menu.js
CHANGED
|
@@ -9,22 +9,23 @@ var _mainMenu2 = require("../controller/cli-menu/main-menu.js");
|
|
|
9
9
|
var _baseMenu = require("../util/base-menu.js");
|
|
10
10
|
var _config = require("../util/config.js");
|
|
11
11
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
12
|
-
function asyncGeneratorStep(
|
|
13
|
-
function _asyncToGenerator(
|
|
14
|
-
function _classCallCheck(
|
|
15
|
-
function _defineProperties(
|
|
16
|
-
function _createClass(
|
|
12
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
13
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
19
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
|
-
function _possibleConstructorReturn(
|
|
21
|
-
function _assertThisInitialized(
|
|
20
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
21
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
22
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
23
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
24
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
25
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
26
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
27
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
28
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } // @ts-expect-error
|
|
28
29
|
var SubMenu = exports.SubMenu = /*#__PURE__*/function (_BaseMenu) {
|
|
29
30
|
function SubMenu(message, choices) {
|
|
30
31
|
_classCallCheck(this, SubMenu);
|
|
@@ -33,13 +34,15 @@ var SubMenu = exports.SubMenu = /*#__PURE__*/function (_BaseMenu) {
|
|
|
33
34
|
value: 'mainMenu'
|
|
34
35
|
}]]);
|
|
35
36
|
}
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
36
39
|
_inherits(SubMenu, _BaseMenu);
|
|
37
40
|
return _createClass(SubMenu, [{
|
|
38
41
|
key: "__mainMenu",
|
|
39
42
|
value: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
43
|
// @ts-expect-error
|
|
41
44
|
function () {
|
|
42
|
-
var _mainMenu = _asyncToGenerator(
|
|
45
|
+
var _mainMenu = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
43
46
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44
47
|
while (1) switch (_context.prev = _context.next) {
|
|
45
48
|
case 0:
|
|
@@ -59,7 +62,7 @@ var SubMenu = exports.SubMenu = /*#__PURE__*/function (_BaseMenu) {
|
|
|
59
62
|
}, {
|
|
60
63
|
key: "run",
|
|
61
64
|
value: function () {
|
|
62
|
-
var _run = _asyncToGenerator(
|
|
65
|
+
var _run = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(preSelected) {
|
|
63
66
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
64
67
|
while (1) switch (_context2.prev = _context2.next) {
|
|
65
68
|
case 0:
|
|
@@ -69,7 +72,7 @@ var SubMenu = exports.SubMenu = /*#__PURE__*/function (_BaseMenu) {
|
|
|
69
72
|
}
|
|
70
73
|
return _context2.abrupt("return");
|
|
71
74
|
case 2:
|
|
72
|
-
return _context2.abrupt("return",
|
|
75
|
+
return _context2.abrupt("return", _superPropGet(SubMenu, "run", this, 3)([preSelected]));
|
|
73
76
|
case 3:
|
|
74
77
|
case "end":
|
|
75
78
|
return _context2.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-notifier-util.d.ts","sourceRoot":"","sources":["../../src/util/update-notifier-util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-notifier-util.d.ts","sourceRoot":"","sources":["../../src/util/update-notifier-util.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;iBACnB,IAAI;CAGf,CAAA"}
|
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.updateNotifierUtil = void 0;
|
|
8
7
|
var _updateNotifier = _interopRequireDefault(require("update-notifier"));
|
|
9
8
|
var _packageJson = _interopRequireDefault(require(".."));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
12
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // @ts-expect-error
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
10
|
var updateNotifierUtil = exports.updateNotifierUtil = {
|
|
15
|
-
check: function () {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(0, _updateNotifier["default"])({
|
|
21
|
-
pkg: _packageJson["default"]
|
|
22
|
-
}).notify();
|
|
23
|
-
case 1:
|
|
24
|
-
case "end":
|
|
25
|
-
return _context.stop();
|
|
26
|
-
}
|
|
27
|
-
}, _callee);
|
|
28
|
-
}));
|
|
29
|
-
function check() {
|
|
30
|
-
return _check.apply(this, arguments);
|
|
31
|
-
}
|
|
32
|
-
return check;
|
|
33
|
-
}()
|
|
11
|
+
check: function check() {
|
|
12
|
+
(0, _updateNotifier["default"])({
|
|
13
|
+
pkg: _packageJson["default"]
|
|
14
|
+
}).notify();
|
|
15
|
+
}
|
|
34
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beecode/msh-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "MicroService Shell helper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shell",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
29
30
|
"import": "./dist/index.js",
|
|
30
|
-
"require": "./lib/index.js"
|
|
31
|
-
"types": "./dist/index.d.ts"
|
|
31
|
+
"require": "./lib/index.js"
|
|
32
32
|
},
|
|
33
33
|
"./*": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"types": "./dist/*.d.ts",
|
|
35
|
+
"import": "./dist/*.js"
|
|
36
36
|
},
|
|
37
37
|
"./lib/*": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"types": "./lib/*.d.ts",
|
|
39
|
+
"require": "./lib/*.js"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"main": "./lib/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"doc:toc": "npx markdown-toc -i ./README.md",
|
|
62
62
|
"docker-build": "docker build -f ./resource/docker/Dockerfile -t bc-msh-cli ./",
|
|
63
63
|
"docker-rmi": "docker rmi bc-msh-cli",
|
|
64
|
-
"docker-run-package-lock-update": "docker run --rm -v ./:/usr/app/ milosbugarinovic/msh-lib-base:
|
|
64
|
+
"docker-run-package-lock-update": "docker run --rm -v ./:/usr/app/ milosbugarinovic/msh-lib-base:node22.14.0-alpine3.21 npm i --package-lock-only",
|
|
65
65
|
"docker-run-sh": "docker run --rm -it bc-msh-cli sh",
|
|
66
66
|
"fix-hybrid-lib-cjs": "mkdir -p ./lib && echo '{\"type\": \"commonjs\"}' > ./lib/package.json",
|
|
67
67
|
"init": "concurrently -c auto 'npm:init:*'",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"lint-eslint-fix": "npm run lint-eslint -- --fix",
|
|
73
73
|
"lint-fix": "npm run lint-prettier-fix && npm run lint-eslint-fix && npm run lint-json-fix",
|
|
74
74
|
"lint-json": "npm run lint-json-fix -- -c",
|
|
75
|
-
"lint-json-fix": "jsonsort * .*.json '!./dist' '!./lib' '!./test/node_modules' '!./resource' '!**/.env*' '!**/.gitignore' -t",
|
|
75
|
+
"lint-json-fix": "jsonsort -p * .*.json '!./dist' '!./lib' '!./test/node_modules' '!./resource' '!**/.env*' '!**/.gitignore' -t",
|
|
76
76
|
"lint-prettier": "prettier --check {**/*,*}.{js,jsx,ts,tsx}",
|
|
77
77
|
"lint-prettier-fix": "prettier --write {**/*,*}.{js,jsx,ts,tsx}",
|
|
78
78
|
"npm-bump-version": "npm --no-git-tag-version version",
|
|
@@ -119,72 +119,64 @@
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@beecode/msh-app-boot": "1.
|
|
123
|
-
"@beecode/msh-config": "1.
|
|
124
|
-
"@beecode/msh-env": "1.
|
|
125
|
-
"@beecode/msh-logger": "1.
|
|
126
|
-
"@beecode/msh-util": "2.0.
|
|
122
|
+
"@beecode/msh-app-boot": "1.1.1",
|
|
123
|
+
"@beecode/msh-config": "1.1.3",
|
|
124
|
+
"@beecode/msh-env": "1.1.1",
|
|
125
|
+
"@beecode/msh-logger": "1.1.1",
|
|
126
|
+
"@beecode/msh-util": "2.0.11",
|
|
127
127
|
"async-shelljs": "0.1.4",
|
|
128
|
-
"chalk": "5.
|
|
129
|
-
"compare-versions": "6.1.
|
|
130
|
-
"dotenv": "16.4.
|
|
128
|
+
"chalk": "5.4.1",
|
|
129
|
+
"compare-versions": "6.1.1",
|
|
130
|
+
"dotenv": "16.4.7",
|
|
131
131
|
"fast-json-stable-stringify": "2.1.0",
|
|
132
|
-
"inquirer": "
|
|
132
|
+
"inquirer": "12.5.0",
|
|
133
133
|
"lodash": "4.17.21",
|
|
134
134
|
"minimist": "1.2.8",
|
|
135
135
|
"minimist-options": "4.1.0",
|
|
136
136
|
"mz": "2.7.0",
|
|
137
137
|
"request": "2.88.2",
|
|
138
138
|
"request-promise-native": "1.0.9",
|
|
139
|
-
"update-notifier": "7.
|
|
139
|
+
"update-notifier": "7.3.1",
|
|
140
140
|
"yargs": "17.7.2"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@babel/cli": "7.
|
|
144
|
-
"@babel/core": "7.
|
|
145
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
146
|
-
"@babel/plugin-syntax-import-attributes": "7.
|
|
147
|
-
"@babel/plugin-transform-modules-commonjs": "7.
|
|
148
|
-
"@babel/preset-env": "7.
|
|
149
|
-
"@babel/preset-typescript": "7.
|
|
150
|
-
"@commitlint/cli": "19.
|
|
151
|
-
"@commitlint/config-conventional": "19.
|
|
152
|
-
"@commitlint/prompt": "19.
|
|
153
|
-
"@
|
|
154
|
-
"@semantic-release/commit-analyzer": "12.0.0",
|
|
155
|
-
"@semantic-release/exec": "6.0.3",
|
|
156
|
-
"@semantic-release/git": "10.0.1",
|
|
157
|
-
"@semantic-release/github": "10.0.3",
|
|
158
|
-
"@semantic-release/release-notes-generator": "13.0.0",
|
|
159
|
-
"@types/inquirer": "9.0.7",
|
|
160
|
-
"@types/lodash": "4.17.1",
|
|
143
|
+
"@babel/cli": "7.26.4",
|
|
144
|
+
"@babel/core": "7.26.10",
|
|
145
|
+
"@babel/plugin-proposal-decorators": "7.25.9",
|
|
146
|
+
"@babel/plugin-syntax-import-attributes": "7.26.0",
|
|
147
|
+
"@babel/plugin-transform-modules-commonjs": "7.26.3",
|
|
148
|
+
"@babel/preset-env": "7.26.9",
|
|
149
|
+
"@babel/preset-typescript": "7.26.0",
|
|
150
|
+
"@commitlint/cli": "19.8.0",
|
|
151
|
+
"@commitlint/config-conventional": "19.8.0",
|
|
152
|
+
"@commitlint/prompt": "19.8.0",
|
|
153
|
+
"@types/lodash": "4.17.16",
|
|
161
154
|
"@types/minimist": "1.2.5",
|
|
162
155
|
"@types/mz": "2.7.8",
|
|
163
|
-
"@types/node": "
|
|
156
|
+
"@types/node": "22.13.10",
|
|
164
157
|
"@types/request": "2.48.12",
|
|
165
158
|
"@types/shelljs": "0.8.15",
|
|
166
159
|
"@types/update-notifier": "6.0.8",
|
|
167
|
-
"@types/yargs": "17.0.
|
|
168
|
-
"@vitest/coverage-v8": "
|
|
169
|
-
"commitizen": "4.3.
|
|
170
|
-
"concurrently": "
|
|
171
|
-
"husky": "9.
|
|
172
|
-
"json-sort-cli": "4.0.
|
|
173
|
-
"lint-staged": "15.
|
|
160
|
+
"@types/yargs": "17.0.33",
|
|
161
|
+
"@vitest/coverage-v8": "3.0.9",
|
|
162
|
+
"commitizen": "4.3.1",
|
|
163
|
+
"concurrently": "9.1.2",
|
|
164
|
+
"husky": "9.1.7",
|
|
165
|
+
"json-sort-cli": "4.0.9",
|
|
166
|
+
"lint-staged": "15.5.0",
|
|
174
167
|
"markdown-toc": "1.2.0",
|
|
175
|
-
"prettier": "3.
|
|
176
|
-
"rimraf": "
|
|
177
|
-
"semantic-release": "23.0.8",
|
|
168
|
+
"prettier": "3.5.3",
|
|
169
|
+
"rimraf": "6.0.1",
|
|
178
170
|
"source-map-support": "0.5.21",
|
|
179
171
|
"ts-cleaner": "1.0.5",
|
|
180
172
|
"ts-node": "10.9.2",
|
|
181
|
-
"tsc-alias": "1.8.
|
|
182
|
-
"tsc-watch": "6.2.
|
|
183
|
-
"typedoc": "0.
|
|
184
|
-
"typedoc-plugin-markdown": "4.
|
|
185
|
-
"typescript": "5.
|
|
186
|
-
"vite-tsconfig-paths": "
|
|
187
|
-
"vitest": "
|
|
173
|
+
"tsc-alias": "1.8.11",
|
|
174
|
+
"tsc-watch": "6.2.1",
|
|
175
|
+
"typedoc": "0.28.1",
|
|
176
|
+
"typedoc-plugin-markdown": "4.5.2",
|
|
177
|
+
"typescript": "5.7.3",
|
|
178
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
179
|
+
"vitest": "3.0.9"
|
|
188
180
|
},
|
|
189
181
|
"engines": {
|
|
190
182
|
"node": ">=20.8.1",
|