@donotdev/cli 0.1.45 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
+ get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
@@ -33,31 +33,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
37
- var isAmbiguous, isFullWidth, isWide;
36
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
37
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
38
38
  var init_utils = __esm({
39
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
39
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
40
40
  init_utils2();
41
- isAmbiguous = (x) => {
42
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
43
- };
41
+ getCodePointsLength = /* @__PURE__ */ (() => {
42
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
43
+ return (input) => {
44
+ let surrogatePairsNr = 0;
45
+ SURROGATE_PAIR_RE.lastIndex = 0;
46
+ while (SURROGATE_PAIR_RE.test(input)) {
47
+ surrogatePairsNr += 1;
48
+ }
49
+ return input.length - surrogatePairsNr;
50
+ };
51
+ })();
44
52
  isFullWidth = (x) => {
45
53
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
46
54
  };
47
- isWide = (x) => {
48
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
55
+ isWideNotCJKTNotEmoji = (x) => {
56
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
49
57
  };
50
58
  }
51
59
  });
52
60
 
53
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
54
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
61
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
62
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
55
63
  var init_dist = __esm({
56
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
64
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
57
65
  init_utils2();
58
66
  init_utils();
59
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
67
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
60
68
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
69
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
61
70
  TAB_RE = /\t{1,1000}/y;
62
71
  EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
63
72
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -67,14 +76,21 @@ var init_dist = __esm({
67
76
  const LIMIT = truncationOptions.limit ?? Infinity;
68
77
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
69
78
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
70
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
79
+ const ANSI_WIDTH = 0;
71
80
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
72
81
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
73
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
74
82
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
75
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
83
+ const FULL_WIDTH_WIDTH = 2;
76
84
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
77
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
85
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
86
+ const PARSE_BLOCKS = [
87
+ [LATIN_RE, REGULAR_WIDTH],
88
+ [ANSI_RE, ANSI_WIDTH],
89
+ [CONTROL_RE, CONTROL_WIDTH],
90
+ [TAB_RE, TAB_WIDTH],
91
+ [EMOJI_RE, EMOJI_WIDTH],
92
+ [CJKT_WIDE_RE, WIDE_WIDTH]
93
+ ];
78
94
  let indexPrev = 0;
79
95
  let index = 0;
80
96
  let length = input.length;
@@ -94,10 +110,8 @@ var init_dist = __esm({
94
110
  const codePoint = char.codePointAt(0) || 0;
95
111
  if (isFullWidth(codePoint)) {
96
112
  widthExtra = FULL_WIDTH_WIDTH;
97
- } else if (isWide(codePoint)) {
113
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
98
114
  widthExtra = WIDE_WIDTH;
99
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
100
- widthExtra = AMBIGUOUS_WIDTH;
101
115
  } else {
102
116
  widthExtra = REGULAR_WIDTH;
103
117
  }
@@ -113,88 +127,28 @@ var init_dist = __esm({
113
127
  }
114
128
  unmatchedStart = unmatchedEnd = 0;
115
129
  }
116
- if (index >= length)
117
- break;
118
- LATIN_RE.lastIndex = index;
119
- if (LATIN_RE.test(input)) {
120
- lengthExtra = LATIN_RE.lastIndex - index;
121
- widthExtra = lengthExtra * REGULAR_WIDTH;
122
- if (width + widthExtra > truncationLimit) {
123
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
124
- }
125
- if (width + widthExtra > LIMIT) {
126
- truncationEnabled = true;
127
- break;
128
- }
129
- width += widthExtra;
130
- unmatchedStart = indexPrev;
131
- unmatchedEnd = index;
132
- index = indexPrev = LATIN_RE.lastIndex;
133
- continue;
134
- }
135
- ANSI_RE.lastIndex = index;
136
- if (ANSI_RE.test(input)) {
137
- if (width + ANSI_WIDTH > truncationLimit) {
138
- truncationIndex = Math.min(truncationIndex, index);
139
- }
140
- if (width + ANSI_WIDTH > LIMIT) {
141
- truncationEnabled = true;
142
- break;
143
- }
144
- width += ANSI_WIDTH;
145
- unmatchedStart = indexPrev;
146
- unmatchedEnd = index;
147
- index = indexPrev = ANSI_RE.lastIndex;
148
- continue;
149
- }
150
- CONTROL_RE.lastIndex = index;
151
- if (CONTROL_RE.test(input)) {
152
- lengthExtra = CONTROL_RE.lastIndex - index;
153
- widthExtra = lengthExtra * CONTROL_WIDTH;
154
- if (width + widthExtra > truncationLimit) {
155
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
156
- }
157
- if (width + widthExtra > LIMIT) {
158
- truncationEnabled = true;
159
- break;
160
- }
161
- width += widthExtra;
162
- unmatchedStart = indexPrev;
163
- unmatchedEnd = index;
164
- index = indexPrev = CONTROL_RE.lastIndex;
165
- continue;
166
- }
167
- TAB_RE.lastIndex = index;
168
- if (TAB_RE.test(input)) {
169
- lengthExtra = TAB_RE.lastIndex - index;
170
- widthExtra = lengthExtra * TAB_WIDTH;
171
- if (width + widthExtra > truncationLimit) {
172
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
173
- }
174
- if (width + widthExtra > LIMIT) {
175
- truncationEnabled = true;
176
- break;
177
- }
178
- width += widthExtra;
179
- unmatchedStart = indexPrev;
180
- unmatchedEnd = index;
181
- index = indexPrev = TAB_RE.lastIndex;
182
- continue;
130
+ if (index >= length) {
131
+ break outer;
183
132
  }
184
- EMOJI_RE.lastIndex = index;
185
- if (EMOJI_RE.test(input)) {
186
- if (width + EMOJI_WIDTH > truncationLimit) {
187
- truncationIndex = Math.min(truncationIndex, index);
188
- }
189
- if (width + EMOJI_WIDTH > LIMIT) {
190
- truncationEnabled = true;
191
- break;
133
+ for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
134
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
135
+ BLOCK_RE.lastIndex = index;
136
+ if (BLOCK_RE.test(input)) {
137
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
138
+ widthExtra = lengthExtra * BLOCK_WIDTH;
139
+ if (width + widthExtra > truncationLimit) {
140
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
141
+ }
142
+ if (width + widthExtra > LIMIT) {
143
+ truncationEnabled = true;
144
+ break outer;
145
+ }
146
+ width += widthExtra;
147
+ unmatchedStart = indexPrev;
148
+ unmatchedEnd = index;
149
+ index = indexPrev = BLOCK_RE.lastIndex;
150
+ continue outer;
192
151
  }
193
- width += EMOJI_WIDTH;
194
- unmatchedStart = indexPrev;
195
- unmatchedEnd = index;
196
- index = indexPrev = EMOJI_RE.lastIndex;
197
- continue;
198
152
  }
199
153
  index += 1;
200
154
  }
@@ -209,10 +163,10 @@ var init_dist = __esm({
209
163
  }
210
164
  });
211
165
 
212
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
166
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
213
167
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
214
168
  var init_dist2 = __esm({
215
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
169
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
216
170
  init_utils2();
217
171
  init_dist();
218
172
  NO_TRUNCATION2 = {
@@ -227,13 +181,13 @@ var init_dist2 = __esm({
227
181
  }
228
182
  });
229
183
 
230
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
184
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
231
185
  function wrapAnsi(string, columns, options) {
232
186
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
233
187
  }
234
188
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
235
189
  var init_main = __esm({
236
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
190
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
237
191
  init_utils2();
238
192
  init_dist2();
239
193
  ESC = "\x1B";
@@ -397,16 +351,19 @@ var init_main = __esm({
397
351
  }
398
352
  const preString = rows.join("\n");
399
353
  let inSurrogate = false;
400
- for (let i = 0; i < preString.length; i++) {
401
- const character = preString[i];
354
+ for (let i2 = 0; i2 < preString.length; i2++) {
355
+ const character = preString[i2];
402
356
  returnValue += character;
403
357
  if (!inSurrogate) {
404
358
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
359
+ if (inSurrogate) {
360
+ continue;
361
+ }
405
362
  } else {
406
- continue;
363
+ inSurrogate = false;
407
364
  }
408
365
  if (character === ESC || character === CSI) {
409
- GROUP_REGEX.lastIndex = i + 1;
366
+ GROUP_REGEX.lastIndex = i2 + 1;
410
367
  const groupsResult = GROUP_REGEX.exec(preString);
411
368
  const groups = groupsResult?.groups;
412
369
  if (groups?.code !== void 0) {
@@ -416,7 +373,7 @@ var init_main = __esm({
416
373
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
417
374
  }
418
375
  }
419
- if (preString[i + 1] === "\n") {
376
+ if (preString[i2 + 1] === "\n") {
420
377
  if (escapeUrl) {
421
378
  returnValue += wrapAnsiHyperlink("");
422
379
  }
@@ -447,7 +404,7 @@ var require_src = __commonJS({
447
404
  var ESC2 = "\x1B";
448
405
  var CSI2 = `${ESC2}[`;
449
406
  var beep = "\x07";
450
- var cursor = {
407
+ var cursor3 = {
451
408
  to(x, y2) {
452
409
  if (!y2) return `${CSI2}${x + 1}G`;
453
410
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -476,7 +433,7 @@ var require_src = __commonJS({
476
433
  up: (count = 1) => `${CSI2}S`.repeat(count),
477
434
  down: (count = 1) => `${CSI2}T`.repeat(count)
478
435
  };
479
- var erase = {
436
+ var erase3 = {
480
437
  screen: `${CSI2}2J`,
481
438
  up: (count = 1) => `${CSI2}1J`.repeat(count),
482
439
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -485,64 +442,134 @@ var require_src = __commonJS({
485
442
  lineStart: `${CSI2}1K`,
486
443
  lines(count) {
487
444
  let clear = "";
488
- for (let i = 0; i < count; i++)
489
- clear += this.line + (i < count - 1 ? cursor.up() : "");
445
+ for (let i2 = 0; i2 < count; i2++)
446
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
490
447
  if (count)
491
- clear += cursor.left;
448
+ clear += cursor3.left;
492
449
  return clear;
493
450
  }
494
451
  };
495
- module.exports = { cursor, scroll, erase, beep };
452
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
496
453
  }
497
454
  });
498
455
 
499
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
500
- import { styleText as y } from "node:util";
501
- import { stdout as S, stdin as $ } from "node:process";
502
- import P from "node:readline";
503
- import { ReadStream as D } from "node:tty";
504
- function d(r, t2, e) {
505
- if (!e.some((o) => !o.disabled)) return r;
506
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
507
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
456
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
457
+ import { styleText } from "node:util";
458
+ import { stdout, stdin } from "node:process";
459
+ import l__default from "node:readline";
460
+ import { ReadStream } from "node:tty";
461
+ function findCursor(s, o, l) {
462
+ if (!l.some((r2) => !r2.disabled))
463
+ return s;
464
+ const t2 = s + o, n3 = Math.max(l.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
465
+ return l[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l) : e;
466
+ }
467
+ function isAccessible(n3) {
468
+ if (n3 !== void 0) return n3;
469
+ if (settings.accessible !== void 0) return settings.accessible;
470
+ const e = process.env.ACCESSIBLE;
471
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
508
472
  }
509
- function V(r, t2) {
510
- if (typeof r == "string") return u.aliases.get(r) === t2;
511
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
473
+ function isActionKey(n3, e) {
474
+ if (typeof n3 == "string")
475
+ return settings.aliases.get(n3) === e;
476
+ for (const s of n3)
477
+ if (s !== void 0 && isActionKey(s, e))
478
+ return true;
512
479
  return false;
513
480
  }
514
- function j(r, t2) {
515
- if (r === t2) return;
516
- const e = r.split(`
517
- `), s = t2.split(`
518
- `), i = Math.max(e.length, s.length), n = [];
519
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
520
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
481
+ function diffLines(i2, s) {
482
+ if (i2 === s) return;
483
+ const e = i2.split(`
484
+ `), t2 = s.split(`
485
+ `), r2 = Math.max(e.length, t2.length), f = [];
486
+ for (let n3 = 0; n3 < r2; n3++)
487
+ e[n3] !== t2[n3] && f.push(n3);
488
+ return {
489
+ lines: f,
490
+ numLinesBefore: e.length,
491
+ numLinesAfter: t2.length,
492
+ numLines: r2
493
+ };
521
494
  }
522
- function w(r, t2) {
523
- const e = r;
524
- e.isTTY && e.setRawMode(t2);
495
+ function setRawMode(e, r2) {
496
+ const o = e;
497
+ o.isTTY && o.setRawMode(r2);
525
498
  }
526
- function R(r, t2, e, s = e) {
527
- const i = O(r ?? S);
528
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
529
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
499
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
500
+ const f = getColumns(e ?? stdout);
501
+ return wrapAnsi(r2, f - o.length, {
502
+ hard: true,
503
+ trim: false
504
+ }).split(`
505
+ `).map((c2, i2, m) => {
506
+ const d = t2 ? t2(c2, i2) : c2;
507
+ return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
508
+ }).join(`
530
509
  `);
531
510
  }
532
- var import_sisteransi, E, G, u, Y, C, O, A, p, nt;
511
+ function runValidation(e, a2) {
512
+ if ("~standard" in e) {
513
+ const n3 = e["~standard"].validate(a2);
514
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
515
+ }
516
+ return e(a2);
517
+ }
518
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, n$1;
533
519
  var init_dist3 = __esm({
534
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
520
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
535
521
  init_utils2();
536
522
  init_main();
537
523
  import_sisteransi = __toESM(require_src(), 1);
538
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
539
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
540
- 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)}` } } };
541
- Y = globalThis.process.platform.startsWith("win");
542
- C = /* @__PURE__ */ Symbol("clack:cancel");
543
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
544
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
545
- p = class {
524
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
525
+ t = [
526
+ "January",
527
+ "February",
528
+ "March",
529
+ "April",
530
+ "May",
531
+ "June",
532
+ "July",
533
+ "August",
534
+ "September",
535
+ "October",
536
+ "November",
537
+ "December"
538
+ ];
539
+ settings = {
540
+ actions: new Set(a$1),
541
+ aliases: /* @__PURE__ */ new Map([
542
+ // vim support
543
+ ["k", "up"],
544
+ ["j", "down"],
545
+ ["h", "left"],
546
+ ["l", "right"],
547
+ ["", "cancel"],
548
+ // opinionated defaults!
549
+ ["escape", "cancel"]
550
+ ]),
551
+ messages: {
552
+ cancel: "Canceled",
553
+ error: "Something went wrong"
554
+ },
555
+ withGuide: true,
556
+ accessible: void 0,
557
+ date: {
558
+ monthNames: [...t],
559
+ messages: {
560
+ required: "Please enter a valid date",
561
+ invalidMonth: "There are only 12 months in a year",
562
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
563
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
564
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
565
+ }
566
+ }
567
+ };
568
+ R = globalThis.process.platform.startsWith("win");
569
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
570
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
571
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
572
+ y = class {
546
573
  input;
547
574
  output;
548
575
  _abortSignal;
@@ -557,46 +584,92 @@ var init_dist3 = __esm({
557
584
  error = "";
558
585
  value;
559
586
  userInput = "";
587
+ /**
588
+ * Whether accessible (static, screen-reader friendly) output is enabled for
589
+ * this prompt, resolved from the `accessible` option, the global setting,
590
+ * and the `ACCESSIBLE` env var.
591
+ */
592
+ get accessible() {
593
+ return isAccessible(this.opts.accessible);
594
+ }
560
595
  constructor(t2, e = true) {
561
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
562
- 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;
596
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
597
+ 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;
563
598
  }
599
+ /**
600
+ * Unsubscribe all listeners
601
+ */
564
602
  unsubscribe() {
565
603
  this._subscribers.clear();
566
604
  }
605
+ /**
606
+ * Set a subscriber with opts
607
+ * @param event - The event name
608
+ */
567
609
  setSubscriber(t2, e) {
568
- const s = this._subscribers.get(t2) ?? [];
569
- s.push(e), this._subscribers.set(t2, s);
610
+ const i2 = this._subscribers.get(t2) ?? [];
611
+ i2.push(e), this._subscribers.set(t2, i2);
570
612
  }
613
+ /**
614
+ * Subscribe to an event
615
+ * @param event - The event name
616
+ * @param cb - The callback
617
+ */
571
618
  on(t2, e) {
572
619
  this.setSubscriber(t2, { cb: e });
573
620
  }
621
+ /**
622
+ * Subscribe to an event once
623
+ * @param event - The event name
624
+ * @param cb - The callback
625
+ */
574
626
  once(t2, e) {
575
627
  this.setSubscriber(t2, { cb: e, once: true });
576
628
  }
629
+ /**
630
+ * Emit an event with data
631
+ * @param event - The event name
632
+ * @param data - The data to pass to the callback
633
+ */
577
634
  emit(t2, ...e) {
578
- const s = this._subscribers.get(t2) ?? [], i = [];
579
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
580
- for (const n of i) n();
635
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
636
+ for (const r2 of i2)
637
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
638
+ for (const r2 of s)
639
+ r2();
581
640
  }
582
641
  prompt() {
583
642
  return new Promise((t2) => {
584
643
  if (this._abortSignal) {
585
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
586
- this._abortSignal.addEventListener("abort", () => {
587
- this.state = "cancel", this.close();
588
- }, { once: true });
644
+ if (this._abortSignal.aborted)
645
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
646
+ this._abortSignal.addEventListener(
647
+ "abort",
648
+ () => {
649
+ this.state = "cancel", this.close();
650
+ },
651
+ { once: true }
652
+ );
589
653
  }
590
- 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", () => {
591
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
654
+ this.rl = l__default.createInterface({
655
+ input: this.input,
656
+ tabSize: 2,
657
+ prompt: "",
658
+ escapeCodeTimeout: 50,
659
+ terminal: true
660
+ }), 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", () => {
661
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
592
662
  }), this.once("cancel", () => {
593
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
663
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
594
664
  });
595
665
  });
596
666
  }
597
667
  _isActionKey(t2, e) {
598
668
  return t2 === " ";
599
669
  }
670
+ _shouldSubmit(t2, e) {
671
+ return true;
672
+ }
600
673
  _setValue(t2) {
601
674
  this.value = t2, this.emit("value", this.value);
602
675
  }
@@ -606,19 +679,22 @@ var init_dist3 = __esm({
606
679
  _clearUserInput() {
607
680
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
608
681
  }
609
- onKeypress(t2, e) {
610
- 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") {
611
- if (this.opts.validate) {
612
- const s = this.opts.validate(this.value);
613
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
682
+ async onKeypress(t2, e) {
683
+ if (this.state !== "validating") {
684
+ 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)) {
685
+ if (this.opts.validate) {
686
+ const i2 = runValidation(this.opts.validate, this.value);
687
+ let s;
688
+ 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));
689
+ }
690
+ this.state !== "error" && (this.state = "submit");
614
691
  }
615
- this.state !== "error" && (this.state = "submit");
692
+ 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();
616
693
  }
617
- 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();
618
694
  }
619
695
  close() {
620
696
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
621
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
697
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
622
698
  }
623
699
  restoreCursor() {
624
700
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -626,34 +702,39 @@ var init_dist3 = __esm({
626
702
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
627
703
  }
628
704
  render() {
629
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
705
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
706
+ hard: true,
707
+ trim: false
708
+ });
630
709
  if (t2 !== this._prevFrame) {
631
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
710
+ if (this.state === "initial")
711
+ this.output.write(import_sisteransi.cursor.hide);
632
712
  else {
633
- const e = j(this._prevFrame, t2), s = A(this.output);
713
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
634
714
  if (this.restoreCursor(), e) {
635
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
636
- let o = e.lines.find((a) => a >= i);
637
- if (o === void 0) {
715
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
716
+ let n3 = e.lines.find((o) => o >= s);
717
+ if (n3 === void 0) {
638
718
  this._prevFrame = t2;
639
719
  return;
640
720
  }
641
721
  if (e.lines.length === 1) {
642
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
643
- const a = t2.split(`
722
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
723
+ const o = t2.split(`
644
724
  `);
645
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
725
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
646
726
  return;
647
727
  } else if (e.lines.length > 1) {
648
- if (i < n) o = i;
728
+ if (s < r2)
729
+ n3 = s;
649
730
  else {
650
- const h = o - n;
651
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
731
+ const h2 = n3 - r2;
732
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
652
733
  }
653
734
  this.output.write(import_sisteransi.erase.down());
654
- const a = t2.split(`
655
- `).slice(o);
656
- this.output.write(a.join(`
735
+ const f = t2.split(`
736
+ `).slice(n3);
737
+ this.output.write(f.join(`
657
738
  `)), this._prevFrame = t2;
658
739
  return;
659
740
  }
@@ -664,27 +745,28 @@ var init_dist3 = __esm({
664
745
  }
665
746
  }
666
747
  };
667
- nt = class extends p {
748
+ n$1 = class n extends y {
668
749
  options;
669
750
  cursor = 0;
670
751
  get _selectedValue() {
671
752
  return this.options[this.cursor];
672
753
  }
673
754
  changeValue() {
674
- this.value = this._selectedValue.value;
675
- }
676
- constructor(t2) {
677
- super(t2, false), this.options = t2.options;
678
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
679
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
680
- switch (i) {
755
+ const e = this._selectedValue;
756
+ this.value = e === void 0 ? void 0 : e.value;
757
+ }
758
+ constructor(e) {
759
+ super(e, false), this.options = e.options;
760
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
761
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
762
+ switch (s) {
681
763
  case "left":
682
764
  case "up":
683
- this.cursor = d(this.cursor, -1, this.options);
765
+ this.cursor = findCursor(this.cursor, -1, this.options);
684
766
  break;
685
767
  case "down":
686
768
  case "right":
687
- this.cursor = d(this.cursor, 1, this.options);
769
+ this.cursor = findCursor(this.cursor, 1, this.options);
688
770
  break;
689
771
  }
690
772
  this.changeValue();
@@ -694,181 +776,285 @@ var init_dist3 = __esm({
694
776
  }
695
777
  });
696
778
 
697
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
698
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
699
- import P2 from "node:process";
700
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
701
- import { dirname as be, join as Qe } from "node:path";
702
- function Ze() {
703
- 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";
779
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
780
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
781
+ import process$1 from "node:process";
782
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
783
+ import { dirname, join } from "node:path";
784
+ function isUnicodeSupported() {
785
+ if (process$1.platform !== "win32") {
786
+ return process$1.env.TERM !== "linux";
787
+ }
788
+ 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";
789
+ }
790
+ function formatInstructionFooter(o, e) {
791
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
792
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
704
793
  }
705
- var import_sisteransi2, ee, 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, O2, Ve, re, _t, je;
794
+ var import_sisteransi2, unicode, 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, MULTISELECT_INSTRUCTIONS, log, u2, SELECT_INSTRUCTIONS, c, select, i;
706
795
  var init_dist4 = __esm({
707
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
796
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
708
797
  init_utils2();
709
798
  init_dist3();
710
799
  init_dist3();
711
800
  init_main();
712
801
  init_dist2();
713
802
  import_sisteransi2 = __toESM(require_src(), 1);
714
- ee = Ze();
715
- w2 = (e, i) => ee ? e : i;
716
- _e = w2("\u25C6", "*");
717
- oe = w2("\u25A0", "x");
718
- ue = w2("\u25B2", "x");
719
- F = w2("\u25C7", "o");
720
- le = w2("\u250C", "T");
721
- d2 = w2("\u2502", "|");
722
- E2 = w2("\u2514", "\u2014");
723
- Ie = w2("\u2510", "T");
724
- Ee = w2("\u2518", "\u2014");
725
- z2 = w2("\u25CF", ">");
726
- H2 = w2("\u25CB", " ");
727
- te = w2("\u25FB", "[\u2022]");
728
- U = w2("\u25FC", "[+]");
729
- J = w2("\u25FB", "[ ]");
730
- xe = w2("\u25AA", "\u2022");
731
- se = w2("\u2500", "-");
732
- ce = w2("\u256E", "+");
733
- Ge = w2("\u251C", "+");
734
- $e = w2("\u256F", "+");
735
- de = w2("\u2570", "+");
736
- Oe = w2("\u256D", "+");
737
- he = w2("\u25CF", "\u2022");
738
- pe = w2("\u25C6", "*");
739
- me = w2("\u25B2", "!");
740
- ge = w2("\u25A0", "x");
741
- V2 = (e) => {
742
- switch (e) {
803
+ unicode = isUnicodeSupported();
804
+ unicodeOr = (o, e) => unicode ? o : e;
805
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
806
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
807
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
808
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
809
+ S_BAR_START = unicodeOr("\u250C", "T");
810
+ S_BAR = unicodeOr("\u2502", "|");
811
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
812
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
813
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
814
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
815
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
816
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
817
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
818
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
819
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
820
+ S_BAR_H = unicodeOr("\u2500", "-");
821
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
822
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
823
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
824
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
825
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
826
+ S_INFO = unicodeOr("\u25CF", "\u2022");
827
+ S_SUCCESS = unicodeOr("\u25C6", "*");
828
+ S_WARN = unicodeOr("\u25B2", "!");
829
+ S_ERROR = unicodeOr("\u25A0", "x");
830
+ symbol = (o) => {
831
+ switch (o) {
743
832
  case "initial":
744
833
  case "active":
745
- return t("cyan", _e);
834
+ return styleText2("cyan", S_STEP_ACTIVE);
746
835
  case "cancel":
747
- return t("red", oe);
836
+ return styleText2("red", S_STEP_CANCEL);
748
837
  case "error":
749
- return t("yellow", ue);
838
+ return styleText2("yellow", S_STEP_ERROR);
750
839
  case "submit":
751
- return t("green", F);
840
+ return styleText2("green", S_STEP_SUBMIT);
841
+ case "validating":
842
+ return styleText2("dim", S_STEP_ACTIVE);
752
843
  }
753
844
  };
754
- ye = (e) => {
755
- switch (e) {
845
+ symbolBar = (o) => {
846
+ switch (o) {
756
847
  case "initial":
757
848
  case "active":
758
- return t("cyan", d2);
849
+ return styleText2("cyan", S_BAR);
759
850
  case "cancel":
760
- return t("red", d2);
851
+ return styleText2("red", S_BAR);
761
852
  case "error":
762
- return t("yellow", d2);
853
+ return styleText2("yellow", S_BAR);
763
854
  case "submit":
764
- return t("green", d2);
765
- }
766
- };
767
- et2 = (e, i, s, r, u2) => {
768
- let n = i, o = 0;
769
- for (let c2 = s; c2 < r; c2++) {
770
- const a = e[c2];
771
- if (n = n - a.length, o++, n <= u2) break;
772
- }
773
- return { lineCount: n, removals: o };
774
- };
775
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
776
- 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);
777
- let p2 = 0;
778
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
779
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
780
- const S2 = Math.min(p2 + y2, i.length), h = [];
855
+ return styleText2("green", S_BAR);
856
+ }
857
+ };
858
+ I = (l, e, w, p, b, C = false) => {
859
+ let r2 = e, O = 0;
860
+ if (C)
861
+ for (let i2 = p - 1; i2 >= w; i2--) {
862
+ const m = l[i2];
863
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
864
+ }
865
+ else
866
+ for (let i2 = w; i2 < p; i2++) {
867
+ const m = l[i2];
868
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
869
+ }
870
+ return { lineCount: r2, removals: O };
871
+ };
872
+ limitOptions = ({
873
+ cursor: l,
874
+ options: e,
875
+ style: w,
876
+ output: p = process.stdout,
877
+ maxItems: b = Number.POSITIVE_INFINITY,
878
+ columnPadding: C = 0,
879
+ rowPadding: r2 = 4
880
+ }) => {
881
+ const i2 = getColumns(p) - C, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
781
882
  let f = 0;
782
- m && f++, g && f++;
783
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
784
- for (let b = v; b < T; b++) {
785
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
883
+ l >= a2 - 3 && (f = Math.max(
884
+ Math.min(l - a2 + 3, e.length - a2),
885
+ 0
886
+ ));
887
+ let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
888
+ const W = Math.min(
889
+ f + a2,
890
+ e.length
891
+ ), s = [];
892
+ let g = 0;
893
+ d && g++, c2 && g++;
894
+ const T = f + (d ? 1 : 0), y2 = W - (c2 ? 1 : 0);
895
+ for (let t2 = T; t2 < y2; t2++) {
896
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l) : "", h2 = wrapAnsi(o, i2, {
897
+ hard: true,
898
+ trim: false
899
+ }).split(`
786
900
  `);
787
- h.push(x), f += x.length;
788
- }
789
- if (f > $2) {
790
- let b = 0, x = 0, G2 = f;
791
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
792
- 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));
793
- }
794
- const C2 = [];
795
- m && C2.push(l);
796
- for (const b of h) for (const x of b) C2.push(x);
797
- return g && C2.push(l), C2;
798
- };
799
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
800
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
801
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
802
- const y2 = Array.isArray(e) ? e : e.split(`
901
+ s.push(h2), g += h2.length;
902
+ }
903
+ if (g > v) {
904
+ let t2 = 0, n3 = 0, o = g;
905
+ const h2 = l - T;
906
+ let u3 = v;
907
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
908
+ s,
909
+ o,
910
+ h2 + 1,
911
+ s.length,
912
+ u3,
913
+ true
914
+ );
915
+ 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));
916
+ }
917
+ const x = [];
918
+ d && x.push(M);
919
+ for (const t2 of s)
920
+ for (const n3 of t2)
921
+ x.push(n3);
922
+ return c2 && x.push(M), x;
923
+ };
924
+ MULTISELECT_INSTRUCTIONS = [
925
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
926
+ `${styleText2("dim", "Space:")} select`,
927
+ `${styleText2("dim", "Enter:")} confirm`
928
+ ];
929
+ log = {
930
+ message: (s = [], {
931
+ symbol: e = styleText2("gray", S_BAR),
932
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
933
+ output: m = process.stdout,
934
+ spacing: l = 1,
935
+ withGuide: c2
936
+ } = {}) => {
937
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
938
+ for (let i2 = 0; i2 < l; i2++)
939
+ t2.push(f);
940
+ const g = Array.isArray(s) ? s : s.split(`
803
941
  `);
804
- if (y2.length > 0) {
805
- const [p2, ...m] = y2;
806
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
807
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
808
- }
809
- r.write(`${o.join(`
942
+ if (g.length > 0) {
943
+ const [i2, ...y2] = g;
944
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
945
+ for (const p of y2)
946
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
947
+ }
948
+ m.write(`${t2.join(`
810
949
  `)}
811
950
  `);
812
- }, info: (e, i) => {
813
- O2.message(e, { ...i, symbol: t("blue", he) });
814
- }, success: (e, i) => {
815
- O2.message(e, { ...i, symbol: t("green", pe) });
816
- }, step: (e, i) => {
817
- O2.message(e, { ...i, symbol: t("green", F) });
818
- }, warn: (e, i) => {
819
- O2.message(e, { ...i, symbol: t("yellow", me) });
820
- }, warning: (e, i) => {
821
- O2.warn(e, i);
822
- }, error: (e, i) => {
823
- O2.message(e, { ...i, symbol: t("red", ge) });
824
- } };
825
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
826
- re = (e, i) => e.includes(`
827
- `) ? e.split(`
828
- `).map((s) => i(s)).join(`
829
- `) : i(e);
830
- _t = (e) => {
831
- const i = (s, r) => {
832
- const u2 = s.label ?? String(s.value);
833
- switch (r) {
951
+ },
952
+ info: (s, e) => {
953
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
954
+ },
955
+ success: (s, e) => {
956
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
957
+ },
958
+ step: (s, e) => {
959
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
960
+ },
961
+ warn: (s, e) => {
962
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
963
+ },
964
+ /** alias for `log.warn()`. */
965
+ warning: (s, e) => {
966
+ log.warn(s, e);
967
+ },
968
+ error: (s, e) => {
969
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
970
+ }
971
+ };
972
+ u2 = {
973
+ light: unicodeOr("\u2500", "-"),
974
+ heavy: unicodeOr("\u2501", "="),
975
+ block: unicodeOr("\u2588", "#")
976
+ };
977
+ SELECT_INSTRUCTIONS = [
978
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
979
+ `${styleText2("dim", "Enter:")} confirm`
980
+ ];
981
+ c = (t2, o) => t2.includes(`
982
+ `) ? t2.split(`
983
+ `).map((d) => o(d)).join(`
984
+ `) : o(t2);
985
+ select = (t2) => {
986
+ const o = (n3, m) => {
987
+ if (n3 === void 0)
988
+ return "";
989
+ const s = n3.label ?? String(n3.value);
990
+ switch (m) {
834
991
  case "disabled":
835
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
992
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
836
993
  case "selected":
837
- return `${re(u2, (n) => t("dim", n))}`;
994
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
838
995
  case "active":
839
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
996
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
840
997
  case "cancelled":
841
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
998
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
842
999
  default:
843
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
844
- }
845
- };
846
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
847
- 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)}
848
- ` : ""}${n}
1000
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1001
+ }
1002
+ }, d = t2.showInstructions ?? true;
1003
+ return new n$1({
1004
+ options: t2.options,
1005
+ signal: t2.signal,
1006
+ input: t2.input,
1007
+ output: t2.output,
1008
+ initialValue: t2.initialValue,
1009
+ render() {
1010
+ const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1011
+ t2.output,
1012
+ t2.message,
1013
+ s,
1014
+ m
1015
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1016
+ ` : ""}${i2}
849
1017
  `;
850
- switch (this.state) {
851
- case "submit": {
852
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
853
- return `${o}${a}`;
854
- }
855
- case "cancel": {
856
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
857
- return `${o}${a}${s ? `
858
- ${t("gray", d2)}` : ""}`;
859
- }
860
- default: {
861
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
862
- `).length, $2 = s ? 2 : 1;
863
- 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(`
864
- ${c2}`)}
865
- ${a}
1018
+ switch (this.state) {
1019
+ case "submit": {
1020
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1021
+ t2.output,
1022
+ o(this.options[this.cursor], "selected"),
1023
+ r2
1024
+ );
1025
+ return `${u3}${a2}`;
1026
+ }
1027
+ case "cancel": {
1028
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1029
+ t2.output,
1030
+ o(this.options[this.cursor], "cancelled"),
1031
+ r2
1032
+ );
1033
+ return `${u3}${a2}${n3 ? `
1034
+ ${styleText2("gray", S_BAR)}` : ""}`;
1035
+ }
1036
+ default: {
1037
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1038
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
1039
+ `), f = p.length + 1;
1040
+ return `${u3}${r2}${limitOptions({
1041
+ output: t2.output,
1042
+ cursor: this.cursor,
1043
+ options: this.options,
1044
+ maxItems: t2.maxItems,
1045
+ columnPadding: r2.length,
1046
+ rowPadding: a2 + f,
1047
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1048
+ }).join(`
1049
+ ${r2}`)}
1050
+ ${b}
866
1051
  `;
1052
+ }
867
1053
  }
868
1054
  }
869
- } }).prompt();
1055
+ }).prompt();
870
1056
  };
871
- je = `${t("gray", d2)} `;
1057
+ i = `${styleText2("gray", S_BAR)} `;
872
1058
  }
873
1059
  });
874
1060
 
@@ -913,7 +1099,7 @@ function stringify(value) {
913
1099
  function formatMessage(...args) {
914
1100
  return args.map(stringify).join(" ");
915
1101
  }
916
- var colors, currentLogLevel, log, error, warn, info, success;
1102
+ var colors, currentLogLevel, log2, error, warn, info, success;
917
1103
  var init_cli_output = __esm({
918
1104
  "packages/tooling/src/utils/cli-output.ts"() {
919
1105
  "use strict";
@@ -946,7 +1132,7 @@ var init_cli_output = __esm({
946
1132
  currentLogLevel = envLevel;
947
1133
  }
948
1134
  }
949
- log = {
1135
+ log2 = {
950
1136
  /**
951
1137
  * Logs an error message (always shows unless Quiet level)
952
1138
  * Uses clack's log.error + explicit red color
@@ -954,7 +1140,7 @@ var init_cli_output = __esm({
954
1140
  error(...args) {
955
1141
  if (currentLogLevel < 0 /* Quiet */) return;
956
1142
  const message = formatMessage(...args);
957
- O2.error(colorize(message, colors.brightRed));
1143
+ log.error(colorize(message, colors.brightRed));
958
1144
  },
959
1145
  /**
960
1146
  * Logs a warning message (shows at Normal level and above)
@@ -963,7 +1149,7 @@ var init_cli_output = __esm({
963
1149
  warn(...args) {
964
1150
  if (currentLogLevel < 1 /* Normal */) return;
965
1151
  const message = formatMessage(...args);
966
- O2.warn(colorize(message, colors.brightYellow));
1152
+ log.warn(colorize(message, colors.brightYellow));
967
1153
  },
968
1154
  /**
969
1155
  * Logs an info message (shows at Normal level and above)
@@ -972,7 +1158,7 @@ var init_cli_output = __esm({
972
1158
  info(...args) {
973
1159
  if (currentLogLevel < 1 /* Normal */) return;
974
1160
  const message = formatMessage(...args);
975
- O2.info(colorize(message, colors.brightCyan));
1161
+ log.info(colorize(message, colors.brightCyan));
976
1162
  },
977
1163
  /**
978
1164
  * Logs a success message (shows at Normal level and above)
@@ -981,7 +1167,7 @@ var init_cli_output = __esm({
981
1167
  success(...args) {
982
1168
  if (currentLogLevel < 1 /* Normal */) return;
983
1169
  const message = formatMessage(...args);
984
- O2.success(colorize(message, colors.brightGreen));
1170
+ log.success(colorize(message, colors.brightGreen));
985
1171
  },
986
1172
  /**
987
1173
  * Logs a debug message (only shows at Verbose level and above)
@@ -990,7 +1176,7 @@ var init_cli_output = __esm({
990
1176
  debug(...args) {
991
1177
  if (currentLogLevel < 2 /* Verbose */) return;
992
1178
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
993
- O2.message(
1179
+ log.message(
994
1180
  colorize(
995
1181
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
996
1182
  colors.gray
@@ -1004,7 +1190,7 @@ var init_cli_output = __esm({
1004
1190
  trace(...args) {
1005
1191
  if (currentLogLevel < 3 /* Debug */) return;
1006
1192
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1007
- O2.message(
1193
+ log.message(
1008
1194
  colorize(
1009
1195
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1010
1196
  colors.gray
@@ -1012,10 +1198,10 @@ var init_cli_output = __esm({
1012
1198
  );
1013
1199
  }
1014
1200
  };
1015
- error = log.error.bind(log);
1016
- warn = log.warn.bind(log);
1017
- info = log.info.bind(log);
1018
- success = log.success.bind(log);
1201
+ error = log2.error.bind(log2);
1202
+ warn = log2.warn.bind(log2);
1203
+ info = log2.info.bind(log2);
1204
+ success = log2.success.bind(log2);
1019
1205
  }
1020
1206
  });
1021
1207
 
@@ -1375,9 +1561,9 @@ var require_is_glob = __commonJS({
1375
1561
  index += 2;
1376
1562
  var close = chars[open];
1377
1563
  if (close) {
1378
- var n = str.indexOf(close, index);
1379
- if (n !== -1) {
1380
- index = n + 1;
1564
+ var n3 = str.indexOf(close, index);
1565
+ if (n3 !== -1) {
1566
+ index = n3 + 1;
1381
1567
  }
1382
1568
  }
1383
1569
  if (str[index] === "!") {
@@ -1403,9 +1589,9 @@ var require_is_glob = __commonJS({
1403
1589
  index += 2;
1404
1590
  var close = chars[open];
1405
1591
  if (close) {
1406
- var n = str.indexOf(close, index);
1407
- if (n !== -1) {
1408
- index = n + 1;
1592
+ var n3 = str.indexOf(close, index);
1593
+ if (n3 !== -1) {
1594
+ index = n3 + 1;
1409
1595
  }
1410
1596
  }
1411
1597
  if (str[index] === "!") {
@@ -1483,8 +1669,8 @@ var require_utils = __commonJS({
1483
1669
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1484
1670
  return (Number(max) - Number(min)) / Number(step) >= limit;
1485
1671
  };
1486
- exports.escapeNode = (block, n = 0, type) => {
1487
- const node = block.nodes[n];
1672
+ exports.escapeNode = (block2, n3 = 0, type) => {
1673
+ const node = block2.nodes[n3];
1488
1674
  if (!node) return;
1489
1675
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1490
1676
  if (node.escaped !== true) {
@@ -1501,15 +1687,15 @@ var require_utils = __commonJS({
1501
1687
  }
1502
1688
  return false;
1503
1689
  };
1504
- exports.isInvalidBrace = (block) => {
1505
- if (block.type !== "brace") return false;
1506
- if (block.invalid === true || block.dollar) return true;
1507
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1508
- block.invalid = true;
1690
+ exports.isInvalidBrace = (block2) => {
1691
+ if (block2.type !== "brace") return false;
1692
+ if (block2.invalid === true || block2.dollar) return true;
1693
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1694
+ block2.invalid = true;
1509
1695
  return true;
1510
1696
  }
1511
- if (block.open !== true || block.close !== true) {
1512
- block.invalid = true;
1697
+ if (block2.open !== true || block2.close !== true) {
1698
+ block2.invalid = true;
1513
1699
  return true;
1514
1700
  }
1515
1701
  return false;
@@ -1528,8 +1714,8 @@ var require_utils = __commonJS({
1528
1714
  exports.flatten = (...args) => {
1529
1715
  const result = [];
1530
1716
  const flat = (arr) => {
1531
- for (let i = 0; i < arr.length; i++) {
1532
- const ele = arr[i];
1717
+ for (let i2 = 0; i2 < arr.length; i2++) {
1718
+ const ele = arr[i2];
1533
1719
  if (Array.isArray(ele)) {
1534
1720
  flat(ele);
1535
1721
  continue;
@@ -1623,9 +1809,9 @@ var require_to_regex_range = __commonJS({
1623
1809
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1624
1810
  return toRegexRange.cache[cacheKey].result;
1625
1811
  }
1626
- let a = Math.min(min, max);
1812
+ let a2 = Math.min(min, max);
1627
1813
  let b = Math.max(min, max);
1628
- if (Math.abs(a - b) === 1) {
1814
+ if (Math.abs(a2 - b) === 1) {
1629
1815
  let result = min + "|" + max;
1630
1816
  if (opts.capture) {
1631
1817
  return `(${result})`;
@@ -1636,20 +1822,20 @@ var require_to_regex_range = __commonJS({
1636
1822
  return `(?:${result})`;
1637
1823
  }
1638
1824
  let isPadded = hasPadding(min) || hasPadding(max);
1639
- let state = { min, max, a, b };
1825
+ let state = { min, max, a: a2, b };
1640
1826
  let positives = [];
1641
1827
  let negatives = [];
1642
1828
  if (isPadded) {
1643
1829
  state.isPadded = isPadded;
1644
1830
  state.maxLen = String(state.max).length;
1645
1831
  }
1646
- if (a < 0) {
1832
+ if (a2 < 0) {
1647
1833
  let newMin = b < 0 ? Math.abs(b) : 1;
1648
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1649
- a = state.a = 0;
1834
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
1835
+ a2 = state.a = 0;
1650
1836
  }
1651
1837
  if (b >= 0) {
1652
- positives = splitToPatterns(a, b, state, opts);
1838
+ positives = splitToPatterns(a2, b, state, opts);
1653
1839
  }
1654
1840
  state.negatives = negatives;
1655
1841
  state.positives = positives;
@@ -1697,8 +1883,8 @@ var require_to_regex_range = __commonJS({
1697
1883
  let digits = zipped.length;
1698
1884
  let pattern = "";
1699
1885
  let count = 0;
1700
- for (let i = 0; i < digits; i++) {
1701
- let [startDigit, stopDigit] = zipped[i];
1886
+ for (let i2 = 0; i2 < digits; i2++) {
1887
+ let [startDigit, stopDigit] = zipped[i2];
1702
1888
  if (startDigit === stopDigit) {
1703
1889
  pattern += startDigit;
1704
1890
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1717,8 +1903,8 @@ var require_to_regex_range = __commonJS({
1717
1903
  let tokens = [];
1718
1904
  let start = min;
1719
1905
  let prev;
1720
- for (let i = 0; i < ranges.length; i++) {
1721
- let max2 = ranges[i];
1906
+ for (let i2 = 0; i2 < ranges.length; i2++) {
1907
+ let max2 = ranges[i2];
1722
1908
  let obj = rangeToPattern(String(start), String(max2), options);
1723
1909
  let zeros = "";
1724
1910
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1753,13 +1939,13 @@ var require_to_regex_range = __commonJS({
1753
1939
  }
1754
1940
  return result;
1755
1941
  }
1756
- function zip(a, b) {
1942
+ function zip(a2, b) {
1757
1943
  let arr = [];
1758
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
1944
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1759
1945
  return arr;
1760
1946
  }
1761
- function compare(a, b) {
1762
- return a > b ? 1 : b > a ? -1 : 0;
1947
+ function compare(a2, b) {
1948
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1763
1949
  }
1764
1950
  function contains(arr, key, val) {
1765
1951
  return arr.some((ele) => ele[key] === val);
@@ -1777,8 +1963,8 @@ var require_to_regex_range = __commonJS({
1777
1963
  }
1778
1964
  return "";
1779
1965
  }
1780
- function toCharacterClass(a, b, options) {
1781
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1966
+ function toCharacterClass(a2, b, options) {
1967
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1782
1968
  }
1783
1969
  function hasPadding(str) {
1784
1970
  return /^-?(0+)\d/.test(str);
@@ -1857,8 +2043,8 @@ var require_fill_range = __commonJS({
1857
2043
  return negative ? "-" + input : input;
1858
2044
  };
1859
2045
  var toSequence = (parts, options, maxLen) => {
1860
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1861
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2046
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2047
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1862
2048
  let prefix = options.capture ? "" : "?:";
1863
2049
  let positives = "";
1864
2050
  let negatives = "";
@@ -1879,12 +2065,12 @@ var require_fill_range = __commonJS({
1879
2065
  }
1880
2066
  return result;
1881
2067
  };
1882
- var toRange = (a, b, isNumbers, options) => {
2068
+ var toRange = (a2, b, isNumbers, options) => {
1883
2069
  if (isNumbers) {
1884
- return toRegexRange(a, b, { wrap: false, ...options });
2070
+ return toRegexRange(a2, b, { wrap: false, ...options });
1885
2071
  }
1886
- let start = String.fromCharCode(a);
1887
- if (a === b) return start;
2072
+ let start = String.fromCharCode(a2);
2073
+ if (a2 === b) return start;
1888
2074
  let stop = String.fromCharCode(b);
1889
2075
  return `[${start}-${stop}]`;
1890
2076
  };
@@ -1910,15 +2096,15 @@ var require_fill_range = __commonJS({
1910
2096
  return [];
1911
2097
  };
1912
2098
  var fillNumbers = (start, end, step = 1, options = {}) => {
1913
- let a = Number(start);
2099
+ let a2 = Number(start);
1914
2100
  let b = Number(end);
1915
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2101
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
1916
2102
  if (options.strictRanges === true) throw rangeError([start, end]);
1917
2103
  return [];
1918
2104
  }
1919
- if (a === 0) a = 0;
2105
+ if (a2 === 0) a2 = 0;
1920
2106
  if (b === 0) b = 0;
1921
- let descending = a > b;
2107
+ let descending = a2 > b;
1922
2108
  let startString = String(start);
1923
2109
  let endString = String(end);
1924
2110
  let stepString = String(step);
@@ -1934,13 +2120,13 @@ var require_fill_range = __commonJS({
1934
2120
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1935
2121
  let range = [];
1936
2122
  let index = 0;
1937
- while (descending ? a >= b : a <= b) {
2123
+ while (descending ? a2 >= b : a2 <= b) {
1938
2124
  if (options.toRegex === true && step > 1) {
1939
- push(a);
2125
+ push(a2);
1940
2126
  } else {
1941
- range.push(pad(format(a, index), maxLen, toNumber));
2127
+ range.push(pad(format(a2, index), maxLen, toNumber));
1942
2128
  }
1943
- a = descending ? a - step : a + step;
2129
+ a2 = descending ? a2 - step : a2 + step;
1944
2130
  index++;
1945
2131
  }
1946
2132
  if (options.toRegex === true) {
@@ -1953,19 +2139,19 @@ var require_fill_range = __commonJS({
1953
2139
  return invalidRange(start, end, options);
1954
2140
  }
1955
2141
  let format = options.transform || ((val) => String.fromCharCode(val));
1956
- let a = `${start}`.charCodeAt(0);
2142
+ let a2 = `${start}`.charCodeAt(0);
1957
2143
  let b = `${end}`.charCodeAt(0);
1958
- let descending = a > b;
1959
- let min = Math.min(a, b);
1960
- let max = Math.max(a, b);
2144
+ let descending = a2 > b;
2145
+ let min = Math.min(a2, b);
2146
+ let max = Math.max(a2, b);
1961
2147
  if (options.toRegex && step === 1) {
1962
2148
  return toRange(min, max, false, options);
1963
2149
  }
1964
2150
  let range = [];
1965
2151
  let index = 0;
1966
- while (descending ? a >= b : a <= b) {
1967
- range.push(format(a, index));
1968
- a = descending ? a - step : a + step;
2152
+ while (descending ? a2 >= b : a2 <= b) {
2153
+ range.push(format(a2, index));
2154
+ a2 = descending ? a2 - step : a2 + step;
1969
2155
  index++;
1970
2156
  }
1971
2157
  if (options.toRegex === true) {
@@ -2088,18 +2274,18 @@ var require_expand = __commonJS({
2088
2274
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2089
2275
  const walk = (node, parent = {}) => {
2090
2276
  node.queue = [];
2091
- let p2 = parent;
2092
- let q2 = parent.queue;
2093
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2094
- p2 = p2.parent;
2095
- q2 = p2.queue;
2277
+ let p = parent;
2278
+ let q = parent.queue;
2279
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2280
+ p = p.parent;
2281
+ q = p.queue;
2096
2282
  }
2097
2283
  if (node.invalid || node.dollar) {
2098
- q2.push(append(q2.pop(), stringify2(node, options)));
2284
+ q.push(append(q.pop(), stringify2(node, options)));
2099
2285
  return;
2100
2286
  }
2101
2287
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2102
- q2.push(append(q2.pop(), ["{}"]));
2288
+ q.push(append(q.pop(), ["{}"]));
2103
2289
  return;
2104
2290
  }
2105
2291
  if (node.nodes && node.ranges > 0) {
@@ -2111,26 +2297,26 @@ var require_expand = __commonJS({
2111
2297
  if (range.length === 0) {
2112
2298
  range = stringify2(node, options);
2113
2299
  }
2114
- q2.push(append(q2.pop(), range));
2300
+ q.push(append(q.pop(), range));
2115
2301
  node.nodes = [];
2116
2302
  return;
2117
2303
  }
2118
2304
  const enclose = utils.encloseBrace(node);
2119
2305
  let queue = node.queue;
2120
- let block = node;
2121
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2122
- block = block.parent;
2123
- queue = block.queue;
2306
+ let block2 = node;
2307
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2308
+ block2 = block2.parent;
2309
+ queue = block2.queue;
2124
2310
  }
2125
- for (let i = 0; i < node.nodes.length; i++) {
2126
- const child = node.nodes[i];
2311
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2312
+ const child = node.nodes[i2];
2127
2313
  if (child.type === "comma" && node.type === "brace") {
2128
- if (i === 1) queue.push("");
2314
+ if (i2 === 1) queue.push("");
2129
2315
  queue.push("");
2130
2316
  continue;
2131
2317
  }
2132
2318
  if (child.type === "close") {
2133
- q2.push(append(q2.pop(), queue, enclose));
2319
+ q.push(append(q.pop(), queue, enclose));
2134
2320
  continue;
2135
2321
  }
2136
2322
  if (child.value && child.type !== "open") {
@@ -2297,7 +2483,7 @@ var require_parse = __commonJS({
2297
2483
  }
2298
2484
  const ast = { type: "root", input, nodes: [] };
2299
2485
  const stack = [ast];
2300
- let block = ast;
2486
+ let block2 = ast;
2301
2487
  let prev = ast;
2302
2488
  let brackets = 0;
2303
2489
  const length = input.length;
@@ -2313,15 +2499,15 @@ var require_parse = __commonJS({
2313
2499
  prev.value += node.value;
2314
2500
  return;
2315
2501
  }
2316
- block.nodes.push(node);
2317
- node.parent = block;
2502
+ block2.nodes.push(node);
2503
+ node.parent = block2;
2318
2504
  node.prev = prev;
2319
2505
  prev = node;
2320
2506
  return node;
2321
2507
  };
2322
2508
  push({ type: "bos" });
2323
2509
  while (index < length) {
2324
- block = stack[stack.length - 1];
2510
+ block2 = stack[stack.length - 1];
2325
2511
  value = advance();
2326
2512
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2327
2513
  continue;
@@ -2358,19 +2544,19 @@ var require_parse = __commonJS({
2358
2544
  continue;
2359
2545
  }
2360
2546
  if (value === CHAR_LEFT_PARENTHESES) {
2361
- block = push({ type: "paren", nodes: [] });
2362
- stack.push(block);
2547
+ block2 = push({ type: "paren", nodes: [] });
2548
+ stack.push(block2);
2363
2549
  push({ type: "text", value });
2364
2550
  continue;
2365
2551
  }
2366
2552
  if (value === CHAR_RIGHT_PARENTHESES) {
2367
- if (block.type !== "paren") {
2553
+ if (block2.type !== "paren") {
2368
2554
  push({ type: "text", value });
2369
2555
  continue;
2370
2556
  }
2371
- block = stack.pop();
2557
+ block2 = stack.pop();
2372
2558
  push({ type: "text", value });
2373
- block = stack[stack.length - 1];
2559
+ block2 = stack[stack.length - 1];
2374
2560
  continue;
2375
2561
  }
2376
2562
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2395,7 +2581,7 @@ var require_parse = __commonJS({
2395
2581
  }
2396
2582
  if (value === CHAR_LEFT_CURLY_BRACE) {
2397
2583
  depth++;
2398
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2584
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2399
2585
  const brace = {
2400
2586
  type: "brace",
2401
2587
  open: true,
@@ -2406,52 +2592,52 @@ var require_parse = __commonJS({
2406
2592
  ranges: 0,
2407
2593
  nodes: []
2408
2594
  };
2409
- block = push(brace);
2410
- stack.push(block);
2595
+ block2 = push(brace);
2596
+ stack.push(block2);
2411
2597
  push({ type: "open", value });
2412
2598
  continue;
2413
2599
  }
2414
2600
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2415
- if (block.type !== "brace") {
2601
+ if (block2.type !== "brace") {
2416
2602
  push({ type: "text", value });
2417
2603
  continue;
2418
2604
  }
2419
2605
  const type = "close";
2420
- block = stack.pop();
2421
- block.close = true;
2606
+ block2 = stack.pop();
2607
+ block2.close = true;
2422
2608
  push({ type, value });
2423
2609
  depth--;
2424
- block = stack[stack.length - 1];
2610
+ block2 = stack[stack.length - 1];
2425
2611
  continue;
2426
2612
  }
2427
2613
  if (value === CHAR_COMMA && depth > 0) {
2428
- if (block.ranges > 0) {
2429
- block.ranges = 0;
2430
- const open = block.nodes.shift();
2431
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2614
+ if (block2.ranges > 0) {
2615
+ block2.ranges = 0;
2616
+ const open = block2.nodes.shift();
2617
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2432
2618
  }
2433
2619
  push({ type: "comma", value });
2434
- block.commas++;
2620
+ block2.commas++;
2435
2621
  continue;
2436
2622
  }
2437
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2438
- const siblings = block.nodes;
2623
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2624
+ const siblings = block2.nodes;
2439
2625
  if (depth === 0 || siblings.length === 0) {
2440
2626
  push({ type: "text", value });
2441
2627
  continue;
2442
2628
  }
2443
2629
  if (prev.type === "dot") {
2444
- block.range = [];
2630
+ block2.range = [];
2445
2631
  prev.value += value;
2446
2632
  prev.type = "range";
2447
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2448
- block.invalid = true;
2449
- block.ranges = 0;
2633
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2634
+ block2.invalid = true;
2635
+ block2.ranges = 0;
2450
2636
  prev.type = "text";
2451
2637
  continue;
2452
2638
  }
2453
- block.ranges++;
2454
- block.args = [];
2639
+ block2.ranges++;
2640
+ block2.args = [];
2455
2641
  continue;
2456
2642
  }
2457
2643
  if (prev.type === "range") {
@@ -2459,7 +2645,7 @@ var require_parse = __commonJS({
2459
2645
  const before = siblings[siblings.length - 1];
2460
2646
  before.value += prev.value + value;
2461
2647
  prev = before;
2462
- block.ranges--;
2648
+ block2.ranges--;
2463
2649
  continue;
2464
2650
  }
2465
2651
  push({ type: "dot", value });
@@ -2468,9 +2654,9 @@ var require_parse = __commonJS({
2468
2654
  push({ type: "text", value });
2469
2655
  }
2470
2656
  do {
2471
- block = stack.pop();
2472
- if (block.type !== "root") {
2473
- block.nodes.forEach((node) => {
2657
+ block2 = stack.pop();
2658
+ if (block2.type !== "root") {
2659
+ block2.nodes.forEach((node) => {
2474
2660
  if (!node.nodes) {
2475
2661
  if (node.type === "open") node.isOpen = true;
2476
2662
  if (node.type === "close") node.isClose = true;
@@ -2479,8 +2665,8 @@ var require_parse = __commonJS({
2479
2665
  }
2480
2666
  });
2481
2667
  const parent = stack[stack.length - 1];
2482
- const index2 = parent.nodes.indexOf(block);
2483
- parent.nodes.splice(index2, 1, ...block.nodes);
2668
+ const index2 = parent.nodes.indexOf(block2);
2669
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2484
2670
  }
2485
2671
  } while (stack.length > 0);
2486
2672
  push({ type: "eos" });
@@ -3113,9 +3299,9 @@ var require_scan = __commonJS({
3113
3299
  if (opts.parts === true || opts.tokens === true) {
3114
3300
  let prevIndex;
3115
3301
  for (let idx = 0; idx < slashes.length; idx++) {
3116
- const n = prevIndex ? prevIndex + 1 : start;
3117
- const i = slashes[idx];
3118
- const value = input.slice(n, i);
3302
+ const n3 = prevIndex ? prevIndex + 1 : start;
3303
+ const i2 = slashes[idx];
3304
+ const value = input.slice(n3, i2);
3119
3305
  if (opts.tokens) {
3120
3306
  if (idx === 0 && start !== 0) {
3121
3307
  tokens[idx].isPrefix = true;
@@ -3129,7 +3315,7 @@ var require_scan = __commonJS({
3129
3315
  if (idx !== 0 || value !== "") {
3130
3316
  parts.push(value);
3131
3317
  }
3132
- prevIndex = i;
3318
+ prevIndex = i2;
3133
3319
  }
3134
3320
  if (prevIndex && prevIndex + 1 < input.length) {
3135
3321
  const value = input.slice(prevIndex + 1);
@@ -3258,15 +3444,15 @@ var require_parse2 = __commonJS({
3258
3444
  };
3259
3445
  var hasRepeatedCharPrefixOverlap = (branches) => {
3260
3446
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3261
- for (let i = 0; i < values.length; i++) {
3262
- for (let j2 = i + 1; j2 < values.length; j2++) {
3263
- const a = values[i];
3264
- const b = values[j2];
3265
- const char = a[0];
3266
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3447
+ for (let i2 = 0; i2 < values.length; i2++) {
3448
+ for (let j = i2 + 1; j < values.length; j++) {
3449
+ const a2 = values[i2];
3450
+ const b = values[j];
3451
+ const char = a2[0];
3452
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3267
3453
  continue;
3268
3454
  }
3269
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3455
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3270
3456
  return true;
3271
3457
  }
3272
3458
  }
@@ -3281,8 +3467,8 @@ var require_parse2 = __commonJS({
3281
3467
  let paren = 0;
3282
3468
  let quote = 0;
3283
3469
  let escaped = false;
3284
- for (let i = 1; i < pattern.length; i++) {
3285
- const ch = pattern[i];
3470
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3471
+ const ch = pattern[i2];
3286
3472
  if (escaped === true) {
3287
3473
  escaped = false;
3288
3474
  continue;
@@ -3316,13 +3502,13 @@ var require_parse2 = __commonJS({
3316
3502
  if (ch === ")") {
3317
3503
  paren--;
3318
3504
  if (paren === 0) {
3319
- if (requireEnd === true && i !== pattern.length - 1) {
3505
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3320
3506
  return;
3321
3507
  }
3322
3508
  return {
3323
3509
  type: pattern[0],
3324
- body: pattern.slice(2, i),
3325
- end: i
3510
+ body: pattern.slice(2, i2),
3511
+ end: i2
3326
3512
  };
3327
3513
  }
3328
3514
  }
@@ -3454,7 +3640,7 @@ var require_parse2 = __commonJS({
3454
3640
  let prev = bos;
3455
3641
  let value;
3456
3642
  const eos = () => state.index === len - 1;
3457
- const peek = state.peek = (n = 1) => input[state.index + n];
3643
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3458
3644
  const advance = state.advance = () => input[++state.index] || "";
3459
3645
  const remaining = () => input.slice(state.index + 1);
3460
3646
  const consume = (value2 = "", num = 0) => {
@@ -3535,10 +3721,10 @@ var require_parse2 = __commonJS({
3535
3721
  open.type = "text";
3536
3722
  open.value = literal;
3537
3723
  open.output = safeOutput || utils.escapeRegex(literal);
3538
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3539
- tokens[i].value = "";
3540
- tokens[i].output = "";
3541
- delete tokens[i].suffix;
3724
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3725
+ tokens[i2].value = "";
3726
+ tokens[i2].output = "";
3727
+ delete tokens[i2].suffix;
3542
3728
  }
3543
3729
  state.output = token.output + open.output;
3544
3730
  state.backtrack = true;
@@ -3781,13 +3967,13 @@ var require_parse2 = __commonJS({
3781
3967
  if (brace.dots === true) {
3782
3968
  const arr = tokens.slice();
3783
3969
  const range = [];
3784
- for (let i = arr.length - 1; i >= 0; i--) {
3970
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3785
3971
  tokens.pop();
3786
- if (arr[i].type === "brace") {
3972
+ if (arr[i2].type === "brace") {
3787
3973
  break;
3788
3974
  }
3789
- if (arr[i].type !== "dots") {
3790
- range.unshift(arr[i].value);
3975
+ if (arr[i2].type !== "dots") {
3976
+ range.unshift(arr[i2].value);
3791
3977
  }
3792
3978
  }
3793
3979
  output = expandRange(range, opts);
@@ -4246,7 +4432,7 @@ var require_picomatch = __commonJS({
4246
4432
  };
4247
4433
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4248
4434
  picomatch.parse = (pattern, options) => {
4249
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4435
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4250
4436
  return parse2(pattern, { ...options, fastpaths: false });
4251
4437
  };
4252
4438
  picomatch.scan = (input, options) => scan(input, options);
@@ -4330,8 +4516,8 @@ var require_micromatch = __commonJS({
4330
4516
  options.onResult(state);
4331
4517
  }
4332
4518
  };
4333
- for (let i = 0; i < patterns.length; i++) {
4334
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4519
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4520
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4335
4521
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4336
4522
  if (negated) negatives++;
4337
4523
  for (let item of list) {
@@ -4353,7 +4539,7 @@ var require_micromatch = __commonJS({
4353
4539
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4354
4540
  }
4355
4541
  if (options.nonull === true || options.nullglob === true) {
4356
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4542
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4357
4543
  }
4358
4544
  }
4359
4545
  return matches;
@@ -4383,7 +4569,7 @@ var require_micromatch = __commonJS({
4383
4569
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4384
4570
  }
4385
4571
  if (Array.isArray(pattern)) {
4386
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4572
+ return pattern.some((p) => micromatch.contains(str, p, options));
4387
4573
  }
4388
4574
  if (typeof pattern === "string") {
4389
4575
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4428,7 +4614,7 @@ var require_micromatch = __commonJS({
4428
4614
  if (typeof str !== "string") {
4429
4615
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4430
4616
  }
4431
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4617
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4432
4618
  };
4433
4619
  micromatch.capture = (glob, input, options) => {
4434
4620
  let posix = utils.isWindows(options);
@@ -4579,7 +4765,7 @@ var require_pattern = __commonJS({
4579
4765
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4580
4766
  function expandBraceExpansion(pattern) {
4581
4767
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4582
- patterns.sort((a, b) => a.length - b.length);
4768
+ patterns.sort((a2, b) => a2.length - b.length);
4583
4769
  return patterns.filter((pattern2) => pattern2 !== "");
4584
4770
  }
4585
4771
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4660,8 +4846,8 @@ var require_merge2 = __commonJS({
4660
4846
  }
4661
4847
  const mergedStream = PassThrough(options);
4662
4848
  function addStream() {
4663
- for (let i = 0, len = arguments.length; i < len; i++) {
4664
- streamsQueue.push(pauseStreams(arguments[i], options));
4849
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
4850
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4665
4851
  }
4666
4852
  mergeStream();
4667
4853
  return this;
@@ -4710,8 +4896,8 @@ var require_merge2 = __commonJS({
4710
4896
  stream.pipe(mergedStream, { end: false });
4711
4897
  stream.resume();
4712
4898
  }
4713
- for (let i = 0; i < streams.length; i++) {
4714
- pipe(streams[i]);
4899
+ for (let i2 = 0; i2 < streams.length; i2++) {
4900
+ pipe(streams[i2]);
4715
4901
  }
4716
4902
  next();
4717
4903
  }
@@ -4742,8 +4928,8 @@ var require_merge2 = __commonJS({
4742
4928
  }
4743
4929
  streams.pause();
4744
4930
  } else {
4745
- for (let i = 0, len = streams.length; i < len; i++) {
4746
- streams[i] = pauseStreams(streams[i], options);
4931
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
4932
+ streams[i2] = pauseStreams(streams[i2], options);
4747
4933
  }
4748
4934
  }
4749
4935
  return streams;
@@ -4825,13 +5011,13 @@ var require_tasks = __commonJS({
4825
5011
  Object.defineProperty(exports, "__esModule", { value: true });
4826
5012
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4827
5013
  var utils = require_utils3();
4828
- function generate(input, settings) {
4829
- const patterns = processPatterns(input, settings);
4830
- const ignore = processPatterns(settings.ignore, settings);
5014
+ function generate(input, settings2) {
5015
+ const patterns = processPatterns(input, settings2);
5016
+ const ignore = processPatterns(settings2.ignore, settings2);
4831
5017
  const positivePatterns = getPositivePatterns(patterns);
4832
5018
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4833
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4834
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5019
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5020
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4835
5021
  const staticTasks = convertPatternsToTasks(
4836
5022
  staticPatterns,
4837
5023
  negativePatterns,
@@ -4847,12 +5033,12 @@ var require_tasks = __commonJS({
4847
5033
  return staticTasks.concat(dynamicTasks);
4848
5034
  }
4849
5035
  exports.generate = generate;
4850
- function processPatterns(input, settings) {
5036
+ function processPatterns(input, settings2) {
4851
5037
  let patterns = input;
4852
- if (settings.braceExpansion) {
5038
+ if (settings2.braceExpansion) {
4853
5039
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4854
5040
  }
4855
- if (settings.baseNameMatch) {
5041
+ if (settings2.baseNameMatch) {
4856
5042
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4857
5043
  }
4858
5044
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4921,26 +5107,26 @@ var require_async = __commonJS({
4921
5107
  init_utils2();
4922
5108
  Object.defineProperty(exports, "__esModule", { value: true });
4923
5109
  exports.read = void 0;
4924
- function read(path, settings, callback) {
4925
- settings.fs.lstat(path, (lstatError, lstat) => {
5110
+ function read(path, settings2, callback) {
5111
+ settings2.fs.lstat(path, (lstatError, lstat) => {
4926
5112
  if (lstatError !== null) {
4927
5113
  callFailureCallback(callback, lstatError);
4928
5114
  return;
4929
5115
  }
4930
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5116
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4931
5117
  callSuccessCallback(callback, lstat);
4932
5118
  return;
4933
5119
  }
4934
- settings.fs.stat(path, (statError, stat) => {
5120
+ settings2.fs.stat(path, (statError, stat) => {
4935
5121
  if (statError !== null) {
4936
- if (settings.throwErrorOnBrokenSymbolicLink) {
5122
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
4937
5123
  callFailureCallback(callback, statError);
4938
5124
  return;
4939
5125
  }
4940
5126
  callSuccessCallback(callback, lstat);
4941
5127
  return;
4942
5128
  }
4943
- if (settings.markSymbolicLink) {
5129
+ if (settings2.markSymbolicLink) {
4944
5130
  stat.isSymbolicLink = () => true;
4945
5131
  }
4946
5132
  callSuccessCallback(callback, stat);
@@ -4964,19 +5150,19 @@ var require_sync = __commonJS({
4964
5150
  init_utils2();
4965
5151
  Object.defineProperty(exports, "__esModule", { value: true });
4966
5152
  exports.read = void 0;
4967
- function read(path, settings) {
4968
- const lstat = settings.fs.lstatSync(path);
4969
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5153
+ function read(path, settings2) {
5154
+ const lstat = settings2.fs.lstatSync(path);
5155
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
4970
5156
  return lstat;
4971
5157
  }
4972
5158
  try {
4973
- const stat = settings.fs.statSync(path);
4974
- if (settings.markSymbolicLink) {
5159
+ const stat = settings2.fs.statSync(path);
5160
+ if (settings2.markSymbolicLink) {
4975
5161
  stat.isSymbolicLink = () => true;
4976
5162
  }
4977
5163
  return stat;
4978
5164
  } catch (error2) {
4979
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5165
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
4980
5166
  return lstat;
4981
5167
  }
4982
5168
  throw error2;
@@ -5053,8 +5239,8 @@ var require_out = __commonJS({
5053
5239
  }
5054
5240
  exports.stat = stat;
5055
5241
  function statSync3(path, optionsOrSettings) {
5056
- const settings = getSettings(optionsOrSettings);
5057
- return sync.read(path, settings);
5242
+ const settings2 = getSettings(optionsOrSettings);
5243
+ return sync.read(path, settings2);
5058
5244
  }
5059
5245
  exports.statSync = statSync3;
5060
5246
  function getSettings(settingsOrOptions = {}) {
@@ -5102,8 +5288,8 @@ var require_run_parallel = __commonJS({
5102
5288
  if (isSync) queueMicrotask2(end);
5103
5289
  else end();
5104
5290
  }
5105
- function each(i, err, result) {
5106
- results[i] = result;
5291
+ function each(i2, err, result) {
5292
+ results[i2] = result;
5107
5293
  if (--pending === 0 || err) {
5108
5294
  done(err);
5109
5295
  }
@@ -5117,9 +5303,9 @@ var require_run_parallel = __commonJS({
5117
5303
  });
5118
5304
  });
5119
5305
  } else {
5120
- tasks.forEach(function(task, i) {
5306
+ tasks.forEach(function(task, i2) {
5121
5307
  task(function(err, result) {
5122
- each(i, err, result);
5308
+ each(i2, err, result);
5123
5309
  });
5124
5310
  });
5125
5311
  }
@@ -5194,11 +5380,11 @@ var require_common = __commonJS({
5194
5380
  init_utils2();
5195
5381
  Object.defineProperty(exports, "__esModule", { value: true });
5196
5382
  exports.joinPathSegments = void 0;
5197
- function joinPathSegments(a, b, separator) {
5198
- if (a.endsWith(separator)) {
5199
- return a + b;
5383
+ function joinPathSegments(a2, b, separator) {
5384
+ if (a2.endsWith(separator)) {
5385
+ return a2 + b;
5200
5386
  }
5201
- return a + separator + b;
5387
+ return a2 + separator + b;
5202
5388
  }
5203
5389
  exports.joinPathSegments = joinPathSegments;
5204
5390
  }
@@ -5216,16 +5402,16 @@ var require_async2 = __commonJS({
5216
5402
  var constants_1 = require_constants3();
5217
5403
  var utils = require_utils4();
5218
5404
  var common = require_common();
5219
- function read(directory, settings, callback) {
5220
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5221
- readdirWithFileTypes(directory, settings, callback);
5405
+ function read(directory, settings2, callback) {
5406
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5407
+ readdirWithFileTypes(directory, settings2, callback);
5222
5408
  return;
5223
5409
  }
5224
- readdir(directory, settings, callback);
5410
+ readdir(directory, settings2, callback);
5225
5411
  }
5226
5412
  exports.read = read;
5227
- function readdirWithFileTypes(directory, settings, callback) {
5228
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5413
+ function readdirWithFileTypes(directory, settings2, callback) {
5414
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5229
5415
  if (readdirError !== null) {
5230
5416
  callFailureCallback(callback, readdirError);
5231
5417
  return;
@@ -5233,13 +5419,13 @@ var require_async2 = __commonJS({
5233
5419
  const entries = dirents.map((dirent) => ({
5234
5420
  dirent,
5235
5421
  name: dirent.name,
5236
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5422
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5237
5423
  }));
5238
- if (!settings.followSymbolicLinks) {
5424
+ if (!settings2.followSymbolicLinks) {
5239
5425
  callSuccessCallback(callback, entries);
5240
5426
  return;
5241
5427
  }
5242
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5428
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5243
5429
  rpl(tasks, (rplError, rplEntries) => {
5244
5430
  if (rplError !== null) {
5245
5431
  callFailureCallback(callback, rplError);
@@ -5250,15 +5436,15 @@ var require_async2 = __commonJS({
5250
5436
  });
5251
5437
  }
5252
5438
  exports.readdirWithFileTypes = readdirWithFileTypes;
5253
- function makeRplTaskEntry(entry, settings) {
5439
+ function makeRplTaskEntry(entry, settings2) {
5254
5440
  return (done) => {
5255
5441
  if (!entry.dirent.isSymbolicLink()) {
5256
5442
  done(null, entry);
5257
5443
  return;
5258
5444
  }
5259
- settings.fs.stat(entry.path, (statError, stats) => {
5445
+ settings2.fs.stat(entry.path, (statError, stats) => {
5260
5446
  if (statError !== null) {
5261
- if (settings.throwErrorOnBrokenSymbolicLink) {
5447
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5262
5448
  done(statError);
5263
5449
  return;
5264
5450
  }
@@ -5270,16 +5456,16 @@ var require_async2 = __commonJS({
5270
5456
  });
5271
5457
  };
5272
5458
  }
5273
- function readdir(directory, settings, callback) {
5274
- settings.fs.readdir(directory, (readdirError, names) => {
5459
+ function readdir(directory, settings2, callback) {
5460
+ settings2.fs.readdir(directory, (readdirError, names) => {
5275
5461
  if (readdirError !== null) {
5276
5462
  callFailureCallback(callback, readdirError);
5277
5463
  return;
5278
5464
  }
5279
5465
  const tasks = names.map((name) => {
5280
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5466
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5281
5467
  return (done) => {
5282
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5468
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5283
5469
  if (error2 !== null) {
5284
5470
  done(error2);
5285
5471
  return;
@@ -5289,7 +5475,7 @@ var require_async2 = __commonJS({
5289
5475
  path,
5290
5476
  dirent: utils.fs.createDirentFromStats(name, stats)
5291
5477
  };
5292
- if (settings.stats) {
5478
+ if (settings2.stats) {
5293
5479
  entry.stats = stats;
5294
5480
  }
5295
5481
  done(null, entry);
@@ -5326,27 +5512,27 @@ var require_sync2 = __commonJS({
5326
5512
  var constants_1 = require_constants3();
5327
5513
  var utils = require_utils4();
5328
5514
  var common = require_common();
5329
- function read(directory, settings) {
5330
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5331
- return readdirWithFileTypes(directory, settings);
5515
+ function read(directory, settings2) {
5516
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5517
+ return readdirWithFileTypes(directory, settings2);
5332
5518
  }
5333
- return readdir(directory, settings);
5519
+ return readdir(directory, settings2);
5334
5520
  }
5335
5521
  exports.read = read;
5336
- function readdirWithFileTypes(directory, settings) {
5337
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5522
+ function readdirWithFileTypes(directory, settings2) {
5523
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5338
5524
  return dirents.map((dirent) => {
5339
5525
  const entry = {
5340
5526
  dirent,
5341
5527
  name: dirent.name,
5342
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5528
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5343
5529
  };
5344
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5530
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5345
5531
  try {
5346
- const stats = settings.fs.statSync(entry.path);
5532
+ const stats = settings2.fs.statSync(entry.path);
5347
5533
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5348
5534
  } catch (error2) {
5349
- if (settings.throwErrorOnBrokenSymbolicLink) {
5535
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5350
5536
  throw error2;
5351
5537
  }
5352
5538
  }
@@ -5355,17 +5541,17 @@ var require_sync2 = __commonJS({
5355
5541
  });
5356
5542
  }
5357
5543
  exports.readdirWithFileTypes = readdirWithFileTypes;
5358
- function readdir(directory, settings) {
5359
- const names = settings.fs.readdirSync(directory);
5544
+ function readdir(directory, settings2) {
5545
+ const names = settings2.fs.readdirSync(directory);
5360
5546
  return names.map((name) => {
5361
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5362
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5547
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5548
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5363
5549
  const entry = {
5364
5550
  name,
5365
5551
  path: entryPath,
5366
5552
  dirent: utils.fs.createDirentFromStats(name, stats)
5367
5553
  };
5368
- if (settings.stats) {
5554
+ if (settings2.stats) {
5369
5555
  entry.stats = stats;
5370
5556
  }
5371
5557
  return entry;
@@ -5452,8 +5638,8 @@ var require_out2 = __commonJS({
5452
5638
  }
5453
5639
  exports.scandir = scandir;
5454
5640
  function scandirSync(path, optionsOrSettings) {
5455
- const settings = getSettings(optionsOrSettings);
5456
- return sync.read(path, settings);
5641
+ const settings2 = getSettings(optionsOrSettings);
5642
+ return sync.read(path, settings2);
5457
5643
  }
5458
5644
  exports.scandirSync = scandirSync;
5459
5645
  function getSettings(settingsOrOptions = {}) {
@@ -5734,7 +5920,7 @@ var require_queue = __commonJS({
5734
5920
  queue.drained = drained;
5735
5921
  return queue;
5736
5922
  function push(value) {
5737
- var p2 = new Promise(function(resolve4, reject) {
5923
+ var p = new Promise(function(resolve4, reject) {
5738
5924
  pushCb(value, function(err, result) {
5739
5925
  if (err) {
5740
5926
  reject(err);
@@ -5743,11 +5929,11 @@ var require_queue = __commonJS({
5743
5929
  resolve4(result);
5744
5930
  });
5745
5931
  });
5746
- p2.catch(noop);
5747
- return p2;
5932
+ p.catch(noop);
5933
+ return p;
5748
5934
  }
5749
5935
  function unshift(value) {
5750
- var p2 = new Promise(function(resolve4, reject) {
5936
+ var p = new Promise(function(resolve4, reject) {
5751
5937
  unshiftCb(value, function(err, result) {
5752
5938
  if (err) {
5753
5939
  reject(err);
@@ -5756,11 +5942,11 @@ var require_queue = __commonJS({
5756
5942
  resolve4(result);
5757
5943
  });
5758
5944
  });
5759
- p2.catch(noop);
5760
- return p2;
5945
+ p.catch(noop);
5946
+ return p;
5761
5947
  }
5762
5948
  function drained() {
5763
- var p2 = new Promise(function(resolve4) {
5949
+ var p = new Promise(function(resolve4) {
5764
5950
  process.nextTick(function() {
5765
5951
  if (queue.idle()) {
5766
5952
  resolve4();
@@ -5774,7 +5960,7 @@ var require_queue = __commonJS({
5774
5960
  }
5775
5961
  });
5776
5962
  });
5777
- return p2;
5963
+ return p;
5778
5964
  }
5779
5965
  }
5780
5966
  module.exports = fastqueue;
@@ -5789,11 +5975,11 @@ var require_common2 = __commonJS({
5789
5975
  init_utils2();
5790
5976
  Object.defineProperty(exports, "__esModule", { value: true });
5791
5977
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5792
- function isFatalError(settings, error2) {
5793
- if (settings.errorFilter === null) {
5978
+ function isFatalError(settings2, error2) {
5979
+ if (settings2.errorFilter === null) {
5794
5980
  return true;
5795
5981
  }
5796
- return !settings.errorFilter(error2);
5982
+ return !settings2.errorFilter(error2);
5797
5983
  }
5798
5984
  exports.isFatalError = isFatalError;
5799
5985
  function isAppliedFilter(filter, value) {
@@ -5804,14 +5990,14 @@ var require_common2 = __commonJS({
5804
5990
  return filepath.split(/[/\\]/).join(separator);
5805
5991
  }
5806
5992
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5807
- function joinPathSegments(a, b, separator) {
5808
- if (a === "") {
5993
+ function joinPathSegments(a2, b, separator) {
5994
+ if (a2 === "") {
5809
5995
  return b;
5810
5996
  }
5811
- if (a.endsWith(separator)) {
5812
- return a + b;
5997
+ if (a2.endsWith(separator)) {
5998
+ return a2 + b;
5813
5999
  }
5814
- return a + separator + b;
6000
+ return a2 + separator + b;
5815
6001
  }
5816
6002
  exports.joinPathSegments = joinPathSegments;
5817
6003
  }
@@ -6158,14 +6344,14 @@ var require_out3 = __commonJS({
6158
6344
  }
6159
6345
  exports.walk = walk;
6160
6346
  function walkSync(directory, optionsOrSettings) {
6161
- const settings = getSettings(optionsOrSettings);
6162
- const provider = new sync_1.default(directory, settings);
6347
+ const settings2 = getSettings(optionsOrSettings);
6348
+ const provider = new sync_1.default(directory, settings2);
6163
6349
  return provider.read();
6164
6350
  }
6165
6351
  exports.walkSync = walkSync;
6166
6352
  function walkStream(directory, optionsOrSettings) {
6167
- const settings = getSettings(optionsOrSettings);
6168
- const provider = new stream_1.default(directory, settings);
6353
+ const settings2 = getSettings(optionsOrSettings);
6354
+ const provider = new stream_1.default(directory, settings2);
6169
6355
  return provider.read();
6170
6356
  }
6171
6357
  exports.walkStream = walkStream;
@@ -6251,8 +6437,8 @@ var require_stream3 = __commonJS({
6251
6437
  done();
6252
6438
  }).catch(done);
6253
6439
  };
6254
- for (let i = 0; i < filepaths.length; i++) {
6255
- stream.write(i);
6440
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6441
+ stream.write(i2);
6256
6442
  }
6257
6443
  return stream;
6258
6444
  }
@@ -6913,14 +7099,14 @@ var require_out4 = __commonJS({
6913
7099
  function generateTasks(source, options) {
6914
7100
  assertPatternsInput(source);
6915
7101
  const patterns = [].concat(source);
6916
- const settings = new settings_1.default(options);
6917
- return taskManager.generate(patterns, settings);
7102
+ const settings2 = new settings_1.default(options);
7103
+ return taskManager.generate(patterns, settings2);
6918
7104
  }
6919
7105
  FastGlob2.generateTasks = generateTasks;
6920
7106
  function isDynamicPattern(source, options) {
6921
7107
  assertPatternsInput(source);
6922
- const settings = new settings_1.default(options);
6923
- return utils.pattern.isDynamicPattern(source, settings);
7108
+ const settings2 = new settings_1.default(options);
7109
+ return utils.pattern.isDynamicPattern(source, settings2);
6924
7110
  }
6925
7111
  FastGlob2.isDynamicPattern = isDynamicPattern;
6926
7112
  function escapePath(source) {
@@ -6962,9 +7148,9 @@ var require_out4 = __commonJS({
6962
7148
  })(FastGlob || (FastGlob = {}));
6963
7149
  function getWorks(source, _Provider, options) {
6964
7150
  const patterns = [].concat(source);
6965
- const settings = new settings_1.default(options);
6966
- const tasks = taskManager.generate(patterns, settings);
6967
- const provider = new _Provider(settings);
7151
+ const settings2 = new settings_1.default(options);
7152
+ const tasks = taskManager.generate(patterns, settings2);
7153
+ const provider = new _Provider(settings2);
6968
7154
  return tasks.map(provider.read, provider);
6969
7155
  }
6970
7156
  function assertPatternsInput(input) {
@@ -7142,8 +7328,8 @@ import "node:fs";
7142
7328
  import { createRequire } from "node:module";
7143
7329
  import {
7144
7330
  resolve,
7145
- join,
7146
- dirname,
7331
+ join as join2,
7332
+ dirname as dirname2,
7147
7333
  relative,
7148
7334
  normalize,
7149
7335
  sep,
@@ -7157,7 +7343,7 @@ function safeExecuteAsync(fn, message) {
7157
7343
  );
7158
7344
  });
7159
7345
  }
7160
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7346
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7161
7347
  var init_PathResolver = __esm({
7162
7348
  "packages/core/config/utils/PathResolver.ts"() {
7163
7349
  "use strict";
@@ -7170,7 +7356,7 @@ var init_PathResolver = __esm({
7170
7356
  getPatternsFor: getPatternsFor || void 0,
7171
7357
  I18N_PATHS: I18N_PATHS || void 0
7172
7358
  };
7173
- log2 = {
7359
+ log3 = {
7174
7360
  error: (message, error2) => {
7175
7361
  },
7176
7362
  warn: (message, error2) => {
@@ -7291,7 +7477,7 @@ var init_PathResolver = __esm({
7291
7477
  */
7292
7478
  getDirname(path) {
7293
7479
  if (!path) return "";
7294
- return this.normalizePath(dirname(path));
7480
+ return this.normalizePath(dirname2(path));
7295
7481
  }
7296
7482
  /**
7297
7483
  * Resolve package path using Node's module resolution
@@ -7303,7 +7489,7 @@ var init_PathResolver = __esm({
7303
7489
  resolvePackage(packageSpecifier, fromPath = null) {
7304
7490
  try {
7305
7491
  const basePath = fromPath || this.getAppRoot();
7306
- const require3 = createRequire(join(basePath, "package.json"));
7492
+ const require3 = createRequire(join2(basePath, "package.json"));
7307
7493
  const resolved = require3.resolve(packageSpecifier);
7308
7494
  return this.normalizePath(resolved);
7309
7495
  } catch (error2) {
@@ -7455,7 +7641,7 @@ var init_PathResolver = __esm({
7455
7641
  return cleanContent;
7456
7642
  } catch (error2) {
7457
7643
  if (this.options.debug) {
7458
- log2.warn(`Failed to read file: ${filePath}`, error2);
7644
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7459
7645
  }
7460
7646
  return null;
7461
7647
  }
@@ -7483,7 +7669,7 @@ var init_PathResolver = __esm({
7483
7669
  return cleanContent;
7484
7670
  } catch (error2) {
7485
7671
  if (this.options.debug) {
7486
- log2.warn(`Failed to read file: ${filePath}`, error2);
7672
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7487
7673
  }
7488
7674
  return null;
7489
7675
  }
@@ -7505,16 +7691,16 @@ var init_PathResolver = __esm({
7505
7691
  verbose = false
7506
7692
  } = options;
7507
7693
  const normalizedPath = this.normalizePath(filePath);
7508
- const dir = this.normalizePath(dirname(normalizedPath));
7694
+ const dir = this.normalizePath(dirname2(normalizedPath));
7509
7695
  const fileExists = this.pathExists(normalizedPath);
7510
7696
  if (fileExists && !overwrite) {
7511
7697
  if (verbose) {
7512
- log2.info(`Skipping existing file: ${normalizedPath}`);
7698
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7513
7699
  }
7514
7700
  return false;
7515
7701
  }
7516
7702
  if (dryRun) {
7517
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7703
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7518
7704
  return true;
7519
7705
  }
7520
7706
  try {
@@ -7539,7 +7725,7 @@ var init_PathResolver = __esm({
7539
7725
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7540
7726
  }
7541
7727
  if (verbose) {
7542
- log2.info(
7728
+ log3.info(
7543
7729
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7544
7730
  );
7545
7731
  }
@@ -7566,16 +7752,16 @@ var init_PathResolver = __esm({
7566
7752
  verbose = false
7567
7753
  } = options;
7568
7754
  const normalizedPath = this.normalizePath(filePath);
7569
- const dir = this.normalizePath(dirname(normalizedPath));
7755
+ const dir = this.normalizePath(dirname2(normalizedPath));
7570
7756
  const fileExists = this.pathExists(normalizedPath);
7571
7757
  if (fileExists && !overwrite) {
7572
7758
  if (verbose) {
7573
- log2.info(`Skipping existing file: ${normalizedPath}`);
7759
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7574
7760
  }
7575
7761
  return false;
7576
7762
  }
7577
7763
  if (dryRun) {
7578
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7764
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7579
7765
  return true;
7580
7766
  }
7581
7767
  try {
@@ -7599,7 +7785,7 @@ var init_PathResolver = __esm({
7599
7785
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7600
7786
  }
7601
7787
  if (verbose) {
7602
- log2.info(
7788
+ log3.info(
7603
7789
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7604
7790
  );
7605
7791
  }
@@ -7624,15 +7810,15 @@ var init_PathResolver = __esm({
7624
7810
  const fileExists = this.pathExists(normalizedDestPath);
7625
7811
  if (fileExists && !overwrite) {
7626
7812
  if (verbose) {
7627
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7813
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7628
7814
  }
7629
7815
  return false;
7630
7816
  }
7631
7817
  if (dryRun) {
7632
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7818
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7633
7819
  return true;
7634
7820
  }
7635
- const dir = this.normalizePath(dirname(normalizedDestPath));
7821
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7636
7822
  try {
7637
7823
  await fs.promises.mkdir(dir, { recursive: true });
7638
7824
  } catch (error2) {
@@ -7642,7 +7828,7 @@ var init_PathResolver = __esm({
7642
7828
  return await safeExecuteAsync(async () => {
7643
7829
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7644
7830
  if (verbose) {
7645
- log2.info(
7831
+ log3.info(
7646
7832
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7647
7833
  );
7648
7834
  }
@@ -7666,15 +7852,15 @@ var init_PathResolver = __esm({
7666
7852
  const fileExists = this.pathExists(normalizedDestPath);
7667
7853
  if (fileExists && !overwrite) {
7668
7854
  if (verbose) {
7669
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7855
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7670
7856
  }
7671
7857
  return false;
7672
7858
  }
7673
7859
  if (dryRun) {
7674
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7860
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7675
7861
  return true;
7676
7862
  }
7677
- const dir = this.normalizePath(dirname(normalizedDestPath));
7863
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7678
7864
  try {
7679
7865
  fs.mkdirSync(dir, { recursive: true });
7680
7866
  } catch (error2) {
@@ -7683,7 +7869,7 @@ var init_PathResolver = __esm({
7683
7869
  try {
7684
7870
  fs.copyFileSync(srcPath, normalizedDestPath);
7685
7871
  if (verbose) {
7686
- log2.info(
7872
+ log3.info(
7687
7873
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7688
7874
  );
7689
7875
  }
@@ -7700,7 +7886,7 @@ var init_PathResolver = __esm({
7700
7886
  return fs.existsSync(filePath);
7701
7887
  } catch (error2) {
7702
7888
  if (!silent) {
7703
- log2.error(`Error checking path existence: ${filePath}`, error2);
7889
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7704
7890
  }
7705
7891
  return false;
7706
7892
  }
@@ -7726,7 +7912,7 @@ var init_PathResolver = __esm({
7726
7912
  return fs.readdirSync(dirPath, options);
7727
7913
  } catch (error2) {
7728
7914
  if (this.options.debug) {
7729
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
7915
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7730
7916
  }
7731
7917
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7732
7918
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7744,7 +7930,7 @@ var init_PathResolver = __esm({
7744
7930
  return fs.statSync(filePath);
7745
7931
  } catch (error2) {
7746
7932
  if (this.options.debug) {
7747
- log2.warn(`Failed to stat file: ${filePath}`, error2);
7933
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7748
7934
  }
7749
7935
  return null;
7750
7936
  }
@@ -7761,7 +7947,7 @@ var init_PathResolver = __esm({
7761
7947
  return fs.lstatSync(filePath);
7762
7948
  } catch (error2) {
7763
7949
  if (this.options.debug) {
7764
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
7950
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7765
7951
  }
7766
7952
  return null;
7767
7953
  }
@@ -7850,7 +8036,7 @@ var init_PathResolver = __esm({
7850
8036
  * @returns True if repoRoot is the monorepo (has packages directory)
7851
8037
  */
7852
8038
  isMonorepo() {
7853
- const packagesDir = join(this._repoRoot, "packages");
8039
+ const packagesDir = join2(this._repoRoot, "packages");
7854
8040
  return this.pathExists(packagesDir);
7855
8041
  }
7856
8042
  /**
@@ -7867,7 +8053,7 @@ var init_PathResolver = __esm({
7867
8053
  * Find files matching pattern within directory
7868
8054
  */
7869
8055
  async findFiles(directory, pattern, options = {}) {
7870
- const searchPattern = this.normalizePath(join(directory, pattern));
8056
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7871
8057
  const appRoot = this.getAppRoot();
7872
8058
  const normalizeAppRoot = this.normalizePath(appRoot);
7873
8059
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -7914,7 +8100,7 @@ var init_PathResolver = __esm({
7914
8100
  return null;
7915
8101
  }
7916
8102
  const resolvedPath = this.normalizePath(
7917
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8103
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
7918
8104
  );
7919
8105
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
7920
8106
  if (this.pathExists(resolvedDir)) {
@@ -8110,13 +8296,13 @@ var init_PathResolver = __esm({
8110
8296
  const maxLevels = this.options.maxLevels;
8111
8297
  while (levelsChecked < maxLevels) {
8112
8298
  const toolingPath = this.normalizePath(
8113
- join(currentDir, PACKAGE_PATHS.TOOLING)
8299
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8114
8300
  );
8115
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8301
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8116
8302
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8117
8303
  return currentDir;
8118
8304
  }
8119
- const appsDir = join(currentDir, "apps");
8305
+ const appsDir = join2(currentDir, "apps");
8120
8306
  if (this.pathExists(appsDir)) {
8121
8307
  const appsDirStat = this.statSync(appsDir);
8122
8308
  if (appsDirStat?.isDirectory()) {
@@ -8124,15 +8310,15 @@ var init_PathResolver = __esm({
8124
8310
  }
8125
8311
  }
8126
8312
  const packageJsonPath = this.normalizePath(
8127
- join(currentDir, "package.json")
8313
+ join2(currentDir, "package.json")
8128
8314
  );
8129
8315
  if (this.pathExists(packageJsonPath)) {
8130
- const parentDir2 = this.normalizePath(dirname(currentDir));
8316
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8131
8317
  if (parentDir2 === currentDir) {
8132
8318
  return currentDir;
8133
8319
  }
8134
8320
  }
8135
- const parentDir = this.normalizePath(dirname(currentDir));
8321
+ const parentDir = this.normalizePath(dirname2(currentDir));
8136
8322
  if (parentDir === currentDir) {
8137
8323
  break;
8138
8324
  }
@@ -8148,8 +8334,8 @@ var init_PathResolver = __esm({
8148
8334
  // packages/tooling/src/utils/pathResolver.ts
8149
8335
  import { createRequire as createRequire2 } from "node:module";
8150
8336
  import {
8151
- join as join2,
8152
- dirname as dirname2,
8337
+ join as join3,
8338
+ dirname as dirname3,
8153
8339
  basename as basename2,
8154
8340
  extname as extname2,
8155
8341
  relative as relative2,
@@ -8158,7 +8344,7 @@ import {
8158
8344
  isAbsolute as pathIsAbsolute
8159
8345
  } from "node:path";
8160
8346
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8161
- function readdirSync2(dirPath, options) {
8347
+ function readdirSync3(dirPath, options) {
8162
8348
  return pathResolverInstance.readdirSync(dirPath, options);
8163
8349
  }
8164
8350
  var pathResolverInstance, getRepoRoot, normalizePath, pathExists, readSync, statSync2, joinPath;
@@ -8170,7 +8356,7 @@ var init_pathResolver = __esm({
8170
8356
  pathResolverInstance = PathResolver.getInstance({ debug: false });
8171
8357
  getRepoRoot = () => pathResolverInstance.getRepoRoot();
8172
8358
  normalizePath = (...pathSegments) => {
8173
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8359
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8174
8360
  };
8175
8361
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8176
8362
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -8213,7 +8399,7 @@ var init_typed_file_operations = __esm({
8213
8399
  import { Buffer } from "node:buffer";
8214
8400
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8215
8401
  import { createRequire as createRequire3 } from "node:module";
8216
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8402
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8217
8403
  import process from "node:process";
8218
8404
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8219
8405
  var require2, __filename, __dirname;
@@ -8222,7 +8408,7 @@ var init_utils2 = __esm({
8222
8408
  "use strict";
8223
8409
  require2 = createRequire3(import.meta.url);
8224
8410
  __filename = fileURLToPath3(import.meta.url);
8225
- __dirname = dirname3(__filename);
8411
+ __dirname = dirname4(__filename);
8226
8412
  if (typeof globalThis !== "undefined") {
8227
8413
  globalThis.require = require2;
8228
8414
  globalThis.__filename = __filename;
@@ -8242,7 +8428,7 @@ function detectApps(projectRoot) {
8242
8428
  const appsDir = joinPath(projectRoot, "apps");
8243
8429
  const appsDirStat = statSync2(appsDir);
8244
8430
  if (pathExists(appsDir) && appsDirStat?.isDirectory()) {
8245
- const appDirs = readdirSync2(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8431
+ const appDirs = readdirSync3(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8246
8432
  for (const appDir of appDirs) {
8247
8433
  const appPath = joinPath(appsDir, appDir);
8248
8434
  const packageJsonPath = joinPath(appPath, "package.json");
@@ -8419,17 +8605,17 @@ var init_app_detection = __esm({
8419
8605
  async function selectApp(projectRoot, appName) {
8420
8606
  const apps = detectApps(projectRoot);
8421
8607
  if (apps.length === 0) {
8422
- log.error("No apps found in this project.");
8423
- log.info('Run "dndev init" to create a new project.');
8608
+ log2.error("No apps found in this project.");
8609
+ log2.info('Run "dndev init" to create a new project.');
8424
8610
  return null;
8425
8611
  }
8426
8612
  if (appName) {
8427
- const app = apps.find((a) => a.name === appName);
8613
+ const app = apps.find((a2) => a2.name === appName);
8428
8614
  if (!app) {
8429
- log.warn(`App "${appName}" not found.`);
8430
- log.info("Available apps:");
8431
- apps.forEach((a) => log.info(` - ${a.name}`));
8432
- log.info("Please select from the list:");
8615
+ log2.warn(`App "${appName}" not found.`);
8616
+ log2.info("Available apps:");
8617
+ apps.forEach((a2) => log2.info(` - ${a2.name}`));
8618
+ log2.info("Please select from the list:");
8433
8619
  } else {
8434
8620
  return app;
8435
8621
  }
@@ -8437,7 +8623,7 @@ async function selectApp(projectRoot, appName) {
8437
8623
  if (apps.length === 1) {
8438
8624
  return apps[0] || null;
8439
8625
  }
8440
- const selected = await _t({
8626
+ const selected = await select({
8441
8627
  message: "Select app:",
8442
8628
  options: apps.map((app) => ({
8443
8629
  value: app.name,
@@ -8447,7 +8633,7 @@ async function selectApp(projectRoot, appName) {
8447
8633
  if (typeof selected !== "string") {
8448
8634
  return null;
8449
8635
  }
8450
- return apps.find((a) => a.name === selected) || null;
8636
+ return apps.find((a2) => a2.name === selected) || null;
8451
8637
  }
8452
8638
  var init_app_selector = __esm({
8453
8639
  "packages/tooling/src/utils/app-selector.ts"() {
@@ -8520,7 +8706,7 @@ async function main() {
8520
8706
  if (!app) {
8521
8707
  return 1;
8522
8708
  }
8523
- log.info(`Starting dev server for ${app.name}...
8709
+ log2.info(`Starting dev server for ${app.name}...
8524
8710
  `);
8525
8711
  const turboArgs = ["dev", "--filter", app.packageName];
8526
8712
  const isWindows = platform2() === "win32";
@@ -8535,7 +8721,7 @@ async function main() {
8535
8721
  );
8536
8722
  const cleanup = (signal) => {
8537
8723
  if (!childProcess.pid) return;
8538
- log.debug(`Received ${signal}, cleaning up processes...`);
8724
+ log2.debug(`Received ${signal}, cleaning up processes...`);
8539
8725
  if (isWindows) {
8540
8726
  try {
8541
8727
  execSync2(`taskkill /F /T /PID ${childProcess.pid}`, {
@@ -8563,7 +8749,7 @@ async function main() {
8563
8749
  for (const signal of signals) {
8564
8750
  const handler = () => {
8565
8751
  cleanup(signal);
8566
- handlers.forEach((h) => h());
8752
+ handlers.forEach((h2) => h2());
8567
8753
  process.exit(SIGNAL_EXIT_CODES[signal] ?? 130);
8568
8754
  };
8569
8755
  process.on(signal, handler);
@@ -8571,17 +8757,17 @@ async function main() {
8571
8757
  }
8572
8758
  return new Promise((resolve4) => {
8573
8759
  childProcess.on("exit", (code, signal) => {
8574
- handlers.forEach((h) => h());
8760
+ handlers.forEach((h2) => h2());
8575
8761
  if (signal) {
8576
- log.debug(`Process killed by signal: ${signal}`);
8762
+ log2.debug(`Process killed by signal: ${signal}`);
8577
8763
  resolve4(SIGNAL_EXIT_CODES[signal] ?? 130);
8578
8764
  } else {
8579
8765
  resolve4(code ?? 0);
8580
8766
  }
8581
8767
  });
8582
8768
  childProcess.on("error", (error2) => {
8583
- handlers.forEach((h) => h());
8584
- log.error(`Failed to start dev server: ${error2.message}`);
8769
+ handlers.forEach((h2) => h2());
8770
+ log2.error(`Failed to start dev server: ${error2.message}`);
8585
8771
  resolve4(1);
8586
8772
  });
8587
8773
  });