genlayer 0.32.4 → 0.32.6

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/index.js CHANGED
@@ -18254,11 +18254,1831 @@ var require_semver2 = __commonJS({
18254
18254
  }
18255
18255
  });
18256
18256
 
18257
+ // node_modules/cli-table3/src/debug.js
18258
+ var require_debug2 = __commonJS({
18259
+ "node_modules/cli-table3/src/debug.js"(exports, module) {
18260
+ "use strict";
18261
+ var messages = [];
18262
+ var level = 0;
18263
+ var debug = (msg, min) => {
18264
+ if (level >= min) {
18265
+ messages.push(msg);
18266
+ }
18267
+ };
18268
+ debug.WARN = 1;
18269
+ debug.INFO = 2;
18270
+ debug.DEBUG = 3;
18271
+ debug.reset = () => {
18272
+ messages = [];
18273
+ };
18274
+ debug.setDebugLevel = (v) => {
18275
+ level = v;
18276
+ };
18277
+ debug.warn = (msg) => debug(msg, debug.WARN);
18278
+ debug.info = (msg) => debug(msg, debug.INFO);
18279
+ debug.debug = (msg) => debug(msg, debug.DEBUG);
18280
+ debug.debugMessages = () => messages;
18281
+ module.exports = debug;
18282
+ }
18283
+ });
18284
+
18285
+ // node_modules/cli-table3/node_modules/ansi-regex/index.js
18286
+ var require_ansi_regex = __commonJS({
18287
+ "node_modules/cli-table3/node_modules/ansi-regex/index.js"(exports, module) {
18288
+ "use strict";
18289
+ module.exports = ({ onlyFirst = false } = {}) => {
18290
+ const pattern = [
18291
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
18292
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
18293
+ ].join("|");
18294
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
18295
+ };
18296
+ }
18297
+ });
18298
+
18299
+ // node_modules/cli-table3/node_modules/strip-ansi/index.js
18300
+ var require_strip_ansi = __commonJS({
18301
+ "node_modules/cli-table3/node_modules/strip-ansi/index.js"(exports, module) {
18302
+ "use strict";
18303
+ var ansiRegex2 = require_ansi_regex();
18304
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
18305
+ }
18306
+ });
18307
+
18308
+ // node_modules/is-fullwidth-code-point/index.js
18309
+ var require_is_fullwidth_code_point = __commonJS({
18310
+ "node_modules/is-fullwidth-code-point/index.js"(exports, module) {
18311
+ "use strict";
18312
+ var isFullwidthCodePoint = (codePoint) => {
18313
+ if (Number.isNaN(codePoint)) {
18314
+ return false;
18315
+ }
18316
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
18317
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
18318
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
18319
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
18320
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
18321
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
18322
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
18323
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
18324
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
18325
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
18326
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
18327
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
18328
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
18329
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
18330
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
18331
+ 131072 <= codePoint && codePoint <= 262141)) {
18332
+ return true;
18333
+ }
18334
+ return false;
18335
+ };
18336
+ module.exports = isFullwidthCodePoint;
18337
+ module.exports.default = isFullwidthCodePoint;
18338
+ }
18339
+ });
18340
+
18341
+ // node_modules/cli-table3/node_modules/emoji-regex/index.js
18342
+ var require_emoji_regex2 = __commonJS({
18343
+ "node_modules/cli-table3/node_modules/emoji-regex/index.js"(exports, module) {
18344
+ "use strict";
18345
+ module.exports = function() {
18346
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
18347
+ };
18348
+ }
18349
+ });
18350
+
18351
+ // node_modules/cli-table3/node_modules/string-width/index.js
18352
+ var require_string_width = __commonJS({
18353
+ "node_modules/cli-table3/node_modules/string-width/index.js"(exports, module) {
18354
+ "use strict";
18355
+ var stripAnsi2 = require_strip_ansi();
18356
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
18357
+ var emojiRegex2 = require_emoji_regex2();
18358
+ var stringWidth2 = (string) => {
18359
+ if (typeof string !== "string" || string.length === 0) {
18360
+ return 0;
18361
+ }
18362
+ string = stripAnsi2(string);
18363
+ if (string.length === 0) {
18364
+ return 0;
18365
+ }
18366
+ string = string.replace(emojiRegex2(), " ");
18367
+ let width = 0;
18368
+ for (let i2 = 0; i2 < string.length; i2++) {
18369
+ const code = string.codePointAt(i2);
18370
+ if (code <= 31 || code >= 127 && code <= 159) {
18371
+ continue;
18372
+ }
18373
+ if (code >= 768 && code <= 879) {
18374
+ continue;
18375
+ }
18376
+ if (code > 65535) {
18377
+ i2++;
18378
+ }
18379
+ width += isFullwidthCodePoint(code) ? 2 : 1;
18380
+ }
18381
+ return width;
18382
+ };
18383
+ module.exports = stringWidth2;
18384
+ module.exports.default = stringWidth2;
18385
+ }
18386
+ });
18387
+
18388
+ // node_modules/cli-table3/src/utils.js
18389
+ var require_utils = __commonJS({
18390
+ "node_modules/cli-table3/src/utils.js"(exports, module) {
18391
+ "use strict";
18392
+ var stringWidth2 = require_string_width();
18393
+ function codeRegex(capture) {
18394
+ return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
18395
+ }
18396
+ function strlen(str) {
18397
+ let code = codeRegex();
18398
+ let stripped = ("" + str).replace(code, "");
18399
+ let split3 = stripped.split("\n");
18400
+ return split3.reduce(function(memo, s2) {
18401
+ return stringWidth2(s2) > memo ? stringWidth2(s2) : memo;
18402
+ }, 0);
18403
+ }
18404
+ function repeat(str, times) {
18405
+ return Array(times + 1).join(str);
18406
+ }
18407
+ function pad4(str, len, pad5, dir) {
18408
+ let length = strlen(str);
18409
+ if (len + 1 >= length) {
18410
+ let padlen = len - length;
18411
+ switch (dir) {
18412
+ case "right": {
18413
+ str = repeat(pad5, padlen) + str;
18414
+ break;
18415
+ }
18416
+ case "center": {
18417
+ let right = Math.ceil(padlen / 2);
18418
+ let left = padlen - right;
18419
+ str = repeat(pad5, left) + str + repeat(pad5, right);
18420
+ break;
18421
+ }
18422
+ default: {
18423
+ str = str + repeat(pad5, padlen);
18424
+ break;
18425
+ }
18426
+ }
18427
+ }
18428
+ return str;
18429
+ }
18430
+ var codeCache = {};
18431
+ function addToCodeCache(name, on, off) {
18432
+ on = "\x1B[" + on + "m";
18433
+ off = "\x1B[" + off + "m";
18434
+ codeCache[on] = { set: name, to: true };
18435
+ codeCache[off] = { set: name, to: false };
18436
+ codeCache[name] = { on, off };
18437
+ }
18438
+ addToCodeCache("bold", 1, 22);
18439
+ addToCodeCache("italics", 3, 23);
18440
+ addToCodeCache("underline", 4, 24);
18441
+ addToCodeCache("inverse", 7, 27);
18442
+ addToCodeCache("strikethrough", 9, 29);
18443
+ function updateState(state, controlChars) {
18444
+ let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
18445
+ if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
18446
+ state.lastForegroundAdded = controlChars[0];
18447
+ return;
18448
+ }
18449
+ if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
18450
+ state.lastBackgroundAdded = controlChars[0];
18451
+ return;
18452
+ }
18453
+ if (controlCode === 0) {
18454
+ for (let i2 in state) {
18455
+ if (Object.prototype.hasOwnProperty.call(state, i2)) {
18456
+ delete state[i2];
18457
+ }
18458
+ }
18459
+ return;
18460
+ }
18461
+ let info = codeCache[controlChars[0]];
18462
+ if (info) {
18463
+ state[info.set] = info.to;
18464
+ }
18465
+ }
18466
+ function readState(line) {
18467
+ let code = codeRegex(true);
18468
+ let controlChars = code.exec(line);
18469
+ let state = {};
18470
+ while (controlChars !== null) {
18471
+ updateState(state, controlChars);
18472
+ controlChars = code.exec(line);
18473
+ }
18474
+ return state;
18475
+ }
18476
+ function unwindState(state, ret) {
18477
+ let lastBackgroundAdded = state.lastBackgroundAdded;
18478
+ let lastForegroundAdded = state.lastForegroundAdded;
18479
+ delete state.lastBackgroundAdded;
18480
+ delete state.lastForegroundAdded;
18481
+ Object.keys(state).forEach(function(key) {
18482
+ if (state[key]) {
18483
+ ret += codeCache[key].off;
18484
+ }
18485
+ });
18486
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
18487
+ ret += "\x1B[49m";
18488
+ }
18489
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
18490
+ ret += "\x1B[39m";
18491
+ }
18492
+ return ret;
18493
+ }
18494
+ function rewindState(state, ret) {
18495
+ let lastBackgroundAdded = state.lastBackgroundAdded;
18496
+ let lastForegroundAdded = state.lastForegroundAdded;
18497
+ delete state.lastBackgroundAdded;
18498
+ delete state.lastForegroundAdded;
18499
+ Object.keys(state).forEach(function(key) {
18500
+ if (state[key]) {
18501
+ ret = codeCache[key].on + ret;
18502
+ }
18503
+ });
18504
+ if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
18505
+ ret = lastBackgroundAdded + ret;
18506
+ }
18507
+ if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
18508
+ ret = lastForegroundAdded + ret;
18509
+ }
18510
+ return ret;
18511
+ }
18512
+ function truncateWidth(str, desiredLength) {
18513
+ if (str.length === strlen(str)) {
18514
+ return str.substr(0, desiredLength);
18515
+ }
18516
+ while (strlen(str) > desiredLength) {
18517
+ str = str.slice(0, -1);
18518
+ }
18519
+ return str;
18520
+ }
18521
+ function truncateWidthWithAnsi(str, desiredLength) {
18522
+ let code = codeRegex(true);
18523
+ let split3 = str.split(codeRegex());
18524
+ let splitIndex = 0;
18525
+ let retLen = 0;
18526
+ let ret = "";
18527
+ let myArray;
18528
+ let state = {};
18529
+ while (retLen < desiredLength) {
18530
+ myArray = code.exec(str);
18531
+ let toAdd = split3[splitIndex];
18532
+ splitIndex++;
18533
+ if (retLen + strlen(toAdd) > desiredLength) {
18534
+ toAdd = truncateWidth(toAdd, desiredLength - retLen);
18535
+ }
18536
+ ret += toAdd;
18537
+ retLen += strlen(toAdd);
18538
+ if (retLen < desiredLength) {
18539
+ if (!myArray) {
18540
+ break;
18541
+ }
18542
+ ret += myArray[0];
18543
+ updateState(state, myArray);
18544
+ }
18545
+ }
18546
+ return unwindState(state, ret);
18547
+ }
18548
+ function truncate(str, desiredLength, truncateChar) {
18549
+ truncateChar = truncateChar || "\u2026";
18550
+ let lengthOfStr = strlen(str);
18551
+ if (lengthOfStr <= desiredLength) {
18552
+ return str;
18553
+ }
18554
+ desiredLength -= strlen(truncateChar);
18555
+ let ret = truncateWidthWithAnsi(str, desiredLength);
18556
+ ret += truncateChar;
18557
+ const hrefTag = "\x1B]8;;\x07";
18558
+ if (str.includes(hrefTag) && !ret.includes(hrefTag)) {
18559
+ ret += hrefTag;
18560
+ }
18561
+ return ret;
18562
+ }
18563
+ function defaultOptions() {
18564
+ return {
18565
+ chars: {
18566
+ top: "\u2500",
18567
+ "top-mid": "\u252C",
18568
+ "top-left": "\u250C",
18569
+ "top-right": "\u2510",
18570
+ bottom: "\u2500",
18571
+ "bottom-mid": "\u2534",
18572
+ "bottom-left": "\u2514",
18573
+ "bottom-right": "\u2518",
18574
+ left: "\u2502",
18575
+ "left-mid": "\u251C",
18576
+ mid: "\u2500",
18577
+ "mid-mid": "\u253C",
18578
+ right: "\u2502",
18579
+ "right-mid": "\u2524",
18580
+ middle: "\u2502"
18581
+ },
18582
+ truncate: "\u2026",
18583
+ colWidths: [],
18584
+ rowHeights: [],
18585
+ colAligns: [],
18586
+ rowAligns: [],
18587
+ style: {
18588
+ "padding-left": 1,
18589
+ "padding-right": 1,
18590
+ head: ["red"],
18591
+ border: ["grey"],
18592
+ compact: false
18593
+ },
18594
+ head: []
18595
+ };
18596
+ }
18597
+ function mergeOptions(options, defaults) {
18598
+ options = options || {};
18599
+ defaults = defaults || defaultOptions();
18600
+ let ret = Object.assign({}, defaults, options);
18601
+ ret.chars = Object.assign({}, defaults.chars, options.chars);
18602
+ ret.style = Object.assign({}, defaults.style, options.style);
18603
+ return ret;
18604
+ }
18605
+ function wordWrap(maxLength, input) {
18606
+ let lines = [];
18607
+ let split3 = input.split(/(\s+)/g);
18608
+ let line = [];
18609
+ let lineLength = 0;
18610
+ let whitespace;
18611
+ for (let i2 = 0; i2 < split3.length; i2 += 2) {
18612
+ let word = split3[i2];
18613
+ let newLength = lineLength + strlen(word);
18614
+ if (lineLength > 0 && whitespace) {
18615
+ newLength += whitespace.length;
18616
+ }
18617
+ if (newLength > maxLength) {
18618
+ if (lineLength !== 0) {
18619
+ lines.push(line.join(""));
18620
+ }
18621
+ line = [word];
18622
+ lineLength = strlen(word);
18623
+ } else {
18624
+ line.push(whitespace || "", word);
18625
+ lineLength = newLength;
18626
+ }
18627
+ whitespace = split3[i2 + 1];
18628
+ }
18629
+ if (lineLength) {
18630
+ lines.push(line.join(""));
18631
+ }
18632
+ return lines;
18633
+ }
18634
+ function textWrap(maxLength, input) {
18635
+ let lines = [];
18636
+ let line = "";
18637
+ function pushLine(str, ws) {
18638
+ if (line.length && ws) line += ws;
18639
+ line += str;
18640
+ while (line.length > maxLength) {
18641
+ lines.push(line.slice(0, maxLength));
18642
+ line = line.slice(maxLength);
18643
+ }
18644
+ }
18645
+ let split3 = input.split(/(\s+)/g);
18646
+ for (let i2 = 0; i2 < split3.length; i2 += 2) {
18647
+ pushLine(split3[i2], i2 && split3[i2 - 1]);
18648
+ }
18649
+ if (line.length) lines.push(line);
18650
+ return lines;
18651
+ }
18652
+ function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
18653
+ let output = [];
18654
+ input = input.split("\n");
18655
+ const handler = wrapOnWordBoundary ? wordWrap : textWrap;
18656
+ for (let i2 = 0; i2 < input.length; i2++) {
18657
+ output.push.apply(output, handler(maxLength, input[i2]));
18658
+ }
18659
+ return output;
18660
+ }
18661
+ function colorizeLines(input) {
18662
+ let state = {};
18663
+ let output = [];
18664
+ for (let i2 = 0; i2 < input.length; i2++) {
18665
+ let line = rewindState(state, input[i2]);
18666
+ state = readState(line);
18667
+ let temp = Object.assign({}, state);
18668
+ output.push(unwindState(temp, line));
18669
+ }
18670
+ return output;
18671
+ }
18672
+ function hyperlink(url, text) {
18673
+ const OSC = "\x1B]";
18674
+ const BEL = "\x07";
18675
+ const SEP = ";";
18676
+ return [OSC, "8", SEP, SEP, url || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
18677
+ }
18678
+ module.exports = {
18679
+ strlen,
18680
+ repeat,
18681
+ pad: pad4,
18682
+ truncate,
18683
+ mergeOptions,
18684
+ wordWrap: multiLineWordWrap,
18685
+ colorizeLines,
18686
+ hyperlink
18687
+ };
18688
+ }
18689
+ });
18690
+
18691
+ // node_modules/@colors/colors/lib/styles.js
18692
+ var require_styles = __commonJS({
18693
+ "node_modules/@colors/colors/lib/styles.js"(exports, module) {
18694
+ "use strict";
18695
+ var styles3 = {};
18696
+ module["exports"] = styles3;
18697
+ var codes = {
18698
+ reset: [0, 0],
18699
+ bold: [1, 22],
18700
+ dim: [2, 22],
18701
+ italic: [3, 23],
18702
+ underline: [4, 24],
18703
+ inverse: [7, 27],
18704
+ hidden: [8, 28],
18705
+ strikethrough: [9, 29],
18706
+ black: [30, 39],
18707
+ red: [31, 39],
18708
+ green: [32, 39],
18709
+ yellow: [33, 39],
18710
+ blue: [34, 39],
18711
+ magenta: [35, 39],
18712
+ cyan: [36, 39],
18713
+ white: [37, 39],
18714
+ gray: [90, 39],
18715
+ grey: [90, 39],
18716
+ brightRed: [91, 39],
18717
+ brightGreen: [92, 39],
18718
+ brightYellow: [93, 39],
18719
+ brightBlue: [94, 39],
18720
+ brightMagenta: [95, 39],
18721
+ brightCyan: [96, 39],
18722
+ brightWhite: [97, 39],
18723
+ bgBlack: [40, 49],
18724
+ bgRed: [41, 49],
18725
+ bgGreen: [42, 49],
18726
+ bgYellow: [43, 49],
18727
+ bgBlue: [44, 49],
18728
+ bgMagenta: [45, 49],
18729
+ bgCyan: [46, 49],
18730
+ bgWhite: [47, 49],
18731
+ bgGray: [100, 49],
18732
+ bgGrey: [100, 49],
18733
+ bgBrightRed: [101, 49],
18734
+ bgBrightGreen: [102, 49],
18735
+ bgBrightYellow: [103, 49],
18736
+ bgBrightBlue: [104, 49],
18737
+ bgBrightMagenta: [105, 49],
18738
+ bgBrightCyan: [106, 49],
18739
+ bgBrightWhite: [107, 49],
18740
+ // legacy styles for colors pre v1.0.0
18741
+ blackBG: [40, 49],
18742
+ redBG: [41, 49],
18743
+ greenBG: [42, 49],
18744
+ yellowBG: [43, 49],
18745
+ blueBG: [44, 49],
18746
+ magentaBG: [45, 49],
18747
+ cyanBG: [46, 49],
18748
+ whiteBG: [47, 49]
18749
+ };
18750
+ Object.keys(codes).forEach(function(key) {
18751
+ var val = codes[key];
18752
+ var style = styles3[key] = [];
18753
+ style.open = "\x1B[" + val[0] + "m";
18754
+ style.close = "\x1B[" + val[1] + "m";
18755
+ });
18756
+ }
18757
+ });
18758
+
18759
+ // node_modules/@colors/colors/lib/system/has-flag.js
18760
+ var require_has_flag = __commonJS({
18761
+ "node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
18762
+ "use strict";
18763
+ module.exports = function(flag, argv) {
18764
+ argv = argv || process.argv;
18765
+ var terminatorPos = argv.indexOf("--");
18766
+ var prefix = /^-{1,2}/.test(flag) ? "" : "--";
18767
+ var pos = argv.indexOf(prefix + flag);
18768
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
18769
+ };
18770
+ }
18771
+ });
18772
+
18773
+ // node_modules/@colors/colors/lib/system/supports-colors.js
18774
+ var require_supports_colors = __commonJS({
18775
+ "node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
18776
+ "use strict";
18777
+ var os4 = __require("os");
18778
+ var hasFlag2 = require_has_flag();
18779
+ var env2 = process.env;
18780
+ var forceColor = void 0;
18781
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
18782
+ forceColor = false;
18783
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
18784
+ forceColor = true;
18785
+ }
18786
+ if ("FORCE_COLOR" in env2) {
18787
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
18788
+ }
18789
+ function translateLevel2(level) {
18790
+ if (level === 0) {
18791
+ return false;
18792
+ }
18793
+ return {
18794
+ level,
18795
+ hasBasic: true,
18796
+ has256: level >= 2,
18797
+ has16m: level >= 3
18798
+ };
18799
+ }
18800
+ function supportsColor2(stream) {
18801
+ if (forceColor === false) {
18802
+ return 0;
18803
+ }
18804
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
18805
+ return 3;
18806
+ }
18807
+ if (hasFlag2("color=256")) {
18808
+ return 2;
18809
+ }
18810
+ if (stream && !stream.isTTY && forceColor !== true) {
18811
+ return 0;
18812
+ }
18813
+ var min = forceColor ? 1 : 0;
18814
+ if (process.platform === "win32") {
18815
+ var osRelease = os4.release().split(".");
18816
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
18817
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
18818
+ }
18819
+ return 1;
18820
+ }
18821
+ if ("CI" in env2) {
18822
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign2) {
18823
+ return sign2 in env2;
18824
+ }) || env2.CI_NAME === "codeship") {
18825
+ return 1;
18826
+ }
18827
+ return min;
18828
+ }
18829
+ if ("TEAMCITY_VERSION" in env2) {
18830
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
18831
+ }
18832
+ if ("TERM_PROGRAM" in env2) {
18833
+ var version5 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
18834
+ switch (env2.TERM_PROGRAM) {
18835
+ case "iTerm.app":
18836
+ return version5 >= 3 ? 3 : 2;
18837
+ case "Hyper":
18838
+ return 3;
18839
+ case "Apple_Terminal":
18840
+ return 2;
18841
+ }
18842
+ }
18843
+ if (/-256(color)?$/i.test(env2.TERM)) {
18844
+ return 2;
18845
+ }
18846
+ if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
18847
+ return 1;
18848
+ }
18849
+ if ("COLORTERM" in env2) {
18850
+ return 1;
18851
+ }
18852
+ if (env2.TERM === "dumb") {
18853
+ return min;
18854
+ }
18855
+ return min;
18856
+ }
18857
+ function getSupportLevel(stream) {
18858
+ var level = supportsColor2(stream);
18859
+ return translateLevel2(level);
18860
+ }
18861
+ module.exports = {
18862
+ supportsColor: getSupportLevel,
18863
+ stdout: getSupportLevel(process.stdout),
18864
+ stderr: getSupportLevel(process.stderr)
18865
+ };
18866
+ }
18867
+ });
18868
+
18869
+ // node_modules/@colors/colors/lib/custom/trap.js
18870
+ var require_trap = __commonJS({
18871
+ "node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
18872
+ "use strict";
18873
+ module["exports"] = function runTheTrap(text, options) {
18874
+ var result = "";
18875
+ text = text || "Run the trap, drop the bass";
18876
+ text = text.split("");
18877
+ var trap = {
18878
+ a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
18879
+ b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
18880
+ c: ["\xA9", "\u023B", "\u03FE"],
18881
+ d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
18882
+ e: [
18883
+ "\xCB",
18884
+ "\u0115",
18885
+ "\u018E",
18886
+ "\u0258",
18887
+ "\u03A3",
18888
+ "\u03BE",
18889
+ "\u04BC",
18890
+ "\u0A6C"
18891
+ ],
18892
+ f: ["\u04FA"],
18893
+ g: ["\u0262"],
18894
+ h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
18895
+ i: ["\u0F0F"],
18896
+ j: ["\u0134"],
18897
+ k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
18898
+ l: ["\u0139"],
18899
+ m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
18900
+ n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
18901
+ o: [
18902
+ "\xD8",
18903
+ "\xF5",
18904
+ "\xF8",
18905
+ "\u01FE",
18906
+ "\u0298",
18907
+ "\u047A",
18908
+ "\u05DD",
18909
+ "\u06DD",
18910
+ "\u0E4F"
18911
+ ],
18912
+ p: ["\u01F7", "\u048E"],
18913
+ q: ["\u09CD"],
18914
+ r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
18915
+ s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
18916
+ t: ["\u0141", "\u0166", "\u0373"],
18917
+ u: ["\u01B1", "\u054D"],
18918
+ v: ["\u05D8"],
18919
+ w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
18920
+ x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
18921
+ y: ["\xA5", "\u04B0", "\u04CB"],
18922
+ z: ["\u01B5", "\u0240"]
18923
+ };
18924
+ text.forEach(function(c) {
18925
+ c = c.toLowerCase();
18926
+ var chars = trap[c] || [" "];
18927
+ var rand = Math.floor(Math.random() * chars.length);
18928
+ if (typeof trap[c] !== "undefined") {
18929
+ result += trap[c][rand];
18930
+ } else {
18931
+ result += c;
18932
+ }
18933
+ });
18934
+ return result;
18935
+ };
18936
+ }
18937
+ });
18938
+
18939
+ // node_modules/@colors/colors/lib/custom/zalgo.js
18940
+ var require_zalgo = __commonJS({
18941
+ "node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
18942
+ "use strict";
18943
+ module["exports"] = function zalgo(text, options) {
18944
+ text = text || " he is here ";
18945
+ var soul = {
18946
+ "up": [
18947
+ "\u030D",
18948
+ "\u030E",
18949
+ "\u0304",
18950
+ "\u0305",
18951
+ "\u033F",
18952
+ "\u0311",
18953
+ "\u0306",
18954
+ "\u0310",
18955
+ "\u0352",
18956
+ "\u0357",
18957
+ "\u0351",
18958
+ "\u0307",
18959
+ "\u0308",
18960
+ "\u030A",
18961
+ "\u0342",
18962
+ "\u0313",
18963
+ "\u0308",
18964
+ "\u034A",
18965
+ "\u034B",
18966
+ "\u034C",
18967
+ "\u0303",
18968
+ "\u0302",
18969
+ "\u030C",
18970
+ "\u0350",
18971
+ "\u0300",
18972
+ "\u0301",
18973
+ "\u030B",
18974
+ "\u030F",
18975
+ "\u0312",
18976
+ "\u0313",
18977
+ "\u0314",
18978
+ "\u033D",
18979
+ "\u0309",
18980
+ "\u0363",
18981
+ "\u0364",
18982
+ "\u0365",
18983
+ "\u0366",
18984
+ "\u0367",
18985
+ "\u0368",
18986
+ "\u0369",
18987
+ "\u036A",
18988
+ "\u036B",
18989
+ "\u036C",
18990
+ "\u036D",
18991
+ "\u036E",
18992
+ "\u036F",
18993
+ "\u033E",
18994
+ "\u035B",
18995
+ "\u0346",
18996
+ "\u031A"
18997
+ ],
18998
+ "down": [
18999
+ "\u0316",
19000
+ "\u0317",
19001
+ "\u0318",
19002
+ "\u0319",
19003
+ "\u031C",
19004
+ "\u031D",
19005
+ "\u031E",
19006
+ "\u031F",
19007
+ "\u0320",
19008
+ "\u0324",
19009
+ "\u0325",
19010
+ "\u0326",
19011
+ "\u0329",
19012
+ "\u032A",
19013
+ "\u032B",
19014
+ "\u032C",
19015
+ "\u032D",
19016
+ "\u032E",
19017
+ "\u032F",
19018
+ "\u0330",
19019
+ "\u0331",
19020
+ "\u0332",
19021
+ "\u0333",
19022
+ "\u0339",
19023
+ "\u033A",
19024
+ "\u033B",
19025
+ "\u033C",
19026
+ "\u0345",
19027
+ "\u0347",
19028
+ "\u0348",
19029
+ "\u0349",
19030
+ "\u034D",
19031
+ "\u034E",
19032
+ "\u0353",
19033
+ "\u0354",
19034
+ "\u0355",
19035
+ "\u0356",
19036
+ "\u0359",
19037
+ "\u035A",
19038
+ "\u0323"
19039
+ ],
19040
+ "mid": [
19041
+ "\u0315",
19042
+ "\u031B",
19043
+ "\u0300",
19044
+ "\u0301",
19045
+ "\u0358",
19046
+ "\u0321",
19047
+ "\u0322",
19048
+ "\u0327",
19049
+ "\u0328",
19050
+ "\u0334",
19051
+ "\u0335",
19052
+ "\u0336",
19053
+ "\u035C",
19054
+ "\u035D",
19055
+ "\u035E",
19056
+ "\u035F",
19057
+ "\u0360",
19058
+ "\u0362",
19059
+ "\u0338",
19060
+ "\u0337",
19061
+ "\u0361",
19062
+ " \u0489"
19063
+ ]
19064
+ };
19065
+ var all = [].concat(soul.up, soul.down, soul.mid);
19066
+ function randomNumber(range) {
19067
+ var r2 = Math.floor(Math.random() * range);
19068
+ return r2;
19069
+ }
19070
+ function isChar(character) {
19071
+ var bool = false;
19072
+ all.filter(function(i2) {
19073
+ bool = i2 === character;
19074
+ });
19075
+ return bool;
19076
+ }
19077
+ function heComes(text2, options2) {
19078
+ var result = "";
19079
+ var counts;
19080
+ var l;
19081
+ options2 = options2 || {};
19082
+ options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
19083
+ options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
19084
+ options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
19085
+ options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
19086
+ text2 = text2.split("");
19087
+ for (l in text2) {
19088
+ if (isChar(l)) {
19089
+ continue;
19090
+ }
19091
+ result = result + text2[l];
19092
+ counts = { "up": 0, "down": 0, "mid": 0 };
19093
+ switch (options2.size) {
19094
+ case "mini":
19095
+ counts.up = randomNumber(8);
19096
+ counts.mid = randomNumber(2);
19097
+ counts.down = randomNumber(8);
19098
+ break;
19099
+ case "maxi":
19100
+ counts.up = randomNumber(16) + 3;
19101
+ counts.mid = randomNumber(4) + 1;
19102
+ counts.down = randomNumber(64) + 3;
19103
+ break;
19104
+ default:
19105
+ counts.up = randomNumber(8) + 1;
19106
+ counts.mid = randomNumber(6) / 2;
19107
+ counts.down = randomNumber(8) + 1;
19108
+ break;
19109
+ }
19110
+ var arr = ["up", "mid", "down"];
19111
+ for (var d in arr) {
19112
+ var index2 = arr[d];
19113
+ for (var i2 = 0; i2 <= counts[index2]; i2++) {
19114
+ if (options2[index2]) {
19115
+ result = result + soul[index2][randomNumber(soul[index2].length)];
19116
+ }
19117
+ }
19118
+ }
19119
+ }
19120
+ return result;
19121
+ }
19122
+ return heComes(text, options);
19123
+ };
19124
+ }
19125
+ });
19126
+
19127
+ // node_modules/@colors/colors/lib/maps/america.js
19128
+ var require_america = __commonJS({
19129
+ "node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
19130
+ "use strict";
19131
+ module["exports"] = function(colors) {
19132
+ return function(letter, i2, exploded) {
19133
+ if (letter === " ") return letter;
19134
+ switch (i2 % 3) {
19135
+ case 0:
19136
+ return colors.red(letter);
19137
+ case 1:
19138
+ return colors.white(letter);
19139
+ case 2:
19140
+ return colors.blue(letter);
19141
+ }
19142
+ };
19143
+ };
19144
+ }
19145
+ });
19146
+
19147
+ // node_modules/@colors/colors/lib/maps/zebra.js
19148
+ var require_zebra = __commonJS({
19149
+ "node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
19150
+ "use strict";
19151
+ module["exports"] = function(colors) {
19152
+ return function(letter, i2, exploded) {
19153
+ return i2 % 2 === 0 ? letter : colors.inverse(letter);
19154
+ };
19155
+ };
19156
+ }
19157
+ });
19158
+
19159
+ // node_modules/@colors/colors/lib/maps/rainbow.js
19160
+ var require_rainbow = __commonJS({
19161
+ "node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
19162
+ "use strict";
19163
+ module["exports"] = function(colors) {
19164
+ var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
19165
+ return function(letter, i2, exploded) {
19166
+ if (letter === " ") {
19167
+ return letter;
19168
+ } else {
19169
+ return colors[rainbowColors[i2++ % rainbowColors.length]](letter);
19170
+ }
19171
+ };
19172
+ };
19173
+ }
19174
+ });
19175
+
19176
+ // node_modules/@colors/colors/lib/maps/random.js
19177
+ var require_random = __commonJS({
19178
+ "node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
19179
+ "use strict";
19180
+ module["exports"] = function(colors) {
19181
+ var available = [
19182
+ "underline",
19183
+ "inverse",
19184
+ "grey",
19185
+ "yellow",
19186
+ "red",
19187
+ "green",
19188
+ "blue",
19189
+ "white",
19190
+ "cyan",
19191
+ "magenta",
19192
+ "brightYellow",
19193
+ "brightRed",
19194
+ "brightGreen",
19195
+ "brightBlue",
19196
+ "brightWhite",
19197
+ "brightCyan",
19198
+ "brightMagenta"
19199
+ ];
19200
+ return function(letter, i2, exploded) {
19201
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
19202
+ };
19203
+ };
19204
+ }
19205
+ });
19206
+
19207
+ // node_modules/@colors/colors/lib/colors.js
19208
+ var require_colors = __commonJS({
19209
+ "node_modules/@colors/colors/lib/colors.js"(exports, module) {
19210
+ "use strict";
19211
+ var colors = {};
19212
+ module["exports"] = colors;
19213
+ colors.themes = {};
19214
+ var util2 = __require("util");
19215
+ var ansiStyles2 = colors.styles = require_styles();
19216
+ var defineProps = Object.defineProperties;
19217
+ var newLineRegex = new RegExp(/[\r\n]+/g);
19218
+ colors.supportsColor = require_supports_colors().supportsColor;
19219
+ if (typeof colors.enabled === "undefined") {
19220
+ colors.enabled = colors.supportsColor() !== false;
19221
+ }
19222
+ colors.enable = function() {
19223
+ colors.enabled = true;
19224
+ };
19225
+ colors.disable = function() {
19226
+ colors.enabled = false;
19227
+ };
19228
+ colors.stripColors = colors.strip = function(str) {
19229
+ return ("" + str).replace(/\x1B\[\d+m/g, "");
19230
+ };
19231
+ var stylize = colors.stylize = function stylize2(str, style) {
19232
+ if (!colors.enabled) {
19233
+ return str + "";
19234
+ }
19235
+ var styleMap = ansiStyles2[style];
19236
+ if (!styleMap && style in colors) {
19237
+ return colors[style](str);
19238
+ }
19239
+ return styleMap.open + str + styleMap.close;
19240
+ };
19241
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
19242
+ var escapeStringRegexp = function(str) {
19243
+ if (typeof str !== "string") {
19244
+ throw new TypeError("Expected a string");
19245
+ }
19246
+ return str.replace(matchOperatorsRe, "\\$&");
19247
+ };
19248
+ function build(_styles) {
19249
+ var builder = function builder2() {
19250
+ return applyStyle2.apply(builder2, arguments);
19251
+ };
19252
+ builder._styles = _styles;
19253
+ builder.__proto__ = proto2;
19254
+ return builder;
19255
+ }
19256
+ var styles3 = (function() {
19257
+ var ret = {};
19258
+ ansiStyles2.grey = ansiStyles2.gray;
19259
+ Object.keys(ansiStyles2).forEach(function(key) {
19260
+ ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles2[key].close), "g");
19261
+ ret[key] = {
19262
+ get: function() {
19263
+ return build(this._styles.concat(key));
19264
+ }
19265
+ };
19266
+ });
19267
+ return ret;
19268
+ })();
19269
+ var proto2 = defineProps(function colors2() {
19270
+ }, styles3);
19271
+ function applyStyle2() {
19272
+ var args = Array.prototype.slice.call(arguments);
19273
+ var str = args.map(function(arg) {
19274
+ if (arg != null && arg.constructor === String) {
19275
+ return arg;
19276
+ } else {
19277
+ return util2.inspect(arg);
19278
+ }
19279
+ }).join(" ");
19280
+ if (!colors.enabled || !str) {
19281
+ return str;
19282
+ }
19283
+ var newLinesPresent = str.indexOf("\n") != -1;
19284
+ var nestedStyles = this._styles;
19285
+ var i2 = nestedStyles.length;
19286
+ while (i2--) {
19287
+ var code = ansiStyles2[nestedStyles[i2]];
19288
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
19289
+ if (newLinesPresent) {
19290
+ str = str.replace(newLineRegex, function(match) {
19291
+ return code.close + match + code.open;
19292
+ });
19293
+ }
19294
+ }
19295
+ return str;
19296
+ }
19297
+ colors.setTheme = function(theme) {
19298
+ if (typeof theme === "string") {
19299
+ console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
19300
+ return;
19301
+ }
19302
+ for (var style in theme) {
19303
+ (function(style2) {
19304
+ colors[style2] = function(str) {
19305
+ if (typeof theme[style2] === "object") {
19306
+ var out = str;
19307
+ for (var i2 in theme[style2]) {
19308
+ out = colors[theme[style2][i2]](out);
19309
+ }
19310
+ return out;
19311
+ }
19312
+ return colors[theme[style2]](str);
19313
+ };
19314
+ })(style);
19315
+ }
19316
+ };
19317
+ function init() {
19318
+ var ret = {};
19319
+ Object.keys(styles3).forEach(function(name) {
19320
+ ret[name] = {
19321
+ get: function() {
19322
+ return build([name]);
19323
+ }
19324
+ };
19325
+ });
19326
+ return ret;
19327
+ }
19328
+ var sequencer = function sequencer2(map2, str) {
19329
+ var exploded = str.split("");
19330
+ exploded = exploded.map(map2);
19331
+ return exploded.join("");
19332
+ };
19333
+ colors.trap = require_trap();
19334
+ colors.zalgo = require_zalgo();
19335
+ colors.maps = {};
19336
+ colors.maps.america = require_america()(colors);
19337
+ colors.maps.zebra = require_zebra()(colors);
19338
+ colors.maps.rainbow = require_rainbow()(colors);
19339
+ colors.maps.random = require_random()(colors);
19340
+ for (map in colors.maps) {
19341
+ (function(map2) {
19342
+ colors[map2] = function(str) {
19343
+ return sequencer(colors.maps[map2], str);
19344
+ };
19345
+ })(map);
19346
+ }
19347
+ var map;
19348
+ defineProps(colors, init());
19349
+ }
19350
+ });
19351
+
19352
+ // node_modules/@colors/colors/safe.js
19353
+ var require_safe = __commonJS({
19354
+ "node_modules/@colors/colors/safe.js"(exports, module) {
19355
+ "use strict";
19356
+ var colors = require_colors();
19357
+ module["exports"] = colors;
19358
+ }
19359
+ });
19360
+
19361
+ // node_modules/cli-table3/src/cell.js
19362
+ var require_cell = __commonJS({
19363
+ "node_modules/cli-table3/src/cell.js"(exports, module) {
19364
+ "use strict";
19365
+ var { info, debug } = require_debug2();
19366
+ var utils = require_utils();
19367
+ var Cell = class _Cell {
19368
+ /**
19369
+ * A representation of a cell within the table.
19370
+ * Implementations must have `init` and `draw` methods,
19371
+ * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
19372
+ * @param options
19373
+ * @constructor
19374
+ */
19375
+ constructor(options) {
19376
+ this.setOptions(options);
19377
+ this.x = null;
19378
+ this.y = null;
19379
+ }
19380
+ setOptions(options) {
19381
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof options) !== -1) {
19382
+ options = { content: "" + options };
19383
+ }
19384
+ options = options || {};
19385
+ this.options = options;
19386
+ let content = options.content;
19387
+ if (["boolean", "number", "bigint", "string"].indexOf(typeof content) !== -1) {
19388
+ this.content = String(content);
19389
+ } else if (!content) {
19390
+ this.content = this.options.href || "";
19391
+ } else {
19392
+ throw new Error("Content needs to be a primitive, got: " + typeof content);
19393
+ }
19394
+ this.colSpan = options.colSpan || 1;
19395
+ this.rowSpan = options.rowSpan || 1;
19396
+ if (this.options.href) {
19397
+ Object.defineProperty(this, "href", {
19398
+ get() {
19399
+ return this.options.href;
19400
+ }
19401
+ });
19402
+ }
19403
+ }
19404
+ mergeTableOptions(tableOptions, cells) {
19405
+ this.cells = cells;
19406
+ let optionsChars = this.options.chars || {};
19407
+ let tableChars = tableOptions.chars;
19408
+ let chars = this.chars = {};
19409
+ CHAR_NAMES.forEach(function(name) {
19410
+ setOption(optionsChars, tableChars, name, chars);
19411
+ });
19412
+ this.truncate = this.options.truncate || tableOptions.truncate;
19413
+ let style = this.options.style = this.options.style || {};
19414
+ let tableStyle = tableOptions.style;
19415
+ setOption(style, tableStyle, "padding-left", this);
19416
+ setOption(style, tableStyle, "padding-right", this);
19417
+ this.head = style.head || tableStyle.head;
19418
+ this.border = style.border || tableStyle.border;
19419
+ this.fixedWidth = tableOptions.colWidths[this.x];
19420
+ this.lines = this.computeLines(tableOptions);
19421
+ this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
19422
+ this.desiredHeight = this.lines.length;
19423
+ }
19424
+ computeLines(tableOptions) {
19425
+ const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
19426
+ const { wordWrap = tableWordWrap } = this.options;
19427
+ if (this.fixedWidth && wordWrap) {
19428
+ this.fixedWidth -= this.paddingLeft + this.paddingRight;
19429
+ if (this.colSpan) {
19430
+ let i2 = 1;
19431
+ while (i2 < this.colSpan) {
19432
+ this.fixedWidth += tableOptions.colWidths[this.x + i2];
19433
+ i2++;
19434
+ }
19435
+ }
19436
+ const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
19437
+ const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
19438
+ return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
19439
+ }
19440
+ return this.wrapLines(this.content.split("\n"));
19441
+ }
19442
+ wrapLines(computedLines) {
19443
+ const lines = utils.colorizeLines(computedLines);
19444
+ if (this.href) {
19445
+ return lines.map((line) => utils.hyperlink(this.href, line));
19446
+ }
19447
+ return lines;
19448
+ }
19449
+ /**
19450
+ * Initializes the Cells data structure.
19451
+ *
19452
+ * @param tableOptions - A fully populated set of tableOptions.
19453
+ * In addition to the standard default values, tableOptions must have fully populated the
19454
+ * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
19455
+ * of columns or rows (respectively) in this table, and each array item must be a Number.
19456
+ *
19457
+ */
19458
+ init(tableOptions) {
19459
+ let x2 = this.x;
19460
+ let y = this.y;
19461
+ this.widths = tableOptions.colWidths.slice(x2, x2 + this.colSpan);
19462
+ this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
19463
+ this.width = this.widths.reduce(sumPlusOne, -1);
19464
+ this.height = this.heights.reduce(sumPlusOne, -1);
19465
+ this.hAlign = this.options.hAlign || tableOptions.colAligns[x2];
19466
+ this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
19467
+ this.drawRight = x2 + this.colSpan == tableOptions.colWidths.length;
19468
+ }
19469
+ /**
19470
+ * Draws the given line of the cell.
19471
+ * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
19472
+ * @param lineNum - can be `top`, `bottom` or a numerical line number.
19473
+ * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
19474
+ * many rows below it's being called from. Otherwise it's undefined.
19475
+ * @returns {String} The representation of this line.
19476
+ */
19477
+ draw(lineNum, spanningCell) {
19478
+ if (lineNum == "top") return this.drawTop(this.drawRight);
19479
+ if (lineNum == "bottom") return this.drawBottom(this.drawRight);
19480
+ let content = utils.truncate(this.content, 10, this.truncate);
19481
+ if (!lineNum) {
19482
+ info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
19483
+ } else {
19484
+ }
19485
+ let padLen = Math.max(this.height - this.lines.length, 0);
19486
+ let padTop;
19487
+ switch (this.vAlign) {
19488
+ case "center":
19489
+ padTop = Math.ceil(padLen / 2);
19490
+ break;
19491
+ case "bottom":
19492
+ padTop = padLen;
19493
+ break;
19494
+ default:
19495
+ padTop = 0;
19496
+ }
19497
+ if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
19498
+ return this.drawEmpty(this.drawRight, spanningCell);
19499
+ }
19500
+ let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
19501
+ return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
19502
+ }
19503
+ /**
19504
+ * Renders the top line of the cell.
19505
+ * @param drawRight - true if this method should render the right edge of the cell.
19506
+ * @returns {String}
19507
+ */
19508
+ drawTop(drawRight) {
19509
+ let content = [];
19510
+ if (this.cells) {
19511
+ this.widths.forEach(function(width, index2) {
19512
+ content.push(this._topLeftChar(index2));
19513
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
19514
+ }, this);
19515
+ } else {
19516
+ content.push(this._topLeftChar(0));
19517
+ content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
19518
+ }
19519
+ if (drawRight) {
19520
+ content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
19521
+ }
19522
+ return this.wrapWithStyleColors("border", content.join(""));
19523
+ }
19524
+ _topLeftChar(offset) {
19525
+ let x2 = this.x + offset;
19526
+ let leftChar;
19527
+ if (this.y == 0) {
19528
+ leftChar = x2 == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
19529
+ } else {
19530
+ if (x2 == 0) {
19531
+ leftChar = "leftMid";
19532
+ } else {
19533
+ leftChar = offset == 0 ? "midMid" : "bottomMid";
19534
+ if (this.cells) {
19535
+ let spanAbove = this.cells[this.y - 1][x2] instanceof _Cell.ColSpanCell;
19536
+ if (spanAbove) {
19537
+ leftChar = offset == 0 ? "topMid" : "mid";
19538
+ }
19539
+ if (offset == 0) {
19540
+ let i2 = 1;
19541
+ while (this.cells[this.y][x2 - i2] instanceof _Cell.ColSpanCell) {
19542
+ i2++;
19543
+ }
19544
+ if (this.cells[this.y][x2 - i2] instanceof _Cell.RowSpanCell) {
19545
+ leftChar = "leftMid";
19546
+ }
19547
+ }
19548
+ }
19549
+ }
19550
+ }
19551
+ return this.chars[leftChar];
19552
+ }
19553
+ wrapWithStyleColors(styleProperty, content) {
19554
+ if (this[styleProperty] && this[styleProperty].length) {
19555
+ try {
19556
+ let colors = require_safe();
19557
+ for (let i2 = this[styleProperty].length - 1; i2 >= 0; i2--) {
19558
+ colors = colors[this[styleProperty][i2]];
19559
+ }
19560
+ return colors(content);
19561
+ } catch (e2) {
19562
+ return content;
19563
+ }
19564
+ } else {
19565
+ return content;
19566
+ }
19567
+ }
19568
+ /**
19569
+ * Renders a line of text.
19570
+ * @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
19571
+ * There may be top-padding above the first line of text.
19572
+ * @param drawRight - true if this method should render the right edge of the cell.
19573
+ * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
19574
+ * if the text fits. This is used when the cell is vertically truncated. If `false` the text should
19575
+ * only include the truncation symbol if the text will not fit horizontally within the cell width.
19576
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
19577
+ * @returns {String}
19578
+ */
19579
+ drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
19580
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
19581
+ if (this.x && spanningCell && this.cells) {
19582
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
19583
+ while (cellLeft instanceof ColSpanCell) {
19584
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
19585
+ }
19586
+ if (!(cellLeft instanceof RowSpanCell)) {
19587
+ left = this.chars["rightMid"];
19588
+ }
19589
+ }
19590
+ let leftPadding = utils.repeat(" ", this.paddingLeft);
19591
+ let right = drawRight ? this.chars["right"] : "";
19592
+ let rightPadding = utils.repeat(" ", this.paddingRight);
19593
+ let line = this.lines[lineNum];
19594
+ let len = this.width - (this.paddingLeft + this.paddingRight);
19595
+ if (forceTruncationSymbol) line += this.truncate || "\u2026";
19596
+ let content = utils.truncate(line, len, this.truncate);
19597
+ content = utils.pad(content, len, " ", this.hAlign);
19598
+ content = leftPadding + content + rightPadding;
19599
+ return this.stylizeLine(left, content, right);
19600
+ }
19601
+ stylizeLine(left, content, right) {
19602
+ left = this.wrapWithStyleColors("border", left);
19603
+ right = this.wrapWithStyleColors("border", right);
19604
+ if (this.y === 0) {
19605
+ content = this.wrapWithStyleColors("head", content);
19606
+ }
19607
+ return left + content + right;
19608
+ }
19609
+ /**
19610
+ * Renders the bottom line of the cell.
19611
+ * @param drawRight - true if this method should render the right edge of the cell.
19612
+ * @returns {String}
19613
+ */
19614
+ drawBottom(drawRight) {
19615
+ let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
19616
+ let content = utils.repeat(this.chars.bottom, this.width);
19617
+ let right = drawRight ? this.chars["bottomRight"] : "";
19618
+ return this.wrapWithStyleColors("border", left + content + right);
19619
+ }
19620
+ /**
19621
+ * Renders a blank line of text within the cell. Used for top and/or bottom padding.
19622
+ * @param drawRight - true if this method should render the right edge of the cell.
19623
+ * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
19624
+ * @returns {String}
19625
+ */
19626
+ drawEmpty(drawRight, spanningCell) {
19627
+ let left = this.chars[this.x == 0 ? "left" : "middle"];
19628
+ if (this.x && spanningCell && this.cells) {
19629
+ let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
19630
+ while (cellLeft instanceof ColSpanCell) {
19631
+ cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
19632
+ }
19633
+ if (!(cellLeft instanceof RowSpanCell)) {
19634
+ left = this.chars["rightMid"];
19635
+ }
19636
+ }
19637
+ let right = drawRight ? this.chars["right"] : "";
19638
+ let content = utils.repeat(" ", this.width);
19639
+ return this.stylizeLine(left, content, right);
19640
+ }
19641
+ };
19642
+ var ColSpanCell = class {
19643
+ /**
19644
+ * A Cell that doesn't do anything. It just draws empty lines.
19645
+ * Used as a placeholder in column spanning.
19646
+ * @constructor
19647
+ */
19648
+ constructor() {
19649
+ }
19650
+ draw(lineNum) {
19651
+ if (typeof lineNum === "number") {
19652
+ debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
19653
+ }
19654
+ return "";
19655
+ }
19656
+ init() {
19657
+ }
19658
+ mergeTableOptions() {
19659
+ }
19660
+ };
19661
+ var RowSpanCell = class {
19662
+ /**
19663
+ * A placeholder Cell for a Cell that spans multiple rows.
19664
+ * It delegates rendering to the original cell, but adds the appropriate offset.
19665
+ * @param originalCell
19666
+ * @constructor
19667
+ */
19668
+ constructor(originalCell) {
19669
+ this.originalCell = originalCell;
19670
+ }
19671
+ init(tableOptions) {
19672
+ let y = this.y;
19673
+ let originalY = this.originalCell.y;
19674
+ this.cellOffset = y - originalY;
19675
+ this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
19676
+ }
19677
+ draw(lineNum) {
19678
+ if (lineNum == "top") {
19679
+ return this.originalCell.draw(this.offset, this.cellOffset);
19680
+ }
19681
+ if (lineNum == "bottom") {
19682
+ return this.originalCell.draw("bottom");
19683
+ }
19684
+ debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
19685
+ return this.originalCell.draw(this.offset + 1 + lineNum);
19686
+ }
19687
+ mergeTableOptions() {
19688
+ }
19689
+ };
19690
+ function firstDefined(...args) {
19691
+ return args.filter((v) => v !== void 0 && v !== null).shift();
19692
+ }
19693
+ function setOption(objA, objB, nameB, targetObj) {
19694
+ let nameA = nameB.split("-");
19695
+ if (nameA.length > 1) {
19696
+ nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
19697
+ nameA = nameA.join("");
19698
+ targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
19699
+ } else {
19700
+ targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
19701
+ }
19702
+ }
19703
+ function findDimension(dimensionTable, startingIndex, span) {
19704
+ let ret = dimensionTable[startingIndex];
19705
+ for (let i2 = 1; i2 < span; i2++) {
19706
+ ret += 1 + dimensionTable[startingIndex + i2];
19707
+ }
19708
+ return ret;
19709
+ }
19710
+ function sumPlusOne(a, b) {
19711
+ return a + b + 1;
19712
+ }
19713
+ var CHAR_NAMES = [
19714
+ "top",
19715
+ "top-mid",
19716
+ "top-left",
19717
+ "top-right",
19718
+ "bottom",
19719
+ "bottom-mid",
19720
+ "bottom-left",
19721
+ "bottom-right",
19722
+ "left",
19723
+ "left-mid",
19724
+ "mid",
19725
+ "mid-mid",
19726
+ "right",
19727
+ "right-mid",
19728
+ "middle"
19729
+ ];
19730
+ module.exports = Cell;
19731
+ module.exports.ColSpanCell = ColSpanCell;
19732
+ module.exports.RowSpanCell = RowSpanCell;
19733
+ }
19734
+ });
19735
+
19736
+ // node_modules/cli-table3/src/layout-manager.js
19737
+ var require_layout_manager = __commonJS({
19738
+ "node_modules/cli-table3/src/layout-manager.js"(exports, module) {
19739
+ "use strict";
19740
+ var { warn, debug } = require_debug2();
19741
+ var Cell = require_cell();
19742
+ var { ColSpanCell, RowSpanCell } = Cell;
19743
+ (function() {
19744
+ function next(alloc, col) {
19745
+ if (alloc[col] > 0) {
19746
+ return next(alloc, col + 1);
19747
+ }
19748
+ return col;
19749
+ }
19750
+ function layoutTable(table) {
19751
+ let alloc = {};
19752
+ table.forEach(function(row, rowIndex) {
19753
+ let col = 0;
19754
+ row.forEach(function(cell) {
19755
+ cell.y = rowIndex;
19756
+ cell.x = rowIndex ? next(alloc, col) : col;
19757
+ const rowSpan = cell.rowSpan || 1;
19758
+ const colSpan = cell.colSpan || 1;
19759
+ if (rowSpan > 1) {
19760
+ for (let cs = 0; cs < colSpan; cs++) {
19761
+ alloc[cell.x + cs] = rowSpan;
19762
+ }
19763
+ }
19764
+ col = cell.x + colSpan;
19765
+ });
19766
+ Object.keys(alloc).forEach((idx) => {
19767
+ alloc[idx]--;
19768
+ if (alloc[idx] < 1) delete alloc[idx];
19769
+ });
19770
+ });
19771
+ }
19772
+ function maxWidth(table) {
19773
+ let mw = 0;
19774
+ table.forEach(function(row) {
19775
+ row.forEach(function(cell) {
19776
+ mw = Math.max(mw, cell.x + (cell.colSpan || 1));
19777
+ });
19778
+ });
19779
+ return mw;
19780
+ }
19781
+ function maxHeight(table) {
19782
+ return table.length;
19783
+ }
19784
+ function cellsConflict(cell1, cell2) {
19785
+ let yMin1 = cell1.y;
19786
+ let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
19787
+ let yMin2 = cell2.y;
19788
+ let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
19789
+ let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
19790
+ let xMin1 = cell1.x;
19791
+ let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
19792
+ let xMin2 = cell2.x;
19793
+ let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
19794
+ let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
19795
+ return yConflict && xConflict;
19796
+ }
19797
+ function conflictExists(rows, x2, y) {
19798
+ let i_max = Math.min(rows.length - 1, y);
19799
+ let cell = { x: x2, y };
19800
+ for (let i2 = 0; i2 <= i_max; i2++) {
19801
+ let row = rows[i2];
19802
+ for (let j = 0; j < row.length; j++) {
19803
+ if (cellsConflict(cell, row[j])) {
19804
+ return true;
19805
+ }
19806
+ }
19807
+ }
19808
+ return false;
19809
+ }
19810
+ function allBlank(rows, y, xMin, xMax) {
19811
+ for (let x2 = xMin; x2 < xMax; x2++) {
19812
+ if (conflictExists(rows, x2, y)) {
19813
+ return false;
19814
+ }
19815
+ }
19816
+ return true;
19817
+ }
19818
+ function addRowSpanCells(table) {
19819
+ table.forEach(function(row, rowIndex) {
19820
+ row.forEach(function(cell) {
19821
+ for (let i2 = 1; i2 < cell.rowSpan; i2++) {
19822
+ let rowSpanCell = new RowSpanCell(cell);
19823
+ rowSpanCell.x = cell.x;
19824
+ rowSpanCell.y = cell.y + i2;
19825
+ rowSpanCell.colSpan = cell.colSpan;
19826
+ insertCell(rowSpanCell, table[rowIndex + i2]);
19827
+ }
19828
+ });
19829
+ });
19830
+ }
19831
+ function addColSpanCells(cellRows) {
19832
+ for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
19833
+ let cellColumns = cellRows[rowIndex];
19834
+ for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
19835
+ let cell = cellColumns[columnIndex];
19836
+ for (let k = 1; k < cell.colSpan; k++) {
19837
+ let colSpanCell = new ColSpanCell();
19838
+ colSpanCell.x = cell.x + k;
19839
+ colSpanCell.y = cell.y;
19840
+ cellColumns.splice(columnIndex + 1, 0, colSpanCell);
19841
+ }
19842
+ }
19843
+ }
19844
+ }
19845
+ function insertCell(cell, row) {
19846
+ let x2 = 0;
19847
+ while (x2 < row.length && row[x2].x < cell.x) {
19848
+ x2++;
19849
+ }
19850
+ row.splice(x2, 0, cell);
19851
+ }
19852
+ function fillInTable(table) {
19853
+ let h_max = maxHeight(table);
19854
+ let w_max = maxWidth(table);
19855
+ debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
19856
+ for (let y = 0; y < h_max; y++) {
19857
+ for (let x2 = 0; x2 < w_max; x2++) {
19858
+ if (!conflictExists(table, x2, y)) {
19859
+ let opts = { x: x2, y, colSpan: 1, rowSpan: 1 };
19860
+ x2++;
19861
+ while (x2 < w_max && !conflictExists(table, x2, y)) {
19862
+ opts.colSpan++;
19863
+ x2++;
19864
+ }
19865
+ let y2 = y + 1;
19866
+ while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) {
19867
+ opts.rowSpan++;
19868
+ y2++;
19869
+ }
19870
+ let cell = new Cell(opts);
19871
+ cell.x = opts.x;
19872
+ cell.y = opts.y;
19873
+ warn(`Missing cell at ${cell.y}-${cell.x}.`);
19874
+ insertCell(cell, table[y]);
19875
+ }
19876
+ }
19877
+ }
19878
+ }
19879
+ function generateCells(rows) {
19880
+ return rows.map(function(row) {
19881
+ if (!Array.isArray(row)) {
19882
+ let key = Object.keys(row)[0];
19883
+ row = row[key];
19884
+ if (Array.isArray(row)) {
19885
+ row = row.slice();
19886
+ row.unshift(key);
19887
+ } else {
19888
+ row = [key, row];
19889
+ }
19890
+ }
19891
+ return row.map(function(cell) {
19892
+ return new Cell(cell);
19893
+ });
19894
+ });
19895
+ }
19896
+ function makeTableLayout(rows) {
19897
+ let cellRows = generateCells(rows);
19898
+ layoutTable(cellRows);
19899
+ fillInTable(cellRows);
19900
+ addRowSpanCells(cellRows);
19901
+ addColSpanCells(cellRows);
19902
+ return cellRows;
19903
+ }
19904
+ module.exports = {
19905
+ makeTableLayout,
19906
+ layoutTable,
19907
+ addRowSpanCells,
19908
+ maxWidth,
19909
+ fillInTable,
19910
+ computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
19911
+ computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
19912
+ };
19913
+ })();
19914
+ function makeComputeWidths(colSpan, desiredWidth, x2, forcedMin) {
19915
+ return function(vals, table) {
19916
+ let result = [];
19917
+ let spanners = [];
19918
+ let auto = {};
19919
+ table.forEach(function(row) {
19920
+ row.forEach(function(cell) {
19921
+ if ((cell[colSpan] || 1) > 1) {
19922
+ spanners.push(cell);
19923
+ } else {
19924
+ result[cell[x2]] = Math.max(result[cell[x2]] || 0, cell[desiredWidth] || 0, forcedMin);
19925
+ }
19926
+ });
19927
+ });
19928
+ vals.forEach(function(val, index2) {
19929
+ if (typeof val === "number") {
19930
+ result[index2] = val;
19931
+ }
19932
+ });
19933
+ for (let k = spanners.length - 1; k >= 0; k--) {
19934
+ let cell = spanners[k];
19935
+ let span = cell[colSpan];
19936
+ let col = cell[x2];
19937
+ let existingWidth = result[col];
19938
+ let editableCols = typeof vals[col] === "number" ? 0 : 1;
19939
+ if (typeof existingWidth === "number") {
19940
+ for (let i2 = 1; i2 < span; i2++) {
19941
+ existingWidth += 1 + result[col + i2];
19942
+ if (typeof vals[col + i2] !== "number") {
19943
+ editableCols++;
19944
+ }
19945
+ }
19946
+ } else {
19947
+ existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
19948
+ if (!auto[col] || auto[col] < existingWidth) {
19949
+ auto[col] = existingWidth;
19950
+ }
19951
+ }
19952
+ if (cell[desiredWidth] > existingWidth) {
19953
+ let i2 = 0;
19954
+ while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
19955
+ if (typeof vals[col + i2] !== "number") {
19956
+ let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
19957
+ existingWidth += dif;
19958
+ result[col + i2] += dif;
19959
+ editableCols--;
19960
+ }
19961
+ i2++;
19962
+ }
19963
+ }
19964
+ }
19965
+ Object.assign(vals, result, auto);
19966
+ for (let j = 0; j < vals.length; j++) {
19967
+ vals[j] = Math.max(forcedMin, vals[j] || 0);
19968
+ }
19969
+ };
19970
+ }
19971
+ }
19972
+ });
19973
+
19974
+ // node_modules/cli-table3/src/table.js
19975
+ var require_table = __commonJS({
19976
+ "node_modules/cli-table3/src/table.js"(exports, module) {
19977
+ "use strict";
19978
+ var debug = require_debug2();
19979
+ var utils = require_utils();
19980
+ var tableLayout = require_layout_manager();
19981
+ var Table3 = class extends Array {
19982
+ constructor(opts) {
19983
+ super();
19984
+ const options = utils.mergeOptions(opts);
19985
+ Object.defineProperty(this, "options", {
19986
+ value: options,
19987
+ enumerable: options.debug
19988
+ });
19989
+ if (options.debug) {
19990
+ switch (typeof options.debug) {
19991
+ case "boolean":
19992
+ debug.setDebugLevel(debug.WARN);
19993
+ break;
19994
+ case "number":
19995
+ debug.setDebugLevel(options.debug);
19996
+ break;
19997
+ case "string":
19998
+ debug.setDebugLevel(parseInt(options.debug, 10));
19999
+ break;
20000
+ default:
20001
+ debug.setDebugLevel(debug.WARN);
20002
+ debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
20003
+ }
20004
+ Object.defineProperty(this, "messages", {
20005
+ get() {
20006
+ return debug.debugMessages();
20007
+ }
20008
+ });
20009
+ }
20010
+ }
20011
+ toString() {
20012
+ let array = this;
20013
+ let headersPresent = this.options.head && this.options.head.length;
20014
+ if (headersPresent) {
20015
+ array = [this.options.head];
20016
+ if (this.length) {
20017
+ array.push.apply(array, this);
20018
+ }
20019
+ } else {
20020
+ this.options.style.head = [];
20021
+ }
20022
+ let cells = tableLayout.makeTableLayout(array);
20023
+ cells.forEach(function(row) {
20024
+ row.forEach(function(cell) {
20025
+ cell.mergeTableOptions(this.options, cells);
20026
+ }, this);
20027
+ }, this);
20028
+ tableLayout.computeWidths(this.options.colWidths, cells);
20029
+ tableLayout.computeHeights(this.options.rowHeights, cells);
20030
+ cells.forEach(function(row) {
20031
+ row.forEach(function(cell) {
20032
+ cell.init(this.options);
20033
+ }, this);
20034
+ }, this);
20035
+ let result = [];
20036
+ for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
20037
+ let row = cells[rowIndex];
20038
+ let heightOfRow = this.options.rowHeights[rowIndex];
20039
+ if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
20040
+ doDraw(row, "top", result);
20041
+ }
20042
+ for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
20043
+ doDraw(row, lineNum, result);
20044
+ }
20045
+ if (rowIndex + 1 == cells.length) {
20046
+ doDraw(row, "bottom", result);
20047
+ }
20048
+ }
20049
+ return result.join("\n");
20050
+ }
20051
+ get width() {
20052
+ let str = this.toString().split("\n");
20053
+ return str[0].length;
20054
+ }
20055
+ };
20056
+ Table3.reset = () => debug.reset();
20057
+ function doDraw(row, lineNum, result) {
20058
+ let line = [];
20059
+ row.forEach(function(cell) {
20060
+ line.push(cell.draw(lineNum));
20061
+ });
20062
+ let str = line.join("");
20063
+ if (str.length) result.push(str);
20064
+ }
20065
+ module.exports = Table3;
20066
+ }
20067
+ });
20068
+
20069
+ // node_modules/cli-table3/index.js
20070
+ var require_cli_table3 = __commonJS({
20071
+ "node_modules/cli-table3/index.js"(exports, module) {
20072
+ "use strict";
20073
+ module.exports = require_table();
20074
+ }
20075
+ });
20076
+
18257
20077
  // src/index.ts
18258
20078
  import { program } from "commander";
18259
20079
 
18260
20080
  // package.json
18261
- var version = "0.32.4";
20081
+ var version = "0.32.6";
18262
20082
  var package_default = {
18263
20083
  name: "genlayer",
18264
20084
  version,
@@ -18321,12 +20141,13 @@ var package_default = {
18321
20141
  },
18322
20142
  dependencies: {
18323
20143
  chalk: "^5.4.1",
20144
+ "cli-table3": "^0.6.5",
18324
20145
  commander: "^14.0.0",
18325
20146
  dockerode: "^4.0.2",
18326
20147
  dotenv: "^17.0.0",
18327
20148
  ethers: "^6.13.4",
18328
20149
  "fs-extra": "^11.3.0",
18329
- "genlayer-js": "^0.18.8",
20150
+ "genlayer-js": "^0.18.9",
18330
20151
  inquirer: "^12.0.0",
18331
20152
  keytar: "^7.9.0",
18332
20153
  "node-fetch": "^3.0.0",
@@ -31913,7 +33734,7 @@ init_fromHex();
31913
33734
  init_toHex();
31914
33735
  init_formatEther();
31915
33736
 
31916
- // node_modules/genlayer-js/dist/chunk-V4ZFI4GV.js
33737
+ // node_modules/genlayer-js/dist/chunk-V3MYVW3P.js
31917
33738
  var chains_exports = {};
31918
33739
  __export2(chains_exports, {
31919
33740
  localnet: () => localnet,
@@ -39948,6 +41769,9 @@ var VALIDATOR_WALLET_ABI = [
39948
41769
  { name: "TransferFailed", type: "error", inputs: [] },
39949
41770
  { name: "OperatorTransferNotReady", type: "error", inputs: [] },
39950
41771
  { name: "NoPendingOperator", type: "error", inputs: [] },
41772
+ // OpenZeppelin Ownable errors
41773
+ { name: "OwnableUnauthorizedAccount", type: "error", inputs: [{ name: "account", type: "address" }] },
41774
+ { name: "OwnableInvalidOwner", type: "error", inputs: [{ name: "owner", type: "address" }] },
39951
41775
  // Functions
39952
41776
  {
39953
41777
  name: "operator",
@@ -40250,6 +42074,13 @@ var STAKING_ABI = [
40250
42074
  inputs: [],
40251
42075
  outputs: [{ name: "", type: "uint256" }]
40252
42076
  },
42077
+ {
42078
+ name: "finalized",
42079
+ type: "function",
42080
+ stateMutability: "view",
42081
+ inputs: [],
42082
+ outputs: [{ name: "", type: "uint256" }]
42083
+ },
40253
42084
  {
40254
42085
  name: "validatorMinStake",
40255
42086
  type: "function",
@@ -40297,7 +42128,8 @@ var STAKING_ABI = [
40297
42128
  { name: "vcount", type: "uint256" },
40298
42129
  { name: "claimed", type: "uint256" },
40299
42130
  { name: "stakeDeposit", type: "uint256" },
40300
- { name: "stakeWithdrawal", type: "uint256" }
42131
+ { name: "stakeWithdrawal", type: "uint256" },
42132
+ { name: "slashed", type: "uint256" }
40301
42133
  ]
40302
42134
  }
40303
42135
  ]
@@ -40321,7 +42153,8 @@ var STAKING_ABI = [
40321
42153
  { name: "vcount", type: "uint256" },
40322
42154
  { name: "claimed", type: "uint256" },
40323
42155
  { name: "stakeDeposit", type: "uint256" },
40324
- { name: "stakeWithdrawal", type: "uint256" }
42156
+ { name: "stakeWithdrawal", type: "uint256" },
42157
+ { name: "slashed", type: "uint256" }
40325
42158
  ]
40326
42159
  }
40327
42160
  ]
@@ -40561,6 +42394,33 @@ var STAKING_ABI = [
40561
42394
  { name: "validator", type: "address", indexed: false },
40562
42395
  { name: "amount", type: "uint256", indexed: false }
40563
42396
  ]
42397
+ },
42398
+ {
42399
+ name: "ValidatorPrime",
42400
+ type: "event",
42401
+ inputs: [
42402
+ { name: "validator", type: "address", indexed: false },
42403
+ { name: "epoch", type: "uint256", indexed: false },
42404
+ { name: "validatorRewards", type: "uint256", indexed: false },
42405
+ { name: "delegatorRewards", type: "uint256", indexed: false }
42406
+ ]
42407
+ },
42408
+ // External contracts getter
42409
+ {
42410
+ name: "contracts",
42411
+ type: "function",
42412
+ stateMutability: "view",
42413
+ inputs: [],
42414
+ outputs: [
42415
+ { name: "gen", type: "address" },
42416
+ { name: "transactions", type: "address" },
42417
+ { name: "idleness", type: "address" },
42418
+ { name: "tribunal", type: "address" },
42419
+ { name: "slashing", type: "address" },
42420
+ { name: "consensus", type: "address" },
42421
+ { name: "validatorWalletFactory", type: "address" },
42422
+ { name: "nftMinter", type: "address" }
42423
+ ]
40564
42424
  }
40565
42425
  ];
40566
42426
  var TESTNET_JSON_RPC_URL = "https://genlayer-testnet.rpc.caldera.xyz/http";
@@ -45544,10 +47404,44 @@ var _sendTransaction = async ({
45544
47404
  data: encodedData,
45545
47405
  value
45546
47406
  });
45547
- } catch (error) {
45548
- console.warn("Gas estimation failed, using fallback value:", error);
47407
+ } catch (err) {
47408
+ console.error("Gas estimation failed, using default 200_000:", err);
45549
47409
  estimatedGas = 200000n;
45550
47410
  }
47411
+ if (validatedSenderAccount?.type === "local") {
47412
+ if (!validatedSenderAccount?.signTransaction) {
47413
+ throw new Error("Account does not support signTransaction");
47414
+ }
47415
+ const gasPriceHex = await client.request({
47416
+ method: "eth_gasPrice"
47417
+ });
47418
+ const transactionRequest2 = {
47419
+ account: validatedSenderAccount,
47420
+ to: client.chain.consensusMainContract?.address,
47421
+ data: encodedData,
47422
+ type: "legacy",
47423
+ nonce: Number(nonce),
47424
+ value,
47425
+ gas: estimatedGas,
47426
+ gasPrice: BigInt(gasPriceHex),
47427
+ chainId: client.chain.id
47428
+ };
47429
+ const serializedTransaction = await validatedSenderAccount.signTransaction(transactionRequest2);
47430
+ const txHash = await client.sendRawTransaction({ serializedTransaction });
47431
+ const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
47432
+ if (receipt.status === "reverted") {
47433
+ throw new Error("Transaction reverted");
47434
+ }
47435
+ const newTxEvents = parseEventLogs({
47436
+ abi: client.chain.consensusMainContract?.abi,
47437
+ eventName: "NewTransaction",
47438
+ logs: receipt.logs
47439
+ });
47440
+ if (newTxEvents.length === 0) {
47441
+ throw new Error("Transaction not processed by consensus");
47442
+ }
47443
+ return newTxEvents[0].args["txId"];
47444
+ }
45551
47445
  const transactionRequest = await client.prepareTransactionRequest({
45552
47446
  account: validatedSenderAccount,
45553
47447
  to: client.chain.consensusMainContract?.address,
@@ -45557,37 +47451,17 @@ var _sendTransaction = async ({
45557
47451
  value,
45558
47452
  gas: estimatedGas
45559
47453
  });
45560
- if (validatedSenderAccount?.type !== "local") {
45561
- const formattedRequest = {
45562
- from: transactionRequest.from,
45563
- to: transactionRequest.to,
45564
- data: encodedData,
45565
- value: transactionRequest.value ? `0x${transactionRequest.value.toString(16)}` : "0x0",
45566
- gas: transactionRequest.gas ? `0x${transactionRequest.gas.toString(16)}` : "0x5208"
45567
- };
45568
- return await client.request({
45569
- method: "eth_sendTransaction",
45570
- params: [formattedRequest]
45571
- });
45572
- }
45573
- if (!validatedSenderAccount?.signTransaction) {
45574
- throw new Error("Account does not support signTransaction");
45575
- }
45576
- const serializedTransaction = await validatedSenderAccount.signTransaction(transactionRequest);
45577
- const txHash = await client.sendRawTransaction({ serializedTransaction });
45578
- const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
45579
- if (receipt.status === "reverted") {
45580
- throw new Error("Transaction reverted");
45581
- }
45582
- const newTxEvents = parseEventLogs({
45583
- abi: client.chain.consensusMainContract?.abi,
45584
- eventName: "NewTransaction",
45585
- logs: receipt.logs
47454
+ const formattedRequest = {
47455
+ from: transactionRequest.from,
47456
+ to: transactionRequest.to,
47457
+ data: encodedData,
47458
+ value: transactionRequest.value ? `0x${transactionRequest.value.toString(16)}` : "0x0",
47459
+ gas: transactionRequest.gas ? `0x${transactionRequest.gas.toString(16)}` : "0x5208"
47460
+ };
47461
+ return await client.request({
47462
+ method: "eth_sendTransaction",
47463
+ params: [formattedRequest]
45586
47464
  });
45587
- if (newTxEvents.length === 0) {
45588
- throw new Error("Transaction not processed by consensus");
45589
- }
45590
- return newTxEvents[0].args["txId"];
45591
47465
  };
45592
47466
  var transactionsConfig = {
45593
47467
  waitInterval: 3e3,
@@ -46448,6 +48322,7 @@ var stakingActions = (client, publicClient) => {
46448
48322
  const contract = getReadOnlyStakingContract();
46449
48323
  const [
46450
48324
  epoch,
48325
+ finalized,
46451
48326
  validatorMinStake,
46452
48327
  delegatorMinStake,
46453
48328
  activeCount,
@@ -46457,6 +48332,7 @@ var stakingActions = (client, publicClient) => {
46457
48332
  epochEven
46458
48333
  ] = await Promise.all([
46459
48334
  contract.read.epoch(),
48335
+ contract.read.finalized(),
46460
48336
  contract.read.validatorMinStake(),
46461
48337
  contract.read.delegatorMinStake(),
46462
48338
  contract.read.activeValidatorsCount(),
@@ -46466,8 +48342,7 @@ var stakingActions = (client, publicClient) => {
46466
48342
  contract.read.epochEven()
46467
48343
  ]);
46468
48344
  const currentEpochData = epoch % 2n === 0n ? epochEven : epochOdd;
46469
- const currentEpochStart = new Date(Number(currentEpochData.start) * 1e3);
46470
- const currentEpochEnd = currentEpochData.end > 0n ? new Date(Number(currentEpochData.end) * 1e3) : null;
48345
+ const currentEpochEnd = currentEpochData.end > 0n;
46471
48346
  let nextEpochEstimate = null;
46472
48347
  if (!currentEpochEnd) {
46473
48348
  const duration = epoch === 0n ? epochZeroMinDuration : epochMinDuration;
@@ -46476,20 +48351,42 @@ var stakingActions = (client, publicClient) => {
46476
48351
  }
46477
48352
  return {
46478
48353
  currentEpoch: epoch,
48354
+ lastFinalizedEpoch: finalized,
46479
48355
  validatorMinStake: formatStakingAmount(validatorMinStake),
46480
48356
  validatorMinStakeRaw: validatorMinStake,
46481
48357
  delegatorMinStake: formatStakingAmount(delegatorMinStake),
46482
48358
  delegatorMinStakeRaw: delegatorMinStake,
46483
48359
  activeValidatorsCount: activeCount,
46484
48360
  epochMinDuration,
46485
- currentEpochStart,
46486
- currentEpochEnd,
46487
- nextEpochEstimate,
46488
- inflation: formatStakingAmount(currentEpochData.inflation),
46489
- inflationRaw: currentEpochData.inflation,
46490
- totalWeight: currentEpochData.weight,
46491
- totalClaimed: formatStakingAmount(currentEpochData.claimed),
46492
- totalClaimedRaw: currentEpochData.claimed
48361
+ nextEpochEstimate
48362
+ };
48363
+ },
48364
+ getEpochData: async (epochNumber) => {
48365
+ const contract = getReadOnlyStakingContract();
48366
+ const [currentEpoch, epochOdd, epochEven] = await Promise.all([
48367
+ contract.read.epoch(),
48368
+ contract.read.epochOdd(),
48369
+ contract.read.epochEven()
48370
+ ]);
48371
+ if (epochNumber > currentEpoch) {
48372
+ throw new Error(`Epoch ${epochNumber} has not started yet (current: ${currentEpoch})`);
48373
+ }
48374
+ if (epochNumber < currentEpoch - 1n && currentEpoch > 0n) {
48375
+ throw new Error(`Epoch ${epochNumber} data no longer available (only current and previous epoch stored)`);
48376
+ }
48377
+ const epochData = epochNumber % 2n === 0n ? epochEven : epochOdd;
48378
+ return {
48379
+ start: epochData.start,
48380
+ end: epochData.end,
48381
+ inflation: epochData.inflation,
48382
+ weight: epochData.weight,
48383
+ weightDeposit: epochData.weightDeposit,
48384
+ weightWithdrawal: epochData.weightWithdrawal,
48385
+ vcount: epochData.vcount,
48386
+ claimed: epochData.claimed,
48387
+ stakeDeposit: epochData.stakeDeposit,
48388
+ stakeWithdrawal: epochData.stakeWithdrawal,
48389
+ slashed: epochData.slashed
46493
48390
  };
46494
48391
  },
46495
48392
  getActiveValidators: async () => {
@@ -46523,6 +48420,11 @@ var stakingActions = (client, publicClient) => {
46523
48420
  permanentlyBanned: v.permanentlyBanned
46524
48421
  }));
46525
48422
  },
48423
+ getSlashingAddress: async () => {
48424
+ const contract = getReadOnlyStakingContract();
48425
+ const externalContracts = await contract.read.contracts();
48426
+ return externalContracts[4];
48427
+ },
46526
48428
  getStakingContract,
46527
48429
  parseStakingAmount,
46528
48430
  formatStakingAmount
@@ -46557,7 +48459,7 @@ function chainActions(client) {
46557
48459
  }
46558
48460
  };
46559
48461
  }
46560
- var getCustomTransportConfig = (config) => {
48462
+ var getCustomTransportConfig = (config, chainConfig) => {
46561
48463
  const isAddress2 = typeof config.account !== "object";
46562
48464
  return {
46563
48465
  async request({ method, params = [] }) {
@@ -46573,11 +48475,8 @@ var getCustomTransportConfig = (config) => {
46573
48475
  }
46574
48476
  }
46575
48477
  {
46576
- if (!config.chain) {
46577
- throw new Error("Chain is not set");
46578
- }
46579
48478
  try {
46580
- const response = await fetch(config.chain.rpcUrls.default.http[0], {
48479
+ const response = await fetch(chainConfig.rpcUrls.default.http[0], {
46581
48480
  method: "POST",
46582
48481
  headers: {
46583
48482
  "Content-Type": "application/json"
@@ -46607,7 +48506,7 @@ var createClient2 = (config = { chain: localnet }) => {
46607
48506
  if (config.endpoint) {
46608
48507
  chainConfig.rpcUrls.default.http = [config.endpoint];
46609
48508
  }
46610
- const customTransport = custom(getCustomTransportConfig(config), { retryCount: 0, retryDelay: 0 });
48509
+ const customTransport = custom(getCustomTransportConfig(config, chainConfig), { retryCount: 0, retryDelay: 0 });
46611
48510
  const publicClient = createPublicClient2(chainConfig, customTransport).extend(
46612
48511
  publicActions
46613
48512
  );
@@ -49892,6 +51791,7 @@ var DelegatorClaimAction = class extends StakingAction {
49892
51791
  };
49893
51792
 
49894
51793
  // src/commands/staking/stakingInfo.ts
51794
+ var import_cli_table3 = __toESM(require_cli_table3(), 1);
49895
51795
  var ACTIVATION_DELAY_EPOCHS = 2n;
49896
51796
  var UNBONDING_PERIOD_EPOCHS = 7n;
49897
51797
  var StakingInfoAction = class extends StakingAction {
@@ -50050,24 +51950,65 @@ var StakingInfoAction = class extends StakingAction {
50050
51950
  }
50051
51951
  return `${hours}h ${minutes}m`;
50052
51952
  };
51953
+ const formatAmount = client.formatStakingAmount;
51954
+ if (options.epoch !== void 0) {
51955
+ const epochNum = BigInt(options.epoch);
51956
+ const epochData = await client.getEpochData(epochNum);
51957
+ const isFinalized = info.lastFinalizedEpoch >= epochNum;
51958
+ const startDate = new Date(Number(epochData.start) * 1e3);
51959
+ const endDate = epochData.end > 0n ? new Date(Number(epochData.end) * 1e3) : null;
51960
+ this.succeedSpinner(`Epoch ${epochNum}`);
51961
+ console.log(`
51962
+ Epoch: ${epochNum}`);
51963
+ console.log(` Started: ${startDate.toISOString()}`);
51964
+ console.log(` Ended: ${endDate?.toISOString() || "Not yet"}`);
51965
+ console.log(` Finalized: ${isFinalized ? "Yes" : "No"}`);
51966
+ console.log(` Validators: ${epochData.vcount}`);
51967
+ console.log(` Weight: ${epochData.weight}`);
51968
+ console.log(` Inflation: ${formatAmount(epochData.inflation)}`);
51969
+ console.log(` Claimed: ${formatAmount(epochData.claimed)}`);
51970
+ console.log(` Slashed: ${formatAmount(epochData.slashed)}`);
51971
+ console.log();
51972
+ return;
51973
+ }
51974
+ const currentEpochData = await client.getEpochData(info.currentEpoch);
51975
+ const currentStart = new Date(Number(currentEpochData.start) * 1e3);
50053
51976
  const now = Date.now();
51977
+ const timeSinceStart = now - currentStart.getTime();
50054
51978
  const timeUntilNext = info.nextEpochEstimate ? info.nextEpochEstimate.getTime() - now : null;
50055
- const result = {
50056
- currentEpoch: info.currentEpoch.toString(),
50057
- epochStarted: info.currentEpochStart.toISOString(),
50058
- epochEnded: info.currentEpochEnd?.toISOString() || "Not ended",
50059
- nextEpochEstimate: info.nextEpochEstimate?.toISOString() || "N/A",
50060
- timeUntilNextEpoch: timeUntilNext && timeUntilNext > 0 ? formatDuration(timeUntilNext) : "N/A",
50061
- minEpochDuration: formatDuration(Number(info.epochMinDuration) * 1e3),
50062
- validatorMinStake: info.validatorMinStake,
50063
- delegatorMinStake: info.delegatorMinStake,
50064
- activeValidatorsCount: info.activeValidatorsCount.toString(),
50065
- // Inflation/rewards
50066
- epochInflation: info.inflation,
50067
- totalWeight: info.totalWeight.toString(),
50068
- totalClaimed: info.totalClaimed
50069
- };
50070
- this.succeedSpinner("Epoch info retrieved", result);
51979
+ this.succeedSpinner("Epoch info");
51980
+ const nextEstimate = timeUntilNext && timeUntilNext > 0 ? `in ${formatDuration(timeUntilNext)}` : currentEpochData.end > 0n ? "Next epoch started" : "N/A";
51981
+ console.log(`
51982
+ Current Epoch: ${info.currentEpoch} (started ${formatDuration(timeSinceStart)} ago)`);
51983
+ console.log(` Next Epoch: ${nextEstimate}`);
51984
+ console.log(` Validators: ${info.activeValidatorsCount}`);
51985
+ console.log(` Weight: ${currentEpochData.weight}`);
51986
+ console.log(` Slashed: ${formatAmount(currentEpochData.slashed)}`);
51987
+ if (info.currentEpoch > 0n) {
51988
+ const prevEpoch = info.currentEpoch - 1n;
51989
+ const prevData = await client.getEpochData(prevEpoch);
51990
+ const isFinalized = info.lastFinalizedEpoch >= prevEpoch;
51991
+ const prevEnd = prevData.end > 0n;
51992
+ let status;
51993
+ if (!prevEnd) {
51994
+ status = "still active";
51995
+ } else if (isFinalized) {
51996
+ status = "finalized";
51997
+ } else {
51998
+ status = "finalizing txs...";
51999
+ }
52000
+ console.log(`
52001
+ Previous Epoch: ${prevEpoch} (${status})`);
52002
+ console.log(` Inflation: ${formatAmount(prevData.inflation)}`);
52003
+ console.log(` Claimed: ${formatAmount(prevData.claimed)}`);
52004
+ console.log(` Unclaimed: ${formatAmount(prevData.inflation - prevData.claimed)}`);
52005
+ console.log(` Slashed: ${formatAmount(prevData.slashed)}`);
52006
+ }
52007
+ console.log(`
52008
+ Min Epoch Duration: ${formatDuration(Number(info.epochMinDuration) * 1e3)}`);
52009
+ console.log(` Validator Min Stake: ${info.validatorMinStake}`);
52010
+ console.log(` Delegator Min Stake: ${info.delegatorMinStake}
52011
+ `);
50071
52012
  } catch (error) {
50072
52013
  this.failSpinner("Failed to get epoch info", error.message || error);
50073
52014
  }
@@ -50122,6 +52063,340 @@ var StakingInfoAction = class extends StakingAction {
50122
52063
  this.failSpinner("Failed to get banned validators", error.message || error);
50123
52064
  }
50124
52065
  }
52066
+ async listValidators(options) {
52067
+ this.startSpinner("Fetching validator set...");
52068
+ try {
52069
+ const client = await this.getReadOnlyStakingClient(options);
52070
+ let myAddress = null;
52071
+ try {
52072
+ myAddress = await this.getSignerAddress();
52073
+ } catch {
52074
+ }
52075
+ const [activeAddresses, quarantinedList, bannedList, epochInfo] = await Promise.all([
52076
+ client.getActiveValidators(),
52077
+ client.getQuarantinedValidatorsDetailed(),
52078
+ options.all ? client.getBannedValidators() : Promise.resolve([]),
52079
+ client.getEpochInfo()
52080
+ ]);
52081
+ const quarantinedSet = new Map(quarantinedList.map((v) => [v.validator.toLowerCase(), v]));
52082
+ const bannedSet = new Map(bannedList.map((v) => [v.validator.toLowerCase(), v]));
52083
+ const allAddresses = /* @__PURE__ */ new Set([
52084
+ ...activeAddresses,
52085
+ ...quarantinedList.map((v) => v.validator),
52086
+ ...options.all ? bannedList.map((v) => v.validator) : []
52087
+ ]);
52088
+ this.setSpinnerText(`Fetching details for ${allAddresses.size} validators...`);
52089
+ const BATCH_SIZE = 5;
52090
+ const addressArray = Array.from(allAddresses);
52091
+ const validatorInfos = [];
52092
+ for (let i2 = 0; i2 < addressArray.length; i2 += BATCH_SIZE) {
52093
+ const batch = addressArray.slice(i2, i2 + BATCH_SIZE);
52094
+ const batchResults = await Promise.all(
52095
+ batch.map((addr) => client.getValidatorInfo(addr))
52096
+ );
52097
+ validatorInfos.push(...batchResults);
52098
+ if (i2 + BATCH_SIZE < addressArray.length) {
52099
+ this.setSpinnerText(`Fetching details... ${Math.min(i2 + BATCH_SIZE, addressArray.length)}/${addressArray.length}`);
52100
+ }
52101
+ }
52102
+ const rows = validatorInfos.map((info) => {
52103
+ const addrLower = info.address.toLowerCase();
52104
+ const isQuarantined = quarantinedSet.has(addrLower);
52105
+ const isBanned = bannedSet.has(addrLower);
52106
+ const isActive = activeAddresses.some((a) => a.toLowerCase() === addrLower);
52107
+ let status = "";
52108
+ if (isBanned) {
52109
+ const banInfo = bannedSet.get(addrLower);
52110
+ status = banInfo.permanentlyBanned ? "BANNED" : `banned(e${banInfo.untilEpoch})`;
52111
+ } else if (isQuarantined) {
52112
+ const qInfo = quarantinedSet.get(addrLower);
52113
+ status = `quarant(e${qInfo.untilEpoch})`;
52114
+ } else if (info.needsPriming) {
52115
+ status = "prime!";
52116
+ } else if (isActive) {
52117
+ status = "active";
52118
+ } else {
52119
+ status = "pending";
52120
+ }
52121
+ const isMine = myAddress ? info.owner.toLowerCase() === myAddress.toLowerCase() || info.operator.toLowerCase() === myAddress.toLowerCase() : false;
52122
+ return {
52123
+ info,
52124
+ status,
52125
+ isMine,
52126
+ totalStakeRaw: info.vStakeRaw + info.dStakeRaw
52127
+ };
52128
+ });
52129
+ const ALPHA = 0.6;
52130
+ const BETA = 0.5;
52131
+ const calcWeight = (vStakeRaw, dStakeRaw) => {
52132
+ const vStake = Number(vStakeRaw) / 1e18;
52133
+ const dStake = Number(dStakeRaw) / 1e18;
52134
+ const util2 = vStake * ALPHA + dStake * (1 - ALPHA);
52135
+ return Math.pow(util2, BETA);
52136
+ };
52137
+ const rowsWithWeight = rows.map((r2) => ({
52138
+ ...r2,
52139
+ weight: calcWeight(r2.info.vStakeRaw, r2.info.dStakeRaw)
52140
+ }));
52141
+ rowsWithWeight.sort((a, b) => b.weight - a.weight);
52142
+ const totalWeight = rowsWithWeight.filter((r2) => r2.status === "active").reduce((sum, r2) => sum + r2.weight, 0);
52143
+ this.stopSpinner();
52144
+ const formatStake = (s2) => {
52145
+ const num2 = parseFloat(s2.replace(" GEN", ""));
52146
+ if (num2 >= 1e6) return `${(num2 / 1e6).toFixed(1)}M`;
52147
+ if (num2 >= 1e3) return `${(num2 / 1e3).toFixed(1)}K`;
52148
+ if (num2 >= 1) return num2.toFixed(1);
52149
+ if (num2 > 0) return num2.toPrecision(2);
52150
+ return "0";
52151
+ };
52152
+ const table = new import_cli_table3.default({
52153
+ head: [
52154
+ source_default.cyan("#"),
52155
+ source_default.cyan("Validator"),
52156
+ source_default.cyan("Self"),
52157
+ source_default.cyan("Deleg"),
52158
+ source_default.cyan("Pending"),
52159
+ source_default.cyan("Weight"),
52160
+ source_default.cyan("Status")
52161
+ ],
52162
+ style: { head: [], border: [] }
52163
+ });
52164
+ rowsWithWeight.forEach((row, idx) => {
52165
+ const { info, status, isMine, weight } = row;
52166
+ const weightPct = totalWeight > 0 ? weight / totalWeight * 100 : 0;
52167
+ const weightStr = status === "active" ? `${weightPct.toFixed(1)}%` : source_default.gray("-");
52168
+ const currentEpoch = epochInfo.currentEpoch;
52169
+ const trulyPendingDeposits = info.pendingDeposits.filter((d) => d.epoch + ACTIVATION_DELAY_EPOCHS > currentEpoch);
52170
+ const trulyPendingWithdrawals = info.pendingWithdrawals.filter((w) => w.epoch + UNBONDING_PERIOD_EPOCHS > currentEpoch);
52171
+ const pendingDepositSum = trulyPendingDeposits.reduce((sum, d) => sum + d.stakeRaw, 0n);
52172
+ const pendingWithdrawSum = trulyPendingWithdrawals.reduce((sum, w) => sum + w.stakeRaw, 0n);
52173
+ let pendingStr = "-";
52174
+ if (pendingDepositSum > 0n && pendingWithdrawSum > 0n) {
52175
+ pendingStr = source_default.green(`+${formatStake(`${Number(pendingDepositSum) / 1e18} GEN`)}`) + " " + source_default.red(`-${formatStake(`${Number(pendingWithdrawSum) / 1e18} GEN`)}`);
52176
+ } else if (pendingDepositSum > 0n) {
52177
+ pendingStr = source_default.green(`+${formatStake(`${Number(pendingDepositSum) / 1e18} GEN`)}`);
52178
+ } else if (pendingWithdrawSum > 0n) {
52179
+ pendingStr = source_default.red(`-${formatStake(`${Number(pendingWithdrawSum) / 1e18} GEN`)}`);
52180
+ }
52181
+ let roleTag = "";
52182
+ if (isMine) {
52183
+ if (myAddress && info.owner.toLowerCase() === myAddress.toLowerCase()) {
52184
+ roleTag = info.operator.toLowerCase() === myAddress.toLowerCase() ? source_default.cyan(" [own+op]") : source_default.cyan(" [owner]");
52185
+ } else {
52186
+ roleTag = source_default.cyan(" [operator]");
52187
+ }
52188
+ }
52189
+ let moniker = info.identity?.moniker || "";
52190
+ if (moniker.length > 20) moniker = moniker.slice(0, 19) + "\u2026";
52191
+ const validatorCell = moniker ? `${moniker}${roleTag}
52192
+ ${source_default.gray(info.address)}` : `${source_default.gray(info.address)}${roleTag}`;
52193
+ let statusStr = status;
52194
+ if (status === "active") statusStr = source_default.green(status);
52195
+ else if (status === "BANNED") statusStr = source_default.red(status);
52196
+ else if (status.startsWith("quarant")) statusStr = source_default.yellow(status);
52197
+ else if (status.startsWith("banned")) statusStr = source_default.red(status);
52198
+ else if (status === "prime!") statusStr = source_default.magenta(status);
52199
+ else if (status === "pending") statusStr = source_default.gray(status);
52200
+ table.push([
52201
+ (idx + 1).toString(),
52202
+ validatorCell,
52203
+ formatStake(info.vStake),
52204
+ formatStake(info.dStake),
52205
+ pendingStr,
52206
+ weightStr,
52207
+ statusStr
52208
+ ]);
52209
+ });
52210
+ console.log("");
52211
+ console.log(table.toString());
52212
+ console.log("");
52213
+ const activeCount = rowsWithWeight.filter((r2) => r2.status === "active").length;
52214
+ console.log(source_default.gray(`Total: ${rowsWithWeight.length} validators (${activeCount} active)`));
52215
+ console.log("");
52216
+ } catch (error) {
52217
+ this.failSpinner("Failed to list validators", error.message || error);
52218
+ }
52219
+ }
52220
+ };
52221
+
52222
+ // src/commands/staking/validatorHistory.ts
52223
+ var import_cli_table32 = __toESM(require_cli_table3(), 1);
52224
+ var SLASH_EVENT_ABI = {
52225
+ type: "event",
52226
+ name: "SlashedFromIdleness",
52227
+ inputs: [
52228
+ { name: "validator", type: "address", indexed: true },
52229
+ { name: "txId", type: "bytes32", indexed: false },
52230
+ { name: "epoch", type: "uint256", indexed: false },
52231
+ { name: "percentage", type: "uint256", indexed: false }
52232
+ ]
52233
+ };
52234
+ var REWARD_EVENT_ABI = {
52235
+ type: "event",
52236
+ name: "ValidatorPrime",
52237
+ inputs: [
52238
+ { name: "validator", type: "address", indexed: false },
52239
+ { name: "epoch", type: "uint256", indexed: false },
52240
+ { name: "validatorRewards", type: "uint256", indexed: false },
52241
+ { name: "delegatorRewards", type: "uint256", indexed: false }
52242
+ ]
52243
+ };
52244
+ var ValidatorHistoryAction = class extends StakingAction {
52245
+ constructor() {
52246
+ super();
52247
+ }
52248
+ getNetworkForHistory(config) {
52249
+ if (config.network) {
52250
+ const network = BUILT_IN_NETWORKS[config.network];
52251
+ if (!network) {
52252
+ throw new Error(`Unknown network: ${config.network}`);
52253
+ }
52254
+ return network;
52255
+ }
52256
+ const globalNetwork = this.getConfig().network;
52257
+ if (globalNetwork && BUILT_IN_NETWORKS[globalNetwork]) {
52258
+ return BUILT_IN_NETWORKS[globalNetwork];
52259
+ }
52260
+ return BUILT_IN_NETWORKS["localnet"];
52261
+ }
52262
+ async execute(options) {
52263
+ this.startSpinner("Fetching validator history...");
52264
+ try {
52265
+ const chain = this.getNetworkForHistory(options);
52266
+ if (chain.id === 808080) {
52267
+ this.failSpinner("validator-history requires testnet-asimov (localnet doesn't support event logs)");
52268
+ return;
52269
+ }
52270
+ const client = await this.getReadOnlyStakingClient(options);
52271
+ const validatorAddress = options.validator || await this.getSignerAddress();
52272
+ const isValidator = await client.isValidator(validatorAddress);
52273
+ if (!isValidator) {
52274
+ this.failSpinner(`Address ${validatorAddress} is not a validator`);
52275
+ return;
52276
+ }
52277
+ this.setSpinnerText("Fetching contract addresses...");
52278
+ const stakingAddress = client.getStakingContract().address;
52279
+ const slashingAddress = await client.getSlashingAddress();
52280
+ const publicClient = createPublicClient({
52281
+ chain,
52282
+ transport: http3(chain.rpcUrls.default.http[0])
52283
+ });
52284
+ const fromBlock = options.fromBlock ? BigInt(options.fromBlock) : 0n;
52285
+ const limit = options.limit ? parseInt(options.limit) : 50;
52286
+ this.setSpinnerText("Fetching slash events...");
52287
+ const slashLogs = await publicClient.getLogs({
52288
+ address: slashingAddress,
52289
+ event: SLASH_EVENT_ABI,
52290
+ args: { validator: validatorAddress },
52291
+ fromBlock,
52292
+ toBlock: "latest"
52293
+ });
52294
+ this.setSpinnerText("Fetching reward events...");
52295
+ const rewardLogs = await publicClient.getLogs({
52296
+ address: stakingAddress,
52297
+ event: REWARD_EVENT_ABI,
52298
+ fromBlock,
52299
+ toBlock: "latest"
52300
+ });
52301
+ const filteredRewardLogs = rewardLogs.filter(
52302
+ (log) => log.args.validator?.toLowerCase() === validatorAddress.toLowerCase()
52303
+ );
52304
+ const allLogs = [...slashLogs, ...filteredRewardLogs];
52305
+ const uniqueBlocks = [...new Set(allLogs.map((l) => l.blockNumber))];
52306
+ this.setSpinnerText("Fetching block timestamps...");
52307
+ const blockTimestamps = /* @__PURE__ */ new Map();
52308
+ const BATCH_SIZE = 10;
52309
+ for (let i2 = 0; i2 < uniqueBlocks.length; i2 += BATCH_SIZE) {
52310
+ const batch = uniqueBlocks.slice(i2, i2 + BATCH_SIZE);
52311
+ const blocks = await Promise.all(
52312
+ batch.map((blockNumber) => publicClient.getBlock({ blockNumber }))
52313
+ );
52314
+ blocks.forEach((block) => {
52315
+ blockTimestamps.set(block.number, new Date(Number(block.timestamp) * 1e3));
52316
+ });
52317
+ }
52318
+ const slashEvents = slashLogs.map((log) => ({
52319
+ type: "slash",
52320
+ epoch: log.args.epoch,
52321
+ txId: log.args.txId,
52322
+ percentage: log.args.percentage,
52323
+ blockNumber: log.blockNumber,
52324
+ timestamp: blockTimestamps.get(log.blockNumber) || /* @__PURE__ */ new Date(0)
52325
+ }));
52326
+ const rewardEvents = filteredRewardLogs.map((log) => ({
52327
+ type: "reward",
52328
+ epoch: log.args.epoch,
52329
+ validatorRewards: log.args.validatorRewards,
52330
+ delegatorRewards: log.args.delegatorRewards,
52331
+ blockNumber: log.blockNumber,
52332
+ timestamp: blockTimestamps.get(log.blockNumber) || /* @__PURE__ */ new Date(0)
52333
+ }));
52334
+ const allEvents = [...slashEvents, ...rewardEvents];
52335
+ allEvents.sort((a, b) => Number(b.blockNumber - a.blockNumber));
52336
+ const limitedEvents = allEvents.slice(0, limit);
52337
+ const totalValidatorRewards = rewardEvents.reduce((sum, e2) => sum + e2.validatorRewards, 0n);
52338
+ const totalDelegatorRewards = rewardEvents.reduce((sum, e2) => sum + e2.delegatorRewards, 0n);
52339
+ this.stopSpinner();
52340
+ if (limitedEvents.length === 0) {
52341
+ console.log(source_default.yellow("\nNo history events found for this validator.\n"));
52342
+ return;
52343
+ }
52344
+ const formatTime = (date) => {
52345
+ const month = String(date.getMonth() + 1).padStart(2, "0");
52346
+ const day = String(date.getDate()).padStart(2, "0");
52347
+ const hours = String(date.getHours()).padStart(2, "0");
52348
+ const minutes = String(date.getMinutes()).padStart(2, "0");
52349
+ return `${month}-${day} ${hours}:${minutes}`;
52350
+ };
52351
+ const table = new import_cli_table32.default({
52352
+ head: [
52353
+ source_default.cyan("Time"),
52354
+ source_default.cyan("Epoch"),
52355
+ source_default.cyan("Type"),
52356
+ source_default.cyan("Details"),
52357
+ source_default.cyan("GL TxId / Block")
52358
+ ],
52359
+ style: { head: [], border: [] }
52360
+ });
52361
+ for (const event of limitedEvents) {
52362
+ if (event.type === "slash") {
52363
+ const pct = Number(event.percentage) / 100;
52364
+ table.push([
52365
+ formatTime(event.timestamp),
52366
+ event.epoch.toString(),
52367
+ source_default.red("SLASH"),
52368
+ `${pct.toFixed(2)}%`,
52369
+ event.txId
52370
+ ]);
52371
+ } else {
52372
+ const valReward = client.formatStakingAmount(event.validatorRewards);
52373
+ const delReward = client.formatStakingAmount(event.delegatorRewards);
52374
+ table.push([
52375
+ formatTime(event.timestamp),
52376
+ event.epoch.toString(),
52377
+ source_default.green("REWARD"),
52378
+ `Val: ${valReward}, Del: ${delReward}`,
52379
+ `block ${event.blockNumber}`
52380
+ ]);
52381
+ }
52382
+ }
52383
+ console.log("");
52384
+ console.log(source_default.bold(`History for ${validatorAddress}`));
52385
+ console.log(table.toString());
52386
+ console.log("");
52387
+ console.log(source_default.gray("Summary:"));
52388
+ console.log(source_default.gray(` Slash events: ${slashEvents.length}`));
52389
+ console.log(source_default.gray(` Reward events: ${rewardEvents.length}`));
52390
+ console.log(source_default.gray(` Total validator rewards: ${client.formatStakingAmount(totalValidatorRewards)}`));
52391
+ console.log(source_default.gray(` Total delegator rewards: ${client.formatStakingAmount(totalDelegatorRewards)}`));
52392
+ if (allEvents.length > limit) {
52393
+ console.log(source_default.gray(` (showing ${limit} of ${allEvents.length} events)`));
52394
+ }
52395
+ console.log("");
52396
+ } catch (error) {
52397
+ this.failSpinner("Failed to get validator history", error.message || error);
52398
+ }
52399
+ }
50125
52400
  };
50126
52401
 
50127
52402
  // src/commands/staking/wizard.ts
@@ -50183,8 +52458,8 @@ var ValidatorWizardAction = class extends StakingAction {
50183
52458
  {
50184
52459
  type: "input",
50185
52460
  name: "accountName",
50186
- message: "Enter a name for your validator account:",
50187
- default: "validator",
52461
+ message: "Enter a name for your owner account:",
52462
+ default: "owner",
50188
52463
  validate: (input) => input.length > 0 || "Name cannot be empty"
50189
52464
  }
50190
52465
  ]);
@@ -50773,51 +53048,103 @@ function initializeStakingCommands(program2) {
50773
53048
  const action = new ValidatorJoinAction();
50774
53049
  await action.execute(options);
50775
53050
  });
50776
- staking.command("validator-deposit").description("Make an additional deposit to a validator wallet").requiredOption("--validator <address>", "Validator wallet contract address to deposit to").requiredOption("--amount <amount>", "Amount to deposit (in wei or with 'eth'/'gen' suffix)").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (options) => {
53051
+ staking.command("validator-deposit [validator]").description("Make an additional deposit to a validator wallet").option("--validator <address>", "Validator wallet contract address (deprecated, use positional arg)").requiredOption("--amount <amount>", "Amount to deposit (in wei or with 'eth'/'gen' suffix)").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (validatorArg, options) => {
53052
+ const validator = validatorArg || options.validator;
53053
+ if (!validator) {
53054
+ console.error("Error: validator address is required");
53055
+ process.exit(1);
53056
+ }
50777
53057
  const action = new ValidatorDepositAction();
50778
- await action.execute(options);
53058
+ await action.execute({ ...options, validator });
50779
53059
  });
50780
- staking.command("validator-exit").description("Exit as a validator by withdrawing shares").requiredOption("--validator <address>", "Validator wallet contract address").requiredOption("--shares <shares>", "Number of shares to withdraw").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (options) => {
53060
+ staking.command("validator-exit [validator]").description("Exit as a validator by withdrawing shares").option("--validator <address>", "Validator wallet contract address (deprecated, use positional arg)").requiredOption("--shares <shares>", "Number of shares to withdraw").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (validatorArg, options) => {
53061
+ const validator = validatorArg || options.validator;
53062
+ if (!validator) {
53063
+ console.error("Error: validator address is required");
53064
+ process.exit(1);
53065
+ }
50781
53066
  const action = new ValidatorExitAction();
50782
- await action.execute(options);
53067
+ await action.execute({ ...options, validator });
50783
53068
  });
50784
- staking.command("validator-claim").description("Claim validator withdrawals after unbonding period").requiredOption("--validator <address>", "Validator wallet contract address").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (options) => {
53069
+ staking.command("validator-claim [validator]").description("Claim validator withdrawals after unbonding period").option("--validator <address>", "Validator wallet contract address (deprecated, use positional arg)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (validatorArg, options) => {
53070
+ const validator = validatorArg || options.validator;
53071
+ if (!validator) {
53072
+ console.error("Error: validator address is required");
53073
+ process.exit(1);
53074
+ }
50785
53075
  const action = new ValidatorClaimAction();
50786
- await action.execute(options);
53076
+ await action.execute({ ...options, validator });
50787
53077
  });
50788
- staking.command("validator-prime").description("Prime a validator to prepare their stake record for the next epoch").requiredOption("--validator <address>", "Validator address to prime").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53078
+ staking.command("validator-prime [validator]").description("Prime a validator to prepare their stake record for the next epoch").option("--validator <address>", "Validator address to prime (deprecated, use positional arg)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53079
+ const validator = validatorArg || options.validator;
53080
+ if (!validator) {
53081
+ console.error("Error: validator address is required");
53082
+ process.exit(1);
53083
+ }
50789
53084
  const action = new ValidatorPrimeAction();
50790
- await action.execute(options);
53085
+ await action.execute({ ...options, validator });
50791
53086
  });
50792
- staking.command("set-operator").description("Change the operator address for a validator wallet").requiredOption("--validator <address>", "Validator wallet address").requiredOption("--operator <address>", "New operator address").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (options) => {
53087
+ staking.command("set-operator [validator] [operator]").description("Change the operator address for a validator wallet").option("--validator <address>", "Validator wallet address (deprecated, use positional arg)").option("--operator <address>", "New operator address (deprecated, use positional arg)").option("--account <name>", "Account to use (must be validator owner)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (validatorArg, operatorArg, options) => {
53088
+ const validator = validatorArg || options.validator;
53089
+ const operator = operatorArg || options.operator;
53090
+ if (!validator || !operator) {
53091
+ console.error("Error: validator and operator addresses are required");
53092
+ process.exit(1);
53093
+ }
50793
53094
  const action = new SetOperatorAction();
50794
- await action.execute(options);
53095
+ await action.execute({ ...options, validator, operator });
50795
53096
  });
50796
- staking.command("set-identity").description("Set validator identity metadata (moniker, website, socials, etc.)").requiredOption("--validator <address>", "Validator wallet address").requiredOption("--moniker <name>", "Validator display name").option("--logo-uri <uri>", "Logo URI").option("--website <url>", "Website URL").option("--description <text>", "Description").option("--email <email>", "Contact email").option("--twitter <handle>", "Twitter handle").option("--telegram <handle>", "Telegram handle").option("--github <handle>", "GitHub handle").option("--extra-cid <cid>", "Extra data as IPFS CID or hex bytes (0x...)").option("--account <name>", "Account to use (must be validator operator)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (options) => {
53097
+ staking.command("set-identity [validator]").description("Set validator identity metadata (moniker, website, socials, etc.)").option("--validator <address>", "Validator wallet address (deprecated, use positional arg)").requiredOption("--moniker <name>", "Validator display name").option("--logo-uri <uri>", "Logo URI").option("--website <url>", "Website URL").option("--description <text>", "Description").option("--email <email>", "Contact email").option("--twitter <handle>", "Twitter handle").option("--telegram <handle>", "Telegram handle").option("--github <handle>", "GitHub handle").option("--extra-cid <cid>", "Extra data as IPFS CID or hex bytes (0x...)").option("--account <name>", "Account to use (must be validator operator)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").action(async (validatorArg, options) => {
53098
+ const validator = validatorArg || options.validator;
53099
+ if (!validator) {
53100
+ console.error("Error: validator address is required");
53101
+ process.exit(1);
53102
+ }
50797
53103
  const action = new SetIdentityAction();
50798
- await action.execute(options);
53104
+ await action.execute({ ...options, validator });
50799
53105
  });
50800
- staking.command("delegator-join").description("Join as a delegator by staking with a validator").requiredOption("--validator <address>", "Validator address to delegate to").requiredOption("--amount <amount>", "Amount to stake (in wei or with 'eth'/'gen' suffix)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53106
+ staking.command("delegator-join [validator]").description("Join as a delegator by staking with a validator").option("--validator <address>", "Validator address to delegate to (deprecated, use positional arg)").requiredOption("--amount <amount>", "Amount to stake (in wei or with 'eth'/'gen' suffix)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53107
+ const validator = validatorArg || options.validator;
53108
+ if (!validator) {
53109
+ console.error("Error: validator address is required");
53110
+ process.exit(1);
53111
+ }
50801
53112
  const action = new DelegatorJoinAction();
50802
- await action.execute(options);
53113
+ await action.execute({ ...options, validator });
50803
53114
  });
50804
- staking.command("delegator-exit").description("Exit as a delegator by withdrawing shares from a validator").requiredOption("--validator <address>", "Validator address to exit from").requiredOption("--shares <shares>", "Number of shares to withdraw").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53115
+ staking.command("delegator-exit [validator]").description("Exit as a delegator by withdrawing shares from a validator").option("--validator <address>", "Validator address to exit from (deprecated, use positional arg)").requiredOption("--shares <shares>", "Number of shares to withdraw").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53116
+ const validator = validatorArg || options.validator;
53117
+ if (!validator) {
53118
+ console.error("Error: validator address is required");
53119
+ process.exit(1);
53120
+ }
50805
53121
  const action = new DelegatorExitAction();
50806
- await action.execute(options);
53122
+ await action.execute({ ...options, validator });
50807
53123
  });
50808
- staking.command("delegator-claim").description("Claim delegator withdrawals after unbonding period").requiredOption("--validator <address>", "Validator address").option("--delegator <address>", "Delegator address (defaults to signer)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53124
+ staking.command("delegator-claim [validator]").description("Claim delegator withdrawals after unbonding period").option("--validator <address>", "Validator address (deprecated, use positional arg)").option("--delegator <address>", "Delegator address (defaults to signer)").option("--account <name>", "Account to use").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53125
+ const validator = validatorArg || options.validator;
53126
+ if (!validator) {
53127
+ console.error("Error: validator address is required");
53128
+ process.exit(1);
53129
+ }
50809
53130
  const action = new DelegatorClaimAction();
50810
- await action.execute(options);
53131
+ await action.execute({ ...options, validator });
50811
53132
  });
50812
- staking.command("validator-info").description("Get information about a validator").option("--validator <address>", "Validator address (defaults to signer)").option("--account <name>", "Account to use (for default validator address)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53133
+ staking.command("validator-info [validator]").description("Get information about a validator").option("--validator <address>", "Validator address (deprecated, use positional arg)").option("--account <name>", "Account to use (for default validator address)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53134
+ const validator = validatorArg || options.validator;
50813
53135
  const action = new StakingInfoAction();
50814
- await action.getValidatorInfo(options);
53136
+ await action.getValidatorInfo({ ...options, validator });
50815
53137
  });
50816
- staking.command("delegation-info").description("Get delegation info for a delegator with a validator").requiredOption("--validator <address>", "Validator address").option("--delegator <address>", "Delegator address (defaults to signer)").option("--account <name>", "Account to use (for default delegator address)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53138
+ staking.command("delegation-info [validator]").description("Get delegation info for a delegator with a validator").option("--validator <address>", "Validator address (deprecated, use positional arg)").option("--delegator <address>", "Delegator address (defaults to signer)").option("--account <name>", "Account to use (for default delegator address)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53139
+ const validator = validatorArg || options.validator;
53140
+ if (!validator) {
53141
+ console.error("Error: validator address is required");
53142
+ process.exit(1);
53143
+ }
50817
53144
  const action = new StakingInfoAction();
50818
- await action.getStakeInfo(options);
53145
+ await action.getStakeInfo({ ...options, validator });
50819
53146
  });
50820
- staking.command("epoch-info").description("Get current epoch and staking parameters").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53147
+ staking.command("epoch-info").description("Get current epoch and staking parameters").option("--epoch <number>", "Show data for specific epoch (current or previous only)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
50821
53148
  const action = new StakingInfoAction();
50822
53149
  await action.getEpochInfo(options);
50823
53150
  });
@@ -50833,6 +53160,15 @@ function initializeStakingCommands(program2) {
50833
53160
  const action = new StakingInfoAction();
50834
53161
  await action.listBannedValidators(options);
50835
53162
  });
53163
+ staking.command("validators").description("Show validator set with stake, status, and voting power").option("--all", "Include banned validators").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (options) => {
53164
+ const action = new StakingInfoAction();
53165
+ await action.listValidators(options);
53166
+ });
53167
+ staking.command("validator-history [validator]").description("Show slash and reward history for a validator").option("--validator <address>", "Validator address (deprecated, use positional arg)").option("--from-block <block>", "Start from this block number").option("--limit <count>", "Maximum number of events to show (default: 50)").option("--account <name>", "Account to use (for default validator address)").option("--network <network>", "Network to use (localnet, testnet-asimov)").option("--rpc <rpcUrl>", "RPC URL for the network").option("--staking-address <address>", "Staking contract address (overrides chain config)").action(async (validatorArg, options) => {
53168
+ const validator = validatorArg || options.validator;
53169
+ const action = new ValidatorHistoryAction();
53170
+ await action.execute({ ...options, validator });
53171
+ });
50836
53172
  return program2;
50837
53173
  }
50838
53174