@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');
@@ -37,31 +37,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
37
  mod
38
38
  ));
39
39
 
40
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
41
- var isAmbiguous, isFullWidth, isWide;
40
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
41
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
42
42
  var init_utils = __esm({
43
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
43
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
44
44
  init_utils2();
45
- isAmbiguous = (x) => {
46
- 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;
47
- };
45
+ getCodePointsLength = /* @__PURE__ */ (() => {
46
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
47
+ return (input) => {
48
+ let surrogatePairsNr = 0;
49
+ SURROGATE_PAIR_RE.lastIndex = 0;
50
+ while (SURROGATE_PAIR_RE.test(input)) {
51
+ surrogatePairsNr += 1;
52
+ }
53
+ return input.length - surrogatePairsNr;
54
+ };
55
+ })();
48
56
  isFullWidth = (x) => {
49
57
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
50
58
  };
51
- isWide = (x) => {
52
- 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;
59
+ isWideNotCJKTNotEmoji = (x) => {
60
+ 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;
53
61
  };
54
62
  }
55
63
  });
56
64
 
57
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
58
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
65
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
66
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
59
67
  var init_dist = __esm({
60
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
68
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
61
69
  init_utils2();
62
70
  init_utils();
63
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
71
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
64
72
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
73
+ 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;
65
74
  TAB_RE = /\t{1,1000}/y;
66
75
  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");
67
76
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -71,14 +80,21 @@ var init_dist = __esm({
71
80
  const LIMIT = truncationOptions.limit ?? Infinity;
72
81
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
73
82
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
74
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
83
+ const ANSI_WIDTH = 0;
75
84
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
76
85
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
77
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
78
86
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
79
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
87
+ const FULL_WIDTH_WIDTH = 2;
80
88
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
81
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
89
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
90
+ const PARSE_BLOCKS = [
91
+ [LATIN_RE, REGULAR_WIDTH],
92
+ [ANSI_RE, ANSI_WIDTH],
93
+ [CONTROL_RE, CONTROL_WIDTH],
94
+ [TAB_RE, TAB_WIDTH],
95
+ [EMOJI_RE, EMOJI_WIDTH],
96
+ [CJKT_WIDE_RE, WIDE_WIDTH]
97
+ ];
82
98
  let indexPrev = 0;
83
99
  let index = 0;
84
100
  let length = input.length;
@@ -98,10 +114,8 @@ var init_dist = __esm({
98
114
  const codePoint = char.codePointAt(0) || 0;
99
115
  if (isFullWidth(codePoint)) {
100
116
  widthExtra = FULL_WIDTH_WIDTH;
101
- } else if (isWide(codePoint)) {
117
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
102
118
  widthExtra = WIDE_WIDTH;
103
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
104
- widthExtra = AMBIGUOUS_WIDTH;
105
119
  } else {
106
120
  widthExtra = REGULAR_WIDTH;
107
121
  }
@@ -117,88 +131,28 @@ var init_dist = __esm({
117
131
  }
118
132
  unmatchedStart = unmatchedEnd = 0;
119
133
  }
120
- if (index >= length)
121
- break;
122
- LATIN_RE.lastIndex = index;
123
- if (LATIN_RE.test(input)) {
124
- lengthExtra = LATIN_RE.lastIndex - index;
125
- widthExtra = lengthExtra * REGULAR_WIDTH;
126
- if (width + widthExtra > truncationLimit) {
127
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
128
- }
129
- if (width + widthExtra > LIMIT) {
130
- truncationEnabled = true;
131
- break;
132
- }
133
- width += widthExtra;
134
- unmatchedStart = indexPrev;
135
- unmatchedEnd = index;
136
- index = indexPrev = LATIN_RE.lastIndex;
137
- continue;
138
- }
139
- ANSI_RE.lastIndex = index;
140
- if (ANSI_RE.test(input)) {
141
- if (width + ANSI_WIDTH > truncationLimit) {
142
- truncationIndex = Math.min(truncationIndex, index);
143
- }
144
- if (width + ANSI_WIDTH > LIMIT) {
145
- truncationEnabled = true;
146
- break;
147
- }
148
- width += ANSI_WIDTH;
149
- unmatchedStart = indexPrev;
150
- unmatchedEnd = index;
151
- index = indexPrev = ANSI_RE.lastIndex;
152
- continue;
153
- }
154
- CONTROL_RE.lastIndex = index;
155
- if (CONTROL_RE.test(input)) {
156
- lengthExtra = CONTROL_RE.lastIndex - index;
157
- widthExtra = lengthExtra * CONTROL_WIDTH;
158
- if (width + widthExtra > truncationLimit) {
159
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
160
- }
161
- if (width + widthExtra > LIMIT) {
162
- truncationEnabled = true;
163
- break;
164
- }
165
- width += widthExtra;
166
- unmatchedStart = indexPrev;
167
- unmatchedEnd = index;
168
- index = indexPrev = CONTROL_RE.lastIndex;
169
- continue;
170
- }
171
- TAB_RE.lastIndex = index;
172
- if (TAB_RE.test(input)) {
173
- lengthExtra = TAB_RE.lastIndex - index;
174
- widthExtra = lengthExtra * TAB_WIDTH;
175
- if (width + widthExtra > truncationLimit) {
176
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
177
- }
178
- if (width + widthExtra > LIMIT) {
179
- truncationEnabled = true;
180
- break;
181
- }
182
- width += widthExtra;
183
- unmatchedStart = indexPrev;
184
- unmatchedEnd = index;
185
- index = indexPrev = TAB_RE.lastIndex;
186
- continue;
134
+ if (index >= length) {
135
+ break outer;
187
136
  }
188
- EMOJI_RE.lastIndex = index;
189
- if (EMOJI_RE.test(input)) {
190
- if (width + EMOJI_WIDTH > truncationLimit) {
191
- truncationIndex = Math.min(truncationIndex, index);
192
- }
193
- if (width + EMOJI_WIDTH > LIMIT) {
194
- truncationEnabled = true;
195
- break;
137
+ for (let i2 = 0, l2 = PARSE_BLOCKS.length; i2 < l2; i2++) {
138
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
139
+ BLOCK_RE.lastIndex = index;
140
+ if (BLOCK_RE.test(input)) {
141
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
142
+ widthExtra = lengthExtra * BLOCK_WIDTH;
143
+ if (width + widthExtra > truncationLimit) {
144
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
145
+ }
146
+ if (width + widthExtra > LIMIT) {
147
+ truncationEnabled = true;
148
+ break outer;
149
+ }
150
+ width += widthExtra;
151
+ unmatchedStart = indexPrev;
152
+ unmatchedEnd = index;
153
+ index = indexPrev = BLOCK_RE.lastIndex;
154
+ continue outer;
196
155
  }
197
- width += EMOJI_WIDTH;
198
- unmatchedStart = indexPrev;
199
- unmatchedEnd = index;
200
- index = indexPrev = EMOJI_RE.lastIndex;
201
- continue;
202
156
  }
203
157
  index += 1;
204
158
  }
@@ -213,10 +167,10 @@ var init_dist = __esm({
213
167
  }
214
168
  });
215
169
 
216
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
170
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
217
171
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
218
172
  var init_dist2 = __esm({
219
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
173
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
220
174
  init_utils2();
221
175
  init_dist();
222
176
  NO_TRUNCATION2 = {
@@ -231,13 +185,13 @@ var init_dist2 = __esm({
231
185
  }
232
186
  });
233
187
 
234
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
188
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
235
189
  function wrapAnsi(string, columns, options) {
236
190
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
237
191
  }
238
192
  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;
239
193
  var init_main = __esm({
240
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
194
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
241
195
  init_utils2();
242
196
  init_dist2();
243
197
  ESC = "\x1B";
@@ -401,16 +355,19 @@ var init_main = __esm({
401
355
  }
402
356
  const preString = rows.join("\n");
403
357
  let inSurrogate = false;
404
- for (let i = 0; i < preString.length; i++) {
405
- const character = preString[i];
358
+ for (let i2 = 0; i2 < preString.length; i2++) {
359
+ const character = preString[i2];
406
360
  returnValue += character;
407
361
  if (!inSurrogate) {
408
362
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
363
+ if (inSurrogate) {
364
+ continue;
365
+ }
409
366
  } else {
410
- continue;
367
+ inSurrogate = false;
411
368
  }
412
369
  if (character === ESC || character === CSI) {
413
- GROUP_REGEX.lastIndex = i + 1;
370
+ GROUP_REGEX.lastIndex = i2 + 1;
414
371
  const groupsResult = GROUP_REGEX.exec(preString);
415
372
  const groups = groupsResult?.groups;
416
373
  if (groups?.code !== void 0) {
@@ -420,7 +377,7 @@ var init_main = __esm({
420
377
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
421
378
  }
422
379
  }
423
- if (preString[i + 1] === "\n") {
380
+ if (preString[i2 + 1] === "\n") {
424
381
  if (escapeUrl) {
425
382
  returnValue += wrapAnsiHyperlink("");
426
383
  }
@@ -451,7 +408,7 @@ var require_src = __commonJS({
451
408
  var ESC2 = "\x1B";
452
409
  var CSI2 = `${ESC2}[`;
453
410
  var beep = "\x07";
454
- var cursor = {
411
+ var cursor3 = {
455
412
  to(x, y2) {
456
413
  if (!y2) return `${CSI2}${x + 1}G`;
457
414
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -480,7 +437,7 @@ var require_src = __commonJS({
480
437
  up: (count = 1) => `${CSI2}S`.repeat(count),
481
438
  down: (count = 1) => `${CSI2}T`.repeat(count)
482
439
  };
483
- var erase = {
440
+ var erase3 = {
484
441
  screen: `${CSI2}2J`,
485
442
  up: (count = 1) => `${CSI2}1J`.repeat(count),
486
443
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -489,89 +446,169 @@ var require_src = __commonJS({
489
446
  lineStart: `${CSI2}1K`,
490
447
  lines(count) {
491
448
  let clear = "";
492
- for (let i = 0; i < count; i++)
493
- clear += this.line + (i < count - 1 ? cursor.up() : "");
449
+ for (let i2 = 0; i2 < count; i2++)
450
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
494
451
  if (count)
495
- clear += cursor.left;
452
+ clear += cursor3.left;
496
453
  return clear;
497
454
  }
498
455
  };
499
- module.exports = { cursor, scroll, erase, beep };
456
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
500
457
  }
501
458
  });
502
459
 
503
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
504
- import { styleText as y } from "node:util";
505
- import { stdout as S, stdin as $ } from "node:process";
506
- import * as _ from "node:readline";
507
- import P from "node:readline";
508
- import { ReadStream as D } from "node:tty";
509
- function d(r, t2, e) {
510
- if (!e.some((o) => !o.disabled)) return r;
511
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
512
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
460
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
461
+ import { styleText } from "node:util";
462
+ import { stdout, stdin } from "node:process";
463
+ import * as l from "node:readline";
464
+ import l__default from "node:readline";
465
+ import { ReadStream } from "node:tty";
466
+ function findCursor(s, o, l2) {
467
+ if (!l2.some((r2) => !r2.disabled))
468
+ return s;
469
+ const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
470
+ return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
471
+ }
472
+ function isAccessible(n3) {
473
+ if (n3 !== void 0) return n3;
474
+ if (settings.accessible !== void 0) return settings.accessible;
475
+ const e = process.env.ACCESSIBLE;
476
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
513
477
  }
514
- function V(r, t2) {
515
- if (typeof r == "string") return u.aliases.get(r) === t2;
516
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
478
+ function isActionKey(n3, e) {
479
+ if (typeof n3 == "string")
480
+ return settings.aliases.get(n3) === e;
481
+ for (const s of n3)
482
+ if (s !== void 0 && isActionKey(s, e))
483
+ return true;
517
484
  return false;
518
485
  }
519
- function j(r, t2) {
520
- if (r === t2) return;
521
- const e = r.split(`
522
- `), s = t2.split(`
523
- `), i = Math.max(e.length, s.length), n = [];
524
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
525
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
486
+ function diffLines(i2, s) {
487
+ if (i2 === s) return;
488
+ const e = i2.split(`
489
+ `), t2 = s.split(`
490
+ `), r2 = Math.max(e.length, t2.length), f = [];
491
+ for (let n3 = 0; n3 < r2; n3++)
492
+ e[n3] !== t2[n3] && f.push(n3);
493
+ return {
494
+ lines: f,
495
+ numLinesBefore: e.length,
496
+ numLinesAfter: t2.length,
497
+ numLines: r2
498
+ };
526
499
  }
527
- function q(r) {
528
- return r === C;
500
+ function isCancel(e) {
501
+ return e === CANCEL_SYMBOL;
529
502
  }
530
- function w(r, t2) {
531
- const e = r;
532
- e.isTTY && e.setRawMode(t2);
503
+ function setRawMode(e, r2) {
504
+ const o = e;
505
+ o.isTTY && o.setRawMode(r2);
533
506
  }
534
- function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
535
- const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
536
- _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
537
- const n = (o, { name: a, sequence: h }) => {
538
- const l = String(o);
539
- if (V([l, a, h], "cancel")) {
540
- s && t2.write(import_sisteransi.cursor.show), process.exit(0);
507
+ function block({
508
+ input: e = stdin,
509
+ output: r2 = stdout,
510
+ overwrite: o = true,
511
+ hideCursor: n3 = true
512
+ } = {}) {
513
+ const s = l.createInterface({
514
+ input: e,
515
+ output: r2,
516
+ prompt: "",
517
+ tabSize: 1
518
+ });
519
+ l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
520
+ const t2 = (f, { name: a2, sequence: w }) => {
521
+ const c2 = String(f);
522
+ if (isActionKey([c2, a2, w], "cancel")) {
523
+ n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
541
524
  return;
542
525
  }
543
- if (!e) return;
544
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
545
- _.moveCursor(t2, f, v, () => {
546
- _.clearLine(t2, 1, () => {
547
- r.once("keypress", n);
526
+ if (!o) return;
527
+ const i2 = a2 === "return" ? 0 : -1, m = a2 === "return" ? -1 : 0;
528
+ l.moveCursor(r2, i2, m, () => {
529
+ l.clearLine(r2, 1, () => {
530
+ e.once("keypress", t2);
548
531
  });
549
532
  });
550
533
  };
551
- return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
552
- 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();
534
+ return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
535
+ e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
553
536
  };
554
537
  }
555
- function R(r, t2, e, s = e) {
556
- const i = O(r ?? S);
557
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
558
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
538
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
539
+ const f = getColumns(e ?? stdout);
540
+ return wrapAnsi(r2, f - o.length, {
541
+ hard: true,
542
+ trim: false
543
+ }).split(`
544
+ `).map((c2, i2, m) => {
545
+ const d = t2 ? t2(c2, i2) : c2;
546
+ return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
547
+ }).join(`
559
548
  `);
560
549
  }
561
- var import_sisteransi, E, G, u, Y, C, O, A, p, Q, nt, at;
550
+ function runValidation(e, a2) {
551
+ if ("~standard" in e) {
552
+ const n3 = e["~standard"].validate(a2);
553
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
554
+ }
555
+ return e(a2);
556
+ }
557
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, r, n$1, n2;
562
558
  var init_dist3 = __esm({
563
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
559
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
564
560
  init_utils2();
565
561
  init_main();
566
562
  import_sisteransi = __toESM(require_src(), 1);
567
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
568
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
569
- 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)}` } } };
570
- Y = globalThis.process.platform.startsWith("win");
571
- C = /* @__PURE__ */ Symbol("clack:cancel");
572
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
573
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
574
- p = class {
563
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
564
+ t = [
565
+ "January",
566
+ "February",
567
+ "March",
568
+ "April",
569
+ "May",
570
+ "June",
571
+ "July",
572
+ "August",
573
+ "September",
574
+ "October",
575
+ "November",
576
+ "December"
577
+ ];
578
+ settings = {
579
+ actions: new Set(a$1),
580
+ aliases: /* @__PURE__ */ new Map([
581
+ // vim support
582
+ ["k", "up"],
583
+ ["j", "down"],
584
+ ["h", "left"],
585
+ ["l", "right"],
586
+ ["", "cancel"],
587
+ // opinionated defaults!
588
+ ["escape", "cancel"]
589
+ ]),
590
+ messages: {
591
+ cancel: "Canceled",
592
+ error: "Something went wrong"
593
+ },
594
+ withGuide: true,
595
+ accessible: void 0,
596
+ date: {
597
+ monthNames: [...t],
598
+ messages: {
599
+ required: "Please enter a valid date",
600
+ invalidMonth: "There are only 12 months in a year",
601
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
602
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
603
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
604
+ }
605
+ }
606
+ };
607
+ R = globalThis.process.platform.startsWith("win");
608
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
609
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
610
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
611
+ y = class {
575
612
  input;
576
613
  output;
577
614
  _abortSignal;
@@ -586,46 +623,92 @@ var init_dist3 = __esm({
586
623
  error = "";
587
624
  value;
588
625
  userInput = "";
626
+ /**
627
+ * Whether accessible (static, screen-reader friendly) output is enabled for
628
+ * this prompt, resolved from the `accessible` option, the global setting,
629
+ * and the `ACCESSIBLE` env var.
630
+ */
631
+ get accessible() {
632
+ return isAccessible(this.opts.accessible);
633
+ }
589
634
  constructor(t2, e = true) {
590
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
591
- 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;
635
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
636
+ 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 = n3, this.input = i2, this.output = s;
592
637
  }
638
+ /**
639
+ * Unsubscribe all listeners
640
+ */
593
641
  unsubscribe() {
594
642
  this._subscribers.clear();
595
643
  }
644
+ /**
645
+ * Set a subscriber with opts
646
+ * @param event - The event name
647
+ */
596
648
  setSubscriber(t2, e) {
597
- const s = this._subscribers.get(t2) ?? [];
598
- s.push(e), this._subscribers.set(t2, s);
649
+ const i2 = this._subscribers.get(t2) ?? [];
650
+ i2.push(e), this._subscribers.set(t2, i2);
599
651
  }
652
+ /**
653
+ * Subscribe to an event
654
+ * @param event - The event name
655
+ * @param cb - The callback
656
+ */
600
657
  on(t2, e) {
601
658
  this.setSubscriber(t2, { cb: e });
602
659
  }
660
+ /**
661
+ * Subscribe to an event once
662
+ * @param event - The event name
663
+ * @param cb - The callback
664
+ */
603
665
  once(t2, e) {
604
666
  this.setSubscriber(t2, { cb: e, once: true });
605
667
  }
668
+ /**
669
+ * Emit an event with data
670
+ * @param event - The event name
671
+ * @param data - The data to pass to the callback
672
+ */
606
673
  emit(t2, ...e) {
607
- const s = this._subscribers.get(t2) ?? [], i = [];
608
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
609
- for (const n of i) n();
674
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
675
+ for (const r2 of i2)
676
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
677
+ for (const r2 of s)
678
+ r2();
610
679
  }
611
680
  prompt() {
612
681
  return new Promise((t2) => {
613
682
  if (this._abortSignal) {
614
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
615
- this._abortSignal.addEventListener("abort", () => {
616
- this.state = "cancel", this.close();
617
- }, { once: true });
683
+ if (this._abortSignal.aborted)
684
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
685
+ this._abortSignal.addEventListener(
686
+ "abort",
687
+ () => {
688
+ this.state = "cancel", this.close();
689
+ },
690
+ { once: true }
691
+ );
618
692
  }
619
- 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", () => {
620
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
693
+ this.rl = l__default.createInterface({
694
+ input: this.input,
695
+ tabSize: 2,
696
+ prompt: "",
697
+ escapeCodeTimeout: 50,
698
+ terminal: true
699
+ }), 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", () => {
700
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
621
701
  }), this.once("cancel", () => {
622
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
702
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
623
703
  });
624
704
  });
625
705
  }
626
706
  _isActionKey(t2, e) {
627
707
  return t2 === " ";
628
708
  }
709
+ _shouldSubmit(t2, e) {
710
+ return true;
711
+ }
629
712
  _setValue(t2) {
630
713
  this.value = t2, this.emit("value", this.value);
631
714
  }
@@ -635,19 +718,22 @@ var init_dist3 = __esm({
635
718
  _clearUserInput() {
636
719
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
637
720
  }
638
- onKeypress(t2, e) {
639
- 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") {
640
- if (this.opts.validate) {
641
- const s = this.opts.validate(this.value);
642
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
721
+ async onKeypress(t2, e) {
722
+ if (this.state !== "validating") {
723
+ 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)) {
724
+ if (this.opts.validate) {
725
+ const i2 = runValidation(this.opts.validate, this.value);
726
+ let s;
727
+ 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));
728
+ }
729
+ this.state !== "error" && (this.state = "submit");
643
730
  }
644
- this.state !== "error" && (this.state = "submit");
731
+ 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();
645
732
  }
646
- 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();
647
733
  }
648
734
  close() {
649
735
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
650
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
736
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
651
737
  }
652
738
  restoreCursor() {
653
739
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -655,34 +741,39 @@ var init_dist3 = __esm({
655
741
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
656
742
  }
657
743
  render() {
658
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
744
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
745
+ hard: true,
746
+ trim: false
747
+ });
659
748
  if (t2 !== this._prevFrame) {
660
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
749
+ if (this.state === "initial")
750
+ this.output.write(import_sisteransi.cursor.hide);
661
751
  else {
662
- const e = j(this._prevFrame, t2), s = A(this.output);
752
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
663
753
  if (this.restoreCursor(), e) {
664
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
665
- let o = e.lines.find((a) => a >= i);
666
- if (o === void 0) {
754
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
755
+ let n3 = e.lines.find((o) => o >= s);
756
+ if (n3 === void 0) {
667
757
  this._prevFrame = t2;
668
758
  return;
669
759
  }
670
760
  if (e.lines.length === 1) {
671
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
672
- const a = t2.split(`
761
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
762
+ const o = t2.split(`
673
763
  `);
674
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
764
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
675
765
  return;
676
766
  } else if (e.lines.length > 1) {
677
- if (i < n) o = i;
767
+ if (s < r2)
768
+ n3 = s;
678
769
  else {
679
- const h = o - n;
680
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
770
+ const h2 = n3 - r2;
771
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
681
772
  }
682
773
  this.output.write(import_sisteransi.erase.down());
683
- const a = t2.split(`
684
- `).slice(o);
685
- this.output.write(a.join(`
774
+ const f = t2.split(`
775
+ `).slice(n3);
776
+ this.output.write(f.join(`
686
777
  `)), this._prevFrame = t2;
687
778
  return;
688
779
  }
@@ -693,7 +784,7 @@ var init_dist3 = __esm({
693
784
  }
694
785
  }
695
786
  };
696
- Q = class extends p {
787
+ r = class extends y {
697
788
  get cursor() {
698
789
  return this.value ? 0 : 1;
699
790
  }
@@ -703,54 +794,60 @@ var init_dist3 = __esm({
703
794
  constructor(t2) {
704
795
  super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
705
796
  this.value = this._value;
706
- }), this.on("confirm", (e) => {
707
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
797
+ }), this.on("confirm", (i2) => {
798
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
708
799
  }), this.on("cursor", () => {
709
800
  this.value = !this.value;
710
801
  });
711
802
  }
712
803
  };
713
- nt = class extends p {
804
+ n$1 = class n extends y {
714
805
  options;
715
806
  cursor = 0;
716
807
  get _selectedValue() {
717
808
  return this.options[this.cursor];
718
809
  }
719
810
  changeValue() {
720
- this.value = this._selectedValue.value;
721
- }
722
- constructor(t2) {
723
- super(t2, false), this.options = t2.options;
724
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
725
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
726
- switch (i) {
811
+ const e = this._selectedValue;
812
+ this.value = e === void 0 ? void 0 : e.value;
813
+ }
814
+ constructor(e) {
815
+ super(e, false), this.options = e.options;
816
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
817
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
818
+ switch (s) {
727
819
  case "left":
728
820
  case "up":
729
- this.cursor = d(this.cursor, -1, this.options);
821
+ this.cursor = findCursor(this.cursor, -1, this.options);
730
822
  break;
731
823
  case "down":
732
824
  case "right":
733
- this.cursor = d(this.cursor, 1, this.options);
825
+ this.cursor = findCursor(this.cursor, 1, this.options);
734
826
  break;
735
827
  }
736
828
  this.changeValue();
737
829
  });
738
830
  }
739
831
  };
740
- at = class extends p {
832
+ n2 = class extends y {
741
833
  get userInputWithCursor() {
742
- if (this.state === "submit") return this.userInput;
834
+ if (this.state === "submit")
835
+ return this.userInput;
743
836
  const t2 = this.userInput;
744
- if (this.cursor >= t2.length) return `${this.userInput}\u2588`;
745
- const e = t2.slice(0, this.cursor), [s, ...i] = t2.slice(this.cursor);
746
- return `${e}${y("inverse", s)}${i.join("")}`;
837
+ if (this.cursor >= t2.length)
838
+ return `${this.userInput}\u2588`;
839
+ const r2 = t2.slice(0, this.cursor), s = t2.slice(this.cursor, this.cursor + 1), e = t2.slice(this.cursor + 1);
840
+ return `${r2}${styleText("inverse", s)}${e}`;
747
841
  }
748
842
  get cursor() {
749
843
  return this._cursor;
750
844
  }
751
845
  constructor(t2) {
752
- super({ ...t2, initialUserInput: t2.initialUserInput ?? t2.initialValue }), this.on("userInput", (e) => {
753
- this._setValue(e);
846
+ super({
847
+ ...t2,
848
+ initialUserInput: t2.initialUserInput ?? t2.initialValue
849
+ }), this.on("userInput", (r2) => {
850
+ this._setValue(r2);
754
851
  }), this.on("finalize", () => {
755
852
  this.value || (this.value = t2.defaultValue), this.value === void 0 && (this.value = "");
756
853
  });
@@ -759,328 +856,503 @@ var init_dist3 = __esm({
759
856
  }
760
857
  });
761
858
 
762
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
763
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
764
- import P2 from "node:process";
765
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
766
- import { dirname as be, join as Qe } from "node:path";
767
- function Ze() {
768
- 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";
859
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
860
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
861
+ import process$1 from "node:process";
862
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
863
+ import { dirname, join } from "node:path";
864
+ function isUnicodeSupported() {
865
+ if (process$1.platform !== "win32") {
866
+ return process$1.env.TERM !== "linux";
867
+ }
868
+ 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";
769
869
  }
770
- 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, ft, vt, wt, Ct, fe, Ve, re, _t, je, Ot;
870
+ function formatInstructionFooter(o, e) {
871
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
872
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
873
+ }
874
+ 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, log, cancel, intro, outro, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, c, select, i, text;
771
875
  var init_dist4 = __esm({
772
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
876
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
773
877
  init_utils2();
774
878
  init_dist3();
775
879
  init_dist3();
776
880
  init_main();
777
881
  init_dist2();
778
882
  import_sisteransi2 = __toESM(require_src(), 1);
779
- ee = Ze();
780
- ae = () => process.env.CI === "true";
781
- w2 = (e, i) => ee ? e : i;
782
- _e = w2("\u25C6", "*");
783
- oe = w2("\u25A0", "x");
784
- ue = w2("\u25B2", "x");
785
- F = w2("\u25C7", "o");
786
- le = w2("\u250C", "T");
787
- d2 = w2("\u2502", "|");
788
- E2 = w2("\u2514", "\u2014");
789
- Ie = w2("\u2510", "T");
790
- Ee = w2("\u2518", "\u2014");
791
- z2 = w2("\u25CF", ">");
792
- H2 = w2("\u25CB", " ");
793
- te = w2("\u25FB", "[\u2022]");
794
- U = w2("\u25FC", "[+]");
795
- J = w2("\u25FB", "[ ]");
796
- xe = w2("\u25AA", "\u2022");
797
- se = w2("\u2500", "-");
798
- ce = w2("\u256E", "+");
799
- Ge = w2("\u251C", "+");
800
- $e = w2("\u256F", "+");
801
- de = w2("\u2570", "+");
802
- Oe = w2("\u256D", "+");
803
- he = w2("\u25CF", "\u2022");
804
- pe = w2("\u25C6", "*");
805
- me = w2("\u25B2", "!");
806
- ge = w2("\u25A0", "x");
807
- V2 = (e) => {
808
- switch (e) {
883
+ unicode = isUnicodeSupported();
884
+ isCI = () => process.env.CI === "true";
885
+ unicodeOr = (o, e) => unicode ? o : e;
886
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
887
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
888
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
889
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
890
+ S_BAR_START = unicodeOr("\u250C", "T");
891
+ S_BAR = unicodeOr("\u2502", "|");
892
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
893
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
894
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
895
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
896
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
897
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
898
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
899
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
900
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
901
+ S_BAR_H = unicodeOr("\u2500", "-");
902
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
903
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
904
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
905
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
906
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
907
+ S_INFO = unicodeOr("\u25CF", "\u2022");
908
+ S_SUCCESS = unicodeOr("\u25C6", "*");
909
+ S_WARN = unicodeOr("\u25B2", "!");
910
+ S_ERROR = unicodeOr("\u25A0", "x");
911
+ symbol = (o) => {
912
+ switch (o) {
809
913
  case "initial":
810
914
  case "active":
811
- return t("cyan", _e);
915
+ return styleText2("cyan", S_STEP_ACTIVE);
812
916
  case "cancel":
813
- return t("red", oe);
917
+ return styleText2("red", S_STEP_CANCEL);
814
918
  case "error":
815
- return t("yellow", ue);
919
+ return styleText2("yellow", S_STEP_ERROR);
816
920
  case "submit":
817
- return t("green", F);
921
+ return styleText2("green", S_STEP_SUBMIT);
922
+ case "validating":
923
+ return styleText2("dim", S_STEP_ACTIVE);
818
924
  }
819
925
  };
820
- ye = (e) => {
821
- switch (e) {
926
+ symbolBar = (o) => {
927
+ switch (o) {
822
928
  case "initial":
823
929
  case "active":
824
- return t("cyan", d2);
930
+ return styleText2("cyan", S_BAR);
825
931
  case "cancel":
826
- return t("red", d2);
932
+ return styleText2("red", S_BAR);
827
933
  case "error":
828
- return t("yellow", d2);
934
+ return styleText2("yellow", S_BAR);
829
935
  case "submit":
830
- return t("green", d2);
831
- }
832
- };
833
- et2 = (e, i, s, r, u2) => {
834
- let n = i, o = 0;
835
- for (let c2 = s; c2 < r; c2++) {
836
- const a = e[c2];
837
- if (n = n - a.length, o++, n <= u2) break;
838
- }
839
- return { lineCount: n, removals: o };
840
- };
841
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
842
- 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);
843
- let p2 = 0;
844
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
845
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
846
- const S2 = Math.min(p2 + y2, i.length), h = [];
936
+ return styleText2("green", S_BAR);
937
+ }
938
+ };
939
+ I = (l2, e, w, p, b, C2 = false) => {
940
+ let r2 = e, O = 0;
941
+ if (C2)
942
+ for (let i2 = p - 1; i2 >= w; i2--) {
943
+ const m = l2[i2];
944
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
945
+ }
946
+ else
947
+ for (let i2 = w; i2 < p; i2++) {
948
+ const m = l2[i2];
949
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
950
+ }
951
+ return { lineCount: r2, removals: O };
952
+ };
953
+ limitOptions = ({
954
+ cursor: l2,
955
+ options: e,
956
+ style: w,
957
+ output: p = process.stdout,
958
+ maxItems: b = Number.POSITIVE_INFINITY,
959
+ columnPadding: C2 = 0,
960
+ rowPadding: r2 = 4
961
+ }) => {
962
+ const i2 = getColumns(p) - C2, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
847
963
  let f = 0;
848
- m && f++, g && f++;
849
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
850
- for (let b = v; b < T; b++) {
851
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
964
+ l2 >= a2 - 3 && (f = Math.max(
965
+ Math.min(l2 - a2 + 3, e.length - a2),
966
+ 0
967
+ ));
968
+ let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
969
+ const W2 = Math.min(
970
+ f + a2,
971
+ e.length
972
+ ), s = [];
973
+ let g = 0;
974
+ d && g++, c2 && g++;
975
+ const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
976
+ for (let t2 = T; t2 < y2; t2++) {
977
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
978
+ hard: true,
979
+ trim: false
980
+ }).split(`
852
981
  `);
853
- h.push(x), f += x.length;
854
- }
855
- if (f > $2) {
856
- let b = 0, x = 0, G2 = f;
857
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
858
- 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));
859
- }
860
- const C2 = [];
861
- m && C2.push(l);
862
- for (const b of h) for (const x of b) C2.push(x);
863
- return g && C2.push(l), C2;
864
- };
865
- ot2 = (e) => {
866
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
867
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
868
- 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)}
869
- ` : ""}${o}
870
- `, a = this.value ? i : s;
871
- switch (this.state) {
872
- case "submit": {
873
- const l = r ? `${t("gray", d2)} ` : "";
874
- return `${c2}${l}${t("dim", a)}`;
875
- }
876
- case "cancel": {
877
- const l = r ? `${t("gray", d2)} ` : "";
878
- return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
879
- ${t("gray", d2)}` : ""}`;
880
- }
881
- default: {
882
- const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
883
- return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
884
- ${t("cyan", d2)} ` : `
885
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
886
- ${$2}
982
+ s.push(h2), g += h2.length;
983
+ }
984
+ if (g > v) {
985
+ let t2 = 0, n3 = 0, o = g;
986
+ const h2 = l2 - T;
987
+ let u3 = v;
988
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
989
+ s,
990
+ o,
991
+ h2 + 1,
992
+ s.length,
993
+ u3,
994
+ true
995
+ );
996
+ d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c2 = true, s.splice(s.length - n3, n3));
997
+ }
998
+ const x = [];
999
+ d && x.push(M);
1000
+ for (const t2 of s)
1001
+ for (const n3 of t2)
1002
+ x.push(n3);
1003
+ return c2 && x.push(M), x;
1004
+ };
1005
+ confirm = (i2) => {
1006
+ const a2 = i2.active ?? "Yes", s = i2.inactive ?? "No";
1007
+ return new r({
1008
+ active: a2,
1009
+ inactive: s,
1010
+ signal: i2.signal,
1011
+ input: i2.input,
1012
+ output: i2.output,
1013
+ initialValue: i2.initialValue ?? true,
1014
+ render() {
1015
+ const e = i2.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = e ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
1016
+ i2.output,
1017
+ i2.message,
1018
+ l2,
1019
+ u3
1020
+ ), o = `${e ? `${styleText2("gray", S_BAR)}
1021
+ ` : ""}${f}
1022
+ `, c2 = this.value ? a2 : s;
1023
+ switch (this.state) {
1024
+ case "submit": {
1025
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
1026
+ return `${o}${r2}${styleText2("dim", c2)}`;
1027
+ }
1028
+ case "cancel": {
1029
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
1030
+ return `${o}${r2}${styleText2(["strikethrough", "dim"], c2)}${e ? `
1031
+ ${styleText2("gray", S_BAR)}` : ""}`;
1032
+ }
1033
+ default: {
1034
+ const r2 = e ? `${styleText2("cyan", S_BAR)} ` : "", g = e ? styleText2("cyan", S_BAR_END) : "";
1035
+ return `${o}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${i2.vertical ? e ? `
1036
+ ${styleText2("cyan", S_BAR)} ` : `
1037
+ ` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", s)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${s}`}
1038
+ ${g}
887
1039
  `;
1040
+ }
888
1041
  }
889
1042
  }
890
- } }).prompt();
1043
+ }).prompt();
891
1044
  };
892
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
893
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
894
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
895
- const y2 = Array.isArray(e) ? e : e.split(`
1045
+ MULTISELECT_INSTRUCTIONS = [
1046
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1047
+ `${styleText2("dim", "Space:")} select`,
1048
+ `${styleText2("dim", "Enter:")} confirm`
1049
+ ];
1050
+ log = {
1051
+ message: (s = [], {
1052
+ symbol: e = styleText2("gray", S_BAR),
1053
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
1054
+ output: m = process.stdout,
1055
+ spacing: l2 = 1,
1056
+ withGuide: c2
1057
+ } = {}) => {
1058
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
1059
+ for (let i2 = 0; i2 < l2; i2++)
1060
+ t2.push(f);
1061
+ const g = Array.isArray(s) ? s : s.split(`
896
1062
  `);
897
- if (y2.length > 0) {
898
- const [p2, ...m] = y2;
899
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
900
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
901
- }
902
- r.write(`${o.join(`
1063
+ if (g.length > 0) {
1064
+ const [i2, ...y2] = g;
1065
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
1066
+ for (const p of y2)
1067
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
1068
+ }
1069
+ m.write(`${t2.join(`
903
1070
  `)}
904
1071
  `);
905
- }, info: (e, i) => {
906
- O2.message(e, { ...i, symbol: t("blue", he) });
907
- }, success: (e, i) => {
908
- O2.message(e, { ...i, symbol: t("green", pe) });
909
- }, step: (e, i) => {
910
- O2.message(e, { ...i, symbol: t("green", F) });
911
- }, warn: (e, i) => {
912
- O2.message(e, { ...i, symbol: t("yellow", me) });
913
- }, warning: (e, i) => {
914
- O2.warn(e, i);
915
- }, error: (e, i) => {
916
- O2.message(e, { ...i, symbol: t("red", ge) });
917
- } };
918
- pt = (e = "", i) => {
919
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
920
- s.write(`${r}${t("red", e)}
1072
+ },
1073
+ info: (s, e) => {
1074
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
1075
+ },
1076
+ success: (s, e) => {
1077
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
1078
+ },
1079
+ step: (s, e) => {
1080
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1081
+ },
1082
+ warn: (s, e) => {
1083
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1084
+ },
1085
+ /** alias for `log.warn()`. */
1086
+ warning: (s, e) => {
1087
+ log.warn(s, e);
1088
+ },
1089
+ error: (s, e) => {
1090
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1091
+ }
1092
+ };
1093
+ cancel = (o = "", t2) => {
1094
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1095
+ i2.write(`${e}${styleText2("red", o)}
921
1096
 
922
1097
  `);
923
1098
  };
924
- mt = (e = "", i) => {
925
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
926
- s.write(`${r}${e}
1099
+ intro = (o = "", t2) => {
1100
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
1101
+ i2.write(`${e}${o}
927
1102
  `);
928
1103
  };
929
- gt = (e = "", i) => {
930
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
931
- ${t("gray", E2)} ` : "";
932
- s.write(`${r}${e}
1104
+ outro = (o = "", t2) => {
1105
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
1106
+ ${styleText2("gray", S_BAR_END)} ` : "";
1107
+ i2.write(`${e}${o}
933
1108
 
934
1109
  `);
935
1110
  };
936
- ft = (e) => t("dim", e);
937
- vt = (e, i, s) => {
938
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
939
- `), 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);
940
- return wrapAnsi(e, c2, r);
941
- };
942
- wt = (e = "", i = "", s) => {
943
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
944
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
945
- const g = dist_default2(m);
946
- return g > p2 ? g : p2;
947
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
948
- `), $2 = u2 ? `${t("gray", d2)}
949
- ` : "", y2 = u2 ? Ge : de;
950
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
951
- ${l}
952
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
953
- `);
1111
+ W$1 = (o) => o;
1112
+ C = (o, e, s) => {
1113
+ const a2 = {
1114
+ hard: true,
1115
+ trim: false
1116
+ }, i2 = wrapAnsi(o, e, a2).split(`
1117
+ `), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
1118
+ return wrapAnsi(o, g, a2);
1119
+ };
1120
+ note = (o = "", e = "", s) => {
1121
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
1122
+ `).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
1123
+ g.reduce((m, F) => {
1124
+ const O = dist_default2(F);
1125
+ return O > m ? O : m;
1126
+ }, 0),
1127
+ n3
1128
+ ) + 2, h2 = g.map(
1129
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
1130
+ ).join(`
1131
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
1132
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
1133
+ a2.write(
1134
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
1135
+ "gray",
1136
+ S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
1137
+ )}
1138
+ ${h2}
1139
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
1140
+ `
1141
+ );
954
1142
  };
955
- Ct = (e) => t("magenta", e);
956
- 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 } = {}) => {
957
- const l = ae();
958
- let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
959
- const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
960
- const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
961
- m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
962
- }, C2 = () => T(2), b = () => T(1), x = () => {
963
- 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);
964
- }, G2 = () => {
965
- 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);
966
- }, M2 = () => {
967
- if (S2 === void 0) return;
968
- l && s.write(`
1143
+ W = (l2) => styleText2("magenta", l2);
1144
+ spinner = ({
1145
+ indicator: l2 = "dots",
1146
+ onCancel: h2,
1147
+ output: n3 = process.stdout,
1148
+ cancelMessage: G,
1149
+ errorMessage: O,
1150
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
1151
+ delay: F = unicode ? 80 : 120,
1152
+ signal: m,
1153
+ ...I2
1154
+ } = {}) => {
1155
+ const u3 = isCI();
1156
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
1157
+ const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
1158
+ const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
1159
+ S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
1160
+ }, f = () => g(2), i2 = () => g(1), A = () => {
1161
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m && m.addEventListener("abort", i2);
1162
+ }, H = () => {
1163
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m && m.removeEventListener("abort", i2);
1164
+ }, y2 = () => {
1165
+ if (p === void 0) return;
1166
+ u3 && n3.write(`
969
1167
  `);
970
- const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
1168
+ const r2 = wrapAnsi(p, x, {
1169
+ hard: true,
1170
+ trim: false
1171
+ }).split(`
971
1172
  `);
972
- _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());
973
- }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
974
- const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
975
- return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
976
- }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
977
- p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
1173
+ r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
1174
+ }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
1175
+ const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
1176
+ return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
1177
+ }, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
1178
+ d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N && n3.write(`${styleText2("gray", S_BAR)}
978
1179
  `);
979
- let A2 = 0, k = 0;
980
- x(), y2 = setInterval(() => {
981
- if (l && g === S2) return;
982
- M2(), S2 = g;
983
- const L = v(n[A2]);
984
- let Z;
985
- if (l) Z = `${L} ${g}...`;
986
- else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
1180
+ let r2 = 0, t2 = 0;
1181
+ A(), T = setInterval(() => {
1182
+ if (u3 && s === p)
1183
+ return;
1184
+ y2(), p = s;
1185
+ const o = k(E[r2]);
1186
+ let v;
1187
+ if (u3)
1188
+ v = `${o} ${s}...`;
1189
+ else if (l2 === "timer")
1190
+ v = `${o} ${s} ${_(w)}`;
987
1191
  else {
988
- const Be = ".".repeat(Math.floor(k)).slice(0, 3);
989
- Z = `${L} ${g}${Be}`;
990
- }
991
- const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
992
- s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
993
- }, o);
994
- }, W = (_2 = "", A2 = 0, k = false) => {
995
- if (!p2) return;
996
- p2 = false, clearInterval(y2), M2();
997
- const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
998
- g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
999
- `) : s.write(`${L} ${g}
1000
- `)), G2(), $2();
1192
+ const B = ".".repeat(Math.floor(t2)).slice(0, 3);
1193
+ v = `${o} ${s}${B}`;
1194
+ }
1195
+ const j = wrapAnsi(v, x, {
1196
+ hard: true,
1197
+ trim: false
1198
+ });
1199
+ n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
1200
+ }, F);
1201
+ }, a2 = (e = "", r2 = 0, t2 = false) => {
1202
+ if (!d) return;
1203
+ d = false, clearInterval(T), y2();
1204
+ const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
1205
+ s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
1206
+ `) : n3.write(`${o} ${s}
1207
+ `)), H(), M();
1208
+ };
1209
+ return {
1210
+ start: P,
1211
+ stop: (e = "") => a2(e, 0),
1212
+ message: (e = "") => {
1213
+ s = C2(e ?? s);
1214
+ },
1215
+ cancel: (e = "") => a2(e, 1),
1216
+ error: (e = "") => a2(e, 2),
1217
+ clear: () => a2("", 0, true),
1218
+ get isCancelled() {
1219
+ return S;
1220
+ }
1001
1221
  };
1002
- return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
1003
- g = R2(_2 ?? g);
1004
- }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
1005
- return m;
1006
- } };
1007
- };
1008
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1009
- re = (e, i) => e.includes(`
1010
- `) ? e.split(`
1011
- `).map((s) => i(s)).join(`
1012
- `) : i(e);
1013
- _t = (e) => {
1014
- const i = (s, r) => {
1015
- const u2 = s.label ?? String(s.value);
1016
- switch (r) {
1222
+ };
1223
+ u2 = {
1224
+ light: unicodeOr("\u2500", "-"),
1225
+ heavy: unicodeOr("\u2501", "="),
1226
+ block: unicodeOr("\u2588", "#")
1227
+ };
1228
+ SELECT_INSTRUCTIONS = [
1229
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1230
+ `${styleText2("dim", "Enter:")} confirm`
1231
+ ];
1232
+ c = (t2, o) => t2.includes(`
1233
+ `) ? t2.split(`
1234
+ `).map((d) => o(d)).join(`
1235
+ `) : o(t2);
1236
+ select = (t2) => {
1237
+ const o = (n3, m) => {
1238
+ if (n3 === void 0)
1239
+ return "";
1240
+ const s = n3.label ?? String(n3.value);
1241
+ switch (m) {
1017
1242
  case "disabled":
1018
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1243
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
1019
1244
  case "selected":
1020
- return `${re(u2, (n) => t("dim", n))}`;
1245
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
1021
1246
  case "active":
1022
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1247
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
1023
1248
  case "cancelled":
1024
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1249
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
1025
1250
  default:
1026
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1027
- }
1028
- };
1029
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1030
- const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
1031
- ` : ""}${n}
1251
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1252
+ }
1253
+ }, d = t2.showInstructions ?? true;
1254
+ return new n$1({
1255
+ options: t2.options,
1256
+ signal: t2.signal,
1257
+ input: t2.input,
1258
+ output: t2.output,
1259
+ initialValue: t2.initialValue,
1260
+ render() {
1261
+ const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1262
+ t2.output,
1263
+ t2.message,
1264
+ s,
1265
+ m
1266
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1267
+ ` : ""}${i2}
1268
+ `;
1269
+ switch (this.state) {
1270
+ case "submit": {
1271
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1272
+ t2.output,
1273
+ o(this.options[this.cursor], "selected"),
1274
+ r2
1275
+ );
1276
+ return `${u3}${a2}`;
1277
+ }
1278
+ case "cancel": {
1279
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1280
+ t2.output,
1281
+ o(this.options[this.cursor], "cancelled"),
1282
+ r2
1283
+ );
1284
+ return `${u3}${a2}${n3 ? `
1285
+ ${styleText2("gray", S_BAR)}` : ""}`;
1286
+ }
1287
+ default: {
1288
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1289
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
1290
+ `), f = p.length + 1;
1291
+ return `${u3}${r2}${limitOptions({
1292
+ output: t2.output,
1293
+ cursor: this.cursor,
1294
+ options: this.options,
1295
+ maxItems: t2.maxItems,
1296
+ columnPadding: r2.length,
1297
+ rowPadding: a2 + f,
1298
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1299
+ }).join(`
1300
+ ${r2}`)}
1301
+ ${b}
1032
1302
  `;
1303
+ }
1304
+ }
1305
+ }
1306
+ }).prompt();
1307
+ };
1308
+ i = `${styleText2("gray", S_BAR)} `;
1309
+ text = (t2) => new n2({
1310
+ validate: t2.validate,
1311
+ placeholder: t2.placeholder,
1312
+ defaultValue: t2.defaultValue,
1313
+ initialValue: t2.initialValue,
1314
+ output: t2.output,
1315
+ signal: t2.signal,
1316
+ input: t2.input,
1317
+ render() {
1318
+ const r2 = t2?.withGuide ?? settings.withGuide, l2 = `${`${r2 ? `${styleText2("gray", S_BAR)}
1319
+ ` : ""}${symbol(this.state)} `}${t2.message}
1320
+ `, d = t2.placeholder && t2.placeholder.length > 0 ? (
1321
+ // biome-ignore lint/style/noNonNullAssertion: guarded by placeholder.length > 0
1322
+ styleText2("inverse", t2.placeholder[0]) + styleText2("dim", t2.placeholder.slice(1))
1323
+ ) : styleText2(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : d, s = this.value ?? "";
1033
1324
  switch (this.state) {
1325
+ case "validating": {
1326
+ const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "", c2 = styleText2("dim", o), $ = styleText2("dim", "Validating...");
1327
+ return `${l2}${n3}${c2}
1328
+ ${i2} ${$}
1329
+ `;
1330
+ }
1331
+ case "error": {
1332
+ const n3 = this.error ? ` ${styleText2("yellow", this.error)}` : "", i2 = r2 ? `${styleText2("yellow", S_BAR)} ` : "", c2 = r2 ? styleText2("yellow", S_BAR_END) : "";
1333
+ return `${l2.trim()}
1334
+ ${i2}${o}
1335
+ ${c2}${n3}
1336
+ `;
1337
+ }
1034
1338
  case "submit": {
1035
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1036
- return `${o}${a}`;
1339
+ const n3 = s ? `${r2 ? " " : ""}${styleText2("dim", s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
1340
+ return `${l2}${i2}${n3}`;
1037
1341
  }
1038
1342
  case "cancel": {
1039
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1040
- return `${o}${a}${s ? `
1041
- ${t("gray", d2)}` : ""}`;
1343
+ const n3 = s ? ` ${styleText2(["strikethrough", "dim"], s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
1344
+ return `${l2}${i2}${n3}${s.trim() ? `
1345
+ ${i2}` : ""}`;
1042
1346
  }
1043
1347
  default: {
1044
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1045
- `).length, $2 = s ? 2 : 1;
1046
- return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1047
- ${c2}`)}
1048
- ${a}
1348
+ const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "";
1349
+ return `${l2}${n3}${o}
1350
+ ${i2}
1049
1351
  `;
1050
1352
  }
1051
1353
  }
1052
- } }).prompt();
1053
- };
1054
- je = `${t("gray", d2)} `;
1055
- Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
1056
- const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t("gray", d2)}
1057
- ` : ""}${V2(this.state)} `}${e.message}
1058
- `, r = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
1059
- switch (this.state) {
1060
- case "error": {
1061
- const o = this.error ? ` ${t("yellow", this.error)}` : "", c2 = i ? `${t("yellow", d2)} ` : "", a = i ? t("yellow", E2) : "";
1062
- return `${s.trim()}
1063
- ${c2}${u2}
1064
- ${a}${o}
1065
- `;
1066
- }
1067
- case "submit": {
1068
- const o = n ? ` ${t("dim", n)}` : "", c2 = i ? t("gray", d2) : "";
1069
- return `${s}${c2}${o}`;
1070
- }
1071
- case "cancel": {
1072
- const o = n ? ` ${t(["strikethrough", "dim"], n)}` : "", c2 = i ? t("gray", d2) : "";
1073
- return `${s}${c2}${o}${n.trim() ? `
1074
- ${c2}` : ""}`;
1075
- }
1076
- default: {
1077
- const o = i ? `${t("cyan", d2)} ` : "", c2 = i ? t("cyan", E2) : "";
1078
- return `${s}${o}${u2}
1079
- ${c2}
1080
- `;
1081
- }
1082
1354
  }
1083
- } }).prompt();
1355
+ }).prompt();
1084
1356
  }
1085
1357
  });
1086
1358
 
@@ -1088,21 +1360,21 @@ ${c2}
1088
1360
  var cli_output_exports = {};
1089
1361
  __export(cli_output_exports, {
1090
1362
  LogLevel: () => LogLevel,
1091
- cancel: () => pt,
1363
+ cancel: () => cancel,
1092
1364
  colorUtils: () => colorUtils,
1093
1365
  displayDoNotDevError: () => displayDoNotDevError,
1094
1366
  error: () => error,
1095
1367
  getLogLevel: () => getLogLevel,
1096
1368
  info: () => info,
1097
- intro: () => mt,
1098
- isCancel: () => q,
1369
+ intro: () => intro,
1370
+ isCancel: () => isCancel,
1099
1371
  isDebug: () => isDebug,
1100
1372
  isVerbose: () => isVerbose,
1101
- log: () => log,
1102
- note: () => wt,
1103
- outro: () => gt,
1373
+ log: () => log2,
1374
+ note: () => note,
1375
+ outro: () => outro,
1104
1376
  setLogLevel: () => setLogLevel,
1105
- spinner: () => fe,
1377
+ spinner: () => spinner,
1106
1378
  success: () => success,
1107
1379
  warn: () => warn
1108
1380
  });
@@ -1114,9 +1386,9 @@ function supportsColor() {
1114
1386
  }
1115
1387
  return process.stdout.isTTY === true;
1116
1388
  }
1117
- function colorize(text, color) {
1118
- if (!supportsColor()) return text;
1119
- return `${color}${text}${colors.reset}`;
1389
+ function colorize(text2, color) {
1390
+ if (!supportsColor()) return text2;
1391
+ return `${color}${text2}${colors.reset}`;
1120
1392
  }
1121
1393
  function setLogLevel(level) {
1122
1394
  currentLogLevel = level;
@@ -1178,9 +1450,9 @@ ${contextStr}`;
1178
1450
 
1179
1451
  Original error: ${originalMsg}`;
1180
1452
  }
1181
- O2.error(message);
1453
+ log.error(message);
1182
1454
  }
1183
- var colors, colorUtils, LogLevel, currentLogLevel, log, error, warn, info, success;
1455
+ var colors, colorUtils, LogLevel, currentLogLevel, log2, error, warn, info, success;
1184
1456
  var init_cli_output = __esm({
1185
1457
  "packages/tooling/src/utils/cli-output.ts"() {
1186
1458
  "use strict";
@@ -1225,7 +1497,7 @@ var init_cli_output = __esm({
1225
1497
  currentLogLevel = envLevel;
1226
1498
  }
1227
1499
  }
1228
- log = {
1500
+ log2 = {
1229
1501
  /**
1230
1502
  * Logs an error message (always shows unless Quiet level)
1231
1503
  * Uses clack's log.error + explicit red color
@@ -1233,7 +1505,7 @@ var init_cli_output = __esm({
1233
1505
  error(...args) {
1234
1506
  if (currentLogLevel < 0 /* Quiet */) return;
1235
1507
  const message = formatMessage(...args);
1236
- O2.error(colorize(message, colors.brightRed));
1508
+ log.error(colorize(message, colors.brightRed));
1237
1509
  },
1238
1510
  /**
1239
1511
  * Logs a warning message (shows at Normal level and above)
@@ -1242,7 +1514,7 @@ var init_cli_output = __esm({
1242
1514
  warn(...args) {
1243
1515
  if (currentLogLevel < 1 /* Normal */) return;
1244
1516
  const message = formatMessage(...args);
1245
- O2.warn(colorize(message, colors.brightYellow));
1517
+ log.warn(colorize(message, colors.brightYellow));
1246
1518
  },
1247
1519
  /**
1248
1520
  * Logs an info message (shows at Normal level and above)
@@ -1251,7 +1523,7 @@ var init_cli_output = __esm({
1251
1523
  info(...args) {
1252
1524
  if (currentLogLevel < 1 /* Normal */) return;
1253
1525
  const message = formatMessage(...args);
1254
- O2.info(colorize(message, colors.brightCyan));
1526
+ log.info(colorize(message, colors.brightCyan));
1255
1527
  },
1256
1528
  /**
1257
1529
  * Logs a success message (shows at Normal level and above)
@@ -1260,7 +1532,7 @@ var init_cli_output = __esm({
1260
1532
  success(...args) {
1261
1533
  if (currentLogLevel < 1 /* Normal */) return;
1262
1534
  const message = formatMessage(...args);
1263
- O2.success(colorize(message, colors.brightGreen));
1535
+ log.success(colorize(message, colors.brightGreen));
1264
1536
  },
1265
1537
  /**
1266
1538
  * Logs a debug message (only shows at Verbose level and above)
@@ -1269,7 +1541,7 @@ var init_cli_output = __esm({
1269
1541
  debug(...args) {
1270
1542
  if (currentLogLevel < 2 /* Verbose */) return;
1271
1543
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1272
- O2.message(
1544
+ log.message(
1273
1545
  colorize(
1274
1546
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1275
1547
  colors.gray
@@ -1283,7 +1555,7 @@ var init_cli_output = __esm({
1283
1555
  trace(...args) {
1284
1556
  if (currentLogLevel < 3 /* Debug */) return;
1285
1557
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1286
- O2.message(
1558
+ log.message(
1287
1559
  colorize(
1288
1560
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1289
1561
  colors.gray
@@ -1291,10 +1563,10 @@ var init_cli_output = __esm({
1291
1563
  );
1292
1564
  }
1293
1565
  };
1294
- error = log.error.bind(log);
1295
- warn = log.warn.bind(log);
1296
- info = log.info.bind(log);
1297
- success = log.success.bind(log);
1566
+ error = log2.error.bind(log2);
1567
+ warn = log2.warn.bind(log2);
1568
+ info = log2.info.bind(log2);
1569
+ success = log2.success.bind(log2);
1298
1570
  }
1299
1571
  });
1300
1572
 
@@ -1654,9 +1926,9 @@ var require_is_glob = __commonJS({
1654
1926
  index += 2;
1655
1927
  var close = chars[open];
1656
1928
  if (close) {
1657
- var n = str.indexOf(close, index);
1658
- if (n !== -1) {
1659
- index = n + 1;
1929
+ var n3 = str.indexOf(close, index);
1930
+ if (n3 !== -1) {
1931
+ index = n3 + 1;
1660
1932
  }
1661
1933
  }
1662
1934
  if (str[index] === "!") {
@@ -1682,9 +1954,9 @@ var require_is_glob = __commonJS({
1682
1954
  index += 2;
1683
1955
  var close = chars[open];
1684
1956
  if (close) {
1685
- var n = str.indexOf(close, index);
1686
- if (n !== -1) {
1687
- index = n + 1;
1957
+ var n3 = str.indexOf(close, index);
1958
+ if (n3 !== -1) {
1959
+ index = n3 + 1;
1688
1960
  }
1689
1961
  }
1690
1962
  if (str[index] === "!") {
@@ -1762,8 +2034,8 @@ var require_utils = __commonJS({
1762
2034
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1763
2035
  return (Number(max) - Number(min)) / Number(step) >= limit;
1764
2036
  };
1765
- exports.escapeNode = (block, n = 0, type) => {
1766
- const node = block.nodes[n];
2037
+ exports.escapeNode = (block2, n3 = 0, type) => {
2038
+ const node = block2.nodes[n3];
1767
2039
  if (!node) return;
1768
2040
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1769
2041
  if (node.escaped !== true) {
@@ -1780,15 +2052,15 @@ var require_utils = __commonJS({
1780
2052
  }
1781
2053
  return false;
1782
2054
  };
1783
- exports.isInvalidBrace = (block) => {
1784
- if (block.type !== "brace") return false;
1785
- if (block.invalid === true || block.dollar) return true;
1786
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1787
- block.invalid = true;
2055
+ exports.isInvalidBrace = (block2) => {
2056
+ if (block2.type !== "brace") return false;
2057
+ if (block2.invalid === true || block2.dollar) return true;
2058
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
2059
+ block2.invalid = true;
1788
2060
  return true;
1789
2061
  }
1790
- if (block.open !== true || block.close !== true) {
1791
- block.invalid = true;
2062
+ if (block2.open !== true || block2.close !== true) {
2063
+ block2.invalid = true;
1792
2064
  return true;
1793
2065
  }
1794
2066
  return false;
@@ -1807,8 +2079,8 @@ var require_utils = __commonJS({
1807
2079
  exports.flatten = (...args) => {
1808
2080
  const result = [];
1809
2081
  const flat = (arr) => {
1810
- for (let i = 0; i < arr.length; i++) {
1811
- const ele = arr[i];
2082
+ for (let i2 = 0; i2 < arr.length; i2++) {
2083
+ const ele = arr[i2];
1812
2084
  if (Array.isArray(ele)) {
1813
2085
  flat(ele);
1814
2086
  continue;
@@ -1902,9 +2174,9 @@ var require_to_regex_range = __commonJS({
1902
2174
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1903
2175
  return toRegexRange.cache[cacheKey].result;
1904
2176
  }
1905
- let a = Math.min(min, max);
2177
+ let a2 = Math.min(min, max);
1906
2178
  let b = Math.max(min, max);
1907
- if (Math.abs(a - b) === 1) {
2179
+ if (Math.abs(a2 - b) === 1) {
1908
2180
  let result = min + "|" + max;
1909
2181
  if (opts.capture) {
1910
2182
  return `(${result})`;
@@ -1915,20 +2187,20 @@ var require_to_regex_range = __commonJS({
1915
2187
  return `(?:${result})`;
1916
2188
  }
1917
2189
  let isPadded = hasPadding(min) || hasPadding(max);
1918
- let state = { min, max, a, b };
2190
+ let state = { min, max, a: a2, b };
1919
2191
  let positives = [];
1920
2192
  let negatives = [];
1921
2193
  if (isPadded) {
1922
2194
  state.isPadded = isPadded;
1923
2195
  state.maxLen = String(state.max).length;
1924
2196
  }
1925
- if (a < 0) {
2197
+ if (a2 < 0) {
1926
2198
  let newMin = b < 0 ? Math.abs(b) : 1;
1927
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1928
- a = state.a = 0;
2199
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
2200
+ a2 = state.a = 0;
1929
2201
  }
1930
2202
  if (b >= 0) {
1931
- positives = splitToPatterns(a, b, state, opts);
2203
+ positives = splitToPatterns(a2, b, state, opts);
1932
2204
  }
1933
2205
  state.negatives = negatives;
1934
2206
  state.positives = positives;
@@ -1976,8 +2248,8 @@ var require_to_regex_range = __commonJS({
1976
2248
  let digits = zipped.length;
1977
2249
  let pattern = "";
1978
2250
  let count = 0;
1979
- for (let i = 0; i < digits; i++) {
1980
- let [startDigit, stopDigit] = zipped[i];
2251
+ for (let i2 = 0; i2 < digits; i2++) {
2252
+ let [startDigit, stopDigit] = zipped[i2];
1981
2253
  if (startDigit === stopDigit) {
1982
2254
  pattern += startDigit;
1983
2255
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1996,8 +2268,8 @@ var require_to_regex_range = __commonJS({
1996
2268
  let tokens = [];
1997
2269
  let start = min;
1998
2270
  let prev;
1999
- for (let i = 0; i < ranges.length; i++) {
2000
- let max2 = ranges[i];
2271
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2272
+ let max2 = ranges[i2];
2001
2273
  let obj = rangeToPattern(String(start), String(max2), options);
2002
2274
  let zeros = "";
2003
2275
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -2032,13 +2304,13 @@ var require_to_regex_range = __commonJS({
2032
2304
  }
2033
2305
  return result;
2034
2306
  }
2035
- function zip(a, b) {
2307
+ function zip(a2, b) {
2036
2308
  let arr = [];
2037
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2309
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
2038
2310
  return arr;
2039
2311
  }
2040
- function compare(a, b) {
2041
- return a > b ? 1 : b > a ? -1 : 0;
2312
+ function compare(a2, b) {
2313
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
2042
2314
  }
2043
2315
  function contains(arr, key, val) {
2044
2316
  return arr.some((ele) => ele[key] === val);
@@ -2056,8 +2328,8 @@ var require_to_regex_range = __commonJS({
2056
2328
  }
2057
2329
  return "";
2058
2330
  }
2059
- function toCharacterClass(a, b, options) {
2060
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2331
+ function toCharacterClass(a2, b, options) {
2332
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
2061
2333
  }
2062
2334
  function hasPadding(str) {
2063
2335
  return /^-?(0+)\d/.test(str);
@@ -2136,8 +2408,8 @@ var require_fill_range = __commonJS({
2136
2408
  return negative ? "-" + input : input;
2137
2409
  };
2138
2410
  var toSequence = (parts, options, maxLen) => {
2139
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2140
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2411
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2412
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2141
2413
  let prefix = options.capture ? "" : "?:";
2142
2414
  let positives = "";
2143
2415
  let negatives = "";
@@ -2158,12 +2430,12 @@ var require_fill_range = __commonJS({
2158
2430
  }
2159
2431
  return result;
2160
2432
  };
2161
- var toRange = (a, b, isNumbers, options) => {
2433
+ var toRange = (a2, b, isNumbers, options) => {
2162
2434
  if (isNumbers) {
2163
- return toRegexRange(a, b, { wrap: false, ...options });
2435
+ return toRegexRange(a2, b, { wrap: false, ...options });
2164
2436
  }
2165
- let start = String.fromCharCode(a);
2166
- if (a === b) return start;
2437
+ let start = String.fromCharCode(a2);
2438
+ if (a2 === b) return start;
2167
2439
  let stop = String.fromCharCode(b);
2168
2440
  return `[${start}-${stop}]`;
2169
2441
  };
@@ -2189,15 +2461,15 @@ var require_fill_range = __commonJS({
2189
2461
  return [];
2190
2462
  };
2191
2463
  var fillNumbers = (start, end, step = 1, options = {}) => {
2192
- let a = Number(start);
2464
+ let a2 = Number(start);
2193
2465
  let b = Number(end);
2194
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2466
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2195
2467
  if (options.strictRanges === true) throw rangeError([start, end]);
2196
2468
  return [];
2197
2469
  }
2198
- if (a === 0) a = 0;
2470
+ if (a2 === 0) a2 = 0;
2199
2471
  if (b === 0) b = 0;
2200
- let descending = a > b;
2472
+ let descending = a2 > b;
2201
2473
  let startString = String(start);
2202
2474
  let endString = String(end);
2203
2475
  let stepString = String(step);
@@ -2213,13 +2485,13 @@ var require_fill_range = __commonJS({
2213
2485
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2214
2486
  let range = [];
2215
2487
  let index = 0;
2216
- while (descending ? a >= b : a <= b) {
2488
+ while (descending ? a2 >= b : a2 <= b) {
2217
2489
  if (options.toRegex === true && step > 1) {
2218
- push(a);
2490
+ push(a2);
2219
2491
  } else {
2220
- range.push(pad(format(a, index), maxLen, toNumber));
2492
+ range.push(pad(format(a2, index), maxLen, toNumber));
2221
2493
  }
2222
- a = descending ? a - step : a + step;
2494
+ a2 = descending ? a2 - step : a2 + step;
2223
2495
  index++;
2224
2496
  }
2225
2497
  if (options.toRegex === true) {
@@ -2232,19 +2504,19 @@ var require_fill_range = __commonJS({
2232
2504
  return invalidRange(start, end, options);
2233
2505
  }
2234
2506
  let format = options.transform || ((val) => String.fromCharCode(val));
2235
- let a = `${start}`.charCodeAt(0);
2507
+ let a2 = `${start}`.charCodeAt(0);
2236
2508
  let b = `${end}`.charCodeAt(0);
2237
- let descending = a > b;
2238
- let min = Math.min(a, b);
2239
- let max = Math.max(a, b);
2509
+ let descending = a2 > b;
2510
+ let min = Math.min(a2, b);
2511
+ let max = Math.max(a2, b);
2240
2512
  if (options.toRegex && step === 1) {
2241
2513
  return toRange(min, max, false, options);
2242
2514
  }
2243
2515
  let range = [];
2244
2516
  let index = 0;
2245
- while (descending ? a >= b : a <= b) {
2246
- range.push(format(a, index));
2247
- a = descending ? a - step : a + step;
2517
+ while (descending ? a2 >= b : a2 <= b) {
2518
+ range.push(format(a2, index));
2519
+ a2 = descending ? a2 - step : a2 + step;
2248
2520
  index++;
2249
2521
  }
2250
2522
  if (options.toRegex === true) {
@@ -2367,18 +2639,18 @@ var require_expand = __commonJS({
2367
2639
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2368
2640
  const walk = (node, parent = {}) => {
2369
2641
  node.queue = [];
2370
- let p2 = parent;
2371
- let q2 = parent.queue;
2372
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2373
- p2 = p2.parent;
2374
- q2 = p2.queue;
2642
+ let p = parent;
2643
+ let q = parent.queue;
2644
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2645
+ p = p.parent;
2646
+ q = p.queue;
2375
2647
  }
2376
2648
  if (node.invalid || node.dollar) {
2377
- q2.push(append(q2.pop(), stringify2(node, options)));
2649
+ q.push(append(q.pop(), stringify2(node, options)));
2378
2650
  return;
2379
2651
  }
2380
2652
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2381
- q2.push(append(q2.pop(), ["{}"]));
2653
+ q.push(append(q.pop(), ["{}"]));
2382
2654
  return;
2383
2655
  }
2384
2656
  if (node.nodes && node.ranges > 0) {
@@ -2390,26 +2662,26 @@ var require_expand = __commonJS({
2390
2662
  if (range.length === 0) {
2391
2663
  range = stringify2(node, options);
2392
2664
  }
2393
- q2.push(append(q2.pop(), range));
2665
+ q.push(append(q.pop(), range));
2394
2666
  node.nodes = [];
2395
2667
  return;
2396
2668
  }
2397
2669
  const enclose = utils.encloseBrace(node);
2398
2670
  let queue = node.queue;
2399
- let block = node;
2400
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2401
- block = block.parent;
2402
- queue = block.queue;
2671
+ let block2 = node;
2672
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2673
+ block2 = block2.parent;
2674
+ queue = block2.queue;
2403
2675
  }
2404
- for (let i = 0; i < node.nodes.length; i++) {
2405
- const child = node.nodes[i];
2676
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2677
+ const child = node.nodes[i2];
2406
2678
  if (child.type === "comma" && node.type === "brace") {
2407
- if (i === 1) queue.push("");
2679
+ if (i2 === 1) queue.push("");
2408
2680
  queue.push("");
2409
2681
  continue;
2410
2682
  }
2411
2683
  if (child.type === "close") {
2412
- q2.push(append(q2.pop(), queue, enclose));
2684
+ q.push(append(q.pop(), queue, enclose));
2413
2685
  continue;
2414
2686
  }
2415
2687
  if (child.value && child.type !== "open") {
@@ -2576,7 +2848,7 @@ var require_parse = __commonJS({
2576
2848
  }
2577
2849
  const ast = { type: "root", input, nodes: [] };
2578
2850
  const stack = [ast];
2579
- let block = ast;
2851
+ let block2 = ast;
2580
2852
  let prev = ast;
2581
2853
  let brackets = 0;
2582
2854
  const length = input.length;
@@ -2592,15 +2864,15 @@ var require_parse = __commonJS({
2592
2864
  prev.value += node.value;
2593
2865
  return;
2594
2866
  }
2595
- block.nodes.push(node);
2596
- node.parent = block;
2867
+ block2.nodes.push(node);
2868
+ node.parent = block2;
2597
2869
  node.prev = prev;
2598
2870
  prev = node;
2599
2871
  return node;
2600
2872
  };
2601
2873
  push({ type: "bos" });
2602
2874
  while (index < length) {
2603
- block = stack[stack.length - 1];
2875
+ block2 = stack[stack.length - 1];
2604
2876
  value = advance();
2605
2877
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2606
2878
  continue;
@@ -2637,19 +2909,19 @@ var require_parse = __commonJS({
2637
2909
  continue;
2638
2910
  }
2639
2911
  if (value === CHAR_LEFT_PARENTHESES) {
2640
- block = push({ type: "paren", nodes: [] });
2641
- stack.push(block);
2912
+ block2 = push({ type: "paren", nodes: [] });
2913
+ stack.push(block2);
2642
2914
  push({ type: "text", value });
2643
2915
  continue;
2644
2916
  }
2645
2917
  if (value === CHAR_RIGHT_PARENTHESES) {
2646
- if (block.type !== "paren") {
2918
+ if (block2.type !== "paren") {
2647
2919
  push({ type: "text", value });
2648
2920
  continue;
2649
2921
  }
2650
- block = stack.pop();
2922
+ block2 = stack.pop();
2651
2923
  push({ type: "text", value });
2652
- block = stack[stack.length - 1];
2924
+ block2 = stack[stack.length - 1];
2653
2925
  continue;
2654
2926
  }
2655
2927
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2674,7 +2946,7 @@ var require_parse = __commonJS({
2674
2946
  }
2675
2947
  if (value === CHAR_LEFT_CURLY_BRACE) {
2676
2948
  depth++;
2677
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2949
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2678
2950
  const brace = {
2679
2951
  type: "brace",
2680
2952
  open: true,
@@ -2685,52 +2957,52 @@ var require_parse = __commonJS({
2685
2957
  ranges: 0,
2686
2958
  nodes: []
2687
2959
  };
2688
- block = push(brace);
2689
- stack.push(block);
2960
+ block2 = push(brace);
2961
+ stack.push(block2);
2690
2962
  push({ type: "open", value });
2691
2963
  continue;
2692
2964
  }
2693
2965
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2694
- if (block.type !== "brace") {
2966
+ if (block2.type !== "brace") {
2695
2967
  push({ type: "text", value });
2696
2968
  continue;
2697
2969
  }
2698
2970
  const type = "close";
2699
- block = stack.pop();
2700
- block.close = true;
2971
+ block2 = stack.pop();
2972
+ block2.close = true;
2701
2973
  push({ type, value });
2702
2974
  depth--;
2703
- block = stack[stack.length - 1];
2975
+ block2 = stack[stack.length - 1];
2704
2976
  continue;
2705
2977
  }
2706
2978
  if (value === CHAR_COMMA && depth > 0) {
2707
- if (block.ranges > 0) {
2708
- block.ranges = 0;
2709
- const open = block.nodes.shift();
2710
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2979
+ if (block2.ranges > 0) {
2980
+ block2.ranges = 0;
2981
+ const open = block2.nodes.shift();
2982
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2711
2983
  }
2712
2984
  push({ type: "comma", value });
2713
- block.commas++;
2985
+ block2.commas++;
2714
2986
  continue;
2715
2987
  }
2716
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2717
- const siblings = block.nodes;
2988
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2989
+ const siblings = block2.nodes;
2718
2990
  if (depth === 0 || siblings.length === 0) {
2719
2991
  push({ type: "text", value });
2720
2992
  continue;
2721
2993
  }
2722
2994
  if (prev.type === "dot") {
2723
- block.range = [];
2995
+ block2.range = [];
2724
2996
  prev.value += value;
2725
2997
  prev.type = "range";
2726
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2727
- block.invalid = true;
2728
- block.ranges = 0;
2998
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2999
+ block2.invalid = true;
3000
+ block2.ranges = 0;
2729
3001
  prev.type = "text";
2730
3002
  continue;
2731
3003
  }
2732
- block.ranges++;
2733
- block.args = [];
3004
+ block2.ranges++;
3005
+ block2.args = [];
2734
3006
  continue;
2735
3007
  }
2736
3008
  if (prev.type === "range") {
@@ -2738,7 +3010,7 @@ var require_parse = __commonJS({
2738
3010
  const before = siblings[siblings.length - 1];
2739
3011
  before.value += prev.value + value;
2740
3012
  prev = before;
2741
- block.ranges--;
3013
+ block2.ranges--;
2742
3014
  continue;
2743
3015
  }
2744
3016
  push({ type: "dot", value });
@@ -2747,9 +3019,9 @@ var require_parse = __commonJS({
2747
3019
  push({ type: "text", value });
2748
3020
  }
2749
3021
  do {
2750
- block = stack.pop();
2751
- if (block.type !== "root") {
2752
- block.nodes.forEach((node) => {
3022
+ block2 = stack.pop();
3023
+ if (block2.type !== "root") {
3024
+ block2.nodes.forEach((node) => {
2753
3025
  if (!node.nodes) {
2754
3026
  if (node.type === "open") node.isOpen = true;
2755
3027
  if (node.type === "close") node.isClose = true;
@@ -2758,8 +3030,8 @@ var require_parse = __commonJS({
2758
3030
  }
2759
3031
  });
2760
3032
  const parent = stack[stack.length - 1];
2761
- const index2 = parent.nodes.indexOf(block);
2762
- parent.nodes.splice(index2, 1, ...block.nodes);
3033
+ const index2 = parent.nodes.indexOf(block2);
3034
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2763
3035
  }
2764
3036
  } while (stack.length > 0);
2765
3037
  push({ type: "eos" });
@@ -3392,9 +3664,9 @@ var require_scan = __commonJS({
3392
3664
  if (opts.parts === true || opts.tokens === true) {
3393
3665
  let prevIndex;
3394
3666
  for (let idx = 0; idx < slashes.length; idx++) {
3395
- const n = prevIndex ? prevIndex + 1 : start;
3396
- const i = slashes[idx];
3397
- const value = input.slice(n, i);
3667
+ const n3 = prevIndex ? prevIndex + 1 : start;
3668
+ const i2 = slashes[idx];
3669
+ const value = input.slice(n3, i2);
3398
3670
  if (opts.tokens) {
3399
3671
  if (idx === 0 && start !== 0) {
3400
3672
  tokens[idx].isPrefix = true;
@@ -3408,7 +3680,7 @@ var require_scan = __commonJS({
3408
3680
  if (idx !== 0 || value !== "") {
3409
3681
  parts.push(value);
3410
3682
  }
3411
- prevIndex = i;
3683
+ prevIndex = i2;
3412
3684
  }
3413
3685
  if (prevIndex && prevIndex + 1 < input.length) {
3414
3686
  const value = input.slice(prevIndex + 1);
@@ -3537,15 +3809,15 @@ var require_parse2 = __commonJS({
3537
3809
  };
3538
3810
  var hasRepeatedCharPrefixOverlap = (branches) => {
3539
3811
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3540
- for (let i = 0; i < values.length; i++) {
3541
- for (let j2 = i + 1; j2 < values.length; j2++) {
3542
- const a = values[i];
3543
- const b = values[j2];
3544
- const char = a[0];
3545
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3812
+ for (let i2 = 0; i2 < values.length; i2++) {
3813
+ for (let j = i2 + 1; j < values.length; j++) {
3814
+ const a2 = values[i2];
3815
+ const b = values[j];
3816
+ const char = a2[0];
3817
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3546
3818
  continue;
3547
3819
  }
3548
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3820
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3549
3821
  return true;
3550
3822
  }
3551
3823
  }
@@ -3560,8 +3832,8 @@ var require_parse2 = __commonJS({
3560
3832
  let paren = 0;
3561
3833
  let quote = 0;
3562
3834
  let escaped = false;
3563
- for (let i = 1; i < pattern.length; i++) {
3564
- const ch = pattern[i];
3835
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3836
+ const ch = pattern[i2];
3565
3837
  if (escaped === true) {
3566
3838
  escaped = false;
3567
3839
  continue;
@@ -3595,13 +3867,13 @@ var require_parse2 = __commonJS({
3595
3867
  if (ch === ")") {
3596
3868
  paren--;
3597
3869
  if (paren === 0) {
3598
- if (requireEnd === true && i !== pattern.length - 1) {
3870
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3599
3871
  return;
3600
3872
  }
3601
3873
  return {
3602
3874
  type: pattern[0],
3603
- body: pattern.slice(2, i),
3604
- end: i
3875
+ body: pattern.slice(2, i2),
3876
+ end: i2
3605
3877
  };
3606
3878
  }
3607
3879
  }
@@ -3733,7 +4005,7 @@ var require_parse2 = __commonJS({
3733
4005
  let prev = bos;
3734
4006
  let value;
3735
4007
  const eos = () => state.index === len - 1;
3736
- const peek = state.peek = (n = 1) => input[state.index + n];
4008
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3737
4009
  const advance = state.advance = () => input[++state.index] || "";
3738
4010
  const remaining = () => input.slice(state.index + 1);
3739
4011
  const consume = (value2 = "", num = 0) => {
@@ -3814,10 +4086,10 @@ var require_parse2 = __commonJS({
3814
4086
  open.type = "text";
3815
4087
  open.value = literal;
3816
4088
  open.output = safeOutput || utils.escapeRegex(literal);
3817
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3818
- tokens[i].value = "";
3819
- tokens[i].output = "";
3820
- delete tokens[i].suffix;
4089
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
4090
+ tokens[i2].value = "";
4091
+ tokens[i2].output = "";
4092
+ delete tokens[i2].suffix;
3821
4093
  }
3822
4094
  state.output = token.output + open.output;
3823
4095
  state.backtrack = true;
@@ -4060,13 +4332,13 @@ var require_parse2 = __commonJS({
4060
4332
  if (brace.dots === true) {
4061
4333
  const arr = tokens.slice();
4062
4334
  const range = [];
4063
- for (let i = arr.length - 1; i >= 0; i--) {
4335
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
4064
4336
  tokens.pop();
4065
- if (arr[i].type === "brace") {
4337
+ if (arr[i2].type === "brace") {
4066
4338
  break;
4067
4339
  }
4068
- if (arr[i].type !== "dots") {
4069
- range.unshift(arr[i].value);
4340
+ if (arr[i2].type !== "dots") {
4341
+ range.unshift(arr[i2].value);
4070
4342
  }
4071
4343
  }
4072
4344
  output = expandRange(range, opts);
@@ -4525,7 +4797,7 @@ var require_picomatch = __commonJS({
4525
4797
  };
4526
4798
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4527
4799
  picomatch.parse = (pattern, options) => {
4528
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4800
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4529
4801
  return parse2(pattern, { ...options, fastpaths: false });
4530
4802
  };
4531
4803
  picomatch.scan = (input, options) => scan(input, options);
@@ -4609,8 +4881,8 @@ var require_micromatch = __commonJS({
4609
4881
  options.onResult(state);
4610
4882
  }
4611
4883
  };
4612
- for (let i = 0; i < patterns.length; i++) {
4613
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4884
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4885
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4614
4886
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4615
4887
  if (negated) negatives++;
4616
4888
  for (let item of list) {
@@ -4632,7 +4904,7 @@ var require_micromatch = __commonJS({
4632
4904
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4633
4905
  }
4634
4906
  if (options.nonull === true || options.nullglob === true) {
4635
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4907
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4636
4908
  }
4637
4909
  }
4638
4910
  return matches;
@@ -4662,7 +4934,7 @@ var require_micromatch = __commonJS({
4662
4934
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4663
4935
  }
4664
4936
  if (Array.isArray(pattern)) {
4665
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4937
+ return pattern.some((p) => micromatch.contains(str, p, options));
4666
4938
  }
4667
4939
  if (typeof pattern === "string") {
4668
4940
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4707,7 +4979,7 @@ var require_micromatch = __commonJS({
4707
4979
  if (typeof str !== "string") {
4708
4980
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4709
4981
  }
4710
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4982
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4711
4983
  };
4712
4984
  micromatch.capture = (glob2, input, options) => {
4713
4985
  let posix = utils.isWindows(options);
@@ -4858,7 +5130,7 @@ var require_pattern = __commonJS({
4858
5130
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4859
5131
  function expandBraceExpansion(pattern) {
4860
5132
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4861
- patterns.sort((a, b) => a.length - b.length);
5133
+ patterns.sort((a2, b) => a2.length - b.length);
4862
5134
  return patterns.filter((pattern2) => pattern2 !== "");
4863
5135
  }
4864
5136
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4939,8 +5211,8 @@ var require_merge2 = __commonJS({
4939
5211
  }
4940
5212
  const mergedStream = PassThrough(options);
4941
5213
  function addStream() {
4942
- for (let i = 0, len = arguments.length; i < len; i++) {
4943
- streamsQueue.push(pauseStreams(arguments[i], options));
5214
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5215
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4944
5216
  }
4945
5217
  mergeStream();
4946
5218
  return this;
@@ -4989,8 +5261,8 @@ var require_merge2 = __commonJS({
4989
5261
  stream.pipe(mergedStream, { end: false });
4990
5262
  stream.resume();
4991
5263
  }
4992
- for (let i = 0; i < streams.length; i++) {
4993
- pipe(streams[i]);
5264
+ for (let i2 = 0; i2 < streams.length; i2++) {
5265
+ pipe(streams[i2]);
4994
5266
  }
4995
5267
  next();
4996
5268
  }
@@ -5021,8 +5293,8 @@ var require_merge2 = __commonJS({
5021
5293
  }
5022
5294
  streams.pause();
5023
5295
  } else {
5024
- for (let i = 0, len = streams.length; i < len; i++) {
5025
- streams[i] = pauseStreams(streams[i], options);
5296
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5297
+ streams[i2] = pauseStreams(streams[i2], options);
5026
5298
  }
5027
5299
  }
5028
5300
  return streams;
@@ -5104,13 +5376,13 @@ var require_tasks = __commonJS({
5104
5376
  Object.defineProperty(exports, "__esModule", { value: true });
5105
5377
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
5106
5378
  var utils = require_utils3();
5107
- function generate(input, settings) {
5108
- const patterns = processPatterns(input, settings);
5109
- const ignore = processPatterns(settings.ignore, settings);
5379
+ function generate(input, settings2) {
5380
+ const patterns = processPatterns(input, settings2);
5381
+ const ignore = processPatterns(settings2.ignore, settings2);
5110
5382
  const positivePatterns = getPositivePatterns(patterns);
5111
5383
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
5112
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
5113
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5384
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5385
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
5114
5386
  const staticTasks = convertPatternsToTasks(
5115
5387
  staticPatterns,
5116
5388
  negativePatterns,
@@ -5126,12 +5398,12 @@ var require_tasks = __commonJS({
5126
5398
  return staticTasks.concat(dynamicTasks);
5127
5399
  }
5128
5400
  exports.generate = generate;
5129
- function processPatterns(input, settings) {
5401
+ function processPatterns(input, settings2) {
5130
5402
  let patterns = input;
5131
- if (settings.braceExpansion) {
5403
+ if (settings2.braceExpansion) {
5132
5404
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
5133
5405
  }
5134
- if (settings.baseNameMatch) {
5406
+ if (settings2.baseNameMatch) {
5135
5407
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
5136
5408
  }
5137
5409
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -5162,7 +5434,7 @@ var require_tasks = __commonJS({
5162
5434
  }
5163
5435
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
5164
5436
  function groupPatternsByBaseDirectory(patterns) {
5165
- const group = {};
5437
+ const group2 = {};
5166
5438
  return patterns.reduce((collection, pattern) => {
5167
5439
  const base = utils.pattern.getBaseDirectory(pattern);
5168
5440
  if (base in collection) {
@@ -5171,7 +5443,7 @@ var require_tasks = __commonJS({
5171
5443
  collection[base] = [pattern];
5172
5444
  }
5173
5445
  return collection;
5174
- }, group);
5446
+ }, group2);
5175
5447
  }
5176
5448
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5177
5449
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5200,26 +5472,26 @@ var require_async = __commonJS({
5200
5472
  init_utils2();
5201
5473
  Object.defineProperty(exports, "__esModule", { value: true });
5202
5474
  exports.read = void 0;
5203
- function read2(path, settings, callback) {
5204
- settings.fs.lstat(path, (lstatError, lstat) => {
5475
+ function read2(path, settings2, callback) {
5476
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5205
5477
  if (lstatError !== null) {
5206
5478
  callFailureCallback(callback, lstatError);
5207
5479
  return;
5208
5480
  }
5209
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5481
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5210
5482
  callSuccessCallback(callback, lstat);
5211
5483
  return;
5212
5484
  }
5213
- settings.fs.stat(path, (statError, stat) => {
5485
+ settings2.fs.stat(path, (statError, stat) => {
5214
5486
  if (statError !== null) {
5215
- if (settings.throwErrorOnBrokenSymbolicLink) {
5487
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5216
5488
  callFailureCallback(callback, statError);
5217
5489
  return;
5218
5490
  }
5219
5491
  callSuccessCallback(callback, lstat);
5220
5492
  return;
5221
5493
  }
5222
- if (settings.markSymbolicLink) {
5494
+ if (settings2.markSymbolicLink) {
5223
5495
  stat.isSymbolicLink = () => true;
5224
5496
  }
5225
5497
  callSuccessCallback(callback, stat);
@@ -5243,19 +5515,19 @@ var require_sync = __commonJS({
5243
5515
  init_utils2();
5244
5516
  Object.defineProperty(exports, "__esModule", { value: true });
5245
5517
  exports.read = void 0;
5246
- function read2(path, settings) {
5247
- const lstat = settings.fs.lstatSync(path);
5248
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5518
+ function read2(path, settings2) {
5519
+ const lstat = settings2.fs.lstatSync(path);
5520
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5249
5521
  return lstat;
5250
5522
  }
5251
5523
  try {
5252
- const stat = settings.fs.statSync(path);
5253
- if (settings.markSymbolicLink) {
5524
+ const stat = settings2.fs.statSync(path);
5525
+ if (settings2.markSymbolicLink) {
5254
5526
  stat.isSymbolicLink = () => true;
5255
5527
  }
5256
5528
  return stat;
5257
5529
  } catch (error2) {
5258
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5530
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5259
5531
  return lstat;
5260
5532
  }
5261
5533
  throw error2;
@@ -5332,8 +5604,8 @@ var require_out = __commonJS({
5332
5604
  }
5333
5605
  exports.stat = stat;
5334
5606
  function statSync3(path, optionsOrSettings) {
5335
- const settings = getSettings(optionsOrSettings);
5336
- return sync.read(path, settings);
5607
+ const settings2 = getSettings(optionsOrSettings);
5608
+ return sync.read(path, settings2);
5337
5609
  }
5338
5610
  exports.statSync = statSync3;
5339
5611
  function getSettings(settingsOrOptions = {}) {
@@ -5381,8 +5653,8 @@ var require_run_parallel = __commonJS({
5381
5653
  if (isSync) queueMicrotask2(end);
5382
5654
  else end();
5383
5655
  }
5384
- function each(i, err, result) {
5385
- results[i] = result;
5656
+ function each(i2, err, result) {
5657
+ results[i2] = result;
5386
5658
  if (--pending === 0 || err) {
5387
5659
  done(err);
5388
5660
  }
@@ -5396,9 +5668,9 @@ var require_run_parallel = __commonJS({
5396
5668
  });
5397
5669
  });
5398
5670
  } else {
5399
- tasks.forEach(function(task, i) {
5671
+ tasks.forEach(function(task, i2) {
5400
5672
  task(function(err, result) {
5401
- each(i, err, result);
5673
+ each(i2, err, result);
5402
5674
  });
5403
5675
  });
5404
5676
  }
@@ -5473,11 +5745,11 @@ var require_common = __commonJS({
5473
5745
  init_utils2();
5474
5746
  Object.defineProperty(exports, "__esModule", { value: true });
5475
5747
  exports.joinPathSegments = void 0;
5476
- function joinPathSegments(a, b, separator) {
5477
- if (a.endsWith(separator)) {
5478
- return a + b;
5748
+ function joinPathSegments(a2, b, separator) {
5749
+ if (a2.endsWith(separator)) {
5750
+ return a2 + b;
5479
5751
  }
5480
- return a + separator + b;
5752
+ return a2 + separator + b;
5481
5753
  }
5482
5754
  exports.joinPathSegments = joinPathSegments;
5483
5755
  }
@@ -5495,16 +5767,16 @@ var require_async2 = __commonJS({
5495
5767
  var constants_1 = require_constants3();
5496
5768
  var utils = require_utils4();
5497
5769
  var common = require_common();
5498
- function read2(directory, settings, callback) {
5499
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5500
- readdirWithFileTypes(directory, settings, callback);
5770
+ function read2(directory, settings2, callback) {
5771
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5772
+ readdirWithFileTypes(directory, settings2, callback);
5501
5773
  return;
5502
5774
  }
5503
- readdir2(directory, settings, callback);
5775
+ readdir2(directory, settings2, callback);
5504
5776
  }
5505
5777
  exports.read = read2;
5506
- function readdirWithFileTypes(directory, settings, callback) {
5507
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5778
+ function readdirWithFileTypes(directory, settings2, callback) {
5779
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5508
5780
  if (readdirError !== null) {
5509
5781
  callFailureCallback(callback, readdirError);
5510
5782
  return;
@@ -5512,13 +5784,13 @@ var require_async2 = __commonJS({
5512
5784
  const entries = dirents.map((dirent) => ({
5513
5785
  dirent,
5514
5786
  name: dirent.name,
5515
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5787
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5516
5788
  }));
5517
- if (!settings.followSymbolicLinks) {
5789
+ if (!settings2.followSymbolicLinks) {
5518
5790
  callSuccessCallback(callback, entries);
5519
5791
  return;
5520
5792
  }
5521
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5793
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5522
5794
  rpl(tasks, (rplError, rplEntries) => {
5523
5795
  if (rplError !== null) {
5524
5796
  callFailureCallback(callback, rplError);
@@ -5529,15 +5801,15 @@ var require_async2 = __commonJS({
5529
5801
  });
5530
5802
  }
5531
5803
  exports.readdirWithFileTypes = readdirWithFileTypes;
5532
- function makeRplTaskEntry(entry, settings) {
5804
+ function makeRplTaskEntry(entry, settings2) {
5533
5805
  return (done) => {
5534
5806
  if (!entry.dirent.isSymbolicLink()) {
5535
5807
  done(null, entry);
5536
5808
  return;
5537
5809
  }
5538
- settings.fs.stat(entry.path, (statError, stats) => {
5810
+ settings2.fs.stat(entry.path, (statError, stats) => {
5539
5811
  if (statError !== null) {
5540
- if (settings.throwErrorOnBrokenSymbolicLink) {
5812
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5541
5813
  done(statError);
5542
5814
  return;
5543
5815
  }
@@ -5549,16 +5821,16 @@ var require_async2 = __commonJS({
5549
5821
  });
5550
5822
  };
5551
5823
  }
5552
- function readdir2(directory, settings, callback) {
5553
- settings.fs.readdir(directory, (readdirError, names) => {
5824
+ function readdir2(directory, settings2, callback) {
5825
+ settings2.fs.readdir(directory, (readdirError, names) => {
5554
5826
  if (readdirError !== null) {
5555
5827
  callFailureCallback(callback, readdirError);
5556
5828
  return;
5557
5829
  }
5558
5830
  const tasks = names.map((name) => {
5559
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5831
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5560
5832
  return (done) => {
5561
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5833
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5562
5834
  if (error2 !== null) {
5563
5835
  done(error2);
5564
5836
  return;
@@ -5568,7 +5840,7 @@ var require_async2 = __commonJS({
5568
5840
  path,
5569
5841
  dirent: utils.fs.createDirentFromStats(name, stats)
5570
5842
  };
5571
- if (settings.stats) {
5843
+ if (settings2.stats) {
5572
5844
  entry.stats = stats;
5573
5845
  }
5574
5846
  done(null, entry);
@@ -5605,27 +5877,27 @@ var require_sync2 = __commonJS({
5605
5877
  var constants_1 = require_constants3();
5606
5878
  var utils = require_utils4();
5607
5879
  var common = require_common();
5608
- function read2(directory, settings) {
5609
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5610
- return readdirWithFileTypes(directory, settings);
5880
+ function read2(directory, settings2) {
5881
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5882
+ return readdirWithFileTypes(directory, settings2);
5611
5883
  }
5612
- return readdir2(directory, settings);
5884
+ return readdir2(directory, settings2);
5613
5885
  }
5614
5886
  exports.read = read2;
5615
- function readdirWithFileTypes(directory, settings) {
5616
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5887
+ function readdirWithFileTypes(directory, settings2) {
5888
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5617
5889
  return dirents.map((dirent) => {
5618
5890
  const entry = {
5619
5891
  dirent,
5620
5892
  name: dirent.name,
5621
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5893
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5622
5894
  };
5623
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5895
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5624
5896
  try {
5625
- const stats = settings.fs.statSync(entry.path);
5897
+ const stats = settings2.fs.statSync(entry.path);
5626
5898
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5627
5899
  } catch (error2) {
5628
- if (settings.throwErrorOnBrokenSymbolicLink) {
5900
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5629
5901
  throw error2;
5630
5902
  }
5631
5903
  }
@@ -5634,17 +5906,17 @@ var require_sync2 = __commonJS({
5634
5906
  });
5635
5907
  }
5636
5908
  exports.readdirWithFileTypes = readdirWithFileTypes;
5637
- function readdir2(directory, settings) {
5638
- const names = settings.fs.readdirSync(directory);
5909
+ function readdir2(directory, settings2) {
5910
+ const names = settings2.fs.readdirSync(directory);
5639
5911
  return names.map((name) => {
5640
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5641
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5912
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5913
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5642
5914
  const entry = {
5643
5915
  name,
5644
5916
  path: entryPath,
5645
5917
  dirent: utils.fs.createDirentFromStats(name, stats)
5646
5918
  };
5647
- if (settings.stats) {
5919
+ if (settings2.stats) {
5648
5920
  entry.stats = stats;
5649
5921
  }
5650
5922
  return entry;
@@ -5731,8 +6003,8 @@ var require_out2 = __commonJS({
5731
6003
  }
5732
6004
  exports.scandir = scandir;
5733
6005
  function scandirSync(path, optionsOrSettings) {
5734
- const settings = getSettings(optionsOrSettings);
5735
- return sync.read(path, settings);
6006
+ const settings2 = getSettings(optionsOrSettings);
6007
+ return sync.read(path, settings2);
5736
6008
  }
5737
6009
  exports.scandirSync = scandirSync;
5738
6010
  function getSettings(settingsOrOptions = {}) {
@@ -6013,7 +6285,7 @@ var require_queue = __commonJS({
6013
6285
  queue.drained = drained;
6014
6286
  return queue;
6015
6287
  function push(value) {
6016
- var p2 = new Promise(function(resolve4, reject) {
6288
+ var p = new Promise(function(resolve4, reject) {
6017
6289
  pushCb(value, function(err, result) {
6018
6290
  if (err) {
6019
6291
  reject(err);
@@ -6022,11 +6294,11 @@ var require_queue = __commonJS({
6022
6294
  resolve4(result);
6023
6295
  });
6024
6296
  });
6025
- p2.catch(noop);
6026
- return p2;
6297
+ p.catch(noop);
6298
+ return p;
6027
6299
  }
6028
6300
  function unshift(value) {
6029
- var p2 = new Promise(function(resolve4, reject) {
6301
+ var p = new Promise(function(resolve4, reject) {
6030
6302
  unshiftCb(value, function(err, result) {
6031
6303
  if (err) {
6032
6304
  reject(err);
@@ -6035,11 +6307,11 @@ var require_queue = __commonJS({
6035
6307
  resolve4(result);
6036
6308
  });
6037
6309
  });
6038
- p2.catch(noop);
6039
- return p2;
6310
+ p.catch(noop);
6311
+ return p;
6040
6312
  }
6041
6313
  function drained() {
6042
- var p2 = new Promise(function(resolve4) {
6314
+ var p = new Promise(function(resolve4) {
6043
6315
  process.nextTick(function() {
6044
6316
  if (queue.idle()) {
6045
6317
  resolve4();
@@ -6053,7 +6325,7 @@ var require_queue = __commonJS({
6053
6325
  }
6054
6326
  });
6055
6327
  });
6056
- return p2;
6328
+ return p;
6057
6329
  }
6058
6330
  }
6059
6331
  module.exports = fastqueue;
@@ -6068,11 +6340,11 @@ var require_common2 = __commonJS({
6068
6340
  init_utils2();
6069
6341
  Object.defineProperty(exports, "__esModule", { value: true });
6070
6342
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
6071
- function isFatalError(settings, error2) {
6072
- if (settings.errorFilter === null) {
6343
+ function isFatalError(settings2, error2) {
6344
+ if (settings2.errorFilter === null) {
6073
6345
  return true;
6074
6346
  }
6075
- return !settings.errorFilter(error2);
6347
+ return !settings2.errorFilter(error2);
6076
6348
  }
6077
6349
  exports.isFatalError = isFatalError;
6078
6350
  function isAppliedFilter(filter, value) {
@@ -6083,14 +6355,14 @@ var require_common2 = __commonJS({
6083
6355
  return filepath.split(/[/\\]/).join(separator);
6084
6356
  }
6085
6357
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
6086
- function joinPathSegments(a, b, separator) {
6087
- if (a === "") {
6358
+ function joinPathSegments(a2, b, separator) {
6359
+ if (a2 === "") {
6088
6360
  return b;
6089
6361
  }
6090
- if (a.endsWith(separator)) {
6091
- return a + b;
6362
+ if (a2.endsWith(separator)) {
6363
+ return a2 + b;
6092
6364
  }
6093
- return a + separator + b;
6365
+ return a2 + separator + b;
6094
6366
  }
6095
6367
  exports.joinPathSegments = joinPathSegments;
6096
6368
  }
@@ -6437,14 +6709,14 @@ var require_out3 = __commonJS({
6437
6709
  }
6438
6710
  exports.walk = walk;
6439
6711
  function walkSync(directory, optionsOrSettings) {
6440
- const settings = getSettings(optionsOrSettings);
6441
- const provider = new sync_1.default(directory, settings);
6712
+ const settings2 = getSettings(optionsOrSettings);
6713
+ const provider = new sync_1.default(directory, settings2);
6442
6714
  return provider.read();
6443
6715
  }
6444
6716
  exports.walkSync = walkSync;
6445
6717
  function walkStream(directory, optionsOrSettings) {
6446
- const settings = getSettings(optionsOrSettings);
6447
- const provider = new stream_1.default(directory, settings);
6718
+ const settings2 = getSettings(optionsOrSettings);
6719
+ const provider = new stream_1.default(directory, settings2);
6448
6720
  return provider.read();
6449
6721
  }
6450
6722
  exports.walkStream = walkStream;
@@ -6530,8 +6802,8 @@ var require_stream3 = __commonJS({
6530
6802
  done();
6531
6803
  }).catch(done);
6532
6804
  };
6533
- for (let i = 0; i < filepaths.length; i++) {
6534
- stream.write(i);
6805
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6806
+ stream.write(i2);
6535
6807
  }
6536
6808
  return stream;
6537
6809
  }
@@ -7192,14 +7464,14 @@ var require_out4 = __commonJS({
7192
7464
  function generateTasks(source, options) {
7193
7465
  assertPatternsInput(source);
7194
7466
  const patterns = [].concat(source);
7195
- const settings = new settings_1.default(options);
7196
- return taskManager.generate(patterns, settings);
7467
+ const settings2 = new settings_1.default(options);
7468
+ return taskManager.generate(patterns, settings2);
7197
7469
  }
7198
7470
  FastGlob2.generateTasks = generateTasks;
7199
7471
  function isDynamicPattern(source, options) {
7200
7472
  assertPatternsInput(source);
7201
- const settings = new settings_1.default(options);
7202
- return utils.pattern.isDynamicPattern(source, settings);
7473
+ const settings2 = new settings_1.default(options);
7474
+ return utils.pattern.isDynamicPattern(source, settings2);
7203
7475
  }
7204
7476
  FastGlob2.isDynamicPattern = isDynamicPattern;
7205
7477
  function escapePath(source) {
@@ -7241,9 +7513,9 @@ var require_out4 = __commonJS({
7241
7513
  })(FastGlob || (FastGlob = {}));
7242
7514
  function getWorks(source, _Provider, options) {
7243
7515
  const patterns = [].concat(source);
7244
- const settings = new settings_1.default(options);
7245
- const tasks = taskManager.generate(patterns, settings);
7246
- const provider = new _Provider(settings);
7516
+ const settings2 = new settings_1.default(options);
7517
+ const tasks = taskManager.generate(patterns, settings2);
7518
+ const provider = new _Provider(settings2);
7247
7519
  return tasks.map(provider.read, provider);
7248
7520
  }
7249
7521
  function assertPatternsInput(input) {
@@ -7421,8 +7693,8 @@ import "node:fs";
7421
7693
  import { createRequire } from "node:module";
7422
7694
  import {
7423
7695
  resolve,
7424
- join,
7425
- dirname,
7696
+ join as join2,
7697
+ dirname as dirname2,
7426
7698
  relative,
7427
7699
  normalize,
7428
7700
  sep,
@@ -7436,7 +7708,7 @@ function safeExecuteAsync(fn, message) {
7436
7708
  );
7437
7709
  });
7438
7710
  }
7439
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7711
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7440
7712
  var init_PathResolver = __esm({
7441
7713
  "packages/core/config/utils/PathResolver.ts"() {
7442
7714
  "use strict";
@@ -7449,7 +7721,7 @@ var init_PathResolver = __esm({
7449
7721
  getPatternsFor: getPatternsFor || void 0,
7450
7722
  I18N_PATHS: I18N_PATHS || void 0
7451
7723
  };
7452
- log2 = {
7724
+ log3 = {
7453
7725
  error: (message, error2) => {
7454
7726
  },
7455
7727
  warn: (message, error2) => {
@@ -7570,7 +7842,7 @@ var init_PathResolver = __esm({
7570
7842
  */
7571
7843
  getDirname(path) {
7572
7844
  if (!path) return "";
7573
- return this.normalizePath(dirname(path));
7845
+ return this.normalizePath(dirname2(path));
7574
7846
  }
7575
7847
  /**
7576
7848
  * Resolve package path using Node's module resolution
@@ -7582,7 +7854,7 @@ var init_PathResolver = __esm({
7582
7854
  resolvePackage(packageSpecifier, fromPath = null) {
7583
7855
  try {
7584
7856
  const basePath = fromPath || this.getAppRoot();
7585
- const require3 = createRequire(join(basePath, "package.json"));
7857
+ const require3 = createRequire(join2(basePath, "package.json"));
7586
7858
  const resolved = require3.resolve(packageSpecifier);
7587
7859
  return this.normalizePath(resolved);
7588
7860
  } catch (error2) {
@@ -7734,7 +8006,7 @@ var init_PathResolver = __esm({
7734
8006
  return cleanContent;
7735
8007
  } catch (error2) {
7736
8008
  if (this.options.debug) {
7737
- log2.warn(`Failed to read file: ${filePath}`, error2);
8009
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7738
8010
  }
7739
8011
  return null;
7740
8012
  }
@@ -7762,7 +8034,7 @@ var init_PathResolver = __esm({
7762
8034
  return cleanContent;
7763
8035
  } catch (error2) {
7764
8036
  if (this.options.debug) {
7765
- log2.warn(`Failed to read file: ${filePath}`, error2);
8037
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7766
8038
  }
7767
8039
  return null;
7768
8040
  }
@@ -7784,16 +8056,16 @@ var init_PathResolver = __esm({
7784
8056
  verbose = false
7785
8057
  } = options;
7786
8058
  const normalizedPath = this.normalizePath(filePath);
7787
- const dir = this.normalizePath(dirname(normalizedPath));
8059
+ const dir = this.normalizePath(dirname2(normalizedPath));
7788
8060
  const fileExists = this.pathExists(normalizedPath);
7789
8061
  if (fileExists && !overwrite) {
7790
8062
  if (verbose) {
7791
- log2.info(`Skipping existing file: ${normalizedPath}`);
8063
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7792
8064
  }
7793
8065
  return false;
7794
8066
  }
7795
8067
  if (dryRun) {
7796
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
8068
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7797
8069
  return true;
7798
8070
  }
7799
8071
  try {
@@ -7818,7 +8090,7 @@ var init_PathResolver = __esm({
7818
8090
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7819
8091
  }
7820
8092
  if (verbose) {
7821
- log2.info(
8093
+ log3.info(
7822
8094
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7823
8095
  );
7824
8096
  }
@@ -7845,16 +8117,16 @@ var init_PathResolver = __esm({
7845
8117
  verbose = false
7846
8118
  } = options;
7847
8119
  const normalizedPath = this.normalizePath(filePath);
7848
- const dir = this.normalizePath(dirname(normalizedPath));
8120
+ const dir = this.normalizePath(dirname2(normalizedPath));
7849
8121
  const fileExists = this.pathExists(normalizedPath);
7850
8122
  if (fileExists && !overwrite) {
7851
8123
  if (verbose) {
7852
- log2.info(`Skipping existing file: ${normalizedPath}`);
8124
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7853
8125
  }
7854
8126
  return false;
7855
8127
  }
7856
8128
  if (dryRun) {
7857
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
8129
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7858
8130
  return true;
7859
8131
  }
7860
8132
  try {
@@ -7878,7 +8150,7 @@ var init_PathResolver = __esm({
7878
8150
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7879
8151
  }
7880
8152
  if (verbose) {
7881
- log2.info(
8153
+ log3.info(
7882
8154
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7883
8155
  );
7884
8156
  }
@@ -7903,15 +8175,15 @@ var init_PathResolver = __esm({
7903
8175
  const fileExists = this.pathExists(normalizedDestPath);
7904
8176
  if (fileExists && !overwrite) {
7905
8177
  if (verbose) {
7906
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8178
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7907
8179
  }
7908
8180
  return false;
7909
8181
  }
7910
8182
  if (dryRun) {
7911
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8183
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7912
8184
  return true;
7913
8185
  }
7914
- const dir = this.normalizePath(dirname(normalizedDestPath));
8186
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7915
8187
  try {
7916
8188
  await fs.promises.mkdir(dir, { recursive: true });
7917
8189
  } catch (error2) {
@@ -7921,7 +8193,7 @@ var init_PathResolver = __esm({
7921
8193
  return await safeExecuteAsync(async () => {
7922
8194
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7923
8195
  if (verbose) {
7924
- log2.info(
8196
+ log3.info(
7925
8197
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7926
8198
  );
7927
8199
  }
@@ -7945,15 +8217,15 @@ var init_PathResolver = __esm({
7945
8217
  const fileExists = this.pathExists(normalizedDestPath);
7946
8218
  if (fileExists && !overwrite) {
7947
8219
  if (verbose) {
7948
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8220
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7949
8221
  }
7950
8222
  return false;
7951
8223
  }
7952
8224
  if (dryRun) {
7953
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8225
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7954
8226
  return true;
7955
8227
  }
7956
- const dir = this.normalizePath(dirname(normalizedDestPath));
8228
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7957
8229
  try {
7958
8230
  fs.mkdirSync(dir, { recursive: true });
7959
8231
  } catch (error2) {
@@ -7962,7 +8234,7 @@ var init_PathResolver = __esm({
7962
8234
  try {
7963
8235
  fs.copyFileSync(srcPath, normalizedDestPath);
7964
8236
  if (verbose) {
7965
- log2.info(
8237
+ log3.info(
7966
8238
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7967
8239
  );
7968
8240
  }
@@ -7979,7 +8251,7 @@ var init_PathResolver = __esm({
7979
8251
  return fs.existsSync(filePath);
7980
8252
  } catch (error2) {
7981
8253
  if (!silent) {
7982
- log2.error(`Error checking path existence: ${filePath}`, error2);
8254
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7983
8255
  }
7984
8256
  return false;
7985
8257
  }
@@ -8005,7 +8277,7 @@ var init_PathResolver = __esm({
8005
8277
  return fs.readdirSync(dirPath, options);
8006
8278
  } catch (error2) {
8007
8279
  if (this.options.debug) {
8008
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8280
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
8009
8281
  }
8010
8282
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
8011
8283
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -8023,7 +8295,7 @@ var init_PathResolver = __esm({
8023
8295
  return fs.statSync(filePath);
8024
8296
  } catch (error2) {
8025
8297
  if (this.options.debug) {
8026
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8298
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
8027
8299
  }
8028
8300
  return null;
8029
8301
  }
@@ -8040,7 +8312,7 @@ var init_PathResolver = __esm({
8040
8312
  return fs.lstatSync(filePath);
8041
8313
  } catch (error2) {
8042
8314
  if (this.options.debug) {
8043
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8315
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
8044
8316
  }
8045
8317
  return null;
8046
8318
  }
@@ -8129,7 +8401,7 @@ var init_PathResolver = __esm({
8129
8401
  * @returns True if repoRoot is the monorepo (has packages directory)
8130
8402
  */
8131
8403
  isMonorepo() {
8132
- const packagesDir = join(this._repoRoot, "packages");
8404
+ const packagesDir = join2(this._repoRoot, "packages");
8133
8405
  return this.pathExists(packagesDir);
8134
8406
  }
8135
8407
  /**
@@ -8146,7 +8418,7 @@ var init_PathResolver = __esm({
8146
8418
  * Find files matching pattern within directory
8147
8419
  */
8148
8420
  async findFiles(directory, pattern, options = {}) {
8149
- const searchPattern = this.normalizePath(join(directory, pattern));
8421
+ const searchPattern = this.normalizePath(join2(directory, pattern));
8150
8422
  const appRoot = this.getAppRoot();
8151
8423
  const normalizeAppRoot = this.normalizePath(appRoot);
8152
8424
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8193,7 +8465,7 @@ var init_PathResolver = __esm({
8193
8465
  return null;
8194
8466
  }
8195
8467
  const resolvedPath = this.normalizePath(
8196
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8468
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8197
8469
  );
8198
8470
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8199
8471
  if (this.pathExists(resolvedDir)) {
@@ -8389,13 +8661,13 @@ var init_PathResolver = __esm({
8389
8661
  const maxLevels = this.options.maxLevels;
8390
8662
  while (levelsChecked < maxLevels) {
8391
8663
  const toolingPath = this.normalizePath(
8392
- join(currentDir, PACKAGE_PATHS.TOOLING)
8664
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8393
8665
  );
8394
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8666
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8395
8667
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8396
8668
  return currentDir;
8397
8669
  }
8398
- const appsDir = join(currentDir, "apps");
8670
+ const appsDir = join2(currentDir, "apps");
8399
8671
  if (this.pathExists(appsDir)) {
8400
8672
  const appsDirStat = this.statSync(appsDir);
8401
8673
  if (appsDirStat?.isDirectory()) {
@@ -8403,15 +8675,15 @@ var init_PathResolver = __esm({
8403
8675
  }
8404
8676
  }
8405
8677
  const packageJsonPath = this.normalizePath(
8406
- join(currentDir, "package.json")
8678
+ join2(currentDir, "package.json")
8407
8679
  );
8408
8680
  if (this.pathExists(packageJsonPath)) {
8409
- const parentDir2 = this.normalizePath(dirname(currentDir));
8681
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8410
8682
  if (parentDir2 === currentDir) {
8411
8683
  return currentDir;
8412
8684
  }
8413
8685
  }
8414
- const parentDir = this.normalizePath(dirname(currentDir));
8686
+ const parentDir = this.normalizePath(dirname2(currentDir));
8415
8687
  if (parentDir === currentDir) {
8416
8688
  break;
8417
8689
  }
@@ -8462,7 +8734,7 @@ __export(pathResolver_exports, {
8462
8734
  isWithinApp: () => isWithinApp,
8463
8735
  isWithinRepoRoot: () => isWithinRepoRoot,
8464
8736
  joinPath: () => joinPath,
8465
- lstatSync: () => lstatSync2,
8737
+ lstatSync: () => lstatSync3,
8466
8738
  normalizePath: () => normalizePath,
8467
8739
  openFile: () => openFile,
8468
8740
  pathExists: () => pathExists,
@@ -8470,7 +8742,7 @@ __export(pathResolver_exports, {
8470
8742
  read: () => read,
8471
8743
  readSync: () => readSync,
8472
8744
  readdir: () => readdir,
8473
- readdirSync: () => readdirSync2,
8745
+ readdirSync: () => readdirSync3,
8474
8746
  remove: () => remove,
8475
8747
  removeSync: () => removeSync,
8476
8748
  resolveAppPath: () => resolveAppPath,
@@ -8487,8 +8759,8 @@ __export(pathResolver_exports, {
8487
8759
  });
8488
8760
  import { createRequire as createRequire2 } from "node:module";
8489
8761
  import {
8490
- join as join2,
8491
- dirname as dirname2,
8762
+ join as join3,
8763
+ dirname as dirname3,
8492
8764
  basename as basename2,
8493
8765
  extname as extname2,
8494
8766
  relative as relative2,
@@ -8497,11 +8769,11 @@ import {
8497
8769
  isAbsolute as pathIsAbsolute
8498
8770
  } from "node:path";
8499
8771
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8500
- function readdirSync2(dirPath, options) {
8772
+ function readdirSync3(dirPath, options) {
8501
8773
  return pathResolverInstance.readdirSync(dirPath, options);
8502
8774
  }
8503
8775
  function getDirnameFromUrl(importMetaUrl) {
8504
- return dirname2(fileURLToPath2(importMetaUrl));
8776
+ return dirname3(fileURLToPath2(importMetaUrl));
8505
8777
  }
8506
8778
  function findNodeModulesDir(startDir) {
8507
8779
  let currentDir = normalizePath(startDir);
@@ -8564,7 +8836,7 @@ function getTemplatesRoot() {
8564
8836
  const mode = detectExecutionMode();
8565
8837
  if (mode === "development") {
8566
8838
  const fileUrlPath = fileURLToPath2(import.meta.url);
8567
- const frameworkRoot = normalizePath(dirname2(fileUrlPath), "../../../..");
8839
+ const frameworkRoot = normalizePath(dirname3(fileUrlPath), "../../../..");
8568
8840
  return normalizePath(frameworkRoot, PACKAGE_PATHS.CLI, "templates");
8569
8841
  } else {
8570
8842
  try {
@@ -8580,7 +8852,7 @@ function getTemplatesRoot() {
8580
8852
  try {
8581
8853
  const req = createRequire2(import.meta.url);
8582
8854
  const cliPackageJsonPath = req.resolve("@donotdev/cli/package.json");
8583
- const cliRoot2 = normalizePath(dirname2(cliPackageJsonPath));
8855
+ const cliRoot2 = normalizePath(dirname3(cliPackageJsonPath));
8584
8856
  const templatesPath = normalizePath(cliRoot2, "templates");
8585
8857
  if (pathExists(templatesPath)) {
8586
8858
  return templatesPath;
@@ -8639,13 +8911,13 @@ async function isBinaryFile(filePath) {
8639
8911
  if (bytesRead === 0) {
8640
8912
  return false;
8641
8913
  }
8642
- for (let i = 0; i < bytesRead; i++) {
8643
- if (buffer[i] === 0) {
8914
+ for (let i2 = 0; i2 < bytesRead; i2++) {
8915
+ if (buffer[i2] === 0) {
8644
8916
  return true;
8645
8917
  }
8646
8918
  }
8647
- for (let i = 0; i < bytesRead; i++) {
8648
- const byte = buffer[i];
8919
+ for (let i2 = 0; i2 < bytesRead; i2++) {
8920
+ const byte = buffer[i2];
8649
8921
  if (byte && (byte < 9 || byte > 13 && byte < 32 && byte !== 27)) {
8650
8922
  return true;
8651
8923
  }
@@ -8657,8 +8929,8 @@ async function isBinaryFile(filePath) {
8657
8929
  }
8658
8930
  }
8659
8931
  } catch (err) {
8660
- const { log: log3 } = await Promise.resolve().then(() => (init_cli_output(), cli_output_exports));
8661
- log3.warn(`Error checking if file is binary: ${filePath}`, err);
8932
+ const { log: log4 } = await Promise.resolve().then(() => (init_cli_output(), cli_output_exports));
8933
+ log4.warn(`Error checking if file is binary: ${filePath}`, err);
8662
8934
  return true;
8663
8935
  }
8664
8936
  }
@@ -8666,8 +8938,8 @@ async function glob(pattern, options = {}) {
8666
8938
  const patterns = Array.isArray(pattern) ? pattern : [pattern];
8667
8939
  const cwd = options.cwd || pathResolverInstance.getAppRoot() || process.cwd();
8668
8940
  const normalizeCwd = pathResolverInstance.normalizePath(cwd);
8669
- const relativePatterns = patterns.map((p2) => {
8670
- const normalizedPattern = pathResolverInstance.normalizePath(p2);
8941
+ const relativePatterns = patterns.map((p) => {
8942
+ const normalizedPattern = pathResolverInstance.normalizePath(p);
8671
8943
  if (normalizedPattern.startsWith(normalizeCwd)) {
8672
8944
  return normalizedPattern.slice(normalizeCwd.length + 1);
8673
8945
  }
@@ -8693,8 +8965,8 @@ function globSync(pattern, options = {}) {
8693
8965
  const patterns = Array.isArray(pattern) ? pattern : [pattern];
8694
8966
  const cwd = options.cwd || pathResolverInstance.getAppRoot() || process.cwd();
8695
8967
  const normalizeCwd = pathResolverInstance.normalizePath(cwd);
8696
- const relativePatterns = patterns.map((p2) => {
8697
- const normalizedPattern = pathResolverInstance.normalizePath(p2);
8968
+ const relativePatterns = patterns.map((p) => {
8969
+ const normalizedPattern = pathResolverInstance.normalizePath(p);
8698
8970
  if (normalizedPattern.startsWith(normalizeCwd)) {
8699
8971
  return normalizedPattern.slice(normalizeCwd.length + 1);
8700
8972
  }
@@ -8718,7 +8990,7 @@ function globSync(pattern, options = {}) {
8718
8990
  globstar: true,
8719
8991
  throwErrorOnBrokenSymbolicLink: options.throwErrorOnBrokenSymbolicLink
8720
8992
  });
8721
- return results.map((p2) => pathResolverInstance.normalizePath(p2));
8993
+ return results.map((p) => pathResolverInstance.normalizePath(p));
8722
8994
  }
8723
8995
  async function pathExistsAsync(filePath) {
8724
8996
  try {
@@ -8737,7 +9009,7 @@ async function openFile(filePath, flags) {
8737
9009
  function stripBom(content) {
8738
9010
  return content.charCodeAt(0) === 65279 ? content.slice(1) : content;
8739
9011
  }
8740
- var pathResolverInstance, getPathResolver, getRepoRoot, getAppRoot, setAppRoot, resolvePackage, resolveFrameworkPackage, resolvePackageAsset, resolveAppPath, resolveRepoPath, resolvePath, normalizePath, getRelativePath, createImportPath, getFileInfo, pathExists, read, readSync, write, writeSync, copy, copySync, remove, removeSync, statSync2, lstatSync2, ensureDir, ensureDirSync, readdir, isWithinApp, findFiles, clearPathCache, fromAppRoot, getRelativePathBetween, getDirname, getBasename, getExtname, getDirnameFromPath, isAbsolute, joinPath, isWithinRepoRoot;
9012
+ var pathResolverInstance, getPathResolver, getRepoRoot, getAppRoot, setAppRoot, resolvePackage, resolveFrameworkPackage, resolvePackageAsset, resolveAppPath, resolveRepoPath, resolvePath, normalizePath, getRelativePath, createImportPath, getFileInfo, pathExists, read, readSync, write, writeSync, copy, copySync, remove, removeSync, statSync2, lstatSync3, ensureDir, ensureDirSync, readdir, isWithinApp, findFiles, clearPathCache, fromAppRoot, getRelativePathBetween, getDirname, getBasename, getExtname, getDirnameFromPath, isAbsolute, joinPath, isWithinRepoRoot;
8741
9013
  var init_pathResolver = __esm({
8742
9014
  "packages/tooling/src/utils/pathResolver.ts"() {
8743
9015
  "use strict";
@@ -8755,7 +9027,7 @@ var init_pathResolver = __esm({
8755
9027
  resolveRepoPath = (relativePath) => pathResolverInstance.resolveRepoPath(relativePath);
8756
9028
  resolvePath = (relativePath, baseDir) => pathResolverInstance.resolvePath(relativePath, baseDir);
8757
9029
  normalizePath = (...pathSegments) => {
8758
- return pathResolverInstance.normalizePath(join2(...pathSegments));
9030
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8759
9031
  };
8760
9032
  getRelativePath = (absolutePath) => pathResolverInstance.getRelativePath(absolutePath);
8761
9033
  createImportPath = (absolutePath) => pathResolverInstance.createImportPath(absolutePath);
@@ -8770,7 +9042,7 @@ var init_pathResolver = __esm({
8770
9042
  remove = async (path) => pathResolverInstance.remove(path);
8771
9043
  removeSync = (path) => pathResolverInstance.removeSync(path);
8772
9044
  statSync2 = (filePath) => pathResolverInstance.statSync(filePath);
8773
- lstatSync2 = (filePath) => pathResolverInstance.lstatSync(filePath);
9045
+ lstatSync3 = (filePath) => pathResolverInstance.lstatSync(filePath);
8774
9046
  ensureDir = async (dirPath) => pathResolverInstance.ensureDir(dirPath);
8775
9047
  ensureDirSync = (dirPath) => pathResolverInstance.ensureDirSync(dirPath);
8776
9048
  readdir = async (dirPath, options) => pathResolverInstance.readdir(dirPath, options);
@@ -8778,13 +9050,13 @@ var init_pathResolver = __esm({
8778
9050
  findFiles = async (directory, pattern, options = {}) => pathResolverInstance.findFiles(directory, pattern, options);
8779
9051
  clearPathCache = () => pathResolverInstance.clearCache();
8780
9052
  fromAppRoot = (...pathSegments) => {
8781
- return pathResolverInstance.resolveAppPath(join2(...pathSegments));
9053
+ return pathResolverInstance.resolveAppPath(join3(...pathSegments));
8782
9054
  };
8783
9055
  getRelativePathBetween = (from, to) => {
8784
9056
  return normalizePath(relative2(from, to));
8785
9057
  };
8786
9058
  getDirname = (filePath) => {
8787
- return normalizePath(dirname2(filePath));
9059
+ return normalizePath(dirname3(filePath));
8788
9060
  };
8789
9061
  getBasename = (filePath, ext) => {
8790
9062
  return basename2(filePath, ext);
@@ -8793,7 +9065,7 @@ var init_pathResolver = __esm({
8793
9065
  return extname2(filePath);
8794
9066
  };
8795
9067
  getDirnameFromPath = (filePath) => {
8796
- return pathResolverInstance.normalizePath(dirname2(filePath));
9068
+ return pathResolverInstance.normalizePath(dirname3(filePath));
8797
9069
  };
8798
9070
  isAbsolute = (filePath) => {
8799
9071
  return pathIsAbsolute(filePath);
@@ -8862,7 +9134,7 @@ var init_typed_file_operations = __esm({
8862
9134
  import { Buffer } from "node:buffer";
8863
9135
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8864
9136
  import { createRequire as createRequire3 } from "node:module";
8865
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
9137
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8866
9138
  import process from "node:process";
8867
9139
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8868
9140
  var require2, __filename, __dirname;
@@ -8871,7 +9143,7 @@ var init_utils2 = __esm({
8871
9143
  "use strict";
8872
9144
  require2 = createRequire3(import.meta.url);
8873
9145
  __filename = fileURLToPath3(import.meta.url);
8874
- __dirname = dirname3(__filename);
9146
+ __dirname = dirname4(__filename);
8875
9147
  if (typeof globalThis !== "undefined") {
8876
9148
  globalThis.require = require2;
8877
9149
  globalThis.__filename = __filename;
@@ -8887,24 +9159,24 @@ var init_utils2 = __esm({
8887
9159
 
8888
9160
  // packages/tooling/src/utils/cli-input.ts
8889
9161
  async function askForInput(message, defaultValue = "") {
8890
- const result = await Ot({
9162
+ const result = await text({
8891
9163
  message,
8892
9164
  placeholder: defaultValue || void 0,
8893
9165
  defaultValue: defaultValue || void 0
8894
9166
  });
8895
- if (q(result)) {
8896
- pt("Operation cancelled.");
9167
+ if (isCancel(result)) {
9168
+ cancel("Operation cancelled.");
8897
9169
  process.exit(0);
8898
9170
  }
8899
9171
  return result;
8900
9172
  }
8901
9173
  async function askForConfirmation(message, defaultValue = false) {
8902
- const result = await ot2({
9174
+ const result = await confirm({
8903
9175
  message,
8904
9176
  initialValue: defaultValue
8905
9177
  });
8906
- if (q(result)) {
8907
- pt("Operation cancelled.");
9178
+ if (isCancel(result)) {
9179
+ cancel("Operation cancelled.");
8908
9180
  process.exit(0);
8909
9181
  }
8910
9182
  return result;
@@ -8915,13 +9187,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
8915
9187
  label: choice.title,
8916
9188
  hint: choice.hint
8917
9189
  }));
8918
- const result = await _t({
9190
+ const result = await select({
8919
9191
  message,
8920
9192
  options,
8921
9193
  initialValue: choices[defaultValue]?.value
8922
9194
  });
8923
- if (q(result)) {
8924
- pt("Operation cancelled.");
9195
+ if (isCancel(result)) {
9196
+ cancel("Operation cancelled.");
8925
9197
  process.exit(0);
8926
9198
  }
8927
9199
  return result;
@@ -8950,7 +9222,7 @@ init_pathResolver();
8950
9222
  init_typed_file_operations();
8951
9223
  async function copyTemplateFiles(sourceDir, destDir, replacements) {
8952
9224
  if (!pathExists(sourceDir)) {
8953
- log.warn(`Warning: Template directory does not exist: ${sourceDir}`);
9225
+ log2.warn(`Warning: Template directory does not exist: ${sourceDir}`);
8954
9226
  return;
8955
9227
  }
8956
9228
  const files = await glob("**/*", {
@@ -9020,8 +9292,8 @@ async function isTextFile(filePath) {
9020
9292
  try {
9021
9293
  const buffer = await read(filePath, { format: "buffer" });
9022
9294
  if (buffer.length === 0) return true;
9023
- for (let i = 0; i < Math.min(buffer.length, 1e3); i++) {
9024
- if (buffer[i] === 0) return false;
9295
+ for (let i2 = 0; i2 < Math.min(buffer.length, 1e3); i2++) {
9296
+ if (buffer[i2] === 0) return false;
9025
9297
  }
9026
9298
  return true;
9027
9299
  } catch {
@@ -9046,7 +9318,7 @@ async function replacePlaceholders(filePath, replacements) {
9046
9318
  }
9047
9319
  await write(filePath, content, { overwrite: true });
9048
9320
  } catch (error2) {
9049
- log.warn(
9321
+ log2.warn(
9050
9322
  `Warning: Could not process file ${filePath}: ${error2.message || "Unknown error"}`
9051
9323
  );
9052
9324
  }
@@ -9100,14 +9372,14 @@ function isReservedAppName(name) {
9100
9372
  async function updateRootPackageJson(rootDir, appNames) {
9101
9373
  const packageJsonPath = joinPath(rootDir, "package.json");
9102
9374
  if (!pathExists(packageJsonPath)) {
9103
- log.warn("Root package.json not found, skipping script updates");
9375
+ log2.warn("Root package.json not found, skipping script updates");
9104
9376
  return;
9105
9377
  }
9106
9378
  try {
9107
9379
  const packageJson = await read(packageJsonPath, { format: "json" });
9108
9380
  packageJson.scripts = packageJson.scripts || {};
9109
9381
  } catch (error2) {
9110
- log.warn(
9382
+ log2.warn(
9111
9383
  `Warning: Could not update root package.json: ${error2.message || "Unknown error"}`
9112
9384
  );
9113
9385
  }
@@ -9115,14 +9387,14 @@ async function updateRootPackageJson(rootDir, appNames) {
9115
9387
  async function mergeRootPackageJson(rootDir, allAppNames, options = {}) {
9116
9388
  const packageJsonPath = joinPath(rootDir, "package.json");
9117
9389
  if (!pathExists(packageJsonPath)) {
9118
- log.warn("Root package.json not found, skipping merge");
9390
+ log2.warn("Root package.json not found, skipping merge");
9119
9391
  return;
9120
9392
  }
9121
9393
  try {
9122
9394
  const packageJson = await read(packageJsonPath, { format: "json" });
9123
9395
  packageJson.scripts = packageJson.scripts || {};
9124
9396
  } catch (error2) {
9125
- log.warn(
9397
+ log2.warn(
9126
9398
  `Warning: Could not merge root package.json: ${error2.message || "Unknown error"}`
9127
9399
  );
9128
9400
  }
@@ -9130,7 +9402,7 @@ async function mergeRootPackageJson(rootDir, allAppNames, options = {}) {
9130
9402
  async function mergeRootTsConfig(rootDir, allAppNames, includeFunctions = false) {
9131
9403
  const tsconfigPath = joinPath(rootDir, "tsconfig.json");
9132
9404
  if (!pathExists(tsconfigPath)) {
9133
- log.warn("Root tsconfig.json not found, skipping merge");
9405
+ log2.warn("Root tsconfig.json not found, skipping merge");
9134
9406
  return;
9135
9407
  }
9136
9408
  try {
@@ -9153,10 +9425,10 @@ async function mergeRootTsConfig(rootDir, allAppNames, includeFunctions = false)
9153
9425
  }
9154
9426
  if (updated) {
9155
9427
  await write(tsconfigPath, tsconfig, { format: "json", overwrite: true });
9156
- log.info("Merged root tsconfig.json");
9428
+ log2.info("Merged root tsconfig.json");
9157
9429
  }
9158
9430
  } catch (error2) {
9159
- log.warn(
9431
+ log2.warn(
9160
9432
  `Warning: Could not merge root tsconfig.json: ${error2.message || "Unknown error"}`
9161
9433
  );
9162
9434
  }
@@ -9164,7 +9436,7 @@ async function mergeRootTsConfig(rootDir, allAppNames, includeFunctions = false)
9164
9436
  async function mergeRootTurboJson(rootDir) {
9165
9437
  const turboJsonPath = joinPath(rootDir, "turbo.json");
9166
9438
  if (!pathExists(turboJsonPath)) {
9167
- log.warn("Root turbo.json not found, skipping merge");
9439
+ log2.warn("Root turbo.json not found, skipping merge");
9168
9440
  return;
9169
9441
  }
9170
9442
  try {
@@ -9216,10 +9488,10 @@ async function mergeRootTurboJson(rootDir) {
9216
9488
  format: "json",
9217
9489
  overwrite: true
9218
9490
  });
9219
- log.info("Merged root turbo.json");
9491
+ log2.info("Merged root turbo.json");
9220
9492
  }
9221
9493
  } catch (error2) {
9222
- log.warn(
9494
+ log2.warn(
9223
9495
  `Warning: Could not merge root turbo.json: ${error2 instanceof Error ? error2.message : String(error2)}`
9224
9496
  );
9225
9497
  }
@@ -9289,16 +9561,16 @@ function loadMatrix(mode) {
9289
9561
  return cachedMatrix;
9290
9562
  }
9291
9563
  function resolveGroup(groupName, matrix) {
9292
- const group = matrix.groups[groupName];
9293
- if (!group) return {};
9564
+ const group2 = matrix.groups[groupName];
9565
+ if (!group2) return {};
9294
9566
  const result = {};
9295
- if (group.includes) {
9296
- for (const included of group.includes) {
9567
+ if (group2.includes) {
9568
+ for (const included of group2.includes) {
9297
9569
  Object.assign(result, resolveGroup(included, matrix));
9298
9570
  }
9299
9571
  }
9300
- if (group.packages) {
9301
- Object.assign(result, group.packages);
9572
+ if (group2.packages) {
9573
+ Object.assign(result, group2.packages);
9302
9574
  }
9303
9575
  return result;
9304
9576
  }
@@ -9660,9 +9932,9 @@ function generatePackageJson(templateName, mode, options = {}) {
9660
9932
  }
9661
9933
  if (mode === "published") {
9662
9934
  const overrides = {};
9663
- for (const [groupName, group] of Object.entries(matrix.groups || {})) {
9935
+ for (const [groupName, group2] of Object.entries(matrix.groups || {})) {
9664
9936
  if (groupName.startsWith("@donotdev/")) {
9665
- const version = group.packages?.[groupName];
9937
+ const version = group2.packages?.[groupName];
9666
9938
  if (version) {
9667
9939
  overrides[groupName] = version.replace(/^\^/, "");
9668
9940
  }
@@ -9694,7 +9966,7 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
9694
9966
  workspaceRoot = workspaceRoot || currentDir;
9695
9967
  }
9696
9968
  templatesRoot = templatesRoot || getTemplatesRoot();
9697
- mt("\u{1F680} DoNotDev App Creator");
9969
+ intro("\u{1F680} DoNotDev App Creator");
9698
9970
  if (!appName) {
9699
9971
  appName = await askForInput(
9700
9972
  `App name - '${RESERVED_APP_NAMES.join("', '")}' reserved`,
@@ -9756,18 +10028,18 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
9756
10028
  1
9757
10029
  );
9758
10030
  if (action === "skip") {
9759
- log.info(`\u23ED\uFE0F Skipping app: ${appName}`);
10031
+ log2.info(`\u23ED\uFE0F Skipping app: ${appName}`);
9760
10032
  return;
9761
10033
  }
9762
10034
  if (action === "replace") {
9763
10035
  await remove(appDir);
9764
10036
  }
9765
10037
  } else {
9766
- log.info(`\u23ED\uFE0F App "${appName}" already exists, skipping.`);
10038
+ log2.info(`\u23ED\uFE0F App "${appName}" already exists, skipping.`);
9767
10039
  return;
9768
10040
  }
9769
10041
  }
9770
- const s = fe();
10042
+ const s = spinner();
9771
10043
  s.start(`Creating app: ${appName}`);
9772
10044
  await ensureDir(appDir);
9773
10045
  const builder = appTemplate;
@@ -9892,7 +10164,7 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
9892
10164
  joinPath(templatesRoot, functionsTemplateName)
9893
10165
  );
9894
10166
  if (!functionsTemplateExists) {
9895
- log.warn(
10167
+ log2.warn(
9896
10168
  `Functions template "${functionsTemplateName}" not found \u2014 skipping functions scaffolding.`
9897
10169
  );
9898
10170
  } else {
@@ -9956,7 +10228,7 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
9956
10228
  });
9957
10229
  if (firebaseJson.hosting?.rewrites && Array.isArray(firebaseJson.hosting.rewrites)) {
9958
10230
  firebaseJson.hosting.rewrites = firebaseJson.hosting.rewrites.filter(
9959
- (r) => r.destination !== "/index.html"
10231
+ (r2) => r2.destination !== "/index.html"
9960
10232
  );
9961
10233
  }
9962
10234
  if (firebaseJson.hosting) {
@@ -10070,16 +10342,16 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
10070
10342
  const appsDir = joinPath(workspaceRoot, "apps");
10071
10343
  const allDirs = pathExists(appsDir) ? (await readdir(appsDir, {
10072
10344
  withFileTypes: true
10073
- })).filter((d3) => d3.isDirectory()).map((d3) => d3.name).filter(isValidFileName) : [];
10345
+ })).filter((d) => d.isDirectory()).map((d) => d.name).filter(isValidFileName) : [];
10074
10346
  await updateRootPackageJson(workspaceRoot, allDirs);
10075
10347
  }
10076
10348
  if (isInteractive) {
10077
- gt("\u{1F389} App created successfully!");
10349
+ outro("\u{1F389} App created successfully!");
10078
10350
  const firebaseStep = row.functionsTemplate === "functions-firebase" ? `2. Set Firebase project: cd apps/${appName} && firebase use --add (or edit .firebaserc)
10079
10351
  3. bun install
10080
10352
  4. bun run dev` : `2. bun install
10081
10353
  3. bun run dev`;
10082
- wt(
10354
+ note(
10083
10355
  `Next steps:
10084
10356
 
10085
10357
  1. cd apps/${appName}
@@ -10154,20 +10426,20 @@ function detectExecutionMode2() {
10154
10426
  }
10155
10427
  async function main(_options, name) {
10156
10428
  try {
10157
- mt("\u{1F680} DoNotDev Project Creator");
10429
+ intro("\u{1F680} DoNotDev Project Creator");
10158
10430
  try {
10159
10431
  const { execSync } = await import("node:child_process");
10160
10432
  execSync("bun --version", { stdio: "ignore" });
10161
10433
  } catch {
10162
- log.error("bun is required but not installed.");
10163
- wt(
10434
+ log2.error("bun is required but not installed.");
10435
+ note(
10164
10436
  "Install bun:\n\n curl -fsSL https://bun.sh/install | bash\n\nThen re-run: dndev init",
10165
10437
  "Missing dependency"
10166
10438
  );
10167
10439
  process.exit(1);
10168
10440
  }
10169
10441
  if (SHOW_WIP2) {
10170
- wt("WIP mode enabled - showing experimental features", "\u{1F527} Debug");
10442
+ note("WIP mode enabled - showing experimental features", "\u{1F527} Debug");
10171
10443
  }
10172
10444
  const executionMode = detectExecutionMode2();
10173
10445
  const monorepoRoot = process.cwd();
@@ -10176,7 +10448,7 @@ async function main(_options, name) {
10176
10448
  while (!projectName) {
10177
10449
  const projectNameInput = await askForInput("Project name", "my-project");
10178
10450
  if (!isValidFileName(projectNameInput)) {
10179
- log.warn(
10451
+ log2.warn(
10180
10452
  `Invalid project name "${projectNameInput}". Use only letters, numbers, dashes (-), and underscores (_).`
10181
10453
  );
10182
10454
  continue;
@@ -10197,7 +10469,7 @@ async function main(_options, name) {
10197
10469
  1
10198
10470
  );
10199
10471
  if (action === "cancel") {
10200
- gt("Project creation cancelled.");
10472
+ outro("Project creation cancelled.");
10201
10473
  process.exit(0);
10202
10474
  }
10203
10475
  if (action === "replace") {
@@ -10206,17 +10478,17 @@ async function main(_options, name) {
10206
10478
  false
10207
10479
  );
10208
10480
  if (!confirmDelete) {
10209
- gt("Project creation cancelled.");
10481
+ outro("Project creation cancelled.");
10210
10482
  process.exit(0);
10211
10483
  }
10212
- const s2 = fe();
10484
+ const s2 = spinner();
10213
10485
  s2.start("Removing existing project...");
10214
10486
  await remove(projectDirNormalized);
10215
10487
  s2.stop("Removed existing project");
10216
10488
  }
10217
10489
  if (action === "merge") {
10218
- log.warn("Root file merging is at your own risk!");
10219
- wt(
10490
+ log2.warn("Root file merging is at your own risk!");
10491
+ note(
10220
10492
  "Make sure you have a backup or git commit\nYou can rollback if something breaks\nWe will merge: package.json, tsconfig.json, turbo.json\nWe will skip: bunfig.toml, firebase.json, SETUP.md",
10221
10493
  "\u26A0\uFE0F Warning"
10222
10494
  );
@@ -10225,11 +10497,11 @@ async function main(_options, name) {
10225
10497
  false
10226
10498
  );
10227
10499
  if (!confirmMerge) {
10228
- gt("Merge cancelled. Root files will not be modified.");
10500
+ outro("Merge cancelled. Root files will not be modified.");
10229
10501
  process.exit(0);
10230
10502
  }
10231
10503
  isMergeMode = true;
10232
- wt("Merge mode: Merging root files, creating new apps", "\u{1F527} Mode");
10504
+ note("Merge mode: Merging root files, creating new apps", "\u{1F527} Mode");
10233
10505
  }
10234
10506
  }
10235
10507
  let appNames = [];
@@ -10246,21 +10518,21 @@ async function main(_options, name) {
10246
10518
  const trimmedName = appNameInput.trim();
10247
10519
  isFirstApp = false;
10248
10520
  if (appNames.includes(trimmedName)) {
10249
- log.warn(`'${trimmedName}' already exists. Choose a different name.`);
10521
+ log2.warn(`'${trimmedName}' already exists. Choose a different name.`);
10250
10522
  continue;
10251
10523
  }
10252
10524
  if (isReservedAppName(trimmedName)) {
10253
- log.warn(`'${trimmedName}' is reserved for framework demos.`);
10525
+ log2.warn(`'${trimmedName}' is reserved for framework demos.`);
10254
10526
  continue;
10255
10527
  }
10256
10528
  if (!isValidFileName(trimmedName)) {
10257
- log.warn(
10529
+ log2.warn(
10258
10530
  `Invalid app name "${trimmedName}". Use only letters, numbers, dashes (-), and underscores (_).`
10259
10531
  );
10260
10532
  continue;
10261
10533
  }
10262
10534
  appNames.push(trimmedName);
10263
- wt(`Configuring "${trimmedName}"...`, "\u2699\uFE0F");
10535
+ note(`Configuring "${trimmedName}"...`, "\u2699\uFE0F");
10264
10536
  const config = await collectAppConfig(trimmedName);
10265
10537
  appConfigs[trimmedName] = config;
10266
10538
  if (config.backend !== "none" || config.functions !== "none")
@@ -10276,8 +10548,8 @@ async function main(_options, name) {
10276
10548
  const existingAppDirs = [];
10277
10549
  if (pathExists(appsDir)) {
10278
10550
  try {
10279
- const entries = readdirSync2(appsDir, { withFileTypes: true }).sort(
10280
- (a, b) => a.name.localeCompare(b.name)
10551
+ const entries = readdirSync3(appsDir, { withFileTypes: true }).sort(
10552
+ (a2, b) => a2.name.localeCompare(b.name)
10281
10553
  );
10282
10554
  for (const entry of entries) {
10283
10555
  if (entry.isDirectory()) {
@@ -10306,36 +10578,36 @@ async function main(_options, name) {
10306
10578
  );
10307
10579
  if (replaceAction === "replace") {
10308
10580
  appsToCreate.push(appName);
10309
- const s2 = fe();
10581
+ const s2 = spinner();
10310
10582
  s2.start(`Removing existing app "${appName}"...`);
10311
10583
  await remove(appDir);
10312
10584
  s2.stop(`Removed existing app "${appName}"`);
10313
10585
  } else {
10314
10586
  appsToSkip.push(appName);
10315
- wt(`Skipping app "${appName}" (already exists)`, "\u23ED\uFE0F Skip");
10587
+ note(`Skipping app "${appName}" (already exists)`, "\u23ED\uFE0F Skip");
10316
10588
  }
10317
10589
  } else {
10318
10590
  appsToCreate.push(appName);
10319
10591
  }
10320
10592
  }
10321
10593
  if (appsToCreate.length === 0) {
10322
- gt("No new apps to create. All requested apps already exist.");
10594
+ outro("No new apps to create. All requested apps already exist.");
10323
10595
  process.exit(0);
10324
10596
  }
10325
10597
  if (appsToSkip.length > 0) {
10326
- wt(
10598
+ note(
10327
10599
  `Skipped ${appsToSkip.length} app(s): ${appsToSkip.join(", ")}`,
10328
10600
  "\u23ED\uFE0F Skipped"
10329
10601
  );
10330
10602
  }
10331
10603
  appNames = appsToCreate;
10332
10604
  }
10333
- log.info(
10605
+ log2.info(
10334
10606
  `Creating project "${projectName}" with ${appNames.length} app(s): ${appNames.join(", ")}`
10335
10607
  );
10336
10608
  for (const appName of appNames) {
10337
10609
  if (!appConfigs[appName]) {
10338
- log.warn(`Missing config for app "${appName}", using defaults`);
10610
+ log2.warn(`Missing config for app "${appName}", using defaults`);
10339
10611
  appConfigs[appName] = {
10340
10612
  template: "vite",
10341
10613
  host: "none",
@@ -10350,7 +10622,7 @@ async function main(_options, name) {
10350
10622
  }
10351
10623
  }
10352
10624
  const setupGithubActions = true;
10353
- const s = fe();
10625
+ const s = spinner();
10354
10626
  if (!isMergeMode) {
10355
10627
  s.start("Creating project structure...");
10356
10628
  await ensureDir(projectDirNormalized);
@@ -10518,7 +10790,7 @@ async function main(_options, name) {
10518
10790
  s.stop("Root files merged");
10519
10791
  }
10520
10792
  if (installDemoApp) {
10521
- const sDemo = fe();
10793
+ const sDemo = spinner();
10522
10794
  sDemo.start("Copying demo app...");
10523
10795
  const demoAppDir = joinPath(projectDirNormalized, "apps", "demo");
10524
10796
  const demoTemplateDir = joinPath(templatesRoot, "app-demo");
@@ -10574,7 +10846,7 @@ async function main(_options, name) {
10574
10846
  }
10575
10847
  }
10576
10848
  if (installCockpitApp) {
10577
- const sCockpit = fe();
10849
+ const sCockpit = spinner();
10578
10850
  sCockpit.start("Copying cockpit app...");
10579
10851
  const cockpitAppDir = joinPath(projectDirNormalized, "apps", "dndev");
10580
10852
  const cockpitTemplateDir = joinPath(templatesRoot, "app-dndev");
@@ -10628,11 +10900,11 @@ async function main(_options, name) {
10628
10900
  sCockpit.stop("Cockpit app copied");
10629
10901
  }
10630
10902
  }
10631
- log.info("Creating apps...");
10903
+ log2.info("Creating apps...");
10632
10904
  for (const appName of appNames) {
10633
10905
  const appConfig = appConfigs[appName];
10634
10906
  if (!appConfig) {
10635
- log.error(`Configuration not found for app: ${appName}`);
10907
+ log2.error(`Configuration not found for app: ${appName}`);
10636
10908
  continue;
10637
10909
  }
10638
10910
  await createApp(appName, appConfig, projectDirNormalized, templatesRoot);
@@ -10643,9 +10915,9 @@ async function main(_options, name) {
10643
10915
  isMergeMode ? allAppNames : appNames
10644
10916
  );
10645
10917
  s.stop("Root package.json updated");
10646
- gt("\u{1F389} Project created successfully!");
10918
+ outro("\u{1F389} Project created successfully!");
10647
10919
  const cdCommand = executionMode === "development" ? `cd ../${projectName}` : `cd ${projectName}`;
10648
- wt(
10920
+ note(
10649
10921
  `1. ${cdCommand}
10650
10922
  2. bun install
10651
10923
  3. Open the project in your IDE
@@ -10663,7 +10935,7 @@ Claude Code / Windsurf: MCP auto-connects, nothing to do
10663
10935
  "\u{1F4CB} Next Steps"
10664
10936
  );
10665
10937
  } catch (error2) {
10666
- log.error("Error creating project:", error2);
10938
+ log2.error("Error creating project:", error2);
10667
10939
  throw error2;
10668
10940
  }
10669
10941
  }