@donotdev/cli 0.1.44 → 0.1.46

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.
@@ -5,7 +5,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
+ get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
@@ -33,31 +33,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
37
- var isAmbiguous, isFullWidth, isWide;
36
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
37
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
38
38
  var init_utils = __esm({
39
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
39
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
40
40
  init_utils2();
41
- isAmbiguous = (x) => {
42
- 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;
43
- };
41
+ getCodePointsLength = /* @__PURE__ */ (() => {
42
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
43
+ return (input) => {
44
+ let surrogatePairsNr = 0;
45
+ SURROGATE_PAIR_RE.lastIndex = 0;
46
+ while (SURROGATE_PAIR_RE.test(input)) {
47
+ surrogatePairsNr += 1;
48
+ }
49
+ return input.length - surrogatePairsNr;
50
+ };
51
+ })();
44
52
  isFullWidth = (x) => {
45
53
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
46
54
  };
47
- isWide = (x) => {
48
- 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 >= 9800 && x <= 9811 || x === 9855 || 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 <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && 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 === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || 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 === 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 <= 128727 || 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 <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
55
+ isWideNotCJKTNotEmoji = (x) => {
56
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
49
57
  };
50
58
  }
51
59
  });
52
60
 
53
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
54
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
61
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
62
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
55
63
  var init_dist = __esm({
56
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
64
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
57
65
  init_utils2();
58
66
  init_utils();
59
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
67
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
60
68
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
69
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
61
70
  TAB_RE = /\t{1,1000}/y;
62
71
  EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
63
72
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -67,14 +76,21 @@ var init_dist = __esm({
67
76
  const LIMIT = truncationOptions.limit ?? Infinity;
68
77
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
69
78
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
70
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
79
+ const ANSI_WIDTH = 0;
71
80
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
72
81
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
73
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
74
82
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
75
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
83
+ const FULL_WIDTH_WIDTH = 2;
76
84
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
77
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
85
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
86
+ const PARSE_BLOCKS = [
87
+ [LATIN_RE, REGULAR_WIDTH],
88
+ [ANSI_RE, ANSI_WIDTH],
89
+ [CONTROL_RE, CONTROL_WIDTH],
90
+ [TAB_RE, TAB_WIDTH],
91
+ [EMOJI_RE, EMOJI_WIDTH],
92
+ [CJKT_WIDE_RE, WIDE_WIDTH]
93
+ ];
78
94
  let indexPrev = 0;
79
95
  let index = 0;
80
96
  let length = input.length;
@@ -94,10 +110,8 @@ var init_dist = __esm({
94
110
  const codePoint = char.codePointAt(0) || 0;
95
111
  if (isFullWidth(codePoint)) {
96
112
  widthExtra = FULL_WIDTH_WIDTH;
97
- } else if (isWide(codePoint)) {
113
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
98
114
  widthExtra = WIDE_WIDTH;
99
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
100
- widthExtra = AMBIGUOUS_WIDTH;
101
115
  } else {
102
116
  widthExtra = REGULAR_WIDTH;
103
117
  }
@@ -113,88 +127,28 @@ var init_dist = __esm({
113
127
  }
114
128
  unmatchedStart = unmatchedEnd = 0;
115
129
  }
116
- if (index >= length)
117
- break;
118
- LATIN_RE.lastIndex = index;
119
- if (LATIN_RE.test(input)) {
120
- lengthExtra = LATIN_RE.lastIndex - index;
121
- widthExtra = lengthExtra * REGULAR_WIDTH;
122
- if (width + widthExtra > truncationLimit) {
123
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
124
- }
125
- if (width + widthExtra > LIMIT) {
126
- truncationEnabled = true;
127
- break;
128
- }
129
- width += widthExtra;
130
- unmatchedStart = indexPrev;
131
- unmatchedEnd = index;
132
- index = indexPrev = LATIN_RE.lastIndex;
133
- continue;
134
- }
135
- ANSI_RE.lastIndex = index;
136
- if (ANSI_RE.test(input)) {
137
- if (width + ANSI_WIDTH > truncationLimit) {
138
- truncationIndex = Math.min(truncationIndex, index);
139
- }
140
- if (width + ANSI_WIDTH > LIMIT) {
141
- truncationEnabled = true;
142
- break;
143
- }
144
- width += ANSI_WIDTH;
145
- unmatchedStart = indexPrev;
146
- unmatchedEnd = index;
147
- index = indexPrev = ANSI_RE.lastIndex;
148
- continue;
149
- }
150
- CONTROL_RE.lastIndex = index;
151
- if (CONTROL_RE.test(input)) {
152
- lengthExtra = CONTROL_RE.lastIndex - index;
153
- widthExtra = lengthExtra * CONTROL_WIDTH;
154
- if (width + widthExtra > truncationLimit) {
155
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
156
- }
157
- if (width + widthExtra > LIMIT) {
158
- truncationEnabled = true;
159
- break;
160
- }
161
- width += widthExtra;
162
- unmatchedStart = indexPrev;
163
- unmatchedEnd = index;
164
- index = indexPrev = CONTROL_RE.lastIndex;
165
- continue;
166
- }
167
- TAB_RE.lastIndex = index;
168
- if (TAB_RE.test(input)) {
169
- lengthExtra = TAB_RE.lastIndex - index;
170
- widthExtra = lengthExtra * TAB_WIDTH;
171
- if (width + widthExtra > truncationLimit) {
172
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
173
- }
174
- if (width + widthExtra > LIMIT) {
175
- truncationEnabled = true;
176
- break;
177
- }
178
- width += widthExtra;
179
- unmatchedStart = indexPrev;
180
- unmatchedEnd = index;
181
- index = indexPrev = TAB_RE.lastIndex;
182
- continue;
130
+ if (index >= length) {
131
+ break outer;
183
132
  }
184
- EMOJI_RE.lastIndex = index;
185
- if (EMOJI_RE.test(input)) {
186
- if (width + EMOJI_WIDTH > truncationLimit) {
187
- truncationIndex = Math.min(truncationIndex, index);
188
- }
189
- if (width + EMOJI_WIDTH > LIMIT) {
190
- truncationEnabled = true;
191
- break;
133
+ for (let i2 = 0, l2 = PARSE_BLOCKS.length; i2 < l2; i2++) {
134
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
135
+ BLOCK_RE.lastIndex = index;
136
+ if (BLOCK_RE.test(input)) {
137
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
138
+ widthExtra = lengthExtra * BLOCK_WIDTH;
139
+ if (width + widthExtra > truncationLimit) {
140
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
141
+ }
142
+ if (width + widthExtra > LIMIT) {
143
+ truncationEnabled = true;
144
+ break outer;
145
+ }
146
+ width += widthExtra;
147
+ unmatchedStart = indexPrev;
148
+ unmatchedEnd = index;
149
+ index = indexPrev = BLOCK_RE.lastIndex;
150
+ continue outer;
192
151
  }
193
- width += EMOJI_WIDTH;
194
- unmatchedStart = indexPrev;
195
- unmatchedEnd = index;
196
- index = indexPrev = EMOJI_RE.lastIndex;
197
- continue;
198
152
  }
199
153
  index += 1;
200
154
  }
@@ -209,10 +163,10 @@ var init_dist = __esm({
209
163
  }
210
164
  });
211
165
 
212
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
166
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
213
167
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
214
168
  var init_dist2 = __esm({
215
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
169
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
216
170
  init_utils2();
217
171
  init_dist();
218
172
  NO_TRUNCATION2 = {
@@ -227,13 +181,13 @@ var init_dist2 = __esm({
227
181
  }
228
182
  });
229
183
 
230
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
184
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
231
185
  function wrapAnsi(string, columns, options) {
232
186
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
233
187
  }
234
188
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
235
189
  var init_main = __esm({
236
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
190
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
237
191
  init_utils2();
238
192
  init_dist2();
239
193
  ESC = "\x1B";
@@ -397,16 +351,19 @@ var init_main = __esm({
397
351
  }
398
352
  const preString = rows.join("\n");
399
353
  let inSurrogate = false;
400
- for (let i = 0; i < preString.length; i++) {
401
- const character = preString[i];
354
+ for (let i2 = 0; i2 < preString.length; i2++) {
355
+ const character = preString[i2];
402
356
  returnValue += character;
403
357
  if (!inSurrogate) {
404
358
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
359
+ if (inSurrogate) {
360
+ continue;
361
+ }
405
362
  } else {
406
- continue;
363
+ inSurrogate = false;
407
364
  }
408
365
  if (character === ESC || character === CSI) {
409
- GROUP_REGEX.lastIndex = i + 1;
366
+ GROUP_REGEX.lastIndex = i2 + 1;
410
367
  const groupsResult = GROUP_REGEX.exec(preString);
411
368
  const groups = groupsResult?.groups;
412
369
  if (groups?.code !== void 0) {
@@ -416,7 +373,7 @@ var init_main = __esm({
416
373
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
417
374
  }
418
375
  }
419
- if (preString[i + 1] === "\n") {
376
+ if (preString[i2 + 1] === "\n") {
420
377
  if (escapeUrl) {
421
378
  returnValue += wrapAnsiHyperlink("");
422
379
  }
@@ -447,7 +404,7 @@ var require_src = __commonJS({
447
404
  var ESC2 = "\x1B";
448
405
  var CSI2 = `${ESC2}[`;
449
406
  var beep = "\x07";
450
- var cursor = {
407
+ var cursor3 = {
451
408
  to(x, y2) {
452
409
  if (!y2) return `${CSI2}${x + 1}G`;
453
410
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -476,7 +433,7 @@ var require_src = __commonJS({
476
433
  up: (count = 1) => `${CSI2}S`.repeat(count),
477
434
  down: (count = 1) => `${CSI2}T`.repeat(count)
478
435
  };
479
- var erase = {
436
+ var erase3 = {
480
437
  screen: `${CSI2}2J`,
481
438
  up: (count = 1) => `${CSI2}1J`.repeat(count),
482
439
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -485,89 +442,169 @@ var require_src = __commonJS({
485
442
  lineStart: `${CSI2}1K`,
486
443
  lines(count) {
487
444
  let clear = "";
488
- for (let i = 0; i < count; i++)
489
- clear += this.line + (i < count - 1 ? cursor.up() : "");
445
+ for (let i2 = 0; i2 < count; i2++)
446
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
490
447
  if (count)
491
- clear += cursor.left;
448
+ clear += cursor3.left;
492
449
  return clear;
493
450
  }
494
451
  };
495
- module.exports = { cursor, scroll, erase, beep };
452
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
496
453
  }
497
454
  });
498
455
 
499
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
500
- import { styleText as y } from "node:util";
501
- import { stdout as S, stdin as $ } from "node:process";
502
- import * as _ from "node:readline";
503
- import P from "node:readline";
504
- import { ReadStream as D } from "node:tty";
505
- function d(r, t2, e) {
506
- if (!e.some((o) => !o.disabled)) return r;
507
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
508
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
456
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
457
+ import { styleText } from "node:util";
458
+ import { stdout, stdin } from "node:process";
459
+ import * as l from "node:readline";
460
+ import l__default from "node:readline";
461
+ import { ReadStream } from "node:tty";
462
+ function findCursor(s, o, l2) {
463
+ if (!l2.some((r2) => !r2.disabled))
464
+ return s;
465
+ const t2 = s + o, n2 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n2 : t2 > n2 ? 0 : t2;
466
+ return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
467
+ }
468
+ function isAccessible(n2) {
469
+ if (n2 !== void 0) return n2;
470
+ if (settings.accessible !== void 0) return settings.accessible;
471
+ const e = process.env.ACCESSIBLE;
472
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
509
473
  }
510
- function V(r, t2) {
511
- if (typeof r == "string") return u.aliases.get(r) === t2;
512
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
474
+ function isActionKey(n2, e) {
475
+ if (typeof n2 == "string")
476
+ return settings.aliases.get(n2) === e;
477
+ for (const s of n2)
478
+ if (s !== void 0 && isActionKey(s, e))
479
+ return true;
513
480
  return false;
514
481
  }
515
- function j(r, t2) {
516
- if (r === t2) return;
517
- const e = r.split(`
518
- `), s = t2.split(`
519
- `), i = Math.max(e.length, s.length), n = [];
520
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
521
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
482
+ function diffLines(i2, s) {
483
+ if (i2 === s) return;
484
+ const e = i2.split(`
485
+ `), t2 = s.split(`
486
+ `), r2 = Math.max(e.length, t2.length), f = [];
487
+ for (let n2 = 0; n2 < r2; n2++)
488
+ e[n2] !== t2[n2] && f.push(n2);
489
+ return {
490
+ lines: f,
491
+ numLinesBefore: e.length,
492
+ numLinesAfter: t2.length,
493
+ numLines: r2
494
+ };
522
495
  }
523
- function q(r) {
524
- return r === C;
496
+ function isCancel(e) {
497
+ return e === CANCEL_SYMBOL;
525
498
  }
526
- function w(r, t2) {
527
- const e = r;
528
- e.isTTY && e.setRawMode(t2);
499
+ function setRawMode(e, r2) {
500
+ const o = e;
501
+ o.isTTY && o.setRawMode(r2);
529
502
  }
530
- function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
531
- const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
532
- _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
533
- const n = (o, { name: a, sequence: h }) => {
534
- const l = String(o);
535
- if (V([l, a, h], "cancel")) {
536
- s && t2.write(import_sisteransi.cursor.show), process.exit(0);
503
+ function block({
504
+ input: e = stdin,
505
+ output: r2 = stdout,
506
+ overwrite: o = true,
507
+ hideCursor: n2 = true
508
+ } = {}) {
509
+ const s = l.createInterface({
510
+ input: e,
511
+ output: r2,
512
+ prompt: "",
513
+ tabSize: 1
514
+ });
515
+ l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
516
+ const t2 = (f, { name: a2, sequence: w }) => {
517
+ const c = String(f);
518
+ if (isActionKey([c, a2, w], "cancel")) {
519
+ n2 && r2.write(import_sisteransi.cursor.show), process.exit(0);
537
520
  return;
538
521
  }
539
- if (!e) return;
540
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
541
- _.moveCursor(t2, f, v, () => {
542
- _.clearLine(t2, 1, () => {
543
- r.once("keypress", n);
522
+ if (!o) return;
523
+ const i2 = a2 === "return" ? 0 : -1, m2 = a2 === "return" ? -1 : 0;
524
+ l.moveCursor(r2, i2, m2, () => {
525
+ l.clearLine(r2, 1, () => {
526
+ e.once("keypress", t2);
544
527
  });
545
528
  });
546
529
  };
547
- return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
548
- r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
530
+ return n2 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
531
+ e.off("keypress", t2), n2 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
549
532
  };
550
533
  }
551
- function R(r, t2, e, s = e) {
552
- const i = O(r ?? S);
553
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
554
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
534
+ function wrapTextWithPrefix(e, r2, o, n2 = o, s = o, t2) {
535
+ const f = getColumns(e ?? stdout);
536
+ return wrapAnsi(r2, f - o.length, {
537
+ hard: true,
538
+ trim: false
539
+ }).split(`
540
+ `).map((c, i2, m2) => {
541
+ const d = t2 ? t2(c, i2) : c;
542
+ return i2 === 0 ? `${n2}${d}` : i2 === m2.length - 1 ? `${s}${d}` : `${o}${d}`;
543
+ }).join(`
555
544
  `);
556
545
  }
557
- var import_sisteransi, E, G, u, Y, C, O, A, p, Q, it;
546
+ function runValidation(e, a2) {
547
+ if ("~standard" in e) {
548
+ const n2 = e["~standard"].validate(a2);
549
+ return n2 instanceof Promise ? n2.then((r2) => r2.issues?.at(0)?.message) : n2.issues?.at(0)?.message;
550
+ }
551
+ return e(a2);
552
+ }
553
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, r, a;
558
554
  var init_dist3 = __esm({
559
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
555
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
560
556
  init_utils2();
561
557
  init_main();
562
558
  import_sisteransi = __toESM(require_src(), 1);
563
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
564
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
565
- u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
566
- Y = globalThis.process.platform.startsWith("win");
567
- C = /* @__PURE__ */ Symbol("clack:cancel");
568
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
569
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
570
- p = class {
559
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
560
+ t = [
561
+ "January",
562
+ "February",
563
+ "March",
564
+ "April",
565
+ "May",
566
+ "June",
567
+ "July",
568
+ "August",
569
+ "September",
570
+ "October",
571
+ "November",
572
+ "December"
573
+ ];
574
+ settings = {
575
+ actions: new Set(a$1),
576
+ aliases: /* @__PURE__ */ new Map([
577
+ // vim support
578
+ ["k", "up"],
579
+ ["j", "down"],
580
+ ["h", "left"],
581
+ ["l", "right"],
582
+ ["", "cancel"],
583
+ // opinionated defaults!
584
+ ["escape", "cancel"]
585
+ ]),
586
+ messages: {
587
+ cancel: "Canceled",
588
+ error: "Something went wrong"
589
+ },
590
+ withGuide: true,
591
+ accessible: void 0,
592
+ date: {
593
+ monthNames: [...t],
594
+ messages: {
595
+ required: "Please enter a valid date",
596
+ invalidMonth: "There are only 12 months in a year",
597
+ invalidDay: (n2, e) => `There are only ${n2} days in ${e}`,
598
+ afterMin: (n2) => `Date must be on or after ${n2.toISOString().slice(0, 10)}`,
599
+ beforeMax: (n2) => `Date must be on or before ${n2.toISOString().slice(0, 10)}`
600
+ }
601
+ }
602
+ };
603
+ R = globalThis.process.platform.startsWith("win");
604
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
605
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
606
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
607
+ y = class {
571
608
  input;
572
609
  output;
573
610
  _abortSignal;
@@ -582,46 +619,92 @@ var init_dist3 = __esm({
582
619
  error = "";
583
620
  value;
584
621
  userInput = "";
622
+ /**
623
+ * Whether accessible (static, screen-reader friendly) output is enabled for
624
+ * this prompt, resolved from the `accessible` option, the global setting,
625
+ * and the `ACCESSIBLE` env var.
626
+ */
627
+ get accessible() {
628
+ return isAccessible(this.opts.accessible);
629
+ }
585
630
  constructor(t2, e = true) {
586
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
587
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
631
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n2, ...o } = t2;
632
+ this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n2, this.input = i2, this.output = s;
588
633
  }
634
+ /**
635
+ * Unsubscribe all listeners
636
+ */
589
637
  unsubscribe() {
590
638
  this._subscribers.clear();
591
639
  }
640
+ /**
641
+ * Set a subscriber with opts
642
+ * @param event - The event name
643
+ */
592
644
  setSubscriber(t2, e) {
593
- const s = this._subscribers.get(t2) ?? [];
594
- s.push(e), this._subscribers.set(t2, s);
645
+ const i2 = this._subscribers.get(t2) ?? [];
646
+ i2.push(e), this._subscribers.set(t2, i2);
595
647
  }
648
+ /**
649
+ * Subscribe to an event
650
+ * @param event - The event name
651
+ * @param cb - The callback
652
+ */
596
653
  on(t2, e) {
597
654
  this.setSubscriber(t2, { cb: e });
598
655
  }
656
+ /**
657
+ * Subscribe to an event once
658
+ * @param event - The event name
659
+ * @param cb - The callback
660
+ */
599
661
  once(t2, e) {
600
662
  this.setSubscriber(t2, { cb: e, once: true });
601
663
  }
664
+ /**
665
+ * Emit an event with data
666
+ * @param event - The event name
667
+ * @param data - The data to pass to the callback
668
+ */
602
669
  emit(t2, ...e) {
603
- const s = this._subscribers.get(t2) ?? [], i = [];
604
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
605
- for (const n of i) n();
670
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
671
+ for (const r2 of i2)
672
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
673
+ for (const r2 of s)
674
+ r2();
606
675
  }
607
676
  prompt() {
608
677
  return new Promise((t2) => {
609
678
  if (this._abortSignal) {
610
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
611
- this._abortSignal.addEventListener("abort", () => {
612
- this.state = "cancel", this.close();
613
- }, { once: true });
679
+ if (this._abortSignal.aborted)
680
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
681
+ this._abortSignal.addEventListener(
682
+ "abort",
683
+ () => {
684
+ this.state = "cancel", this.close();
685
+ },
686
+ { once: true }
687
+ );
614
688
  }
615
- this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
616
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
689
+ this.rl = l__default.createInterface({
690
+ input: this.input,
691
+ tabSize: 2,
692
+ prompt: "",
693
+ escapeCodeTimeout: 50,
694
+ terminal: true
695
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
696
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
617
697
  }), this.once("cancel", () => {
618
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
698
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
619
699
  });
620
700
  });
621
701
  }
622
702
  _isActionKey(t2, e) {
623
703
  return t2 === " ";
624
704
  }
705
+ _shouldSubmit(t2, e) {
706
+ return true;
707
+ }
625
708
  _setValue(t2) {
626
709
  this.value = t2, this.emit("value", this.value);
627
710
  }
@@ -631,19 +714,22 @@ var init_dist3 = __esm({
631
714
  _clearUserInput() {
632
715
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
633
716
  }
634
- onKeypress(t2, e) {
635
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
636
- if (this.opts.validate) {
637
- const s = this.opts.validate(this.value);
638
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
717
+ async onKeypress(t2, e) {
718
+ if (this.state !== "validating") {
719
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
720
+ if (this.opts.validate) {
721
+ const i2 = runValidation(this.opts.validate, this.value);
722
+ let s;
723
+ i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
724
+ }
725
+ this.state !== "error" && (this.state = "submit");
639
726
  }
640
- this.state !== "error" && (this.state = "submit");
727
+ isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
641
728
  }
642
- V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
643
729
  }
644
730
  close() {
645
731
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
646
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
732
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
647
733
  }
648
734
  restoreCursor() {
649
735
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -651,34 +737,39 @@ var init_dist3 = __esm({
651
737
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
652
738
  }
653
739
  render() {
654
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
740
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
741
+ hard: true,
742
+ trim: false
743
+ });
655
744
  if (t2 !== this._prevFrame) {
656
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
745
+ if (this.state === "initial")
746
+ this.output.write(import_sisteransi.cursor.hide);
657
747
  else {
658
- const e = j(this._prevFrame, t2), s = A(this.output);
748
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
659
749
  if (this.restoreCursor(), e) {
660
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
661
- let o = e.lines.find((a) => a >= i);
662
- if (o === void 0) {
750
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
751
+ let n2 = e.lines.find((o) => o >= s);
752
+ if (n2 === void 0) {
663
753
  this._prevFrame = t2;
664
754
  return;
665
755
  }
666
756
  if (e.lines.length === 1) {
667
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
668
- const a = t2.split(`
757
+ this.output.write(import_sisteransi.cursor.move(0, n2 - r2)), this.output.write(import_sisteransi.erase.lines(1));
758
+ const o = t2.split(`
669
759
  `);
670
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
760
+ this.output.write(o[n2]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n2 - 1));
671
761
  return;
672
762
  } else if (e.lines.length > 1) {
673
- if (i < n) o = i;
763
+ if (s < r2)
764
+ n2 = s;
674
765
  else {
675
- const h = o - n;
676
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
766
+ const h2 = n2 - r2;
767
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
677
768
  }
678
769
  this.output.write(import_sisteransi.erase.down());
679
- const a = t2.split(`
680
- `).slice(o);
681
- this.output.write(a.join(`
770
+ const f = t2.split(`
771
+ `).slice(n2);
772
+ this.output.write(f.join(`
682
773
  `)), this._prevFrame = t2;
683
774
  return;
684
775
  }
@@ -689,7 +780,7 @@ var init_dist3 = __esm({
689
780
  }
690
781
  }
691
782
  };
692
- Q = class extends p {
783
+ r = class extends y {
693
784
  get cursor() {
694
785
  return this.value ? 0 : 1;
695
786
  }
@@ -699,51 +790,55 @@ var init_dist3 = __esm({
699
790
  constructor(t2) {
700
791
  super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
701
792
  this.value = this._value;
702
- }), this.on("confirm", (e) => {
703
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
793
+ }), this.on("confirm", (i2) => {
794
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
704
795
  }), this.on("cursor", () => {
705
796
  this.value = !this.value;
706
797
  });
707
798
  }
708
799
  };
709
- it = class extends p {
800
+ a = class extends y {
710
801
  options;
711
802
  cursor = 0;
712
803
  get _value() {
713
- return this.options[this.cursor].value;
804
+ return this.options[this.cursor]?.value;
714
805
  }
715
806
  get _enabledOptions() {
716
- return this.options.filter((t2) => t2.disabled !== true);
807
+ return this.options.filter((e) => e.disabled !== true);
717
808
  }
718
809
  toggleAll() {
719
- const t2 = this._enabledOptions, e = this.value !== void 0 && this.value.length === t2.length;
720
- this.value = e ? [] : t2.map((s) => s.value);
810
+ const e = this._enabledOptions, i2 = this.value !== void 0 && this.value.length === e.length;
811
+ this.value = i2 ? [] : e.map((t2) => t2.value);
721
812
  }
722
813
  toggleInvert() {
723
- const t2 = this.value;
724
- if (!t2) return;
725
- const e = this._enabledOptions.filter((s) => !t2.includes(s.value));
726
- this.value = e.map((s) => s.value);
814
+ const e = this.value;
815
+ if (!e)
816
+ return;
817
+ const i2 = this._enabledOptions.filter((t2) => !e.includes(t2.value));
818
+ this.value = i2.map((t2) => t2.value);
727
819
  }
728
820
  toggleValue() {
729
821
  this.value === void 0 && (this.value = []);
730
- const t2 = this.value.includes(this._value);
731
- this.value = t2 ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
732
- }
733
- constructor(t2) {
734
- super(t2, false), this.options = t2.options, this.value = [...t2.initialValues ?? []];
735
- const e = Math.max(this.options.findIndex(({ value: s }) => s === t2.cursorAt), 0);
736
- this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.on("key", (s) => {
737
- s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
738
- }), this.on("cursor", (s) => {
739
- switch (s) {
822
+ const e = this.value.includes(this._value);
823
+ this.value = e ? this.value.filter((i2) => i2 !== this._value) : [...this.value, this._value];
824
+ }
825
+ constructor(e) {
826
+ super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
827
+ const i2 = Math.max(
828
+ this.options.findIndex(({ value: t2 }) => t2 === e.cursorAt),
829
+ 0
830
+ );
831
+ this.cursor = this.options[i2]?.disabled ? findCursor(i2, 1, this.options) : i2, this.on("key", (t2, l2) => {
832
+ l2.name === "a" && this.toggleAll(), l2.name === "i" && this.toggleInvert();
833
+ }), this.on("cursor", (t2) => {
834
+ switch (t2) {
740
835
  case "left":
741
836
  case "up":
742
- this.cursor = d(this.cursor, -1, this.options);
837
+ this.cursor = findCursor(this.cursor, -1, this.options);
743
838
  break;
744
839
  case "down":
745
840
  case "right":
746
- this.cursor = d(this.cursor, 1, this.options);
841
+ this.cursor = findCursor(this.cursor, 1, this.options);
747
842
  break;
748
843
  case "space":
749
844
  this.toggleValue();
@@ -755,307 +850,487 @@ var init_dist3 = __esm({
755
850
  }
756
851
  });
757
852
 
758
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
759
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
760
- import P2 from "node:process";
761
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
762
- import { dirname as be, join as Qe } from "node:path";
763
- function Ze() {
764
- return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
853
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
854
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
855
+ import process$1 from "node:process";
856
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
857
+ import { dirname, join } from "node:path";
858
+ function isUnicodeSupported() {
859
+ if (process$1.platform !== "win32") {
860
+ return process$1.env.TERM !== "linux";
861
+ }
862
+ return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
863
+ }
864
+ function formatInstructionFooter(o, e) {
865
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
866
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
765
867
  }
766
- var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, ot2, O2, pt, mt, gt, Q2, yt, ft, vt, wt, Ct, fe, Ve, je;
868
+ var import_sisteransi2, unicode, isCI, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, m, multiselect, log, cancel, intro, outro, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, i;
767
869
  var init_dist4 = __esm({
768
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
870
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
769
871
  init_utils2();
770
872
  init_dist3();
771
873
  init_dist3();
772
874
  init_main();
773
875
  init_dist2();
774
876
  import_sisteransi2 = __toESM(require_src(), 1);
775
- ee = Ze();
776
- ae = () => process.env.CI === "true";
777
- w2 = (e, i) => ee ? e : i;
778
- _e = w2("\u25C6", "*");
779
- oe = w2("\u25A0", "x");
780
- ue = w2("\u25B2", "x");
781
- F = w2("\u25C7", "o");
782
- le = w2("\u250C", "T");
783
- d2 = w2("\u2502", "|");
784
- E2 = w2("\u2514", "\u2014");
785
- Ie = w2("\u2510", "T");
786
- Ee = w2("\u2518", "\u2014");
787
- z2 = w2("\u25CF", ">");
788
- H2 = w2("\u25CB", " ");
789
- te = w2("\u25FB", "[\u2022]");
790
- U = w2("\u25FC", "[+]");
791
- J = w2("\u25FB", "[ ]");
792
- xe = w2("\u25AA", "\u2022");
793
- se = w2("\u2500", "-");
794
- ce = w2("\u256E", "+");
795
- Ge = w2("\u251C", "+");
796
- $e = w2("\u256F", "+");
797
- de = w2("\u2570", "+");
798
- Oe = w2("\u256D", "+");
799
- he = w2("\u25CF", "\u2022");
800
- pe = w2("\u25C6", "*");
801
- me = w2("\u25B2", "!");
802
- ge = w2("\u25A0", "x");
803
- V2 = (e) => {
804
- switch (e) {
877
+ unicode = isUnicodeSupported();
878
+ isCI = () => process.env.CI === "true";
879
+ unicodeOr = (o, e) => unicode ? o : e;
880
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
881
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
882
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
883
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
884
+ S_BAR_START = unicodeOr("\u250C", "T");
885
+ S_BAR = unicodeOr("\u2502", "|");
886
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
887
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
888
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
889
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
890
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
891
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
892
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
893
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
894
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
895
+ S_BAR_H = unicodeOr("\u2500", "-");
896
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
897
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
898
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
899
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
900
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
901
+ S_INFO = unicodeOr("\u25CF", "\u2022");
902
+ S_SUCCESS = unicodeOr("\u25C6", "*");
903
+ S_WARN = unicodeOr("\u25B2", "!");
904
+ S_ERROR = unicodeOr("\u25A0", "x");
905
+ symbol = (o) => {
906
+ switch (o) {
805
907
  case "initial":
806
908
  case "active":
807
- return t("cyan", _e);
909
+ return styleText2("cyan", S_STEP_ACTIVE);
808
910
  case "cancel":
809
- return t("red", oe);
911
+ return styleText2("red", S_STEP_CANCEL);
810
912
  case "error":
811
- return t("yellow", ue);
913
+ return styleText2("yellow", S_STEP_ERROR);
812
914
  case "submit":
813
- return t("green", F);
915
+ return styleText2("green", S_STEP_SUBMIT);
916
+ case "validating":
917
+ return styleText2("dim", S_STEP_ACTIVE);
814
918
  }
815
919
  };
816
- ye = (e) => {
817
- switch (e) {
920
+ symbolBar = (o) => {
921
+ switch (o) {
818
922
  case "initial":
819
923
  case "active":
820
- return t("cyan", d2);
924
+ return styleText2("cyan", S_BAR);
821
925
  case "cancel":
822
- return t("red", d2);
926
+ return styleText2("red", S_BAR);
823
927
  case "error":
824
- return t("yellow", d2);
928
+ return styleText2("yellow", S_BAR);
825
929
  case "submit":
826
- return t("green", d2);
827
- }
828
- };
829
- et2 = (e, i, s, r, u2) => {
830
- let n = i, o = 0;
831
- for (let c2 = s; c2 < r; c2++) {
832
- const a = e[c2];
833
- if (n = n - a.length, o++, n <= u2) break;
834
- }
835
- return { lineCount: n, removals: o };
836
- };
837
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
838
- const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
839
- let p2 = 0;
840
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
841
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
842
- const S2 = Math.min(p2 + y2, i.length), h = [];
930
+ return styleText2("green", S_BAR);
931
+ }
932
+ };
933
+ I = (l2, e, w, p, b, C2 = false) => {
934
+ let r2 = e, O = 0;
935
+ if (C2)
936
+ for (let i2 = p - 1; i2 >= w; i2--) {
937
+ const m2 = l2[i2];
938
+ if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
939
+ }
940
+ else
941
+ for (let i2 = w; i2 < p; i2++) {
942
+ const m2 = l2[i2];
943
+ if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
944
+ }
945
+ return { lineCount: r2, removals: O };
946
+ };
947
+ limitOptions = ({
948
+ cursor: l2,
949
+ options: e,
950
+ style: w,
951
+ output: p = process.stdout,
952
+ maxItems: b = Number.POSITIVE_INFINITY,
953
+ columnPadding: C2 = 0,
954
+ rowPadding: r2 = 4
955
+ }) => {
956
+ const i2 = getColumns(p) - C2, m2 = getRows(p), M = styleText2("dim", "..."), v = Math.max(m2 - r2, 0), a2 = Math.max(Math.min(b, v), 5);
843
957
  let f = 0;
844
- m && f++, g && f++;
845
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
846
- for (let b = v; b < T; b++) {
847
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
958
+ l2 >= a2 - 3 && (f = Math.max(
959
+ Math.min(l2 - a2 + 3, e.length - a2),
960
+ 0
961
+ ));
962
+ let d = a2 < e.length && f > 0, c = a2 < e.length && f + a2 < e.length;
963
+ const W2 = Math.min(
964
+ f + a2,
965
+ e.length
966
+ ), s = [];
967
+ let g = 0;
968
+ d && g++, c && g++;
969
+ const T = f + (d ? 1 : 0), y2 = W2 - (c ? 1 : 0);
970
+ for (let t2 = T; t2 < y2; t2++) {
971
+ const n2 = e[t2], o = n2 ? w(n2, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
972
+ hard: true,
973
+ trim: false
974
+ }).split(`
848
975
  `);
849
- h.push(x), f += x.length;
850
- }
851
- if (f > $2) {
852
- let b = 0, x = 0, G2 = f;
853
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
854
- m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
855
- }
856
- const C2 = [];
857
- m && C2.push(l);
858
- for (const b of h) for (const x of b) C2.push(x);
859
- return g && C2.push(l), C2;
860
- };
861
- ot2 = (e) => {
862
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
863
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
864
- const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
865
- ` : ""}${o}
866
- `, a = this.value ? i : s;
867
- switch (this.state) {
868
- case "submit": {
869
- const l = r ? `${t("gray", d2)} ` : "";
870
- return `${c2}${l}${t("dim", a)}`;
871
- }
872
- case "cancel": {
873
- const l = r ? `${t("gray", d2)} ` : "";
874
- return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
875
- ${t("gray", d2)}` : ""}`;
976
+ s.push(h2), g += h2.length;
977
+ }
978
+ if (g > v) {
979
+ let t2 = 0, n2 = 0, o = g;
980
+ const h2 = l2 - T;
981
+ let u3 = v;
982
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
983
+ s,
984
+ o,
985
+ h2 + 1,
986
+ s.length,
987
+ u3,
988
+ true
989
+ );
990
+ d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c || (u3 -= 1), { lineCount: o, removals: n2 } = E())) : (c || (u3 -= 1), { lineCount: o, removals: n2 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n2 > 0 && (c = true, s.splice(s.length - n2, n2));
991
+ }
992
+ const x = [];
993
+ d && x.push(M);
994
+ for (const t2 of s)
995
+ for (const n2 of t2)
996
+ x.push(n2);
997
+ return c && x.push(M), x;
998
+ };
999
+ confirm = (i2) => {
1000
+ const a2 = i2.active ?? "Yes", s = i2.inactive ?? "No";
1001
+ return new r({
1002
+ active: a2,
1003
+ inactive: s,
1004
+ signal: i2.signal,
1005
+ input: i2.input,
1006
+ output: i2.output,
1007
+ initialValue: i2.initialValue ?? true,
1008
+ render() {
1009
+ const e = i2.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = e ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
1010
+ i2.output,
1011
+ i2.message,
1012
+ l2,
1013
+ u3
1014
+ ), o = `${e ? `${styleText2("gray", S_BAR)}
1015
+ ` : ""}${f}
1016
+ `, c = this.value ? a2 : s;
1017
+ switch (this.state) {
1018
+ case "submit": {
1019
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
1020
+ return `${o}${r2}${styleText2("dim", c)}`;
1021
+ }
1022
+ case "cancel": {
1023
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
1024
+ return `${o}${r2}${styleText2(["strikethrough", "dim"], c)}${e ? `
1025
+ ${styleText2("gray", S_BAR)}` : ""}`;
1026
+ }
1027
+ default: {
1028
+ const r2 = e ? `${styleText2("cyan", S_BAR)} ` : "", g = e ? styleText2("cyan", S_BAR_END) : "";
1029
+ return `${o}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${i2.vertical ? e ? `
1030
+ ${styleText2("cyan", S_BAR)} ` : `
1031
+ ` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", s)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${s}`}
1032
+ ${g}
1033
+ `;
1034
+ }
876
1035
  }
877
- default: {
878
- const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
879
- return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
880
- ${t("cyan", d2)} ` : `
881
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
882
- ${$2}
1036
+ }
1037
+ }).prompt();
1038
+ };
1039
+ MULTISELECT_INSTRUCTIONS = [
1040
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1041
+ `${styleText2("dim", "Space:")} select`,
1042
+ `${styleText2("dim", "Enter:")} confirm`
1043
+ ];
1044
+ m = (i2, u3) => i2.split(`
1045
+ `).map((d) => u3(d)).join(`
1046
+ `);
1047
+ multiselect = (i2) => {
1048
+ const u3 = (t2, a2) => {
1049
+ const r2 = t2.label ?? String(t2.value);
1050
+ return a2 === "disabled" ? `${styleText2("gray", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2(["strikethrough", "gray"], o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint ?? "disabled"})`)}` : ""}` : a2 === "active" ? `${styleText2("cyan", S_CHECKBOX_ACTIVE)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${m(r2, (o) => styleText2("dim", o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "cancelled" ? `${m(r2, (o) => styleText2(["strikethrough", "dim"], o))}` : a2 === "active-selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "submitted" ? `${m(r2, (o) => styleText2("dim", o))}` : `${styleText2("dim", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2("dim", o))}`;
1051
+ }, d = i2.required ?? true, v = i2.showInstructions ?? true;
1052
+ return new a({
1053
+ options: i2.options,
1054
+ signal: i2.signal,
1055
+ input: i2.input,
1056
+ output: i2.output,
1057
+ initialValues: i2.initialValues,
1058
+ required: d,
1059
+ cursorAt: i2.cursorAt,
1060
+ validate(t2) {
1061
+ if (d && (t2 === void 0 || t2.length === 0))
1062
+ return `Please select at least one option.
1063
+ ${styleText2(
1064
+ "reset",
1065
+ styleText2(
1066
+ "dim",
1067
+ `Press ${styleText2(["gray", "bgWhite", "inverse"], " space ")} to select, ${styleText2(
1068
+ "gray",
1069
+ styleText2("bgWhite", styleText2("inverse", " enter "))
1070
+ )} to submit`
1071
+ )
1072
+ )}`;
1073
+ },
1074
+ render() {
1075
+ const t2 = i2.withGuide ?? settings.withGuide, a2 = wrapTextWithPrefix(
1076
+ i2.output,
1077
+ i2.message,
1078
+ t2 ? `${symbolBar(this.state)} ` : "",
1079
+ `${symbol(this.state)} `
1080
+ ), r2 = `${t2 ? `${styleText2("gray", S_BAR)}
1081
+ ` : ""}${a2}
1082
+ `, o = this.value ?? [], p = (n2, l2) => {
1083
+ if (n2.disabled)
1084
+ return u3(n2, "disabled");
1085
+ const s = o.includes(n2.value);
1086
+ return l2 && s ? u3(n2, "active-selected") : s ? u3(n2, "selected") : u3(n2, l2 ? "active" : "inactive");
1087
+ };
1088
+ switch (this.state) {
1089
+ case "submit": {
1090
+ const n2 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "submitted")).join(styleText2("dim", ", ")) || styleText2("dim", "none"), l2 = wrapTextWithPrefix(
1091
+ i2.output,
1092
+ n2,
1093
+ t2 ? `${styleText2("gray", S_BAR)} ` : ""
1094
+ );
1095
+ return `${r2}${l2}`;
1096
+ }
1097
+ case "cancel": {
1098
+ const n2 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "cancelled")).join(styleText2("dim", ", "));
1099
+ if (n2.trim() === "")
1100
+ return `${r2}${styleText2("gray", S_BAR)}`;
1101
+ const l2 = wrapTextWithPrefix(
1102
+ i2.output,
1103
+ n2,
1104
+ t2 ? `${styleText2("gray", S_BAR)} ` : ""
1105
+ );
1106
+ return `${r2}${l2}${t2 ? `
1107
+ ${styleText2("gray", S_BAR)}` : ""}`;
1108
+ }
1109
+ case "error": {
1110
+ const n2 = t2 ? `${styleText2("yellow", S_BAR)} ` : "", l2 = this.error.split(`
1111
+ `).map(
1112
+ ($, C2) => C2 === 0 ? `${t2 ? `${styleText2("yellow", S_BAR_END)} ` : ""}${styleText2("yellow", $)}` : ` ${$}`
1113
+ ).join(`
1114
+ `), s = r2.split(`
1115
+ `).length, h2 = l2.split(`
1116
+ `).length + 1;
1117
+ return `${r2}${n2}${limitOptions({
1118
+ output: i2.output,
1119
+ options: this.options,
1120
+ cursor: this.cursor,
1121
+ maxItems: i2.maxItems,
1122
+ columnPadding: n2.length,
1123
+ rowPadding: s + h2,
1124
+ style: p
1125
+ }).join(`
1126
+ ${n2}`)}
1127
+ ${l2}
1128
+ `;
1129
+ }
1130
+ default: {
1131
+ const n2 = t2 ? `${styleText2("cyan", S_BAR)} ` : "", l2 = r2.split(`
1132
+ `).length, s = v ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t2) : t2 ? [styleText2("cyan", S_BAR_END)] : [], h2 = s.join(`
1133
+ `), $ = s.length + 1;
1134
+ return `${r2}${n2}${limitOptions({
1135
+ output: i2.output,
1136
+ options: this.options,
1137
+ cursor: this.cursor,
1138
+ maxItems: i2.maxItems,
1139
+ columnPadding: n2.length,
1140
+ rowPadding: l2 + $,
1141
+ style: p
1142
+ }).join(`
1143
+ ${n2}`)}
1144
+ ${h2}
883
1145
  `;
1146
+ }
884
1147
  }
885
1148
  }
886
- } }).prompt();
1149
+ }).prompt();
887
1150
  };
888
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
889
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
890
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
891
- const y2 = Array.isArray(e) ? e : e.split(`
1151
+ log = {
1152
+ message: (s = [], {
1153
+ symbol: e = styleText2("gray", S_BAR),
1154
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
1155
+ output: m2 = process.stdout,
1156
+ spacing: l2 = 1,
1157
+ withGuide: c
1158
+ } = {}) => {
1159
+ const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
1160
+ for (let i2 = 0; i2 < l2; i2++)
1161
+ t2.push(f);
1162
+ const g = Array.isArray(s) ? s : s.split(`
892
1163
  `);
893
- if (y2.length > 0) {
894
- const [p2, ...m] = y2;
895
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
896
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
897
- }
898
- r.write(`${o.join(`
1164
+ if (g.length > 0) {
1165
+ const [i2, ...y2] = g;
1166
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
1167
+ for (const p of y2)
1168
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
1169
+ }
1170
+ m2.write(`${t2.join(`
899
1171
  `)}
900
1172
  `);
901
- }, info: (e, i) => {
902
- O2.message(e, { ...i, symbol: t("blue", he) });
903
- }, success: (e, i) => {
904
- O2.message(e, { ...i, symbol: t("green", pe) });
905
- }, step: (e, i) => {
906
- O2.message(e, { ...i, symbol: t("green", F) });
907
- }, warn: (e, i) => {
908
- O2.message(e, { ...i, symbol: t("yellow", me) });
909
- }, warning: (e, i) => {
910
- O2.warn(e, i);
911
- }, error: (e, i) => {
912
- O2.message(e, { ...i, symbol: t("red", ge) });
913
- } };
914
- pt = (e = "", i) => {
915
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
916
- s.write(`${r}${t("red", e)}
1173
+ },
1174
+ info: (s, e) => {
1175
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
1176
+ },
1177
+ success: (s, e) => {
1178
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
1179
+ },
1180
+ step: (s, e) => {
1181
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1182
+ },
1183
+ warn: (s, e) => {
1184
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1185
+ },
1186
+ /** alias for `log.warn()`. */
1187
+ warning: (s, e) => {
1188
+ log.warn(s, e);
1189
+ },
1190
+ error: (s, e) => {
1191
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1192
+ }
1193
+ };
1194
+ cancel = (o = "", t2) => {
1195
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1196
+ i2.write(`${e}${styleText2("red", o)}
917
1197
 
918
1198
  `);
919
1199
  };
920
- mt = (e = "", i) => {
921
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
922
- s.write(`${r}${e}
1200
+ intro = (o = "", t2) => {
1201
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
1202
+ i2.write(`${e}${o}
923
1203
  `);
924
1204
  };
925
- gt = (e = "", i) => {
926
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
927
- ${t("gray", E2)} ` : "";
928
- s.write(`${r}${e}
1205
+ outro = (o = "", t2) => {
1206
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
1207
+ ${styleText2("gray", S_BAR_END)} ` : "";
1208
+ i2.write(`${e}${o}
929
1209
 
930
1210
  `);
931
1211
  };
932
- Q2 = (e, i) => e.split(`
933
- `).map((s) => i(s)).join(`
934
- `);
935
- yt = (e) => {
936
- const i = (r, u2) => {
937
- const n = r.label ?? String(r.value);
938
- return u2 === "disabled" ? `${t("gray", J)} ${Q2(n, (o) => t(["strikethrough", "gray"], o))}${r.hint ? ` ${t("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u2 === "active" ? `${t("cyan", te)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "selected" ? `${t("green", U)} ${Q2(n, (o) => t("dim", o))}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "cancelled" ? `${Q2(n, (o) => t(["strikethrough", "dim"], o))}` : u2 === "active-selected" ? `${t("green", U)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "submitted" ? `${Q2(n, (o) => t("dim", o))}` : `${t("dim", J)} ${Q2(n, (o) => t("dim", o))}`;
939
- }, s = e.required ?? true;
940
- return new it({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(r) {
941
- if (s && (r === void 0 || r.length === 0)) return `Please select at least one option.
942
- ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
943
- }, render() {
944
- const r = e.withGuide ?? u.withGuide, u2 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V2(this.state)} `), n = `${r ? `${t("gray", d2)}
945
- ` : ""}${u2}
946
- `, o = this.value ?? [], c2 = (a, l) => {
947
- if (a.disabled) return i(a, "disabled");
948
- const $2 = o.includes(a.value);
949
- return l && $2 ? i(a, "active-selected") : $2 ? i(a, "selected") : i(a, l ? "active" : "inactive");
950
- };
951
- switch (this.state) {
952
- case "submit": {
953
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "submitted")).join(t("dim", ", ")) || t("dim", "none"), l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
954
- return `${n}${l}`;
955
- }
956
- case "cancel": {
957
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "cancelled")).join(t("dim", ", "));
958
- if (a.trim() === "") return `${n}${t("gray", d2)}`;
959
- const l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
960
- return `${n}${l}${r ? `
961
- ${t("gray", d2)}` : ""}`;
962
- }
963
- case "error": {
964
- const a = r ? `${t("yellow", d2)} ` : "", l = this.error.split(`
965
- `).map((p2, m) => m === 0 ? `${r ? `${t("yellow", E2)} ` : ""}${t("yellow", p2)}` : ` ${p2}`).join(`
966
- `), $2 = n.split(`
967
- `).length, y2 = l.split(`
968
- `).length + 1;
969
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: $2 + y2, style: c2 }).join(`
970
- ${a}`)}
971
- ${l}
972
- `;
973
- }
974
- default: {
975
- const a = r ? `${t("cyan", d2)} ` : "", l = n.split(`
976
- `).length, $2 = r ? 2 : 1;
977
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: l + $2, style: c2 }).join(`
978
- ${a}`)}
979
- ${r ? t("cyan", E2) : ""}
980
- `;
981
- }
982
- }
983
- } }).prompt();
984
- };
985
- ft = (e) => t("dim", e);
986
- vt = (e, i, s) => {
987
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
988
- `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
989
- return wrapAnsi(e, c2, r);
990
- };
991
- wt = (e = "", i = "", s) => {
992
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
993
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
994
- const g = dist_default2(m);
995
- return g > p2 ? g : p2;
996
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
997
- `), $2 = u2 ? `${t("gray", d2)}
998
- ` : "", y2 = u2 ? Ge : de;
999
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
1000
- ${l}
1001
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
1002
- `);
1212
+ W$1 = (o) => o;
1213
+ C = (o, e, s) => {
1214
+ const a2 = {
1215
+ hard: true,
1216
+ trim: false
1217
+ }, i2 = wrapAnsi(o, e, a2).split(`
1218
+ `), c = i2.reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), u3 = i2.map(s).reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), g = e - (u3 - c);
1219
+ return wrapAnsi(o, g, a2);
1220
+ };
1221
+ note = (o = "", e = "", s) => {
1222
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c).split(`
1223
+ `).map(c), ""], n2 = dist_default2(e), t2 = Math.max(
1224
+ g.reduce((m2, F) => {
1225
+ const O = dist_default2(F);
1226
+ return O > m2 ? O : m2;
1227
+ }, 0),
1228
+ n2
1229
+ ) + 2, h2 = g.map(
1230
+ (m2) => `${styleText2("gray", S_BAR)} ${m2}${" ".repeat(t2 - dist_default2(m2))}${styleText2("gray", S_BAR)}`
1231
+ ).join(`
1232
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
1233
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
1234
+ a2.write(
1235
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
1236
+ "gray",
1237
+ S_BAR_H.repeat(Math.max(t2 - n2 - 1, 1)) + S_CORNER_TOP_RIGHT
1238
+ )}
1239
+ ${h2}
1240
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
1241
+ `
1242
+ );
1003
1243
  };
1004
- Ct = (e) => t("magenta", e);
1005
- fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
1006
- const l = ae();
1007
- let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
1008
- const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
1009
- const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
1010
- m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
1011
- }, C2 = () => T(2), b = () => T(1), x = () => {
1012
- process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
1013
- }, G2 = () => {
1014
- process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
1015
- }, M2 = () => {
1016
- if (S2 === void 0) return;
1017
- l && s.write(`
1244
+ W = (l2) => styleText2("magenta", l2);
1245
+ spinner = ({
1246
+ indicator: l2 = "dots",
1247
+ onCancel: h2,
1248
+ output: n2 = process.stdout,
1249
+ cancelMessage: G,
1250
+ errorMessage: O,
1251
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
1252
+ delay: F = unicode ? 80 : 120,
1253
+ signal: m2,
1254
+ ...I2
1255
+ } = {}) => {
1256
+ const u3 = isCI();
1257
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
1258
+ const x = getColumns(n2), k = I2?.styleFrame ?? W, g = (e) => {
1259
+ const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
1260
+ S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
1261
+ }, f = () => g(2), i2 = () => g(1), A = () => {
1262
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m2 && m2.addEventListener("abort", i2);
1263
+ }, H = () => {
1264
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m2 && m2.removeEventListener("abort", i2);
1265
+ }, y2 = () => {
1266
+ if (p === void 0) return;
1267
+ u3 && n2.write(`
1018
1268
  `);
1019
- const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
1269
+ const r2 = wrapAnsi(p, x, {
1270
+ hard: true,
1271
+ trim: false
1272
+ }).split(`
1020
1273
  `);
1021
- _2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
1022
- }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
1023
- const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
1024
- return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
1025
- }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
1026
- p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
1274
+ r2.length > 1 && n2.write(import_sisteransi2.cursor.up(r2.length - 1)), n2.write(import_sisteransi2.cursor.to(0)), n2.write(import_sisteransi2.erase.down());
1275
+ }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
1276
+ const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
1277
+ return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
1278
+ }, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
1279
+ d = true, M = block({ output: n2 }), s = C2(e), w = performance.now(), N && n2.write(`${styleText2("gray", S_BAR)}
1027
1280
  `);
1028
- let A2 = 0, k = 0;
1029
- x(), y2 = setInterval(() => {
1030
- if (l && g === S2) return;
1031
- M2(), S2 = g;
1032
- const L = v(n[A2]);
1033
- let Z;
1034
- if (l) Z = `${L} ${g}...`;
1035
- else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
1281
+ let r2 = 0, t2 = 0;
1282
+ A(), T = setInterval(() => {
1283
+ if (u3 && s === p)
1284
+ return;
1285
+ y2(), p = s;
1286
+ const o = k(E[r2]);
1287
+ let v;
1288
+ if (u3)
1289
+ v = `${o} ${s}...`;
1290
+ else if (l2 === "timer")
1291
+ v = `${o} ${s} ${_(w)}`;
1036
1292
  else {
1037
- const Be = ".".repeat(Math.floor(k)).slice(0, 3);
1038
- Z = `${L} ${g}${Be}`;
1039
- }
1040
- const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
1041
- s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
1042
- }, o);
1043
- }, W = (_2 = "", A2 = 0, k = false) => {
1044
- if (!p2) return;
1045
- p2 = false, clearInterval(y2), M2();
1046
- const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
1047
- g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
1048
- `) : s.write(`${L} ${g}
1049
- `)), G2(), $2();
1293
+ const B = ".".repeat(Math.floor(t2)).slice(0, 3);
1294
+ v = `${o} ${s}${B}`;
1295
+ }
1296
+ const j = wrapAnsi(v, x, {
1297
+ hard: true,
1298
+ trim: false
1299
+ });
1300
+ n2.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
1301
+ }, F);
1302
+ }, a2 = (e = "", r2 = 0, t2 = false) => {
1303
+ if (!d) return;
1304
+ d = false, clearInterval(T), y2();
1305
+ const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
1306
+ s = e ?? s, t2 || (l2 === "timer" ? n2.write(`${o} ${s} ${_(w)}
1307
+ `) : n2.write(`${o} ${s}
1308
+ `)), H(), M();
1309
+ };
1310
+ return {
1311
+ start: P,
1312
+ stop: (e = "") => a2(e, 0),
1313
+ message: (e = "") => {
1314
+ s = C2(e ?? s);
1315
+ },
1316
+ cancel: (e = "") => a2(e, 1),
1317
+ error: (e = "") => a2(e, 2),
1318
+ clear: () => a2("", 0, true),
1319
+ get isCancelled() {
1320
+ return S;
1321
+ }
1050
1322
  };
1051
- return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
1052
- g = R2(_2 ?? g);
1053
- }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
1054
- return m;
1055
- } };
1056
1323
  };
1057
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1058
- je = `${t("gray", d2)} `;
1324
+ u2 = {
1325
+ light: unicodeOr("\u2500", "-"),
1326
+ heavy: unicodeOr("\u2501", "="),
1327
+ block: unicodeOr("\u2588", "#")
1328
+ };
1329
+ SELECT_INSTRUCTIONS = [
1330
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1331
+ `${styleText2("dim", "Enter:")} confirm`
1332
+ ];
1333
+ i = `${styleText2("gray", S_BAR)} `;
1059
1334
  }
1060
1335
  });
1061
1336
 
@@ -1068,9 +1343,9 @@ function supportsColor() {
1068
1343
  }
1069
1344
  return process.stdout.isTTY === true;
1070
1345
  }
1071
- function colorize(text, color) {
1072
- if (!supportsColor()) return text;
1073
- return `${color}${text}${colors.reset}`;
1346
+ function colorize(text2, color) {
1347
+ if (!supportsColor()) return text2;
1348
+ return `${color}${text2}${colors.reset}`;
1074
1349
  }
1075
1350
  function stringify(value) {
1076
1351
  if (typeof value === "string") return value;
@@ -1100,7 +1375,7 @@ function stringify(value) {
1100
1375
  function formatMessage(...args) {
1101
1376
  return args.map(stringify).join(" ");
1102
1377
  }
1103
- var colors, currentLogLevel, log, error, warn, info, success;
1378
+ var colors, currentLogLevel, log2, error, warn, info, success;
1104
1379
  var init_cli_output = __esm({
1105
1380
  "packages/tooling/src/utils/cli-output.ts"() {
1106
1381
  "use strict";
@@ -1133,7 +1408,7 @@ var init_cli_output = __esm({
1133
1408
  currentLogLevel = envLevel;
1134
1409
  }
1135
1410
  }
1136
- log = {
1411
+ log2 = {
1137
1412
  /**
1138
1413
  * Logs an error message (always shows unless Quiet level)
1139
1414
  * Uses clack's log.error + explicit red color
@@ -1141,7 +1416,7 @@ var init_cli_output = __esm({
1141
1416
  error(...args) {
1142
1417
  if (currentLogLevel < 0 /* Quiet */) return;
1143
1418
  const message = formatMessage(...args);
1144
- O2.error(colorize(message, colors.brightRed));
1419
+ log.error(colorize(message, colors.brightRed));
1145
1420
  },
1146
1421
  /**
1147
1422
  * Logs a warning message (shows at Normal level and above)
@@ -1150,7 +1425,7 @@ var init_cli_output = __esm({
1150
1425
  warn(...args) {
1151
1426
  if (currentLogLevel < 1 /* Normal */) return;
1152
1427
  const message = formatMessage(...args);
1153
- O2.warn(colorize(message, colors.brightYellow));
1428
+ log.warn(colorize(message, colors.brightYellow));
1154
1429
  },
1155
1430
  /**
1156
1431
  * Logs an info message (shows at Normal level and above)
@@ -1159,7 +1434,7 @@ var init_cli_output = __esm({
1159
1434
  info(...args) {
1160
1435
  if (currentLogLevel < 1 /* Normal */) return;
1161
1436
  const message = formatMessage(...args);
1162
- O2.info(colorize(message, colors.brightCyan));
1437
+ log.info(colorize(message, colors.brightCyan));
1163
1438
  },
1164
1439
  /**
1165
1440
  * Logs a success message (shows at Normal level and above)
@@ -1168,7 +1443,7 @@ var init_cli_output = __esm({
1168
1443
  success(...args) {
1169
1444
  if (currentLogLevel < 1 /* Normal */) return;
1170
1445
  const message = formatMessage(...args);
1171
- O2.success(colorize(message, colors.brightGreen));
1446
+ log.success(colorize(message, colors.brightGreen));
1172
1447
  },
1173
1448
  /**
1174
1449
  * Logs a debug message (only shows at Verbose level and above)
@@ -1177,7 +1452,7 @@ var init_cli_output = __esm({
1177
1452
  debug(...args) {
1178
1453
  if (currentLogLevel < 2 /* Verbose */) return;
1179
1454
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1180
- O2.message(
1455
+ log.message(
1181
1456
  colorize(
1182
1457
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1183
1458
  colors.gray
@@ -1191,7 +1466,7 @@ var init_cli_output = __esm({
1191
1466
  trace(...args) {
1192
1467
  if (currentLogLevel < 3 /* Debug */) return;
1193
1468
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1194
- O2.message(
1469
+ log.message(
1195
1470
  colorize(
1196
1471
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1197
1472
  colors.gray
@@ -1199,10 +1474,10 @@ var init_cli_output = __esm({
1199
1474
  );
1200
1475
  }
1201
1476
  };
1202
- error = log.error.bind(log);
1203
- warn = log.warn.bind(log);
1204
- info = log.info.bind(log);
1205
- success = log.success.bind(log);
1477
+ error = log2.error.bind(log2);
1478
+ warn = log2.warn.bind(log2);
1479
+ info = log2.info.bind(log2);
1480
+ success = log2.success.bind(log2);
1206
1481
  }
1207
1482
  });
1208
1483
 
@@ -1562,9 +1837,9 @@ var require_is_glob = __commonJS({
1562
1837
  index += 2;
1563
1838
  var close = chars[open];
1564
1839
  if (close) {
1565
- var n = str.indexOf(close, index);
1566
- if (n !== -1) {
1567
- index = n + 1;
1840
+ var n2 = str.indexOf(close, index);
1841
+ if (n2 !== -1) {
1842
+ index = n2 + 1;
1568
1843
  }
1569
1844
  }
1570
1845
  if (str[index] === "!") {
@@ -1590,9 +1865,9 @@ var require_is_glob = __commonJS({
1590
1865
  index += 2;
1591
1866
  var close = chars[open];
1592
1867
  if (close) {
1593
- var n = str.indexOf(close, index);
1594
- if (n !== -1) {
1595
- index = n + 1;
1868
+ var n2 = str.indexOf(close, index);
1869
+ if (n2 !== -1) {
1870
+ index = n2 + 1;
1596
1871
  }
1597
1872
  }
1598
1873
  if (str[index] === "!") {
@@ -1670,8 +1945,8 @@ var require_utils = __commonJS({
1670
1945
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1671
1946
  return (Number(max) - Number(min)) / Number(step) >= limit;
1672
1947
  };
1673
- exports.escapeNode = (block, n = 0, type) => {
1674
- const node = block.nodes[n];
1948
+ exports.escapeNode = (block2, n2 = 0, type) => {
1949
+ const node = block2.nodes[n2];
1675
1950
  if (!node) return;
1676
1951
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1677
1952
  if (node.escaped !== true) {
@@ -1688,15 +1963,15 @@ var require_utils = __commonJS({
1688
1963
  }
1689
1964
  return false;
1690
1965
  };
1691
- exports.isInvalidBrace = (block) => {
1692
- if (block.type !== "brace") return false;
1693
- if (block.invalid === true || block.dollar) return true;
1694
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1695
- block.invalid = true;
1966
+ exports.isInvalidBrace = (block2) => {
1967
+ if (block2.type !== "brace") return false;
1968
+ if (block2.invalid === true || block2.dollar) return true;
1969
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1970
+ block2.invalid = true;
1696
1971
  return true;
1697
1972
  }
1698
- if (block.open !== true || block.close !== true) {
1699
- block.invalid = true;
1973
+ if (block2.open !== true || block2.close !== true) {
1974
+ block2.invalid = true;
1700
1975
  return true;
1701
1976
  }
1702
1977
  return false;
@@ -1715,8 +1990,8 @@ var require_utils = __commonJS({
1715
1990
  exports.flatten = (...args) => {
1716
1991
  const result = [];
1717
1992
  const flat = (arr) => {
1718
- for (let i = 0; i < arr.length; i++) {
1719
- const ele = arr[i];
1993
+ for (let i2 = 0; i2 < arr.length; i2++) {
1994
+ const ele = arr[i2];
1720
1995
  if (Array.isArray(ele)) {
1721
1996
  flat(ele);
1722
1997
  continue;
@@ -1810,9 +2085,9 @@ var require_to_regex_range = __commonJS({
1810
2085
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1811
2086
  return toRegexRange.cache[cacheKey].result;
1812
2087
  }
1813
- let a = Math.min(min, max);
2088
+ let a2 = Math.min(min, max);
1814
2089
  let b = Math.max(min, max);
1815
- if (Math.abs(a - b) === 1) {
2090
+ if (Math.abs(a2 - b) === 1) {
1816
2091
  let result = min + "|" + max;
1817
2092
  if (opts.capture) {
1818
2093
  return `(${result})`;
@@ -1823,20 +2098,20 @@ var require_to_regex_range = __commonJS({
1823
2098
  return `(?:${result})`;
1824
2099
  }
1825
2100
  let isPadded = hasPadding(min) || hasPadding(max);
1826
- let state = { min, max, a, b };
2101
+ let state = { min, max, a: a2, b };
1827
2102
  let positives = [];
1828
2103
  let negatives = [];
1829
2104
  if (isPadded) {
1830
2105
  state.isPadded = isPadded;
1831
2106
  state.maxLen = String(state.max).length;
1832
2107
  }
1833
- if (a < 0) {
2108
+ if (a2 < 0) {
1834
2109
  let newMin = b < 0 ? Math.abs(b) : 1;
1835
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1836
- a = state.a = 0;
2110
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
2111
+ a2 = state.a = 0;
1837
2112
  }
1838
2113
  if (b >= 0) {
1839
- positives = splitToPatterns(a, b, state, opts);
2114
+ positives = splitToPatterns(a2, b, state, opts);
1840
2115
  }
1841
2116
  state.negatives = negatives;
1842
2117
  state.positives = positives;
@@ -1884,8 +2159,8 @@ var require_to_regex_range = __commonJS({
1884
2159
  let digits = zipped.length;
1885
2160
  let pattern = "";
1886
2161
  let count = 0;
1887
- for (let i = 0; i < digits; i++) {
1888
- let [startDigit, stopDigit] = zipped[i];
2162
+ for (let i2 = 0; i2 < digits; i2++) {
2163
+ let [startDigit, stopDigit] = zipped[i2];
1889
2164
  if (startDigit === stopDigit) {
1890
2165
  pattern += startDigit;
1891
2166
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1904,8 +2179,8 @@ var require_to_regex_range = __commonJS({
1904
2179
  let tokens = [];
1905
2180
  let start = min;
1906
2181
  let prev;
1907
- for (let i = 0; i < ranges.length; i++) {
1908
- let max2 = ranges[i];
2182
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2183
+ let max2 = ranges[i2];
1909
2184
  let obj = rangeToPattern(String(start), String(max2), options);
1910
2185
  let zeros = "";
1911
2186
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1940,13 +2215,13 @@ var require_to_regex_range = __commonJS({
1940
2215
  }
1941
2216
  return result;
1942
2217
  }
1943
- function zip(a, b) {
2218
+ function zip(a2, b) {
1944
2219
  let arr = [];
1945
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2220
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1946
2221
  return arr;
1947
2222
  }
1948
- function compare(a, b) {
1949
- return a > b ? 1 : b > a ? -1 : 0;
2223
+ function compare(a2, b) {
2224
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1950
2225
  }
1951
2226
  function contains(arr, key, val) {
1952
2227
  return arr.some((ele) => ele[key] === val);
@@ -1964,8 +2239,8 @@ var require_to_regex_range = __commonJS({
1964
2239
  }
1965
2240
  return "";
1966
2241
  }
1967
- function toCharacterClass(a, b, options) {
1968
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2242
+ function toCharacterClass(a2, b, options) {
2243
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1969
2244
  }
1970
2245
  function hasPadding(str) {
1971
2246
  return /^-?(0+)\d/.test(str);
@@ -2044,8 +2319,8 @@ var require_fill_range = __commonJS({
2044
2319
  return negative ? "-" + input : input;
2045
2320
  };
2046
2321
  var toSequence = (parts, options, maxLen) => {
2047
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2048
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2322
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2323
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2049
2324
  let prefix = options.capture ? "" : "?:";
2050
2325
  let positives = "";
2051
2326
  let negatives = "";
@@ -2066,12 +2341,12 @@ var require_fill_range = __commonJS({
2066
2341
  }
2067
2342
  return result;
2068
2343
  };
2069
- var toRange = (a, b, isNumbers, options) => {
2344
+ var toRange = (a2, b, isNumbers, options) => {
2070
2345
  if (isNumbers) {
2071
- return toRegexRange(a, b, { wrap: false, ...options });
2346
+ return toRegexRange(a2, b, { wrap: false, ...options });
2072
2347
  }
2073
- let start = String.fromCharCode(a);
2074
- if (a === b) return start;
2348
+ let start = String.fromCharCode(a2);
2349
+ if (a2 === b) return start;
2075
2350
  let stop = String.fromCharCode(b);
2076
2351
  return `[${start}-${stop}]`;
2077
2352
  };
@@ -2097,15 +2372,15 @@ var require_fill_range = __commonJS({
2097
2372
  return [];
2098
2373
  };
2099
2374
  var fillNumbers = (start, end, step = 1, options = {}) => {
2100
- let a = Number(start);
2375
+ let a2 = Number(start);
2101
2376
  let b = Number(end);
2102
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2377
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2103
2378
  if (options.strictRanges === true) throw rangeError([start, end]);
2104
2379
  return [];
2105
2380
  }
2106
- if (a === 0) a = 0;
2381
+ if (a2 === 0) a2 = 0;
2107
2382
  if (b === 0) b = 0;
2108
- let descending = a > b;
2383
+ let descending = a2 > b;
2109
2384
  let startString = String(start);
2110
2385
  let endString = String(end);
2111
2386
  let stepString = String(step);
@@ -2121,13 +2396,13 @@ var require_fill_range = __commonJS({
2121
2396
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2122
2397
  let range = [];
2123
2398
  let index = 0;
2124
- while (descending ? a >= b : a <= b) {
2399
+ while (descending ? a2 >= b : a2 <= b) {
2125
2400
  if (options.toRegex === true && step > 1) {
2126
- push(a);
2401
+ push(a2);
2127
2402
  } else {
2128
- range.push(pad(format(a, index), maxLen, toNumber));
2403
+ range.push(pad(format(a2, index), maxLen, toNumber));
2129
2404
  }
2130
- a = descending ? a - step : a + step;
2405
+ a2 = descending ? a2 - step : a2 + step;
2131
2406
  index++;
2132
2407
  }
2133
2408
  if (options.toRegex === true) {
@@ -2140,19 +2415,19 @@ var require_fill_range = __commonJS({
2140
2415
  return invalidRange(start, end, options);
2141
2416
  }
2142
2417
  let format = options.transform || ((val) => String.fromCharCode(val));
2143
- let a = `${start}`.charCodeAt(0);
2418
+ let a2 = `${start}`.charCodeAt(0);
2144
2419
  let b = `${end}`.charCodeAt(0);
2145
- let descending = a > b;
2146
- let min = Math.min(a, b);
2147
- let max = Math.max(a, b);
2420
+ let descending = a2 > b;
2421
+ let min = Math.min(a2, b);
2422
+ let max = Math.max(a2, b);
2148
2423
  if (options.toRegex && step === 1) {
2149
2424
  return toRange(min, max, false, options);
2150
2425
  }
2151
2426
  let range = [];
2152
2427
  let index = 0;
2153
- while (descending ? a >= b : a <= b) {
2154
- range.push(format(a, index));
2155
- a = descending ? a - step : a + step;
2428
+ while (descending ? a2 >= b : a2 <= b) {
2429
+ range.push(format(a2, index));
2430
+ a2 = descending ? a2 - step : a2 + step;
2156
2431
  index++;
2157
2432
  }
2158
2433
  if (options.toRegex === true) {
@@ -2275,18 +2550,18 @@ var require_expand = __commonJS({
2275
2550
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2276
2551
  const walk = (node, parent = {}) => {
2277
2552
  node.queue = [];
2278
- let p2 = parent;
2279
- let q2 = parent.queue;
2280
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2281
- p2 = p2.parent;
2282
- q2 = p2.queue;
2553
+ let p = parent;
2554
+ let q = parent.queue;
2555
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2556
+ p = p.parent;
2557
+ q = p.queue;
2283
2558
  }
2284
2559
  if (node.invalid || node.dollar) {
2285
- q2.push(append(q2.pop(), stringify2(node, options)));
2560
+ q.push(append(q.pop(), stringify2(node, options)));
2286
2561
  return;
2287
2562
  }
2288
2563
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2289
- q2.push(append(q2.pop(), ["{}"]));
2564
+ q.push(append(q.pop(), ["{}"]));
2290
2565
  return;
2291
2566
  }
2292
2567
  if (node.nodes && node.ranges > 0) {
@@ -2298,26 +2573,26 @@ var require_expand = __commonJS({
2298
2573
  if (range.length === 0) {
2299
2574
  range = stringify2(node, options);
2300
2575
  }
2301
- q2.push(append(q2.pop(), range));
2576
+ q.push(append(q.pop(), range));
2302
2577
  node.nodes = [];
2303
2578
  return;
2304
2579
  }
2305
2580
  const enclose = utils.encloseBrace(node);
2306
2581
  let queue = node.queue;
2307
- let block = node;
2308
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2309
- block = block.parent;
2310
- queue = block.queue;
2582
+ let block2 = node;
2583
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2584
+ block2 = block2.parent;
2585
+ queue = block2.queue;
2311
2586
  }
2312
- for (let i = 0; i < node.nodes.length; i++) {
2313
- const child = node.nodes[i];
2587
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2588
+ const child = node.nodes[i2];
2314
2589
  if (child.type === "comma" && node.type === "brace") {
2315
- if (i === 1) queue.push("");
2590
+ if (i2 === 1) queue.push("");
2316
2591
  queue.push("");
2317
2592
  continue;
2318
2593
  }
2319
2594
  if (child.type === "close") {
2320
- q2.push(append(q2.pop(), queue, enclose));
2595
+ q.push(append(q.pop(), queue, enclose));
2321
2596
  continue;
2322
2597
  }
2323
2598
  if (child.value && child.type !== "open") {
@@ -2484,7 +2759,7 @@ var require_parse = __commonJS({
2484
2759
  }
2485
2760
  const ast = { type: "root", input, nodes: [] };
2486
2761
  const stack = [ast];
2487
- let block = ast;
2762
+ let block2 = ast;
2488
2763
  let prev = ast;
2489
2764
  let brackets = 0;
2490
2765
  const length = input.length;
@@ -2500,15 +2775,15 @@ var require_parse = __commonJS({
2500
2775
  prev.value += node.value;
2501
2776
  return;
2502
2777
  }
2503
- block.nodes.push(node);
2504
- node.parent = block;
2778
+ block2.nodes.push(node);
2779
+ node.parent = block2;
2505
2780
  node.prev = prev;
2506
2781
  prev = node;
2507
2782
  return node;
2508
2783
  };
2509
2784
  push({ type: "bos" });
2510
2785
  while (index < length) {
2511
- block = stack[stack.length - 1];
2786
+ block2 = stack[stack.length - 1];
2512
2787
  value = advance();
2513
2788
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2514
2789
  continue;
@@ -2545,19 +2820,19 @@ var require_parse = __commonJS({
2545
2820
  continue;
2546
2821
  }
2547
2822
  if (value === CHAR_LEFT_PARENTHESES) {
2548
- block = push({ type: "paren", nodes: [] });
2549
- stack.push(block);
2823
+ block2 = push({ type: "paren", nodes: [] });
2824
+ stack.push(block2);
2550
2825
  push({ type: "text", value });
2551
2826
  continue;
2552
2827
  }
2553
2828
  if (value === CHAR_RIGHT_PARENTHESES) {
2554
- if (block.type !== "paren") {
2829
+ if (block2.type !== "paren") {
2555
2830
  push({ type: "text", value });
2556
2831
  continue;
2557
2832
  }
2558
- block = stack.pop();
2833
+ block2 = stack.pop();
2559
2834
  push({ type: "text", value });
2560
- block = stack[stack.length - 1];
2835
+ block2 = stack[stack.length - 1];
2561
2836
  continue;
2562
2837
  }
2563
2838
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2582,7 +2857,7 @@ var require_parse = __commonJS({
2582
2857
  }
2583
2858
  if (value === CHAR_LEFT_CURLY_BRACE) {
2584
2859
  depth++;
2585
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2860
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2586
2861
  const brace = {
2587
2862
  type: "brace",
2588
2863
  open: true,
@@ -2593,52 +2868,52 @@ var require_parse = __commonJS({
2593
2868
  ranges: 0,
2594
2869
  nodes: []
2595
2870
  };
2596
- block = push(brace);
2597
- stack.push(block);
2871
+ block2 = push(brace);
2872
+ stack.push(block2);
2598
2873
  push({ type: "open", value });
2599
2874
  continue;
2600
2875
  }
2601
2876
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2602
- if (block.type !== "brace") {
2877
+ if (block2.type !== "brace") {
2603
2878
  push({ type: "text", value });
2604
2879
  continue;
2605
2880
  }
2606
2881
  const type = "close";
2607
- block = stack.pop();
2608
- block.close = true;
2882
+ block2 = stack.pop();
2883
+ block2.close = true;
2609
2884
  push({ type, value });
2610
2885
  depth--;
2611
- block = stack[stack.length - 1];
2886
+ block2 = stack[stack.length - 1];
2612
2887
  continue;
2613
2888
  }
2614
2889
  if (value === CHAR_COMMA && depth > 0) {
2615
- if (block.ranges > 0) {
2616
- block.ranges = 0;
2617
- const open = block.nodes.shift();
2618
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2890
+ if (block2.ranges > 0) {
2891
+ block2.ranges = 0;
2892
+ const open = block2.nodes.shift();
2893
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2619
2894
  }
2620
2895
  push({ type: "comma", value });
2621
- block.commas++;
2896
+ block2.commas++;
2622
2897
  continue;
2623
2898
  }
2624
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2625
- const siblings = block.nodes;
2899
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2900
+ const siblings = block2.nodes;
2626
2901
  if (depth === 0 || siblings.length === 0) {
2627
2902
  push({ type: "text", value });
2628
2903
  continue;
2629
2904
  }
2630
2905
  if (prev.type === "dot") {
2631
- block.range = [];
2906
+ block2.range = [];
2632
2907
  prev.value += value;
2633
2908
  prev.type = "range";
2634
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2635
- block.invalid = true;
2636
- block.ranges = 0;
2909
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2910
+ block2.invalid = true;
2911
+ block2.ranges = 0;
2637
2912
  prev.type = "text";
2638
2913
  continue;
2639
2914
  }
2640
- block.ranges++;
2641
- block.args = [];
2915
+ block2.ranges++;
2916
+ block2.args = [];
2642
2917
  continue;
2643
2918
  }
2644
2919
  if (prev.type === "range") {
@@ -2646,7 +2921,7 @@ var require_parse = __commonJS({
2646
2921
  const before = siblings[siblings.length - 1];
2647
2922
  before.value += prev.value + value;
2648
2923
  prev = before;
2649
- block.ranges--;
2924
+ block2.ranges--;
2650
2925
  continue;
2651
2926
  }
2652
2927
  push({ type: "dot", value });
@@ -2655,9 +2930,9 @@ var require_parse = __commonJS({
2655
2930
  push({ type: "text", value });
2656
2931
  }
2657
2932
  do {
2658
- block = stack.pop();
2659
- if (block.type !== "root") {
2660
- block.nodes.forEach((node) => {
2933
+ block2 = stack.pop();
2934
+ if (block2.type !== "root") {
2935
+ block2.nodes.forEach((node) => {
2661
2936
  if (!node.nodes) {
2662
2937
  if (node.type === "open") node.isOpen = true;
2663
2938
  if (node.type === "close") node.isClose = true;
@@ -2666,8 +2941,8 @@ var require_parse = __commonJS({
2666
2941
  }
2667
2942
  });
2668
2943
  const parent = stack[stack.length - 1];
2669
- const index2 = parent.nodes.indexOf(block);
2670
- parent.nodes.splice(index2, 1, ...block.nodes);
2944
+ const index2 = parent.nodes.indexOf(block2);
2945
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2671
2946
  }
2672
2947
  } while (stack.length > 0);
2673
2948
  push({ type: "eos" });
@@ -3300,9 +3575,9 @@ var require_scan = __commonJS({
3300
3575
  if (opts.parts === true || opts.tokens === true) {
3301
3576
  let prevIndex;
3302
3577
  for (let idx = 0; idx < slashes.length; idx++) {
3303
- const n = prevIndex ? prevIndex + 1 : start;
3304
- const i = slashes[idx];
3305
- const value = input.slice(n, i);
3578
+ const n2 = prevIndex ? prevIndex + 1 : start;
3579
+ const i2 = slashes[idx];
3580
+ const value = input.slice(n2, i2);
3306
3581
  if (opts.tokens) {
3307
3582
  if (idx === 0 && start !== 0) {
3308
3583
  tokens[idx].isPrefix = true;
@@ -3316,7 +3591,7 @@ var require_scan = __commonJS({
3316
3591
  if (idx !== 0 || value !== "") {
3317
3592
  parts.push(value);
3318
3593
  }
3319
- prevIndex = i;
3594
+ prevIndex = i2;
3320
3595
  }
3321
3596
  if (prevIndex && prevIndex + 1 < input.length) {
3322
3597
  const value = input.slice(prevIndex + 1);
@@ -3445,15 +3720,15 @@ var require_parse2 = __commonJS({
3445
3720
  };
3446
3721
  var hasRepeatedCharPrefixOverlap = (branches) => {
3447
3722
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3448
- for (let i = 0; i < values.length; i++) {
3449
- for (let j2 = i + 1; j2 < values.length; j2++) {
3450
- const a = values[i];
3451
- const b = values[j2];
3452
- const char = a[0];
3453
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3723
+ for (let i2 = 0; i2 < values.length; i2++) {
3724
+ for (let j = i2 + 1; j < values.length; j++) {
3725
+ const a2 = values[i2];
3726
+ const b = values[j];
3727
+ const char = a2[0];
3728
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3454
3729
  continue;
3455
3730
  }
3456
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3731
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3457
3732
  return true;
3458
3733
  }
3459
3734
  }
@@ -3468,8 +3743,8 @@ var require_parse2 = __commonJS({
3468
3743
  let paren = 0;
3469
3744
  let quote = 0;
3470
3745
  let escaped = false;
3471
- for (let i = 1; i < pattern.length; i++) {
3472
- const ch = pattern[i];
3746
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3747
+ const ch = pattern[i2];
3473
3748
  if (escaped === true) {
3474
3749
  escaped = false;
3475
3750
  continue;
@@ -3503,13 +3778,13 @@ var require_parse2 = __commonJS({
3503
3778
  if (ch === ")") {
3504
3779
  paren--;
3505
3780
  if (paren === 0) {
3506
- if (requireEnd === true && i !== pattern.length - 1) {
3781
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3507
3782
  return;
3508
3783
  }
3509
3784
  return {
3510
3785
  type: pattern[0],
3511
- body: pattern.slice(2, i),
3512
- end: i
3786
+ body: pattern.slice(2, i2),
3787
+ end: i2
3513
3788
  };
3514
3789
  }
3515
3790
  }
@@ -3641,7 +3916,7 @@ var require_parse2 = __commonJS({
3641
3916
  let prev = bos;
3642
3917
  let value;
3643
3918
  const eos = () => state.index === len - 1;
3644
- const peek = state.peek = (n = 1) => input[state.index + n];
3919
+ const peek = state.peek = (n2 = 1) => input[state.index + n2];
3645
3920
  const advance = state.advance = () => input[++state.index] || "";
3646
3921
  const remaining = () => input.slice(state.index + 1);
3647
3922
  const consume = (value2 = "", num = 0) => {
@@ -3722,10 +3997,10 @@ var require_parse2 = __commonJS({
3722
3997
  open.type = "text";
3723
3998
  open.value = literal;
3724
3999
  open.output = safeOutput || utils.escapeRegex(literal);
3725
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3726
- tokens[i].value = "";
3727
- tokens[i].output = "";
3728
- delete tokens[i].suffix;
4000
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
4001
+ tokens[i2].value = "";
4002
+ tokens[i2].output = "";
4003
+ delete tokens[i2].suffix;
3729
4004
  }
3730
4005
  state.output = token.output + open.output;
3731
4006
  state.backtrack = true;
@@ -3756,10 +4031,10 @@ var require_parse2 = __commonJS({
3756
4031
  };
3757
4032
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
3758
4033
  let backslashes = false;
3759
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
4034
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m2, esc, chars, first, rest, index) => {
3760
4035
  if (first === "\\") {
3761
4036
  backslashes = true;
3762
- return m;
4037
+ return m2;
3763
4038
  }
3764
4039
  if (first === "?") {
3765
4040
  if (esc) {
@@ -3779,14 +4054,14 @@ var require_parse2 = __commonJS({
3779
4054
  }
3780
4055
  return star;
3781
4056
  }
3782
- return esc ? m : `\\${m}`;
4057
+ return esc ? m2 : `\\${m2}`;
3783
4058
  });
3784
4059
  if (backslashes === true) {
3785
4060
  if (opts.unescape === true) {
3786
4061
  output = output.replace(/\\/g, "");
3787
4062
  } else {
3788
- output = output.replace(/\\+/g, (m) => {
3789
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
4063
+ output = output.replace(/\\+/g, (m2) => {
4064
+ return m2.length % 2 === 0 ? "\\\\" : m2 ? "\\" : "";
3790
4065
  });
3791
4066
  }
3792
4067
  }
@@ -3968,13 +4243,13 @@ var require_parse2 = __commonJS({
3968
4243
  if (brace.dots === true) {
3969
4244
  const arr = tokens.slice();
3970
4245
  const range = [];
3971
- for (let i = arr.length - 1; i >= 0; i--) {
4246
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3972
4247
  tokens.pop();
3973
- if (arr[i].type === "brace") {
4248
+ if (arr[i2].type === "brace") {
3974
4249
  break;
3975
4250
  }
3976
- if (arr[i].type !== "dots") {
3977
- range.unshift(arr[i].value);
4251
+ if (arr[i2].type !== "dots") {
4252
+ range.unshift(arr[i2].value);
3978
4253
  }
3979
4254
  }
3980
4255
  output = expandRange(range, opts);
@@ -4433,7 +4708,7 @@ var require_picomatch = __commonJS({
4433
4708
  };
4434
4709
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4435
4710
  picomatch.parse = (pattern, options) => {
4436
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4711
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4437
4712
  return parse2(pattern, { ...options, fastpaths: false });
4438
4713
  };
4439
4714
  picomatch.scan = (input, options) => scan(input, options);
@@ -4517,8 +4792,8 @@ var require_micromatch = __commonJS({
4517
4792
  options.onResult(state);
4518
4793
  }
4519
4794
  };
4520
- for (let i = 0; i < patterns.length; i++) {
4521
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4795
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4796
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4522
4797
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4523
4798
  if (negated) negatives++;
4524
4799
  for (let item of list) {
@@ -4540,7 +4815,7 @@ var require_micromatch = __commonJS({
4540
4815
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4541
4816
  }
4542
4817
  if (options.nonull === true || options.nullglob === true) {
4543
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4818
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4544
4819
  }
4545
4820
  }
4546
4821
  return matches;
@@ -4570,7 +4845,7 @@ var require_micromatch = __commonJS({
4570
4845
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4571
4846
  }
4572
4847
  if (Array.isArray(pattern)) {
4573
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4848
+ return pattern.some((p) => micromatch.contains(str, p, options));
4574
4849
  }
4575
4850
  if (typeof pattern === "string") {
4576
4851
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4615,7 +4890,7 @@ var require_micromatch = __commonJS({
4615
4890
  if (typeof str !== "string") {
4616
4891
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4617
4892
  }
4618
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4893
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4619
4894
  };
4620
4895
  micromatch.capture = (glob2, input, options) => {
4621
4896
  let posix = utils.isWindows(options);
@@ -4766,7 +5041,7 @@ var require_pattern = __commonJS({
4766
5041
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4767
5042
  function expandBraceExpansion(pattern) {
4768
5043
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4769
- patterns.sort((a, b) => a.length - b.length);
5044
+ patterns.sort((a2, b) => a2.length - b.length);
4770
5045
  return patterns.filter((pattern2) => pattern2 !== "");
4771
5046
  }
4772
5047
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4847,8 +5122,8 @@ var require_merge2 = __commonJS({
4847
5122
  }
4848
5123
  const mergedStream = PassThrough(options);
4849
5124
  function addStream() {
4850
- for (let i = 0, len = arguments.length; i < len; i++) {
4851
- streamsQueue.push(pauseStreams(arguments[i], options));
5125
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5126
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4852
5127
  }
4853
5128
  mergeStream();
4854
5129
  return this;
@@ -4897,8 +5172,8 @@ var require_merge2 = __commonJS({
4897
5172
  stream.pipe(mergedStream, { end: false });
4898
5173
  stream.resume();
4899
5174
  }
4900
- for (let i = 0; i < streams.length; i++) {
4901
- pipe(streams[i]);
5175
+ for (let i2 = 0; i2 < streams.length; i2++) {
5176
+ pipe(streams[i2]);
4902
5177
  }
4903
5178
  next();
4904
5179
  }
@@ -4929,8 +5204,8 @@ var require_merge2 = __commonJS({
4929
5204
  }
4930
5205
  streams.pause();
4931
5206
  } else {
4932
- for (let i = 0, len = streams.length; i < len; i++) {
4933
- streams[i] = pauseStreams(streams[i], options);
5207
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5208
+ streams[i2] = pauseStreams(streams[i2], options);
4934
5209
  }
4935
5210
  }
4936
5211
  return streams;
@@ -5012,13 +5287,13 @@ var require_tasks = __commonJS({
5012
5287
  Object.defineProperty(exports, "__esModule", { value: true });
5013
5288
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
5014
5289
  var utils = require_utils3();
5015
- function generate(input, settings) {
5016
- const patterns = processPatterns(input, settings);
5017
- const ignore = processPatterns(settings.ignore, settings);
5290
+ function generate(input, settings2) {
5291
+ const patterns = processPatterns(input, settings2);
5292
+ const ignore = processPatterns(settings2.ignore, settings2);
5018
5293
  const positivePatterns = getPositivePatterns(patterns);
5019
5294
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
5020
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
5021
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5295
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5296
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
5022
5297
  const staticTasks = convertPatternsToTasks(
5023
5298
  staticPatterns,
5024
5299
  negativePatterns,
@@ -5034,12 +5309,12 @@ var require_tasks = __commonJS({
5034
5309
  return staticTasks.concat(dynamicTasks);
5035
5310
  }
5036
5311
  exports.generate = generate;
5037
- function processPatterns(input, settings) {
5312
+ function processPatterns(input, settings2) {
5038
5313
  let patterns = input;
5039
- if (settings.braceExpansion) {
5314
+ if (settings2.braceExpansion) {
5040
5315
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
5041
5316
  }
5042
- if (settings.baseNameMatch) {
5317
+ if (settings2.baseNameMatch) {
5043
5318
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
5044
5319
  }
5045
5320
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -5070,7 +5345,7 @@ var require_tasks = __commonJS({
5070
5345
  }
5071
5346
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
5072
5347
  function groupPatternsByBaseDirectory(patterns) {
5073
- const group = {};
5348
+ const group2 = {};
5074
5349
  return patterns.reduce((collection, pattern) => {
5075
5350
  const base = utils.pattern.getBaseDirectory(pattern);
5076
5351
  if (base in collection) {
@@ -5079,7 +5354,7 @@ var require_tasks = __commonJS({
5079
5354
  collection[base] = [pattern];
5080
5355
  }
5081
5356
  return collection;
5082
- }, group);
5357
+ }, group2);
5083
5358
  }
5084
5359
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5085
5360
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5108,26 +5383,26 @@ var require_async = __commonJS({
5108
5383
  init_utils2();
5109
5384
  Object.defineProperty(exports, "__esModule", { value: true });
5110
5385
  exports.read = void 0;
5111
- function read2(path, settings, callback) {
5112
- settings.fs.lstat(path, (lstatError, lstat) => {
5386
+ function read2(path, settings2, callback) {
5387
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5113
5388
  if (lstatError !== null) {
5114
5389
  callFailureCallback(callback, lstatError);
5115
5390
  return;
5116
5391
  }
5117
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5392
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5118
5393
  callSuccessCallback(callback, lstat);
5119
5394
  return;
5120
5395
  }
5121
- settings.fs.stat(path, (statError, stat) => {
5396
+ settings2.fs.stat(path, (statError, stat) => {
5122
5397
  if (statError !== null) {
5123
- if (settings.throwErrorOnBrokenSymbolicLink) {
5398
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5124
5399
  callFailureCallback(callback, statError);
5125
5400
  return;
5126
5401
  }
5127
5402
  callSuccessCallback(callback, lstat);
5128
5403
  return;
5129
5404
  }
5130
- if (settings.markSymbolicLink) {
5405
+ if (settings2.markSymbolicLink) {
5131
5406
  stat.isSymbolicLink = () => true;
5132
5407
  }
5133
5408
  callSuccessCallback(callback, stat);
@@ -5151,19 +5426,19 @@ var require_sync = __commonJS({
5151
5426
  init_utils2();
5152
5427
  Object.defineProperty(exports, "__esModule", { value: true });
5153
5428
  exports.read = void 0;
5154
- function read2(path, settings) {
5155
- const lstat = settings.fs.lstatSync(path);
5156
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5429
+ function read2(path, settings2) {
5430
+ const lstat = settings2.fs.lstatSync(path);
5431
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5157
5432
  return lstat;
5158
5433
  }
5159
5434
  try {
5160
- const stat = settings.fs.statSync(path);
5161
- if (settings.markSymbolicLink) {
5435
+ const stat = settings2.fs.statSync(path);
5436
+ if (settings2.markSymbolicLink) {
5162
5437
  stat.isSymbolicLink = () => true;
5163
5438
  }
5164
5439
  return stat;
5165
5440
  } catch (error2) {
5166
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5441
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5167
5442
  return lstat;
5168
5443
  }
5169
5444
  throw error2;
@@ -5240,8 +5515,8 @@ var require_out = __commonJS({
5240
5515
  }
5241
5516
  exports.stat = stat;
5242
5517
  function statSync2(path, optionsOrSettings) {
5243
- const settings = getSettings(optionsOrSettings);
5244
- return sync.read(path, settings);
5518
+ const settings2 = getSettings(optionsOrSettings);
5519
+ return sync.read(path, settings2);
5245
5520
  }
5246
5521
  exports.statSync = statSync2;
5247
5522
  function getSettings(settingsOrOptions = {}) {
@@ -5289,8 +5564,8 @@ var require_run_parallel = __commonJS({
5289
5564
  if (isSync) queueMicrotask2(end);
5290
5565
  else end();
5291
5566
  }
5292
- function each(i, err, result) {
5293
- results[i] = result;
5567
+ function each(i2, err, result) {
5568
+ results[i2] = result;
5294
5569
  if (--pending === 0 || err) {
5295
5570
  done(err);
5296
5571
  }
@@ -5304,9 +5579,9 @@ var require_run_parallel = __commonJS({
5304
5579
  });
5305
5580
  });
5306
5581
  } else {
5307
- tasks.forEach(function(task, i) {
5582
+ tasks.forEach(function(task, i2) {
5308
5583
  task(function(err, result) {
5309
- each(i, err, result);
5584
+ each(i2, err, result);
5310
5585
  });
5311
5586
  });
5312
5587
  }
@@ -5381,11 +5656,11 @@ var require_common = __commonJS({
5381
5656
  init_utils2();
5382
5657
  Object.defineProperty(exports, "__esModule", { value: true });
5383
5658
  exports.joinPathSegments = void 0;
5384
- function joinPathSegments(a, b, separator) {
5385
- if (a.endsWith(separator)) {
5386
- return a + b;
5659
+ function joinPathSegments(a2, b, separator) {
5660
+ if (a2.endsWith(separator)) {
5661
+ return a2 + b;
5387
5662
  }
5388
- return a + separator + b;
5663
+ return a2 + separator + b;
5389
5664
  }
5390
5665
  exports.joinPathSegments = joinPathSegments;
5391
5666
  }
@@ -5403,16 +5678,16 @@ var require_async2 = __commonJS({
5403
5678
  var constants_1 = require_constants3();
5404
5679
  var utils = require_utils4();
5405
5680
  var common = require_common();
5406
- function read2(directory, settings, callback) {
5407
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5408
- readdirWithFileTypes(directory, settings, callback);
5681
+ function read2(directory, settings2, callback) {
5682
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5683
+ readdirWithFileTypes(directory, settings2, callback);
5409
5684
  return;
5410
5685
  }
5411
- readdir(directory, settings, callback);
5686
+ readdir(directory, settings2, callback);
5412
5687
  }
5413
5688
  exports.read = read2;
5414
- function readdirWithFileTypes(directory, settings, callback) {
5415
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5689
+ function readdirWithFileTypes(directory, settings2, callback) {
5690
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5416
5691
  if (readdirError !== null) {
5417
5692
  callFailureCallback(callback, readdirError);
5418
5693
  return;
@@ -5420,13 +5695,13 @@ var require_async2 = __commonJS({
5420
5695
  const entries = dirents.map((dirent) => ({
5421
5696
  dirent,
5422
5697
  name: dirent.name,
5423
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5698
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5424
5699
  }));
5425
- if (!settings.followSymbolicLinks) {
5700
+ if (!settings2.followSymbolicLinks) {
5426
5701
  callSuccessCallback(callback, entries);
5427
5702
  return;
5428
5703
  }
5429
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5704
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5430
5705
  rpl(tasks, (rplError, rplEntries) => {
5431
5706
  if (rplError !== null) {
5432
5707
  callFailureCallback(callback, rplError);
@@ -5437,15 +5712,15 @@ var require_async2 = __commonJS({
5437
5712
  });
5438
5713
  }
5439
5714
  exports.readdirWithFileTypes = readdirWithFileTypes;
5440
- function makeRplTaskEntry(entry, settings) {
5715
+ function makeRplTaskEntry(entry, settings2) {
5441
5716
  return (done) => {
5442
5717
  if (!entry.dirent.isSymbolicLink()) {
5443
5718
  done(null, entry);
5444
5719
  return;
5445
5720
  }
5446
- settings.fs.stat(entry.path, (statError, stats) => {
5721
+ settings2.fs.stat(entry.path, (statError, stats) => {
5447
5722
  if (statError !== null) {
5448
- if (settings.throwErrorOnBrokenSymbolicLink) {
5723
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5449
5724
  done(statError);
5450
5725
  return;
5451
5726
  }
@@ -5457,16 +5732,16 @@ var require_async2 = __commonJS({
5457
5732
  });
5458
5733
  };
5459
5734
  }
5460
- function readdir(directory, settings, callback) {
5461
- settings.fs.readdir(directory, (readdirError, names) => {
5735
+ function readdir(directory, settings2, callback) {
5736
+ settings2.fs.readdir(directory, (readdirError, names) => {
5462
5737
  if (readdirError !== null) {
5463
5738
  callFailureCallback(callback, readdirError);
5464
5739
  return;
5465
5740
  }
5466
5741
  const tasks = names.map((name) => {
5467
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5742
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5468
5743
  return (done) => {
5469
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5744
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5470
5745
  if (error2 !== null) {
5471
5746
  done(error2);
5472
5747
  return;
@@ -5476,7 +5751,7 @@ var require_async2 = __commonJS({
5476
5751
  path,
5477
5752
  dirent: utils.fs.createDirentFromStats(name, stats)
5478
5753
  };
5479
- if (settings.stats) {
5754
+ if (settings2.stats) {
5480
5755
  entry.stats = stats;
5481
5756
  }
5482
5757
  done(null, entry);
@@ -5513,27 +5788,27 @@ var require_sync2 = __commonJS({
5513
5788
  var constants_1 = require_constants3();
5514
5789
  var utils = require_utils4();
5515
5790
  var common = require_common();
5516
- function read2(directory, settings) {
5517
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5518
- return readdirWithFileTypes(directory, settings);
5791
+ function read2(directory, settings2) {
5792
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5793
+ return readdirWithFileTypes(directory, settings2);
5519
5794
  }
5520
- return readdir(directory, settings);
5795
+ return readdir(directory, settings2);
5521
5796
  }
5522
5797
  exports.read = read2;
5523
- function readdirWithFileTypes(directory, settings) {
5524
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5798
+ function readdirWithFileTypes(directory, settings2) {
5799
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5525
5800
  return dirents.map((dirent) => {
5526
5801
  const entry = {
5527
5802
  dirent,
5528
5803
  name: dirent.name,
5529
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5804
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5530
5805
  };
5531
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5806
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5532
5807
  try {
5533
- const stats = settings.fs.statSync(entry.path);
5808
+ const stats = settings2.fs.statSync(entry.path);
5534
5809
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5535
5810
  } catch (error2) {
5536
- if (settings.throwErrorOnBrokenSymbolicLink) {
5811
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5537
5812
  throw error2;
5538
5813
  }
5539
5814
  }
@@ -5542,17 +5817,17 @@ var require_sync2 = __commonJS({
5542
5817
  });
5543
5818
  }
5544
5819
  exports.readdirWithFileTypes = readdirWithFileTypes;
5545
- function readdir(directory, settings) {
5546
- const names = settings.fs.readdirSync(directory);
5820
+ function readdir(directory, settings2) {
5821
+ const names = settings2.fs.readdirSync(directory);
5547
5822
  return names.map((name) => {
5548
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5549
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5823
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5824
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5550
5825
  const entry = {
5551
5826
  name,
5552
5827
  path: entryPath,
5553
5828
  dirent: utils.fs.createDirentFromStats(name, stats)
5554
5829
  };
5555
- if (settings.stats) {
5830
+ if (settings2.stats) {
5556
5831
  entry.stats = stats;
5557
5832
  }
5558
5833
  return entry;
@@ -5639,8 +5914,8 @@ var require_out2 = __commonJS({
5639
5914
  }
5640
5915
  exports.scandir = scandir;
5641
5916
  function scandirSync(path, optionsOrSettings) {
5642
- const settings = getSettings(optionsOrSettings);
5643
- return sync.read(path, settings);
5917
+ const settings2 = getSettings(optionsOrSettings);
5918
+ return sync.read(path, settings2);
5644
5919
  }
5645
5920
  exports.scandirSync = scandirSync;
5646
5921
  function getSettings(settingsOrOptions = {}) {
@@ -5921,7 +6196,7 @@ var require_queue = __commonJS({
5921
6196
  queue.drained = drained;
5922
6197
  return queue;
5923
6198
  function push(value) {
5924
- var p2 = new Promise(function(resolve4, reject) {
6199
+ var p = new Promise(function(resolve4, reject) {
5925
6200
  pushCb(value, function(err, result) {
5926
6201
  if (err) {
5927
6202
  reject(err);
@@ -5930,11 +6205,11 @@ var require_queue = __commonJS({
5930
6205
  resolve4(result);
5931
6206
  });
5932
6207
  });
5933
- p2.catch(noop);
5934
- return p2;
6208
+ p.catch(noop);
6209
+ return p;
5935
6210
  }
5936
6211
  function unshift(value) {
5937
- var p2 = new Promise(function(resolve4, reject) {
6212
+ var p = new Promise(function(resolve4, reject) {
5938
6213
  unshiftCb(value, function(err, result) {
5939
6214
  if (err) {
5940
6215
  reject(err);
@@ -5943,11 +6218,11 @@ var require_queue = __commonJS({
5943
6218
  resolve4(result);
5944
6219
  });
5945
6220
  });
5946
- p2.catch(noop);
5947
- return p2;
6221
+ p.catch(noop);
6222
+ return p;
5948
6223
  }
5949
6224
  function drained() {
5950
- var p2 = new Promise(function(resolve4) {
6225
+ var p = new Promise(function(resolve4) {
5951
6226
  process.nextTick(function() {
5952
6227
  if (queue.idle()) {
5953
6228
  resolve4();
@@ -5961,7 +6236,7 @@ var require_queue = __commonJS({
5961
6236
  }
5962
6237
  });
5963
6238
  });
5964
- return p2;
6239
+ return p;
5965
6240
  }
5966
6241
  }
5967
6242
  module.exports = fastqueue;
@@ -5976,11 +6251,11 @@ var require_common2 = __commonJS({
5976
6251
  init_utils2();
5977
6252
  Object.defineProperty(exports, "__esModule", { value: true });
5978
6253
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5979
- function isFatalError(settings, error2) {
5980
- if (settings.errorFilter === null) {
6254
+ function isFatalError(settings2, error2) {
6255
+ if (settings2.errorFilter === null) {
5981
6256
  return true;
5982
6257
  }
5983
- return !settings.errorFilter(error2);
6258
+ return !settings2.errorFilter(error2);
5984
6259
  }
5985
6260
  exports.isFatalError = isFatalError;
5986
6261
  function isAppliedFilter(filter, value) {
@@ -5991,14 +6266,14 @@ var require_common2 = __commonJS({
5991
6266
  return filepath.split(/[/\\]/).join(separator);
5992
6267
  }
5993
6268
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5994
- function joinPathSegments(a, b, separator) {
5995
- if (a === "") {
6269
+ function joinPathSegments(a2, b, separator) {
6270
+ if (a2 === "") {
5996
6271
  return b;
5997
6272
  }
5998
- if (a.endsWith(separator)) {
5999
- return a + b;
6273
+ if (a2.endsWith(separator)) {
6274
+ return a2 + b;
6000
6275
  }
6001
- return a + separator + b;
6276
+ return a2 + separator + b;
6002
6277
  }
6003
6278
  exports.joinPathSegments = joinPathSegments;
6004
6279
  }
@@ -6345,14 +6620,14 @@ var require_out3 = __commonJS({
6345
6620
  }
6346
6621
  exports.walk = walk;
6347
6622
  function walkSync(directory, optionsOrSettings) {
6348
- const settings = getSettings(optionsOrSettings);
6349
- const provider = new sync_1.default(directory, settings);
6623
+ const settings2 = getSettings(optionsOrSettings);
6624
+ const provider = new sync_1.default(directory, settings2);
6350
6625
  return provider.read();
6351
6626
  }
6352
6627
  exports.walkSync = walkSync;
6353
6628
  function walkStream(directory, optionsOrSettings) {
6354
- const settings = getSettings(optionsOrSettings);
6355
- const provider = new stream_1.default(directory, settings);
6629
+ const settings2 = getSettings(optionsOrSettings);
6630
+ const provider = new stream_1.default(directory, settings2);
6356
6631
  return provider.read();
6357
6632
  }
6358
6633
  exports.walkStream = walkStream;
@@ -6438,8 +6713,8 @@ var require_stream3 = __commonJS({
6438
6713
  done();
6439
6714
  }).catch(done);
6440
6715
  };
6441
- for (let i = 0; i < filepaths.length; i++) {
6442
- stream.write(i);
6716
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6717
+ stream.write(i2);
6443
6718
  }
6444
6719
  return stream;
6445
6720
  }
@@ -7100,14 +7375,14 @@ var require_out4 = __commonJS({
7100
7375
  function generateTasks(source, options) {
7101
7376
  assertPatternsInput(source);
7102
7377
  const patterns = [].concat(source);
7103
- const settings = new settings_1.default(options);
7104
- return taskManager.generate(patterns, settings);
7378
+ const settings2 = new settings_1.default(options);
7379
+ return taskManager.generate(patterns, settings2);
7105
7380
  }
7106
7381
  FastGlob2.generateTasks = generateTasks;
7107
7382
  function isDynamicPattern(source, options) {
7108
7383
  assertPatternsInput(source);
7109
- const settings = new settings_1.default(options);
7110
- return utils.pattern.isDynamicPattern(source, settings);
7384
+ const settings2 = new settings_1.default(options);
7385
+ return utils.pattern.isDynamicPattern(source, settings2);
7111
7386
  }
7112
7387
  FastGlob2.isDynamicPattern = isDynamicPattern;
7113
7388
  function escapePath(source) {
@@ -7149,9 +7424,9 @@ var require_out4 = __commonJS({
7149
7424
  })(FastGlob || (FastGlob = {}));
7150
7425
  function getWorks(source, _Provider, options) {
7151
7426
  const patterns = [].concat(source);
7152
- const settings = new settings_1.default(options);
7153
- const tasks = taskManager.generate(patterns, settings);
7154
- const provider = new _Provider(settings);
7427
+ const settings2 = new settings_1.default(options);
7428
+ const tasks = taskManager.generate(patterns, settings2);
7429
+ const provider = new _Provider(settings2);
7155
7430
  return tasks.map(provider.read, provider);
7156
7431
  }
7157
7432
  function assertPatternsInput(input) {
@@ -7329,8 +7604,8 @@ import "node:fs";
7329
7604
  import { createRequire } from "node:module";
7330
7605
  import {
7331
7606
  resolve,
7332
- join,
7333
- dirname,
7607
+ join as join2,
7608
+ dirname as dirname2,
7334
7609
  relative,
7335
7610
  normalize,
7336
7611
  sep,
@@ -7344,7 +7619,7 @@ function safeExecuteAsync(fn, message) {
7344
7619
  );
7345
7620
  });
7346
7621
  }
7347
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7622
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7348
7623
  var init_PathResolver = __esm({
7349
7624
  "packages/core/config/utils/PathResolver.ts"() {
7350
7625
  "use strict";
@@ -7357,7 +7632,7 @@ var init_PathResolver = __esm({
7357
7632
  getPatternsFor: getPatternsFor || void 0,
7358
7633
  I18N_PATHS: I18N_PATHS || void 0
7359
7634
  };
7360
- log2 = {
7635
+ log3 = {
7361
7636
  error: (message, error2) => {
7362
7637
  },
7363
7638
  warn: (message, error2) => {
@@ -7478,7 +7753,7 @@ var init_PathResolver = __esm({
7478
7753
  */
7479
7754
  getDirname(path) {
7480
7755
  if (!path) return "";
7481
- return this.normalizePath(dirname(path));
7756
+ return this.normalizePath(dirname2(path));
7482
7757
  }
7483
7758
  /**
7484
7759
  * Resolve package path using Node's module resolution
@@ -7490,7 +7765,7 @@ var init_PathResolver = __esm({
7490
7765
  resolvePackage(packageSpecifier, fromPath = null) {
7491
7766
  try {
7492
7767
  const basePath = fromPath || this.getAppRoot();
7493
- const require3 = createRequire(join(basePath, "package.json"));
7768
+ const require3 = createRequire(join2(basePath, "package.json"));
7494
7769
  const resolved = require3.resolve(packageSpecifier);
7495
7770
  return this.normalizePath(resolved);
7496
7771
  } catch (error2) {
@@ -7642,7 +7917,7 @@ var init_PathResolver = __esm({
7642
7917
  return cleanContent;
7643
7918
  } catch (error2) {
7644
7919
  if (this.options.debug) {
7645
- log2.warn(`Failed to read file: ${filePath}`, error2);
7920
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7646
7921
  }
7647
7922
  return null;
7648
7923
  }
@@ -7670,7 +7945,7 @@ var init_PathResolver = __esm({
7670
7945
  return cleanContent;
7671
7946
  } catch (error2) {
7672
7947
  if (this.options.debug) {
7673
- log2.warn(`Failed to read file: ${filePath}`, error2);
7948
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7674
7949
  }
7675
7950
  return null;
7676
7951
  }
@@ -7692,16 +7967,16 @@ var init_PathResolver = __esm({
7692
7967
  verbose = false
7693
7968
  } = options;
7694
7969
  const normalizedPath = this.normalizePath(filePath);
7695
- const dir = this.normalizePath(dirname(normalizedPath));
7970
+ const dir = this.normalizePath(dirname2(normalizedPath));
7696
7971
  const fileExists = this.pathExists(normalizedPath);
7697
7972
  if (fileExists && !overwrite) {
7698
7973
  if (verbose) {
7699
- log2.info(`Skipping existing file: ${normalizedPath}`);
7974
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7700
7975
  }
7701
7976
  return false;
7702
7977
  }
7703
7978
  if (dryRun) {
7704
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7979
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7705
7980
  return true;
7706
7981
  }
7707
7982
  try {
@@ -7726,7 +8001,7 @@ var init_PathResolver = __esm({
7726
8001
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7727
8002
  }
7728
8003
  if (verbose) {
7729
- log2.info(
8004
+ log3.info(
7730
8005
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7731
8006
  );
7732
8007
  }
@@ -7753,16 +8028,16 @@ var init_PathResolver = __esm({
7753
8028
  verbose = false
7754
8029
  } = options;
7755
8030
  const normalizedPath = this.normalizePath(filePath);
7756
- const dir = this.normalizePath(dirname(normalizedPath));
8031
+ const dir = this.normalizePath(dirname2(normalizedPath));
7757
8032
  const fileExists = this.pathExists(normalizedPath);
7758
8033
  if (fileExists && !overwrite) {
7759
8034
  if (verbose) {
7760
- log2.info(`Skipping existing file: ${normalizedPath}`);
8035
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7761
8036
  }
7762
8037
  return false;
7763
8038
  }
7764
8039
  if (dryRun) {
7765
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
8040
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7766
8041
  return true;
7767
8042
  }
7768
8043
  try {
@@ -7786,7 +8061,7 @@ var init_PathResolver = __esm({
7786
8061
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7787
8062
  }
7788
8063
  if (verbose) {
7789
- log2.info(
8064
+ log3.info(
7790
8065
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7791
8066
  );
7792
8067
  }
@@ -7811,15 +8086,15 @@ var init_PathResolver = __esm({
7811
8086
  const fileExists = this.pathExists(normalizedDestPath);
7812
8087
  if (fileExists && !overwrite) {
7813
8088
  if (verbose) {
7814
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8089
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7815
8090
  }
7816
8091
  return false;
7817
8092
  }
7818
8093
  if (dryRun) {
7819
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8094
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7820
8095
  return true;
7821
8096
  }
7822
- const dir = this.normalizePath(dirname(normalizedDestPath));
8097
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7823
8098
  try {
7824
8099
  await fs.promises.mkdir(dir, { recursive: true });
7825
8100
  } catch (error2) {
@@ -7829,7 +8104,7 @@ var init_PathResolver = __esm({
7829
8104
  return await safeExecuteAsync(async () => {
7830
8105
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7831
8106
  if (verbose) {
7832
- log2.info(
8107
+ log3.info(
7833
8108
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7834
8109
  );
7835
8110
  }
@@ -7853,15 +8128,15 @@ var init_PathResolver = __esm({
7853
8128
  const fileExists = this.pathExists(normalizedDestPath);
7854
8129
  if (fileExists && !overwrite) {
7855
8130
  if (verbose) {
7856
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8131
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7857
8132
  }
7858
8133
  return false;
7859
8134
  }
7860
8135
  if (dryRun) {
7861
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8136
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7862
8137
  return true;
7863
8138
  }
7864
- const dir = this.normalizePath(dirname(normalizedDestPath));
8139
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7865
8140
  try {
7866
8141
  fs.mkdirSync(dir, { recursive: true });
7867
8142
  } catch (error2) {
@@ -7870,7 +8145,7 @@ var init_PathResolver = __esm({
7870
8145
  try {
7871
8146
  fs.copyFileSync(srcPath, normalizedDestPath);
7872
8147
  if (verbose) {
7873
- log2.info(
8148
+ log3.info(
7874
8149
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7875
8150
  );
7876
8151
  }
@@ -7887,7 +8162,7 @@ var init_PathResolver = __esm({
7887
8162
  return fs.existsSync(filePath);
7888
8163
  } catch (error2) {
7889
8164
  if (!silent) {
7890
- log2.error(`Error checking path existence: ${filePath}`, error2);
8165
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7891
8166
  }
7892
8167
  return false;
7893
8168
  }
@@ -7913,7 +8188,7 @@ var init_PathResolver = __esm({
7913
8188
  return fs.readdirSync(dirPath, options);
7914
8189
  } catch (error2) {
7915
8190
  if (this.options.debug) {
7916
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8191
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7917
8192
  }
7918
8193
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7919
8194
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7931,7 +8206,7 @@ var init_PathResolver = __esm({
7931
8206
  return fs.statSync(filePath);
7932
8207
  } catch (error2) {
7933
8208
  if (this.options.debug) {
7934
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8209
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7935
8210
  }
7936
8211
  return null;
7937
8212
  }
@@ -7948,7 +8223,7 @@ var init_PathResolver = __esm({
7948
8223
  return fs.lstatSync(filePath);
7949
8224
  } catch (error2) {
7950
8225
  if (this.options.debug) {
7951
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8226
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7952
8227
  }
7953
8228
  return null;
7954
8229
  }
@@ -8037,7 +8312,7 @@ var init_PathResolver = __esm({
8037
8312
  * @returns True if repoRoot is the monorepo (has packages directory)
8038
8313
  */
8039
8314
  isMonorepo() {
8040
- const packagesDir = join(this._repoRoot, "packages");
8315
+ const packagesDir = join2(this._repoRoot, "packages");
8041
8316
  return this.pathExists(packagesDir);
8042
8317
  }
8043
8318
  /**
@@ -8054,7 +8329,7 @@ var init_PathResolver = __esm({
8054
8329
  * Find files matching pattern within directory
8055
8330
  */
8056
8331
  async findFiles(directory, pattern, options = {}) {
8057
- const searchPattern = this.normalizePath(join(directory, pattern));
8332
+ const searchPattern = this.normalizePath(join2(directory, pattern));
8058
8333
  const appRoot = this.getAppRoot();
8059
8334
  const normalizeAppRoot = this.normalizePath(appRoot);
8060
8335
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8101,7 +8376,7 @@ var init_PathResolver = __esm({
8101
8376
  return null;
8102
8377
  }
8103
8378
  const resolvedPath = this.normalizePath(
8104
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8379
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8105
8380
  );
8106
8381
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8107
8382
  if (this.pathExists(resolvedDir)) {
@@ -8297,13 +8572,13 @@ var init_PathResolver = __esm({
8297
8572
  const maxLevels = this.options.maxLevels;
8298
8573
  while (levelsChecked < maxLevels) {
8299
8574
  const toolingPath = this.normalizePath(
8300
- join(currentDir, PACKAGE_PATHS.TOOLING)
8575
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8301
8576
  );
8302
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8577
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8303
8578
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8304
8579
  return currentDir;
8305
8580
  }
8306
- const appsDir = join(currentDir, "apps");
8581
+ const appsDir = join2(currentDir, "apps");
8307
8582
  if (this.pathExists(appsDir)) {
8308
8583
  const appsDirStat = this.statSync(appsDir);
8309
8584
  if (appsDirStat?.isDirectory()) {
@@ -8311,15 +8586,15 @@ var init_PathResolver = __esm({
8311
8586
  }
8312
8587
  }
8313
8588
  const packageJsonPath = this.normalizePath(
8314
- join(currentDir, "package.json")
8589
+ join2(currentDir, "package.json")
8315
8590
  );
8316
8591
  if (this.pathExists(packageJsonPath)) {
8317
- const parentDir2 = this.normalizePath(dirname(currentDir));
8592
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8318
8593
  if (parentDir2 === currentDir) {
8319
8594
  return currentDir;
8320
8595
  }
8321
8596
  }
8322
- const parentDir = this.normalizePath(dirname(currentDir));
8597
+ const parentDir = this.normalizePath(dirname2(currentDir));
8323
8598
  if (parentDir === currentDir) {
8324
8599
  break;
8325
8600
  }
@@ -8335,8 +8610,8 @@ var init_PathResolver = __esm({
8335
8610
  // packages/tooling/src/utils/pathResolver.ts
8336
8611
  import { createRequire as createRequire2 } from "node:module";
8337
8612
  import {
8338
- join as join2,
8339
- dirname as dirname2,
8613
+ join as join3,
8614
+ dirname as dirname3,
8340
8615
  basename as basename2,
8341
8616
  extname as extname2,
8342
8617
  relative as relative2,
@@ -8346,7 +8621,7 @@ import {
8346
8621
  } from "node:path";
8347
8622
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8348
8623
  function getDirnameFromUrl(importMetaUrl) {
8349
- return dirname2(fileURLToPath2(importMetaUrl));
8624
+ return dirname3(fileURLToPath2(importMetaUrl));
8350
8625
  }
8351
8626
  function detectExecutionMode() {
8352
8627
  const fileUrlPath = fileURLToPath2(import.meta.url);
@@ -8362,7 +8637,7 @@ function getTemplatesRoot() {
8362
8637
  const mode = detectExecutionMode();
8363
8638
  if (mode === "development") {
8364
8639
  const fileUrlPath = fileURLToPath2(import.meta.url);
8365
- const frameworkRoot = normalizePath(dirname2(fileUrlPath), "../../../..");
8640
+ const frameworkRoot = normalizePath(dirname3(fileUrlPath), "../../../..");
8366
8641
  return normalizePath(frameworkRoot, PACKAGE_PATHS.CLI, "templates");
8367
8642
  } else {
8368
8643
  try {
@@ -8378,7 +8653,7 @@ function getTemplatesRoot() {
8378
8653
  try {
8379
8654
  const req = createRequire2(import.meta.url);
8380
8655
  const cliPackageJsonPath = req.resolve("@donotdev/cli/package.json");
8381
- const cliRoot2 = normalizePath(dirname2(cliPackageJsonPath));
8656
+ const cliRoot2 = normalizePath(dirname3(cliPackageJsonPath));
8382
8657
  const templatesPath = normalizePath(cliRoot2, "templates");
8383
8658
  if (pathExists(templatesPath)) {
8384
8659
  return templatesPath;
@@ -8430,8 +8705,8 @@ async function glob(pattern, options = {}) {
8430
8705
  const patterns = Array.isArray(pattern) ? pattern : [pattern];
8431
8706
  const cwd = options.cwd || pathResolverInstance.getAppRoot() || process.cwd();
8432
8707
  const normalizeCwd = pathResolverInstance.normalizePath(cwd);
8433
- const relativePatterns = patterns.map((p2) => {
8434
- const normalizedPattern = pathResolverInstance.normalizePath(p2);
8708
+ const relativePatterns = patterns.map((p) => {
8709
+ const normalizedPattern = pathResolverInstance.normalizePath(p);
8435
8710
  if (normalizedPattern.startsWith(normalizeCwd)) {
8436
8711
  return normalizedPattern.slice(normalizeCwd.length + 1);
8437
8712
  }
@@ -8457,8 +8732,8 @@ function globSync(pattern, options = {}) {
8457
8732
  const patterns = Array.isArray(pattern) ? pattern : [pattern];
8458
8733
  const cwd = options.cwd || pathResolverInstance.getAppRoot() || process.cwd();
8459
8734
  const normalizeCwd = pathResolverInstance.normalizePath(cwd);
8460
- const relativePatterns = patterns.map((p2) => {
8461
- const normalizedPattern = pathResolverInstance.normalizePath(p2);
8735
+ const relativePatterns = patterns.map((p) => {
8736
+ const normalizedPattern = pathResolverInstance.normalizePath(p);
8462
8737
  if (normalizedPattern.startsWith(normalizeCwd)) {
8463
8738
  return normalizedPattern.slice(normalizeCwd.length + 1);
8464
8739
  }
@@ -8482,7 +8757,7 @@ function globSync(pattern, options = {}) {
8482
8757
  globstar: true,
8483
8758
  throwErrorOnBrokenSymbolicLink: options.throwErrorOnBrokenSymbolicLink
8484
8759
  });
8485
- return results.map((p2) => pathResolverInstance.normalizePath(p2));
8760
+ return results.map((p) => pathResolverInstance.normalizePath(p));
8486
8761
  }
8487
8762
  var pathResolverInstance, getRepoRoot, getAppRoot, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, removeSync, ensureDir, getRelativePathBetween, getDirname, joinPath;
8488
8763
  var init_pathResolver = __esm({
@@ -8495,7 +8770,7 @@ var init_pathResolver = __esm({
8495
8770
  getAppRoot = () => pathResolverInstance.getAppRoot();
8496
8771
  resolveFrameworkPackage = (name, from) => pathResolverInstance.resolveFrameworkPackage(name, from || null);
8497
8772
  normalizePath = (...pathSegments) => {
8498
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8773
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8499
8774
  };
8500
8775
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8501
8776
  read = async (filePath, options) => pathResolverInstance.read(filePath, options);
@@ -8508,7 +8783,7 @@ var init_pathResolver = __esm({
8508
8783
  return normalizePath(relative2(from, to));
8509
8784
  };
8510
8785
  getDirname = (filePath) => {
8511
- return normalizePath(dirname2(filePath));
8786
+ return normalizePath(dirname3(filePath));
8512
8787
  };
8513
8788
  joinPath = (...pathSegments) => {
8514
8789
  return normalizePath(...pathSegments);
@@ -8520,7 +8795,7 @@ var init_pathResolver = __esm({
8520
8795
  import { Buffer } from "node:buffer";
8521
8796
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8522
8797
  import { createRequire as createRequire3 } from "node:module";
8523
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8798
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8524
8799
  import process from "node:process";
8525
8800
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8526
8801
  var require2, __filename, __dirname;
@@ -8529,7 +8804,7 @@ var init_utils2 = __esm({
8529
8804
  "use strict";
8530
8805
  require2 = createRequire3(import.meta.url);
8531
8806
  __filename = fileURLToPath3(import.meta.url);
8532
- __dirname = dirname3(__filename);
8807
+ __dirname = dirname4(__filename);
8533
8808
  if (typeof globalThis !== "undefined") {
8534
8809
  globalThis.require = require2;
8535
8810
  globalThis.__filename = __filename;
@@ -8545,12 +8820,12 @@ var init_utils2 = __esm({
8545
8820
 
8546
8821
  // packages/tooling/src/utils/cli-input.ts
8547
8822
  async function askForConfirmation(message, defaultValue = false) {
8548
- const result = await ot2({
8823
+ const result = await confirm({
8549
8824
  message,
8550
8825
  initialValue: defaultValue
8551
8826
  });
8552
- if (q(result)) {
8553
- pt("Operation cancelled.");
8827
+ if (isCancel(result)) {
8828
+ cancel("Operation cancelled.");
8554
8829
  process.exit(0);
8555
8830
  }
8556
8831
  return result;
@@ -8561,14 +8836,14 @@ async function askForMultiSelection(message, choices, defaultIndices = []) {
8561
8836
  label: choice.title,
8562
8837
  hint: choice.hint
8563
8838
  }));
8564
- const initialValues = defaultIndices.map((i) => choices[i]?.value).filter(Boolean);
8565
- const result = await yt({
8839
+ const initialValues = defaultIndices.map((i2) => choices[i2]?.value).filter(Boolean);
8840
+ const result = await multiselect({
8566
8841
  message,
8567
8842
  options,
8568
8843
  initialValues: initialValues.length > 0 ? initialValues : void 0
8569
8844
  });
8570
- if (q(result)) {
8571
- pt("Operation cancelled.");
8845
+ if (isCancel(result)) {
8846
+ cancel("Operation cancelled.");
8572
8847
  process.exit(0);
8573
8848
  }
8574
8849
  return result;
@@ -8658,25 +8933,25 @@ function clearMatrixCache() {
8658
8933
  }
8659
8934
  function flattenGroups(groups, options) {
8660
8935
  const flat = {};
8661
- for (const group of Object.values(groups)) {
8662
- if (options?.skipRootExclude && group.rootExclude) continue;
8663
- for (const [name, version] of Object.entries(group.packages ?? {})) {
8936
+ for (const group2 of Object.values(groups)) {
8937
+ if (options?.skipRootExclude && group2.rootExclude) continue;
8938
+ for (const [name, version] of Object.entries(group2.packages ?? {})) {
8664
8939
  flat[name] = version;
8665
8940
  }
8666
8941
  }
8667
8942
  return flat;
8668
8943
  }
8669
8944
  function resolveGroup(groupName, matrix) {
8670
- const group = matrix.groups[groupName];
8671
- if (!group) return {};
8945
+ const group2 = matrix.groups[groupName];
8946
+ if (!group2) return {};
8672
8947
  const result = {};
8673
- if (group.includes) {
8674
- for (const included of group.includes) {
8948
+ if (group2.includes) {
8949
+ for (const included of group2.includes) {
8675
8950
  Object.assign(result, resolveGroup(included, matrix));
8676
8951
  }
8677
8952
  }
8678
- if (group.packages) {
8679
- Object.assign(result, group.packages);
8953
+ if (group2.packages) {
8954
+ Object.assign(result, group2.packages);
8680
8955
  }
8681
8956
  return result;
8682
8957
  }
@@ -8751,24 +9026,24 @@ function ensureCaretPrefix(version) {
8751
9026
  return `^${version}`;
8752
9027
  }
8753
9028
  function compareVersions(current, expected) {
8754
- const c2 = normalizeVersion(current).split(".").map(Number);
9029
+ const c = normalizeVersion(current).split(".").map(Number);
8755
9030
  const e = normalizeVersion(expected).split(".").map(Number);
8756
- for (let i = 0; i < Math.max(c2.length, e.length); i++) {
8757
- const cv = c2[i] || 0;
8758
- const ev = e[i] || 0;
9031
+ for (let i2 = 0; i2 < Math.max(c.length, e.length); i2++) {
9032
+ const cv = c[i2] || 0;
9033
+ const ev = e[i2] || 0;
8759
9034
  if (cv < ev)
8760
9035
  return {
8761
9036
  behind: true,
8762
9037
  ahead: false,
8763
9038
  equal: false,
8764
- isMajor: (c2[0] || 0) !== (e[0] || 0)
9039
+ isMajor: (c[0] || 0) !== (e[0] || 0)
8765
9040
  };
8766
9041
  if (cv > ev)
8767
9042
  return {
8768
9043
  behind: false,
8769
9044
  ahead: true,
8770
9045
  equal: false,
8771
- isMajor: (c2[0] || 0) !== (e[0] || 0)
9046
+ isMajor: (c[0] || 0) !== (e[0] || 0)
8772
9047
  };
8773
9048
  }
8774
9049
  return { behind: false, ahead: false, equal: true, isMajor: false };
@@ -8794,8 +9069,8 @@ function syncDonotdevToMatrix(matrix, donotdevVersions, dryRun) {
8794
9069
  for (const [pkgName, actualVersion] of Object.entries(donotdevVersions)) {
8795
9070
  if (!pkgName.startsWith("@donotdev/")) continue;
8796
9071
  if (INTERNAL_BUNDLED_PACKAGES.has(pkgName)) continue;
8797
- const group = matrix.groups[pkgName];
8798
- if (!group) {
9072
+ const group2 = matrix.groups[pkgName];
9073
+ if (!group2) {
8799
9074
  matrix.groups[pkgName] = {
8800
9075
  description: `${pkgName.replace("@donotdev/", "").charAt(0).toUpperCase() + pkgName.replace("@donotdev/", "").slice(1)} package`,
8801
9076
  packages: { [pkgName]: `^${actualVersion}` }
@@ -8803,7 +9078,7 @@ function syncDonotdevToMatrix(matrix, donotdevVersions, dryRun) {
8803
9078
  changes.push({ pkg: pkgName, from: "N/A", to: `^${actualVersion}` });
8804
9079
  continue;
8805
9080
  }
8806
- const packages = group.packages ??= {};
9081
+ const packages = group2.packages ??= {};
8807
9082
  const matrixVersion = packages[pkgName];
8808
9083
  if (!matrixVersion) {
8809
9084
  packages[pkgName] = `^${actualVersion}`;
@@ -9012,9 +9287,9 @@ function generatePackageJson(templateName, mode, options = {}) {
9012
9287
  }
9013
9288
  if (mode === "published") {
9014
9289
  const overrides = {};
9015
- for (const [groupName, group] of Object.entries(matrix.groups || {})) {
9290
+ for (const [groupName, group2] of Object.entries(matrix.groups || {})) {
9016
9291
  if (groupName.startsWith("@donotdev/")) {
9017
- const version = group.packages?.[groupName];
9292
+ const version = group2.packages?.[groupName];
9018
9293
  if (version) {
9019
9294
  overrides[groupName] = version.replace(/^\^/, "");
9020
9295
  }
@@ -9081,11 +9356,11 @@ function syncPackageJson(appName, destRoot, dryRun) {
9081
9356
  const existing = parsePackageJson(packageJsonPath);
9082
9357
  if (!existing) {
9083
9358
  if (dryRun) {
9084
- log.info(`[DRY RUN] Would regenerate: apps/${appName}/package.json`);
9359
+ log2.info(`[DRY RUN] Would regenerate: apps/${appName}/package.json`);
9085
9360
  return true;
9086
9361
  }
9087
9362
  writePackageJson(packageJsonPath, newPkg);
9088
- log.info(`Regenerated: apps/${appName}/package.json`);
9363
+ log2.info(`Regenerated: apps/${appName}/package.json`);
9089
9364
  return true;
9090
9365
  }
9091
9366
  let changed = false;
@@ -9104,22 +9379,22 @@ function syncPackageJson(appName, destRoot, dryRun) {
9104
9379
  }
9105
9380
  if (changed) {
9106
9381
  if (dryRun) {
9107
- log.info(
9382
+ log2.info(
9108
9383
  `[DRY RUN] Would update deps in: apps/${appName}/package.json`
9109
9384
  );
9110
9385
  } else {
9111
9386
  writePackageJson(packageJsonPath, existing);
9112
- log.info(`Updated deps: apps/${appName}/package.json`);
9387
+ log2.info(`Updated deps: apps/${appName}/package.json`);
9113
9388
  }
9114
9389
  }
9115
9390
  return changed;
9116
9391
  }
9117
9392
  if (dryRun) {
9118
- log.info(`[DRY RUN] Would create: apps/${appName}/package.json`);
9393
+ log2.info(`[DRY RUN] Would create: apps/${appName}/package.json`);
9119
9394
  return true;
9120
9395
  }
9121
9396
  writePackageJson(packageJsonPath, newPkg);
9122
- log.info(`Created: apps/${appName}/package.json`);
9397
+ log2.info(`Created: apps/${appName}/package.json`);
9123
9398
  return true;
9124
9399
  }
9125
9400
  async function syncApp(appName, options = {}) {
@@ -9129,19 +9404,19 @@ async function syncApp(appName, options = {}) {
9129
9404
  let errors = 0;
9130
9405
  const appRoot = getAppRoot();
9131
9406
  if (!appRoot) {
9132
- log.error("Could not determine project root");
9407
+ log2.error("Could not determine project root");
9133
9408
  return { synced, preserved, errors: 1 };
9134
9409
  }
9135
9410
  const sourceRoot = getAppTemplateSource(appName);
9136
9411
  if (!sourceRoot) {
9137
- log.warn(
9412
+ log2.warn(
9138
9413
  `Template for app-${appName} not found. Is @donotdev/cli installed?`
9139
9414
  );
9140
9415
  return { synced, preserved, errors: 1 };
9141
9416
  }
9142
9417
  const destRoot = normalizePath(joinPath(appRoot, "apps", appName));
9143
9418
  if (!pathExists(destRoot)) {
9144
- log.info(`apps/${appName}/ does not exist \u2014 creating from template`);
9419
+ log2.info(`apps/${appName}/ does not exist \u2014 creating from template`);
9145
9420
  if (!dryRun) {
9146
9421
  await ensureDir(destRoot);
9147
9422
  }
@@ -9152,7 +9427,7 @@ async function syncApp(appName, options = {}) {
9152
9427
  }
9153
9428
  } catch (error2) {
9154
9429
  errors++;
9155
- log.error(
9430
+ log2.error(
9156
9431
  `Error generating package.json for apps/${appName}:`,
9157
9432
  DoNotDevError.from(
9158
9433
  error2,
@@ -9173,7 +9448,7 @@ async function syncApp(appName, options = {}) {
9173
9448
  sourceRoot + "/",
9174
9449
  ""
9175
9450
  );
9176
- if (SKIP_PATTERNS.some((p2) => relativePath.includes(p2))) {
9451
+ if (SKIP_PATTERNS.some((p) => relativePath.includes(p))) {
9177
9452
  continue;
9178
9453
  }
9179
9454
  const destRelative = relativePath.endsWith(".example") ? relativePath.slice(0, -8) : relativePath;
@@ -9183,9 +9458,9 @@ async function syncApp(appName, options = {}) {
9183
9458
  );
9184
9459
  if (shouldPreserve && pathExists(destFile)) {
9185
9460
  if (dryRun) {
9186
- log.info(`[DRY RUN] Would preserve: apps/${appName}/${destRelative}`);
9461
+ log2.info(`[DRY RUN] Would preserve: apps/${appName}/${destRelative}`);
9187
9462
  } else {
9188
- log.info(`Preserving: apps/${appName}/${destRelative}`);
9463
+ log2.info(`Preserving: apps/${appName}/${destRelative}`);
9189
9464
  }
9190
9465
  preserved++;
9191
9466
  continue;
@@ -9198,17 +9473,17 @@ async function syncApp(appName, options = {}) {
9198
9473
  if (existing === content) continue;
9199
9474
  }
9200
9475
  if (dryRun) {
9201
- log.info(`[DRY RUN] Would sync: apps/${appName}/${destRelative}`);
9476
+ log2.info(`[DRY RUN] Would sync: apps/${appName}/${destRelative}`);
9202
9477
  } else {
9203
9478
  await ensureDir(getDirname(destFile));
9204
9479
  await write(destFile, content, { format: "text", overwrite: true });
9205
- log.info(`Synced: apps/${appName}/${destRelative}`);
9480
+ log2.info(`Synced: apps/${appName}/${destRelative}`);
9206
9481
  }
9207
9482
  synced++;
9208
9483
  }
9209
9484
  } catch (error2) {
9210
9485
  errors++;
9211
- log.error(
9486
+ log2.error(
9212
9487
  `Error syncing app-${appName}:`,
9213
9488
  DoNotDevError.from(
9214
9489
  error2,
@@ -9276,11 +9551,11 @@ function getSourceTemplatesPath() {
9276
9551
  "root-consumer"
9277
9552
  );
9278
9553
  if (pathExists(directPath)) {
9279
- log.info("Found templates via node_modules lookup");
9554
+ log2.info("Found templates via node_modules lookup");
9280
9555
  return normalizePath(directPath);
9281
9556
  }
9282
9557
  }
9283
- log.warn(
9558
+ log2.warn(
9284
9559
  "Could not find @donotdev/cli templates. Is @donotdev/cli installed?"
9285
9560
  );
9286
9561
  return null;
@@ -9292,16 +9567,16 @@ async function syncFile(sourcePath, destPath, preserveIfExists, appRoot) {
9292
9567
  appRoot,
9293
9568
  destPathWithoutExample
9294
9569
  );
9295
- log.info(`Preserving user-customized file: ${relativePath}`);
9570
+ log2.info(`Preserving user-customized file: ${relativePath}`);
9296
9571
  return false;
9297
9572
  }
9298
9573
  if (!pathExists(sourcePath)) {
9299
- log.warn(`Source file not found: ${sourcePath}`);
9574
+ log2.warn(`Source file not found: ${sourcePath}`);
9300
9575
  return false;
9301
9576
  }
9302
9577
  const content = await read(sourcePath, { format: "text" });
9303
9578
  if (!content) {
9304
- log.warn(`Source file is empty: ${sourcePath}`);
9579
+ log2.warn(`Source file is empty: ${sourcePath}`);
9305
9580
  return false;
9306
9581
  }
9307
9582
  if (pathExists(destPathWithoutExample)) {
@@ -9348,14 +9623,14 @@ async function syncTemplates(sourceRoot, destRoot, dryRun) {
9348
9623
  normalizedDestRoot,
9349
9624
  destWithoutExample
9350
9625
  );
9351
- log.info(`[DRY RUN] Would preserve: ${relativeDest}`);
9626
+ log2.info(`[DRY RUN] Would preserve: ${relativeDest}`);
9352
9627
  preserved++;
9353
9628
  } else {
9354
9629
  const relativeDest = getRelativePathBetween(
9355
9630
  normalizedDestRoot,
9356
9631
  destWithoutExample
9357
9632
  );
9358
- log.info(`[DRY RUN] Would sync: ${relativeDest}`);
9633
+ log2.info(`[DRY RUN] Would sync: ${relativeDest}`);
9359
9634
  synced++;
9360
9635
  }
9361
9636
  } else {
@@ -9371,7 +9646,7 @@ async function syncTemplates(sourceRoot, destRoot, dryRun) {
9371
9646
  normalizedDestRoot,
9372
9647
  destWithoutExample
9373
9648
  );
9374
- log.info(`Synced: ${relativeDest}`);
9649
+ log2.info(`Synced: ${relativeDest}`);
9375
9650
  } else if (shouldPreserve && pathExists(destWithoutExample)) {
9376
9651
  preserved++;
9377
9652
  }
@@ -9379,7 +9654,7 @@ async function syncTemplates(sourceRoot, destRoot, dryRun) {
9379
9654
  }
9380
9655
  } catch (error2) {
9381
9656
  errors++;
9382
- log.error(
9657
+ log2.error(
9383
9658
  `Error syncing pattern ${pattern}:`,
9384
9659
  DoNotDevError.from(
9385
9660
  error2,
@@ -9394,50 +9669,50 @@ async function syncTemplates(sourceRoot, destRoot, dryRun) {
9394
9669
  async function syncDocumentation(options = {}) {
9395
9670
  const { dryRun } = options;
9396
9671
  if (dryRun) {
9397
- log.info("\u{1F50D} DRY RUN MODE - No files will be modified");
9672
+ log2.info("\u{1F50D} DRY RUN MODE - No files will be modified");
9398
9673
  }
9399
9674
  const appRoot = getAppRoot();
9400
9675
  if (!appRoot) {
9401
- log.error("Could not determine project root");
9676
+ log2.error("Could not determine project root");
9402
9677
  return 1;
9403
9678
  }
9404
9679
  const sourceRoot = getSourceTemplatesPath();
9405
9680
  if (!sourceRoot) {
9406
- log.error("Could not find framework templates. Documentation sync failed.");
9407
- log.info("");
9408
- log.info(" Templates are looked up the same way as create-project:");
9409
- log.info(" \u2022 Published mode: node_modules/@donotdev/cli/templates");
9410
- log.info(" \u2022 Dev mode: packages/cli/templates (from monorepo)");
9411
- log.info("");
9412
- log.info(" To enable docs sync:");
9413
- log.info(" \u2022 Install @donotdev/cli: bun add -D @donotdev/cli");
9414
- log.info(" \u2022 Or run from framework monorepo (dev mode)");
9681
+ log2.error("Could not find framework templates. Documentation sync failed.");
9682
+ log2.info("");
9683
+ log2.info(" Templates are looked up the same way as create-project:");
9684
+ log2.info(" \u2022 Published mode: node_modules/@donotdev/cli/templates");
9685
+ log2.info(" \u2022 Dev mode: packages/cli/templates (from monorepo)");
9686
+ log2.info("");
9687
+ log2.info(" To enable docs sync:");
9688
+ log2.info(" \u2022 Install @donotdev/cli: bun add -D @donotdev/cli");
9689
+ log2.info(" \u2022 Or run from framework monorepo (dev mode)");
9415
9690
  return 1;
9416
9691
  }
9417
- log.info(`Source templates: ${sourceRoot}`);
9418
- log.info(`Destination: ${appRoot}`);
9692
+ log2.info(`Source templates: ${sourceRoot}`);
9693
+ log2.info(`Destination: ${appRoot}`);
9419
9694
  const result = await syncTemplates(sourceRoot, appRoot, dryRun || false);
9420
9695
  if (dryRun) {
9421
- log.info(`
9696
+ log2.info(`
9422
9697
  [DRY RUN] Would sync ${result.synced} file(s)`);
9423
9698
  if (result.preserved > 0) {
9424
- log.info(
9699
+ log2.info(
9425
9700
  `[DRY RUN] Would preserve ${result.preserved} user-customized file(s)`
9426
9701
  );
9427
9702
  }
9428
- log.info("[DRY RUN] No files modified");
9703
+ log2.info("[DRY RUN] No files modified");
9429
9704
  } else {
9430
9705
  if (result.synced > 0) {
9431
- log.success(`
9706
+ log2.success(`
9432
9707
  \u2705 Synced ${result.synced} file(s) from framework`);
9433
9708
  } else {
9434
- log.info("\n\u2705 All documentation up to date");
9709
+ log2.info("\n\u2705 All documentation up to date");
9435
9710
  }
9436
9711
  if (result.preserved > 0) {
9437
- log.info(`\u2139\uFE0F Preserved ${result.preserved} user-customized file(s)`);
9712
+ log2.info(`\u2139\uFE0F Preserved ${result.preserved} user-customized file(s)`);
9438
9713
  }
9439
9714
  if (result.errors > 0) {
9440
- log.warn(`\u26A0\uFE0F ${result.errors} error(s) occurred during sync`);
9715
+ log2.warn(`\u26A0\uFE0F ${result.errors} error(s) occurred during sync`);
9441
9716
  return 1;
9442
9717
  }
9443
9718
  }
@@ -9505,22 +9780,22 @@ function padEnd(str, len) {
9505
9780
  }
9506
9781
  function formatUpdateTable(updates, appRoot) {
9507
9782
  const seen = /* @__PURE__ */ new Map();
9508
- for (const u2 of updates) {
9509
- if (!seen.has(u2.pkg) || u2.isMajor) seen.set(u2.pkg, u2);
9783
+ for (const u3 of updates) {
9784
+ if (!seen.has(u3.pkg) || u3.isMajor) seen.set(u3.pkg, u3);
9510
9785
  }
9511
9786
  const unique = Array.from(seen.values());
9512
- const maxName = Math.max(...unique.map((u2) => u2.pkg.length));
9513
- const maxCurrent = Math.max(...unique.map((u2) => u2.current.length));
9514
- const lines = unique.map((u2) => {
9515
- const normalizedLatest = normalizeVersion(u2.latest);
9787
+ const maxName = Math.max(...unique.map((u3) => u3.pkg.length));
9788
+ const maxCurrent = Math.max(...unique.map((u3) => u3.current.length));
9789
+ const lines = unique.map((u3) => {
9790
+ const normalizedLatest = normalizeVersion(u3.latest);
9516
9791
  const displayLatest = ensureCaretPrefix(normalizedLatest);
9517
- const major = u2.isMajor ? " MAJOR" : "";
9518
- return ` ${padEnd(u2.pkg, maxName)} ${padEnd(u2.current, maxCurrent)} -> ${displayLatest}${major}`;
9792
+ const major = u3.isMajor ? " MAJOR" : "";
9793
+ return ` ${padEnd(u3.pkg, maxName)} ${padEnd(u3.current, maxCurrent)} -> ${displayLatest}${major}`;
9519
9794
  });
9520
9795
  const affectedFiles = /* @__PURE__ */ new Set();
9521
- for (const u2 of updates) {
9796
+ for (const u3 of updates) {
9522
9797
  affectedFiles.add(
9523
- appRoot ? getRelativePathBetween(appRoot, u2.file) : u2.file
9798
+ appRoot ? getRelativePathBetween(appRoot, u3.file) : u3.file
9524
9799
  );
9525
9800
  }
9526
9801
  lines.push(` Affects: ${Array.from(affectedFiles).join(", ")}`);
@@ -9528,11 +9803,11 @@ function formatUpdateTable(updates, appRoot) {
9528
9803
  }
9529
9804
  function formatDeprecatedList(deprecated, appRoot) {
9530
9805
  const lines = [];
9531
- for (const d3 of deprecated) {
9532
- lines.push(` ${d3.name} \u2014 ${d3.message}`);
9533
- const locs = d3.locations.map((l) => {
9534
- const rel = appRoot ? getRelativePathBetween(appRoot, l.file) : l.file;
9535
- return `${rel} (${l.field})`;
9806
+ for (const d of deprecated) {
9807
+ lines.push(` ${d.name} \u2014 ${d.message}`);
9808
+ const locs = d.locations.map((l2) => {
9809
+ const rel = appRoot ? getRelativePathBetween(appRoot, l2.file) : l2.file;
9810
+ return `${rel} (${l2.field})`;
9536
9811
  });
9537
9812
  lines.push(` Found in: ${locs.join(", ")}`);
9538
9813
  }
@@ -9541,23 +9816,23 @@ function formatDeprecatedList(deprecated, appRoot) {
9541
9816
  function applyUpdates(updates, appRoot) {
9542
9817
  const updatedFiles = /* @__PURE__ */ new Map();
9543
9818
  let syncedPins = 0;
9544
- for (const u2 of updates) {
9545
- if (!updatedFiles.has(u2.file)) {
9546
- updatedFiles.set(u2.file, /* @__PURE__ */ new Set());
9819
+ for (const u3 of updates) {
9820
+ if (!updatedFiles.has(u3.file)) {
9821
+ updatedFiles.set(u3.file, /* @__PURE__ */ new Set());
9547
9822
  }
9548
- updatedFiles.get(u2.file).add(`${u2.pkg}:${u2.field}`);
9823
+ updatedFiles.get(u3.file).add(`${u3.pkg}:${u3.field}`);
9549
9824
  }
9550
9825
  for (const [file, packageKeys] of updatedFiles) {
9551
9826
  const pkg = parsePackageJson(file);
9552
9827
  if (!pkg) {
9553
- log.warn(`Could not parse ${file} \u2014 skipping`);
9828
+ log2.warn(`Could not parse ${file} \u2014 skipping`);
9554
9829
  continue;
9555
9830
  }
9556
9831
  let changed = false;
9557
9832
  for (const packageKey of packageKeys) {
9558
9833
  const [pkgName, field] = packageKey.split(":");
9559
9834
  const update = updates.find(
9560
- (u2) => u2.file === file && u2.pkg === pkgName && u2.field === field
9835
+ (u3) => u3.file === file && u3.pkg === pkgName && u3.field === field
9561
9836
  );
9562
9837
  if (!update) continue;
9563
9838
  const deps = pkg[field];
@@ -9570,10 +9845,10 @@ function applyUpdates(updates, appRoot) {
9570
9845
  for (const pinField of ["overrides", "resolutions"]) {
9571
9846
  const pinDeps = pkg[pinField];
9572
9847
  if (!pinDeps) continue;
9573
- for (const u2 of updates) {
9574
- if (u2.file === file && u2.pkg.startsWith("@donotdev/") && u2.field !== pinField && pinDeps[u2.pkg]) {
9575
- const normalizedLatest = normalizeVersion(u2.latest);
9576
- pinDeps[u2.pkg] = normalizedLatest;
9848
+ for (const u3 of updates) {
9849
+ if (u3.file === file && u3.pkg.startsWith("@donotdev/") && u3.field !== pinField && pinDeps[u3.pkg]) {
9850
+ const normalizedLatest = normalizeVersion(u3.latest);
9851
+ pinDeps[u3.pkg] = normalizedLatest;
9577
9852
  changed = true;
9578
9853
  syncedPins++;
9579
9854
  }
@@ -9587,10 +9862,10 @@ function applyUpdates(updates, appRoot) {
9587
9862
  }
9588
9863
  function removeDeprecated(deprecated) {
9589
9864
  const byFile = /* @__PURE__ */ new Map();
9590
- for (const d3 of deprecated) {
9591
- for (const loc of d3.locations) {
9865
+ for (const d of deprecated) {
9866
+ for (const loc of d.locations) {
9592
9867
  if (!byFile.has(loc.file)) byFile.set(loc.file, []);
9593
- byFile.get(loc.file).push({ name: d3.name, field: loc.field });
9868
+ byFile.get(loc.file).push({ name: d.name, field: loc.field });
9594
9869
  }
9595
9870
  }
9596
9871
  let removed = 0;
@@ -9634,11 +9909,11 @@ function runBunInstall(appRoot) {
9634
9909
  }
9635
9910
  async function main(options = {}) {
9636
9911
  const { dryRun } = options;
9637
- mt("Bump \u2014 Update packages and sync project");
9638
- if (dryRun) log.info("DRY RUN MODE \u2014 no files will be modified");
9912
+ intro("Bump \u2014 Update packages and sync project");
9913
+ if (dryRun) log2.info("DRY RUN MODE \u2014 no files will be modified");
9639
9914
  const appRoot = getAppRoot();
9640
9915
  if (!appRoot) {
9641
- log.error("Could not determine project root");
9916
+ log2.error("Could not determine project root");
9642
9917
  return 1;
9643
9918
  }
9644
9919
  let updatePackages = false;
@@ -9689,9 +9964,9 @@ async function main(options = {}) {
9689
9964
  absolute: true
9690
9965
  });
9691
9966
  if (files.length === 0) {
9692
- log.warn("No package.json files found");
9967
+ log2.warn("No package.json files found");
9693
9968
  } else {
9694
- const s = fe();
9969
+ const s = spinner();
9695
9970
  s.start(`Scanning ${files.length} package.json file(s)...`);
9696
9971
  const { frameworkPkgs, externalDeps, packageOccurrences } = detectProjectDeps(files);
9697
9972
  s.message("Querying npm registry...");
@@ -9702,7 +9977,7 @@ async function main(options = {}) {
9702
9977
  `Found ${frameworkPkgs.size} framework + ${externalDeps.size} external package(s)`
9703
9978
  );
9704
9979
  if (!matrixResult && externalDeps.size > 0) {
9705
- log.info(
9980
+ log2.info(
9706
9981
  "Matrix not found \u2014 only @donotdev/* packages will be checked"
9707
9982
  );
9708
9983
  }
@@ -9766,34 +10041,34 @@ async function main(options = {}) {
9766
10041
  }
9767
10042
  const hasAnything = frameworkUpdates.length > 0 || externalMinorUpdates.length > 0 || majorUpdates.length > 0 || deprecatedPkgs.length > 0;
9768
10043
  if (!hasAnything) {
9769
- log.success("All packages up to date!");
10044
+ log2.success("All packages up to date!");
9770
10045
  } else {
9771
10046
  if (frameworkUpdates.length > 0) {
9772
- wt(
10047
+ note(
9773
10048
  formatUpdateTable(frameworkUpdates, appRoot),
9774
- `@donotdev/* updates (${new Set(frameworkUpdates.map((u2) => u2.pkg)).size})`
10049
+ `@donotdev/* updates (${new Set(frameworkUpdates.map((u3) => u3.pkg)).size})`
9775
10050
  );
9776
10051
  }
9777
10052
  if (deprecatedPkgs.length > 0) {
9778
- wt(
10053
+ note(
9779
10054
  formatDeprecatedList(deprecatedPkgs, appRoot),
9780
10055
  `Deprecated packages (${deprecatedPkgs.length})`
9781
10056
  );
9782
10057
  }
9783
10058
  if (externalMinorUpdates.length > 0) {
9784
- wt(
10059
+ note(
9785
10060
  formatUpdateTable(externalMinorUpdates, appRoot),
9786
- `External dep updates (${new Set(externalMinorUpdates.map((u2) => u2.pkg)).size})`
10061
+ `External dep updates (${new Set(externalMinorUpdates.map((u3) => u3.pkg)).size})`
9787
10062
  );
9788
10063
  }
9789
10064
  if (majorUpdates.length > 0) {
9790
- wt(
10065
+ note(
9791
10066
  formatUpdateTable(majorUpdates, appRoot),
9792
- `MAJOR updates (${new Set(majorUpdates.map((u2) => u2.pkg)).size})`
10067
+ `MAJOR updates (${new Set(majorUpdates.map((u3) => u3.pkg)).size})`
9793
10068
  );
9794
10069
  }
9795
10070
  if (dryRun) {
9796
- log.info("[DRY RUN] No files modified");
10071
+ log2.info("[DRY RUN] No files modified");
9797
10072
  } else {
9798
10073
  const allUpdates = [];
9799
10074
  const summary = [];
@@ -9819,13 +10094,13 @@ async function main(options = {}) {
9819
10094
  if (apply) allUpdates.push(...externalMinorUpdates);
9820
10095
  }
9821
10096
  if (majorUpdates.length > 0) {
9822
- for (const u2 of majorUpdates) {
9823
- if (u2.migrationPath) {
9824
- log.info(`Migration guide for ${u2.pkg}: ${u2.migrationPath}`);
10097
+ for (const u3 of majorUpdates) {
10098
+ if (u3.migrationPath) {
10099
+ log2.info(`Migration guide for ${u3.pkg}: ${u3.migrationPath}`);
9825
10100
  }
9826
- if (u2.breakingChanges?.length) {
9827
- for (const bc of u2.breakingChanges) {
9828
- log.warn(`Breaking: ${bc}`);
10101
+ if (u3.breakingChanges?.length) {
10102
+ for (const bc of u3.breakingChanges) {
10103
+ log2.warn(`Breaking: ${bc}`);
9829
10104
  }
9830
10105
  }
9831
10106
  }
@@ -9874,63 +10149,63 @@ async function main(options = {}) {
9874
10149
  }
9875
10150
  }
9876
10151
  }
9877
- wt(summary.map((s2) => ` ${s2}`).join("\n"), "Done");
10152
+ note(summary.map((s2) => ` ${s2}`).join("\n"), "Done");
9878
10153
  const shouldInstall = await askForConfirmation(
9879
10154
  "Run bun install now?",
9880
10155
  true
9881
10156
  );
9882
10157
  if (shouldInstall) {
9883
- const installSpinner = fe();
10158
+ const installSpinner = spinner();
9884
10159
  installSpinner.start("Running bun install...");
9885
10160
  const ok = runBunInstall(appRoot);
9886
10161
  if (ok) {
9887
10162
  installSpinner.stop("bun install completed");
9888
10163
  } else {
9889
10164
  installSpinner.stop("bun install failed");
9890
- log.warn(
10165
+ log2.warn(
9891
10166
  "bun install failed \u2014 run it manually to see the error"
9892
10167
  );
9893
10168
  }
9894
10169
  }
9895
10170
  } else {
9896
- log.info("No changes applied");
10171
+ log2.info("No changes applied");
9897
10172
  }
9898
10173
  }
9899
10174
  }
9900
10175
  }
9901
10176
  }
9902
10177
  if (updateDocs) {
9903
- log.info("Syncing framework documentation...");
10178
+ log2.info("Syncing framework documentation...");
9904
10179
  const syncResult = await syncDocumentation({ dryRun });
9905
10180
  if (syncResult !== 0 && !dryRun) {
9906
- log.warn("Some documentation files could not be synced");
10181
+ log2.warn("Some documentation files could not be synced");
9907
10182
  }
9908
10183
  }
9909
10184
  if (updateDemoApp) {
9910
- log.info("Syncing demo app...");
10185
+ log2.info("Syncing demo app...");
9911
10186
  const result = await syncApp("demo", { dryRun });
9912
10187
  if (result.synced > 0) {
9913
- log.success(`Synced ${result.synced} file(s) in apps/demo`);
10188
+ log2.success(`Synced ${result.synced} file(s) in apps/demo`);
9914
10189
  } else if (result.errors === 0) {
9915
- log.info("Demo app up to date");
10190
+ log2.info("Demo app up to date");
9916
10191
  }
9917
10192
  if (result.preserved > 0) {
9918
- log.info(`Preserved ${result.preserved} customized file(s)`);
10193
+ log2.info(`Preserved ${result.preserved} customized file(s)`);
9919
10194
  }
9920
10195
  }
9921
10196
  if (updateCockpitApp) {
9922
- log.info("Syncing cockpit app...");
10197
+ log2.info("Syncing cockpit app...");
9923
10198
  const result = await syncApp("dndev", { dryRun });
9924
10199
  if (result.synced > 0) {
9925
- log.success(`Synced ${result.synced} file(s) in apps/dndev`);
10200
+ log2.success(`Synced ${result.synced} file(s) in apps/dndev`);
9926
10201
  } else if (result.errors === 0) {
9927
- log.info("Cockpit app up to date");
10202
+ log2.info("Cockpit app up to date");
9928
10203
  }
9929
10204
  if (result.preserved > 0) {
9930
- log.info(`Preserved ${result.preserved} customized file(s)`);
10205
+ log2.info(`Preserved ${result.preserved} customized file(s)`);
9931
10206
  }
9932
10207
  }
9933
- gt("");
10208
+ outro("");
9934
10209
  return 0;
9935
10210
  }
9936
10211
  export {