create-rstack 1.4.0 → 1.4.2
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.d.ts +1 -0
- package/dist/index.js +273 -270
- package/package.json +8 -8
- package/template-eslint/react-js/package.json +4 -4
- package/template-eslint/react-ts/package.json +5 -5
- package/template-eslint/svelte-js/package.json +3 -3
- package/template-eslint/svelte-ts/package.json +4 -4
- package/template-eslint/vanilla-js/package.json +2 -2
- package/template-eslint/vanilla-ts/package.json +3 -3
- package/template-eslint/vue-js/package.json +3 -3
- package/template-eslint/vue-ts/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__ from "node:readline";
|
|
9
|
-
import * as
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_stream_444d1c2b__ from "node:stream";
|
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_process__ from "process";
|
|
11
11
|
import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
|
|
12
12
|
import * as __WEBPACK_EXTERNAL_MODULE_tty__ from "tty";
|
|
@@ -427,78 +427,78 @@ function __webpack_require__(moduleId) {
|
|
|
427
427
|
var src = __webpack_require__("./node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js");
|
|
428
428
|
var picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
429
429
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
430
|
-
function
|
|
431
|
-
const
|
|
432
|
-
return new RegExp(
|
|
430
|
+
function DD({ onlyFirst: e = !1 } = {}) {
|
|
431
|
+
const t = "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))";
|
|
432
|
+
return new RegExp(t, e ? void 0 : "g");
|
|
433
433
|
}
|
|
434
|
-
const
|
|
435
|
-
function
|
|
436
|
-
if ("string" != typeof
|
|
437
|
-
return
|
|
434
|
+
const uD = DD();
|
|
435
|
+
function P(e) {
|
|
436
|
+
if ("string" != typeof e) throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);
|
|
437
|
+
return e.replace(uD, "");
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
return
|
|
439
|
+
function L(e) {
|
|
440
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
441
441
|
}
|
|
442
|
-
var
|
|
442
|
+
var W = {
|
|
443
443
|
exports: {}
|
|
444
444
|
};
|
|
445
|
-
(function(
|
|
445
|
+
(function(e) {
|
|
446
446
|
var u = {};
|
|
447
|
-
|
|
448
|
-
var s =
|
|
447
|
+
e.exports = u, u.eastAsianWidth = function(F) {
|
|
448
|
+
var s = F.charCodeAt(0), i = 2 == F.length ? F.charCodeAt(1) : 0, D = s;
|
|
449
449
|
return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), 12288 == D || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : 8361 == D || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || 172 == D || 175 == D || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : 161 == D || 164 == D || 167 <= D && D <= 168 || 170 == D || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || 198 == D || 208 == D || 215 <= D && D <= 216 || 222 <= D && D <= 225 || 230 == D || 232 <= D && D <= 234 || 236 <= D && D <= 237 || 240 == D || 242 <= D && D <= 243 || 247 <= D && D <= 250 || 252 == D || 254 == D || 257 == D || 273 == D || 275 == D || 283 == D || 294 <= D && D <= 295 || 299 == D || 305 <= D && D <= 307 || 312 == D || 319 <= D && D <= 322 || 324 == D || 328 <= D && D <= 331 || 333 == D || 338 <= D && D <= 339 || 358 <= D && D <= 359 || 363 == D || 462 == D || 464 == D || 466 == D || 468 == D || 470 == D || 472 == D || 474 == D || 476 == D || 593 == D || 609 == D || 708 == D || 711 == D || 713 <= D && D <= 715 || 717 == D || 720 == D || 728 <= D && D <= 731 || 733 == D || 735 == D || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || 1025 == D || 1040 <= D && D <= 1103 || 1105 == D || 8208 == D || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || 8240 == D || 8242 <= D && D <= 8243 || 8245 == D || 8251 == D || 8254 == D || 8308 == D || 8319 == D || 8321 <= D && D <= 8324 || 8364 == D || 8451 == D || 8453 == D || 8457 == D || 8467 == D || 8470 == D || 8481 <= D && D <= 8482 || 8486 == D || 8491 == D || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || 8585 == D || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || 8658 == D || 8660 == D || 8679 == D || 8704 == D || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || 8715 == D || 8719 == D || 8721 == D || 8725 == D || 8730 == D || 8733 <= D && D <= 8736 || 8739 == D || 8741 == D || 8743 <= D && D <= 8748 || 8750 == D || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || 8776 == D || 8780 == D || 8786 == D || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || 8853 == D || 8857 == D || 8869 == D || 8895 == D || 8978 == D || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || 9675 == D || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || 9711 == D || 9733 <= D && D <= 9734 || 9737 == D || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || 9756 == D || 9758 == D || 9792 == D || 9794 == D || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || 9839 == D || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || 9955 == D || 9960 <= D && D <= 9983 || 10045 == D || 10071 == D || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || 65533 == D || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
450
|
-
}, u.characterLength = function(
|
|
451
|
-
var s = this.eastAsianWidth(
|
|
450
|
+
}, u.characterLength = function(F) {
|
|
451
|
+
var s = this.eastAsianWidth(F);
|
|
452
452
|
return "F" == s || "W" == s || "A" == s ? 2 : 1;
|
|
453
453
|
};
|
|
454
|
-
function F
|
|
455
|
-
return
|
|
454
|
+
function t(F) {
|
|
455
|
+
return F.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
456
456
|
}
|
|
457
|
-
u.length = function(
|
|
458
|
-
for(var s = F
|
|
457
|
+
u.length = function(F) {
|
|
458
|
+
for(var s = t(F), i = 0, D = 0; D < s.length; D++)i += this.characterLength(s[D]);
|
|
459
459
|
return i;
|
|
460
|
-
}, u.slice = function(
|
|
461
|
-
textLen = u.length(
|
|
462
|
-
for(var D = "",
|
|
463
|
-
var a =
|
|
464
|
-
if (
|
|
460
|
+
}, u.slice = function(F, s, i) {
|
|
461
|
+
textLen = u.length(F), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
|
|
462
|
+
for(var D = "", r = 0, n = t(F), E = 0; E < n.length; E++){
|
|
463
|
+
var a = n[E], o = u.length(a);
|
|
464
|
+
if (r >= s - (2 == o ? 1 : 0)) if (r + o <= i) D += a;
|
|
465
465
|
else break;
|
|
466
|
-
|
|
466
|
+
r += o;
|
|
467
467
|
}
|
|
468
468
|
return D;
|
|
469
469
|
};
|
|
470
|
-
})(
|
|
471
|
-
var
|
|
472
|
-
const
|
|
473
|
-
var
|
|
470
|
+
})(W);
|
|
471
|
+
var tD = W.exports;
|
|
472
|
+
const eD = L(tD);
|
|
473
|
+
var FD = function() {
|
|
474
474
|
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
475
475
|
};
|
|
476
|
-
const
|
|
477
|
-
function
|
|
478
|
-
if ("string" != typeof
|
|
476
|
+
const sD = L(FD);
|
|
477
|
+
function dist_p(e, u = {}) {
|
|
478
|
+
if ("string" != typeof e || 0 === e.length || (u = {
|
|
479
479
|
ambiguousIsNarrow: !0,
|
|
480
480
|
...u
|
|
481
|
-
},
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
let
|
|
485
|
-
for (const s of
|
|
481
|
+
}, e = P(e), 0 === e.length)) return 0;
|
|
482
|
+
e = e.replace(sD(), " ");
|
|
483
|
+
const t = u.ambiguousIsNarrow ? 1 : 2;
|
|
484
|
+
let F = 0;
|
|
485
|
+
for (const s of e){
|
|
486
486
|
const i = s.codePointAt(0);
|
|
487
|
-
if (!(i <= 31) && (!(i >= 127) || !(i <= 159)) && (!(i >= 768) || !(i <= 879))) switch(
|
|
487
|
+
if (!(i <= 31) && (!(i >= 127) || !(i <= 159)) && (!(i >= 768) || !(i <= 879))) switch(eD.eastAsianWidth(s)){
|
|
488
488
|
case "F":
|
|
489
489
|
case "W":
|
|
490
|
-
|
|
490
|
+
F += 2;
|
|
491
491
|
break;
|
|
492
492
|
case "A":
|
|
493
|
-
|
|
493
|
+
F += t;
|
|
494
494
|
break;
|
|
495
495
|
default:
|
|
496
|
-
|
|
496
|
+
F += 1;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
return
|
|
499
|
+
return F;
|
|
500
500
|
}
|
|
501
|
-
const
|
|
501
|
+
const dist_w = 10, dist_N = (e = 0)=>(u)=>`\x1B[${u + e}m`, dist_I = (e = 0)=>(u)=>`\x1B[${38 + e};5;${u}m`, dist_R = (e = 0)=>(u, t, F)=>`\x1B[${38 + e};2;${u};${t};${F}m`, C = {
|
|
502
502
|
modifier: {
|
|
503
503
|
reset: [
|
|
504
504
|
0,
|
|
@@ -686,45 +686,45 @@ const dist_m = 10, L = (t = 0)=>(u)=>`\x1B[${u + t}m`, dist_N = (t = 0)=>(u)=>`\
|
|
|
686
686
|
]
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
-
Object.keys(
|
|
690
|
-
const
|
|
689
|
+
Object.keys(C.modifier);
|
|
690
|
+
const iD = Object.keys(C.color), rD = Object.keys(C.bgColor);
|
|
691
691
|
[
|
|
692
|
-
...
|
|
693
|
-
...
|
|
692
|
+
...iD,
|
|
693
|
+
...rD
|
|
694
694
|
];
|
|
695
|
-
function
|
|
696
|
-
const
|
|
697
|
-
for (const [u,
|
|
698
|
-
for (const [
|
|
695
|
+
function CD() {
|
|
696
|
+
const e = new Map;
|
|
697
|
+
for (const [u, t] of Object.entries(C)){
|
|
698
|
+
for (const [F, s] of Object.entries(t))C[F] = {
|
|
699
699
|
open: `\x1B[${s[0]}m`,
|
|
700
700
|
close: `\x1B[${s[1]}m`
|
|
701
|
-
}, F
|
|
702
|
-
Object.defineProperty(
|
|
703
|
-
value:
|
|
701
|
+
}, t[F] = C[F], e.set(s[0], s[1]);
|
|
702
|
+
Object.defineProperty(C, u, {
|
|
703
|
+
value: t,
|
|
704
704
|
enumerable: !1
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
|
-
return Object.defineProperty(
|
|
708
|
-
value:
|
|
707
|
+
return Object.defineProperty(C, "codes", {
|
|
708
|
+
value: e,
|
|
709
709
|
enumerable: !1
|
|
710
|
-
}),
|
|
710
|
+
}), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = dist_N(), C.color.ansi256 = dist_I(), C.color.ansi16m = dist_R(), C.bgColor.ansi = dist_N(dist_w), C.bgColor.ansi256 = dist_I(dist_w), C.bgColor.ansi16m = dist_R(dist_w), Object.defineProperties(C, {
|
|
711
711
|
rgbToAnsi256: {
|
|
712
|
-
value: (u,
|
|
712
|
+
value: (u, t, F)=>u === t && t === F ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(F / 255 * 5),
|
|
713
713
|
enumerable: !1
|
|
714
714
|
},
|
|
715
715
|
hexToRgb: {
|
|
716
716
|
value: (u)=>{
|
|
717
|
-
const
|
|
718
|
-
if (!
|
|
717
|
+
const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
|
|
718
|
+
if (!t) return [
|
|
719
719
|
0,
|
|
720
720
|
0,
|
|
721
721
|
0
|
|
722
722
|
];
|
|
723
|
-
let [
|
|
724
|
-
3 ===
|
|
725
|
-
...
|
|
723
|
+
let [F] = t;
|
|
724
|
+
3 === F.length && (F = [
|
|
725
|
+
...F
|
|
726
726
|
].map((i)=>i + i).join(""));
|
|
727
|
-
const s = Number.parseInt(
|
|
727
|
+
const s = Number.parseInt(F, 16);
|
|
728
728
|
return [
|
|
729
729
|
s >> 16 & 255,
|
|
730
730
|
s >> 8 & 255,
|
|
@@ -734,116 +734,116 @@ function sD() {
|
|
|
734
734
|
enumerable: !1
|
|
735
735
|
},
|
|
736
736
|
hexToAnsi256: {
|
|
737
|
-
value: (u)=>
|
|
737
|
+
value: (u)=>C.rgbToAnsi256(...C.hexToRgb(u)),
|
|
738
738
|
enumerable: !1
|
|
739
739
|
},
|
|
740
740
|
ansi256ToAnsi: {
|
|
741
741
|
value: (u)=>{
|
|
742
742
|
if (u < 8) return 30 + u;
|
|
743
743
|
if (u < 16) return 90 + (u - 8);
|
|
744
|
-
let
|
|
745
|
-
if (u >= 232)
|
|
744
|
+
let t, F, s;
|
|
745
|
+
if (u >= 232) t = ((u - 232) * 10 + 8) / 255, F = t, s = t;
|
|
746
746
|
else {
|
|
747
747
|
u -= 16;
|
|
748
|
-
const
|
|
749
|
-
|
|
748
|
+
const r = u % 36;
|
|
749
|
+
t = Math.floor(u / 36) / 5, F = Math.floor(r / 6) / 5, s = r % 6 / 5;
|
|
750
750
|
}
|
|
751
|
-
const i = 2 * Math.max(
|
|
751
|
+
const i = 2 * Math.max(t, F, s);
|
|
752
752
|
if (0 === i) return 30;
|
|
753
|
-
let D = 30 + (Math.round(s) << 2 | Math.round(
|
|
753
|
+
let D = 30 + (Math.round(s) << 2 | Math.round(F) << 1 | Math.round(t));
|
|
754
754
|
return 2 === i && (D += 60), D;
|
|
755
755
|
},
|
|
756
756
|
enumerable: !1
|
|
757
757
|
},
|
|
758
758
|
rgbToAnsi: {
|
|
759
|
-
value: (u,
|
|
759
|
+
value: (u, t, F)=>C.ansi256ToAnsi(C.rgbToAnsi256(u, t, F)),
|
|
760
760
|
enumerable: !1
|
|
761
761
|
},
|
|
762
762
|
hexToAnsi: {
|
|
763
|
-
value: (u)=>
|
|
763
|
+
value: (u)=>C.ansi256ToAnsi(C.hexToAnsi256(u)),
|
|
764
764
|
enumerable: !1
|
|
765
765
|
}
|
|
766
|
-
}),
|
|
766
|
+
}), C;
|
|
767
767
|
}
|
|
768
|
-
const
|
|
768
|
+
const ED = CD(), d = new Set([
|
|
769
769
|
"\x1B",
|
|
770
770
|
"\x9B"
|
|
771
|
-
]),
|
|
772
|
-
const
|
|
771
|
+
]), oD = 39, y = "\x07", V = "[", nD = "]", G = "m", _ = `${nD}8;;`, dist_z = (e)=>`${d.values().next().value}${V}${e}${G}`, K = (e)=>`${d.values().next().value}${_}${e}${y}`, aD = (e)=>e.split(" ").map((u)=>dist_p(u)), k = (e, u, t)=>{
|
|
772
|
+
const F = [
|
|
773
773
|
...u
|
|
774
774
|
];
|
|
775
|
-
let s = !1, i = !1, D =
|
|
776
|
-
for (const [
|
|
777
|
-
const E =
|
|
778
|
-
if (D + E <=
|
|
779
|
-
i ?
|
|
775
|
+
let s = !1, i = !1, D = dist_p(P(e[e.length - 1]));
|
|
776
|
+
for (const [r, n] of F.entries()){
|
|
777
|
+
const E = dist_p(n);
|
|
778
|
+
if (D + E <= t ? e[e.length - 1] += n : (e.push(n), D = 0), d.has(n) && (s = !0, i = F.slice(r + 1).join("").startsWith(_)), s) {
|
|
779
|
+
i ? n === y && (s = !1, i = !1) : n === G && (s = !1);
|
|
780
780
|
continue;
|
|
781
781
|
}
|
|
782
|
-
D += E, D ===
|
|
782
|
+
D += E, D === t && r < F.length - 1 && (e.push(""), D = 0);
|
|
783
783
|
}
|
|
784
|
-
!D &&
|
|
785
|
-
},
|
|
786
|
-
const u =
|
|
787
|
-
let
|
|
788
|
-
for(;
|
|
789
|
-
return
|
|
790
|
-
},
|
|
791
|
-
if (!1 !==
|
|
792
|
-
let
|
|
793
|
-
const D =
|
|
794
|
-
let
|
|
784
|
+
!D && e[e.length - 1].length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
785
|
+
}, hD = (e)=>{
|
|
786
|
+
const u = e.split(" ");
|
|
787
|
+
let t = u.length;
|
|
788
|
+
for(; t > 0 && !(dist_p(u[t - 1]) > 0);)t--;
|
|
789
|
+
return t === u.length ? e : u.slice(0, t).join(" ") + u.slice(t).join("");
|
|
790
|
+
}, lD = (e, u, t = {})=>{
|
|
791
|
+
if (!1 !== t.trim && "" === e.trim()) return "";
|
|
792
|
+
let F = "", s, i;
|
|
793
|
+
const D = aD(e);
|
|
794
|
+
let r = [
|
|
795
795
|
""
|
|
796
796
|
];
|
|
797
|
-
for (const [E, a] of
|
|
798
|
-
!1 !==
|
|
799
|
-
let
|
|
800
|
-
if (0 !== E && (
|
|
801
|
-
const
|
|
802
|
-
Math.floor((D[E] - 1) / u) <
|
|
797
|
+
for (const [E, a] of e.split(" ").entries()){
|
|
798
|
+
!1 !== t.trim && (r[r.length - 1] = r[r.length - 1].trimStart());
|
|
799
|
+
let o = dist_p(r[r.length - 1]);
|
|
800
|
+
if (0 !== E && (o >= u && (!1 === t.wordWrap || !1 === t.trim) && (r.push(""), o = 0), (o > 0 || !1 === t.trim) && (r[r.length - 1] += " ", o++)), t.hard && D[E] > u) {
|
|
801
|
+
const c = u - o, f = 1 + Math.floor((D[E] - c - 1) / u);
|
|
802
|
+
Math.floor((D[E] - 1) / u) < f && r.push(""), k(r, a, u);
|
|
803
803
|
continue;
|
|
804
804
|
}
|
|
805
|
-
if (
|
|
806
|
-
if (!1 ===
|
|
807
|
-
|
|
805
|
+
if (o + D[E] > u && o > 0 && D[E] > 0) {
|
|
806
|
+
if (!1 === t.wordWrap && o < u) {
|
|
807
|
+
k(r, a, u);
|
|
808
808
|
continue;
|
|
809
809
|
}
|
|
810
|
-
|
|
810
|
+
r.push("");
|
|
811
811
|
}
|
|
812
|
-
if (
|
|
813
|
-
|
|
812
|
+
if (o + D[E] > u && !1 === t.wordWrap) {
|
|
813
|
+
k(r, a, u);
|
|
814
814
|
continue;
|
|
815
815
|
}
|
|
816
|
-
|
|
816
|
+
r[r.length - 1] += a;
|
|
817
817
|
}
|
|
818
|
-
!1 !==
|
|
819
|
-
const
|
|
820
|
-
...
|
|
818
|
+
!1 !== t.trim && (r = r.map((E)=>hD(E)));
|
|
819
|
+
const n = [
|
|
820
|
+
...r.join(`
|
|
821
821
|
`)
|
|
822
822
|
];
|
|
823
|
-
for (const [E, a] of
|
|
824
|
-
if (
|
|
825
|
-
const { groups:
|
|
823
|
+
for (const [E, a] of n.entries()){
|
|
824
|
+
if (F += a, d.has(a)) {
|
|
825
|
+
const { groups: c } = new RegExp(`(?:\\${V}(?<code>\\d+)m|\\${_}(?<uri>.*)${y})`).exec(n.slice(E).join("")) || {
|
|
826
826
|
groups: {}
|
|
827
827
|
};
|
|
828
|
-
if (void 0 !==
|
|
829
|
-
const
|
|
830
|
-
s =
|
|
831
|
-
} else void 0 !==
|
|
828
|
+
if (void 0 !== c.code) {
|
|
829
|
+
const f = Number.parseFloat(c.code);
|
|
830
|
+
s = f === oD ? void 0 : f;
|
|
831
|
+
} else void 0 !== c.uri && (i = 0 === c.uri.length ? void 0 : c.uri);
|
|
832
832
|
}
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
` ? (i && (
|
|
836
|
-
` && (s &&
|
|
833
|
+
const o = ED.codes.get(Number(s));
|
|
834
|
+
n[E + 1] === `
|
|
835
|
+
` ? (i && (F += K("")), s && o && (F += dist_z(o))) : a === `
|
|
836
|
+
` && (s && o && (F += dist_z(s)), i && (F += K(i)));
|
|
837
837
|
}
|
|
838
|
-
return
|
|
838
|
+
return F;
|
|
839
839
|
};
|
|
840
|
-
function
|
|
841
|
-
return String(
|
|
840
|
+
function Y(e, u, t) {
|
|
841
|
+
return String(e).normalize().replace(/\r\n/g, `
|
|
842
842
|
`).split(`
|
|
843
|
-
`).map((
|
|
843
|
+
`).map((F)=>lD(F, u, t)).join(`
|
|
844
844
|
`);
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const xD = [
|
|
847
847
|
"up",
|
|
848
848
|
"down",
|
|
849
849
|
"left",
|
|
@@ -851,8 +851,8 @@ const aD = [
|
|
|
851
851
|
"space",
|
|
852
852
|
"enter",
|
|
853
853
|
"cancel"
|
|
854
|
-
],
|
|
855
|
-
actions: new Set(
|
|
854
|
+
], dist_B = {
|
|
855
|
+
actions: new Set(xD),
|
|
856
856
|
aliases: new Map([
|
|
857
857
|
[
|
|
858
858
|
"k",
|
|
@@ -880,65 +880,65 @@ const aD = [
|
|
|
880
880
|
]
|
|
881
881
|
])
|
|
882
882
|
};
|
|
883
|
-
function
|
|
884
|
-
if ("string" == typeof
|
|
885
|
-
for (const
|
|
883
|
+
function dist_$(e, u) {
|
|
884
|
+
if ("string" == typeof e) return dist_B.aliases.get(e) === u;
|
|
885
|
+
for (const t of e)if (void 0 !== t && dist_$(t, u)) return !0;
|
|
886
886
|
return !1;
|
|
887
887
|
}
|
|
888
|
-
function
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
`),
|
|
888
|
+
function BD(e, u) {
|
|
889
|
+
if (e === u) return;
|
|
890
|
+
const t = e.split(`
|
|
891
|
+
`), F = u.split(`
|
|
892
892
|
`), s = [];
|
|
893
|
-
for(let i = 0; i < Math.max(
|
|
893
|
+
for(let i = 0; i < Math.max(t.length, F.length); i++)t[i] !== F[i] && s.push(i);
|
|
894
894
|
return s;
|
|
895
895
|
}
|
|
896
896
|
globalThis.process.platform.startsWith("win");
|
|
897
897
|
const dist_S = Symbol("clack:cancel");
|
|
898
|
-
function
|
|
899
|
-
return
|
|
898
|
+
function pD(e) {
|
|
899
|
+
return e === dist_S;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
902
|
-
const
|
|
903
|
-
|
|
901
|
+
function dist_m(e, u) {
|
|
902
|
+
const t = e;
|
|
903
|
+
t.isTTY && t.setRawMode(u);
|
|
904
904
|
}
|
|
905
|
-
var
|
|
905
|
+
var gD = Object.defineProperty, vD = (e, u, t)=>u in e ? gD(e, u, {
|
|
906
906
|
enumerable: !0,
|
|
907
907
|
configurable: !0,
|
|
908
908
|
writable: !0,
|
|
909
|
-
value:
|
|
910
|
-
}) :
|
|
911
|
-
class
|
|
912
|
-
constructor(u,
|
|
909
|
+
value: t
|
|
910
|
+
}) : e[u] = t, dist_h = (e, u, t)=>(vD(e, "symbol" != typeof u ? u + "" : u, t), t);
|
|
911
|
+
class x {
|
|
912
|
+
constructor(u, t = !0){
|
|
913
913
|
dist_h(this, "input"), dist_h(this, "output"), dist_h(this, "_abortSignal"), dist_h(this, "rl"), dist_h(this, "opts"), dist_h(this, "_render"), dist_h(this, "_track", !1), dist_h(this, "_prevFrame", ""), dist_h(this, "_subscribers", new Map), dist_h(this, "_cursor", 0), dist_h(this, "state", "initial"), dist_h(this, "error", ""), dist_h(this, "value");
|
|
914
|
-
const { input:
|
|
915
|
-
this.opts =
|
|
914
|
+
const { input: F = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdin, output: s = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdout, render: i, signal: D, ...r } = u;
|
|
915
|
+
this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = t, this._abortSignal = D, this.input = F, this.output = s;
|
|
916
916
|
}
|
|
917
917
|
unsubscribe() {
|
|
918
918
|
this._subscribers.clear();
|
|
919
919
|
}
|
|
920
|
-
setSubscriber(u,
|
|
921
|
-
const
|
|
922
|
-
|
|
920
|
+
setSubscriber(u, t) {
|
|
921
|
+
const F = this._subscribers.get(u) ?? [];
|
|
922
|
+
F.push(t), this._subscribers.set(u, F);
|
|
923
923
|
}
|
|
924
|
-
on(u,
|
|
924
|
+
on(u, t) {
|
|
925
925
|
this.setSubscriber(u, {
|
|
926
|
-
cb:
|
|
926
|
+
cb: t
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
|
-
once(u,
|
|
929
|
+
once(u, t) {
|
|
930
930
|
this.setSubscriber(u, {
|
|
931
|
-
cb:
|
|
931
|
+
cb: t,
|
|
932
932
|
once: !0
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
|
-
emit(u, ...
|
|
936
|
-
const
|
|
937
|
-
for (const i of
|
|
935
|
+
emit(u, ...t) {
|
|
936
|
+
const F = this._subscribers.get(u) ?? [], s = [];
|
|
937
|
+
for (const i of F)i.cb(...t), i.once && s.push(()=>F.splice(F.indexOf(i), 1));
|
|
938
938
|
for (const i of s)i();
|
|
939
939
|
}
|
|
940
940
|
prompt() {
|
|
941
|
-
return new Promise((u,
|
|
941
|
+
return new Promise((u, t)=>{
|
|
942
942
|
if (this._abortSignal) {
|
|
943
943
|
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u(dist_S);
|
|
944
944
|
this._abortSignal.addEventListener("abort", ()=>{
|
|
@@ -947,68 +947,69 @@ class dist_x {
|
|
|
947
947
|
once: !0
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
|
-
const
|
|
951
|
-
|
|
950
|
+
const F = new __WEBPACK_EXTERNAL_MODULE_node_stream_444d1c2b__.Writable;
|
|
951
|
+
F._write = (s, i, D)=>{
|
|
952
952
|
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
|
|
953
|
-
}, this.input.pipe(
|
|
953
|
+
}, this.input.pipe(F), this.rl = __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].createInterface({
|
|
954
954
|
input: this.input,
|
|
955
|
-
output:
|
|
955
|
+
output: F,
|
|
956
956
|
tabSize: 2,
|
|
957
957
|
prompt: "",
|
|
958
|
-
escapeCodeTimeout: 50
|
|
959
|
-
|
|
960
|
-
|
|
958
|
+
escapeCodeTimeout: 50,
|
|
959
|
+
terminal: !0
|
|
960
|
+
}), __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].emitKeypressEvents(this.input, this.rl), this.rl.prompt(), void 0 !== this.opts.initialValue && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), dist_m(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
|
|
961
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_m(this.input, !1), u(this.value);
|
|
961
962
|
}), this.once("cancel", ()=>{
|
|
962
|
-
this.output.write(src.cursor.show), this.output.off("resize", this.render),
|
|
963
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_m(this.input, !1), u(dist_S);
|
|
963
964
|
});
|
|
964
965
|
});
|
|
965
966
|
}
|
|
966
|
-
onKeypress(u,
|
|
967
|
-
if ("error" === this.state && (this.state = "active"),
|
|
968
|
-
if (this.opts.validate) {
|
|
969
|
-
const
|
|
970
|
-
|
|
967
|
+
onKeypress(u, t) {
|
|
968
|
+
if ("error" === this.state && (this.state = "active"), t?.name && (!this._track && dist_B.aliases.has(t.name) && this.emit("cursor", dist_B.aliases.get(t.name)), dist_B.actions.has(t.name) && this.emit("cursor", t.name)), u && ("y" === u.toLowerCase() || "n" === u.toLowerCase()) && this.emit("confirm", "y" === u.toLowerCase()), " " === u && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), t?.name === "return") {
|
|
969
|
+
if (!this.value && this.opts.placeholder && (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder)), this.opts.validate) {
|
|
970
|
+
const F = this.opts.validate(this.value);
|
|
971
|
+
F && (this.error = F instanceof Error ? F.message : F, this.state = "error", this.rl?.write(this.value));
|
|
971
972
|
}
|
|
972
973
|
"error" !== this.state && (this.state = "submit");
|
|
973
974
|
}
|
|
974
|
-
|
|
975
|
+
dist_$([
|
|
975
976
|
u,
|
|
976
|
-
|
|
977
|
-
|
|
977
|
+
t?.name,
|
|
978
|
+
t?.sequence
|
|
978
979
|
], "cancel") && (this.state = "cancel"), ("submit" === this.state || "cancel" === this.state) && this.emit("finalize"), this.render(), ("submit" === this.state || "cancel" === this.state) && this.close();
|
|
979
980
|
}
|
|
980
981
|
close() {
|
|
981
982
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
982
|
-
`),
|
|
983
|
+
`), dist_m(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
983
984
|
}
|
|
984
985
|
restoreCursor() {
|
|
985
|
-
const u =
|
|
986
|
+
const u = Y(this._prevFrame, process.stdout.columns, {
|
|
986
987
|
hard: !0
|
|
987
988
|
}).split(`
|
|
988
989
|
`).length - 1;
|
|
989
990
|
this.output.write(src.cursor.move(-999, -1 * u));
|
|
990
991
|
}
|
|
991
992
|
render() {
|
|
992
|
-
const u =
|
|
993
|
+
const u = Y(this._render(this) ?? "", process.stdout.columns, {
|
|
993
994
|
hard: !0
|
|
994
995
|
});
|
|
995
996
|
if (u !== this._prevFrame) {
|
|
996
997
|
if ("initial" === this.state) this.output.write(src.cursor.hide);
|
|
997
998
|
else {
|
|
998
|
-
const
|
|
999
|
-
if (this.restoreCursor(),
|
|
1000
|
-
const
|
|
1001
|
-
this.output.write(src.cursor.move(0,
|
|
999
|
+
const t = BD(this._prevFrame, u);
|
|
1000
|
+
if (this.restoreCursor(), t && t?.length === 1) {
|
|
1001
|
+
const F = t[0];
|
|
1002
|
+
this.output.write(src.cursor.move(0, F)), this.output.write(src.erase.lines(1));
|
|
1002
1003
|
const s = u.split(`
|
|
1003
1004
|
`);
|
|
1004
|
-
this.output.write(s[
|
|
1005
|
+
this.output.write(s[F]), this._prevFrame = u, this.output.write(src.cursor.move(0, s.length - F - 1));
|
|
1005
1006
|
return;
|
|
1006
1007
|
}
|
|
1007
|
-
if (
|
|
1008
|
-
const
|
|
1009
|
-
this.output.write(src.cursor.move(0,
|
|
1008
|
+
if (t && t?.length > 1) {
|
|
1009
|
+
const F = t[0];
|
|
1010
|
+
this.output.write(src.cursor.move(0, F)), this.output.write(src.erase.down());
|
|
1010
1011
|
const s = u.split(`
|
|
1011
|
-
`).slice(
|
|
1012
|
+
`).slice(F);
|
|
1012
1013
|
this.output.write(s.join(`
|
|
1013
1014
|
`)), this._prevFrame = u;
|
|
1014
1015
|
return;
|
|
@@ -1019,20 +1020,21 @@ class dist_x {
|
|
|
1019
1020
|
}
|
|
1020
1021
|
}
|
|
1021
1022
|
}
|
|
1022
|
-
|
|
1023
|
+
new WeakMap;
|
|
1024
|
+
var kD = Object.defineProperty, $D = (e, u, t)=>u in e ? kD(e, u, {
|
|
1023
1025
|
enumerable: !0,
|
|
1024
1026
|
configurable: !0,
|
|
1025
1027
|
writable: !0,
|
|
1026
|
-
value:
|
|
1027
|
-
}) :
|
|
1028
|
-
let
|
|
1028
|
+
value: t
|
|
1029
|
+
}) : e[u] = t, dist_H = (e, u, t)=>($D(e, "symbol" != typeof u ? u + "" : u, t), t);
|
|
1030
|
+
let SD = class extends x {
|
|
1029
1031
|
constructor(u){
|
|
1030
|
-
super(u, !1),
|
|
1032
|
+
super(u, !1), dist_H(this, "options"), dist_H(this, "cursor", 0), this.options = u.options, this.value = [
|
|
1031
1033
|
...u.initialValues ?? []
|
|
1032
|
-
], this.cursor = Math.max(this.options.findIndex(({ value:
|
|
1033
|
-
"a" ===
|
|
1034
|
-
}), this.on("cursor", (
|
|
1035
|
-
switch(
|
|
1034
|
+
], this.cursor = Math.max(this.options.findIndex(({ value: t })=>t === u.cursorAt), 0), this.on("key", (t)=>{
|
|
1035
|
+
"a" === t && this.toggleAll();
|
|
1036
|
+
}), this.on("cursor", (t)=>{
|
|
1037
|
+
switch(t){
|
|
1036
1038
|
case "left":
|
|
1037
1039
|
case "up":
|
|
1038
1040
|
this.cursor = 0 === this.cursor ? this.options.length - 1 : this.cursor - 1;
|
|
@@ -1052,26 +1054,26 @@ let wD = class extends dist_x {
|
|
|
1052
1054
|
}
|
|
1053
1055
|
toggleAll() {
|
|
1054
1056
|
const u = this.value.length === this.options.length;
|
|
1055
|
-
this.value = u ? [] : this.options.map((
|
|
1057
|
+
this.value = u ? [] : this.options.map((t)=>t.value);
|
|
1056
1058
|
}
|
|
1057
1059
|
toggleValue() {
|
|
1058
1060
|
const u = this.value.includes(this._value);
|
|
1059
|
-
this.value = u ? this.value.filter((
|
|
1061
|
+
this.value = u ? this.value.filter((t)=>t !== this._value) : [
|
|
1060
1062
|
...this.value,
|
|
1061
1063
|
this._value
|
|
1062
1064
|
];
|
|
1063
1065
|
}
|
|
1064
1066
|
};
|
|
1065
|
-
var
|
|
1067
|
+
var OD = Object.defineProperty, PD = (e, u, t)=>u in e ? OD(e, u, {
|
|
1066
1068
|
enumerable: !0,
|
|
1067
1069
|
configurable: !0,
|
|
1068
1070
|
writable: !0,
|
|
1069
|
-
value:
|
|
1070
|
-
}) :
|
|
1071
|
-
class
|
|
1071
|
+
value: t
|
|
1072
|
+
}) : e[u] = t, J = (e, u, t)=>(PD(e, "symbol" != typeof u ? u + "" : u, t), t);
|
|
1073
|
+
class LD extends x {
|
|
1072
1074
|
constructor(u){
|
|
1073
|
-
super(u, !1),
|
|
1074
|
-
switch(
|
|
1075
|
+
super(u, !1), J(this, "options"), J(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: t })=>t === u.initialValue), -1 === this.cursor && (this.cursor = 0), this.changeValue(), this.on("cursor", (t)=>{
|
|
1076
|
+
switch(t){
|
|
1075
1077
|
case "left":
|
|
1076
1078
|
case "up":
|
|
1077
1079
|
this.cursor = 0 === this.cursor ? this.options.length - 1 : this.cursor - 1;
|
|
@@ -1091,12 +1093,12 @@ class jD extends dist_x {
|
|
|
1091
1093
|
this.value = this._value.value;
|
|
1092
1094
|
}
|
|
1093
1095
|
}
|
|
1094
|
-
class
|
|
1096
|
+
class RD extends x {
|
|
1095
1097
|
get valueWithCursor() {
|
|
1096
1098
|
if ("submit" === this.state) return this.value;
|
|
1097
1099
|
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
1098
|
-
const u = this.value.slice(0, this.cursor), [
|
|
1099
|
-
return `${u}${picocolors.inverse(
|
|
1100
|
+
const u = this.value.slice(0, this.cursor), [t, ...F] = this.value.slice(this.cursor);
|
|
1101
|
+
return `${u}${picocolors.inverse(t)}${F.join("")}`;
|
|
1100
1102
|
}
|
|
1101
1103
|
get cursor() {
|
|
1102
1104
|
return this._cursor;
|
|
@@ -1110,7 +1112,7 @@ class PD extends dist_x {
|
|
|
1110
1112
|
function ce() {
|
|
1111
1113
|
return "win32" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].platform ? "linux" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM : !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.CI || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.WT_SESSION || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINUS_SUBLIME || "{cmd::Cmder}" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.ConEmuTask || "Terminus-Sublime" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "vscode" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "xterm-256color" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "alacritty" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "JetBrains-JediTerm" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINAL_EMULATOR;
|
|
1112
1114
|
}
|
|
1113
|
-
const dist_V = ce(), dist_u = (t, n)=>dist_V ? t : n, le = dist_u("\u25C6", "*"), dist_L = dist_u("\u25A0", "x"), dist_W = dist_u("\u25B2", "x"), dist_C = dist_u("\u25C7", "o"), dist_o = (dist_u("\u250C", "T"), dist_u("\u2502", "|")), dist_d = dist_u("\u2514", "\u2014"), dist_k = dist_u("\u25CF", ">"), dist_P = dist_u("\u25CB", " "), dist_A = dist_u("\u25FB", "[\u2022]"), dist_T = dist_u("\u25FC", "[+]"), dist_F = dist_u("\u25FB", "[ ]"), dist_ = (dist_u("\u25AA", "\u2022"), dist_u("\u2500", "-")), me = dist_u("\u256E", "+"), de = dist_u("\u251C", "+"), pe = dist_u("\u256F", "+"),
|
|
1115
|
+
const dist_V = ce(), dist_u = (t, n)=>dist_V ? t : n, le = dist_u("\u25C6", "*"), dist_L = dist_u("\u25A0", "x"), dist_W = dist_u("\u25B2", "x"), dist_C = dist_u("\u25C7", "o"), dist_o = (dist_u("\u250C", "T"), dist_u("\u2502", "|")), dist_d = dist_u("\u2514", "\u2014"), dist_k = dist_u("\u25CF", ">"), dist_P = dist_u("\u25CB", " "), dist_A = dist_u("\u25FB", "[\u2022]"), dist_T = dist_u("\u25FC", "[+]"), dist_F = dist_u("\u25FB", "[ ]"), dist_ = (dist_u("\u25AA", "\u2022"), dist_u("\u2500", "-")), me = dist_u("\u256E", "+"), de = dist_u("\u251C", "+"), pe = dist_u("\u256F", "+"), dist_b = (dist_u("\u25CF", "\u2022"), dist_u("\u25C6", "*"), dist_u("\u25B2", "!"), dist_u("\u25A0", "x"), (t)=>{
|
|
1114
1116
|
switch(t){
|
|
1115
1117
|
case "initial":
|
|
1116
1118
|
case "active":
|
|
@@ -1122,28 +1124,28 @@ const dist_V = ce(), dist_u = (t, n)=>dist_V ? t : n, le = dist_u("\u25C6", "*")
|
|
|
1122
1124
|
case "submit":
|
|
1123
1125
|
return picocolors.green(dist_C);
|
|
1124
1126
|
}
|
|
1125
|
-
}),
|
|
1126
|
-
const { cursor: n, options:
|
|
1127
|
+
}), dist_G = (t)=>{
|
|
1128
|
+
const { cursor: n, options: r, style: i } = t, s = t.maxItems ?? Number.POSITIVE_INFINITY, c = Math.max(process.stdout.rows - 4, 0), a = Math.min(c, Math.max(s, 5));
|
|
1127
1129
|
let l = 0;
|
|
1128
|
-
n >= l +
|
|
1129
|
-
const $ =
|
|
1130
|
-
return
|
|
1131
|
-
const j = 0 === v && $, E = v ===
|
|
1132
|
-
return j || E ? picocolors.dim("...") :
|
|
1130
|
+
n >= l + a - 3 ? l = Math.max(Math.min(n - a + 3, r.length - a), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
|
|
1131
|
+
const $ = a < r.length && l > 0, g = a < r.length && l + a < r.length;
|
|
1132
|
+
return r.slice(l, l + a).map((p, v, f)=>{
|
|
1133
|
+
const j = 0 === v && $, E = v === f.length - 1 && g;
|
|
1134
|
+
return j || E ? picocolors.dim("...") : i(p, v + l === n);
|
|
1133
1135
|
});
|
|
1134
|
-
}, he = (t)=>new
|
|
1136
|
+
}, he = (t)=>new RD({
|
|
1135
1137
|
validate: t.validate,
|
|
1136
1138
|
placeholder: t.placeholder,
|
|
1137
1139
|
defaultValue: t.defaultValue,
|
|
1138
1140
|
initialValue: t.initialValue,
|
|
1139
1141
|
render () {
|
|
1140
1142
|
const n = `${picocolors.gray(dist_o)}
|
|
1141
|
-
${
|
|
1142
|
-
`,
|
|
1143
|
+
${dist_b(this.state)} ${t.message}
|
|
1144
|
+
`, r = t.placeholder ? picocolors.inverse(t.placeholder[0]) + picocolors.dim(t.placeholder.slice(1)) : picocolors.inverse(picocolors.hidden("_")), i = this.value ? this.valueWithCursor : r;
|
|
1143
1145
|
switch(this.state){
|
|
1144
1146
|
case "error":
|
|
1145
1147
|
return `${n.trim()}
|
|
1146
|
-
${picocolors.yellow(dist_o)} ${
|
|
1148
|
+
${picocolors.yellow(dist_o)} ${i}
|
|
1147
1149
|
${picocolors.yellow(dist_d)} ${picocolors.yellow(this.error)}
|
|
1148
1150
|
`;
|
|
1149
1151
|
case "submit":
|
|
@@ -1152,44 +1154,44 @@ ${picocolors.yellow(dist_d)} ${picocolors.yellow(this.error)}
|
|
|
1152
1154
|
return `${n}${picocolors.gray(dist_o)} ${picocolors.strikethrough(picocolors.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
1153
1155
|
${picocolors.gray(dist_o)}` : ""}`;
|
|
1154
1156
|
default:
|
|
1155
|
-
return `${n}${picocolors.cyan(dist_o)} ${
|
|
1157
|
+
return `${n}${picocolors.cyan(dist_o)} ${i}
|
|
1156
1158
|
${picocolors.cyan(dist_d)}
|
|
1157
1159
|
`;
|
|
1158
1160
|
}
|
|
1159
1161
|
}
|
|
1160
1162
|
}).prompt(), ve = (t)=>{
|
|
1161
|
-
const n = (
|
|
1162
|
-
const
|
|
1163
|
-
switch(
|
|
1163
|
+
const n = (r, i)=>{
|
|
1164
|
+
const s = r.label ?? String(r.value);
|
|
1165
|
+
switch(i){
|
|
1164
1166
|
case "selected":
|
|
1165
|
-
return `${picocolors.dim(
|
|
1167
|
+
return `${picocolors.dim(s)}`;
|
|
1166
1168
|
case "active":
|
|
1167
|
-
return `${picocolors.green(dist_k)} ${
|
|
1169
|
+
return `${picocolors.green(dist_k)} ${s} ${r.hint ? picocolors.dim(`(${r.hint})`) : ""}`;
|
|
1168
1170
|
case "cancelled":
|
|
1169
|
-
return `${picocolors.strikethrough(picocolors.dim(
|
|
1171
|
+
return `${picocolors.strikethrough(picocolors.dim(s))}`;
|
|
1170
1172
|
default:
|
|
1171
|
-
return `${picocolors.dim(dist_P)} ${picocolors.dim(
|
|
1173
|
+
return `${picocolors.dim(dist_P)} ${picocolors.dim(s)}`;
|
|
1172
1174
|
}
|
|
1173
1175
|
};
|
|
1174
|
-
return new
|
|
1176
|
+
return new LD({
|
|
1175
1177
|
options: t.options,
|
|
1176
1178
|
initialValue: t.initialValue,
|
|
1177
1179
|
render () {
|
|
1178
|
-
const
|
|
1179
|
-
${
|
|
1180
|
+
const r = `${picocolors.gray(dist_o)}
|
|
1181
|
+
${dist_b(this.state)} ${t.message}
|
|
1180
1182
|
`;
|
|
1181
1183
|
switch(this.state){
|
|
1182
1184
|
case "submit":
|
|
1183
|
-
return `${
|
|
1185
|
+
return `${r}${picocolors.gray(dist_o)} ${n(this.options[this.cursor], "selected")}`;
|
|
1184
1186
|
case "cancel":
|
|
1185
|
-
return `${
|
|
1187
|
+
return `${r}${picocolors.gray(dist_o)} ${n(this.options[this.cursor], "cancelled")}
|
|
1186
1188
|
${picocolors.gray(dist_o)}`;
|
|
1187
1189
|
default:
|
|
1188
|
-
return `${
|
|
1190
|
+
return `${r}${picocolors.cyan(dist_o)} ${dist_G({
|
|
1189
1191
|
cursor: this.cursor,
|
|
1190
1192
|
options: this.options,
|
|
1191
1193
|
maxItems: t.maxItems,
|
|
1192
|
-
style: (
|
|
1194
|
+
style: (i, s)=>n(i, s ? "active" : "inactive")
|
|
1193
1195
|
}).join(`
|
|
1194
1196
|
${picocolors.cyan(dist_o)} `)}
|
|
1195
1197
|
${picocolors.cyan(dist_d)}
|
|
@@ -1198,56 +1200,56 @@ ${picocolors.cyan(dist_d)}
|
|
|
1198
1200
|
}
|
|
1199
1201
|
}).prompt();
|
|
1200
1202
|
}, fe = (t)=>{
|
|
1201
|
-
const n = (
|
|
1202
|
-
const
|
|
1203
|
-
return "active" ===
|
|
1203
|
+
const n = (r, i)=>{
|
|
1204
|
+
const s = r.label ?? String(r.value);
|
|
1205
|
+
return "active" === i ? `${picocolors.cyan(dist_A)} ${s} ${r.hint ? picocolors.dim(`(${r.hint})`) : ""}` : "selected" === i ? `${picocolors.green(dist_T)} ${picocolors.dim(s)} ${r.hint ? picocolors.dim(`(${r.hint})`) : ""}` : "cancelled" === i ? `${picocolors.strikethrough(picocolors.dim(s))}` : "active-selected" === i ? `${picocolors.green(dist_T)} ${s} ${r.hint ? picocolors.dim(`(${r.hint})`) : ""}` : "submitted" === i ? `${picocolors.dim(s)}` : `${picocolors.dim(dist_F)} ${picocolors.dim(s)}`;
|
|
1204
1206
|
};
|
|
1205
|
-
return new
|
|
1207
|
+
return new SD({
|
|
1206
1208
|
options: t.options,
|
|
1207
1209
|
initialValues: t.initialValues,
|
|
1208
1210
|
required: t.required ?? !0,
|
|
1209
1211
|
cursorAt: t.cursorAt,
|
|
1210
|
-
validate (
|
|
1211
|
-
if (this.required && 0 ===
|
|
1212
|
+
validate (r) {
|
|
1213
|
+
if (this.required && 0 === r.length) return `Please select at least one option.
|
|
1212
1214
|
${picocolors.reset(picocolors.dim(`Press ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" space ")))} to select, ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" enter ")))} to submit`))}`;
|
|
1213
1215
|
},
|
|
1214
1216
|
render () {
|
|
1215
|
-
const
|
|
1216
|
-
${
|
|
1217
|
-
`,
|
|
1218
|
-
const
|
|
1219
|
-
return
|
|
1217
|
+
const r = `${picocolors.gray(dist_o)}
|
|
1218
|
+
${dist_b(this.state)} ${t.message}
|
|
1219
|
+
`, i = (s, c)=>{
|
|
1220
|
+
const a = this.value.includes(s.value);
|
|
1221
|
+
return c && a ? n(s, "active-selected") : a ? n(s, "selected") : n(s, c ? "active" : "inactive");
|
|
1220
1222
|
};
|
|
1221
1223
|
switch(this.state){
|
|
1222
1224
|
case "submit":
|
|
1223
|
-
return `${
|
|
1225
|
+
return `${r}${picocolors.gray(dist_o)} ${this.options.filter(({ value: s })=>this.value.includes(s)).map((s)=>n(s, "submitted")).join(picocolors.dim(", ")) || picocolors.dim("none")}`;
|
|
1224
1226
|
case "cancel":
|
|
1225
1227
|
{
|
|
1226
|
-
const
|
|
1227
|
-
return `${
|
|
1228
|
+
const s = this.options.filter(({ value: c })=>this.value.includes(c)).map((c)=>n(c, "cancelled")).join(picocolors.dim(", "));
|
|
1229
|
+
return `${r}${picocolors.gray(dist_o)} ${s.trim() ? `${s}
|
|
1228
1230
|
${picocolors.gray(dist_o)}` : ""}`;
|
|
1229
1231
|
}
|
|
1230
1232
|
case "error":
|
|
1231
1233
|
{
|
|
1232
|
-
const
|
|
1233
|
-
`).map((
|
|
1234
|
+
const s = this.error.split(`
|
|
1235
|
+
`).map((c, a)=>0 === a ? `${picocolors.yellow(dist_d)} ${picocolors.yellow(c)}` : ` ${c}`).join(`
|
|
1234
1236
|
`);
|
|
1235
|
-
return `${
|
|
1237
|
+
return `${r + picocolors.yellow(dist_o)} ${dist_G({
|
|
1236
1238
|
options: this.options,
|
|
1237
1239
|
cursor: this.cursor,
|
|
1238
1240
|
maxItems: t.maxItems,
|
|
1239
|
-
style:
|
|
1241
|
+
style: i
|
|
1240
1242
|
}).join(`
|
|
1241
1243
|
${picocolors.yellow(dist_o)} `)}
|
|
1242
|
-
${
|
|
1244
|
+
${s}
|
|
1243
1245
|
`;
|
|
1244
1246
|
}
|
|
1245
1247
|
default:
|
|
1246
|
-
return `${
|
|
1248
|
+
return `${r}${picocolors.cyan(dist_o)} ${dist_G({
|
|
1247
1249
|
options: this.options,
|
|
1248
1250
|
cursor: this.cursor,
|
|
1249
1251
|
maxItems: t.maxItems,
|
|
1250
|
-
style:
|
|
1252
|
+
style: i
|
|
1251
1253
|
}).join(`
|
|
1252
1254
|
${picocolors.cyan(dist_o)} `)}
|
|
1253
1255
|
${picocolors.cyan(dist_d)}
|
|
@@ -1256,18 +1258,18 @@ ${picocolors.cyan(dist_d)}
|
|
|
1256
1258
|
}
|
|
1257
1259
|
}).prompt();
|
|
1258
1260
|
}, Me = (t = "", n = "")=>{
|
|
1259
|
-
const
|
|
1261
|
+
const r = `
|
|
1260
1262
|
${t}
|
|
1261
1263
|
`.split(`
|
|
1262
|
-
`),
|
|
1264
|
+
`), i = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(n).length, s = Math.max(r.reduce((a, l)=>{
|
|
1263
1265
|
const $ = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(l);
|
|
1264
|
-
return $.length >
|
|
1265
|
-
}, 0),
|
|
1266
|
+
return $.length > a ? $.length : a;
|
|
1267
|
+
}, 0), i) + 2, c = r.map((a)=>`${picocolors.gray(dist_o)} ${picocolors.dim(a)}${" ".repeat(s - (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(a).length)}${picocolors.gray(dist_o)}`).join(`
|
|
1266
1268
|
`);
|
|
1267
1269
|
process.stdout.write(`${picocolors.gray(dist_o)}
|
|
1268
|
-
${picocolors.green(dist_C)} ${picocolors.reset(n)} ${picocolors.gray(dist_.repeat(Math.max(
|
|
1269
|
-
${
|
|
1270
|
-
${picocolors.gray(de + dist_.repeat(
|
|
1270
|
+
${picocolors.green(dist_C)} ${picocolors.reset(n)} ${picocolors.gray(dist_.repeat(Math.max(s - i - 1, 1)) + me)}
|
|
1271
|
+
${c}
|
|
1272
|
+
${picocolors.gray(de + dist_.repeat(s + 2) + pe)}
|
|
1271
1273
|
`);
|
|
1272
1274
|
}, xe = (t = "")=>{
|
|
1273
1275
|
process.stdout.write(`${picocolors.gray(dist_d)} ${picocolors.red(t)}
|
|
@@ -1525,7 +1527,7 @@ function cancelAndExit() {
|
|
|
1525
1527
|
process.exit(0);
|
|
1526
1528
|
}
|
|
1527
1529
|
function checkCancel(value) {
|
|
1528
|
-
if (
|
|
1530
|
+
if (pD(value)) cancelAndExit();
|
|
1529
1531
|
return value;
|
|
1530
1532
|
}
|
|
1531
1533
|
function formatProjectName(input) {
|
|
@@ -1559,6 +1561,7 @@ function logHelpMessage(name, templates) {
|
|
|
1559
1561
|
-t, --template specify the template to use
|
|
1560
1562
|
--tools select additional tools (biome, eslint, prettier)
|
|
1561
1563
|
--override override files in target directory
|
|
1564
|
+
--package-name specify the package name
|
|
1562
1565
|
|
|
1563
1566
|
Templates:
|
|
1564
1567
|
|
|
@@ -1570,6 +1573,7 @@ async function getTools({ tools, dir, template }) {
|
|
|
1570
1573
|
tools
|
|
1571
1574
|
];
|
|
1572
1575
|
if (dir && template) return [];
|
|
1576
|
+
if ('' === tools) return [];
|
|
1573
1577
|
return checkCancel(await fe({
|
|
1574
1578
|
message: 'Select additional tools (Use <space> to select, <enter> to continue)',
|
|
1575
1579
|
options: [
|
|
@@ -1603,11 +1607,8 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
1603
1607
|
}
|
|
1604
1608
|
});
|
|
1605
1609
|
console.log('');
|
|
1606
|
-
logger.greet(
|
|
1607
|
-
if (argv.help)
|
|
1608
|
-
logHelpMessage(name, templates);
|
|
1609
|
-
return;
|
|
1610
|
-
}
|
|
1610
|
+
logger.greet(`\u{25C6} Create ${upperFirst(name)} Project`);
|
|
1611
|
+
if (argv.help) return void logHelpMessage(name, templates);
|
|
1611
1612
|
const cwd = process.cwd();
|
|
1612
1613
|
const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
|
|
1613
1614
|
const pkgManager = pkgInfo ? pkgInfo.name : 'npm';
|
|
@@ -1620,7 +1621,9 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
1620
1621
|
if (0 === value.length) return 'Project name is required';
|
|
1621
1622
|
}
|
|
1622
1623
|
}));
|
|
1623
|
-
const
|
|
1624
|
+
const formatted = formatProjectName(projectName);
|
|
1625
|
+
const { targetDir } = formatted;
|
|
1626
|
+
const packageName = argv['package-name'] || formatted.packageName;
|
|
1624
1627
|
const distFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].isAbsolute(targetDir) ? targetDir : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(cwd, targetDir);
|
|
1625
1628
|
if (!argv.override && __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(distFolder) && !isEmptyDir(distFolder)) {
|
|
1626
1629
|
const option = checkCancel(await ve({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rstack",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Create a new Rstack project",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@biomejs/biome": "^1.9.4",
|
|
44
|
-
"@clack/prompts": "^0.10.
|
|
45
|
-
"@microsoft/api-extractor": "^7.52.
|
|
46
|
-
"@rslib/core": "0.6.
|
|
44
|
+
"@clack/prompts": "^0.10.1",
|
|
45
|
+
"@microsoft/api-extractor": "^7.52.6",
|
|
46
|
+
"@rslib/core": "0.6.8",
|
|
47
47
|
"@types/minimist": "^1.2.5",
|
|
48
|
-
"@types/node": "22.
|
|
48
|
+
"@types/node": "22.15.3",
|
|
49
49
|
"deepmerge": "^4.3.1",
|
|
50
50
|
"minimist": "^1.2.8",
|
|
51
51
|
"picocolors": "^1.1.1",
|
|
52
52
|
"rslog": "^1.2.3",
|
|
53
|
-
"simple-git-hooks": "^2.
|
|
54
|
-
"typescript": "^5.8.
|
|
53
|
+
"simple-git-hooks": "^2.13.0",
|
|
54
|
+
"typescript": "^5.8.3"
|
|
55
55
|
},
|
|
56
|
-
"packageManager": "pnpm@10.
|
|
56
|
+
"packageManager": "pnpm@10.10.0",
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public",
|
|
59
59
|
"provenance": true,
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/compat": "^1.2.
|
|
10
|
-
"@eslint/js": "^9.
|
|
11
|
-
"eslint": "^9.
|
|
12
|
-
"eslint-plugin-react": "^7.37.
|
|
9
|
+
"@eslint/compat": "^1.2.8",
|
|
10
|
+
"@eslint/js": "^9.25.1",
|
|
11
|
+
"eslint": "^9.25.1",
|
|
12
|
+
"eslint-plugin-react": "^7.37.5",
|
|
13
13
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
14
14
|
"globals": "^16.0.0"
|
|
15
15
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/compat": "^1.2.
|
|
10
|
-
"@eslint/js": "^9.
|
|
11
|
-
"eslint": "^9.
|
|
12
|
-
"eslint-plugin-react": "^7.37.
|
|
9
|
+
"@eslint/compat": "^1.2.8",
|
|
10
|
+
"@eslint/js": "^9.25.1",
|
|
11
|
+
"eslint": "^9.25.1",
|
|
12
|
+
"eslint-plugin-react": "^7.37.5",
|
|
13
13
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
14
14
|
"globals": "^16.0.0",
|
|
15
|
-
"typescript-eslint": "^8.
|
|
15
|
+
"typescript-eslint": "^8.31.1"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.
|
|
10
|
-
"eslint": "^9.
|
|
11
|
-
"eslint-plugin-svelte": "^3.
|
|
9
|
+
"@eslint/js": "^9.25.1",
|
|
10
|
+
"eslint": "^9.25.1",
|
|
11
|
+
"eslint-plugin-svelte": "^3.5.1",
|
|
12
12
|
"globals": "^16.0.0"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.
|
|
10
|
-
"eslint": "^9.
|
|
11
|
-
"eslint-plugin-svelte": "^3.
|
|
9
|
+
"@eslint/js": "^9.25.1",
|
|
10
|
+
"eslint": "^9.25.1",
|
|
11
|
+
"eslint-plugin-svelte": "^3.5.1",
|
|
12
12
|
"globals": "^16.0.0",
|
|
13
|
-
"typescript-eslint": "^8.
|
|
13
|
+
"typescript-eslint": "^8.31.1"
|
|
14
14
|
},
|
|
15
15
|
"type": "module"
|
|
16
16
|
}
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@vue/eslint-config-typescript": "^14.5.0",
|
|
10
|
-
"eslint": "^9.
|
|
11
|
-
"eslint-plugin-vue": "^10.
|
|
10
|
+
"eslint": "^9.25.1",
|
|
11
|
+
"eslint-plugin-vue": "^10.1.0",
|
|
12
12
|
"globals": "^16.0.0",
|
|
13
|
-
"typescript-eslint": "^8.
|
|
13
|
+
"typescript-eslint": "^8.31.1"
|
|
14
14
|
}
|
|
15
15
|
}
|