@beecode/msh-cli 1.2.2 → 2.0.0
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/README.md +2 -2
- package/bin/msh.js +1 -1
- package/dist/app/cli-app.d.ts +5 -0
- package/dist/app/cli-app.d.ts.map +1 -0
- package/dist/app/cli-app.js +5 -9
- package/dist/app/http-server-app.d.ts +5 -0
- package/dist/app/http-server-app.d.ts.map +1 -0
- package/dist/app/http-server-app.js +3 -7
- package/dist/app/init/parse-and-route-args.d.ts +8 -0
- package/dist/app/init/parse-and-route-args.d.ts.map +1 -0
- package/dist/app/init/parse-and-route-args.js +5 -9
- package/dist/app/tui-app.d.ts +5 -0
- package/dist/app/tui-app.d.ts.map +1 -0
- package/dist/app/tui-app.js +3 -7
- package/dist/controller/cli-menu/main-menu.d.ts +6 -0
- package/dist/controller/cli-menu/main-menu.d.ts.map +1 -0
- package/dist/controller/cli-menu/main-menu.js +11 -11
- package/dist/controller/yargs-router/cli-router.d.ts +14 -0
- package/dist/controller/yargs-router/cli-router.d.ts.map +1 -0
- package/dist/controller/yargs-router/cli-router.js +34 -29
- package/dist/controller/yargs-router/git-router.d.ts +10 -0
- package/dist/controller/yargs-router/git-router.d.ts.map +1 -0
- package/dist/controller/yargs-router/git-router.js +51 -49
- package/dist/controller/yargs-router/npm-router.d.ts +7 -0
- package/dist/controller/yargs-router/npm-router.d.ts.map +1 -0
- package/dist/controller/yargs-router/npm-router.js +25 -26
- package/dist/dal/shell-dal.d.ts +12 -0
- package/dist/dal/shell-dal.d.ts.map +1 -0
- package/dist/dal/shell-dal.js +12 -18
- package/dist/index-cli.d.ts +2 -0
- package/dist/index-cli.d.ts.map +1 -0
- package/dist/index-cli.js +8 -11
- package/dist/index-init.d.ts +2 -0
- package/dist/index-init.d.ts.map +1 -0
- package/dist/index-init.js +7 -12
- package/dist/index-jest-setup.d.ts +6 -0
- package/dist/index-jest-setup.d.ts.map +1 -0
- package/dist/index-jest-setup.js +4 -0
- package/dist/index-server.d.ts +2 -0
- package/dist/index-server.d.ts.map +1 -0
- package/dist/index-server.js +6 -9
- package/dist/index-terminal-ui.d.ts +2 -0
- package/dist/index-terminal-ui.d.ts.map +1 -0
- package/dist/index-terminal-ui.js +6 -9
- package/dist/model/command/init-config.d.ts +5 -0
- package/dist/model/command/init-config.d.ts.map +1 -0
- package/dist/model/command/init-config.js +4 -8
- package/dist/model/command/interfaces.d.ts +12 -0
- package/dist/model/command/interfaces.d.ts.map +1 -0
- package/dist/model/command/interfaces.js +2 -3
- package/dist/model/command/project-command/git-clone-project-command.d.ts +15 -0
- package/dist/model/command/project-command/git-clone-project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/git-clone-project-command.js +9 -12
- package/dist/model/command/project-command/git-simple-project-command.d.ts +16 -0
- package/dist/model/command/project-command/git-simple-project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/git-simple-project-command.js +9 -13
- package/dist/model/command/project-command/git-tag-project-command.d.ts +12 -0
- package/dist/model/command/project-command/git-tag-project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/git-tag-project-command.js +14 -12
- package/dist/model/command/project-command/npm-global-project-command.d.ts +21 -0
- package/dist/model/command/project-command/npm-global-project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/npm-global-project-command.js +35 -37
- package/dist/model/command/project-command/npm-install-project-command.d.ts +9 -0
- package/dist/model/command/project-command/npm-install-project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/npm-install-project-command.js +9 -16
- package/dist/model/command/project-command/project-command.d.ts +15 -0
- package/dist/model/command/project-command/project-command.d.ts.map +1 -0
- package/dist/model/command/project-command/project-command.js +7 -12
- package/dist/service/clear-service.d.ts +2 -0
- package/dist/service/clear-service.d.ts.map +1 -0
- package/dist/service/clear-service.js +4 -7
- package/dist/service/file-service.d.ts +7 -0
- package/dist/service/file-service.d.ts.map +1 -0
- package/dist/service/file-service.js +4 -7
- package/dist/service/init-config-service.d.ts +7 -0
- package/dist/service/init-config-service.d.ts.map +1 -0
- package/dist/service/init-config-service.js +13 -18
- package/dist/service/shell-service.d.ts +12 -0
- package/dist/service/shell-service.d.ts.map +1 -0
- package/dist/service/shell-service.js +29 -31
- package/dist/service/terminal-wrapper.d.ts +12 -0
- package/dist/service/terminal-wrapper.d.ts.map +1 -0
- package/dist/service/terminal-wrapper.js +6 -11
- package/dist/util/base-menu.d.ts +12 -0
- package/dist/util/base-menu.d.ts.map +1 -0
- package/dist/util/base-menu.js +20 -19
- package/dist/util/config.d.ts +21 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js +37 -41
- package/dist/util/constant.d.ts +5 -0
- package/dist/util/constant.d.ts.map +1 -0
- package/dist/util/constant.js +3 -6
- package/dist/util/logger.d.ts +3 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +14 -13
- package/dist/util/object-util.d.ts +4 -0
- package/dist/util/object-util.d.ts.map +1 -0
- package/dist/util/object-util.js +3 -5
- package/dist/util/sub-menu.d.ts +8 -0
- package/dist/util/sub-menu.d.ts.map +1 -0
- package/dist/util/sub-menu.js +10 -11
- package/dist/util/update-notifier-util.d.ts +4 -0
- package/dist/util/update-notifier-util.d.ts.map +1 -0
- package/dist/util/update-notifier-util.js +5 -11
- package/lib/app/cli-app.d.ts +5 -0
- package/lib/app/cli-app.d.ts.map +1 -0
- package/lib/app/cli-app.js +29 -0
- package/lib/app/http-server-app.d.ts +5 -0
- package/lib/app/http-server-app.d.ts.map +1 -0
- package/lib/app/http-server-app.js +31 -0
- package/lib/app/init/parse-and-route-args.d.ts +8 -0
- package/lib/app/init/parse-and-route-args.d.ts.map +1 -0
- package/lib/app/init/parse-and-route-args.js +74 -0
- package/lib/app/tui-app.d.ts +5 -0
- package/lib/app/tui-app.d.ts.map +1 -0
- package/lib/app/tui-app.js +31 -0
- package/lib/controller/cli-menu/main-menu.d.ts +6 -0
- package/lib/controller/cli-menu/main-menu.d.ts.map +1 -0
- package/lib/controller/cli-menu/main-menu.js +74 -0
- package/lib/controller/yargs-router/cli-router.d.ts +14 -0
- package/lib/controller/yargs-router/cli-router.d.ts.map +1 -0
- package/lib/controller/yargs-router/cli-router.js +171 -0
- package/lib/controller/yargs-router/git-router.d.ts +10 -0
- package/lib/controller/yargs-router/git-router.d.ts.map +1 -0
- package/lib/controller/yargs-router/git-router.js +207 -0
- package/lib/controller/yargs-router/npm-router.d.ts +7 -0
- package/lib/controller/yargs-router/npm-router.d.ts.map +1 -0
- package/lib/controller/yargs-router/npm-router.js +94 -0
- package/lib/dal/shell-dal.d.ts +12 -0
- package/lib/dal/shell-dal.d.ts.map +1 -0
- package/lib/dal/shell-dal.js +61 -0
- package/lib/index-cli.d.ts +2 -0
- package/lib/index-cli.d.ts.map +1 -0
- package/lib/index-cli.js +14 -0
- package/lib/index-init.d.ts +2 -0
- package/lib/index-init.d.ts.map +1 -0
- package/lib/index-init.js +16 -0
- package/lib/index-jest-setup.d.ts +6 -0
- package/lib/index-jest-setup.d.ts.map +1 -0
- package/lib/index-jest-setup.js +10 -0
- package/lib/index-server.d.ts +2 -0
- package/lib/index-server.d.ts.map +1 -0
- package/lib/index-server.js +9 -0
- package/lib/index-terminal-ui.d.ts +2 -0
- package/lib/index-terminal-ui.d.ts.map +1 -0
- package/lib/index-terminal-ui.js +9 -0
- package/lib/model/command/init-config.d.ts +5 -0
- package/lib/model/command/init-config.d.ts.map +1 -0
- package/lib/model/command/init-config.js +53 -0
- package/lib/model/command/interfaces.d.ts +12 -0
- package/lib/model/command/interfaces.d.ts.map +1 -0
- package/lib/model/command/interfaces.js +1 -0
- package/lib/model/command/project-command/git-clone-project-command.d.ts +15 -0
- package/lib/model/command/project-command/git-clone-project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/git-clone-project-command.js +77 -0
- package/lib/model/command/project-command/git-simple-project-command.d.ts +16 -0
- package/lib/model/command/project-command/git-simple-project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/git-simple-project-command.js +70 -0
- package/lib/model/command/project-command/git-tag-project-command.d.ts +12 -0
- package/lib/model/command/project-command/git-tag-project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/git-tag-project-command.js +73 -0
- package/lib/model/command/project-command/npm-global-project-command.d.ts +21 -0
- package/lib/model/command/project-command/npm-global-project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/npm-global-project-command.js +217 -0
- package/lib/model/command/project-command/npm-install-project-command.d.ts +9 -0
- package/lib/model/command/project-command/npm-install-project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/npm-install-project-command.js +66 -0
- package/lib/model/command/project-command/project-command.d.ts +15 -0
- package/lib/model/command/project-command/project-command.d.ts.map +1 -0
- package/lib/model/command/project-command/project-command.js +69 -0
- package/lib/package.json +1 -0
- package/lib/service/clear-service.d.ts +2 -0
- package/lib/service/clear-service.d.ts.map +1 -0
- package/lib/service/clear-service.js +24 -0
- package/lib/service/file-service.d.ts +7 -0
- package/lib/service/file-service.d.ts.map +1 -0
- package/lib/service/file-service.js +14 -0
- package/lib/service/init-config-service.d.ts +7 -0
- package/lib/service/init-config-service.d.ts.map +1 -0
- package/lib/service/init-config-service.js +55 -0
- package/lib/service/shell-service.d.ts +12 -0
- package/lib/service/shell-service.d.ts.map +1 -0
- package/lib/service/shell-service.js +64 -0
- package/lib/service/terminal-wrapper.d.ts +12 -0
- package/lib/service/terminal-wrapper.d.ts.map +1 -0
- package/lib/service/terminal-wrapper.js +72 -0
- package/lib/util/base-menu.d.ts +12 -0
- package/lib/util/base-menu.d.ts.map +1 -0
- package/lib/util/base-menu.js +134 -0
- package/lib/util/config.d.ts +21 -0
- package/lib/util/config.d.ts.map +1 -0
- package/lib/util/config.js +50 -0
- package/lib/util/constant.d.ts +5 -0
- package/lib/util/constant.d.ts.map +1 -0
- package/lib/util/constant.js +15 -0
- package/lib/util/logger.d.ts +3 -0
- package/lib/util/logger.d.ts.map +1 -0
- package/lib/util/logger.js +20 -0
- package/lib/util/object-util.d.ts +4 -0
- package/lib/util/object-util.d.ts.map +1 -0
- package/lib/util/object-util.js +15 -0
- package/lib/util/sub-menu.d.ts +8 -0
- package/lib/util/sub-menu.d.ts.map +1 -0
- package/lib/util/sub-menu.js +85 -0
- package/lib/util/update-notifier-util.d.ts +4 -0
- package/lib/util/update-notifier-util.d.ts.map +1 -0
- package/lib/util/update-notifier-util.js +35 -0
- package/package.json +216 -156
- package/CHANGELOG.md +0 -91
- package/package-lock.json +0 -26727
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SubMenu = void 0;
|
|
8
|
+
var _mainMenu2 = require("../controller/cli-menu/main-menu.js");
|
|
9
|
+
var _baseMenu = require("../util/base-menu.js");
|
|
10
|
+
var _config = require("../util/config.js");
|
|
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); }); }; }
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
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(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
24
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
|
+
var SubMenu = exports.SubMenu = /*#__PURE__*/function (_BaseMenu) {
|
|
29
|
+
function SubMenu(message, choices) {
|
|
30
|
+
_classCallCheck(this, SubMenu);
|
|
31
|
+
return _callSuper(this, SubMenu, [message, choices, [{
|
|
32
|
+
name: 'Go Back',
|
|
33
|
+
value: 'mainMenu'
|
|
34
|
+
}]]);
|
|
35
|
+
}
|
|
36
|
+
_inherits(SubMenu, _BaseMenu);
|
|
37
|
+
return _createClass(SubMenu, [{
|
|
38
|
+
key: "__mainMenu",
|
|
39
|
+
value: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
function () {
|
|
42
|
+
var _mainMenu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
43
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44
|
+
while (1) switch (_context.prev = _context.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
_context.next = 2;
|
|
47
|
+
return new _mainMenu2.MainMenu().run();
|
|
48
|
+
case 2:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
54
|
+
function __mainMenu() {
|
|
55
|
+
return _mainMenu.apply(this, arguments);
|
|
56
|
+
}
|
|
57
|
+
return __mainMenu;
|
|
58
|
+
}()
|
|
59
|
+
}, {
|
|
60
|
+
key: "run",
|
|
61
|
+
value: function () {
|
|
62
|
+
var _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(preSelected) {
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
64
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
if ((0, _config.config)().cmd["".concat(this.constructor.name.toLowerCase(), "Enabled")]) {
|
|
67
|
+
_context2.next = 2;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
return _context2.abrupt("return");
|
|
71
|
+
case 2:
|
|
72
|
+
return _context2.abrupt("return", _get(_getPrototypeOf(SubMenu.prototype), "run", this).call(this, preSelected));
|
|
73
|
+
case 3:
|
|
74
|
+
case "end":
|
|
75
|
+
return _context2.stop();
|
|
76
|
+
}
|
|
77
|
+
}, _callee2, this);
|
|
78
|
+
}));
|
|
79
|
+
function run(_x) {
|
|
80
|
+
return _run.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
return run;
|
|
83
|
+
}()
|
|
84
|
+
}]);
|
|
85
|
+
}(_baseMenu.BaseMenu);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-notifier-util.d.ts","sourceRoot":"","sources":["../../src/util/update-notifier-util.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;iBACb,QAAQ,IAAI,CAAC;CAG9B,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.updateNotifierUtil = void 0;
|
|
8
|
+
var _updateNotifier = _interopRequireDefault(require("update-notifier"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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(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); } }
|
|
12
|
+
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); }); }; }
|
|
13
|
+
var packageJson = require('../../package.json'); // eslint-disable-line
|
|
14
|
+
|
|
15
|
+
var updateNotifierUtil = exports.updateNotifierUtil = {
|
|
16
|
+
check: function () {
|
|
17
|
+
var _check = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
(0, _updateNotifier["default"])({
|
|
22
|
+
pkg: packageJson
|
|
23
|
+
}).notify();
|
|
24
|
+
case 1:
|
|
25
|
+
case "end":
|
|
26
|
+
return _context.stop();
|
|
27
|
+
}
|
|
28
|
+
}, _callee);
|
|
29
|
+
}));
|
|
30
|
+
function check() {
|
|
31
|
+
return _check.apply(this, arguments);
|
|
32
|
+
}
|
|
33
|
+
return check;
|
|
34
|
+
}()
|
|
35
|
+
};
|
package/package.json
CHANGED
|
@@ -1,158 +1,218 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
2
|
+
"name": "@beecode/msh-cli",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "MicroService Shell helper",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"shell",
|
|
7
|
+
"microservice",
|
|
8
|
+
"management",
|
|
9
|
+
"project"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/beecode-rs/msh-cli#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/beecode-rs/msh-cli/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/beecode-rs/msh-cli.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "mit",
|
|
20
|
+
"author": "Milos Bugarinovic <milos.bugarinovic@gmail.com> (https://milos.bugarinovic.com)",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"imports": {
|
|
23
|
+
"#src": "./src/index.js",
|
|
24
|
+
"#src/*": [
|
|
25
|
+
"./src/*.js",
|
|
26
|
+
"./src/*/index.js"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"require": "./lib/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./*": {
|
|
36
|
+
"import": [
|
|
37
|
+
"./dist/*.js",
|
|
38
|
+
"./dist/*/index.js"
|
|
39
|
+
],
|
|
40
|
+
"types": [
|
|
41
|
+
"./dist/*.d.ts",
|
|
42
|
+
"./dist/*/index.d.ts"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"./lib/*": {
|
|
46
|
+
"require": [
|
|
47
|
+
"./lib/*.js",
|
|
48
|
+
"./lib/*/index.js"
|
|
49
|
+
],
|
|
50
|
+
"types": [
|
|
51
|
+
"./lib/*.d.ts",
|
|
52
|
+
"./lib/*/index.d.ts"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"./package.json": "./package.json"
|
|
56
|
+
},
|
|
57
|
+
"main": "./lib/index.js",
|
|
58
|
+
"module": "./dist/index.js",
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"files": [
|
|
61
|
+
"./bin",
|
|
62
|
+
"./dist",
|
|
63
|
+
"./lib"
|
|
64
|
+
],
|
|
65
|
+
"scripts": {
|
|
66
|
+
"babel": "npx babel --extensions .ts",
|
|
67
|
+
"build": "npm run clean && npm run tsc && npm run tsc-esm-alias",
|
|
68
|
+
"build-cjs": "npm run clean-cjs && npm run tsc-cjs && npm run tsc-types && npm run tsc-types-alias && npm run fix-hybrid-lib-cjs",
|
|
69
|
+
"clean": "rimraf ./dist",
|
|
70
|
+
"clean-cjs": "rimraf ./lib",
|
|
71
|
+
"doc": "concurrently -c auto 'npm:doc:*'",
|
|
72
|
+
"doc:api": "npx typedoc --tsconfig ./resource/tsconfig/esm.json",
|
|
73
|
+
"doc:toc": "npx markdown-toc -i ./README.md",
|
|
74
|
+
"docker-build": "docker build -f ./resource/docker/Dockerfile -t bc-msh-cli ./",
|
|
75
|
+
"docker-rmi": "docker rmi bc-msh-cli",
|
|
76
|
+
"docker-run-package-lock-update": "docker run --rm -v ./:/usr/app/ milosbugarinovic/msh-lib-base:node20.11.1-alpine3.19 npm i --package-lock-only",
|
|
77
|
+
"docker-run-sh": "docker run --rm -it bc-msh-cli sh",
|
|
78
|
+
"fix-hybrid-lib-cjs": "mkdir -p ./lib && echo '{\"type\": \"commonjs\"}' > ./lib/package.json",
|
|
79
|
+
"init": "concurrently -c auto 'npm:init:*'",
|
|
80
|
+
"init:git-config": "git config include.path ./.git-config",
|
|
81
|
+
"init:husky": "npx husky install",
|
|
82
|
+
"jest": "NODE_OPTIONS=--experimental-vm-modules npx jest",
|
|
83
|
+
"lint": "npm run lint-prettier && npm run lint-eslint && npm run lint-json",
|
|
84
|
+
"lint-eslint": "eslint ./ --quiet",
|
|
85
|
+
"lint-eslint-fix": "npm run lint-eslint -- --fix",
|
|
86
|
+
"lint-fix": "npm run lint-prettier-fix && npm run lint-eslint-fix && npm run lint-json-fix",
|
|
87
|
+
"lint-json": "npm run lint-json-fix -- -c",
|
|
88
|
+
"lint-json-fix": "jsonsort * .*.json '!./dist' '!./lib' '!./test/node_modules' '!./resource' '!**/.env*' '!**/.gitignore' -t",
|
|
89
|
+
"lint-prettier": "prettier --check {**/*,*}.{js,jsx,ts,tsx}",
|
|
90
|
+
"lint-prettier-fix": "prettier --write {**/*,*}.{js,jsx,ts,tsx}",
|
|
91
|
+
"npm-bump-version": "npm --no-git-tag-version version",
|
|
92
|
+
"npm-lock-file-generate": "npm i --package-lock-only --prefix ./",
|
|
93
|
+
"npm-ncu-check": "npx ncu",
|
|
94
|
+
"npm-ncu-update": "npx ncu -u",
|
|
95
|
+
"npm-pack": "mkdir -p packages && npm pack --pack-destination=./packages",
|
|
96
|
+
"npm-semantic-release": "semantic-release",
|
|
97
|
+
"npm-semantic-release-check": "npm run npm-semantic-release -- --dry-run --no-ci",
|
|
98
|
+
"test": "concurrently -c auto 'npm:test:*'",
|
|
99
|
+
"test-coverage-unit": "npm run test:unit -- --coverage",
|
|
100
|
+
"test-coverage-unit-publish": "codecov",
|
|
101
|
+
"test:e2e": "npm run jest -- --config=./test/jest.config.ts",
|
|
102
|
+
"test:int": "npm run jest -- --config=./jest.config.int.ts",
|
|
103
|
+
"test:unit": "npm run jest -- --config=./jest.config.unit.ts",
|
|
104
|
+
"tsc": "tsc -p ./resource/tsconfig/esm.json",
|
|
105
|
+
"tsc-check": "npm run tsc -- --noEmit",
|
|
106
|
+
"tsc-cjs": "npm run babel -- --out-dir ./lib ./src",
|
|
107
|
+
"tsc-cleaner": "ts-cleaner --dist ./dist",
|
|
108
|
+
"tsc-cleaner-watch": "npm run tsc-cleaner -- --watch",
|
|
109
|
+
"tsc-esm-alias": "tsc-alias -p ./resource/tsconfig/esm.json",
|
|
110
|
+
"tsc-time": "npm run tsc -- --diagnostics",
|
|
111
|
+
"tsc-types": "tsc -p ./resource/tsconfig/types.json",
|
|
112
|
+
"tsc-types-alias": "tsc-alias -p ./resource/tsconfig/types.json",
|
|
113
|
+
"tsc-watch": "npm run tsc -- -w --preserveWatchOutput",
|
|
114
|
+
"watch": "concurrently -c auto -n build,clean 'npm run tsc-watch' 'npm run tsc-cleaner-watch'"
|
|
115
|
+
},
|
|
116
|
+
"commitlint": {
|
|
117
|
+
"extends": [
|
|
118
|
+
"@commitlint/config-conventional"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"lint-staged": {
|
|
122
|
+
"**/*.json": [
|
|
123
|
+
"npm run lint-json"
|
|
124
|
+
],
|
|
125
|
+
"**/*.{ts,tsx,js,jsx}": [
|
|
126
|
+
"eslint",
|
|
127
|
+
"prettier --check"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"config": {
|
|
131
|
+
"commitizen": {
|
|
132
|
+
"path": "node_modules/cz-conventional-changelog"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"dependencies": {
|
|
136
|
+
"@beecode/msh-app-boot": "1.0.0",
|
|
137
|
+
"@beecode/msh-env": "1.0.0",
|
|
138
|
+
"@beecode/msh-logger": "1.0.1",
|
|
139
|
+
"@beecode/msh-util": "2.0.1",
|
|
140
|
+
"async-shelljs": "0.1.4",
|
|
141
|
+
"chalk": "5.3.0",
|
|
142
|
+
"compare-versions": "6.1.0",
|
|
143
|
+
"dotenv": "16.4.5",
|
|
144
|
+
"fast-json-stable-stringify": "2.1.0",
|
|
145
|
+
"inquirer": "9.2.16",
|
|
146
|
+
"lodash": "4.17.21",
|
|
147
|
+
"minimist": "1.2.8",
|
|
148
|
+
"minimist-options": "4.1.0",
|
|
149
|
+
"mz": "2.7.0",
|
|
150
|
+
"request": "2.88.2",
|
|
151
|
+
"request-promise-native": "1.0.9",
|
|
152
|
+
"update-notifier": "7.0.0",
|
|
153
|
+
"yargs": "17.7.2"
|
|
154
|
+
},
|
|
155
|
+
"devDependencies": {
|
|
156
|
+
"@babel/cli": "7.24.1",
|
|
157
|
+
"@babel/core": "7.24.4",
|
|
158
|
+
"@babel/plugin-proposal-decorators": "7.24.1",
|
|
159
|
+
"@babel/plugin-transform-modules-commonjs": "7.24.1",
|
|
160
|
+
"@babel/preset-env": "7.24.4",
|
|
161
|
+
"@babel/preset-typescript": "7.24.1",
|
|
162
|
+
"@commitlint/cli": "19.2.1",
|
|
163
|
+
"@commitlint/config-conventional": "19.1.0",
|
|
164
|
+
"@commitlint/prompt": "19.2.0",
|
|
165
|
+
"@jest/globals": "29.7.0",
|
|
166
|
+
"@semantic-release/changelog": "6.0.3",
|
|
167
|
+
"@semantic-release/commit-analyzer": "12.0.0",
|
|
168
|
+
"@semantic-release/exec": "6.0.3",
|
|
169
|
+
"@semantic-release/git": "10.0.1",
|
|
170
|
+
"@semantic-release/github": "10.0.2",
|
|
171
|
+
"@semantic-release/release-notes-generator": "12.1.0",
|
|
172
|
+
"@types/fast-json-stable-stringify": "2.0.0",
|
|
173
|
+
"@types/inquirer": "9.0.7",
|
|
174
|
+
"@types/lodash": "4.17.0",
|
|
175
|
+
"@types/minimist": "1.2.5",
|
|
176
|
+
"@types/mz": "2.7.8",
|
|
177
|
+
"@types/node": "20.11.30",
|
|
178
|
+
"@types/request": "2.48.12",
|
|
179
|
+
"@types/shelljs": "0.8.15",
|
|
180
|
+
"@types/update-notifier": "6.0.8",
|
|
181
|
+
"@types/yargs": "17.0.32",
|
|
182
|
+
"@typescript-eslint/eslint-plugin": "7.3.1",
|
|
183
|
+
"@typescript-eslint/parser": "7.3.1",
|
|
184
|
+
"commitizen": "4.3.0",
|
|
185
|
+
"concurrently": "8.2.2",
|
|
186
|
+
"eslint": "8.57.0",
|
|
187
|
+
"eslint-config-prettier": "9.1.0",
|
|
188
|
+
"eslint-plugin-import": "2.29.1",
|
|
189
|
+
"eslint-plugin-jest": "27.9.0",
|
|
190
|
+
"eslint-plugin-no-loops": "0.3.0",
|
|
191
|
+
"eslint-plugin-no-only-tests": "3.1.0",
|
|
192
|
+
"eslint-plugin-prettier": "5.1.3",
|
|
193
|
+
"eslint-plugin-sort-keys-fix": "1.1.2",
|
|
194
|
+
"husky": "9.0.11",
|
|
195
|
+
"jest": "29.7.0",
|
|
196
|
+
"jest-extended": "4.0.2",
|
|
197
|
+
"jest-mock": "29.7.0",
|
|
198
|
+
"json-sort-cli": "4.0.2",
|
|
199
|
+
"lint-staged": "15.2.2",
|
|
200
|
+
"markdown-toc": "1.2.0",
|
|
201
|
+
"prettier": "3.2.5",
|
|
202
|
+
"rimraf": "5.0.5",
|
|
203
|
+
"semantic-release": "22.0.12",
|
|
204
|
+
"source-map-support": "0.5.21",
|
|
205
|
+
"ts-cleaner": "1.0.5",
|
|
206
|
+
"ts-jest": "29.1.2",
|
|
207
|
+
"ts-node": "10.9.2",
|
|
208
|
+
"tsc-alias": "1.8.8",
|
|
209
|
+
"tsc-watch": "6.0.4",
|
|
210
|
+
"typedoc": "0.25.12",
|
|
211
|
+
"typedoc-plugin-markdown": "3.17.1",
|
|
212
|
+
"typescript": "5.4.3"
|
|
213
|
+
},
|
|
214
|
+
"engines": {
|
|
215
|
+
"node": ">=14",
|
|
216
|
+
"npm": ">=6"
|
|
217
|
+
}
|
|
158
218
|
}
|