@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;
130
+ if (index >= length) {
131
+ break outer;
134
132
  }
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;
183
- }
184
- EMOJI_RE.lastIndex = index;
185
- if (EMOJI_RE.test(input)) {
186
- if (width + EMOJI_WIDTH > truncationLimit) {
187
- truncationIndex = Math.min(truncationIndex, index);
188
- }
189
- if (width + EMOJI_WIDTH > LIMIT) {
190
- truncationEnabled = true;
191
- break;
133
+ for (let i2 = 0, l2 = PARSE_BLOCKS.length; i2 < l2; i2++) {
134
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
135
+ BLOCK_RE.lastIndex = index;
136
+ if (BLOCK_RE.test(input)) {
137
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
138
+ widthExtra = lengthExtra * BLOCK_WIDTH;
139
+ if (width + widthExtra > truncationLimit) {
140
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
141
+ }
142
+ if (width + widthExtra > LIMIT) {
143
+ truncationEnabled = true;
144
+ break outer;
145
+ }
146
+ width += widthExtra;
147
+ unmatchedStart = indexPrev;
148
+ unmatchedEnd = index;
149
+ index = indexPrev = BLOCK_RE.lastIndex;
150
+ continue outer;
192
151
  }
193
- width += EMOJI_WIDTH;
194
- unmatchedStart = indexPrev;
195
- unmatchedEnd = index;
196
- index = indexPrev = EMOJI_RE.lastIndex;
197
- continue;
198
152
  }
199
153
  index += 1;
200
154
  }
@@ -209,10 +163,10 @@ var init_dist = __esm({
209
163
  }
210
164
  });
211
165
 
212
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
166
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
213
167
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
214
168
  var init_dist2 = __esm({
215
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
169
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
216
170
  init_utils2();
217
171
  init_dist();
218
172
  NO_TRUNCATION2 = {
@@ -227,13 +181,13 @@ var init_dist2 = __esm({
227
181
  }
228
182
  });
229
183
 
230
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
184
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
231
185
  function wrapAnsi(string, columns, options) {
232
186
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
233
187
  }
234
188
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
235
189
  var init_main = __esm({
236
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
190
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
237
191
  init_utils2();
238
192
  init_dist2();
239
193
  ESC = "\x1B";
@@ -397,16 +351,19 @@ var init_main = __esm({
397
351
  }
398
352
  const preString = rows.join("\n");
399
353
  let inSurrogate = false;
400
- for (let i = 0; i < preString.length; i++) {
401
- const character = preString[i];
354
+ for (let i2 = 0; i2 < preString.length; i2++) {
355
+ const character = preString[i2];
402
356
  returnValue += character;
403
357
  if (!inSurrogate) {
404
358
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
359
+ if (inSurrogate) {
360
+ continue;
361
+ }
405
362
  } else {
406
- continue;
363
+ inSurrogate = false;
407
364
  }
408
365
  if (character === ESC || character === CSI) {
409
- GROUP_REGEX.lastIndex = i + 1;
366
+ GROUP_REGEX.lastIndex = i2 + 1;
410
367
  const groupsResult = GROUP_REGEX.exec(preString);
411
368
  const groups = groupsResult?.groups;
412
369
  if (groups?.code !== void 0) {
@@ -416,7 +373,7 @@ var init_main = __esm({
416
373
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
417
374
  }
418
375
  }
419
- if (preString[i + 1] === "\n") {
376
+ if (preString[i2 + 1] === "\n") {
420
377
  if (escapeUrl) {
421
378
  returnValue += wrapAnsiHyperlink("");
422
379
  }
@@ -447,7 +404,7 @@ var require_src = __commonJS({
447
404
  var ESC2 = "\x1B";
448
405
  var CSI2 = `${ESC2}[`;
449
406
  var beep = "\x07";
450
- var cursor = {
407
+ var cursor3 = {
451
408
  to(x, y2) {
452
409
  if (!y2) return `${CSI2}${x + 1}G`;
453
410
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -476,7 +433,7 @@ var require_src = __commonJS({
476
433
  up: (count = 1) => `${CSI2}S`.repeat(count),
477
434
  down: (count = 1) => `${CSI2}T`.repeat(count)
478
435
  };
479
- var erase = {
436
+ var erase3 = {
480
437
  screen: `${CSI2}2J`,
481
438
  up: (count = 1) => `${CSI2}1J`.repeat(count),
482
439
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -485,89 +442,169 @@ var require_src = __commonJS({
485
442
  lineStart: `${CSI2}1K`,
486
443
  lines(count) {
487
444
  let clear = "";
488
- for (let i = 0; i < count; i++)
489
- clear += this.line + (i < count - 1 ? cursor.up() : "");
445
+ for (let i2 = 0; i2 < count; i2++)
446
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
490
447
  if (count)
491
- clear += cursor.left;
448
+ clear += cursor3.left;
492
449
  return clear;
493
450
  }
494
451
  };
495
- module.exports = { cursor, scroll, erase, beep };
452
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
496
453
  }
497
454
  });
498
455
 
499
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
500
- import { styleText as y } from "node:util";
501
- import { stdout as S, stdin as $ } from "node:process";
502
- import * as _ from "node:readline";
503
- import P from "node:readline";
504
- import { ReadStream as D } from "node:tty";
505
- function d(r, t2, e) {
506
- if (!e.some((o) => !o.disabled)) return r;
507
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
508
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
456
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
457
+ import { styleText } from "node:util";
458
+ import { stdout, stdin } from "node:process";
459
+ import * as l from "node:readline";
460
+ import l__default from "node:readline";
461
+ import { ReadStream } from "node:tty";
462
+ function findCursor(s, o, l2) {
463
+ if (!l2.some((r2) => !r2.disabled))
464
+ return s;
465
+ const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
466
+ return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
467
+ }
468
+ function isAccessible(n3) {
469
+ if (n3 !== void 0) return n3;
470
+ if (settings.accessible !== void 0) return settings.accessible;
471
+ const e = process.env.ACCESSIBLE;
472
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
509
473
  }
510
- function V(r, t2) {
511
- if (typeof r == "string") return u.aliases.get(r) === t2;
512
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
474
+ function isActionKey(n3, e) {
475
+ if (typeof n3 == "string")
476
+ return settings.aliases.get(n3) === e;
477
+ for (const s of n3)
478
+ if (s !== void 0 && isActionKey(s, e))
479
+ return true;
513
480
  return false;
514
481
  }
515
- function j(r, t2) {
516
- if (r === t2) return;
517
- const e = r.split(`
518
- `), s = t2.split(`
519
- `), i = Math.max(e.length, s.length), n = [];
520
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
521
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
482
+ function diffLines(i2, s) {
483
+ if (i2 === s) return;
484
+ const e = i2.split(`
485
+ `), t2 = s.split(`
486
+ `), r2 = Math.max(e.length, t2.length), f = [];
487
+ for (let n3 = 0; n3 < r2; n3++)
488
+ e[n3] !== t2[n3] && f.push(n3);
489
+ return {
490
+ lines: f,
491
+ numLinesBefore: e.length,
492
+ numLinesAfter: t2.length,
493
+ numLines: r2
494
+ };
522
495
  }
523
- function q(r) {
524
- return r === C;
496
+ function isCancel(e) {
497
+ return e === CANCEL_SYMBOL;
525
498
  }
526
- function w(r, t2) {
527
- const e = r;
528
- e.isTTY && e.setRawMode(t2);
499
+ function setRawMode(e, r2) {
500
+ const o = e;
501
+ o.isTTY && o.setRawMode(r2);
529
502
  }
530
- function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
531
- const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
532
- _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
533
- const n = (o, { name: a, sequence: h }) => {
534
- const l = String(o);
535
- if (V([l, a, h], "cancel")) {
536
- s && t2.write(import_sisteransi.cursor.show), process.exit(0);
503
+ function block({
504
+ input: e = stdin,
505
+ output: r2 = stdout,
506
+ overwrite: o = true,
507
+ hideCursor: n3 = true
508
+ } = {}) {
509
+ const s = l.createInterface({
510
+ input: e,
511
+ output: r2,
512
+ prompt: "",
513
+ tabSize: 1
514
+ });
515
+ l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
516
+ const t2 = (f, { name: a2, sequence: w }) => {
517
+ const c2 = String(f);
518
+ if (isActionKey([c2, a2, w], "cancel")) {
519
+ n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
537
520
  return;
538
521
  }
539
- if (!e) return;
540
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
541
- _.moveCursor(t2, f, v, () => {
542
- _.clearLine(t2, 1, () => {
543
- r.once("keypress", n);
522
+ if (!o) return;
523
+ const i2 = a2 === "return" ? 0 : -1, m = a2 === "return" ? -1 : 0;
524
+ l.moveCursor(r2, i2, m, () => {
525
+ l.clearLine(r2, 1, () => {
526
+ e.once("keypress", t2);
544
527
  });
545
528
  });
546
529
  };
547
- return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
548
- r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
530
+ return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
531
+ e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
549
532
  };
550
533
  }
551
- function R(r, t2, e, s = e) {
552
- const i = O(r ?? S);
553
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
554
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
534
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
535
+ const f = getColumns(e ?? stdout);
536
+ return wrapAnsi(r2, f - o.length, {
537
+ hard: true,
538
+ trim: false
539
+ }).split(`
540
+ `).map((c2, i2, m) => {
541
+ const d = t2 ? t2(c2, i2) : c2;
542
+ return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
543
+ }).join(`
555
544
  `);
556
545
  }
557
- var import_sisteransi, E, G, u, Y, C, O, A, p, Q, nt;
546
+ function runValidation(e, a2) {
547
+ if ("~standard" in e) {
548
+ const n3 = e["~standard"].validate(a2);
549
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
550
+ }
551
+ return e(a2);
552
+ }
553
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, r, n$1;
558
554
  var init_dist3 = __esm({
559
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
555
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
560
556
  init_utils2();
561
557
  init_main();
562
558
  import_sisteransi = __toESM(require_src(), 1);
563
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
564
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
565
- u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
566
- Y = globalThis.process.platform.startsWith("win");
567
- C = /* @__PURE__ */ Symbol("clack:cancel");
568
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
569
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
570
- p = class {
559
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
560
+ t = [
561
+ "January",
562
+ "February",
563
+ "March",
564
+ "April",
565
+ "May",
566
+ "June",
567
+ "July",
568
+ "August",
569
+ "September",
570
+ "October",
571
+ "November",
572
+ "December"
573
+ ];
574
+ settings = {
575
+ actions: new Set(a$1),
576
+ aliases: /* @__PURE__ */ new Map([
577
+ // vim support
578
+ ["k", "up"],
579
+ ["j", "down"],
580
+ ["h", "left"],
581
+ ["l", "right"],
582
+ ["", "cancel"],
583
+ // opinionated defaults!
584
+ ["escape", "cancel"]
585
+ ]),
586
+ messages: {
587
+ cancel: "Canceled",
588
+ error: "Something went wrong"
589
+ },
590
+ withGuide: true,
591
+ accessible: void 0,
592
+ date: {
593
+ monthNames: [...t],
594
+ messages: {
595
+ required: "Please enter a valid date",
596
+ invalidMonth: "There are only 12 months in a year",
597
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
598
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
599
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
600
+ }
601
+ }
602
+ };
603
+ R = globalThis.process.platform.startsWith("win");
604
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
605
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
606
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
607
+ y = class {
571
608
  input;
572
609
  output;
573
610
  _abortSignal;
@@ -582,46 +619,92 @@ var init_dist3 = __esm({
582
619
  error = "";
583
620
  value;
584
621
  userInput = "";
622
+ /**
623
+ * Whether accessible (static, screen-reader friendly) output is enabled for
624
+ * this prompt, resolved from the `accessible` option, the global setting,
625
+ * and the `ACCESSIBLE` env var.
626
+ */
627
+ get accessible() {
628
+ return isAccessible(this.opts.accessible);
629
+ }
585
630
  constructor(t2, e = true) {
586
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
587
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
631
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
632
+ this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n3, this.input = i2, this.output = s;
588
633
  }
634
+ /**
635
+ * Unsubscribe all listeners
636
+ */
589
637
  unsubscribe() {
590
638
  this._subscribers.clear();
591
639
  }
640
+ /**
641
+ * Set a subscriber with opts
642
+ * @param event - The event name
643
+ */
592
644
  setSubscriber(t2, e) {
593
- const s = this._subscribers.get(t2) ?? [];
594
- s.push(e), this._subscribers.set(t2, s);
645
+ const i2 = this._subscribers.get(t2) ?? [];
646
+ i2.push(e), this._subscribers.set(t2, i2);
595
647
  }
648
+ /**
649
+ * Subscribe to an event
650
+ * @param event - The event name
651
+ * @param cb - The callback
652
+ */
596
653
  on(t2, e) {
597
654
  this.setSubscriber(t2, { cb: e });
598
655
  }
656
+ /**
657
+ * Subscribe to an event once
658
+ * @param event - The event name
659
+ * @param cb - The callback
660
+ */
599
661
  once(t2, e) {
600
662
  this.setSubscriber(t2, { cb: e, once: true });
601
663
  }
664
+ /**
665
+ * Emit an event with data
666
+ * @param event - The event name
667
+ * @param data - The data to pass to the callback
668
+ */
602
669
  emit(t2, ...e) {
603
- const s = this._subscribers.get(t2) ?? [], i = [];
604
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
605
- for (const n of i) n();
670
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
671
+ for (const r2 of i2)
672
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
673
+ for (const r2 of s)
674
+ r2();
606
675
  }
607
676
  prompt() {
608
677
  return new Promise((t2) => {
609
678
  if (this._abortSignal) {
610
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
611
- this._abortSignal.addEventListener("abort", () => {
612
- this.state = "cancel", this.close();
613
- }, { once: true });
679
+ if (this._abortSignal.aborted)
680
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
681
+ this._abortSignal.addEventListener(
682
+ "abort",
683
+ () => {
684
+ this.state = "cancel", this.close();
685
+ },
686
+ { once: true }
687
+ );
614
688
  }
615
- this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
616
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
689
+ this.rl = l__default.createInterface({
690
+ input: this.input,
691
+ tabSize: 2,
692
+ prompt: "",
693
+ escapeCodeTimeout: 50,
694
+ terminal: true
695
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
696
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
617
697
  }), this.once("cancel", () => {
618
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
698
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
619
699
  });
620
700
  });
621
701
  }
622
702
  _isActionKey(t2, e) {
623
703
  return t2 === " ";
624
704
  }
705
+ _shouldSubmit(t2, e) {
706
+ return true;
707
+ }
625
708
  _setValue(t2) {
626
709
  this.value = t2, this.emit("value", this.value);
627
710
  }
@@ -631,19 +714,22 @@ var init_dist3 = __esm({
631
714
  _clearUserInput() {
632
715
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
633
716
  }
634
- onKeypress(t2, e) {
635
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
636
- if (this.opts.validate) {
637
- const s = this.opts.validate(this.value);
638
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
717
+ async onKeypress(t2, e) {
718
+ if (this.state !== "validating") {
719
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
720
+ if (this.opts.validate) {
721
+ const i2 = runValidation(this.opts.validate, this.value);
722
+ let s;
723
+ i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
724
+ }
725
+ this.state !== "error" && (this.state = "submit");
639
726
  }
640
- this.state !== "error" && (this.state = "submit");
727
+ isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
641
728
  }
642
- V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
643
729
  }
644
730
  close() {
645
731
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
646
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
732
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
647
733
  }
648
734
  restoreCursor() {
649
735
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -651,34 +737,39 @@ var init_dist3 = __esm({
651
737
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
652
738
  }
653
739
  render() {
654
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
740
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
741
+ hard: true,
742
+ trim: false
743
+ });
655
744
  if (t2 !== this._prevFrame) {
656
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
745
+ if (this.state === "initial")
746
+ this.output.write(import_sisteransi.cursor.hide);
657
747
  else {
658
- const e = j(this._prevFrame, t2), s = A(this.output);
748
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
659
749
  if (this.restoreCursor(), e) {
660
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
661
- let o = e.lines.find((a) => a >= i);
662
- if (o === void 0) {
750
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
751
+ let n3 = e.lines.find((o) => o >= s);
752
+ if (n3 === void 0) {
663
753
  this._prevFrame = t2;
664
754
  return;
665
755
  }
666
756
  if (e.lines.length === 1) {
667
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
668
- const a = t2.split(`
757
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
758
+ const o = t2.split(`
669
759
  `);
670
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
760
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
671
761
  return;
672
762
  } else if (e.lines.length > 1) {
673
- if (i < n) o = i;
763
+ if (s < r2)
764
+ n3 = s;
674
765
  else {
675
- const h = o - n;
676
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
766
+ const h2 = n3 - r2;
767
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
677
768
  }
678
769
  this.output.write(import_sisteransi.erase.down());
679
- const a = t2.split(`
680
- `).slice(o);
681
- this.output.write(a.join(`
770
+ const f = t2.split(`
771
+ `).slice(n3);
772
+ this.output.write(f.join(`
682
773
  `)), this._prevFrame = t2;
683
774
  return;
684
775
  }
@@ -689,7 +780,7 @@ var init_dist3 = __esm({
689
780
  }
690
781
  }
691
782
  };
692
- Q = class extends p {
783
+ r = class extends y {
693
784
  get cursor() {
694
785
  return this.value ? 0 : 1;
695
786
  }
@@ -699,34 +790,35 @@ var init_dist3 = __esm({
699
790
  constructor(t2) {
700
791
  super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
701
792
  this.value = this._value;
702
- }), this.on("confirm", (e) => {
703
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
793
+ }), this.on("confirm", (i2) => {
794
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
704
795
  }), this.on("cursor", () => {
705
796
  this.value = !this.value;
706
797
  });
707
798
  }
708
799
  };
709
- nt = class extends p {
800
+ n$1 = class n extends y {
710
801
  options;
711
802
  cursor = 0;
712
803
  get _selectedValue() {
713
804
  return this.options[this.cursor];
714
805
  }
715
806
  changeValue() {
716
- this.value = this._selectedValue.value;
717
- }
718
- constructor(t2) {
719
- super(t2, false), this.options = t2.options;
720
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
721
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
722
- switch (i) {
807
+ const e = this._selectedValue;
808
+ this.value = e === void 0 ? void 0 : e.value;
809
+ }
810
+ constructor(e) {
811
+ super(e, false), this.options = e.options;
812
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
813
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
814
+ switch (s) {
723
815
  case "left":
724
816
  case "up":
725
- this.cursor = d(this.cursor, -1, this.options);
817
+ this.cursor = findCursor(this.cursor, -1, this.options);
726
818
  break;
727
819
  case "down":
728
820
  case "right":
729
- this.cursor = d(this.cursor, 1, this.options);
821
+ this.cursor = findCursor(this.cursor, 1, this.options);
730
822
  break;
731
823
  }
732
824
  this.changeValue();
@@ -736,299 +828,456 @@ var init_dist3 = __esm({
736
828
  }
737
829
  });
738
830
 
739
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
740
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
741
- import P2 from "node:process";
742
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
743
- import { dirname as be, join as Qe } from "node:path";
744
- function Ze() {
745
- 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";
831
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
832
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
833
+ import process$1 from "node:process";
834
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
835
+ import { dirname, join } from "node:path";
836
+ function isUnicodeSupported() {
837
+ if (process$1.platform !== "win32") {
838
+ return process$1.env.TERM !== "linux";
839
+ }
840
+ 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";
841
+ }
842
+ function formatInstructionFooter(o, e) {
843
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
844
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
746
845
  }
747
- var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, ot2, O2, pt, mt, gt, ft, vt, wt, Ct, fe, Ve, re, _t, je;
846
+ var import_sisteransi2, unicode, isCI, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, log, cancel, intro, outro, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, c, select, i;
748
847
  var init_dist4 = __esm({
749
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
848
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
750
849
  init_utils2();
751
850
  init_dist3();
752
851
  init_dist3();
753
852
  init_main();
754
853
  init_dist2();
755
854
  import_sisteransi2 = __toESM(require_src(), 1);
756
- ee = Ze();
757
- ae = () => process.env.CI === "true";
758
- w2 = (e, i) => ee ? e : i;
759
- _e = w2("\u25C6", "*");
760
- oe = w2("\u25A0", "x");
761
- ue = w2("\u25B2", "x");
762
- F = w2("\u25C7", "o");
763
- le = w2("\u250C", "T");
764
- d2 = w2("\u2502", "|");
765
- E2 = w2("\u2514", "\u2014");
766
- Ie = w2("\u2510", "T");
767
- Ee = w2("\u2518", "\u2014");
768
- z2 = w2("\u25CF", ">");
769
- H2 = w2("\u25CB", " ");
770
- te = w2("\u25FB", "[\u2022]");
771
- U = w2("\u25FC", "[+]");
772
- J = w2("\u25FB", "[ ]");
773
- xe = w2("\u25AA", "\u2022");
774
- se = w2("\u2500", "-");
775
- ce = w2("\u256E", "+");
776
- Ge = w2("\u251C", "+");
777
- $e = w2("\u256F", "+");
778
- de = w2("\u2570", "+");
779
- Oe = w2("\u256D", "+");
780
- he = w2("\u25CF", "\u2022");
781
- pe = w2("\u25C6", "*");
782
- me = w2("\u25B2", "!");
783
- ge = w2("\u25A0", "x");
784
- V2 = (e) => {
785
- switch (e) {
855
+ unicode = isUnicodeSupported();
856
+ isCI = () => process.env.CI === "true";
857
+ unicodeOr = (o, e) => unicode ? o : e;
858
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
859
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
860
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
861
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
862
+ S_BAR_START = unicodeOr("\u250C", "T");
863
+ S_BAR = unicodeOr("\u2502", "|");
864
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
865
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
866
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
867
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
868
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
869
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
870
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
871
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
872
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
873
+ S_BAR_H = unicodeOr("\u2500", "-");
874
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
875
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
876
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
877
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
878
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
879
+ S_INFO = unicodeOr("\u25CF", "\u2022");
880
+ S_SUCCESS = unicodeOr("\u25C6", "*");
881
+ S_WARN = unicodeOr("\u25B2", "!");
882
+ S_ERROR = unicodeOr("\u25A0", "x");
883
+ symbol = (o) => {
884
+ switch (o) {
786
885
  case "initial":
787
886
  case "active":
788
- return t("cyan", _e);
887
+ return styleText2("cyan", S_STEP_ACTIVE);
789
888
  case "cancel":
790
- return t("red", oe);
889
+ return styleText2("red", S_STEP_CANCEL);
791
890
  case "error":
792
- return t("yellow", ue);
891
+ return styleText2("yellow", S_STEP_ERROR);
793
892
  case "submit":
794
- return t("green", F);
893
+ return styleText2("green", S_STEP_SUBMIT);
894
+ case "validating":
895
+ return styleText2("dim", S_STEP_ACTIVE);
795
896
  }
796
897
  };
797
- ye = (e) => {
798
- switch (e) {
898
+ symbolBar = (o) => {
899
+ switch (o) {
799
900
  case "initial":
800
901
  case "active":
801
- return t("cyan", d2);
902
+ return styleText2("cyan", S_BAR);
802
903
  case "cancel":
803
- return t("red", d2);
904
+ return styleText2("red", S_BAR);
804
905
  case "error":
805
- return t("yellow", d2);
906
+ return styleText2("yellow", S_BAR);
806
907
  case "submit":
807
- return t("green", d2);
808
- }
809
- };
810
- et2 = (e, i, s, r, u2) => {
811
- let n = i, o = 0;
812
- for (let c2 = s; c2 < r; c2++) {
813
- const a = e[c2];
814
- if (n = n - a.length, o++, n <= u2) break;
815
- }
816
- return { lineCount: n, removals: o };
817
- };
818
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
819
- 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);
820
- let p2 = 0;
821
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
822
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
823
- const S2 = Math.min(p2 + y2, i.length), h = [];
908
+ return styleText2("green", S_BAR);
909
+ }
910
+ };
911
+ I = (l2, e, w, p, b, C2 = false) => {
912
+ let r2 = e, O = 0;
913
+ if (C2)
914
+ for (let i2 = p - 1; i2 >= w; i2--) {
915
+ const m = l2[i2];
916
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
917
+ }
918
+ else
919
+ for (let i2 = w; i2 < p; i2++) {
920
+ const m = l2[i2];
921
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
922
+ }
923
+ return { lineCount: r2, removals: O };
924
+ };
925
+ limitOptions = ({
926
+ cursor: l2,
927
+ options: e,
928
+ style: w,
929
+ output: p = process.stdout,
930
+ maxItems: b = Number.POSITIVE_INFINITY,
931
+ columnPadding: C2 = 0,
932
+ rowPadding: r2 = 4
933
+ }) => {
934
+ const i2 = getColumns(p) - C2, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
824
935
  let f = 0;
825
- m && f++, g && f++;
826
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
827
- for (let b = v; b < T; b++) {
828
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
936
+ l2 >= a2 - 3 && (f = Math.max(
937
+ Math.min(l2 - a2 + 3, e.length - a2),
938
+ 0
939
+ ));
940
+ let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
941
+ const W2 = Math.min(
942
+ f + a2,
943
+ e.length
944
+ ), s = [];
945
+ let g = 0;
946
+ d && g++, c2 && g++;
947
+ const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
948
+ for (let t2 = T; t2 < y2; t2++) {
949
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
950
+ hard: true,
951
+ trim: false
952
+ }).split(`
829
953
  `);
830
- h.push(x), f += x.length;
831
- }
832
- if (f > $2) {
833
- let b = 0, x = 0, G2 = f;
834
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
835
- 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));
836
- }
837
- const C2 = [];
838
- m && C2.push(l);
839
- for (const b of h) for (const x of b) C2.push(x);
840
- return g && C2.push(l), C2;
841
- };
842
- ot2 = (e) => {
843
- const i = e.active ?? "Yes", s = e.inactive ?? "No";
844
- return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
845
- const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
846
- ` : ""}${o}
847
- `, a = this.value ? i : s;
848
- switch (this.state) {
849
- case "submit": {
850
- const l = r ? `${t("gray", d2)} ` : "";
851
- return `${c2}${l}${t("dim", a)}`;
852
- }
853
- case "cancel": {
854
- const l = r ? `${t("gray", d2)} ` : "";
855
- return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
856
- ${t("gray", d2)}` : ""}`;
857
- }
858
- default: {
859
- const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
860
- return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
861
- ${t("cyan", d2)} ` : `
862
- ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
863
- ${$2}
954
+ s.push(h2), g += h2.length;
955
+ }
956
+ if (g > v) {
957
+ let t2 = 0, n3 = 0, o = g;
958
+ const h2 = l2 - T;
959
+ let u3 = v;
960
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
961
+ s,
962
+ o,
963
+ h2 + 1,
964
+ s.length,
965
+ u3,
966
+ true
967
+ );
968
+ 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));
969
+ }
970
+ const x = [];
971
+ d && x.push(M);
972
+ for (const t2 of s)
973
+ for (const n3 of t2)
974
+ x.push(n3);
975
+ return c2 && x.push(M), x;
976
+ };
977
+ confirm = (i2) => {
978
+ const a2 = i2.active ?? "Yes", s = i2.inactive ?? "No";
979
+ return new r({
980
+ active: a2,
981
+ inactive: s,
982
+ signal: i2.signal,
983
+ input: i2.input,
984
+ output: i2.output,
985
+ initialValue: i2.initialValue ?? true,
986
+ render() {
987
+ const e = i2.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = e ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
988
+ i2.output,
989
+ i2.message,
990
+ l2,
991
+ u3
992
+ ), o = `${e ? `${styleText2("gray", S_BAR)}
993
+ ` : ""}${f}
994
+ `, c2 = this.value ? a2 : s;
995
+ switch (this.state) {
996
+ case "submit": {
997
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
998
+ return `${o}${r2}${styleText2("dim", c2)}`;
999
+ }
1000
+ case "cancel": {
1001
+ const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
1002
+ return `${o}${r2}${styleText2(["strikethrough", "dim"], c2)}${e ? `
1003
+ ${styleText2("gray", S_BAR)}` : ""}`;
1004
+ }
1005
+ default: {
1006
+ const r2 = e ? `${styleText2("cyan", S_BAR)} ` : "", g = e ? styleText2("cyan", S_BAR_END) : "";
1007
+ return `${o}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${i2.vertical ? e ? `
1008
+ ${styleText2("cyan", S_BAR)} ` : `
1009
+ ` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", s)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${s}`}
1010
+ ${g}
864
1011
  `;
1012
+ }
865
1013
  }
866
1014
  }
867
- } }).prompt();
1015
+ }).prompt();
868
1016
  };
869
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
870
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
871
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
872
- const y2 = Array.isArray(e) ? e : e.split(`
1017
+ MULTISELECT_INSTRUCTIONS = [
1018
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1019
+ `${styleText2("dim", "Space:")} select`,
1020
+ `${styleText2("dim", "Enter:")} confirm`
1021
+ ];
1022
+ log = {
1023
+ message: (s = [], {
1024
+ symbol: e = styleText2("gray", S_BAR),
1025
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
1026
+ output: m = process.stdout,
1027
+ spacing: l2 = 1,
1028
+ withGuide: c2
1029
+ } = {}) => {
1030
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
1031
+ for (let i2 = 0; i2 < l2; i2++)
1032
+ t2.push(f);
1033
+ const g = Array.isArray(s) ? s : s.split(`
873
1034
  `);
874
- if (y2.length > 0) {
875
- const [p2, ...m] = y2;
876
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
877
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
878
- }
879
- r.write(`${o.join(`
1035
+ if (g.length > 0) {
1036
+ const [i2, ...y2] = g;
1037
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
1038
+ for (const p of y2)
1039
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
1040
+ }
1041
+ m.write(`${t2.join(`
880
1042
  `)}
881
1043
  `);
882
- }, info: (e, i) => {
883
- O2.message(e, { ...i, symbol: t("blue", he) });
884
- }, success: (e, i) => {
885
- O2.message(e, { ...i, symbol: t("green", pe) });
886
- }, step: (e, i) => {
887
- O2.message(e, { ...i, symbol: t("green", F) });
888
- }, warn: (e, i) => {
889
- O2.message(e, { ...i, symbol: t("yellow", me) });
890
- }, warning: (e, i) => {
891
- O2.warn(e, i);
892
- }, error: (e, i) => {
893
- O2.message(e, { ...i, symbol: t("red", ge) });
894
- } };
895
- pt = (e = "", i) => {
896
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
897
- s.write(`${r}${t("red", e)}
1044
+ },
1045
+ info: (s, e) => {
1046
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
1047
+ },
1048
+ success: (s, e) => {
1049
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
1050
+ },
1051
+ step: (s, e) => {
1052
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1053
+ },
1054
+ warn: (s, e) => {
1055
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1056
+ },
1057
+ /** alias for `log.warn()`. */
1058
+ warning: (s, e) => {
1059
+ log.warn(s, e);
1060
+ },
1061
+ error: (s, e) => {
1062
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1063
+ }
1064
+ };
1065
+ cancel = (o = "", t2) => {
1066
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1067
+ i2.write(`${e}${styleText2("red", o)}
898
1068
 
899
1069
  `);
900
1070
  };
901
- mt = (e = "", i) => {
902
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
903
- s.write(`${r}${e}
1071
+ intro = (o = "", t2) => {
1072
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_START)} ` : "";
1073
+ i2.write(`${e}${o}
904
1074
  `);
905
1075
  };
906
- gt = (e = "", i) => {
907
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
908
- ${t("gray", E2)} ` : "";
909
- s.write(`${r}${e}
1076
+ outro = (o = "", t2) => {
1077
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR)}
1078
+ ${styleText2("gray", S_BAR_END)} ` : "";
1079
+ i2.write(`${e}${o}
910
1080
 
911
1081
  `);
912
1082
  };
913
- ft = (e) => t("dim", e);
914
- vt = (e, i, s) => {
915
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
916
- `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
917
- return wrapAnsi(e, c2, r);
918
- };
919
- wt = (e = "", i = "", s) => {
920
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
921
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
922
- const g = dist_default2(m);
923
- return g > p2 ? g : p2;
924
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
925
- `), $2 = u2 ? `${t("gray", d2)}
926
- ` : "", y2 = u2 ? Ge : de;
927
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
928
- ${l}
929
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
930
- `);
1083
+ W$1 = (o) => o;
1084
+ C = (o, e, s) => {
1085
+ const a2 = {
1086
+ hard: true,
1087
+ trim: false
1088
+ }, i2 = wrapAnsi(o, e, a2).split(`
1089
+ `), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
1090
+ return wrapAnsi(o, g, a2);
1091
+ };
1092
+ note = (o = "", e = "", s) => {
1093
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
1094
+ `).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
1095
+ g.reduce((m, F) => {
1096
+ const O = dist_default2(F);
1097
+ return O > m ? O : m;
1098
+ }, 0),
1099
+ n3
1100
+ ) + 2, h2 = g.map(
1101
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
1102
+ ).join(`
1103
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
1104
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
1105
+ a2.write(
1106
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
1107
+ "gray",
1108
+ S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
1109
+ )}
1110
+ ${h2}
1111
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
1112
+ `
1113
+ );
931
1114
  };
932
- Ct = (e) => t("magenta", e);
933
- fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
934
- const l = ae();
935
- let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
936
- const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
937
- const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
938
- m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
939
- }, C2 = () => T(2), b = () => T(1), x = () => {
940
- process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
941
- }, G2 = () => {
942
- process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
943
- }, M2 = () => {
944
- if (S2 === void 0) return;
945
- l && s.write(`
1115
+ W = (l2) => styleText2("magenta", l2);
1116
+ spinner = ({
1117
+ indicator: l2 = "dots",
1118
+ onCancel: h2,
1119
+ output: n3 = process.stdout,
1120
+ cancelMessage: G,
1121
+ errorMessage: O,
1122
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
1123
+ delay: F = unicode ? 80 : 120,
1124
+ signal: m,
1125
+ ...I2
1126
+ } = {}) => {
1127
+ const u3 = isCI();
1128
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
1129
+ const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
1130
+ const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
1131
+ S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
1132
+ }, f = () => g(2), i2 = () => g(1), A = () => {
1133
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m && m.addEventListener("abort", i2);
1134
+ }, H = () => {
1135
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m && m.removeEventListener("abort", i2);
1136
+ }, y2 = () => {
1137
+ if (p === void 0) return;
1138
+ u3 && n3.write(`
946
1139
  `);
947
- const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
1140
+ const r2 = wrapAnsi(p, x, {
1141
+ hard: true,
1142
+ trim: false
1143
+ }).split(`
948
1144
  `);
949
- _2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
950
- }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
951
- const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
952
- return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
953
- }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
954
- p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
1145
+ r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
1146
+ }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
1147
+ const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
1148
+ return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
1149
+ }, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
1150
+ d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N && n3.write(`${styleText2("gray", S_BAR)}
955
1151
  `);
956
- let A2 = 0, k = 0;
957
- x(), y2 = setInterval(() => {
958
- if (l && g === S2) return;
959
- M2(), S2 = g;
960
- const L = v(n[A2]);
961
- let Z;
962
- if (l) Z = `${L} ${g}...`;
963
- else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
1152
+ let r2 = 0, t2 = 0;
1153
+ A(), T = setInterval(() => {
1154
+ if (u3 && s === p)
1155
+ return;
1156
+ y2(), p = s;
1157
+ const o = k(E[r2]);
1158
+ let v;
1159
+ if (u3)
1160
+ v = `${o} ${s}...`;
1161
+ else if (l2 === "timer")
1162
+ v = `${o} ${s} ${_(w)}`;
964
1163
  else {
965
- const Be = ".".repeat(Math.floor(k)).slice(0, 3);
966
- Z = `${L} ${g}${Be}`;
967
- }
968
- const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
969
- s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
970
- }, o);
971
- }, W = (_2 = "", A2 = 0, k = false) => {
972
- if (!p2) return;
973
- p2 = false, clearInterval(y2), M2();
974
- const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
975
- g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
976
- `) : s.write(`${L} ${g}
977
- `)), G2(), $2();
1164
+ const B = ".".repeat(Math.floor(t2)).slice(0, 3);
1165
+ v = `${o} ${s}${B}`;
1166
+ }
1167
+ const j = wrapAnsi(v, x, {
1168
+ hard: true,
1169
+ trim: false
1170
+ });
1171
+ n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
1172
+ }, F);
1173
+ }, a2 = (e = "", r2 = 0, t2 = false) => {
1174
+ if (!d) return;
1175
+ d = false, clearInterval(T), y2();
1176
+ const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
1177
+ s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
1178
+ `) : n3.write(`${o} ${s}
1179
+ `)), H(), M();
1180
+ };
1181
+ return {
1182
+ start: P,
1183
+ stop: (e = "") => a2(e, 0),
1184
+ message: (e = "") => {
1185
+ s = C2(e ?? s);
1186
+ },
1187
+ cancel: (e = "") => a2(e, 1),
1188
+ error: (e = "") => a2(e, 2),
1189
+ clear: () => a2("", 0, true),
1190
+ get isCancelled() {
1191
+ return S;
1192
+ }
978
1193
  };
979
- return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
980
- g = R2(_2 ?? g);
981
- }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
982
- return m;
983
- } };
984
- };
985
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
986
- re = (e, i) => e.includes(`
987
- `) ? e.split(`
988
- `).map((s) => i(s)).join(`
989
- `) : i(e);
990
- _t = (e) => {
991
- const i = (s, r) => {
992
- const u2 = s.label ?? String(s.value);
993
- switch (r) {
1194
+ };
1195
+ u2 = {
1196
+ light: unicodeOr("\u2500", "-"),
1197
+ heavy: unicodeOr("\u2501", "="),
1198
+ block: unicodeOr("\u2588", "#")
1199
+ };
1200
+ SELECT_INSTRUCTIONS = [
1201
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1202
+ `${styleText2("dim", "Enter:")} confirm`
1203
+ ];
1204
+ c = (t2, o) => t2.includes(`
1205
+ `) ? t2.split(`
1206
+ `).map((d) => o(d)).join(`
1207
+ `) : o(t2);
1208
+ select = (t2) => {
1209
+ const o = (n3, m) => {
1210
+ if (n3 === void 0)
1211
+ return "";
1212
+ const s = n3.label ?? String(n3.value);
1213
+ switch (m) {
994
1214
  case "disabled":
995
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1215
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
996
1216
  case "selected":
997
- return `${re(u2, (n) => t("dim", n))}`;
1217
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
998
1218
  case "active":
999
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1219
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
1000
1220
  case "cancelled":
1001
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1221
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
1002
1222
  default:
1003
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1004
- }
1005
- };
1006
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1007
- 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)}
1008
- ` : ""}${n}
1223
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1224
+ }
1225
+ }, d = t2.showInstructions ?? true;
1226
+ return new n$1({
1227
+ options: t2.options,
1228
+ signal: t2.signal,
1229
+ input: t2.input,
1230
+ output: t2.output,
1231
+ initialValue: t2.initialValue,
1232
+ render() {
1233
+ const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1234
+ t2.output,
1235
+ t2.message,
1236
+ s,
1237
+ m
1238
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1239
+ ` : ""}${i2}
1009
1240
  `;
1010
- switch (this.state) {
1011
- case "submit": {
1012
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1013
- return `${o}${a}`;
1014
- }
1015
- case "cancel": {
1016
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1017
- return `${o}${a}${s ? `
1018
- ${t("gray", d2)}` : ""}`;
1019
- }
1020
- default: {
1021
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1022
- `).length, $2 = s ? 2 : 1;
1023
- 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(`
1024
- ${c2}`)}
1025
- ${a}
1241
+ switch (this.state) {
1242
+ case "submit": {
1243
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1244
+ t2.output,
1245
+ o(this.options[this.cursor], "selected"),
1246
+ r2
1247
+ );
1248
+ return `${u3}${a2}`;
1249
+ }
1250
+ case "cancel": {
1251
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1252
+ t2.output,
1253
+ o(this.options[this.cursor], "cancelled"),
1254
+ r2
1255
+ );
1256
+ return `${u3}${a2}${n3 ? `
1257
+ ${styleText2("gray", S_BAR)}` : ""}`;
1258
+ }
1259
+ default: {
1260
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1261
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
1262
+ `), f = p.length + 1;
1263
+ return `${u3}${r2}${limitOptions({
1264
+ output: t2.output,
1265
+ cursor: this.cursor,
1266
+ options: this.options,
1267
+ maxItems: t2.maxItems,
1268
+ columnPadding: r2.length,
1269
+ rowPadding: a2 + f,
1270
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1271
+ }).join(`
1272
+ ${r2}`)}
1273
+ ${b}
1026
1274
  `;
1275
+ }
1027
1276
  }
1028
1277
  }
1029
- } }).prompt();
1278
+ }).prompt();
1030
1279
  };
1031
- je = `${t("gray", d2)} `;
1280
+ i = `${styleText2("gray", S_BAR)} `;
1032
1281
  }
1033
1282
  });
1034
1283
 
@@ -1041,9 +1290,9 @@ function supportsColor() {
1041
1290
  }
1042
1291
  return process.stdout.isTTY === true;
1043
1292
  }
1044
- function colorize(text, color) {
1045
- if (!supportsColor()) return text;
1046
- return `${color}${text}${colors.reset}`;
1293
+ function colorize(text2, color) {
1294
+ if (!supportsColor()) return text2;
1295
+ return `${color}${text2}${colors.reset}`;
1047
1296
  }
1048
1297
  function stringify(value) {
1049
1298
  if (typeof value === "string") return value;
@@ -1073,7 +1322,7 @@ function stringify(value) {
1073
1322
  function formatMessage(...args) {
1074
1323
  return args.map(stringify).join(" ");
1075
1324
  }
1076
- var colors, currentLogLevel, log, error, warn, info, success;
1325
+ var colors, currentLogLevel, log2, error, warn, info, success;
1077
1326
  var init_cli_output = __esm({
1078
1327
  "packages/tooling/src/utils/cli-output.ts"() {
1079
1328
  "use strict";
@@ -1106,7 +1355,7 @@ var init_cli_output = __esm({
1106
1355
  currentLogLevel = envLevel;
1107
1356
  }
1108
1357
  }
1109
- log = {
1358
+ log2 = {
1110
1359
  /**
1111
1360
  * Logs an error message (always shows unless Quiet level)
1112
1361
  * Uses clack's log.error + explicit red color
@@ -1114,7 +1363,7 @@ var init_cli_output = __esm({
1114
1363
  error(...args) {
1115
1364
  if (currentLogLevel < 0 /* Quiet */) return;
1116
1365
  const message = formatMessage(...args);
1117
- O2.error(colorize(message, colors.brightRed));
1366
+ log.error(colorize(message, colors.brightRed));
1118
1367
  },
1119
1368
  /**
1120
1369
  * Logs a warning message (shows at Normal level and above)
@@ -1123,7 +1372,7 @@ var init_cli_output = __esm({
1123
1372
  warn(...args) {
1124
1373
  if (currentLogLevel < 1 /* Normal */) return;
1125
1374
  const message = formatMessage(...args);
1126
- O2.warn(colorize(message, colors.brightYellow));
1375
+ log.warn(colorize(message, colors.brightYellow));
1127
1376
  },
1128
1377
  /**
1129
1378
  * Logs an info message (shows at Normal level and above)
@@ -1132,7 +1381,7 @@ var init_cli_output = __esm({
1132
1381
  info(...args) {
1133
1382
  if (currentLogLevel < 1 /* Normal */) return;
1134
1383
  const message = formatMessage(...args);
1135
- O2.info(colorize(message, colors.brightCyan));
1384
+ log.info(colorize(message, colors.brightCyan));
1136
1385
  },
1137
1386
  /**
1138
1387
  * Logs a success message (shows at Normal level and above)
@@ -1141,7 +1390,7 @@ var init_cli_output = __esm({
1141
1390
  success(...args) {
1142
1391
  if (currentLogLevel < 1 /* Normal */) return;
1143
1392
  const message = formatMessage(...args);
1144
- O2.success(colorize(message, colors.brightGreen));
1393
+ log.success(colorize(message, colors.brightGreen));
1145
1394
  },
1146
1395
  /**
1147
1396
  * Logs a debug message (only shows at Verbose level and above)
@@ -1150,7 +1399,7 @@ var init_cli_output = __esm({
1150
1399
  debug(...args) {
1151
1400
  if (currentLogLevel < 2 /* Verbose */) return;
1152
1401
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1153
- O2.message(
1402
+ log.message(
1154
1403
  colorize(
1155
1404
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1156
1405
  colors.gray
@@ -1164,7 +1413,7 @@ var init_cli_output = __esm({
1164
1413
  trace(...args) {
1165
1414
  if (currentLogLevel < 3 /* Debug */) return;
1166
1415
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1167
- O2.message(
1416
+ log.message(
1168
1417
  colorize(
1169
1418
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1170
1419
  colors.gray
@@ -1172,10 +1421,10 @@ var init_cli_output = __esm({
1172
1421
  );
1173
1422
  }
1174
1423
  };
1175
- error = log.error.bind(log);
1176
- warn = log.warn.bind(log);
1177
- info = log.info.bind(log);
1178
- success = log.success.bind(log);
1424
+ error = log2.error.bind(log2);
1425
+ warn = log2.warn.bind(log2);
1426
+ info = log2.info.bind(log2);
1427
+ success = log2.success.bind(log2);
1179
1428
  }
1180
1429
  });
1181
1430
 
@@ -1535,9 +1784,9 @@ var require_is_glob = __commonJS({
1535
1784
  index += 2;
1536
1785
  var close = chars[open];
1537
1786
  if (close) {
1538
- var n = str.indexOf(close, index);
1539
- if (n !== -1) {
1540
- index = n + 1;
1787
+ var n3 = str.indexOf(close, index);
1788
+ if (n3 !== -1) {
1789
+ index = n3 + 1;
1541
1790
  }
1542
1791
  }
1543
1792
  if (str[index] === "!") {
@@ -1563,9 +1812,9 @@ var require_is_glob = __commonJS({
1563
1812
  index += 2;
1564
1813
  var close = chars[open];
1565
1814
  if (close) {
1566
- var n = str.indexOf(close, index);
1567
- if (n !== -1) {
1568
- index = n + 1;
1815
+ var n3 = str.indexOf(close, index);
1816
+ if (n3 !== -1) {
1817
+ index = n3 + 1;
1569
1818
  }
1570
1819
  }
1571
1820
  if (str[index] === "!") {
@@ -1643,8 +1892,8 @@ var require_utils = __commonJS({
1643
1892
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1644
1893
  return (Number(max) - Number(min)) / Number(step) >= limit;
1645
1894
  };
1646
- exports.escapeNode = (block, n = 0, type) => {
1647
- const node = block.nodes[n];
1895
+ exports.escapeNode = (block2, n3 = 0, type) => {
1896
+ const node = block2.nodes[n3];
1648
1897
  if (!node) return;
1649
1898
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1650
1899
  if (node.escaped !== true) {
@@ -1661,15 +1910,15 @@ var require_utils = __commonJS({
1661
1910
  }
1662
1911
  return false;
1663
1912
  };
1664
- exports.isInvalidBrace = (block) => {
1665
- if (block.type !== "brace") return false;
1666
- if (block.invalid === true || block.dollar) return true;
1667
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1668
- block.invalid = true;
1913
+ exports.isInvalidBrace = (block2) => {
1914
+ if (block2.type !== "brace") return false;
1915
+ if (block2.invalid === true || block2.dollar) return true;
1916
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1917
+ block2.invalid = true;
1669
1918
  return true;
1670
1919
  }
1671
- if (block.open !== true || block.close !== true) {
1672
- block.invalid = true;
1920
+ if (block2.open !== true || block2.close !== true) {
1921
+ block2.invalid = true;
1673
1922
  return true;
1674
1923
  }
1675
1924
  return false;
@@ -1688,8 +1937,8 @@ var require_utils = __commonJS({
1688
1937
  exports.flatten = (...args) => {
1689
1938
  const result = [];
1690
1939
  const flat = (arr) => {
1691
- for (let i = 0; i < arr.length; i++) {
1692
- const ele = arr[i];
1940
+ for (let i2 = 0; i2 < arr.length; i2++) {
1941
+ const ele = arr[i2];
1693
1942
  if (Array.isArray(ele)) {
1694
1943
  flat(ele);
1695
1944
  continue;
@@ -1783,9 +2032,9 @@ var require_to_regex_range = __commonJS({
1783
2032
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1784
2033
  return toRegexRange.cache[cacheKey].result;
1785
2034
  }
1786
- let a = Math.min(min, max);
2035
+ let a2 = Math.min(min, max);
1787
2036
  let b = Math.max(min, max);
1788
- if (Math.abs(a - b) === 1) {
2037
+ if (Math.abs(a2 - b) === 1) {
1789
2038
  let result = min + "|" + max;
1790
2039
  if (opts.capture) {
1791
2040
  return `(${result})`;
@@ -1796,20 +2045,20 @@ var require_to_regex_range = __commonJS({
1796
2045
  return `(?:${result})`;
1797
2046
  }
1798
2047
  let isPadded = hasPadding(min) || hasPadding(max);
1799
- let state = { min, max, a, b };
2048
+ let state = { min, max, a: a2, b };
1800
2049
  let positives = [];
1801
2050
  let negatives = [];
1802
2051
  if (isPadded) {
1803
2052
  state.isPadded = isPadded;
1804
2053
  state.maxLen = String(state.max).length;
1805
2054
  }
1806
- if (a < 0) {
2055
+ if (a2 < 0) {
1807
2056
  let newMin = b < 0 ? Math.abs(b) : 1;
1808
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1809
- a = state.a = 0;
2057
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
2058
+ a2 = state.a = 0;
1810
2059
  }
1811
2060
  if (b >= 0) {
1812
- positives = splitToPatterns(a, b, state, opts);
2061
+ positives = splitToPatterns(a2, b, state, opts);
1813
2062
  }
1814
2063
  state.negatives = negatives;
1815
2064
  state.positives = positives;
@@ -1857,8 +2106,8 @@ var require_to_regex_range = __commonJS({
1857
2106
  let digits = zipped.length;
1858
2107
  let pattern = "";
1859
2108
  let count = 0;
1860
- for (let i = 0; i < digits; i++) {
1861
- let [startDigit, stopDigit] = zipped[i];
2109
+ for (let i2 = 0; i2 < digits; i2++) {
2110
+ let [startDigit, stopDigit] = zipped[i2];
1862
2111
  if (startDigit === stopDigit) {
1863
2112
  pattern += startDigit;
1864
2113
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1877,8 +2126,8 @@ var require_to_regex_range = __commonJS({
1877
2126
  let tokens = [];
1878
2127
  let start = min;
1879
2128
  let prev;
1880
- for (let i = 0; i < ranges.length; i++) {
1881
- let max2 = ranges[i];
2129
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2130
+ let max2 = ranges[i2];
1882
2131
  let obj = rangeToPattern(String(start), String(max2), options);
1883
2132
  let zeros = "";
1884
2133
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1913,13 +2162,13 @@ var require_to_regex_range = __commonJS({
1913
2162
  }
1914
2163
  return result;
1915
2164
  }
1916
- function zip(a, b) {
2165
+ function zip(a2, b) {
1917
2166
  let arr = [];
1918
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2167
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1919
2168
  return arr;
1920
2169
  }
1921
- function compare(a, b) {
1922
- return a > b ? 1 : b > a ? -1 : 0;
2170
+ function compare(a2, b) {
2171
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1923
2172
  }
1924
2173
  function contains(arr, key, val) {
1925
2174
  return arr.some((ele) => ele[key] === val);
@@ -1937,8 +2186,8 @@ var require_to_regex_range = __commonJS({
1937
2186
  }
1938
2187
  return "";
1939
2188
  }
1940
- function toCharacterClass(a, b, options) {
1941
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2189
+ function toCharacterClass(a2, b, options) {
2190
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1942
2191
  }
1943
2192
  function hasPadding(str) {
1944
2193
  return /^-?(0+)\d/.test(str);
@@ -2017,8 +2266,8 @@ var require_fill_range = __commonJS({
2017
2266
  return negative ? "-" + input : input;
2018
2267
  };
2019
2268
  var toSequence = (parts, options, maxLen) => {
2020
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2021
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2269
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2270
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2022
2271
  let prefix = options.capture ? "" : "?:";
2023
2272
  let positives = "";
2024
2273
  let negatives = "";
@@ -2039,12 +2288,12 @@ var require_fill_range = __commonJS({
2039
2288
  }
2040
2289
  return result;
2041
2290
  };
2042
- var toRange = (a, b, isNumbers, options) => {
2291
+ var toRange = (a2, b, isNumbers, options) => {
2043
2292
  if (isNumbers) {
2044
- return toRegexRange(a, b, { wrap: false, ...options });
2293
+ return toRegexRange(a2, b, { wrap: false, ...options });
2045
2294
  }
2046
- let start = String.fromCharCode(a);
2047
- if (a === b) return start;
2295
+ let start = String.fromCharCode(a2);
2296
+ if (a2 === b) return start;
2048
2297
  let stop = String.fromCharCode(b);
2049
2298
  return `[${start}-${stop}]`;
2050
2299
  };
@@ -2070,15 +2319,15 @@ var require_fill_range = __commonJS({
2070
2319
  return [];
2071
2320
  };
2072
2321
  var fillNumbers = (start, end, step = 1, options = {}) => {
2073
- let a = Number(start);
2322
+ let a2 = Number(start);
2074
2323
  let b = Number(end);
2075
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2324
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2076
2325
  if (options.strictRanges === true) throw rangeError([start, end]);
2077
2326
  return [];
2078
2327
  }
2079
- if (a === 0) a = 0;
2328
+ if (a2 === 0) a2 = 0;
2080
2329
  if (b === 0) b = 0;
2081
- let descending = a > b;
2330
+ let descending = a2 > b;
2082
2331
  let startString = String(start);
2083
2332
  let endString = String(end);
2084
2333
  let stepString = String(step);
@@ -2094,13 +2343,13 @@ var require_fill_range = __commonJS({
2094
2343
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2095
2344
  let range = [];
2096
2345
  let index = 0;
2097
- while (descending ? a >= b : a <= b) {
2346
+ while (descending ? a2 >= b : a2 <= b) {
2098
2347
  if (options.toRegex === true && step > 1) {
2099
- push(a);
2348
+ push(a2);
2100
2349
  } else {
2101
- range.push(pad(format(a, index), maxLen, toNumber));
2350
+ range.push(pad(format(a2, index), maxLen, toNumber));
2102
2351
  }
2103
- a = descending ? a - step : a + step;
2352
+ a2 = descending ? a2 - step : a2 + step;
2104
2353
  index++;
2105
2354
  }
2106
2355
  if (options.toRegex === true) {
@@ -2113,19 +2362,19 @@ var require_fill_range = __commonJS({
2113
2362
  return invalidRange(start, end, options);
2114
2363
  }
2115
2364
  let format = options.transform || ((val) => String.fromCharCode(val));
2116
- let a = `${start}`.charCodeAt(0);
2365
+ let a2 = `${start}`.charCodeAt(0);
2117
2366
  let b = `${end}`.charCodeAt(0);
2118
- let descending = a > b;
2119
- let min = Math.min(a, b);
2120
- let max = Math.max(a, b);
2367
+ let descending = a2 > b;
2368
+ let min = Math.min(a2, b);
2369
+ let max = Math.max(a2, b);
2121
2370
  if (options.toRegex && step === 1) {
2122
2371
  return toRange(min, max, false, options);
2123
2372
  }
2124
2373
  let range = [];
2125
2374
  let index = 0;
2126
- while (descending ? a >= b : a <= b) {
2127
- range.push(format(a, index));
2128
- a = descending ? a - step : a + step;
2375
+ while (descending ? a2 >= b : a2 <= b) {
2376
+ range.push(format(a2, index));
2377
+ a2 = descending ? a2 - step : a2 + step;
2129
2378
  index++;
2130
2379
  }
2131
2380
  if (options.toRegex === true) {
@@ -2248,18 +2497,18 @@ var require_expand = __commonJS({
2248
2497
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2249
2498
  const walk = (node, parent = {}) => {
2250
2499
  node.queue = [];
2251
- let p2 = parent;
2252
- let q2 = parent.queue;
2253
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2254
- p2 = p2.parent;
2255
- q2 = p2.queue;
2500
+ let p = parent;
2501
+ let q = parent.queue;
2502
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2503
+ p = p.parent;
2504
+ q = p.queue;
2256
2505
  }
2257
2506
  if (node.invalid || node.dollar) {
2258
- q2.push(append(q2.pop(), stringify2(node, options)));
2507
+ q.push(append(q.pop(), stringify2(node, options)));
2259
2508
  return;
2260
2509
  }
2261
2510
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2262
- q2.push(append(q2.pop(), ["{}"]));
2511
+ q.push(append(q.pop(), ["{}"]));
2263
2512
  return;
2264
2513
  }
2265
2514
  if (node.nodes && node.ranges > 0) {
@@ -2271,26 +2520,26 @@ var require_expand = __commonJS({
2271
2520
  if (range.length === 0) {
2272
2521
  range = stringify2(node, options);
2273
2522
  }
2274
- q2.push(append(q2.pop(), range));
2523
+ q.push(append(q.pop(), range));
2275
2524
  node.nodes = [];
2276
2525
  return;
2277
2526
  }
2278
2527
  const enclose = utils.encloseBrace(node);
2279
2528
  let queue = node.queue;
2280
- let block = node;
2281
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2282
- block = block.parent;
2283
- queue = block.queue;
2529
+ let block2 = node;
2530
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2531
+ block2 = block2.parent;
2532
+ queue = block2.queue;
2284
2533
  }
2285
- for (let i = 0; i < node.nodes.length; i++) {
2286
- const child = node.nodes[i];
2534
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2535
+ const child = node.nodes[i2];
2287
2536
  if (child.type === "comma" && node.type === "brace") {
2288
- if (i === 1) queue.push("");
2537
+ if (i2 === 1) queue.push("");
2289
2538
  queue.push("");
2290
2539
  continue;
2291
2540
  }
2292
2541
  if (child.type === "close") {
2293
- q2.push(append(q2.pop(), queue, enclose));
2542
+ q.push(append(q.pop(), queue, enclose));
2294
2543
  continue;
2295
2544
  }
2296
2545
  if (child.value && child.type !== "open") {
@@ -2457,7 +2706,7 @@ var require_parse = __commonJS({
2457
2706
  }
2458
2707
  const ast = { type: "root", input, nodes: [] };
2459
2708
  const stack = [ast];
2460
- let block = ast;
2709
+ let block2 = ast;
2461
2710
  let prev = ast;
2462
2711
  let brackets = 0;
2463
2712
  const length = input.length;
@@ -2473,15 +2722,15 @@ var require_parse = __commonJS({
2473
2722
  prev.value += node.value;
2474
2723
  return;
2475
2724
  }
2476
- block.nodes.push(node);
2477
- node.parent = block;
2725
+ block2.nodes.push(node);
2726
+ node.parent = block2;
2478
2727
  node.prev = prev;
2479
2728
  prev = node;
2480
2729
  return node;
2481
2730
  };
2482
2731
  push({ type: "bos" });
2483
2732
  while (index < length) {
2484
- block = stack[stack.length - 1];
2733
+ block2 = stack[stack.length - 1];
2485
2734
  value = advance();
2486
2735
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2487
2736
  continue;
@@ -2518,19 +2767,19 @@ var require_parse = __commonJS({
2518
2767
  continue;
2519
2768
  }
2520
2769
  if (value === CHAR_LEFT_PARENTHESES) {
2521
- block = push({ type: "paren", nodes: [] });
2522
- stack.push(block);
2770
+ block2 = push({ type: "paren", nodes: [] });
2771
+ stack.push(block2);
2523
2772
  push({ type: "text", value });
2524
2773
  continue;
2525
2774
  }
2526
2775
  if (value === CHAR_RIGHT_PARENTHESES) {
2527
- if (block.type !== "paren") {
2776
+ if (block2.type !== "paren") {
2528
2777
  push({ type: "text", value });
2529
2778
  continue;
2530
2779
  }
2531
- block = stack.pop();
2780
+ block2 = stack.pop();
2532
2781
  push({ type: "text", value });
2533
- block = stack[stack.length - 1];
2782
+ block2 = stack[stack.length - 1];
2534
2783
  continue;
2535
2784
  }
2536
2785
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2555,7 +2804,7 @@ var require_parse = __commonJS({
2555
2804
  }
2556
2805
  if (value === CHAR_LEFT_CURLY_BRACE) {
2557
2806
  depth++;
2558
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2807
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2559
2808
  const brace = {
2560
2809
  type: "brace",
2561
2810
  open: true,
@@ -2566,52 +2815,52 @@ var require_parse = __commonJS({
2566
2815
  ranges: 0,
2567
2816
  nodes: []
2568
2817
  };
2569
- block = push(brace);
2570
- stack.push(block);
2818
+ block2 = push(brace);
2819
+ stack.push(block2);
2571
2820
  push({ type: "open", value });
2572
2821
  continue;
2573
2822
  }
2574
2823
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2575
- if (block.type !== "brace") {
2824
+ if (block2.type !== "brace") {
2576
2825
  push({ type: "text", value });
2577
2826
  continue;
2578
2827
  }
2579
2828
  const type = "close";
2580
- block = stack.pop();
2581
- block.close = true;
2829
+ block2 = stack.pop();
2830
+ block2.close = true;
2582
2831
  push({ type, value });
2583
2832
  depth--;
2584
- block = stack[stack.length - 1];
2833
+ block2 = stack[stack.length - 1];
2585
2834
  continue;
2586
2835
  }
2587
2836
  if (value === CHAR_COMMA && depth > 0) {
2588
- if (block.ranges > 0) {
2589
- block.ranges = 0;
2590
- const open = block.nodes.shift();
2591
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2837
+ if (block2.ranges > 0) {
2838
+ block2.ranges = 0;
2839
+ const open = block2.nodes.shift();
2840
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2592
2841
  }
2593
2842
  push({ type: "comma", value });
2594
- block.commas++;
2843
+ block2.commas++;
2595
2844
  continue;
2596
2845
  }
2597
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2598
- const siblings = block.nodes;
2846
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2847
+ const siblings = block2.nodes;
2599
2848
  if (depth === 0 || siblings.length === 0) {
2600
2849
  push({ type: "text", value });
2601
2850
  continue;
2602
2851
  }
2603
2852
  if (prev.type === "dot") {
2604
- block.range = [];
2853
+ block2.range = [];
2605
2854
  prev.value += value;
2606
2855
  prev.type = "range";
2607
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2608
- block.invalid = true;
2609
- block.ranges = 0;
2856
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2857
+ block2.invalid = true;
2858
+ block2.ranges = 0;
2610
2859
  prev.type = "text";
2611
2860
  continue;
2612
2861
  }
2613
- block.ranges++;
2614
- block.args = [];
2862
+ block2.ranges++;
2863
+ block2.args = [];
2615
2864
  continue;
2616
2865
  }
2617
2866
  if (prev.type === "range") {
@@ -2619,7 +2868,7 @@ var require_parse = __commonJS({
2619
2868
  const before = siblings[siblings.length - 1];
2620
2869
  before.value += prev.value + value;
2621
2870
  prev = before;
2622
- block.ranges--;
2871
+ block2.ranges--;
2623
2872
  continue;
2624
2873
  }
2625
2874
  push({ type: "dot", value });
@@ -2628,9 +2877,9 @@ var require_parse = __commonJS({
2628
2877
  push({ type: "text", value });
2629
2878
  }
2630
2879
  do {
2631
- block = stack.pop();
2632
- if (block.type !== "root") {
2633
- block.nodes.forEach((node) => {
2880
+ block2 = stack.pop();
2881
+ if (block2.type !== "root") {
2882
+ block2.nodes.forEach((node) => {
2634
2883
  if (!node.nodes) {
2635
2884
  if (node.type === "open") node.isOpen = true;
2636
2885
  if (node.type === "close") node.isClose = true;
@@ -2639,8 +2888,8 @@ var require_parse = __commonJS({
2639
2888
  }
2640
2889
  });
2641
2890
  const parent = stack[stack.length - 1];
2642
- const index2 = parent.nodes.indexOf(block);
2643
- parent.nodes.splice(index2, 1, ...block.nodes);
2891
+ const index2 = parent.nodes.indexOf(block2);
2892
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2644
2893
  }
2645
2894
  } while (stack.length > 0);
2646
2895
  push({ type: "eos" });
@@ -3273,9 +3522,9 @@ var require_scan = __commonJS({
3273
3522
  if (opts.parts === true || opts.tokens === true) {
3274
3523
  let prevIndex;
3275
3524
  for (let idx = 0; idx < slashes.length; idx++) {
3276
- const n = prevIndex ? prevIndex + 1 : start;
3277
- const i = slashes[idx];
3278
- const value = input.slice(n, i);
3525
+ const n3 = prevIndex ? prevIndex + 1 : start;
3526
+ const i2 = slashes[idx];
3527
+ const value = input.slice(n3, i2);
3279
3528
  if (opts.tokens) {
3280
3529
  if (idx === 0 && start !== 0) {
3281
3530
  tokens[idx].isPrefix = true;
@@ -3289,7 +3538,7 @@ var require_scan = __commonJS({
3289
3538
  if (idx !== 0 || value !== "") {
3290
3539
  parts.push(value);
3291
3540
  }
3292
- prevIndex = i;
3541
+ prevIndex = i2;
3293
3542
  }
3294
3543
  if (prevIndex && prevIndex + 1 < input.length) {
3295
3544
  const value = input.slice(prevIndex + 1);
@@ -3418,15 +3667,15 @@ var require_parse2 = __commonJS({
3418
3667
  };
3419
3668
  var hasRepeatedCharPrefixOverlap = (branches) => {
3420
3669
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3421
- for (let i = 0; i < values.length; i++) {
3422
- for (let j2 = i + 1; j2 < values.length; j2++) {
3423
- const a = values[i];
3424
- const b = values[j2];
3425
- const char = a[0];
3426
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3670
+ for (let i2 = 0; i2 < values.length; i2++) {
3671
+ for (let j = i2 + 1; j < values.length; j++) {
3672
+ const a2 = values[i2];
3673
+ const b = values[j];
3674
+ const char = a2[0];
3675
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3427
3676
  continue;
3428
3677
  }
3429
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3678
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3430
3679
  return true;
3431
3680
  }
3432
3681
  }
@@ -3441,8 +3690,8 @@ var require_parse2 = __commonJS({
3441
3690
  let paren = 0;
3442
3691
  let quote = 0;
3443
3692
  let escaped = false;
3444
- for (let i = 1; i < pattern.length; i++) {
3445
- const ch = pattern[i];
3693
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3694
+ const ch = pattern[i2];
3446
3695
  if (escaped === true) {
3447
3696
  escaped = false;
3448
3697
  continue;
@@ -3476,13 +3725,13 @@ var require_parse2 = __commonJS({
3476
3725
  if (ch === ")") {
3477
3726
  paren--;
3478
3727
  if (paren === 0) {
3479
- if (requireEnd === true && i !== pattern.length - 1) {
3728
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3480
3729
  return;
3481
3730
  }
3482
3731
  return {
3483
3732
  type: pattern[0],
3484
- body: pattern.slice(2, i),
3485
- end: i
3733
+ body: pattern.slice(2, i2),
3734
+ end: i2
3486
3735
  };
3487
3736
  }
3488
3737
  }
@@ -3614,7 +3863,7 @@ var require_parse2 = __commonJS({
3614
3863
  let prev = bos;
3615
3864
  let value;
3616
3865
  const eos = () => state.index === len - 1;
3617
- const peek = state.peek = (n = 1) => input[state.index + n];
3866
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3618
3867
  const advance = state.advance = () => input[++state.index] || "";
3619
3868
  const remaining = () => input.slice(state.index + 1);
3620
3869
  const consume = (value2 = "", num = 0) => {
@@ -3695,10 +3944,10 @@ var require_parse2 = __commonJS({
3695
3944
  open.type = "text";
3696
3945
  open.value = literal;
3697
3946
  open.output = safeOutput || utils.escapeRegex(literal);
3698
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3699
- tokens[i].value = "";
3700
- tokens[i].output = "";
3701
- delete tokens[i].suffix;
3947
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3948
+ tokens[i2].value = "";
3949
+ tokens[i2].output = "";
3950
+ delete tokens[i2].suffix;
3702
3951
  }
3703
3952
  state.output = token.output + open.output;
3704
3953
  state.backtrack = true;
@@ -3941,13 +4190,13 @@ var require_parse2 = __commonJS({
3941
4190
  if (brace.dots === true) {
3942
4191
  const arr = tokens.slice();
3943
4192
  const range = [];
3944
- for (let i = arr.length - 1; i >= 0; i--) {
4193
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3945
4194
  tokens.pop();
3946
- if (arr[i].type === "brace") {
4195
+ if (arr[i2].type === "brace") {
3947
4196
  break;
3948
4197
  }
3949
- if (arr[i].type !== "dots") {
3950
- range.unshift(arr[i].value);
4198
+ if (arr[i2].type !== "dots") {
4199
+ range.unshift(arr[i2].value);
3951
4200
  }
3952
4201
  }
3953
4202
  output = expandRange(range, opts);
@@ -4406,7 +4655,7 @@ var require_picomatch = __commonJS({
4406
4655
  };
4407
4656
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4408
4657
  picomatch.parse = (pattern, options) => {
4409
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4658
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4410
4659
  return parse2(pattern, { ...options, fastpaths: false });
4411
4660
  };
4412
4661
  picomatch.scan = (input, options) => scan(input, options);
@@ -4490,8 +4739,8 @@ var require_micromatch = __commonJS({
4490
4739
  options.onResult(state);
4491
4740
  }
4492
4741
  };
4493
- for (let i = 0; i < patterns.length; i++) {
4494
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4742
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4743
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4495
4744
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4496
4745
  if (negated) negatives++;
4497
4746
  for (let item of list) {
@@ -4513,7 +4762,7 @@ var require_micromatch = __commonJS({
4513
4762
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4514
4763
  }
4515
4764
  if (options.nonull === true || options.nullglob === true) {
4516
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4765
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4517
4766
  }
4518
4767
  }
4519
4768
  return matches;
@@ -4543,7 +4792,7 @@ var require_micromatch = __commonJS({
4543
4792
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4544
4793
  }
4545
4794
  if (Array.isArray(pattern)) {
4546
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4795
+ return pattern.some((p) => micromatch.contains(str, p, options));
4547
4796
  }
4548
4797
  if (typeof pattern === "string") {
4549
4798
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4588,7 +4837,7 @@ var require_micromatch = __commonJS({
4588
4837
  if (typeof str !== "string") {
4589
4838
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4590
4839
  }
4591
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4840
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4592
4841
  };
4593
4842
  micromatch.capture = (glob, input, options) => {
4594
4843
  let posix = utils.isWindows(options);
@@ -4739,7 +4988,7 @@ var require_pattern = __commonJS({
4739
4988
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4740
4989
  function expandBraceExpansion(pattern) {
4741
4990
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4742
- patterns.sort((a, b) => a.length - b.length);
4991
+ patterns.sort((a2, b) => a2.length - b.length);
4743
4992
  return patterns.filter((pattern2) => pattern2 !== "");
4744
4993
  }
4745
4994
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4820,8 +5069,8 @@ var require_merge2 = __commonJS({
4820
5069
  }
4821
5070
  const mergedStream = PassThrough(options);
4822
5071
  function addStream() {
4823
- for (let i = 0, len = arguments.length; i < len; i++) {
4824
- streamsQueue.push(pauseStreams(arguments[i], options));
5072
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5073
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4825
5074
  }
4826
5075
  mergeStream();
4827
5076
  return this;
@@ -4870,8 +5119,8 @@ var require_merge2 = __commonJS({
4870
5119
  stream.pipe(mergedStream, { end: false });
4871
5120
  stream.resume();
4872
5121
  }
4873
- for (let i = 0; i < streams.length; i++) {
4874
- pipe(streams[i]);
5122
+ for (let i2 = 0; i2 < streams.length; i2++) {
5123
+ pipe(streams[i2]);
4875
5124
  }
4876
5125
  next();
4877
5126
  }
@@ -4902,8 +5151,8 @@ var require_merge2 = __commonJS({
4902
5151
  }
4903
5152
  streams.pause();
4904
5153
  } else {
4905
- for (let i = 0, len = streams.length; i < len; i++) {
4906
- streams[i] = pauseStreams(streams[i], options);
5154
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5155
+ streams[i2] = pauseStreams(streams[i2], options);
4907
5156
  }
4908
5157
  }
4909
5158
  return streams;
@@ -4985,13 +5234,13 @@ var require_tasks = __commonJS({
4985
5234
  Object.defineProperty(exports, "__esModule", { value: true });
4986
5235
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4987
5236
  var utils = require_utils3();
4988
- function generate(input, settings) {
4989
- const patterns = processPatterns(input, settings);
4990
- const ignore = processPatterns(settings.ignore, settings);
5237
+ function generate(input, settings2) {
5238
+ const patterns = processPatterns(input, settings2);
5239
+ const ignore = processPatterns(settings2.ignore, settings2);
4991
5240
  const positivePatterns = getPositivePatterns(patterns);
4992
5241
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4993
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4994
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5242
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5243
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4995
5244
  const staticTasks = convertPatternsToTasks(
4996
5245
  staticPatterns,
4997
5246
  negativePatterns,
@@ -5007,12 +5256,12 @@ var require_tasks = __commonJS({
5007
5256
  return staticTasks.concat(dynamicTasks);
5008
5257
  }
5009
5258
  exports.generate = generate;
5010
- function processPatterns(input, settings) {
5259
+ function processPatterns(input, settings2) {
5011
5260
  let patterns = input;
5012
- if (settings.braceExpansion) {
5261
+ if (settings2.braceExpansion) {
5013
5262
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
5014
5263
  }
5015
- if (settings.baseNameMatch) {
5264
+ if (settings2.baseNameMatch) {
5016
5265
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
5017
5266
  }
5018
5267
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -5043,7 +5292,7 @@ var require_tasks = __commonJS({
5043
5292
  }
5044
5293
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
5045
5294
  function groupPatternsByBaseDirectory(patterns) {
5046
- const group = {};
5295
+ const group2 = {};
5047
5296
  return patterns.reduce((collection, pattern) => {
5048
5297
  const base = utils.pattern.getBaseDirectory(pattern);
5049
5298
  if (base in collection) {
@@ -5052,7 +5301,7 @@ var require_tasks = __commonJS({
5052
5301
  collection[base] = [pattern];
5053
5302
  }
5054
5303
  return collection;
5055
- }, group);
5304
+ }, group2);
5056
5305
  }
5057
5306
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5058
5307
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5081,26 +5330,26 @@ var require_async = __commonJS({
5081
5330
  init_utils2();
5082
5331
  Object.defineProperty(exports, "__esModule", { value: true });
5083
5332
  exports.read = void 0;
5084
- function read(path, settings, callback) {
5085
- settings.fs.lstat(path, (lstatError, lstat) => {
5333
+ function read(path, settings2, callback) {
5334
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5086
5335
  if (lstatError !== null) {
5087
5336
  callFailureCallback(callback, lstatError);
5088
5337
  return;
5089
5338
  }
5090
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5339
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5091
5340
  callSuccessCallback(callback, lstat);
5092
5341
  return;
5093
5342
  }
5094
- settings.fs.stat(path, (statError, stat) => {
5343
+ settings2.fs.stat(path, (statError, stat) => {
5095
5344
  if (statError !== null) {
5096
- if (settings.throwErrorOnBrokenSymbolicLink) {
5345
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5097
5346
  callFailureCallback(callback, statError);
5098
5347
  return;
5099
5348
  }
5100
5349
  callSuccessCallback(callback, lstat);
5101
5350
  return;
5102
5351
  }
5103
- if (settings.markSymbolicLink) {
5352
+ if (settings2.markSymbolicLink) {
5104
5353
  stat.isSymbolicLink = () => true;
5105
5354
  }
5106
5355
  callSuccessCallback(callback, stat);
@@ -5124,19 +5373,19 @@ var require_sync = __commonJS({
5124
5373
  init_utils2();
5125
5374
  Object.defineProperty(exports, "__esModule", { value: true });
5126
5375
  exports.read = void 0;
5127
- function read(path, settings) {
5128
- const lstat = settings.fs.lstatSync(path);
5129
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5376
+ function read(path, settings2) {
5377
+ const lstat = settings2.fs.lstatSync(path);
5378
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5130
5379
  return lstat;
5131
5380
  }
5132
5381
  try {
5133
- const stat = settings.fs.statSync(path);
5134
- if (settings.markSymbolicLink) {
5382
+ const stat = settings2.fs.statSync(path);
5383
+ if (settings2.markSymbolicLink) {
5135
5384
  stat.isSymbolicLink = () => true;
5136
5385
  }
5137
5386
  return stat;
5138
5387
  } catch (error2) {
5139
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5388
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5140
5389
  return lstat;
5141
5390
  }
5142
5391
  throw error2;
@@ -5213,8 +5462,8 @@ var require_out = __commonJS({
5213
5462
  }
5214
5463
  exports.stat = stat;
5215
5464
  function statSync3(path, optionsOrSettings) {
5216
- const settings = getSettings(optionsOrSettings);
5217
- return sync.read(path, settings);
5465
+ const settings2 = getSettings(optionsOrSettings);
5466
+ return sync.read(path, settings2);
5218
5467
  }
5219
5468
  exports.statSync = statSync3;
5220
5469
  function getSettings(settingsOrOptions = {}) {
@@ -5262,8 +5511,8 @@ var require_run_parallel = __commonJS({
5262
5511
  if (isSync) queueMicrotask2(end);
5263
5512
  else end();
5264
5513
  }
5265
- function each(i, err, result) {
5266
- results[i] = result;
5514
+ function each(i2, err, result) {
5515
+ results[i2] = result;
5267
5516
  if (--pending === 0 || err) {
5268
5517
  done(err);
5269
5518
  }
@@ -5277,9 +5526,9 @@ var require_run_parallel = __commonJS({
5277
5526
  });
5278
5527
  });
5279
5528
  } else {
5280
- tasks.forEach(function(task, i) {
5529
+ tasks.forEach(function(task, i2) {
5281
5530
  task(function(err, result) {
5282
- each(i, err, result);
5531
+ each(i2, err, result);
5283
5532
  });
5284
5533
  });
5285
5534
  }
@@ -5354,11 +5603,11 @@ var require_common = __commonJS({
5354
5603
  init_utils2();
5355
5604
  Object.defineProperty(exports, "__esModule", { value: true });
5356
5605
  exports.joinPathSegments = void 0;
5357
- function joinPathSegments(a, b, separator) {
5358
- if (a.endsWith(separator)) {
5359
- return a + b;
5606
+ function joinPathSegments(a2, b, separator) {
5607
+ if (a2.endsWith(separator)) {
5608
+ return a2 + b;
5360
5609
  }
5361
- return a + separator + b;
5610
+ return a2 + separator + b;
5362
5611
  }
5363
5612
  exports.joinPathSegments = joinPathSegments;
5364
5613
  }
@@ -5376,16 +5625,16 @@ var require_async2 = __commonJS({
5376
5625
  var constants_1 = require_constants3();
5377
5626
  var utils = require_utils4();
5378
5627
  var common = require_common();
5379
- function read(directory, settings, callback) {
5380
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5381
- readdirWithFileTypes(directory, settings, callback);
5628
+ function read(directory, settings2, callback) {
5629
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5630
+ readdirWithFileTypes(directory, settings2, callback);
5382
5631
  return;
5383
5632
  }
5384
- readdir(directory, settings, callback);
5633
+ readdir(directory, settings2, callback);
5385
5634
  }
5386
5635
  exports.read = read;
5387
- function readdirWithFileTypes(directory, settings, callback) {
5388
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5636
+ function readdirWithFileTypes(directory, settings2, callback) {
5637
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5389
5638
  if (readdirError !== null) {
5390
5639
  callFailureCallback(callback, readdirError);
5391
5640
  return;
@@ -5393,13 +5642,13 @@ var require_async2 = __commonJS({
5393
5642
  const entries = dirents.map((dirent) => ({
5394
5643
  dirent,
5395
5644
  name: dirent.name,
5396
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5645
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5397
5646
  }));
5398
- if (!settings.followSymbolicLinks) {
5647
+ if (!settings2.followSymbolicLinks) {
5399
5648
  callSuccessCallback(callback, entries);
5400
5649
  return;
5401
5650
  }
5402
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5651
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5403
5652
  rpl(tasks, (rplError, rplEntries) => {
5404
5653
  if (rplError !== null) {
5405
5654
  callFailureCallback(callback, rplError);
@@ -5410,15 +5659,15 @@ var require_async2 = __commonJS({
5410
5659
  });
5411
5660
  }
5412
5661
  exports.readdirWithFileTypes = readdirWithFileTypes;
5413
- function makeRplTaskEntry(entry, settings) {
5662
+ function makeRplTaskEntry(entry, settings2) {
5414
5663
  return (done) => {
5415
5664
  if (!entry.dirent.isSymbolicLink()) {
5416
5665
  done(null, entry);
5417
5666
  return;
5418
5667
  }
5419
- settings.fs.stat(entry.path, (statError, stats) => {
5668
+ settings2.fs.stat(entry.path, (statError, stats) => {
5420
5669
  if (statError !== null) {
5421
- if (settings.throwErrorOnBrokenSymbolicLink) {
5670
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5422
5671
  done(statError);
5423
5672
  return;
5424
5673
  }
@@ -5430,16 +5679,16 @@ var require_async2 = __commonJS({
5430
5679
  });
5431
5680
  };
5432
5681
  }
5433
- function readdir(directory, settings, callback) {
5434
- settings.fs.readdir(directory, (readdirError, names) => {
5682
+ function readdir(directory, settings2, callback) {
5683
+ settings2.fs.readdir(directory, (readdirError, names) => {
5435
5684
  if (readdirError !== null) {
5436
5685
  callFailureCallback(callback, readdirError);
5437
5686
  return;
5438
5687
  }
5439
5688
  const tasks = names.map((name) => {
5440
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5689
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5441
5690
  return (done) => {
5442
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5691
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5443
5692
  if (error2 !== null) {
5444
5693
  done(error2);
5445
5694
  return;
@@ -5449,7 +5698,7 @@ var require_async2 = __commonJS({
5449
5698
  path,
5450
5699
  dirent: utils.fs.createDirentFromStats(name, stats)
5451
5700
  };
5452
- if (settings.stats) {
5701
+ if (settings2.stats) {
5453
5702
  entry.stats = stats;
5454
5703
  }
5455
5704
  done(null, entry);
@@ -5486,27 +5735,27 @@ var require_sync2 = __commonJS({
5486
5735
  var constants_1 = require_constants3();
5487
5736
  var utils = require_utils4();
5488
5737
  var common = require_common();
5489
- function read(directory, settings) {
5490
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5491
- return readdirWithFileTypes(directory, settings);
5738
+ function read(directory, settings2) {
5739
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5740
+ return readdirWithFileTypes(directory, settings2);
5492
5741
  }
5493
- return readdir(directory, settings);
5742
+ return readdir(directory, settings2);
5494
5743
  }
5495
5744
  exports.read = read;
5496
- function readdirWithFileTypes(directory, settings) {
5497
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5745
+ function readdirWithFileTypes(directory, settings2) {
5746
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5498
5747
  return dirents.map((dirent) => {
5499
5748
  const entry = {
5500
5749
  dirent,
5501
5750
  name: dirent.name,
5502
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5751
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5503
5752
  };
5504
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5753
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5505
5754
  try {
5506
- const stats = settings.fs.statSync(entry.path);
5755
+ const stats = settings2.fs.statSync(entry.path);
5507
5756
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5508
5757
  } catch (error2) {
5509
- if (settings.throwErrorOnBrokenSymbolicLink) {
5758
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5510
5759
  throw error2;
5511
5760
  }
5512
5761
  }
@@ -5515,17 +5764,17 @@ var require_sync2 = __commonJS({
5515
5764
  });
5516
5765
  }
5517
5766
  exports.readdirWithFileTypes = readdirWithFileTypes;
5518
- function readdir(directory, settings) {
5519
- const names = settings.fs.readdirSync(directory);
5767
+ function readdir(directory, settings2) {
5768
+ const names = settings2.fs.readdirSync(directory);
5520
5769
  return names.map((name) => {
5521
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5522
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5770
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5771
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5523
5772
  const entry = {
5524
5773
  name,
5525
5774
  path: entryPath,
5526
5775
  dirent: utils.fs.createDirentFromStats(name, stats)
5527
5776
  };
5528
- if (settings.stats) {
5777
+ if (settings2.stats) {
5529
5778
  entry.stats = stats;
5530
5779
  }
5531
5780
  return entry;
@@ -5612,8 +5861,8 @@ var require_out2 = __commonJS({
5612
5861
  }
5613
5862
  exports.scandir = scandir;
5614
5863
  function scandirSync(path, optionsOrSettings) {
5615
- const settings = getSettings(optionsOrSettings);
5616
- return sync.read(path, settings);
5864
+ const settings2 = getSettings(optionsOrSettings);
5865
+ return sync.read(path, settings2);
5617
5866
  }
5618
5867
  exports.scandirSync = scandirSync;
5619
5868
  function getSettings(settingsOrOptions = {}) {
@@ -5894,7 +6143,7 @@ var require_queue = __commonJS({
5894
6143
  queue.drained = drained;
5895
6144
  return queue;
5896
6145
  function push(value) {
5897
- var p2 = new Promise(function(resolve4, reject) {
6146
+ var p = new Promise(function(resolve4, reject) {
5898
6147
  pushCb(value, function(err, result) {
5899
6148
  if (err) {
5900
6149
  reject(err);
@@ -5903,11 +6152,11 @@ var require_queue = __commonJS({
5903
6152
  resolve4(result);
5904
6153
  });
5905
6154
  });
5906
- p2.catch(noop);
5907
- return p2;
6155
+ p.catch(noop);
6156
+ return p;
5908
6157
  }
5909
6158
  function unshift(value) {
5910
- var p2 = new Promise(function(resolve4, reject) {
6159
+ var p = new Promise(function(resolve4, reject) {
5911
6160
  unshiftCb(value, function(err, result) {
5912
6161
  if (err) {
5913
6162
  reject(err);
@@ -5916,11 +6165,11 @@ var require_queue = __commonJS({
5916
6165
  resolve4(result);
5917
6166
  });
5918
6167
  });
5919
- p2.catch(noop);
5920
- return p2;
6168
+ p.catch(noop);
6169
+ return p;
5921
6170
  }
5922
6171
  function drained() {
5923
- var p2 = new Promise(function(resolve4) {
6172
+ var p = new Promise(function(resolve4) {
5924
6173
  process.nextTick(function() {
5925
6174
  if (queue.idle()) {
5926
6175
  resolve4();
@@ -5934,7 +6183,7 @@ var require_queue = __commonJS({
5934
6183
  }
5935
6184
  });
5936
6185
  });
5937
- return p2;
6186
+ return p;
5938
6187
  }
5939
6188
  }
5940
6189
  module.exports = fastqueue;
@@ -5949,11 +6198,11 @@ var require_common2 = __commonJS({
5949
6198
  init_utils2();
5950
6199
  Object.defineProperty(exports, "__esModule", { value: true });
5951
6200
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5952
- function isFatalError(settings, error2) {
5953
- if (settings.errorFilter === null) {
6201
+ function isFatalError(settings2, error2) {
6202
+ if (settings2.errorFilter === null) {
5954
6203
  return true;
5955
6204
  }
5956
- return !settings.errorFilter(error2);
6205
+ return !settings2.errorFilter(error2);
5957
6206
  }
5958
6207
  exports.isFatalError = isFatalError;
5959
6208
  function isAppliedFilter(filter, value) {
@@ -5964,14 +6213,14 @@ var require_common2 = __commonJS({
5964
6213
  return filepath.split(/[/\\]/).join(separator);
5965
6214
  }
5966
6215
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5967
- function joinPathSegments(a, b, separator) {
5968
- if (a === "") {
6216
+ function joinPathSegments(a2, b, separator) {
6217
+ if (a2 === "") {
5969
6218
  return b;
5970
6219
  }
5971
- if (a.endsWith(separator)) {
5972
- return a + b;
6220
+ if (a2.endsWith(separator)) {
6221
+ return a2 + b;
5973
6222
  }
5974
- return a + separator + b;
6223
+ return a2 + separator + b;
5975
6224
  }
5976
6225
  exports.joinPathSegments = joinPathSegments;
5977
6226
  }
@@ -6318,14 +6567,14 @@ var require_out3 = __commonJS({
6318
6567
  }
6319
6568
  exports.walk = walk;
6320
6569
  function walkSync(directory, optionsOrSettings) {
6321
- const settings = getSettings(optionsOrSettings);
6322
- const provider = new sync_1.default(directory, settings);
6570
+ const settings2 = getSettings(optionsOrSettings);
6571
+ const provider = new sync_1.default(directory, settings2);
6323
6572
  return provider.read();
6324
6573
  }
6325
6574
  exports.walkSync = walkSync;
6326
6575
  function walkStream(directory, optionsOrSettings) {
6327
- const settings = getSettings(optionsOrSettings);
6328
- const provider = new stream_1.default(directory, settings);
6576
+ const settings2 = getSettings(optionsOrSettings);
6577
+ const provider = new stream_1.default(directory, settings2);
6329
6578
  return provider.read();
6330
6579
  }
6331
6580
  exports.walkStream = walkStream;
@@ -6411,8 +6660,8 @@ var require_stream3 = __commonJS({
6411
6660
  done();
6412
6661
  }).catch(done);
6413
6662
  };
6414
- for (let i = 0; i < filepaths.length; i++) {
6415
- stream.write(i);
6663
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6664
+ stream.write(i2);
6416
6665
  }
6417
6666
  return stream;
6418
6667
  }
@@ -7073,14 +7322,14 @@ var require_out4 = __commonJS({
7073
7322
  function generateTasks(source, options) {
7074
7323
  assertPatternsInput(source);
7075
7324
  const patterns = [].concat(source);
7076
- const settings = new settings_1.default(options);
7077
- return taskManager.generate(patterns, settings);
7325
+ const settings2 = new settings_1.default(options);
7326
+ return taskManager.generate(patterns, settings2);
7078
7327
  }
7079
7328
  FastGlob2.generateTasks = generateTasks;
7080
7329
  function isDynamicPattern(source, options) {
7081
7330
  assertPatternsInput(source);
7082
- const settings = new settings_1.default(options);
7083
- return utils.pattern.isDynamicPattern(source, settings);
7331
+ const settings2 = new settings_1.default(options);
7332
+ return utils.pattern.isDynamicPattern(source, settings2);
7084
7333
  }
7085
7334
  FastGlob2.isDynamicPattern = isDynamicPattern;
7086
7335
  function escapePath(source) {
@@ -7122,9 +7371,9 @@ var require_out4 = __commonJS({
7122
7371
  })(FastGlob || (FastGlob = {}));
7123
7372
  function getWorks(source, _Provider, options) {
7124
7373
  const patterns = [].concat(source);
7125
- const settings = new settings_1.default(options);
7126
- const tasks = taskManager.generate(patterns, settings);
7127
- const provider = new _Provider(settings);
7374
+ const settings2 = new settings_1.default(options);
7375
+ const tasks = taskManager.generate(patterns, settings2);
7376
+ const provider = new _Provider(settings2);
7128
7377
  return tasks.map(provider.read, provider);
7129
7378
  }
7130
7379
  function assertPatternsInput(input) {
@@ -7302,8 +7551,8 @@ import "node:fs";
7302
7551
  import { createRequire } from "node:module";
7303
7552
  import {
7304
7553
  resolve,
7305
- join,
7306
- dirname,
7554
+ join as join2,
7555
+ dirname as dirname2,
7307
7556
  relative,
7308
7557
  normalize,
7309
7558
  sep,
@@ -7317,7 +7566,7 @@ function safeExecuteAsync(fn, message) {
7317
7566
  );
7318
7567
  });
7319
7568
  }
7320
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7569
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7321
7570
  var init_PathResolver = __esm({
7322
7571
  "packages/core/config/utils/PathResolver.ts"() {
7323
7572
  "use strict";
@@ -7330,7 +7579,7 @@ var init_PathResolver = __esm({
7330
7579
  getPatternsFor: getPatternsFor || void 0,
7331
7580
  I18N_PATHS: I18N_PATHS || void 0
7332
7581
  };
7333
- log2 = {
7582
+ log3 = {
7334
7583
  error: (message, error2) => {
7335
7584
  },
7336
7585
  warn: (message, error2) => {
@@ -7451,7 +7700,7 @@ var init_PathResolver = __esm({
7451
7700
  */
7452
7701
  getDirname(path) {
7453
7702
  if (!path) return "";
7454
- return this.normalizePath(dirname(path));
7703
+ return this.normalizePath(dirname2(path));
7455
7704
  }
7456
7705
  /**
7457
7706
  * Resolve package path using Node's module resolution
@@ -7463,7 +7712,7 @@ var init_PathResolver = __esm({
7463
7712
  resolvePackage(packageSpecifier, fromPath = null) {
7464
7713
  try {
7465
7714
  const basePath = fromPath || this.getAppRoot();
7466
- const require3 = createRequire(join(basePath, "package.json"));
7715
+ const require3 = createRequire(join2(basePath, "package.json"));
7467
7716
  const resolved = require3.resolve(packageSpecifier);
7468
7717
  return this.normalizePath(resolved);
7469
7718
  } catch (error2) {
@@ -7615,7 +7864,7 @@ var init_PathResolver = __esm({
7615
7864
  return cleanContent;
7616
7865
  } catch (error2) {
7617
7866
  if (this.options.debug) {
7618
- log2.warn(`Failed to read file: ${filePath}`, error2);
7867
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7619
7868
  }
7620
7869
  return null;
7621
7870
  }
@@ -7643,7 +7892,7 @@ var init_PathResolver = __esm({
7643
7892
  return cleanContent;
7644
7893
  } catch (error2) {
7645
7894
  if (this.options.debug) {
7646
- log2.warn(`Failed to read file: ${filePath}`, error2);
7895
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7647
7896
  }
7648
7897
  return null;
7649
7898
  }
@@ -7665,16 +7914,16 @@ var init_PathResolver = __esm({
7665
7914
  verbose = false
7666
7915
  } = options;
7667
7916
  const normalizedPath = this.normalizePath(filePath);
7668
- const dir = this.normalizePath(dirname(normalizedPath));
7917
+ const dir = this.normalizePath(dirname2(normalizedPath));
7669
7918
  const fileExists = this.pathExists(normalizedPath);
7670
7919
  if (fileExists && !overwrite) {
7671
7920
  if (verbose) {
7672
- log2.info(`Skipping existing file: ${normalizedPath}`);
7921
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7673
7922
  }
7674
7923
  return false;
7675
7924
  }
7676
7925
  if (dryRun) {
7677
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7926
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7678
7927
  return true;
7679
7928
  }
7680
7929
  try {
@@ -7699,7 +7948,7 @@ var init_PathResolver = __esm({
7699
7948
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7700
7949
  }
7701
7950
  if (verbose) {
7702
- log2.info(
7951
+ log3.info(
7703
7952
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7704
7953
  );
7705
7954
  }
@@ -7726,16 +7975,16 @@ var init_PathResolver = __esm({
7726
7975
  verbose = false
7727
7976
  } = options;
7728
7977
  const normalizedPath = this.normalizePath(filePath);
7729
- const dir = this.normalizePath(dirname(normalizedPath));
7978
+ const dir = this.normalizePath(dirname2(normalizedPath));
7730
7979
  const fileExists = this.pathExists(normalizedPath);
7731
7980
  if (fileExists && !overwrite) {
7732
7981
  if (verbose) {
7733
- log2.info(`Skipping existing file: ${normalizedPath}`);
7982
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7734
7983
  }
7735
7984
  return false;
7736
7985
  }
7737
7986
  if (dryRun) {
7738
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7987
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7739
7988
  return true;
7740
7989
  }
7741
7990
  try {
@@ -7759,7 +8008,7 @@ var init_PathResolver = __esm({
7759
8008
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7760
8009
  }
7761
8010
  if (verbose) {
7762
- log2.info(
8011
+ log3.info(
7763
8012
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7764
8013
  );
7765
8014
  }
@@ -7784,15 +8033,15 @@ var init_PathResolver = __esm({
7784
8033
  const fileExists = this.pathExists(normalizedDestPath);
7785
8034
  if (fileExists && !overwrite) {
7786
8035
  if (verbose) {
7787
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8036
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7788
8037
  }
7789
8038
  return false;
7790
8039
  }
7791
8040
  if (dryRun) {
7792
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8041
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7793
8042
  return true;
7794
8043
  }
7795
- const dir = this.normalizePath(dirname(normalizedDestPath));
8044
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7796
8045
  try {
7797
8046
  await fs.promises.mkdir(dir, { recursive: true });
7798
8047
  } catch (error2) {
@@ -7802,7 +8051,7 @@ var init_PathResolver = __esm({
7802
8051
  return await safeExecuteAsync(async () => {
7803
8052
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7804
8053
  if (verbose) {
7805
- log2.info(
8054
+ log3.info(
7806
8055
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7807
8056
  );
7808
8057
  }
@@ -7826,15 +8075,15 @@ var init_PathResolver = __esm({
7826
8075
  const fileExists = this.pathExists(normalizedDestPath);
7827
8076
  if (fileExists && !overwrite) {
7828
8077
  if (verbose) {
7829
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8078
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7830
8079
  }
7831
8080
  return false;
7832
8081
  }
7833
8082
  if (dryRun) {
7834
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8083
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7835
8084
  return true;
7836
8085
  }
7837
- const dir = this.normalizePath(dirname(normalizedDestPath));
8086
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7838
8087
  try {
7839
8088
  fs.mkdirSync(dir, { recursive: true });
7840
8089
  } catch (error2) {
@@ -7843,7 +8092,7 @@ var init_PathResolver = __esm({
7843
8092
  try {
7844
8093
  fs.copyFileSync(srcPath, normalizedDestPath);
7845
8094
  if (verbose) {
7846
- log2.info(
8095
+ log3.info(
7847
8096
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7848
8097
  );
7849
8098
  }
@@ -7860,7 +8109,7 @@ var init_PathResolver = __esm({
7860
8109
  return fs.existsSync(filePath);
7861
8110
  } catch (error2) {
7862
8111
  if (!silent) {
7863
- log2.error(`Error checking path existence: ${filePath}`, error2);
8112
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7864
8113
  }
7865
8114
  return false;
7866
8115
  }
@@ -7886,7 +8135,7 @@ var init_PathResolver = __esm({
7886
8135
  return fs.readdirSync(dirPath, options);
7887
8136
  } catch (error2) {
7888
8137
  if (this.options.debug) {
7889
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8138
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7890
8139
  }
7891
8140
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7892
8141
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7904,7 +8153,7 @@ var init_PathResolver = __esm({
7904
8153
  return fs.statSync(filePath);
7905
8154
  } catch (error2) {
7906
8155
  if (this.options.debug) {
7907
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8156
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7908
8157
  }
7909
8158
  return null;
7910
8159
  }
@@ -7921,7 +8170,7 @@ var init_PathResolver = __esm({
7921
8170
  return fs.lstatSync(filePath);
7922
8171
  } catch (error2) {
7923
8172
  if (this.options.debug) {
7924
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8173
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7925
8174
  }
7926
8175
  return null;
7927
8176
  }
@@ -8010,7 +8259,7 @@ var init_PathResolver = __esm({
8010
8259
  * @returns True if repoRoot is the monorepo (has packages directory)
8011
8260
  */
8012
8261
  isMonorepo() {
8013
- const packagesDir = join(this._repoRoot, "packages");
8262
+ const packagesDir = join2(this._repoRoot, "packages");
8014
8263
  return this.pathExists(packagesDir);
8015
8264
  }
8016
8265
  /**
@@ -8027,7 +8276,7 @@ var init_PathResolver = __esm({
8027
8276
  * Find files matching pattern within directory
8028
8277
  */
8029
8278
  async findFiles(directory, pattern, options = {}) {
8030
- const searchPattern = this.normalizePath(join(directory, pattern));
8279
+ const searchPattern = this.normalizePath(join2(directory, pattern));
8031
8280
  const appRoot = this.getAppRoot();
8032
8281
  const normalizeAppRoot = this.normalizePath(appRoot);
8033
8282
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8074,7 +8323,7 @@ var init_PathResolver = __esm({
8074
8323
  return null;
8075
8324
  }
8076
8325
  const resolvedPath = this.normalizePath(
8077
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8326
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8078
8327
  );
8079
8328
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8080
8329
  if (this.pathExists(resolvedDir)) {
@@ -8270,13 +8519,13 @@ var init_PathResolver = __esm({
8270
8519
  const maxLevels = this.options.maxLevels;
8271
8520
  while (levelsChecked < maxLevels) {
8272
8521
  const toolingPath = this.normalizePath(
8273
- join(currentDir, PACKAGE_PATHS.TOOLING)
8522
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8274
8523
  );
8275
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8524
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8276
8525
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8277
8526
  return currentDir;
8278
8527
  }
8279
- const appsDir = join(currentDir, "apps");
8528
+ const appsDir = join2(currentDir, "apps");
8280
8529
  if (this.pathExists(appsDir)) {
8281
8530
  const appsDirStat = this.statSync(appsDir);
8282
8531
  if (appsDirStat?.isDirectory()) {
@@ -8284,15 +8533,15 @@ var init_PathResolver = __esm({
8284
8533
  }
8285
8534
  }
8286
8535
  const packageJsonPath = this.normalizePath(
8287
- join(currentDir, "package.json")
8536
+ join2(currentDir, "package.json")
8288
8537
  );
8289
8538
  if (this.pathExists(packageJsonPath)) {
8290
- const parentDir2 = this.normalizePath(dirname(currentDir));
8539
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8291
8540
  if (parentDir2 === currentDir) {
8292
8541
  return currentDir;
8293
8542
  }
8294
8543
  }
8295
- const parentDir = this.normalizePath(dirname(currentDir));
8544
+ const parentDir = this.normalizePath(dirname2(currentDir));
8296
8545
  if (parentDir === currentDir) {
8297
8546
  break;
8298
8547
  }
@@ -8308,8 +8557,8 @@ var init_PathResolver = __esm({
8308
8557
  // packages/tooling/src/utils/pathResolver.ts
8309
8558
  import { createRequire as createRequire2 } from "node:module";
8310
8559
  import {
8311
- join as join2,
8312
- dirname as dirname2,
8560
+ join as join3,
8561
+ dirname as dirname3,
8313
8562
  basename as basename2,
8314
8563
  extname as extname2,
8315
8564
  relative as relative2,
@@ -8318,7 +8567,7 @@ import {
8318
8567
  isAbsolute as pathIsAbsolute
8319
8568
  } from "node:path";
8320
8569
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8321
- function readdirSync2(dirPath, options) {
8570
+ function readdirSync3(dirPath, options) {
8322
8571
  return pathResolverInstance.readdirSync(dirPath, options);
8323
8572
  }
8324
8573
  var pathResolverInstance, getRepoRoot, getAppRoot, normalizePath, pathExists, readSync, write, statSync2, ensureDir, joinPath;
@@ -8331,7 +8580,7 @@ var init_pathResolver = __esm({
8331
8580
  getRepoRoot = () => pathResolverInstance.getRepoRoot();
8332
8581
  getAppRoot = () => pathResolverInstance.getAppRoot();
8333
8582
  normalizePath = (...pathSegments) => {
8334
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8583
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8335
8584
  };
8336
8585
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8337
8586
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -8390,7 +8639,7 @@ var init_typed_file_operations = __esm({
8390
8639
  import { Buffer } from "node:buffer";
8391
8640
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8392
8641
  import { createRequire as createRequire3 } from "node:module";
8393
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8642
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8394
8643
  import process from "node:process";
8395
8644
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8396
8645
  var require2, __filename, __dirname;
@@ -8399,7 +8648,7 @@ var init_utils2 = __esm({
8399
8648
  "use strict";
8400
8649
  require2 = createRequire3(import.meta.url);
8401
8650
  __filename = fileURLToPath3(import.meta.url);
8402
- __dirname = dirname3(__filename);
8651
+ __dirname = dirname4(__filename);
8403
8652
  if (typeof globalThis !== "undefined") {
8404
8653
  globalThis.require = require2;
8405
8654
  globalThis.__filename = __filename;
@@ -8581,12 +8830,12 @@ var init_app_detection = __esm({
8581
8830
 
8582
8831
  // packages/tooling/src/utils/cli-input.ts
8583
8832
  async function askForConfirmation(message, defaultValue = false) {
8584
- const result = await ot2({
8833
+ const result = await confirm({
8585
8834
  message,
8586
8835
  initialValue: defaultValue
8587
8836
  });
8588
- if (q(result)) {
8589
- pt("Operation cancelled.");
8837
+ if (isCancel(result)) {
8838
+ cancel("Operation cancelled.");
8590
8839
  process.exit(0);
8591
8840
  }
8592
8841
  return result;
@@ -8597,13 +8846,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
8597
8846
  label: choice.title,
8598
8847
  hint: choice.hint
8599
8848
  }));
8600
- const result = await _t({
8849
+ const result = await select({
8601
8850
  message,
8602
8851
  options,
8603
8852
  initialValue: choices[defaultValue]?.value
8604
8853
  });
8605
- if (q(result)) {
8606
- pt("Operation cancelled.");
8854
+ if (isCancel(result)) {
8855
+ cancel("Operation cancelled.");
8607
8856
  process.exit(0);
8608
8857
  }
8609
8858
  return result;
@@ -8688,7 +8937,7 @@ function resolveSecret(name, projectRoot, opts) {
8688
8937
  if (value) {
8689
8938
  if (!opts?.silent && !warnedLegacy.has(name)) {
8690
8939
  warnedLegacy.add(name);
8691
- log.warn(
8940
+ log2.warn(
8692
8941
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8693
8942
  );
8694
8943
  }
@@ -8699,7 +8948,7 @@ function resolveSecret(name, projectRoot, opts) {
8699
8948
  if (aliasValue) {
8700
8949
  if (!opts?.silent && !warnedLegacy.has(name)) {
8701
8950
  warnedLegacy.add(name);
8702
- log.warn(
8951
+ log2.warn(
8703
8952
  `${name} found in ${relPath} (legacy). Move it to .dndev.secrets at project root.`
8704
8953
  );
8705
8954
  }
@@ -8787,13 +9036,13 @@ function detectGitHubRepo() {
8787
9036
  }
8788
9037
  function setGitHubSecret(key, value, repo, dryRun = false) {
8789
9038
  if (dryRun) {
8790
- log.info(
9039
+ log2.info(
8791
9040
  `[DRY RUN] Would set GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`
8792
9041
  );
8793
9042
  return;
8794
9043
  }
8795
9044
  try {
8796
- log.info(`Setting GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`);
9045
+ log2.info(`Setting GitHub secret: ${key}${repo ? ` (repo: ${repo})` : ""}`);
8797
9046
  const args = ["secret", "set", key];
8798
9047
  if (repo) {
8799
9048
  args.push("--repo", repo);
@@ -8808,8 +9057,8 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
8808
9057
  }
8809
9058
  if (result.status !== 0) {
8810
9059
  const stderr = result.stderr?.toString() || "";
8811
- const stdout = result.stdout?.toString() || "";
8812
- const errorOutput = stderr || stdout;
9060
+ const stdout2 = result.stdout?.toString() || "";
9061
+ const errorOutput = stderr || stdout2;
8813
9062
  if (errorOutput.includes("not logged in") || errorOutput.includes("authentication")) {
8814
9063
  throw new DoNotDevError(
8815
9064
  `GitHub CLI authentication required. Run 'gh auth login' to authenticate.`,
@@ -8822,10 +9071,10 @@ function setGitHubSecret(key, value, repo, dryRun = false) {
8822
9071
  ${errorOutput}`
8823
9072
  );
8824
9073
  }
8825
- log.success(`GitHub secret ${key} set successfully`);
9074
+ log2.success(`GitHub secret ${key} set successfully`);
8826
9075
  } catch (err) {
8827
9076
  if (err instanceof DoNotDevError) throw err;
8828
- log.error(`Failed to set GitHub secret ${key}:`, err);
9077
+ log2.error(`Failed to set GitHub secret ${key}:`, err);
8829
9078
  throw new DoNotDevError(
8830
9079
  `Failed to set GitHub secret ${key}`,
8831
9080
  "command-failed",
@@ -8844,7 +9093,7 @@ function uploadServiceAccountToGitHub(appDir, repo, dryRun = false, staging = fa
8844
9093
  const secretName = staging ? "FIREBASE_SERVICE_ACCOUNT_STAGING" : "FIREBASE_SERVICE_ACCOUNT";
8845
9094
  const filePath = joinPath(appDir, fileName);
8846
9095
  if (!pathExists(filePath)) {
8847
- log.debug(`No ${fileName} found in ${appDir}, skipping GitHub upload`);
9096
+ log2.debug(`No ${fileName} found in ${appDir}, skipping GitHub upload`);
8848
9097
  return;
8849
9098
  }
8850
9099
  const contentRaw = readSync(filePath, { format: "text" });
@@ -8883,7 +9132,7 @@ function detectAvailableApps() {
8883
9132
  if (!pathExists(appsDir)) {
8884
9133
  return [];
8885
9134
  }
8886
- return readdirSync2(appsDir).filter((item) => {
9135
+ return readdirSync3(appsDir).filter((item) => {
8887
9136
  const itemPath = joinPath(appsDir, item);
8888
9137
  const stat = statSync2(itemPath);
8889
9138
  return stat?.isDirectory() === true;
@@ -8897,7 +9146,7 @@ function detectAvailableApps() {
8897
9146
  }
8898
9147
  function readStagingProject(startDir) {
8899
9148
  let current = startDir;
8900
- for (let i = 0; i < 10; i++) {
9149
+ for (let i2 = 0; i2 < 10; i2++) {
8901
9150
  const firebasercPath = joinPath(current, ".firebaserc");
8902
9151
  if (pathExists(firebasercPath)) {
8903
9152
  try {
@@ -8920,8 +9169,8 @@ init_utils2();
8920
9169
  import { execSync } from "node:child_process";
8921
9170
  init_sync_secrets();
8922
9171
  init_vercel_token();
8923
- init_pathResolver();
8924
9172
  init_app_detection();
9173
+ init_pathResolver();
8925
9174
  init_secrets_resolver();
8926
9175
  function isGhCliAvailable() {
8927
9176
  try {
@@ -9089,7 +9338,7 @@ jobs:
9089
9338
  }
9090
9339
  function generateDeployWorkflow(providers, envSecretNames) {
9091
9340
  const appName = providers.name;
9092
- const envBlock = envSecretNames.filter((n) => n.startsWith("VITE_") || n.startsWith("NEXT_PUBLIC_")).map((n) => ` ${n}: \${{ secrets.${n} }}`).join("\n");
9341
+ const envBlock = envSecretNames.filter((n3) => n3.startsWith("VITE_") || n3.startsWith("NEXT_PUBLIC_")).map((n3) => ` ${n3}: \${{ secrets.${n3} }}`).join("\n");
9093
9342
  let steps = ` - name: Checkout repository
9094
9343
  uses: actions/checkout@v4
9095
9344
 
@@ -9191,7 +9440,7 @@ ${steps}
9191
9440
  }
9192
9441
  function generateStagingWorkflow(providers, envSecretNames) {
9193
9442
  const appName = providers.name;
9194
- const envBlock = envSecretNames.filter((n) => n.startsWith("VITE_") || n.startsWith("NEXT_PUBLIC_")).map((n) => ` ${n}: \${{ secrets.${n} }}`).join("\n");
9443
+ const envBlock = envSecretNames.filter((n3) => n3.startsWith("VITE_") || n3.startsWith("NEXT_PUBLIC_")).map((n3) => ` ${n3}: \${{ secrets.${n3} }}`).join("\n");
9195
9444
  let steps = ` - name: Checkout repository
9196
9445
  uses: actions/checkout@v4
9197
9446
 
@@ -9278,50 +9527,50 @@ ${steps}
9278
9527
  }
9279
9528
  async function main(options = {}) {
9280
9529
  const dryRun = options.dryRun ?? false;
9281
- mt("CI/CD Setup");
9530
+ intro("CI/CD Setup");
9282
9531
  if (!isGhCliAvailable()) {
9283
- log.error(
9532
+ log2.error(
9284
9533
  "GitHub CLI (gh) is required.\nInstall: https://cli.github.com/\nThen: gh auth login"
9285
9534
  );
9286
9535
  return 1;
9287
9536
  }
9288
9537
  if (!isGhAuthenticated()) {
9289
- log.error("GitHub CLI not authenticated.\nRun: gh auth login");
9538
+ log2.error("GitHub CLI not authenticated.\nRun: gh auth login");
9290
9539
  return 1;
9291
9540
  }
9292
9541
  const repo = detectGitHubRepo();
9293
9542
  if (!repo) {
9294
- log.error(
9543
+ log2.error(
9295
9544
  "Could not detect GitHub repository from git remote.\nEnsure a GitHub remote is configured."
9296
9545
  );
9297
9546
  return 1;
9298
9547
  }
9299
9548
  if (dryRun) {
9300
- log.info("DRY RUN MODE \u2014 no secrets will be uploaded, no files written");
9549
+ log2.info("DRY RUN MODE \u2014 no secrets will be uploaded, no files written");
9301
9550
  }
9302
9551
  const projectRoot = getAppRoot();
9303
9552
  let appName = options.app;
9304
9553
  if (!appName) {
9305
9554
  const availableApps = detectAvailableApps();
9306
9555
  if (availableApps.length === 0) {
9307
- log.error(
9556
+ log2.error(
9308
9557
  "No apps found with firebase.json, supabase/, or vercel.json.\nRun from a DoNotDev project with at least one configured app."
9309
9558
  );
9310
9559
  return 1;
9311
9560
  }
9312
9561
  if (availableApps.length === 1) {
9313
9562
  appName = availableApps[0];
9314
- wt(`Using app: ${appName}`, "Auto-detected");
9563
+ note(`Using app: ${appName}`, "Auto-detected");
9315
9564
  } else {
9316
9565
  appName = await askForSelection(
9317
9566
  "Which app to set up CI/CD for?",
9318
- availableApps.map((a) => ({ title: a, value: a }))
9567
+ availableApps.map((a2) => ({ title: a2, value: a2 }))
9319
9568
  );
9320
9569
  }
9321
9570
  }
9322
9571
  const appDir = joinPath(projectRoot, "apps", appName);
9323
9572
  if (!pathExists(appDir)) {
9324
- log.error(`App directory not found: ${appDir}`);
9573
+ log2.error(`App directory not found: ${appDir}`);
9325
9574
  return 1;
9326
9575
  }
9327
9576
  const providers = detectProvider(appDir);
@@ -9354,16 +9603,16 @@ async function main(options = {}) {
9354
9603
  `Staging: ${config.hasStaging ? "yes" : "no"}`,
9355
9604
  "",
9356
9605
  `Workflows to generate:`,
9357
- ...workflows.map((w3) => ` - ${w3}`),
9606
+ ...workflows.map((w) => ` - ${w}`),
9358
9607
  "",
9359
9608
  `Secrets to upload (${secrets.length}):`,
9360
9609
  ...secrets.map(
9361
9610
  (s2) => ` ${s2.source === "MISSING" ? "(!) " : ""}${s2.name} \u2014 ${s2.source}`
9362
9611
  )
9363
9612
  ];
9364
- wt(planLines.join("\n"), "CI/CD Plan");
9613
+ note(planLines.join("\n"), "CI/CD Plan");
9365
9614
  if (missingSecrets.length > 0) {
9366
- log.warn(
9615
+ log2.warn(
9367
9616
  `Missing secrets: ${missingSecrets.map((s2) => s2.name).join(", ")}
9368
9617
  These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9369
9618
  );
@@ -9371,11 +9620,11 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9371
9620
  if (!dryRun) {
9372
9621
  const confirmed = await askForConfirmation("Proceed with CI/CD setup?");
9373
9622
  if (!confirmed) {
9374
- gt("Setup cancelled");
9623
+ outro("Setup cancelled");
9375
9624
  return 0;
9376
9625
  }
9377
9626
  }
9378
- const s = fe();
9627
+ const s = spinner();
9379
9628
  const uploadableSecrets = secrets.filter(
9380
9629
  (sec) => sec.value !== "" && sec.source !== "MISSING" && !sec.value.startsWith("__SERVICE_ACCOUNT")
9381
9630
  );
@@ -9389,7 +9638,7 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9389
9638
  successCount++;
9390
9639
  } catch (err) {
9391
9640
  failCount++;
9392
- log.error(
9641
+ log2.error(
9393
9642
  `Failed: ${sec.name} \u2014 ${err instanceof Error ? err.message : String(err)}`
9394
9643
  );
9395
9644
  }
@@ -9423,23 +9672,23 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9423
9672
  stagingYaml = generateStagingWorkflow(providers, secretNames);
9424
9673
  }
9425
9674
  if (dryRun) {
9426
- log.info("\n--- ci.yml ---");
9427
- log.info(ciYaml);
9428
- log.info("\n--- deploy.yml ---");
9429
- log.info(deployYaml);
9675
+ log2.info("\n--- ci.yml ---");
9676
+ log2.info(ciYaml);
9677
+ log2.info("\n--- deploy.yml ---");
9678
+ log2.info(deployYaml);
9430
9679
  if (stagingYaml) {
9431
- log.info("\n--- deploy-staging.yml ---");
9432
- log.info(stagingYaml);
9680
+ log2.info("\n--- deploy-staging.yml ---");
9681
+ log2.info(stagingYaml);
9433
9682
  }
9434
9683
  } else {
9435
9684
  ensureDir(workflowDir);
9436
9685
  write(joinPath(workflowDir, "ci.yml"), ciYaml);
9437
- log.success("Generated .github/workflows/ci.yml");
9686
+ log2.success("Generated .github/workflows/ci.yml");
9438
9687
  write(joinPath(workflowDir, "deploy.yml"), deployYaml);
9439
- log.success("Generated .github/workflows/deploy.yml");
9688
+ log2.success("Generated .github/workflows/deploy.yml");
9440
9689
  if (stagingYaml) {
9441
9690
  write(joinPath(workflowDir, "deploy-staging.yml"), stagingYaml);
9442
- log.success("Generated .github/workflows/deploy-staging.yml");
9691
+ log2.success("Generated .github/workflows/deploy-staging.yml");
9443
9692
  }
9444
9693
  }
9445
9694
  const nextSteps = [
@@ -9456,8 +9705,8 @@ These will be skipped. Add them to .dndev.secrets or .env and re-run.`
9456
9705
  "Add GH_PAT to .dndev.secrets (needed for private dndev checkout in CI)"
9457
9706
  );
9458
9707
  }
9459
- wt(nextSteps.map((s2, i) => `${i + 1}. ${s2}`).join("\n"), "Next Steps");
9460
- gt(dryRun ? "CI/CD setup preview complete!" : "CI/CD setup complete!");
9708
+ note(nextSteps.map((s2, i2) => `${i2 + 1}. ${s2}`).join("\n"), "Next Steps");
9709
+ outro(dryRun ? "CI/CD setup preview complete!" : "CI/CD setup complete!");
9461
9710
  return 0;
9462
9711
  }
9463
9712
  export {