@manot40/genql-cli 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,14 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { n as __toESM, t as __commonJSMin } from "./chunk-CIPSg9SW.mjs";
3
- import { t as generate } from "./main-D79GNEz7.mjs";
4
- import { n as stringWidth, t as wrapAnsi } from "./wrap-ansi-CUNel7aF.mjs";
2
+ import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk.mjs";
3
+ import { t as generate } from "./main.mjs";
5
4
  import { createRequire } from "node:module";
6
- import { format, inspect } from "util";
7
- import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
8
- import { notStrictEqual, strictEqual } from "assert";
9
- import { existsSync, readFileSync, readdirSync, statSync, writeFile } from "fs";
10
- import { fileURLToPath } from "url";
11
- import { readFileSync as readFileSync$1, readdirSync as readdirSync$1 } from "node:fs";
5
+ import { format, inspect } from "node:util";
6
+ import { fileURLToPath } from "node:url";
7
+ import { basename, dirname, extname, join, normalize, relative, resolve } from "node:path";
8
+ import { notStrictEqual, strictEqual } from "node:assert";
9
+ import { existsSync, readFileSync, readdirSync, statSync, writeFile } from "node:fs";
12
10
 
13
11
  //#region node_modules/kleur/index.mjs
14
12
  let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = true;
@@ -319,26 +317,405 @@ function cliui(opts, _mixin) {
319
317
  });
320
318
  }
321
319
 
320
+ //#endregion
321
+ //#region node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
322
+ function ansiRegex$2({ onlyFirst = false } = {}) {
323
+ return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
324
+ }
325
+
326
+ //#endregion
327
+ //#region node_modules/string-width/node_modules/strip-ansi/index.js
328
+ const regex$2 = ansiRegex$2();
329
+ function stripAnsi$2(string) {
330
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
331
+ return string.replace(regex$2, "");
332
+ }
333
+
334
+ //#endregion
335
+ //#region node_modules/get-east-asian-width/lookup.js
336
+ function isAmbiguous(x) {
337
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
338
+ }
339
+ function isFullWidth(x) {
340
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
341
+ }
342
+ function isWide(x) {
343
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
344
+ }
345
+
346
+ //#endregion
347
+ //#region node_modules/get-east-asian-width/index.js
348
+ function validate(codePoint) {
349
+ if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
350
+ }
351
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
352
+ validate(codePoint);
353
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
354
+ return 1;
355
+ }
356
+
357
+ //#endregion
358
+ //#region node_modules/emoji-regex/index.js
359
+ var require_emoji_regex = /* @__PURE__ */ __commonJSMin(((exports, module) => {
360
+ module.exports = () => {
361
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
362
+ };
363
+ }));
364
+
365
+ //#endregion
366
+ //#region node_modules/string-width/index.js
367
+ var import_emoji_regex = /* @__PURE__ */ __toESM(require_emoji_regex(), 1);
368
+ const segmenter = new Intl.Segmenter();
369
+ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
370
+ function stringWidth(string, options = {}) {
371
+ if (typeof string !== "string" || string.length === 0) return 0;
372
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
373
+ if (!countAnsiEscapeCodes) string = stripAnsi$2(string);
374
+ if (string.length === 0) return 0;
375
+ let width = 0;
376
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
377
+ for (const { segment: character } of segmenter.segment(string)) {
378
+ const codePoint = character.codePointAt(0);
379
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
380
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
381
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
382
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
383
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
384
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
385
+ if ((0, import_emoji_regex.default)().test(character)) {
386
+ width += 2;
387
+ continue;
388
+ }
389
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
390
+ }
391
+ return width;
392
+ }
393
+
322
394
  //#endregion
323
395
  //#region node_modules/cliui/node_modules/strip-ansi/node_modules/ansi-regex/index.js
324
- function ansiRegex({ onlyFirst = false } = {}) {
396
+ function ansiRegex$1({ onlyFirst = false } = {}) {
325
397
  return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
326
398
  }
327
399
 
328
400
  //#endregion
329
401
  //#region node_modules/cliui/node_modules/strip-ansi/index.js
402
+ const regex$1 = ansiRegex$1();
403
+ function stripAnsi$1(string) {
404
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
405
+ return string.replace(regex$1, "");
406
+ }
407
+
408
+ //#endregion
409
+ //#region node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js
410
+ function ansiRegex({ onlyFirst = false } = {}) {
411
+ return new RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`, onlyFirst ? void 0 : "g");
412
+ }
413
+
414
+ //#endregion
415
+ //#region node_modules/wrap-ansi/node_modules/strip-ansi/index.js
330
416
  const regex = ansiRegex();
331
417
  function stripAnsi(string) {
332
418
  if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
333
419
  return string.replace(regex, "");
334
420
  }
335
421
 
422
+ //#endregion
423
+ //#region node_modules/wrap-ansi/node_modules/ansi-styles/index.js
424
+ const ANSI_BACKGROUND_OFFSET = 10;
425
+ const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
426
+ const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
427
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
428
+ const styles = {
429
+ modifier: {
430
+ reset: [0, 0],
431
+ bold: [1, 22],
432
+ dim: [2, 22],
433
+ italic: [3, 23],
434
+ underline: [4, 24],
435
+ overline: [53, 55],
436
+ inverse: [7, 27],
437
+ hidden: [8, 28],
438
+ strikethrough: [9, 29]
439
+ },
440
+ color: {
441
+ black: [30, 39],
442
+ red: [31, 39],
443
+ green: [32, 39],
444
+ yellow: [33, 39],
445
+ blue: [34, 39],
446
+ magenta: [35, 39],
447
+ cyan: [36, 39],
448
+ white: [37, 39],
449
+ blackBright: [90, 39],
450
+ gray: [90, 39],
451
+ grey: [90, 39],
452
+ redBright: [91, 39],
453
+ greenBright: [92, 39],
454
+ yellowBright: [93, 39],
455
+ blueBright: [94, 39],
456
+ magentaBright: [95, 39],
457
+ cyanBright: [96, 39],
458
+ whiteBright: [97, 39]
459
+ },
460
+ bgColor: {
461
+ bgBlack: [40, 49],
462
+ bgRed: [41, 49],
463
+ bgGreen: [42, 49],
464
+ bgYellow: [43, 49],
465
+ bgBlue: [44, 49],
466
+ bgMagenta: [45, 49],
467
+ bgCyan: [46, 49],
468
+ bgWhite: [47, 49],
469
+ bgBlackBright: [100, 49],
470
+ bgGray: [100, 49],
471
+ bgGrey: [100, 49],
472
+ bgRedBright: [101, 49],
473
+ bgGreenBright: [102, 49],
474
+ bgYellowBright: [103, 49],
475
+ bgBlueBright: [104, 49],
476
+ bgMagentaBright: [105, 49],
477
+ bgCyanBright: [106, 49],
478
+ bgWhiteBright: [107, 49]
479
+ }
480
+ };
481
+ const modifierNames = Object.keys(styles.modifier);
482
+ const foregroundColorNames = Object.keys(styles.color);
483
+ const backgroundColorNames = Object.keys(styles.bgColor);
484
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
485
+ function assembleStyles() {
486
+ const codes = /* @__PURE__ */ new Map();
487
+ for (const [groupName, group] of Object.entries(styles)) {
488
+ for (const [styleName, style] of Object.entries(group)) {
489
+ styles[styleName] = {
490
+ open: `\u001B[${style[0]}m`,
491
+ close: `\u001B[${style[1]}m`
492
+ };
493
+ group[styleName] = styles[styleName];
494
+ codes.set(style[0], style[1]);
495
+ }
496
+ Object.defineProperty(styles, groupName, {
497
+ value: group,
498
+ enumerable: false
499
+ });
500
+ }
501
+ Object.defineProperty(styles, "codes", {
502
+ value: codes,
503
+ enumerable: false
504
+ });
505
+ styles.color.close = "\x1B[39m";
506
+ styles.bgColor.close = "\x1B[49m";
507
+ styles.color.ansi = wrapAnsi16();
508
+ styles.color.ansi256 = wrapAnsi256();
509
+ styles.color.ansi16m = wrapAnsi16m();
510
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
511
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
512
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
513
+ Object.defineProperties(styles, {
514
+ rgbToAnsi256: {
515
+ value(red, green, blue) {
516
+ if (red === green && green === blue) {
517
+ if (red < 8) return 16;
518
+ if (red > 248) return 231;
519
+ return Math.round((red - 8) / 247 * 24) + 232;
520
+ }
521
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
522
+ },
523
+ enumerable: false
524
+ },
525
+ hexToRgb: {
526
+ value(hex) {
527
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
528
+ if (!matches) return [
529
+ 0,
530
+ 0,
531
+ 0
532
+ ];
533
+ let [colorString] = matches;
534
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
535
+ const integer = Number.parseInt(colorString, 16);
536
+ return [
537
+ integer >> 16 & 255,
538
+ integer >> 8 & 255,
539
+ integer & 255
540
+ ];
541
+ },
542
+ enumerable: false
543
+ },
544
+ hexToAnsi256: {
545
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
546
+ enumerable: false
547
+ },
548
+ ansi256ToAnsi: {
549
+ value(code) {
550
+ if (code < 8) return 30 + code;
551
+ if (code < 16) return 90 + (code - 8);
552
+ let red;
553
+ let green;
554
+ let blue;
555
+ if (code >= 232) {
556
+ red = ((code - 232) * 10 + 8) / 255;
557
+ green = red;
558
+ blue = red;
559
+ } else {
560
+ code -= 16;
561
+ const remainder = code % 36;
562
+ red = Math.floor(code / 36) / 5;
563
+ green = Math.floor(remainder / 6) / 5;
564
+ blue = remainder % 6 / 5;
565
+ }
566
+ const value = Math.max(red, green, blue) * 2;
567
+ if (value === 0) return 30;
568
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
569
+ if (value === 2) result += 60;
570
+ return result;
571
+ },
572
+ enumerable: false
573
+ },
574
+ rgbToAnsi: {
575
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
576
+ enumerable: false
577
+ },
578
+ hexToAnsi: {
579
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
580
+ enumerable: false
581
+ }
582
+ });
583
+ return styles;
584
+ }
585
+ const ansiStyles = assembleStyles();
586
+ var ansi_styles_default = ansiStyles;
587
+
588
+ //#endregion
589
+ //#region node_modules/wrap-ansi/index.js
590
+ var wrap_ansi_exports = /* @__PURE__ */ __exportAll({ default: () => wrapAnsi });
591
+ const ESCAPES = new Set(["\x1B", "›"]);
592
+ const END_CODE = 39;
593
+ const ANSI_ESCAPE_BELL = "\x07";
594
+ const ANSI_CSI = "[";
595
+ const ANSI_OSC = "]";
596
+ const ANSI_SGR_TERMINATOR = "m";
597
+ const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
598
+ const wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
599
+ const wrapAnsiHyperlink = (url$1) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url$1}${ANSI_ESCAPE_BELL}`;
600
+ const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
601
+ const wrapWord = (rows, word, columns) => {
602
+ const characters = [...word];
603
+ let isInsideEscape = false;
604
+ let isInsideLinkEscape = false;
605
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
606
+ for (const [index, character] of characters.entries()) {
607
+ const characterLength = stringWidth(character);
608
+ if (visible + characterLength <= columns) rows[rows.length - 1] += character;
609
+ else {
610
+ rows.push(character);
611
+ visible = 0;
612
+ }
613
+ if (ESCAPES.has(character)) {
614
+ isInsideEscape = true;
615
+ isInsideLinkEscape = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("") === ANSI_ESCAPE_LINK;
616
+ }
617
+ if (isInsideEscape) {
618
+ if (isInsideLinkEscape) {
619
+ if (character === ANSI_ESCAPE_BELL) {
620
+ isInsideEscape = false;
621
+ isInsideLinkEscape = false;
622
+ }
623
+ } else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
624
+ continue;
625
+ }
626
+ visible += characterLength;
627
+ if (visible === columns && index < characters.length - 1) {
628
+ rows.push("");
629
+ visible = 0;
630
+ }
631
+ }
632
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
633
+ };
634
+ const stringVisibleTrimSpacesRight = (string) => {
635
+ const words = string.split(" ");
636
+ let last = words.length;
637
+ while (last > 0) {
638
+ if (stringWidth(words[last - 1]) > 0) break;
639
+ last--;
640
+ }
641
+ if (last === words.length) return string;
642
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
643
+ };
644
+ const exec = (string, columns, options = {}) => {
645
+ if (options.trim !== false && string.trim() === "") return "";
646
+ let returnValue = "";
647
+ let escapeCode;
648
+ let escapeUrl;
649
+ const lengths = wordLengths(string);
650
+ let rows = [""];
651
+ for (const [index, word] of string.split(" ").entries()) {
652
+ if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
653
+ let rowLength = stringWidth(rows.at(-1));
654
+ if (index !== 0) {
655
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
656
+ rows.push("");
657
+ rowLength = 0;
658
+ }
659
+ if (rowLength > 0 || options.trim === false) {
660
+ rows[rows.length - 1] += " ";
661
+ rowLength++;
662
+ }
663
+ }
664
+ if (options.hard && lengths[index] > columns) {
665
+ const remainingColumns = columns - rowLength;
666
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
667
+ if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
668
+ wrapWord(rows, word, columns);
669
+ continue;
670
+ }
671
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
672
+ if (options.wordWrap === false && rowLength < columns) {
673
+ wrapWord(rows, word, columns);
674
+ continue;
675
+ }
676
+ rows.push("");
677
+ }
678
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
679
+ wrapWord(rows, word, columns);
680
+ continue;
681
+ }
682
+ rows[rows.length - 1] += word;
683
+ }
684
+ if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
685
+ const preString = rows.join("\n");
686
+ const pre = [...preString];
687
+ let preStringIndex = 0;
688
+ for (const [index, character] of pre.entries()) {
689
+ returnValue += character;
690
+ if (ESCAPES.has(character)) {
691
+ const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(preString.slice(preStringIndex)) || { groups: {} };
692
+ if (groups.code !== void 0) {
693
+ const code$1 = Number.parseFloat(groups.code);
694
+ escapeCode = code$1 === END_CODE ? void 0 : code$1;
695
+ } else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
696
+ }
697
+ const code = ansi_styles_default.codes.get(Number(escapeCode));
698
+ if (pre[index + 1] === "\n") {
699
+ if (escapeUrl) returnValue += wrapAnsiHyperlink("");
700
+ if (escapeCode && code) returnValue += wrapAnsiCode(code);
701
+ } else if (character === "\n") {
702
+ if (escapeCode && code) returnValue += wrapAnsiCode(escapeCode);
703
+ if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
704
+ }
705
+ preStringIndex += character.length;
706
+ }
707
+ return returnValue;
708
+ };
709
+ function wrapAnsi(string, columns, options) {
710
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
711
+ }
712
+
336
713
  //#endregion
337
714
  //#region node_modules/cliui/index.mjs
338
715
  function ui(opts) {
339
716
  return cliui(opts, {
340
717
  stringWidth,
341
- stripAnsi,
718
+ stripAnsi: stripAnsi$1,
342
719
  wrap: wrapAnsi
343
720
  });
344
721
  }
@@ -835,30 +1212,30 @@ var YargsParser = class {
835
1212
  Object.keys(flags.configs).forEach(function(configKey) {
836
1213
  const configPath = argv$1[configKey] || configLookup[configKey];
837
1214
  if (configPath) try {
838
- let config$1 = null;
1215
+ let config = null;
839
1216
  const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
840
1217
  const resolveConfig = flags.configs[configKey];
841
1218
  if (typeof resolveConfig === "function") {
842
1219
  try {
843
- config$1 = resolveConfig(resolvedConfigPath);
1220
+ config = resolveConfig(resolvedConfigPath);
844
1221
  } catch (e) {
845
- config$1 = e;
1222
+ config = e;
846
1223
  }
847
- if (config$1 instanceof Error) {
848
- error = config$1;
1224
+ if (config instanceof Error) {
1225
+ error = config;
849
1226
  return;
850
1227
  }
851
- } else config$1 = mixin.require(resolvedConfigPath);
852
- setConfigObject(config$1);
1228
+ } else config = mixin.require(resolvedConfigPath);
1229
+ setConfigObject(config);
853
1230
  } catch (ex) {
854
1231
  if (ex.name === "PermissionDenied") error = ex;
855
1232
  else if (argv$1[configKey]) error = Error(__("Invalid JSON config file: %s", configPath));
856
1233
  }
857
1234
  });
858
1235
  }
859
- function setConfigObject(config$1, prev) {
860
- Object.keys(config$1).forEach(function(key) {
861
- const value = config$1[key];
1236
+ function setConfigObject(config, prev) {
1237
+ Object.keys(config).forEach(function(key) {
1238
+ const value = config[key];
862
1239
  const fullKey = prev ? prev + "." + key : key;
863
1240
  if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) setConfigObject(value, fullKey);
864
1241
  else if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) setArg(fullKey, value);
@@ -1381,8 +1758,8 @@ var esm_default = {
1381
1758
  nextTick: process.nextTick,
1382
1759
  stdColumns: typeof process.stdout.columns !== "undefined" ? process.stdout.columns : null
1383
1760
  },
1384
- readFileSync: readFileSync$1,
1385
- readdirSync: readdirSync$1,
1761
+ readFileSync,
1762
+ readdirSync,
1386
1763
  require,
1387
1764
  getCallerFile: () => {
1388
1765
  const callerFile = (0, import_get_caller_file.default)(3);
@@ -1868,8 +2245,8 @@ var CommandInstance = class {
1868
2245
  });
1869
2246
  });
1870
2247
  if (!unparsed.length) return;
1871
- const config$1 = Object.assign({}, options.configuration, { "populate--": false });
1872
- const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { configuration: config$1 }));
2248
+ const config = Object.assign({}, options.configuration, { "populate--": false });
2249
+ const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { configuration: config }));
1873
2250
  if (parsed.error) yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
1874
2251
  else {
1875
2252
  const positionalKeys = Object.keys(positionalMap);
@@ -2912,27 +3289,27 @@ function validation(yargs, usage$1, shim$2) {
2912
3289
  //#region node_modules/yargs/build/lib/utils/apply-extends.js
2913
3290
  let previouslyVisitedConfigs = [];
2914
3291
  let shim;
2915
- function applyExtends(config$1, cwd, mergeExtends, _shim) {
3292
+ function applyExtends(config, cwd, mergeExtends, _shim) {
2916
3293
  shim = _shim;
2917
3294
  let defaultConfig = {};
2918
- if (Object.prototype.hasOwnProperty.call(config$1, "extends")) {
2919
- if (typeof config$1.extends !== "string") return defaultConfig;
2920
- const isPath = /\.json|\..*rc$/.test(config$1.extends);
3295
+ if (Object.prototype.hasOwnProperty.call(config, "extends")) {
3296
+ if (typeof config.extends !== "string") return defaultConfig;
3297
+ const isPath = /\.json|\..*rc$/.test(config.extends);
2921
3298
  let pathToDefault = null;
2922
3299
  if (!isPath) try {
2923
- pathToDefault = import.meta.resolve(config$1.extends);
3300
+ pathToDefault = import.meta.resolve(config.extends);
2924
3301
  } catch (_err) {
2925
- return config$1;
3302
+ return config;
2926
3303
  }
2927
- else pathToDefault = getPathToDefaultConfig(cwd, config$1.extends);
3304
+ else pathToDefault = getPathToDefaultConfig(cwd, config.extends);
2928
3305
  checkForCircularExtends(pathToDefault);
2929
3306
  previouslyVisitedConfigs.push(pathToDefault);
2930
- defaultConfig = isPath ? JSON.parse(shim.readFileSync(pathToDefault, "utf8")) : _shim.require(config$1.extends);
2931
- delete config$1.extends;
3307
+ defaultConfig = isPath ? JSON.parse(shim.readFileSync(pathToDefault, "utf8")) : _shim.require(config.extends);
3308
+ delete config.extends;
2932
3309
  defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim);
2933
3310
  }
2934
3311
  previouslyVisitedConfigs = [];
2935
- return mergeExtends ? mergeDeep(defaultConfig, config$1) : Object.assign({}, defaultConfig, config$1);
3312
+ return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config);
2936
3313
  }
2937
3314
  function checkForCircularExtends(cfgPath) {
2938
3315
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) throw new YError(`Circular extended configurations: '${cfgPath}'.`);
@@ -3589,9 +3966,9 @@ var YargsInstance = class {
3589
3966
  if (isPromise(maybePromise)) throw new YError(".parseSync() must not be used with asynchronous builders, handlers, or middleware");
3590
3967
  return maybePromise;
3591
3968
  }
3592
- parserConfiguration(config$1) {
3593
- argsert("<object>", [config$1], arguments.length);
3594
- __classPrivateFieldSet(this, _YargsInstance_parserConfig, config$1, "f");
3969
+ parserConfiguration(config) {
3970
+ argsert("<object>", [config], arguments.length);
3971
+ __classPrivateFieldSet(this, _YargsInstance_parserConfig, config, "f");
3595
3972
  return this;
3596
3973
  }
3597
3974
  pkgConf(key, rootPath) {
@@ -3761,9 +4138,9 @@ var YargsInstance = class {
3761
4138
  return this;
3762
4139
  }
3763
4140
  }
3764
- usageConfiguration(config$1) {
3765
- argsert("<object>", [config$1], arguments.length);
3766
- __classPrivateFieldSet(this, _YargsInstance_usageConfig, config$1, "f");
4141
+ usageConfiguration(config) {
4142
+ argsert("<object>", [config], arguments.length);
4143
+ __classPrivateFieldSet(this, _YargsInstance_usageConfig, config, "f");
3767
4144
  return this;
3768
4145
  }
3769
4146
  version(opt, msg, ver) {
@@ -4110,10 +4487,10 @@ var YargsInstance = class {
4110
4487
  __classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
4111
4488
  __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
4112
4489
  const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
4113
- const config$1 = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { "populate--": true });
4490
+ const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, { "populate--": true });
4114
4491
  const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), { configuration: {
4115
4492
  "parse-positional-numbers": false,
4116
- ...config$1
4493
+ ...config
4117
4494
  } }));
4118
4495
  const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
4119
4496
  let argvPromise = void 0;
@@ -4248,11 +4625,11 @@ var yargs_default = Yargs;
4248
4625
  const validateConfigs = (configs) => {
4249
4626
  const errors = [];
4250
4627
  if (configs.length === 0) errors.push("config array is empty");
4251
- configs.forEach((config$1, i) => {
4628
+ configs.forEach((config, i) => {
4252
4629
  const whichConfig = configs.length === 1 ? "the config" : `config #${i + 1}`;
4253
- if (!config$1.endpoint && !config$1.schema) errors.push(`you didn't provide either \`endpoint\`, \`schema\` or \`fetcher\` option in ${whichConfig}`);
4254
- if ([config$1.endpoint, config$1.schema].filter((i$1) => i$1).length > 1) errors.push(`you provided two or more conflicting options in ${whichConfig}, only one of either \`endpoint\`, \`schema\` or \`fetcher\` is allowed`);
4255
- if (!config$1.output) errors.push(`you didn't provide an \`output\` option in ${whichConfig}`);
4630
+ if (!config.endpoint && !config.schema) errors.push(`you didn't provide either \`endpoint\`, \`schema\` or \`fetcher\` option in ${whichConfig}`);
4631
+ if ([config.endpoint, config.schema].filter((i$1) => i$1).length > 1) errors.push(`you provided two or more conflicting options in ${whichConfig}, only one of either \`endpoint\`, \`schema\` or \`fetcher\` is allowed`);
4632
+ if (!config.output) errors.push(`you didn't provide an \`output\` option in ${whichConfig}`);
4256
4633
  });
4257
4634
  errors.forEach((error) => console.log(kleur_default.red(`Error: ${error}`)));
4258
4635
  return errors.length === 0;
@@ -4276,78 +4653,64 @@ function parseColonSeparatedStrings(array = []) {
4276
4653
 
4277
4654
  //#endregion
4278
4655
  //#region src/cli.ts
4279
- const program = yargs_default(process.argv.slice(2)).option("output", {
4280
- alias: "o",
4281
- description: "Output directory",
4282
- required: true,
4283
- type: "string"
4284
- }).option("endpoint", {
4285
- alias: "e",
4286
- description: "Graphql endpoint",
4287
- type: "string"
4288
- }).option("get", {
4289
- alias: "g",
4290
- description: "use GET for introspection query",
4291
- type: "boolean"
4292
- }).option("schema", {
4293
- alias: "s",
4294
- type: "string",
4295
- description: "path to GraphQL schema definition file"
4296
- }).option("header", {
4297
- alias: "H",
4298
- type: "array",
4299
- string: true,
4300
- description: "header to use in introspection query"
4301
- }).option("scalar", {
4302
- alias: "S",
4303
- type: "array",
4304
- string: true,
4305
- description: "map a scalar to a type, for example `-S DateTime:string` "
4306
- }).option("sort", {
4307
- type: "boolean",
4308
- default: false,
4309
- description: "sort object properties to not create diffs after generations"
4310
- }).option("verbose", {
4311
- alias: "v",
4312
- type: "boolean",
4313
- default: false
4314
- }).example("$0 --output ./generated --endpoint http://localhost:3000 -H \"Authorization: Bearer xxx\"", "generate the client from an endpoint").example("$0 --output ./generated --schema ./schema.graphql", "generate the client from a schema").option("esm", {
4315
- type: "boolean",
4316
- hidden: true,
4317
- deprecate: "No longer used",
4318
- default: false,
4319
- description: ""
4320
- }).option("esm-and-cjs", {
4321
- type: "boolean",
4322
- hidden: true,
4323
- deprecated: true,
4324
- deprecate: "No longer used",
4325
- default: false,
4326
- description: ""
4327
- }).help("help").help("h").argv;
4328
- const config = {
4329
- endpoint: program.endpoint,
4330
- useGet: program.get,
4331
- schema: program.schema && readFile(program.schema),
4332
- output: program.output,
4333
- headers: parseColonSeparatedStrings(program.header || []),
4334
- scalarTypes: parseColonSeparatedStrings(program.scalar || []),
4335
- verbose: program.verbose,
4336
- sortProperties: program.sort
4337
- };
4338
- if (!validateConfigs([config])) process.exit(1);
4339
- generate(config).catch((e) => {
4340
- console.error(kleur_default.red("Cannot generate, got an error:"));
4341
- console.error(e);
4342
- process.exit(1);
4343
- }).then(() => {
4344
- printHelp({ dirPath: program.output });
4345
- });
4346
- function printHelp({ dirPath }) {
4347
- console.log();
4348
- console.log(`${kleur_default.green("Success!")} Generated client code inside '${dirPath}'`);
4349
- console.log();
4350
- console.log();
4656
+ async function main() {
4657
+ const program = await yargs_default(process.argv.slice(2)).option("output", {
4658
+ alias: "o",
4659
+ description: "Output directory",
4660
+ required: true,
4661
+ type: "string"
4662
+ }).option("endpoint", {
4663
+ alias: "e",
4664
+ description: "Graphql endpoint",
4665
+ type: "string"
4666
+ }).option("get", {
4667
+ alias: "g",
4668
+ description: "use GET for introspection query",
4669
+ type: "boolean"
4670
+ }).option("schema", {
4671
+ alias: "s",
4672
+ type: "string",
4673
+ description: "path to GraphQL schema definition file"
4674
+ }).option("header", {
4675
+ alias: "H",
4676
+ type: "array",
4677
+ string: true,
4678
+ description: "header to use in introspection query"
4679
+ }).option("scalar", {
4680
+ alias: "S",
4681
+ type: "array",
4682
+ string: true,
4683
+ description: "map a scalar to a type, for example `-S DateTime:string` "
4684
+ }).option("sort", {
4685
+ type: "boolean",
4686
+ default: false,
4687
+ description: "sort object properties to not create diffs after generations"
4688
+ }).option("verbose", {
4689
+ alias: "v",
4690
+ type: "boolean",
4691
+ default: false
4692
+ }).example("$0 --output ./generated --endpoint http://localhost:3000 -H \"Authorization: Bearer xxx\"", "generate the client from an endpoint").example("$0 --output ./generated --schema ./schema.graphql", "generate the client from a schema").help().parse();
4693
+ const config = {
4694
+ endpoint: program.endpoint,
4695
+ useGet: program.get,
4696
+ schema: program.schema && readFile(program.schema),
4697
+ output: program.output,
4698
+ headers: parseColonSeparatedStrings(program.header || []),
4699
+ scalarTypes: parseColonSeparatedStrings(program.scalar || []),
4700
+ verbose: program.verbose,
4701
+ sortProperties: program.sort
4702
+ };
4703
+ if (!validateConfigs([config])) process.exit(1);
4704
+ try {
4705
+ await generate(config);
4706
+ console.info();
4707
+ console.info(`${kleur_default.green("Success!")} Generated client code inside '${program.output}'`);
4708
+ console.info();
4709
+ } catch (e) {
4710
+ console.error(kleur_default.red("Cannot generate, got an error:"));
4711
+ console.error(e);
4712
+ process.exit(1);
4713
+ }
4351
4714
  }
4352
4715
  function readFile(p) {
4353
4716
  if (!existsSync(p)) {
@@ -4356,6 +4719,7 @@ function readFile(p) {
4356
4719
  }
4357
4720
  return readFileSync(p).toString();
4358
4721
  }
4722
+ main();
4359
4723
 
4360
4724
  //#endregion
4361
- export { printHelp };
4725
+ export { isWide as i, eastAsianWidth as n, isFullWidth as r, wrapAnsi as t };