@donotdev/cli 0.1.44 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
+ get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
@@ -33,31 +33,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
37
- var isAmbiguous, isFullWidth, isWide;
36
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
37
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
38
38
  var init_utils = __esm({
39
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
39
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
40
40
  init_utils2();
41
- isAmbiguous = (x) => {
42
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
43
- };
41
+ getCodePointsLength = /* @__PURE__ */ (() => {
42
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
43
+ return (input) => {
44
+ let surrogatePairsNr = 0;
45
+ SURROGATE_PAIR_RE.lastIndex = 0;
46
+ while (SURROGATE_PAIR_RE.test(input)) {
47
+ surrogatePairsNr += 1;
48
+ }
49
+ return input.length - surrogatePairsNr;
50
+ };
51
+ })();
44
52
  isFullWidth = (x) => {
45
53
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
46
54
  };
47
- isWide = (x) => {
48
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
55
+ isWideNotCJKTNotEmoji = (x) => {
56
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
49
57
  };
50
58
  }
51
59
  });
52
60
 
53
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
54
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
61
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
62
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
55
63
  var init_dist = __esm({
56
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
64
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
57
65
  init_utils2();
58
66
  init_utils();
59
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
67
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
60
68
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
69
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
61
70
  TAB_RE = /\t{1,1000}/y;
62
71
  EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
63
72
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -67,14 +76,21 @@ var init_dist = __esm({
67
76
  const LIMIT = truncationOptions.limit ?? Infinity;
68
77
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
69
78
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
70
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
79
+ const ANSI_WIDTH = 0;
71
80
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
72
81
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
73
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
74
82
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
75
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
83
+ const FULL_WIDTH_WIDTH = 2;
76
84
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
77
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
85
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
86
+ const PARSE_BLOCKS = [
87
+ [LATIN_RE, REGULAR_WIDTH],
88
+ [ANSI_RE, ANSI_WIDTH],
89
+ [CONTROL_RE, CONTROL_WIDTH],
90
+ [TAB_RE, TAB_WIDTH],
91
+ [EMOJI_RE, EMOJI_WIDTH],
92
+ [CJKT_WIDE_RE, WIDE_WIDTH]
93
+ ];
78
94
  let indexPrev = 0;
79
95
  let index = 0;
80
96
  let length = input.length;
@@ -94,10 +110,8 @@ var init_dist = __esm({
94
110
  const codePoint = char.codePointAt(0) || 0;
95
111
  if (isFullWidth(codePoint)) {
96
112
  widthExtra = FULL_WIDTH_WIDTH;
97
- } else if (isWide(codePoint)) {
113
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
98
114
  widthExtra = WIDE_WIDTH;
99
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
100
- widthExtra = AMBIGUOUS_WIDTH;
101
115
  } else {
102
116
  widthExtra = REGULAR_WIDTH;
103
117
  }
@@ -113,88 +127,28 @@ var init_dist = __esm({
113
127
  }
114
128
  unmatchedStart = unmatchedEnd = 0;
115
129
  }
116
- if (index >= length)
117
- break;
118
- LATIN_RE.lastIndex = index;
119
- if (LATIN_RE.test(input)) {
120
- lengthExtra = LATIN_RE.lastIndex - index;
121
- widthExtra = lengthExtra * REGULAR_WIDTH;
122
- if (width + widthExtra > truncationLimit) {
123
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
124
- }
125
- if (width + widthExtra > LIMIT) {
126
- truncationEnabled = true;
127
- break;
128
- }
129
- width += widthExtra;
130
- unmatchedStart = indexPrev;
131
- unmatchedEnd = index;
132
- index = indexPrev = LATIN_RE.lastIndex;
133
- continue;
134
- }
135
- ANSI_RE.lastIndex = index;
136
- if (ANSI_RE.test(input)) {
137
- if (width + ANSI_WIDTH > truncationLimit) {
138
- truncationIndex = Math.min(truncationIndex, index);
139
- }
140
- if (width + ANSI_WIDTH > LIMIT) {
141
- truncationEnabled = true;
142
- break;
143
- }
144
- width += ANSI_WIDTH;
145
- unmatchedStart = indexPrev;
146
- unmatchedEnd = index;
147
- index = indexPrev = ANSI_RE.lastIndex;
148
- continue;
149
- }
150
- CONTROL_RE.lastIndex = index;
151
- if (CONTROL_RE.test(input)) {
152
- lengthExtra = CONTROL_RE.lastIndex - index;
153
- widthExtra = lengthExtra * CONTROL_WIDTH;
154
- if (width + widthExtra > truncationLimit) {
155
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
156
- }
157
- if (width + widthExtra > LIMIT) {
158
- truncationEnabled = true;
159
- break;
160
- }
161
- width += widthExtra;
162
- unmatchedStart = indexPrev;
163
- unmatchedEnd = index;
164
- index = indexPrev = CONTROL_RE.lastIndex;
165
- continue;
130
+ if (index >= length) {
131
+ break outer;
166
132
  }
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, l = PARSE_BLOCKS.length; i2 < l; i2++) {
134
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
135
+ BLOCK_RE.lastIndex = index;
136
+ if (BLOCK_RE.test(input)) {
137
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
138
+ widthExtra = lengthExtra * BLOCK_WIDTH;
139
+ if (width + widthExtra > truncationLimit) {
140
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
141
+ }
142
+ if (width + widthExtra > LIMIT) {
143
+ truncationEnabled = true;
144
+ break outer;
145
+ }
146
+ width += widthExtra;
147
+ unmatchedStart = indexPrev;
148
+ unmatchedEnd = index;
149
+ index = indexPrev = BLOCK_RE.lastIndex;
150
+ continue outer;
192
151
  }
193
- width += EMOJI_WIDTH;
194
- unmatchedStart = indexPrev;
195
- unmatchedEnd = index;
196
- index = indexPrev = EMOJI_RE.lastIndex;
197
- continue;
198
152
  }
199
153
  index += 1;
200
154
  }
@@ -209,10 +163,10 @@ var init_dist = __esm({
209
163
  }
210
164
  });
211
165
 
212
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
166
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
213
167
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
214
168
  var init_dist2 = __esm({
215
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
169
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
216
170
  init_utils2();
217
171
  init_dist();
218
172
  NO_TRUNCATION2 = {
@@ -227,13 +181,13 @@ var init_dist2 = __esm({
227
181
  }
228
182
  });
229
183
 
230
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
184
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
231
185
  function wrapAnsi(string, columns, options) {
232
186
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
233
187
  }
234
188
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
235
189
  var init_main = __esm({
236
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
190
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
237
191
  init_utils2();
238
192
  init_dist2();
239
193
  ESC = "\x1B";
@@ -397,16 +351,19 @@ var init_main = __esm({
397
351
  }
398
352
  const preString = rows.join("\n");
399
353
  let inSurrogate = false;
400
- for (let i = 0; i < preString.length; i++) {
401
- const character = preString[i];
354
+ for (let i2 = 0; i2 < preString.length; i2++) {
355
+ const character = preString[i2];
402
356
  returnValue += character;
403
357
  if (!inSurrogate) {
404
358
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
359
+ if (inSurrogate) {
360
+ continue;
361
+ }
405
362
  } else {
406
- continue;
363
+ inSurrogate = false;
407
364
  }
408
365
  if (character === ESC || character === CSI) {
409
- GROUP_REGEX.lastIndex = i + 1;
366
+ GROUP_REGEX.lastIndex = i2 + 1;
410
367
  const groupsResult = GROUP_REGEX.exec(preString);
411
368
  const groups = groupsResult?.groups;
412
369
  if (groups?.code !== void 0) {
@@ -416,7 +373,7 @@ var init_main = __esm({
416
373
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
417
374
  }
418
375
  }
419
- if (preString[i + 1] === "\n") {
376
+ if (preString[i2 + 1] === "\n") {
420
377
  if (escapeUrl) {
421
378
  returnValue += wrapAnsiHyperlink("");
422
379
  }
@@ -447,7 +404,7 @@ var require_src = __commonJS({
447
404
  var ESC2 = "\x1B";
448
405
  var CSI2 = `${ESC2}[`;
449
406
  var beep = "\x07";
450
- var cursor = {
407
+ var cursor3 = {
451
408
  to(x, y2) {
452
409
  if (!y2) return `${CSI2}${x + 1}G`;
453
410
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -476,7 +433,7 @@ var require_src = __commonJS({
476
433
  up: (count = 1) => `${CSI2}S`.repeat(count),
477
434
  down: (count = 1) => `${CSI2}T`.repeat(count)
478
435
  };
479
- var erase = {
436
+ var erase3 = {
480
437
  screen: `${CSI2}2J`,
481
438
  up: (count = 1) => `${CSI2}1J`.repeat(count),
482
439
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -485,67 +442,137 @@ var require_src = __commonJS({
485
442
  lineStart: `${CSI2}1K`,
486
443
  lines(count) {
487
444
  let clear = "";
488
- for (let i = 0; i < count; i++)
489
- clear += this.line + (i < count - 1 ? cursor.up() : "");
445
+ for (let i2 = 0; i2 < count; i2++)
446
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
490
447
  if (count)
491
- clear += cursor.left;
448
+ clear += cursor3.left;
492
449
  return clear;
493
450
  }
494
451
  };
495
- module.exports = { cursor, scroll, erase, beep };
452
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
496
453
  }
497
454
  });
498
455
 
499
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
500
- import { styleText as y } from "node:util";
501
- import { stdout as S, stdin as $ } from "node:process";
502
- import P from "node:readline";
503
- import { ReadStream as D } from "node:tty";
504
- function d(r, t2, e) {
505
- if (!e.some((o) => !o.disabled)) return r;
506
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
507
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
456
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
457
+ import { styleText } from "node:util";
458
+ import { stdout, stdin } from "node:process";
459
+ import l__default from "node:readline";
460
+ import { ReadStream } from "node:tty";
461
+ function findCursor(s, o, l) {
462
+ if (!l.some((r2) => !r2.disabled))
463
+ return s;
464
+ const t2 = s + o, n3 = Math.max(l.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
465
+ return l[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l) : e;
466
+ }
467
+ function isAccessible(n3) {
468
+ if (n3 !== void 0) return n3;
469
+ if (settings.accessible !== void 0) return settings.accessible;
470
+ const e = process.env.ACCESSIBLE;
471
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
508
472
  }
509
- function V(r, t2) {
510
- if (typeof r == "string") return u.aliases.get(r) === t2;
511
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
473
+ function isActionKey(n3, e) {
474
+ if (typeof n3 == "string")
475
+ return settings.aliases.get(n3) === e;
476
+ for (const s of n3)
477
+ if (s !== void 0 && isActionKey(s, e))
478
+ return true;
512
479
  return false;
513
480
  }
514
- function j(r, t2) {
515
- if (r === t2) return;
516
- const e = r.split(`
517
- `), s = t2.split(`
518
- `), i = Math.max(e.length, s.length), n = [];
519
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
520
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
481
+ function diffLines(i2, s) {
482
+ if (i2 === s) return;
483
+ const e = i2.split(`
484
+ `), t2 = s.split(`
485
+ `), r2 = Math.max(e.length, t2.length), f = [];
486
+ for (let n3 = 0; n3 < r2; n3++)
487
+ e[n3] !== t2[n3] && f.push(n3);
488
+ return {
489
+ lines: f,
490
+ numLinesBefore: e.length,
491
+ numLinesAfter: t2.length,
492
+ numLines: r2
493
+ };
521
494
  }
522
- function q(r) {
523
- return r === C;
495
+ function isCancel(e) {
496
+ return e === CANCEL_SYMBOL;
524
497
  }
525
- function w(r, t2) {
526
- const e = r;
527
- e.isTTY && e.setRawMode(t2);
498
+ function setRawMode(e, r2) {
499
+ const o = e;
500
+ o.isTTY && o.setRawMode(r2);
528
501
  }
529
- function R(r, t2, e, s = e) {
530
- const i = O(r ?? S);
531
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
532
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
502
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
503
+ const f = getColumns(e ?? stdout);
504
+ return wrapAnsi(r2, f - o.length, {
505
+ hard: true,
506
+ trim: false
507
+ }).split(`
508
+ `).map((c2, i2, m2) => {
509
+ const d = t2 ? t2(c2, i2) : c2;
510
+ return i2 === 0 ? `${n3}${d}` : i2 === m2.length - 1 ? `${s}${d}` : `${o}${d}`;
511
+ }).join(`
533
512
  `);
534
513
  }
535
- var import_sisteransi, E, G, u, Y, C, O, A, p, it, nt;
514
+ function runValidation(e, a2) {
515
+ if ("~standard" in e) {
516
+ const n3 = e["~standard"].validate(a2);
517
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
518
+ }
519
+ return e(a2);
520
+ }
521
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, a, n$1;
536
522
  var init_dist3 = __esm({
537
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
523
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
538
524
  init_utils2();
539
525
  init_main();
540
526
  import_sisteransi = __toESM(require_src(), 1);
541
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
542
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
543
- 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)}` } } };
544
- Y = globalThis.process.platform.startsWith("win");
545
- C = /* @__PURE__ */ Symbol("clack:cancel");
546
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
547
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
548
- p = class {
527
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
528
+ t = [
529
+ "January",
530
+ "February",
531
+ "March",
532
+ "April",
533
+ "May",
534
+ "June",
535
+ "July",
536
+ "August",
537
+ "September",
538
+ "October",
539
+ "November",
540
+ "December"
541
+ ];
542
+ settings = {
543
+ actions: new Set(a$1),
544
+ aliases: /* @__PURE__ */ new Map([
545
+ // vim support
546
+ ["k", "up"],
547
+ ["j", "down"],
548
+ ["h", "left"],
549
+ ["l", "right"],
550
+ ["", "cancel"],
551
+ // opinionated defaults!
552
+ ["escape", "cancel"]
553
+ ]),
554
+ messages: {
555
+ cancel: "Canceled",
556
+ error: "Something went wrong"
557
+ },
558
+ withGuide: true,
559
+ accessible: void 0,
560
+ date: {
561
+ monthNames: [...t],
562
+ messages: {
563
+ required: "Please enter a valid date",
564
+ invalidMonth: "There are only 12 months in a year",
565
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
566
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
567
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
568
+ }
569
+ }
570
+ };
571
+ R = globalThis.process.platform.startsWith("win");
572
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
573
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
574
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
575
+ y = class {
549
576
  input;
550
577
  output;
551
578
  _abortSignal;
@@ -560,46 +587,92 @@ var init_dist3 = __esm({
560
587
  error = "";
561
588
  value;
562
589
  userInput = "";
590
+ /**
591
+ * Whether accessible (static, screen-reader friendly) output is enabled for
592
+ * this prompt, resolved from the `accessible` option, the global setting,
593
+ * and the `ACCESSIBLE` env var.
594
+ */
595
+ get accessible() {
596
+ return isAccessible(this.opts.accessible);
597
+ }
563
598
  constructor(t2, e = true) {
564
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
565
- 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;
599
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
600
+ 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;
566
601
  }
602
+ /**
603
+ * Unsubscribe all listeners
604
+ */
567
605
  unsubscribe() {
568
606
  this._subscribers.clear();
569
607
  }
608
+ /**
609
+ * Set a subscriber with opts
610
+ * @param event - The event name
611
+ */
570
612
  setSubscriber(t2, e) {
571
- const s = this._subscribers.get(t2) ?? [];
572
- s.push(e), this._subscribers.set(t2, s);
613
+ const i2 = this._subscribers.get(t2) ?? [];
614
+ i2.push(e), this._subscribers.set(t2, i2);
573
615
  }
616
+ /**
617
+ * Subscribe to an event
618
+ * @param event - The event name
619
+ * @param cb - The callback
620
+ */
574
621
  on(t2, e) {
575
622
  this.setSubscriber(t2, { cb: e });
576
623
  }
624
+ /**
625
+ * Subscribe to an event once
626
+ * @param event - The event name
627
+ * @param cb - The callback
628
+ */
577
629
  once(t2, e) {
578
630
  this.setSubscriber(t2, { cb: e, once: true });
579
631
  }
632
+ /**
633
+ * Emit an event with data
634
+ * @param event - The event name
635
+ * @param data - The data to pass to the callback
636
+ */
580
637
  emit(t2, ...e) {
581
- const s = this._subscribers.get(t2) ?? [], i = [];
582
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
583
- for (const n of i) n();
638
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
639
+ for (const r2 of i2)
640
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
641
+ for (const r2 of s)
642
+ r2();
584
643
  }
585
644
  prompt() {
586
645
  return new Promise((t2) => {
587
646
  if (this._abortSignal) {
588
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
589
- this._abortSignal.addEventListener("abort", () => {
590
- this.state = "cancel", this.close();
591
- }, { once: true });
647
+ if (this._abortSignal.aborted)
648
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
649
+ this._abortSignal.addEventListener(
650
+ "abort",
651
+ () => {
652
+ this.state = "cancel", this.close();
653
+ },
654
+ { once: true }
655
+ );
592
656
  }
593
- 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", () => {
594
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
657
+ this.rl = l__default.createInterface({
658
+ input: this.input,
659
+ tabSize: 2,
660
+ prompt: "",
661
+ escapeCodeTimeout: 50,
662
+ terminal: true
663
+ }), 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", () => {
664
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
595
665
  }), this.once("cancel", () => {
596
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
666
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
597
667
  });
598
668
  });
599
669
  }
600
670
  _isActionKey(t2, e) {
601
671
  return t2 === " ";
602
672
  }
673
+ _shouldSubmit(t2, e) {
674
+ return true;
675
+ }
603
676
  _setValue(t2) {
604
677
  this.value = t2, this.emit("value", this.value);
605
678
  }
@@ -609,19 +682,22 @@ var init_dist3 = __esm({
609
682
  _clearUserInput() {
610
683
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
611
684
  }
612
- onKeypress(t2, e) {
613
- 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") {
614
- if (this.opts.validate) {
615
- const s = this.opts.validate(this.value);
616
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
685
+ async onKeypress(t2, e) {
686
+ if (this.state !== "validating") {
687
+ 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)) {
688
+ if (this.opts.validate) {
689
+ const i2 = runValidation(this.opts.validate, this.value);
690
+ let s;
691
+ 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));
692
+ }
693
+ this.state !== "error" && (this.state = "submit");
617
694
  }
618
- this.state !== "error" && (this.state = "submit");
695
+ 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();
619
696
  }
620
- 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();
621
697
  }
622
698
  close() {
623
699
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
624
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
700
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
625
701
  }
626
702
  restoreCursor() {
627
703
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -629,34 +705,39 @@ var init_dist3 = __esm({
629
705
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
630
706
  }
631
707
  render() {
632
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
708
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
709
+ hard: true,
710
+ trim: false
711
+ });
633
712
  if (t2 !== this._prevFrame) {
634
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
713
+ if (this.state === "initial")
714
+ this.output.write(import_sisteransi.cursor.hide);
635
715
  else {
636
- const e = j(this._prevFrame, t2), s = A(this.output);
716
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
637
717
  if (this.restoreCursor(), e) {
638
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
639
- let o = e.lines.find((a) => a >= i);
640
- if (o === void 0) {
718
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
719
+ let n3 = e.lines.find((o) => o >= s);
720
+ if (n3 === void 0) {
641
721
  this._prevFrame = t2;
642
722
  return;
643
723
  }
644
724
  if (e.lines.length === 1) {
645
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
646
- const a = t2.split(`
725
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
726
+ const o = t2.split(`
647
727
  `);
648
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
728
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
649
729
  return;
650
730
  } else if (e.lines.length > 1) {
651
- if (i < n) o = i;
731
+ if (s < r2)
732
+ n3 = s;
652
733
  else {
653
- const h = o - n;
654
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
734
+ const h2 = n3 - r2;
735
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
655
736
  }
656
737
  this.output.write(import_sisteransi.erase.down());
657
- const a = t2.split(`
658
- `).slice(o);
659
- this.output.write(a.join(`
738
+ const f = t2.split(`
739
+ `).slice(n3);
740
+ this.output.write(f.join(`
660
741
  `)), this._prevFrame = t2;
661
742
  return;
662
743
  }
@@ -667,44 +748,48 @@ var init_dist3 = __esm({
667
748
  }
668
749
  }
669
750
  };
670
- it = class extends p {
751
+ a = class extends y {
671
752
  options;
672
753
  cursor = 0;
673
754
  get _value() {
674
- return this.options[this.cursor].value;
755
+ return this.options[this.cursor]?.value;
675
756
  }
676
757
  get _enabledOptions() {
677
- return this.options.filter((t2) => t2.disabled !== true);
758
+ return this.options.filter((e) => e.disabled !== true);
678
759
  }
679
760
  toggleAll() {
680
- const t2 = this._enabledOptions, e = this.value !== void 0 && this.value.length === t2.length;
681
- this.value = e ? [] : t2.map((s) => s.value);
761
+ const e = this._enabledOptions, i2 = this.value !== void 0 && this.value.length === e.length;
762
+ this.value = i2 ? [] : e.map((t2) => t2.value);
682
763
  }
683
764
  toggleInvert() {
684
- const t2 = this.value;
685
- if (!t2) return;
686
- const e = this._enabledOptions.filter((s) => !t2.includes(s.value));
687
- this.value = e.map((s) => s.value);
765
+ const e = this.value;
766
+ if (!e)
767
+ return;
768
+ const i2 = this._enabledOptions.filter((t2) => !e.includes(t2.value));
769
+ this.value = i2.map((t2) => t2.value);
688
770
  }
689
771
  toggleValue() {
690
772
  this.value === void 0 && (this.value = []);
691
- const t2 = this.value.includes(this._value);
692
- this.value = t2 ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
693
- }
694
- constructor(t2) {
695
- super(t2, false), this.options = t2.options, this.value = [...t2.initialValues ?? []];
696
- const e = Math.max(this.options.findIndex(({ value: s }) => s === t2.cursorAt), 0);
697
- this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.on("key", (s) => {
698
- s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
699
- }), this.on("cursor", (s) => {
700
- switch (s) {
773
+ const e = this.value.includes(this._value);
774
+ this.value = e ? this.value.filter((i2) => i2 !== this._value) : [...this.value, this._value];
775
+ }
776
+ constructor(e) {
777
+ super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
778
+ const i2 = Math.max(
779
+ this.options.findIndex(({ value: t2 }) => t2 === e.cursorAt),
780
+ 0
781
+ );
782
+ this.cursor = this.options[i2]?.disabled ? findCursor(i2, 1, this.options) : i2, this.on("key", (t2, l) => {
783
+ l.name === "a" && this.toggleAll(), l.name === "i" && this.toggleInvert();
784
+ }), this.on("cursor", (t2) => {
785
+ switch (t2) {
701
786
  case "left":
702
787
  case "up":
703
- this.cursor = d(this.cursor, -1, this.options);
788
+ this.cursor = findCursor(this.cursor, -1, this.options);
704
789
  break;
705
790
  case "down":
706
791
  case "right":
707
- this.cursor = d(this.cursor, 1, this.options);
792
+ this.cursor = findCursor(this.cursor, 1, this.options);
708
793
  break;
709
794
  case "space":
710
795
  this.toggleValue();
@@ -713,27 +798,28 @@ var init_dist3 = __esm({
713
798
  });
714
799
  }
715
800
  };
716
- nt = class extends p {
801
+ n$1 = class n extends y {
717
802
  options;
718
803
  cursor = 0;
719
804
  get _selectedValue() {
720
805
  return this.options[this.cursor];
721
806
  }
722
807
  changeValue() {
723
- this.value = this._selectedValue.value;
808
+ const e = this._selectedValue;
809
+ this.value = e === void 0 ? void 0 : e.value;
724
810
  }
725
- constructor(t2) {
726
- super(t2, false), this.options = t2.options;
727
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
728
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
729
- switch (i) {
811
+ constructor(e) {
812
+ super(e, false), this.options = e.options;
813
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
814
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
815
+ switch (s) {
730
816
  case "left":
731
817
  case "up":
732
- this.cursor = d(this.cursor, -1, this.options);
818
+ this.cursor = findCursor(this.cursor, -1, this.options);
733
819
  break;
734
820
  case "down":
735
821
  case "right":
736
- this.cursor = d(this.cursor, 1, this.options);
822
+ this.cursor = findCursor(this.cursor, 1, this.options);
737
823
  break;
738
824
  }
739
825
  this.changeValue();
@@ -743,240 +829,398 @@ var init_dist3 = __esm({
743
829
  }
744
830
  });
745
831
 
746
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
747
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
748
- import P2 from "node:process";
749
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
750
- import { dirname as be, join as Qe } from "node:path";
751
- function Ze() {
752
- 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";
832
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
833
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
834
+ import process$1 from "node:process";
835
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
836
+ import { dirname, join } from "node:path";
837
+ function isUnicodeSupported() {
838
+ if (process$1.platform !== "win32") {
839
+ return process$1.env.TERM !== "linux";
840
+ }
841
+ 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";
842
+ }
843
+ function formatInstructionFooter(o, e) {
844
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
845
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
753
846
  }
754
- var import_sisteransi2, ee, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, O2, pt, Q2, yt, Ve, re, _t, je;
847
+ var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, MULTISELECT_INSTRUCTIONS, m, multiselect, log, cancel, u2, SELECT_INSTRUCTIONS, c, select, i;
755
848
  var init_dist4 = __esm({
756
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
849
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
757
850
  init_utils2();
758
851
  init_dist3();
759
852
  init_dist3();
760
853
  init_main();
761
854
  init_dist2();
762
855
  import_sisteransi2 = __toESM(require_src(), 1);
763
- ee = Ze();
764
- w2 = (e, i) => ee ? e : i;
765
- _e = w2("\u25C6", "*");
766
- oe = w2("\u25A0", "x");
767
- ue = w2("\u25B2", "x");
768
- F = w2("\u25C7", "o");
769
- le = w2("\u250C", "T");
770
- d2 = w2("\u2502", "|");
771
- E2 = w2("\u2514", "\u2014");
772
- Ie = w2("\u2510", "T");
773
- Ee = w2("\u2518", "\u2014");
774
- z2 = w2("\u25CF", ">");
775
- H2 = w2("\u25CB", " ");
776
- te = w2("\u25FB", "[\u2022]");
777
- U = w2("\u25FC", "[+]");
778
- J = w2("\u25FB", "[ ]");
779
- xe = w2("\u25AA", "\u2022");
780
- se = w2("\u2500", "-");
781
- ce = w2("\u256E", "+");
782
- Ge = w2("\u251C", "+");
783
- $e = w2("\u256F", "+");
784
- de = w2("\u2570", "+");
785
- Oe = w2("\u256D", "+");
786
- he = w2("\u25CF", "\u2022");
787
- pe = w2("\u25C6", "*");
788
- me = w2("\u25B2", "!");
789
- ge = w2("\u25A0", "x");
790
- V2 = (e) => {
791
- switch (e) {
856
+ unicode = isUnicodeSupported();
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) {
792
885
  case "initial":
793
886
  case "active":
794
- return t("cyan", _e);
887
+ return styleText2("cyan", S_STEP_ACTIVE);
795
888
  case "cancel":
796
- return t("red", oe);
889
+ return styleText2("red", S_STEP_CANCEL);
797
890
  case "error":
798
- return t("yellow", ue);
891
+ return styleText2("yellow", S_STEP_ERROR);
799
892
  case "submit":
800
- return t("green", F);
893
+ return styleText2("green", S_STEP_SUBMIT);
894
+ case "validating":
895
+ return styleText2("dim", S_STEP_ACTIVE);
801
896
  }
802
897
  };
803
- ye = (e) => {
804
- switch (e) {
898
+ symbolBar = (o) => {
899
+ switch (o) {
805
900
  case "initial":
806
901
  case "active":
807
- return t("cyan", d2);
902
+ return styleText2("cyan", S_BAR);
808
903
  case "cancel":
809
- return t("red", d2);
904
+ return styleText2("red", S_BAR);
810
905
  case "error":
811
- return t("yellow", d2);
906
+ return styleText2("yellow", S_BAR);
812
907
  case "submit":
813
- return t("green", d2);
814
- }
815
- };
816
- et2 = (e, i, s, r, u2) => {
817
- let n = i, o = 0;
818
- for (let c2 = s; c2 < r; c2++) {
819
- const a = e[c2];
820
- if (n = n - a.length, o++, n <= u2) break;
821
- }
822
- return { lineCount: n, removals: o };
823
- };
824
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
825
- 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);
826
- let p2 = 0;
827
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
828
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
829
- const S2 = Math.min(p2 + y2, i.length), h = [];
908
+ return styleText2("green", S_BAR);
909
+ }
910
+ };
911
+ I = (l, e, w, p, b, C = false) => {
912
+ let r2 = e, O = 0;
913
+ if (C)
914
+ for (let i2 = p - 1; i2 >= w; i2--) {
915
+ const m2 = l[i2];
916
+ if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
917
+ }
918
+ else
919
+ for (let i2 = w; i2 < p; i2++) {
920
+ const m2 = l[i2];
921
+ if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
922
+ }
923
+ return { lineCount: r2, removals: O };
924
+ };
925
+ limitOptions = ({
926
+ cursor: l,
927
+ options: e,
928
+ style: w,
929
+ output: p = process.stdout,
930
+ maxItems: b = Number.POSITIVE_INFINITY,
931
+ columnPadding: C = 0,
932
+ rowPadding: r2 = 4
933
+ }) => {
934
+ const i2 = getColumns(p) - C, m2 = getRows(p), M = styleText2("dim", "..."), v = Math.max(m2 - r2, 0), a2 = Math.max(Math.min(b, v), 5);
830
935
  let f = 0;
831
- m && f++, g && f++;
832
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
833
- for (let b = v; b < T; b++) {
834
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
835
- `);
836
- h.push(x), f += x.length;
837
- }
838
- if (f > $2) {
839
- let b = 0, x = 0, G2 = f;
840
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
841
- 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));
842
- }
843
- const C2 = [];
844
- m && C2.push(l);
845
- for (const b of h) for (const x of b) C2.push(x);
846
- return g && C2.push(l), C2;
847
- };
848
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
849
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
850
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
851
- const y2 = Array.isArray(e) ? e : e.split(`
852
- `);
853
- if (y2.length > 0) {
854
- const [p2, ...m] = y2;
855
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
856
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
857
- }
858
- r.write(`${o.join(`
859
- `)}
860
- `);
861
- }, info: (e, i) => {
862
- O2.message(e, { ...i, symbol: t("blue", he) });
863
- }, success: (e, i) => {
864
- O2.message(e, { ...i, symbol: t("green", pe) });
865
- }, step: (e, i) => {
866
- O2.message(e, { ...i, symbol: t("green", F) });
867
- }, warn: (e, i) => {
868
- O2.message(e, { ...i, symbol: t("yellow", me) });
869
- }, warning: (e, i) => {
870
- O2.warn(e, i);
871
- }, error: (e, i) => {
872
- O2.message(e, { ...i, symbol: t("red", ge) });
873
- } };
874
- pt = (e = "", i) => {
875
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
876
- s.write(`${r}${t("red", e)}
877
-
936
+ l >= a2 - 3 && (f = Math.max(
937
+ Math.min(l - 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 W = 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 = W - (c2 ? 1 : 0);
948
+ for (let t2 = T; t2 < y2; t2++) {
949
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l) : "", h2 = wrapAnsi(o, i2, {
950
+ hard: true,
951
+ trim: false
952
+ }).split(`
878
953
  `);
879
- };
880
- Q2 = (e, i) => e.split(`
881
- `).map((s) => i(s)).join(`
954
+ s.push(h2), g += h2.length;
955
+ }
956
+ if (g > v) {
957
+ let t2 = 0, n3 = 0, o = g;
958
+ const h2 = l - 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
+ MULTISELECT_INSTRUCTIONS = [
978
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
979
+ `${styleText2("dim", "Space:")} select`,
980
+ `${styleText2("dim", "Enter:")} confirm`
981
+ ];
982
+ m = (i2, u3) => i2.split(`
983
+ `).map((d) => u3(d)).join(`
882
984
  `);
883
- yt = (e) => {
884
- const i = (r, u2) => {
885
- const n = r.label ?? String(r.value);
886
- return u2 === "disabled" ? `${t("gray", J)} ${Q2(n, (o) => t(["strikethrough", "gray"], o))}${r.hint ? ` ${t("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u2 === "active" ? `${t("cyan", te)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "selected" ? `${t("green", U)} ${Q2(n, (o) => t("dim", o))}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "cancelled" ? `${Q2(n, (o) => t(["strikethrough", "dim"], o))}` : u2 === "active-selected" ? `${t("green", U)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "submitted" ? `${Q2(n, (o) => t("dim", o))}` : `${t("dim", J)} ${Q2(n, (o) => t("dim", o))}`;
887
- }, s = e.required ?? true;
888
- return new it({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(r) {
889
- if (s && (r === void 0 || r.length === 0)) return `Please select at least one option.
890
- ${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
891
- }, render() {
892
- const r = e.withGuide ?? u.withGuide, u2 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V2(this.state)} `), n = `${r ? `${t("gray", d2)}
893
- ` : ""}${u2}
894
- `, o = this.value ?? [], c2 = (a, l) => {
895
- if (a.disabled) return i(a, "disabled");
896
- const $2 = o.includes(a.value);
897
- return l && $2 ? i(a, "active-selected") : $2 ? i(a, "selected") : i(a, l ? "active" : "inactive");
898
- };
899
- switch (this.state) {
900
- case "submit": {
901
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "submitted")).join(t("dim", ", ")) || t("dim", "none"), l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
902
- return `${n}${l}`;
903
- }
904
- case "cancel": {
905
- const a = this.options.filter(({ value: $2 }) => o.includes($2)).map(($2) => i($2, "cancelled")).join(t("dim", ", "));
906
- if (a.trim() === "") return `${n}${t("gray", d2)}`;
907
- const l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
908
- return `${n}${l}${r ? `
909
- ${t("gray", d2)}` : ""}`;
910
- }
911
- case "error": {
912
- const a = r ? `${t("yellow", d2)} ` : "", l = this.error.split(`
913
- `).map((p2, m) => m === 0 ? `${r ? `${t("yellow", E2)} ` : ""}${t("yellow", p2)}` : ` ${p2}`).join(`
914
- `), $2 = n.split(`
915
- `).length, y2 = l.split(`
985
+ multiselect = (i2) => {
986
+ const u3 = (t2, a2) => {
987
+ const r2 = t2.label ?? String(t2.value);
988
+ return a2 === "disabled" ? `${styleText2("gray", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2(["strikethrough", "gray"], o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint ?? "disabled"})`)}` : ""}` : a2 === "active" ? `${styleText2("cyan", S_CHECKBOX_ACTIVE)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${m(r2, (o) => styleText2("dim", o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "cancelled" ? `${m(r2, (o) => styleText2(["strikethrough", "dim"], o))}` : a2 === "active-selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "submitted" ? `${m(r2, (o) => styleText2("dim", o))}` : `${styleText2("dim", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2("dim", o))}`;
989
+ }, d = i2.required ?? true, v = i2.showInstructions ?? true;
990
+ return new a({
991
+ options: i2.options,
992
+ signal: i2.signal,
993
+ input: i2.input,
994
+ output: i2.output,
995
+ initialValues: i2.initialValues,
996
+ required: d,
997
+ cursorAt: i2.cursorAt,
998
+ validate(t2) {
999
+ if (d && (t2 === void 0 || t2.length === 0))
1000
+ return `Please select at least one option.
1001
+ ${styleText2(
1002
+ "reset",
1003
+ styleText2(
1004
+ "dim",
1005
+ `Press ${styleText2(["gray", "bgWhite", "inverse"], " space ")} to select, ${styleText2(
1006
+ "gray",
1007
+ styleText2("bgWhite", styleText2("inverse", " enter "))
1008
+ )} to submit`
1009
+ )
1010
+ )}`;
1011
+ },
1012
+ render() {
1013
+ const t2 = i2.withGuide ?? settings.withGuide, a2 = wrapTextWithPrefix(
1014
+ i2.output,
1015
+ i2.message,
1016
+ t2 ? `${symbolBar(this.state)} ` : "",
1017
+ `${symbol(this.state)} `
1018
+ ), r2 = `${t2 ? `${styleText2("gray", S_BAR)}
1019
+ ` : ""}${a2}
1020
+ `, o = this.value ?? [], p = (n3, l) => {
1021
+ if (n3.disabled)
1022
+ return u3(n3, "disabled");
1023
+ const s = o.includes(n3.value);
1024
+ return l && s ? u3(n3, "active-selected") : s ? u3(n3, "selected") : u3(n3, l ? "active" : "inactive");
1025
+ };
1026
+ switch (this.state) {
1027
+ case "submit": {
1028
+ const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "submitted")).join(styleText2("dim", ", ")) || styleText2("dim", "none"), l = wrapTextWithPrefix(
1029
+ i2.output,
1030
+ n3,
1031
+ t2 ? `${styleText2("gray", S_BAR)} ` : ""
1032
+ );
1033
+ return `${r2}${l}`;
1034
+ }
1035
+ case "cancel": {
1036
+ const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "cancelled")).join(styleText2("dim", ", "));
1037
+ if (n3.trim() === "")
1038
+ return `${r2}${styleText2("gray", S_BAR)}`;
1039
+ const l = wrapTextWithPrefix(
1040
+ i2.output,
1041
+ n3,
1042
+ t2 ? `${styleText2("gray", S_BAR)} ` : ""
1043
+ );
1044
+ return `${r2}${l}${t2 ? `
1045
+ ${styleText2("gray", S_BAR)}` : ""}`;
1046
+ }
1047
+ case "error": {
1048
+ const n3 = t2 ? `${styleText2("yellow", S_BAR)} ` : "", l = this.error.split(`
1049
+ `).map(
1050
+ ($, C) => C === 0 ? `${t2 ? `${styleText2("yellow", S_BAR_END)} ` : ""}${styleText2("yellow", $)}` : ` ${$}`
1051
+ ).join(`
1052
+ `), s = r2.split(`
1053
+ `).length, h2 = l.split(`
916
1054
  `).length + 1;
917
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: $2 + y2, style: c2 }).join(`
918
- ${a}`)}
1055
+ return `${r2}${n3}${limitOptions({
1056
+ output: i2.output,
1057
+ options: this.options,
1058
+ cursor: this.cursor,
1059
+ maxItems: i2.maxItems,
1060
+ columnPadding: n3.length,
1061
+ rowPadding: s + h2,
1062
+ style: p
1063
+ }).join(`
1064
+ ${n3}`)}
919
1065
  ${l}
920
1066
  `;
921
- }
922
- default: {
923
- const a = r ? `${t("cyan", d2)} ` : "", l = n.split(`
924
- `).length, $2 = r ? 2 : 1;
925
- return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: l + $2, style: c2 }).join(`
926
- ${a}`)}
927
- ${r ? t("cyan", E2) : ""}
1067
+ }
1068
+ default: {
1069
+ const n3 = t2 ? `${styleText2("cyan", S_BAR)} ` : "", l = r2.split(`
1070
+ `).length, s = v ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t2) : t2 ? [styleText2("cyan", S_BAR_END)] : [], h2 = s.join(`
1071
+ `), $ = s.length + 1;
1072
+ return `${r2}${n3}${limitOptions({
1073
+ output: i2.output,
1074
+ options: this.options,
1075
+ cursor: this.cursor,
1076
+ maxItems: i2.maxItems,
1077
+ columnPadding: n3.length,
1078
+ rowPadding: l + $,
1079
+ style: p
1080
+ }).join(`
1081
+ ${n3}`)}
1082
+ ${h2}
928
1083
  `;
1084
+ }
929
1085
  }
930
1086
  }
931
- } }).prompt();
1087
+ }).prompt();
932
1088
  };
933
- Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
934
- re = (e, i) => e.includes(`
935
- `) ? e.split(`
936
- `).map((s) => i(s)).join(`
937
- `) : i(e);
938
- _t = (e) => {
939
- const i = (s, r) => {
940
- const u2 = s.label ?? String(s.value);
941
- switch (r) {
1089
+ log = {
1090
+ message: (s = [], {
1091
+ symbol: e = styleText2("gray", S_BAR),
1092
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
1093
+ output: m2 = process.stdout,
1094
+ spacing: l = 1,
1095
+ withGuide: c2
1096
+ } = {}) => {
1097
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
1098
+ for (let i2 = 0; i2 < l; i2++)
1099
+ t2.push(f);
1100
+ const g = Array.isArray(s) ? s : s.split(`
1101
+ `);
1102
+ if (g.length > 0) {
1103
+ const [i2, ...y2] = g;
1104
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
1105
+ for (const p of y2)
1106
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
1107
+ }
1108
+ m2.write(`${t2.join(`
1109
+ `)}
1110
+ `);
1111
+ },
1112
+ info: (s, e) => {
1113
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
1114
+ },
1115
+ success: (s, e) => {
1116
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
1117
+ },
1118
+ step: (s, e) => {
1119
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1120
+ },
1121
+ warn: (s, e) => {
1122
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1123
+ },
1124
+ /** alias for `log.warn()`. */
1125
+ warning: (s, e) => {
1126
+ log.warn(s, e);
1127
+ },
1128
+ error: (s, e) => {
1129
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1130
+ }
1131
+ };
1132
+ cancel = (o = "", t2) => {
1133
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1134
+ i2.write(`${e}${styleText2("red", o)}
1135
+
1136
+ `);
1137
+ };
1138
+ u2 = {
1139
+ light: unicodeOr("\u2500", "-"),
1140
+ heavy: unicodeOr("\u2501", "="),
1141
+ block: unicodeOr("\u2588", "#")
1142
+ };
1143
+ SELECT_INSTRUCTIONS = [
1144
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1145
+ `${styleText2("dim", "Enter:")} confirm`
1146
+ ];
1147
+ c = (t2, o) => t2.includes(`
1148
+ `) ? t2.split(`
1149
+ `).map((d) => o(d)).join(`
1150
+ `) : o(t2);
1151
+ select = (t2) => {
1152
+ const o = (n3, m2) => {
1153
+ if (n3 === void 0)
1154
+ return "";
1155
+ const s = n3.label ?? String(n3.value);
1156
+ switch (m2) {
942
1157
  case "disabled":
943
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1158
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
944
1159
  case "selected":
945
- return `${re(u2, (n) => t("dim", n))}`;
1160
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
946
1161
  case "active":
947
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1162
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
948
1163
  case "cancelled":
949
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1164
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
950
1165
  default:
951
- return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
952
- }
953
- };
954
- return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
955
- 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)}
956
- ` : ""}${n}
1166
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1167
+ }
1168
+ }, d = t2.showInstructions ?? true;
1169
+ return new n$1({
1170
+ options: t2.options,
1171
+ signal: t2.signal,
1172
+ input: t2.input,
1173
+ output: t2.output,
1174
+ initialValue: t2.initialValue,
1175
+ render() {
1176
+ const n3 = t2.withGuide ?? settings.withGuide, m2 = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1177
+ t2.output,
1178
+ t2.message,
1179
+ s,
1180
+ m2
1181
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1182
+ ` : ""}${i2}
957
1183
  `;
958
- switch (this.state) {
959
- case "submit": {
960
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
961
- return `${o}${a}`;
962
- }
963
- case "cancel": {
964
- const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
965
- return `${o}${a}${s ? `
966
- ${t("gray", d2)}` : ""}`;
967
- }
968
- default: {
969
- const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
970
- `).length, $2 = s ? 2 : 1;
971
- 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(`
972
- ${c2}`)}
973
- ${a}
1184
+ switch (this.state) {
1185
+ case "submit": {
1186
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1187
+ t2.output,
1188
+ o(this.options[this.cursor], "selected"),
1189
+ r2
1190
+ );
1191
+ return `${u3}${a2}`;
1192
+ }
1193
+ case "cancel": {
1194
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1195
+ t2.output,
1196
+ o(this.options[this.cursor], "cancelled"),
1197
+ r2
1198
+ );
1199
+ return `${u3}${a2}${n3 ? `
1200
+ ${styleText2("gray", S_BAR)}` : ""}`;
1201
+ }
1202
+ default: {
1203
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1204
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
1205
+ `), f = p.length + 1;
1206
+ return `${u3}${r2}${limitOptions({
1207
+ output: t2.output,
1208
+ cursor: this.cursor,
1209
+ options: this.options,
1210
+ maxItems: t2.maxItems,
1211
+ columnPadding: r2.length,
1212
+ rowPadding: a2 + f,
1213
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1214
+ }).join(`
1215
+ ${r2}`)}
1216
+ ${b}
974
1217
  `;
1218
+ }
975
1219
  }
976
1220
  }
977
- } }).prompt();
1221
+ }).prompt();
978
1222
  };
979
- je = `${t("gray", d2)} `;
1223
+ i = `${styleText2("gray", S_BAR)} `;
980
1224
  }
981
1225
  });
982
1226
 
@@ -989,9 +1233,9 @@ function supportsColor() {
989
1233
  }
990
1234
  return process.stdout.isTTY === true;
991
1235
  }
992
- function colorize(text, color) {
993
- if (!supportsColor()) return text;
994
- return `${color}${text}${colors.reset}`;
1236
+ function colorize(text2, color) {
1237
+ if (!supportsColor()) return text2;
1238
+ return `${color}${text2}${colors.reset}`;
995
1239
  }
996
1240
  function stringify(value) {
997
1241
  if (typeof value === "string") return value;
@@ -1021,7 +1265,7 @@ function stringify(value) {
1021
1265
  function formatMessage(...args) {
1022
1266
  return args.map(stringify).join(" ");
1023
1267
  }
1024
- var colors, currentLogLevel, log, error, warn, info, success;
1268
+ var colors, currentLogLevel, log2, error, warn, info, success;
1025
1269
  var init_cli_output = __esm({
1026
1270
  "packages/tooling/src/utils/cli-output.ts"() {
1027
1271
  "use strict";
@@ -1054,7 +1298,7 @@ var init_cli_output = __esm({
1054
1298
  currentLogLevel = envLevel;
1055
1299
  }
1056
1300
  }
1057
- log = {
1301
+ log2 = {
1058
1302
  /**
1059
1303
  * Logs an error message (always shows unless Quiet level)
1060
1304
  * Uses clack's log.error + explicit red color
@@ -1062,7 +1306,7 @@ var init_cli_output = __esm({
1062
1306
  error(...args) {
1063
1307
  if (currentLogLevel < 0 /* Quiet */) return;
1064
1308
  const message = formatMessage(...args);
1065
- O2.error(colorize(message, colors.brightRed));
1309
+ log.error(colorize(message, colors.brightRed));
1066
1310
  },
1067
1311
  /**
1068
1312
  * Logs a warning message (shows at Normal level and above)
@@ -1071,7 +1315,7 @@ var init_cli_output = __esm({
1071
1315
  warn(...args) {
1072
1316
  if (currentLogLevel < 1 /* Normal */) return;
1073
1317
  const message = formatMessage(...args);
1074
- O2.warn(colorize(message, colors.brightYellow));
1318
+ log.warn(colorize(message, colors.brightYellow));
1075
1319
  },
1076
1320
  /**
1077
1321
  * Logs an info message (shows at Normal level and above)
@@ -1080,7 +1324,7 @@ var init_cli_output = __esm({
1080
1324
  info(...args) {
1081
1325
  if (currentLogLevel < 1 /* Normal */) return;
1082
1326
  const message = formatMessage(...args);
1083
- O2.info(colorize(message, colors.brightCyan));
1327
+ log.info(colorize(message, colors.brightCyan));
1084
1328
  },
1085
1329
  /**
1086
1330
  * Logs a success message (shows at Normal level and above)
@@ -1089,7 +1333,7 @@ var init_cli_output = __esm({
1089
1333
  success(...args) {
1090
1334
  if (currentLogLevel < 1 /* Normal */) return;
1091
1335
  const message = formatMessage(...args);
1092
- O2.success(colorize(message, colors.brightGreen));
1336
+ log.success(colorize(message, colors.brightGreen));
1093
1337
  },
1094
1338
  /**
1095
1339
  * Logs a debug message (only shows at Verbose level and above)
@@ -1098,7 +1342,7 @@ var init_cli_output = __esm({
1098
1342
  debug(...args) {
1099
1343
  if (currentLogLevel < 2 /* Verbose */) return;
1100
1344
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1101
- O2.message(
1345
+ log.message(
1102
1346
  colorize(
1103
1347
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1104
1348
  colors.gray
@@ -1112,7 +1356,7 @@ var init_cli_output = __esm({
1112
1356
  trace(...args) {
1113
1357
  if (currentLogLevel < 3 /* Debug */) return;
1114
1358
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1115
- O2.message(
1359
+ log.message(
1116
1360
  colorize(
1117
1361
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1118
1362
  colors.gray
@@ -1120,10 +1364,10 @@ var init_cli_output = __esm({
1120
1364
  );
1121
1365
  }
1122
1366
  };
1123
- error = log.error.bind(log);
1124
- warn = log.warn.bind(log);
1125
- info = log.info.bind(log);
1126
- success = log.success.bind(log);
1367
+ error = log2.error.bind(log2);
1368
+ warn = log2.warn.bind(log2);
1369
+ info = log2.info.bind(log2);
1370
+ success = log2.success.bind(log2);
1127
1371
  }
1128
1372
  });
1129
1373
 
@@ -1483,9 +1727,9 @@ var require_is_glob = __commonJS({
1483
1727
  index += 2;
1484
1728
  var close = chars[open];
1485
1729
  if (close) {
1486
- var n = str.indexOf(close, index);
1487
- if (n !== -1) {
1488
- index = n + 1;
1730
+ var n3 = str.indexOf(close, index);
1731
+ if (n3 !== -1) {
1732
+ index = n3 + 1;
1489
1733
  }
1490
1734
  }
1491
1735
  if (str[index] === "!") {
@@ -1511,9 +1755,9 @@ var require_is_glob = __commonJS({
1511
1755
  index += 2;
1512
1756
  var close = chars[open];
1513
1757
  if (close) {
1514
- var n = str.indexOf(close, index);
1515
- if (n !== -1) {
1516
- index = n + 1;
1758
+ var n3 = str.indexOf(close, index);
1759
+ if (n3 !== -1) {
1760
+ index = n3 + 1;
1517
1761
  }
1518
1762
  }
1519
1763
  if (str[index] === "!") {
@@ -1591,8 +1835,8 @@ var require_utils = __commonJS({
1591
1835
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1592
1836
  return (Number(max) - Number(min)) / Number(step) >= limit;
1593
1837
  };
1594
- exports.escapeNode = (block, n = 0, type) => {
1595
- const node = block.nodes[n];
1838
+ exports.escapeNode = (block2, n3 = 0, type) => {
1839
+ const node = block2.nodes[n3];
1596
1840
  if (!node) return;
1597
1841
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1598
1842
  if (node.escaped !== true) {
@@ -1609,15 +1853,15 @@ var require_utils = __commonJS({
1609
1853
  }
1610
1854
  return false;
1611
1855
  };
1612
- exports.isInvalidBrace = (block) => {
1613
- if (block.type !== "brace") return false;
1614
- if (block.invalid === true || block.dollar) return true;
1615
- if (block.commas >> 0 + block.ranges >> 0 === 0) {
1616
- block.invalid = true;
1856
+ exports.isInvalidBrace = (block2) => {
1857
+ if (block2.type !== "brace") return false;
1858
+ if (block2.invalid === true || block2.dollar) return true;
1859
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1860
+ block2.invalid = true;
1617
1861
  return true;
1618
1862
  }
1619
- if (block.open !== true || block.close !== true) {
1620
- block.invalid = true;
1863
+ if (block2.open !== true || block2.close !== true) {
1864
+ block2.invalid = true;
1621
1865
  return true;
1622
1866
  }
1623
1867
  return false;
@@ -1636,8 +1880,8 @@ var require_utils = __commonJS({
1636
1880
  exports.flatten = (...args) => {
1637
1881
  const result = [];
1638
1882
  const flat = (arr) => {
1639
- for (let i = 0; i < arr.length; i++) {
1640
- const ele = arr[i];
1883
+ for (let i2 = 0; i2 < arr.length; i2++) {
1884
+ const ele = arr[i2];
1641
1885
  if (Array.isArray(ele)) {
1642
1886
  flat(ele);
1643
1887
  continue;
@@ -1731,9 +1975,9 @@ var require_to_regex_range = __commonJS({
1731
1975
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1732
1976
  return toRegexRange.cache[cacheKey].result;
1733
1977
  }
1734
- let a = Math.min(min, max);
1978
+ let a2 = Math.min(min, max);
1735
1979
  let b = Math.max(min, max);
1736
- if (Math.abs(a - b) === 1) {
1980
+ if (Math.abs(a2 - b) === 1) {
1737
1981
  let result = min + "|" + max;
1738
1982
  if (opts.capture) {
1739
1983
  return `(${result})`;
@@ -1744,20 +1988,20 @@ var require_to_regex_range = __commonJS({
1744
1988
  return `(?:${result})`;
1745
1989
  }
1746
1990
  let isPadded = hasPadding(min) || hasPadding(max);
1747
- let state = { min, max, a, b };
1991
+ let state = { min, max, a: a2, b };
1748
1992
  let positives = [];
1749
1993
  let negatives = [];
1750
1994
  if (isPadded) {
1751
1995
  state.isPadded = isPadded;
1752
1996
  state.maxLen = String(state.max).length;
1753
1997
  }
1754
- if (a < 0) {
1998
+ if (a2 < 0) {
1755
1999
  let newMin = b < 0 ? Math.abs(b) : 1;
1756
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1757
- a = state.a = 0;
2000
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
2001
+ a2 = state.a = 0;
1758
2002
  }
1759
2003
  if (b >= 0) {
1760
- positives = splitToPatterns(a, b, state, opts);
2004
+ positives = splitToPatterns(a2, b, state, opts);
1761
2005
  }
1762
2006
  state.negatives = negatives;
1763
2007
  state.positives = positives;
@@ -1805,8 +2049,8 @@ var require_to_regex_range = __commonJS({
1805
2049
  let digits = zipped.length;
1806
2050
  let pattern = "";
1807
2051
  let count = 0;
1808
- for (let i = 0; i < digits; i++) {
1809
- let [startDigit, stopDigit] = zipped[i];
2052
+ for (let i2 = 0; i2 < digits; i2++) {
2053
+ let [startDigit, stopDigit] = zipped[i2];
1810
2054
  if (startDigit === stopDigit) {
1811
2055
  pattern += startDigit;
1812
2056
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1825,8 +2069,8 @@ var require_to_regex_range = __commonJS({
1825
2069
  let tokens = [];
1826
2070
  let start = min;
1827
2071
  let prev;
1828
- for (let i = 0; i < ranges.length; i++) {
1829
- let max2 = ranges[i];
2072
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2073
+ let max2 = ranges[i2];
1830
2074
  let obj = rangeToPattern(String(start), String(max2), options);
1831
2075
  let zeros = "";
1832
2076
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1861,13 +2105,13 @@ var require_to_regex_range = __commonJS({
1861
2105
  }
1862
2106
  return result;
1863
2107
  }
1864
- function zip(a, b) {
2108
+ function zip(a2, b) {
1865
2109
  let arr = [];
1866
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2110
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1867
2111
  return arr;
1868
2112
  }
1869
- function compare(a, b) {
1870
- return a > b ? 1 : b > a ? -1 : 0;
2113
+ function compare(a2, b) {
2114
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1871
2115
  }
1872
2116
  function contains(arr, key, val) {
1873
2117
  return arr.some((ele) => ele[key] === val);
@@ -1885,8 +2129,8 @@ var require_to_regex_range = __commonJS({
1885
2129
  }
1886
2130
  return "";
1887
2131
  }
1888
- function toCharacterClass(a, b, options) {
1889
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2132
+ function toCharacterClass(a2, b, options) {
2133
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1890
2134
  }
1891
2135
  function hasPadding(str) {
1892
2136
  return /^-?(0+)\d/.test(str);
@@ -1965,8 +2209,8 @@ var require_fill_range = __commonJS({
1965
2209
  return negative ? "-" + input : input;
1966
2210
  };
1967
2211
  var toSequence = (parts, options, maxLen) => {
1968
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1969
- parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2212
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2213
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1970
2214
  let prefix = options.capture ? "" : "?:";
1971
2215
  let positives = "";
1972
2216
  let negatives = "";
@@ -1987,12 +2231,12 @@ var require_fill_range = __commonJS({
1987
2231
  }
1988
2232
  return result;
1989
2233
  };
1990
- var toRange = (a, b, isNumbers, options) => {
2234
+ var toRange = (a2, b, isNumbers, options) => {
1991
2235
  if (isNumbers) {
1992
- return toRegexRange(a, b, { wrap: false, ...options });
2236
+ return toRegexRange(a2, b, { wrap: false, ...options });
1993
2237
  }
1994
- let start = String.fromCharCode(a);
1995
- if (a === b) return start;
2238
+ let start = String.fromCharCode(a2);
2239
+ if (a2 === b) return start;
1996
2240
  let stop = String.fromCharCode(b);
1997
2241
  return `[${start}-${stop}]`;
1998
2242
  };
@@ -2018,15 +2262,15 @@ var require_fill_range = __commonJS({
2018
2262
  return [];
2019
2263
  };
2020
2264
  var fillNumbers = (start, end, step = 1, options = {}) => {
2021
- let a = Number(start);
2265
+ let a2 = Number(start);
2022
2266
  let b = Number(end);
2023
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2267
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2024
2268
  if (options.strictRanges === true) throw rangeError([start, end]);
2025
2269
  return [];
2026
2270
  }
2027
- if (a === 0) a = 0;
2271
+ if (a2 === 0) a2 = 0;
2028
2272
  if (b === 0) b = 0;
2029
- let descending = a > b;
2273
+ let descending = a2 > b;
2030
2274
  let startString = String(start);
2031
2275
  let endString = String(end);
2032
2276
  let stepString = String(step);
@@ -2042,13 +2286,13 @@ var require_fill_range = __commonJS({
2042
2286
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2043
2287
  let range = [];
2044
2288
  let index = 0;
2045
- while (descending ? a >= b : a <= b) {
2289
+ while (descending ? a2 >= b : a2 <= b) {
2046
2290
  if (options.toRegex === true && step > 1) {
2047
- push(a);
2291
+ push(a2);
2048
2292
  } else {
2049
- range.push(pad(format(a, index), maxLen, toNumber));
2293
+ range.push(pad(format(a2, index), maxLen, toNumber));
2050
2294
  }
2051
- a = descending ? a - step : a + step;
2295
+ a2 = descending ? a2 - step : a2 + step;
2052
2296
  index++;
2053
2297
  }
2054
2298
  if (options.toRegex === true) {
@@ -2061,19 +2305,19 @@ var require_fill_range = __commonJS({
2061
2305
  return invalidRange(start, end, options);
2062
2306
  }
2063
2307
  let format = options.transform || ((val) => String.fromCharCode(val));
2064
- let a = `${start}`.charCodeAt(0);
2308
+ let a2 = `${start}`.charCodeAt(0);
2065
2309
  let b = `${end}`.charCodeAt(0);
2066
- let descending = a > b;
2067
- let min = Math.min(a, b);
2068
- let max = Math.max(a, b);
2310
+ let descending = a2 > b;
2311
+ let min = Math.min(a2, b);
2312
+ let max = Math.max(a2, b);
2069
2313
  if (options.toRegex && step === 1) {
2070
2314
  return toRange(min, max, false, options);
2071
2315
  }
2072
2316
  let range = [];
2073
2317
  let index = 0;
2074
- while (descending ? a >= b : a <= b) {
2075
- range.push(format(a, index));
2076
- a = descending ? a - step : a + step;
2318
+ while (descending ? a2 >= b : a2 <= b) {
2319
+ range.push(format(a2, index));
2320
+ a2 = descending ? a2 - step : a2 + step;
2077
2321
  index++;
2078
2322
  }
2079
2323
  if (options.toRegex === true) {
@@ -2196,18 +2440,18 @@ var require_expand = __commonJS({
2196
2440
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2197
2441
  const walk = (node, parent = {}) => {
2198
2442
  node.queue = [];
2199
- let p2 = parent;
2200
- let q2 = parent.queue;
2201
- while (p2.type !== "brace" && p2.type !== "root" && p2.parent) {
2202
- p2 = p2.parent;
2203
- q2 = p2.queue;
2443
+ let p = parent;
2444
+ let q = parent.queue;
2445
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2446
+ p = p.parent;
2447
+ q = p.queue;
2204
2448
  }
2205
2449
  if (node.invalid || node.dollar) {
2206
- q2.push(append(q2.pop(), stringify2(node, options)));
2450
+ q.push(append(q.pop(), stringify2(node, options)));
2207
2451
  return;
2208
2452
  }
2209
2453
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2210
- q2.push(append(q2.pop(), ["{}"]));
2454
+ q.push(append(q.pop(), ["{}"]));
2211
2455
  return;
2212
2456
  }
2213
2457
  if (node.nodes && node.ranges > 0) {
@@ -2219,26 +2463,26 @@ var require_expand = __commonJS({
2219
2463
  if (range.length === 0) {
2220
2464
  range = stringify2(node, options);
2221
2465
  }
2222
- q2.push(append(q2.pop(), range));
2466
+ q.push(append(q.pop(), range));
2223
2467
  node.nodes = [];
2224
2468
  return;
2225
2469
  }
2226
2470
  const enclose = utils.encloseBrace(node);
2227
2471
  let queue = node.queue;
2228
- let block = node;
2229
- while (block.type !== "brace" && block.type !== "root" && block.parent) {
2230
- block = block.parent;
2231
- queue = block.queue;
2472
+ let block2 = node;
2473
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2474
+ block2 = block2.parent;
2475
+ queue = block2.queue;
2232
2476
  }
2233
- for (let i = 0; i < node.nodes.length; i++) {
2234
- const child = node.nodes[i];
2477
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2478
+ const child = node.nodes[i2];
2235
2479
  if (child.type === "comma" && node.type === "brace") {
2236
- if (i === 1) queue.push("");
2480
+ if (i2 === 1) queue.push("");
2237
2481
  queue.push("");
2238
2482
  continue;
2239
2483
  }
2240
2484
  if (child.type === "close") {
2241
- q2.push(append(q2.pop(), queue, enclose));
2485
+ q.push(append(q.pop(), queue, enclose));
2242
2486
  continue;
2243
2487
  }
2244
2488
  if (child.value && child.type !== "open") {
@@ -2405,7 +2649,7 @@ var require_parse = __commonJS({
2405
2649
  }
2406
2650
  const ast = { type: "root", input, nodes: [] };
2407
2651
  const stack = [ast];
2408
- let block = ast;
2652
+ let block2 = ast;
2409
2653
  let prev = ast;
2410
2654
  let brackets = 0;
2411
2655
  const length = input.length;
@@ -2421,15 +2665,15 @@ var require_parse = __commonJS({
2421
2665
  prev.value += node.value;
2422
2666
  return;
2423
2667
  }
2424
- block.nodes.push(node);
2425
- node.parent = block;
2668
+ block2.nodes.push(node);
2669
+ node.parent = block2;
2426
2670
  node.prev = prev;
2427
2671
  prev = node;
2428
2672
  return node;
2429
2673
  };
2430
2674
  push({ type: "bos" });
2431
2675
  while (index < length) {
2432
- block = stack[stack.length - 1];
2676
+ block2 = stack[stack.length - 1];
2433
2677
  value = advance();
2434
2678
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2435
2679
  continue;
@@ -2466,19 +2710,19 @@ var require_parse = __commonJS({
2466
2710
  continue;
2467
2711
  }
2468
2712
  if (value === CHAR_LEFT_PARENTHESES) {
2469
- block = push({ type: "paren", nodes: [] });
2470
- stack.push(block);
2713
+ block2 = push({ type: "paren", nodes: [] });
2714
+ stack.push(block2);
2471
2715
  push({ type: "text", value });
2472
2716
  continue;
2473
2717
  }
2474
2718
  if (value === CHAR_RIGHT_PARENTHESES) {
2475
- if (block.type !== "paren") {
2719
+ if (block2.type !== "paren") {
2476
2720
  push({ type: "text", value });
2477
2721
  continue;
2478
2722
  }
2479
- block = stack.pop();
2723
+ block2 = stack.pop();
2480
2724
  push({ type: "text", value });
2481
- block = stack[stack.length - 1];
2725
+ block2 = stack[stack.length - 1];
2482
2726
  continue;
2483
2727
  }
2484
2728
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2503,7 +2747,7 @@ var require_parse = __commonJS({
2503
2747
  }
2504
2748
  if (value === CHAR_LEFT_CURLY_BRACE) {
2505
2749
  depth++;
2506
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2750
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2507
2751
  const brace = {
2508
2752
  type: "brace",
2509
2753
  open: true,
@@ -2514,52 +2758,52 @@ var require_parse = __commonJS({
2514
2758
  ranges: 0,
2515
2759
  nodes: []
2516
2760
  };
2517
- block = push(brace);
2518
- stack.push(block);
2761
+ block2 = push(brace);
2762
+ stack.push(block2);
2519
2763
  push({ type: "open", value });
2520
2764
  continue;
2521
2765
  }
2522
2766
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2523
- if (block.type !== "brace") {
2767
+ if (block2.type !== "brace") {
2524
2768
  push({ type: "text", value });
2525
2769
  continue;
2526
2770
  }
2527
2771
  const type = "close";
2528
- block = stack.pop();
2529
- block.close = true;
2772
+ block2 = stack.pop();
2773
+ block2.close = true;
2530
2774
  push({ type, value });
2531
2775
  depth--;
2532
- block = stack[stack.length - 1];
2776
+ block2 = stack[stack.length - 1];
2533
2777
  continue;
2534
2778
  }
2535
2779
  if (value === CHAR_COMMA && depth > 0) {
2536
- if (block.ranges > 0) {
2537
- block.ranges = 0;
2538
- const open = block.nodes.shift();
2539
- block.nodes = [open, { type: "text", value: stringify2(block) }];
2780
+ if (block2.ranges > 0) {
2781
+ block2.ranges = 0;
2782
+ const open = block2.nodes.shift();
2783
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2540
2784
  }
2541
2785
  push({ type: "comma", value });
2542
- block.commas++;
2786
+ block2.commas++;
2543
2787
  continue;
2544
2788
  }
2545
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2546
- const siblings = block.nodes;
2789
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2790
+ const siblings = block2.nodes;
2547
2791
  if (depth === 0 || siblings.length === 0) {
2548
2792
  push({ type: "text", value });
2549
2793
  continue;
2550
2794
  }
2551
2795
  if (prev.type === "dot") {
2552
- block.range = [];
2796
+ block2.range = [];
2553
2797
  prev.value += value;
2554
2798
  prev.type = "range";
2555
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2556
- block.invalid = true;
2557
- block.ranges = 0;
2799
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2800
+ block2.invalid = true;
2801
+ block2.ranges = 0;
2558
2802
  prev.type = "text";
2559
2803
  continue;
2560
2804
  }
2561
- block.ranges++;
2562
- block.args = [];
2805
+ block2.ranges++;
2806
+ block2.args = [];
2563
2807
  continue;
2564
2808
  }
2565
2809
  if (prev.type === "range") {
@@ -2567,7 +2811,7 @@ var require_parse = __commonJS({
2567
2811
  const before = siblings[siblings.length - 1];
2568
2812
  before.value += prev.value + value;
2569
2813
  prev = before;
2570
- block.ranges--;
2814
+ block2.ranges--;
2571
2815
  continue;
2572
2816
  }
2573
2817
  push({ type: "dot", value });
@@ -2576,9 +2820,9 @@ var require_parse = __commonJS({
2576
2820
  push({ type: "text", value });
2577
2821
  }
2578
2822
  do {
2579
- block = stack.pop();
2580
- if (block.type !== "root") {
2581
- block.nodes.forEach((node) => {
2823
+ block2 = stack.pop();
2824
+ if (block2.type !== "root") {
2825
+ block2.nodes.forEach((node) => {
2582
2826
  if (!node.nodes) {
2583
2827
  if (node.type === "open") node.isOpen = true;
2584
2828
  if (node.type === "close") node.isClose = true;
@@ -2587,8 +2831,8 @@ var require_parse = __commonJS({
2587
2831
  }
2588
2832
  });
2589
2833
  const parent = stack[stack.length - 1];
2590
- const index2 = parent.nodes.indexOf(block);
2591
- parent.nodes.splice(index2, 1, ...block.nodes);
2834
+ const index2 = parent.nodes.indexOf(block2);
2835
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2592
2836
  }
2593
2837
  } while (stack.length > 0);
2594
2838
  push({ type: "eos" });
@@ -3221,9 +3465,9 @@ var require_scan = __commonJS({
3221
3465
  if (opts.parts === true || opts.tokens === true) {
3222
3466
  let prevIndex;
3223
3467
  for (let idx = 0; idx < slashes.length; idx++) {
3224
- const n = prevIndex ? prevIndex + 1 : start;
3225
- const i = slashes[idx];
3226
- const value = input.slice(n, i);
3468
+ const n3 = prevIndex ? prevIndex + 1 : start;
3469
+ const i2 = slashes[idx];
3470
+ const value = input.slice(n3, i2);
3227
3471
  if (opts.tokens) {
3228
3472
  if (idx === 0 && start !== 0) {
3229
3473
  tokens[idx].isPrefix = true;
@@ -3237,7 +3481,7 @@ var require_scan = __commonJS({
3237
3481
  if (idx !== 0 || value !== "") {
3238
3482
  parts.push(value);
3239
3483
  }
3240
- prevIndex = i;
3484
+ prevIndex = i2;
3241
3485
  }
3242
3486
  if (prevIndex && prevIndex + 1 < input.length) {
3243
3487
  const value = input.slice(prevIndex + 1);
@@ -3366,15 +3610,15 @@ var require_parse2 = __commonJS({
3366
3610
  };
3367
3611
  var hasRepeatedCharPrefixOverlap = (branches) => {
3368
3612
  const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3369
- for (let i = 0; i < values.length; i++) {
3370
- for (let j2 = i + 1; j2 < values.length; j2++) {
3371
- const a = values[i];
3372
- const b = values[j2];
3373
- const char = a[0];
3374
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3613
+ for (let i2 = 0; i2 < values.length; i2++) {
3614
+ for (let j = i2 + 1; j < values.length; j++) {
3615
+ const a2 = values[i2];
3616
+ const b = values[j];
3617
+ const char = a2[0];
3618
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3375
3619
  continue;
3376
3620
  }
3377
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3621
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3378
3622
  return true;
3379
3623
  }
3380
3624
  }
@@ -3389,8 +3633,8 @@ var require_parse2 = __commonJS({
3389
3633
  let paren = 0;
3390
3634
  let quote = 0;
3391
3635
  let escaped = false;
3392
- for (let i = 1; i < pattern.length; i++) {
3393
- const ch = pattern[i];
3636
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3637
+ const ch = pattern[i2];
3394
3638
  if (escaped === true) {
3395
3639
  escaped = false;
3396
3640
  continue;
@@ -3424,13 +3668,13 @@ var require_parse2 = __commonJS({
3424
3668
  if (ch === ")") {
3425
3669
  paren--;
3426
3670
  if (paren === 0) {
3427
- if (requireEnd === true && i !== pattern.length - 1) {
3671
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3428
3672
  return;
3429
3673
  }
3430
3674
  return {
3431
3675
  type: pattern[0],
3432
- body: pattern.slice(2, i),
3433
- end: i
3676
+ body: pattern.slice(2, i2),
3677
+ end: i2
3434
3678
  };
3435
3679
  }
3436
3680
  }
@@ -3562,7 +3806,7 @@ var require_parse2 = __commonJS({
3562
3806
  let prev = bos;
3563
3807
  let value;
3564
3808
  const eos = () => state.index === len - 1;
3565
- const peek = state.peek = (n = 1) => input[state.index + n];
3809
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3566
3810
  const advance = state.advance = () => input[++state.index] || "";
3567
3811
  const remaining = () => input.slice(state.index + 1);
3568
3812
  const consume = (value2 = "", num = 0) => {
@@ -3643,10 +3887,10 @@ var require_parse2 = __commonJS({
3643
3887
  open.type = "text";
3644
3888
  open.value = literal;
3645
3889
  open.output = safeOutput || utils.escapeRegex(literal);
3646
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3647
- tokens[i].value = "";
3648
- tokens[i].output = "";
3649
- delete tokens[i].suffix;
3890
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3891
+ tokens[i2].value = "";
3892
+ tokens[i2].output = "";
3893
+ delete tokens[i2].suffix;
3650
3894
  }
3651
3895
  state.output = token.output + open.output;
3652
3896
  state.backtrack = true;
@@ -3677,10 +3921,10 @@ var require_parse2 = __commonJS({
3677
3921
  };
3678
3922
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
3679
3923
  let backslashes = false;
3680
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
3924
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m2, esc, chars, first, rest, index) => {
3681
3925
  if (first === "\\") {
3682
3926
  backslashes = true;
3683
- return m;
3927
+ return m2;
3684
3928
  }
3685
3929
  if (first === "?") {
3686
3930
  if (esc) {
@@ -3700,14 +3944,14 @@ var require_parse2 = __commonJS({
3700
3944
  }
3701
3945
  return star;
3702
3946
  }
3703
- return esc ? m : `\\${m}`;
3947
+ return esc ? m2 : `\\${m2}`;
3704
3948
  });
3705
3949
  if (backslashes === true) {
3706
3950
  if (opts.unescape === true) {
3707
3951
  output = output.replace(/\\/g, "");
3708
3952
  } else {
3709
- output = output.replace(/\\+/g, (m) => {
3710
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
3953
+ output = output.replace(/\\+/g, (m2) => {
3954
+ return m2.length % 2 === 0 ? "\\\\" : m2 ? "\\" : "";
3711
3955
  });
3712
3956
  }
3713
3957
  }
@@ -3889,13 +4133,13 @@ var require_parse2 = __commonJS({
3889
4133
  if (brace.dots === true) {
3890
4134
  const arr = tokens.slice();
3891
4135
  const range = [];
3892
- for (let i = arr.length - 1; i >= 0; i--) {
4136
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3893
4137
  tokens.pop();
3894
- if (arr[i].type === "brace") {
4138
+ if (arr[i2].type === "brace") {
3895
4139
  break;
3896
4140
  }
3897
- if (arr[i].type !== "dots") {
3898
- range.unshift(arr[i].value);
4141
+ if (arr[i2].type !== "dots") {
4142
+ range.unshift(arr[i2].value);
3899
4143
  }
3900
4144
  }
3901
4145
  output = expandRange(range, opts);
@@ -4354,7 +4598,7 @@ var require_picomatch = __commonJS({
4354
4598
  };
4355
4599
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4356
4600
  picomatch.parse = (pattern, options) => {
4357
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4601
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4358
4602
  return parse2(pattern, { ...options, fastpaths: false });
4359
4603
  };
4360
4604
  picomatch.scan = (input, options) => scan(input, options);
@@ -4438,8 +4682,8 @@ var require_micromatch = __commonJS({
4438
4682
  options.onResult(state);
4439
4683
  }
4440
4684
  };
4441
- for (let i = 0; i < patterns.length; i++) {
4442
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4685
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4686
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4443
4687
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4444
4688
  if (negated) negatives++;
4445
4689
  for (let item of list) {
@@ -4461,7 +4705,7 @@ var require_micromatch = __commonJS({
4461
4705
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4462
4706
  }
4463
4707
  if (options.nonull === true || options.nullglob === true) {
4464
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4708
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4465
4709
  }
4466
4710
  }
4467
4711
  return matches;
@@ -4491,7 +4735,7 @@ var require_micromatch = __commonJS({
4491
4735
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4492
4736
  }
4493
4737
  if (Array.isArray(pattern)) {
4494
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4738
+ return pattern.some((p) => micromatch.contains(str, p, options));
4495
4739
  }
4496
4740
  if (typeof pattern === "string") {
4497
4741
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4536,7 +4780,7 @@ var require_micromatch = __commonJS({
4536
4780
  if (typeof str !== "string") {
4537
4781
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4538
4782
  }
4539
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4783
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4540
4784
  };
4541
4785
  micromatch.capture = (glob, input, options) => {
4542
4786
  let posix = utils.isWindows(options);
@@ -4687,7 +4931,7 @@ var require_pattern = __commonJS({
4687
4931
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4688
4932
  function expandBraceExpansion(pattern) {
4689
4933
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4690
- patterns.sort((a, b) => a.length - b.length);
4934
+ patterns.sort((a2, b) => a2.length - b.length);
4691
4935
  return patterns.filter((pattern2) => pattern2 !== "");
4692
4936
  }
4693
4937
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4768,8 +5012,8 @@ var require_merge2 = __commonJS({
4768
5012
  }
4769
5013
  const mergedStream = PassThrough(options);
4770
5014
  function addStream() {
4771
- for (let i = 0, len = arguments.length; i < len; i++) {
4772
- streamsQueue.push(pauseStreams(arguments[i], options));
5015
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5016
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4773
5017
  }
4774
5018
  mergeStream();
4775
5019
  return this;
@@ -4818,8 +5062,8 @@ var require_merge2 = __commonJS({
4818
5062
  stream.pipe(mergedStream, { end: false });
4819
5063
  stream.resume();
4820
5064
  }
4821
- for (let i = 0; i < streams.length; i++) {
4822
- pipe(streams[i]);
5065
+ for (let i2 = 0; i2 < streams.length; i2++) {
5066
+ pipe(streams[i2]);
4823
5067
  }
4824
5068
  next();
4825
5069
  }
@@ -4850,8 +5094,8 @@ var require_merge2 = __commonJS({
4850
5094
  }
4851
5095
  streams.pause();
4852
5096
  } else {
4853
- for (let i = 0, len = streams.length; i < len; i++) {
4854
- streams[i] = pauseStreams(streams[i], options);
5097
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5098
+ streams[i2] = pauseStreams(streams[i2], options);
4855
5099
  }
4856
5100
  }
4857
5101
  return streams;
@@ -4933,13 +5177,13 @@ var require_tasks = __commonJS({
4933
5177
  Object.defineProperty(exports, "__esModule", { value: true });
4934
5178
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4935
5179
  var utils = require_utils3();
4936
- function generate(input, settings) {
4937
- const patterns = processPatterns(input, settings);
4938
- const ignore = processPatterns(settings.ignore, settings);
5180
+ function generate(input, settings2) {
5181
+ const patterns = processPatterns(input, settings2);
5182
+ const ignore = processPatterns(settings2.ignore, settings2);
4939
5183
  const positivePatterns = getPositivePatterns(patterns);
4940
5184
  const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
4941
- const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
4942
- const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
5185
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5186
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4943
5187
  const staticTasks = convertPatternsToTasks(
4944
5188
  staticPatterns,
4945
5189
  negativePatterns,
@@ -4955,12 +5199,12 @@ var require_tasks = __commonJS({
4955
5199
  return staticTasks.concat(dynamicTasks);
4956
5200
  }
4957
5201
  exports.generate = generate;
4958
- function processPatterns(input, settings) {
5202
+ function processPatterns(input, settings2) {
4959
5203
  let patterns = input;
4960
- if (settings.braceExpansion) {
5204
+ if (settings2.braceExpansion) {
4961
5205
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4962
5206
  }
4963
- if (settings.baseNameMatch) {
5207
+ if (settings2.baseNameMatch) {
4964
5208
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4965
5209
  }
4966
5210
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4991,7 +5235,7 @@ var require_tasks = __commonJS({
4991
5235
  }
4992
5236
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
4993
5237
  function groupPatternsByBaseDirectory(patterns) {
4994
- const group = {};
5238
+ const group2 = {};
4995
5239
  return patterns.reduce((collection, pattern) => {
4996
5240
  const base = utils.pattern.getBaseDirectory(pattern);
4997
5241
  if (base in collection) {
@@ -5000,7 +5244,7 @@ var require_tasks = __commonJS({
5000
5244
  collection[base] = [pattern];
5001
5245
  }
5002
5246
  return collection;
5003
- }, group);
5247
+ }, group2);
5004
5248
  }
5005
5249
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5006
5250
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5029,26 +5273,26 @@ var require_async = __commonJS({
5029
5273
  init_utils2();
5030
5274
  Object.defineProperty(exports, "__esModule", { value: true });
5031
5275
  exports.read = void 0;
5032
- function read(path, settings, callback) {
5033
- settings.fs.lstat(path, (lstatError, lstat) => {
5276
+ function read(path, settings2, callback) {
5277
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5034
5278
  if (lstatError !== null) {
5035
5279
  callFailureCallback(callback, lstatError);
5036
5280
  return;
5037
5281
  }
5038
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5282
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5039
5283
  callSuccessCallback(callback, lstat);
5040
5284
  return;
5041
5285
  }
5042
- settings.fs.stat(path, (statError, stat) => {
5286
+ settings2.fs.stat(path, (statError, stat) => {
5043
5287
  if (statError !== null) {
5044
- if (settings.throwErrorOnBrokenSymbolicLink) {
5288
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5045
5289
  callFailureCallback(callback, statError);
5046
5290
  return;
5047
5291
  }
5048
5292
  callSuccessCallback(callback, lstat);
5049
5293
  return;
5050
5294
  }
5051
- if (settings.markSymbolicLink) {
5295
+ if (settings2.markSymbolicLink) {
5052
5296
  stat.isSymbolicLink = () => true;
5053
5297
  }
5054
5298
  callSuccessCallback(callback, stat);
@@ -5072,19 +5316,19 @@ var require_sync = __commonJS({
5072
5316
  init_utils2();
5073
5317
  Object.defineProperty(exports, "__esModule", { value: true });
5074
5318
  exports.read = void 0;
5075
- function read(path, settings) {
5076
- const lstat = settings.fs.lstatSync(path);
5077
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5319
+ function read(path, settings2) {
5320
+ const lstat = settings2.fs.lstatSync(path);
5321
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5078
5322
  return lstat;
5079
5323
  }
5080
5324
  try {
5081
- const stat = settings.fs.statSync(path);
5082
- if (settings.markSymbolicLink) {
5325
+ const stat = settings2.fs.statSync(path);
5326
+ if (settings2.markSymbolicLink) {
5083
5327
  stat.isSymbolicLink = () => true;
5084
5328
  }
5085
5329
  return stat;
5086
5330
  } catch (error2) {
5087
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5331
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5088
5332
  return lstat;
5089
5333
  }
5090
5334
  throw error2;
@@ -5161,8 +5405,8 @@ var require_out = __commonJS({
5161
5405
  }
5162
5406
  exports.stat = stat;
5163
5407
  function statSync3(path, optionsOrSettings) {
5164
- const settings = getSettings(optionsOrSettings);
5165
- return sync.read(path, settings);
5408
+ const settings2 = getSettings(optionsOrSettings);
5409
+ return sync.read(path, settings2);
5166
5410
  }
5167
5411
  exports.statSync = statSync3;
5168
5412
  function getSettings(settingsOrOptions = {}) {
@@ -5210,8 +5454,8 @@ var require_run_parallel = __commonJS({
5210
5454
  if (isSync) queueMicrotask2(end);
5211
5455
  else end();
5212
5456
  }
5213
- function each(i, err, result) {
5214
- results[i] = result;
5457
+ function each(i2, err, result) {
5458
+ results[i2] = result;
5215
5459
  if (--pending === 0 || err) {
5216
5460
  done(err);
5217
5461
  }
@@ -5225,9 +5469,9 @@ var require_run_parallel = __commonJS({
5225
5469
  });
5226
5470
  });
5227
5471
  } else {
5228
- tasks.forEach(function(task, i) {
5472
+ tasks.forEach(function(task, i2) {
5229
5473
  task(function(err, result) {
5230
- each(i, err, result);
5474
+ each(i2, err, result);
5231
5475
  });
5232
5476
  });
5233
5477
  }
@@ -5302,11 +5546,11 @@ var require_common = __commonJS({
5302
5546
  init_utils2();
5303
5547
  Object.defineProperty(exports, "__esModule", { value: true });
5304
5548
  exports.joinPathSegments = void 0;
5305
- function joinPathSegments(a, b, separator) {
5306
- if (a.endsWith(separator)) {
5307
- return a + b;
5549
+ function joinPathSegments(a2, b, separator) {
5550
+ if (a2.endsWith(separator)) {
5551
+ return a2 + b;
5308
5552
  }
5309
- return a + separator + b;
5553
+ return a2 + separator + b;
5310
5554
  }
5311
5555
  exports.joinPathSegments = joinPathSegments;
5312
5556
  }
@@ -5324,16 +5568,16 @@ var require_async2 = __commonJS({
5324
5568
  var constants_1 = require_constants3();
5325
5569
  var utils = require_utils4();
5326
5570
  var common = require_common();
5327
- function read(directory, settings, callback) {
5328
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5329
- readdirWithFileTypes(directory, settings, callback);
5571
+ function read(directory, settings2, callback) {
5572
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5573
+ readdirWithFileTypes(directory, settings2, callback);
5330
5574
  return;
5331
5575
  }
5332
- readdir(directory, settings, callback);
5576
+ readdir(directory, settings2, callback);
5333
5577
  }
5334
5578
  exports.read = read;
5335
- function readdirWithFileTypes(directory, settings, callback) {
5336
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5579
+ function readdirWithFileTypes(directory, settings2, callback) {
5580
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5337
5581
  if (readdirError !== null) {
5338
5582
  callFailureCallback(callback, readdirError);
5339
5583
  return;
@@ -5341,13 +5585,13 @@ var require_async2 = __commonJS({
5341
5585
  const entries = dirents.map((dirent) => ({
5342
5586
  dirent,
5343
5587
  name: dirent.name,
5344
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5588
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5345
5589
  }));
5346
- if (!settings.followSymbolicLinks) {
5590
+ if (!settings2.followSymbolicLinks) {
5347
5591
  callSuccessCallback(callback, entries);
5348
5592
  return;
5349
5593
  }
5350
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5594
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5351
5595
  rpl(tasks, (rplError, rplEntries) => {
5352
5596
  if (rplError !== null) {
5353
5597
  callFailureCallback(callback, rplError);
@@ -5358,15 +5602,15 @@ var require_async2 = __commonJS({
5358
5602
  });
5359
5603
  }
5360
5604
  exports.readdirWithFileTypes = readdirWithFileTypes;
5361
- function makeRplTaskEntry(entry, settings) {
5605
+ function makeRplTaskEntry(entry, settings2) {
5362
5606
  return (done) => {
5363
5607
  if (!entry.dirent.isSymbolicLink()) {
5364
5608
  done(null, entry);
5365
5609
  return;
5366
5610
  }
5367
- settings.fs.stat(entry.path, (statError, stats) => {
5611
+ settings2.fs.stat(entry.path, (statError, stats) => {
5368
5612
  if (statError !== null) {
5369
- if (settings.throwErrorOnBrokenSymbolicLink) {
5613
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5370
5614
  done(statError);
5371
5615
  return;
5372
5616
  }
@@ -5378,16 +5622,16 @@ var require_async2 = __commonJS({
5378
5622
  });
5379
5623
  };
5380
5624
  }
5381
- function readdir(directory, settings, callback) {
5382
- settings.fs.readdir(directory, (readdirError, names) => {
5625
+ function readdir(directory, settings2, callback) {
5626
+ settings2.fs.readdir(directory, (readdirError, names) => {
5383
5627
  if (readdirError !== null) {
5384
5628
  callFailureCallback(callback, readdirError);
5385
5629
  return;
5386
5630
  }
5387
5631
  const tasks = names.map((name) => {
5388
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5632
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5389
5633
  return (done) => {
5390
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5634
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5391
5635
  if (error2 !== null) {
5392
5636
  done(error2);
5393
5637
  return;
@@ -5397,7 +5641,7 @@ var require_async2 = __commonJS({
5397
5641
  path,
5398
5642
  dirent: utils.fs.createDirentFromStats(name, stats)
5399
5643
  };
5400
- if (settings.stats) {
5644
+ if (settings2.stats) {
5401
5645
  entry.stats = stats;
5402
5646
  }
5403
5647
  done(null, entry);
@@ -5434,27 +5678,27 @@ var require_sync2 = __commonJS({
5434
5678
  var constants_1 = require_constants3();
5435
5679
  var utils = require_utils4();
5436
5680
  var common = require_common();
5437
- function read(directory, settings) {
5438
- if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5439
- return readdirWithFileTypes(directory, settings);
5681
+ function read(directory, settings2) {
5682
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5683
+ return readdirWithFileTypes(directory, settings2);
5440
5684
  }
5441
- return readdir(directory, settings);
5685
+ return readdir(directory, settings2);
5442
5686
  }
5443
5687
  exports.read = read;
5444
- function readdirWithFileTypes(directory, settings) {
5445
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5688
+ function readdirWithFileTypes(directory, settings2) {
5689
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5446
5690
  return dirents.map((dirent) => {
5447
5691
  const entry = {
5448
5692
  dirent,
5449
5693
  name: dirent.name,
5450
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5694
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5451
5695
  };
5452
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5696
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5453
5697
  try {
5454
- const stats = settings.fs.statSync(entry.path);
5698
+ const stats = settings2.fs.statSync(entry.path);
5455
5699
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5456
5700
  } catch (error2) {
5457
- if (settings.throwErrorOnBrokenSymbolicLink) {
5701
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5458
5702
  throw error2;
5459
5703
  }
5460
5704
  }
@@ -5463,17 +5707,17 @@ var require_sync2 = __commonJS({
5463
5707
  });
5464
5708
  }
5465
5709
  exports.readdirWithFileTypes = readdirWithFileTypes;
5466
- function readdir(directory, settings) {
5467
- const names = settings.fs.readdirSync(directory);
5710
+ function readdir(directory, settings2) {
5711
+ const names = settings2.fs.readdirSync(directory);
5468
5712
  return names.map((name) => {
5469
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5470
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5713
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5714
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5471
5715
  const entry = {
5472
5716
  name,
5473
5717
  path: entryPath,
5474
5718
  dirent: utils.fs.createDirentFromStats(name, stats)
5475
5719
  };
5476
- if (settings.stats) {
5720
+ if (settings2.stats) {
5477
5721
  entry.stats = stats;
5478
5722
  }
5479
5723
  return entry;
@@ -5560,8 +5804,8 @@ var require_out2 = __commonJS({
5560
5804
  }
5561
5805
  exports.scandir = scandir;
5562
5806
  function scandirSync(path, optionsOrSettings) {
5563
- const settings = getSettings(optionsOrSettings);
5564
- return sync.read(path, settings);
5807
+ const settings2 = getSettings(optionsOrSettings);
5808
+ return sync.read(path, settings2);
5565
5809
  }
5566
5810
  exports.scandirSync = scandirSync;
5567
5811
  function getSettings(settingsOrOptions = {}) {
@@ -5842,7 +6086,7 @@ var require_queue = __commonJS({
5842
6086
  queue.drained = drained;
5843
6087
  return queue;
5844
6088
  function push(value) {
5845
- var p2 = new Promise(function(resolve4, reject) {
6089
+ var p = new Promise(function(resolve4, reject) {
5846
6090
  pushCb(value, function(err, result) {
5847
6091
  if (err) {
5848
6092
  reject(err);
@@ -5851,11 +6095,11 @@ var require_queue = __commonJS({
5851
6095
  resolve4(result);
5852
6096
  });
5853
6097
  });
5854
- p2.catch(noop);
5855
- return p2;
6098
+ p.catch(noop);
6099
+ return p;
5856
6100
  }
5857
6101
  function unshift(value) {
5858
- var p2 = new Promise(function(resolve4, reject) {
6102
+ var p = new Promise(function(resolve4, reject) {
5859
6103
  unshiftCb(value, function(err, result) {
5860
6104
  if (err) {
5861
6105
  reject(err);
@@ -5864,11 +6108,11 @@ var require_queue = __commonJS({
5864
6108
  resolve4(result);
5865
6109
  });
5866
6110
  });
5867
- p2.catch(noop);
5868
- return p2;
6111
+ p.catch(noop);
6112
+ return p;
5869
6113
  }
5870
6114
  function drained() {
5871
- var p2 = new Promise(function(resolve4) {
6115
+ var p = new Promise(function(resolve4) {
5872
6116
  process.nextTick(function() {
5873
6117
  if (queue.idle()) {
5874
6118
  resolve4();
@@ -5882,7 +6126,7 @@ var require_queue = __commonJS({
5882
6126
  }
5883
6127
  });
5884
6128
  });
5885
- return p2;
6129
+ return p;
5886
6130
  }
5887
6131
  }
5888
6132
  module.exports = fastqueue;
@@ -5897,11 +6141,11 @@ var require_common2 = __commonJS({
5897
6141
  init_utils2();
5898
6142
  Object.defineProperty(exports, "__esModule", { value: true });
5899
6143
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5900
- function isFatalError(settings, error2) {
5901
- if (settings.errorFilter === null) {
6144
+ function isFatalError(settings2, error2) {
6145
+ if (settings2.errorFilter === null) {
5902
6146
  return true;
5903
6147
  }
5904
- return !settings.errorFilter(error2);
6148
+ return !settings2.errorFilter(error2);
5905
6149
  }
5906
6150
  exports.isFatalError = isFatalError;
5907
6151
  function isAppliedFilter(filter, value) {
@@ -5912,14 +6156,14 @@ var require_common2 = __commonJS({
5912
6156
  return filepath.split(/[/\\]/).join(separator);
5913
6157
  }
5914
6158
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5915
- function joinPathSegments(a, b, separator) {
5916
- if (a === "") {
6159
+ function joinPathSegments(a2, b, separator) {
6160
+ if (a2 === "") {
5917
6161
  return b;
5918
6162
  }
5919
- if (a.endsWith(separator)) {
5920
- return a + b;
6163
+ if (a2.endsWith(separator)) {
6164
+ return a2 + b;
5921
6165
  }
5922
- return a + separator + b;
6166
+ return a2 + separator + b;
5923
6167
  }
5924
6168
  exports.joinPathSegments = joinPathSegments;
5925
6169
  }
@@ -6266,14 +6510,14 @@ var require_out3 = __commonJS({
6266
6510
  }
6267
6511
  exports.walk = walk;
6268
6512
  function walkSync(directory, optionsOrSettings) {
6269
- const settings = getSettings(optionsOrSettings);
6270
- const provider = new sync_1.default(directory, settings);
6513
+ const settings2 = getSettings(optionsOrSettings);
6514
+ const provider = new sync_1.default(directory, settings2);
6271
6515
  return provider.read();
6272
6516
  }
6273
6517
  exports.walkSync = walkSync;
6274
6518
  function walkStream(directory, optionsOrSettings) {
6275
- const settings = getSettings(optionsOrSettings);
6276
- const provider = new stream_1.default(directory, settings);
6519
+ const settings2 = getSettings(optionsOrSettings);
6520
+ const provider = new stream_1.default(directory, settings2);
6277
6521
  return provider.read();
6278
6522
  }
6279
6523
  exports.walkStream = walkStream;
@@ -6359,8 +6603,8 @@ var require_stream3 = __commonJS({
6359
6603
  done();
6360
6604
  }).catch(done);
6361
6605
  };
6362
- for (let i = 0; i < filepaths.length; i++) {
6363
- stream.write(i);
6606
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6607
+ stream.write(i2);
6364
6608
  }
6365
6609
  return stream;
6366
6610
  }
@@ -7021,14 +7265,14 @@ var require_out4 = __commonJS({
7021
7265
  function generateTasks(source, options) {
7022
7266
  assertPatternsInput(source);
7023
7267
  const patterns = [].concat(source);
7024
- const settings = new settings_1.default(options);
7025
- return taskManager.generate(patterns, settings);
7268
+ const settings2 = new settings_1.default(options);
7269
+ return taskManager.generate(patterns, settings2);
7026
7270
  }
7027
7271
  FastGlob2.generateTasks = generateTasks;
7028
7272
  function isDynamicPattern(source, options) {
7029
7273
  assertPatternsInput(source);
7030
- const settings = new settings_1.default(options);
7031
- return utils.pattern.isDynamicPattern(source, settings);
7274
+ const settings2 = new settings_1.default(options);
7275
+ return utils.pattern.isDynamicPattern(source, settings2);
7032
7276
  }
7033
7277
  FastGlob2.isDynamicPattern = isDynamicPattern;
7034
7278
  function escapePath(source) {
@@ -7070,9 +7314,9 @@ var require_out4 = __commonJS({
7070
7314
  })(FastGlob || (FastGlob = {}));
7071
7315
  function getWorks(source, _Provider, options) {
7072
7316
  const patterns = [].concat(source);
7073
- const settings = new settings_1.default(options);
7074
- const tasks = taskManager.generate(patterns, settings);
7075
- const provider = new _Provider(settings);
7317
+ const settings2 = new settings_1.default(options);
7318
+ const tasks = taskManager.generate(patterns, settings2);
7319
+ const provider = new _Provider(settings2);
7076
7320
  return tasks.map(provider.read, provider);
7077
7321
  }
7078
7322
  function assertPatternsInput(input) {
@@ -7250,8 +7494,8 @@ import "node:fs";
7250
7494
  import { createRequire } from "node:module";
7251
7495
  import {
7252
7496
  resolve,
7253
- join,
7254
- dirname,
7497
+ join as join2,
7498
+ dirname as dirname2,
7255
7499
  relative,
7256
7500
  normalize,
7257
7501
  sep,
@@ -7265,7 +7509,7 @@ function safeExecuteAsync(fn, message) {
7265
7509
  );
7266
7510
  });
7267
7511
  }
7268
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7512
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7269
7513
  var init_PathResolver = __esm({
7270
7514
  "packages/core/config/utils/PathResolver.ts"() {
7271
7515
  "use strict";
@@ -7278,7 +7522,7 @@ var init_PathResolver = __esm({
7278
7522
  getPatternsFor: getPatternsFor || void 0,
7279
7523
  I18N_PATHS: I18N_PATHS || void 0
7280
7524
  };
7281
- log2 = {
7525
+ log3 = {
7282
7526
  error: (message, error2) => {
7283
7527
  },
7284
7528
  warn: (message, error2) => {
@@ -7399,7 +7643,7 @@ var init_PathResolver = __esm({
7399
7643
  */
7400
7644
  getDirname(path) {
7401
7645
  if (!path) return "";
7402
- return this.normalizePath(dirname(path));
7646
+ return this.normalizePath(dirname2(path));
7403
7647
  }
7404
7648
  /**
7405
7649
  * Resolve package path using Node's module resolution
@@ -7411,7 +7655,7 @@ var init_PathResolver = __esm({
7411
7655
  resolvePackage(packageSpecifier, fromPath = null) {
7412
7656
  try {
7413
7657
  const basePath = fromPath || this.getAppRoot();
7414
- const require3 = createRequire(join(basePath, "package.json"));
7658
+ const require3 = createRequire(join2(basePath, "package.json"));
7415
7659
  const resolved = require3.resolve(packageSpecifier);
7416
7660
  return this.normalizePath(resolved);
7417
7661
  } catch (error2) {
@@ -7563,7 +7807,7 @@ var init_PathResolver = __esm({
7563
7807
  return cleanContent;
7564
7808
  } catch (error2) {
7565
7809
  if (this.options.debug) {
7566
- log2.warn(`Failed to read file: ${filePath}`, error2);
7810
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7567
7811
  }
7568
7812
  return null;
7569
7813
  }
@@ -7591,7 +7835,7 @@ var init_PathResolver = __esm({
7591
7835
  return cleanContent;
7592
7836
  } catch (error2) {
7593
7837
  if (this.options.debug) {
7594
- log2.warn(`Failed to read file: ${filePath}`, error2);
7838
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7595
7839
  }
7596
7840
  return null;
7597
7841
  }
@@ -7613,16 +7857,16 @@ var init_PathResolver = __esm({
7613
7857
  verbose = false
7614
7858
  } = options;
7615
7859
  const normalizedPath = this.normalizePath(filePath);
7616
- const dir = this.normalizePath(dirname(normalizedPath));
7860
+ const dir = this.normalizePath(dirname2(normalizedPath));
7617
7861
  const fileExists = this.pathExists(normalizedPath);
7618
7862
  if (fileExists && !overwrite) {
7619
7863
  if (verbose) {
7620
- log2.info(`Skipping existing file: ${normalizedPath}`);
7864
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7621
7865
  }
7622
7866
  return false;
7623
7867
  }
7624
7868
  if (dryRun) {
7625
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7869
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7626
7870
  return true;
7627
7871
  }
7628
7872
  try {
@@ -7647,7 +7891,7 @@ var init_PathResolver = __esm({
7647
7891
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7648
7892
  }
7649
7893
  if (verbose) {
7650
- log2.info(
7894
+ log3.info(
7651
7895
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7652
7896
  );
7653
7897
  }
@@ -7674,16 +7918,16 @@ var init_PathResolver = __esm({
7674
7918
  verbose = false
7675
7919
  } = options;
7676
7920
  const normalizedPath = this.normalizePath(filePath);
7677
- const dir = this.normalizePath(dirname(normalizedPath));
7921
+ const dir = this.normalizePath(dirname2(normalizedPath));
7678
7922
  const fileExists = this.pathExists(normalizedPath);
7679
7923
  if (fileExists && !overwrite) {
7680
7924
  if (verbose) {
7681
- log2.info(`Skipping existing file: ${normalizedPath}`);
7925
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7682
7926
  }
7683
7927
  return false;
7684
7928
  }
7685
7929
  if (dryRun) {
7686
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7930
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7687
7931
  return true;
7688
7932
  }
7689
7933
  try {
@@ -7707,7 +7951,7 @@ var init_PathResolver = __esm({
7707
7951
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7708
7952
  }
7709
7953
  if (verbose) {
7710
- log2.info(
7954
+ log3.info(
7711
7955
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7712
7956
  );
7713
7957
  }
@@ -7732,15 +7976,15 @@ var init_PathResolver = __esm({
7732
7976
  const fileExists = this.pathExists(normalizedDestPath);
7733
7977
  if (fileExists && !overwrite) {
7734
7978
  if (verbose) {
7735
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7979
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7736
7980
  }
7737
7981
  return false;
7738
7982
  }
7739
7983
  if (dryRun) {
7740
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7984
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7741
7985
  return true;
7742
7986
  }
7743
- const dir = this.normalizePath(dirname(normalizedDestPath));
7987
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7744
7988
  try {
7745
7989
  await fs.promises.mkdir(dir, { recursive: true });
7746
7990
  } catch (error2) {
@@ -7750,7 +7994,7 @@ var init_PathResolver = __esm({
7750
7994
  return await safeExecuteAsync(async () => {
7751
7995
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7752
7996
  if (verbose) {
7753
- log2.info(
7997
+ log3.info(
7754
7998
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7755
7999
  );
7756
8000
  }
@@ -7774,15 +8018,15 @@ var init_PathResolver = __esm({
7774
8018
  const fileExists = this.pathExists(normalizedDestPath);
7775
8019
  if (fileExists && !overwrite) {
7776
8020
  if (verbose) {
7777
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8021
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7778
8022
  }
7779
8023
  return false;
7780
8024
  }
7781
8025
  if (dryRun) {
7782
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8026
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7783
8027
  return true;
7784
8028
  }
7785
- const dir = this.normalizePath(dirname(normalizedDestPath));
8029
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7786
8030
  try {
7787
8031
  fs.mkdirSync(dir, { recursive: true });
7788
8032
  } catch (error2) {
@@ -7791,7 +8035,7 @@ var init_PathResolver = __esm({
7791
8035
  try {
7792
8036
  fs.copyFileSync(srcPath, normalizedDestPath);
7793
8037
  if (verbose) {
7794
- log2.info(
8038
+ log3.info(
7795
8039
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7796
8040
  );
7797
8041
  }
@@ -7808,7 +8052,7 @@ var init_PathResolver = __esm({
7808
8052
  return fs.existsSync(filePath);
7809
8053
  } catch (error2) {
7810
8054
  if (!silent) {
7811
- log2.error(`Error checking path existence: ${filePath}`, error2);
8055
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7812
8056
  }
7813
8057
  return false;
7814
8058
  }
@@ -7834,7 +8078,7 @@ var init_PathResolver = __esm({
7834
8078
  return fs.readdirSync(dirPath, options);
7835
8079
  } catch (error2) {
7836
8080
  if (this.options.debug) {
7837
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8081
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7838
8082
  }
7839
8083
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7840
8084
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7852,7 +8096,7 @@ var init_PathResolver = __esm({
7852
8096
  return fs.statSync(filePath);
7853
8097
  } catch (error2) {
7854
8098
  if (this.options.debug) {
7855
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8099
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7856
8100
  }
7857
8101
  return null;
7858
8102
  }
@@ -7869,7 +8113,7 @@ var init_PathResolver = __esm({
7869
8113
  return fs.lstatSync(filePath);
7870
8114
  } catch (error2) {
7871
8115
  if (this.options.debug) {
7872
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8116
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7873
8117
  }
7874
8118
  return null;
7875
8119
  }
@@ -7958,7 +8202,7 @@ var init_PathResolver = __esm({
7958
8202
  * @returns True if repoRoot is the monorepo (has packages directory)
7959
8203
  */
7960
8204
  isMonorepo() {
7961
- const packagesDir = join(this._repoRoot, "packages");
8205
+ const packagesDir = join2(this._repoRoot, "packages");
7962
8206
  return this.pathExists(packagesDir);
7963
8207
  }
7964
8208
  /**
@@ -7975,7 +8219,7 @@ var init_PathResolver = __esm({
7975
8219
  * Find files matching pattern within directory
7976
8220
  */
7977
8221
  async findFiles(directory, pattern, options = {}) {
7978
- const searchPattern = this.normalizePath(join(directory, pattern));
8222
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7979
8223
  const appRoot = this.getAppRoot();
7980
8224
  const normalizeAppRoot = this.normalizePath(appRoot);
7981
8225
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8022,7 +8266,7 @@ var init_PathResolver = __esm({
8022
8266
  return null;
8023
8267
  }
8024
8268
  const resolvedPath = this.normalizePath(
8025
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8269
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8026
8270
  );
8027
8271
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8028
8272
  if (this.pathExists(resolvedDir)) {
@@ -8218,13 +8462,13 @@ var init_PathResolver = __esm({
8218
8462
  const maxLevels = this.options.maxLevels;
8219
8463
  while (levelsChecked < maxLevels) {
8220
8464
  const toolingPath = this.normalizePath(
8221
- join(currentDir, PACKAGE_PATHS.TOOLING)
8465
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8222
8466
  );
8223
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8467
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8224
8468
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8225
8469
  return currentDir;
8226
8470
  }
8227
- const appsDir = join(currentDir, "apps");
8471
+ const appsDir = join2(currentDir, "apps");
8228
8472
  if (this.pathExists(appsDir)) {
8229
8473
  const appsDirStat = this.statSync(appsDir);
8230
8474
  if (appsDirStat?.isDirectory()) {
@@ -8232,15 +8476,15 @@ var init_PathResolver = __esm({
8232
8476
  }
8233
8477
  }
8234
8478
  const packageJsonPath = this.normalizePath(
8235
- join(currentDir, "package.json")
8479
+ join2(currentDir, "package.json")
8236
8480
  );
8237
8481
  if (this.pathExists(packageJsonPath)) {
8238
- const parentDir2 = this.normalizePath(dirname(currentDir));
8482
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8239
8483
  if (parentDir2 === currentDir) {
8240
8484
  return currentDir;
8241
8485
  }
8242
8486
  }
8243
- const parentDir = this.normalizePath(dirname(currentDir));
8487
+ const parentDir = this.normalizePath(dirname2(currentDir));
8244
8488
  if (parentDir === currentDir) {
8245
8489
  break;
8246
8490
  }
@@ -8256,8 +8500,8 @@ var init_PathResolver = __esm({
8256
8500
  // packages/tooling/src/utils/pathResolver.ts
8257
8501
  import { createRequire as createRequire2 } from "node:module";
8258
8502
  import {
8259
- join as join2,
8260
- dirname as dirname2,
8503
+ join as join3,
8504
+ dirname as dirname3,
8261
8505
  basename as basename2,
8262
8506
  extname as extname2,
8263
8507
  relative as relative2,
@@ -8266,7 +8510,7 @@ import {
8266
8510
  isAbsolute as pathIsAbsolute
8267
8511
  } from "node:path";
8268
8512
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8269
- function readdirSync2(dirPath, options) {
8513
+ function readdirSync3(dirPath, options) {
8270
8514
  return pathResolverInstance.readdirSync(dirPath, options);
8271
8515
  }
8272
8516
  var pathResolverInstance, getRepoRoot, normalizePath, pathExists, readSync, writeSync, statSync2, joinPath;
@@ -8278,7 +8522,7 @@ var init_pathResolver = __esm({
8278
8522
  pathResolverInstance = PathResolver.getInstance({ debug: false });
8279
8523
  getRepoRoot = () => pathResolverInstance.getRepoRoot();
8280
8524
  normalizePath = (...pathSegments) => {
8281
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8525
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8282
8526
  };
8283
8527
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8284
8528
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -8340,7 +8584,7 @@ var init_typed_file_operations = __esm({
8340
8584
  import { Buffer } from "node:buffer";
8341
8585
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8342
8586
  import { createRequire as createRequire3 } from "node:module";
8343
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8587
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8344
8588
  import process from "node:process";
8345
8589
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8346
8590
  var require2, __filename, __dirname;
@@ -8349,7 +8593,7 @@ var init_utils2 = __esm({
8349
8593
  "use strict";
8350
8594
  require2 = createRequire3(import.meta.url);
8351
8595
  __filename = fileURLToPath3(import.meta.url);
8352
- __dirname = dirname3(__filename);
8596
+ __dirname = dirname4(__filename);
8353
8597
  if (typeof globalThis !== "undefined") {
8354
8598
  globalThis.require = require2;
8355
8599
  globalThis.__filename = __filename;
@@ -8381,7 +8625,7 @@ function detectApps(projectRoot) {
8381
8625
  const appsDir = joinPath(projectRoot, "apps");
8382
8626
  const appsDirStat = statSync2(appsDir);
8383
8627
  if (pathExists(appsDir) && appsDirStat?.isDirectory()) {
8384
- const appDirs = readdirSync2(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8628
+ const appDirs = readdirSync3(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8385
8629
  for (const appDir of appDirs) {
8386
8630
  const appPath = joinPath(appsDir, appDir);
8387
8631
  const packageJsonPath = joinPath(appPath, "package.json");
@@ -8558,17 +8802,17 @@ var init_app_detection = __esm({
8558
8802
  async function selectApp(projectRoot, appName) {
8559
8803
  const apps = detectApps(projectRoot);
8560
8804
  if (apps.length === 0) {
8561
- log.error("No apps found in this project.");
8562
- log.info('Run "dndev init" to create a new project.');
8805
+ log2.error("No apps found in this project.");
8806
+ log2.info('Run "dndev init" to create a new project.');
8563
8807
  return null;
8564
8808
  }
8565
8809
  if (appName) {
8566
- const app = apps.find((a) => a.name === appName);
8810
+ const app = apps.find((a2) => a2.name === appName);
8567
8811
  if (!app) {
8568
- log.warn(`App "${appName}" not found.`);
8569
- log.info("Available apps:");
8570
- apps.forEach((a) => log.info(` - ${a.name}`));
8571
- log.info("Please select from the list:");
8812
+ log2.warn(`App "${appName}" not found.`);
8813
+ log2.info("Available apps:");
8814
+ apps.forEach((a2) => log2.info(` - ${a2.name}`));
8815
+ log2.info("Please select from the list:");
8572
8816
  } else {
8573
8817
  return app;
8574
8818
  }
@@ -8576,7 +8820,7 @@ async function selectApp(projectRoot, appName) {
8576
8820
  if (apps.length === 1) {
8577
8821
  return apps[0] || null;
8578
8822
  }
8579
- const selected = await _t({
8823
+ const selected = await select({
8580
8824
  message: "Select app:",
8581
8825
  options: apps.map((app) => ({
8582
8826
  value: app.name,
@@ -8586,7 +8830,7 @@ async function selectApp(projectRoot, appName) {
8586
8830
  if (typeof selected !== "string") {
8587
8831
  return null;
8588
8832
  }
8589
- return apps.find((a) => a.name === selected) || null;
8833
+ return apps.find((a2) => a2.name === selected) || null;
8590
8834
  }
8591
8835
  var init_app_selector = __esm({
8592
8836
  "packages/tooling/src/utils/app-selector.ts"() {
@@ -8605,14 +8849,14 @@ async function askForMultiSelection(message, choices, defaultIndices = []) {
8605
8849
  label: choice.title,
8606
8850
  hint: choice.hint
8607
8851
  }));
8608
- const initialValues = defaultIndices.map((i) => choices[i]?.value).filter(Boolean);
8609
- const result = await yt({
8852
+ const initialValues = defaultIndices.map((i2) => choices[i2]?.value).filter(Boolean);
8853
+ const result = await multiselect({
8610
8854
  message,
8611
8855
  options,
8612
8856
  initialValues: initialValues.length > 0 ? initialValues : void 0
8613
8857
  });
8614
- if (q(result)) {
8615
- pt("Operation cancelled.");
8858
+ if (isCancel(result)) {
8859
+ cancel("Operation cancelled.");
8616
8860
  process.exit(0);
8617
8861
  }
8618
8862
  return result;
@@ -8695,13 +8939,13 @@ init_utils2();
8695
8939
 
8696
8940
  // packages/tooling/src/apps/emu-firebase.ts
8697
8941
  init_utils2();
8942
+ init_app_detection();
8698
8943
  init_cli_input();
8699
8944
  init_cli_output();
8700
8945
  init_pathResolver();
8701
8946
  import { spawnSync as spawnSync2, execFileSync } from "node:child_process";
8702
8947
  import { platform as platform2 } from "node:os";
8703
8948
  init_typed_file_operations();
8704
- init_app_detection();
8705
8949
  function discoverFirebaseProjectId(appPath) {
8706
8950
  const firebasercPath = joinPath(appPath, ".firebaserc");
8707
8951
  if (pathExists(firebasercPath)) {
@@ -8742,7 +8986,7 @@ function killPorts(ports) {
8742
8986
  for (const pid of Array.from(pids)) {
8743
8987
  try {
8744
8988
  execFileSync("taskkill", ["/F", "/PID", pid], { stdio: "ignore" });
8745
- log.debug(`Killed process ${pid} on port ${port}`);
8989
+ log2.debug(`Killed process ${pid} on port ${port}`);
8746
8990
  } catch {
8747
8991
  }
8748
8992
  }
@@ -8756,7 +9000,7 @@ function killPorts(ports) {
8756
9000
  for (const pid of pids) {
8757
9001
  try {
8758
9002
  process.kill(Number(pid), "SIGKILL");
8759
- log.debug(`Killed process ${pid} on port ${port}`);
9003
+ log2.debug(`Killed process ${pid} on port ${port}`);
8760
9004
  } catch {
8761
9005
  }
8762
9006
  }
@@ -8826,7 +9070,7 @@ async function startFirebase(app, projectRoot, options = {}) {
8826
9070
  hint: "Stripe webhook forwarding (for payment testing)"
8827
9071
  }
8828
9072
  ];
8829
- log.info(`Starting Firebase emulators + dev server for ${app.name}...
9073
+ log2.info(`Starting Firebase emulators + dev server for ${app.name}...
8830
9074
  `);
8831
9075
  if (selectedServices.length === 0) {
8832
9076
  selectedServices = await askForMultiSelection(
@@ -8836,7 +9080,7 @@ async function startFirebase(app, projectRoot, options = {}) {
8836
9080
  // Default: Functions and Firestore
8837
9081
  );
8838
9082
  } else {
8839
- log.info(`Selected services: ${selectedServices.join(", ")}
9083
+ log2.info(`Selected services: ${selectedServices.join(", ")}
8840
9084
  `);
8841
9085
  }
8842
9086
  const useAuth = selectedServices.includes("auth");
@@ -8844,16 +9088,16 @@ async function startFirebase(app, projectRoot, options = {}) {
8844
9088
  const useFirestore = selectedServices.includes("firestore");
8845
9089
  const useStripe = selectedServices.includes("stripe");
8846
9090
  if (!useFunctions) {
8847
- log.error("Functions emulator is required for Firebase apps.");
9091
+ log2.error("Functions emulator is required for Firebase apps.");
8848
9092
  return 1;
8849
9093
  }
8850
9094
  const functionsDir = getFunctionsPath(app);
8851
9095
  const envLocalPath = joinPath(functionsDir, ".env.local");
8852
9096
  if (pathExists(envLocalPath)) {
8853
9097
  loadEnvFile(envLocalPath);
8854
- log.debug("Loaded functions/.env.local for emulator context");
9098
+ log2.debug("Loaded functions/.env.local for emulator context");
8855
9099
  } else {
8856
- log.warn(
9100
+ log2.warn(
8857
9101
  "No .env.local found in functions directory. Emulator may lack required secrets."
8858
9102
  );
8859
9103
  }
@@ -8869,7 +9113,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8869
9113
  ` : `FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8870
9114
  `;
8871
9115
  writeSync(envLocalPath, newContent);
8872
- log.debug("Set FIREBASE_AUTH_EMULATOR_HOST in functions/.env.local");
9116
+ log2.debug("Set FIREBASE_AUTH_EMULATOR_HOST in functions/.env.local");
8873
9117
  } else if (!useAuth && hasAuthEmulatorHost) {
8874
9118
  const lines = existingContent.split("\n");
8875
9119
  const filteredLines = lines.filter(
@@ -8877,12 +9121,12 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8877
9121
  );
8878
9122
  const newContent = filteredLines.join("\n");
8879
9123
  writeSync(envLocalPath, newContent);
8880
- log.debug(
9124
+ log2.debug(
8881
9125
  "Removed FIREBASE_AUTH_EMULATOR_HOST from functions/.env.local"
8882
9126
  );
8883
9127
  }
8884
9128
  }
8885
- log.info("Building functions...");
9129
+ log2.info("Building functions...");
8886
9130
  const buildResult = spawnSync2("bun", ["run", "build"], {
8887
9131
  cwd: functionsDir,
8888
9132
  stdio: "pipe",
@@ -8898,7 +9142,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8898
9142
  if (buildResult.stderr) {
8899
9143
  process.stderr.write(buildResult.stderr);
8900
9144
  }
8901
- log.error("Functions build failed. Fix errors and try again.");
9145
+ log2.error("Functions build failed. Fix errors and try again.");
8902
9146
  return 1;
8903
9147
  }
8904
9148
  const appFirebaseJson = joinPath(app.path, "firebase.json");
@@ -8914,7 +9158,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8914
9158
  }
8915
9159
  const ports = getEmulatorPorts(emulatorConfig);
8916
9160
  if (ports.length > 0) {
8917
- log.info("Clearing ports...");
9161
+ log2.info("Clearing ports...");
8918
9162
  killPorts(ports);
8919
9163
  }
8920
9164
  const emulatorsToStart = [];
@@ -8956,12 +9200,12 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8956
9200
  if (useStripe && projectId) {
8957
9201
  const stripeWebhookUrl = `http://localhost:5001/${projectId}/${region}/stripeWebhook`;
8958
9202
  concurrentlyArgs.push(`stripe listen --forward-to ${stripeWebhookUrl}`);
8959
- log.info("");
8960
- log.info("Stripe webhook forwarding will start automatically");
8961
- log.info(` Webhook URL: ${stripeWebhookUrl}`);
8962
- log.info(" To trigger test events, run in another terminal:");
8963
- log.info(" stripe trigger checkout.session.completed");
8964
- log.info("");
9203
+ log2.info("");
9204
+ log2.info("Stripe webhook forwarding will start automatically");
9205
+ log2.info(` Webhook URL: ${stripeWebhookUrl}`);
9206
+ log2.info(" To trigger test events, run in another terminal:");
9207
+ log2.info(" stripe trigger checkout.session.completed");
9208
+ log2.info("");
8965
9209
  }
8966
9210
  const isWindows = platform2() === "win32";
8967
9211
  const childProcess = spawnCrossPlatform(
@@ -8982,7 +9226,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
8982
9226
  };
8983
9227
  const cleanup = (signal) => {
8984
9228
  if (!childProcess.pid) return;
8985
- log.debug(`Received ${signal}, cleaning up processes...`);
9229
+ log2.debug(`Received ${signal}, cleaning up processes...`);
8986
9230
  if (isWindows) {
8987
9231
  try {
8988
9232
  execFileSync(
@@ -9014,7 +9258,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
9014
9258
  for (const signal of signals) {
9015
9259
  const handler = () => {
9016
9260
  cleanup(signal);
9017
- handlers.forEach((h) => h());
9261
+ handlers.forEach((h2) => h2());
9018
9262
  process.exit(SIGNAL_EXIT_CODES[signal] ?? 130);
9019
9263
  };
9020
9264
  process.on(signal, handler);
@@ -9022,17 +9266,17 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
9022
9266
  }
9023
9267
  return new Promise((resolve4) => {
9024
9268
  childProcess.on("exit", (code, signal) => {
9025
- handlers.forEach((h) => h());
9269
+ handlers.forEach((h2) => h2());
9026
9270
  if (signal) {
9027
- log.debug(`Process killed by signal: ${signal}`);
9271
+ log2.debug(`Process killed by signal: ${signal}`);
9028
9272
  resolve4(SIGNAL_EXIT_CODES[signal] ?? 130);
9029
9273
  } else {
9030
9274
  resolve4(code ?? 0);
9031
9275
  }
9032
9276
  });
9033
9277
  childProcess.on("error", (error2) => {
9034
- handlers.forEach((h) => h());
9035
- log.error(`Failed to start Firebase emulators: ${error2.message}`);
9278
+ handlers.forEach((h2) => h2());
9279
+ log2.error(`Failed to start Firebase emulators: ${error2.message}`);
9036
9280
  resolve4(1);
9037
9281
  });
9038
9282
  });
@@ -9052,18 +9296,18 @@ function isDockerRunning() {
9052
9296
  }
9053
9297
  }
9054
9298
  async function startSupabase(app, _projectRoot) {
9055
- log.info(`Starting Supabase local stack + dev server for ${app.name}...
9299
+ log2.info(`Starting Supabase local stack + dev server for ${app.name}...
9056
9300
  `);
9057
9301
  if (!isDockerRunning()) {
9058
- log.error("Docker is not running. Supabase local dev requires Docker.");
9059
- log.error("Start Docker Desktop and try again.\n");
9302
+ log2.error("Docker is not running. Supabase local dev requires Docker.");
9303
+ log2.error("Start Docker Desktop and try again.\n");
9060
9304
  return 1;
9061
9305
  }
9062
9306
  try {
9063
9307
  execSync2("supabase --version", { stdio: "pipe" });
9064
9308
  } catch {
9065
- log.error("Supabase CLI not found. Install it:");
9066
- log.error(" bun install -g supabase\n");
9309
+ log2.error("Supabase CLI not found. Install it:");
9310
+ log2.error(" bun install -g supabase\n");
9067
9311
  return 1;
9068
9312
  }
9069
9313
  const isWindows = platform3() === "win32";
@@ -9118,7 +9362,7 @@ async function startSupabase(app, _projectRoot) {
9118
9362
  return new Promise((resolve4) => {
9119
9363
  childProcess.on("exit", (code) => resolve4(code ?? 0));
9120
9364
  childProcess.on("error", (error2) => {
9121
- log.error(`Failed to start Supabase local dev: ${error2.message}`);
9365
+ log2.error(`Failed to start Supabase local dev: ${error2.message}`);
9122
9366
  resolve4(1);
9123
9367
  });
9124
9368
  });
@@ -9130,13 +9374,13 @@ init_cli_output();
9130
9374
  import { execFileSync as execFileSync3, execSync as execSync3 } from "node:child_process";
9131
9375
  import { platform as platform4 } from "node:os";
9132
9376
  async function startVercel(app, _projectRoot) {
9133
- log.info(`Starting Vercel dev server for ${app.name}...
9377
+ log2.info(`Starting Vercel dev server for ${app.name}...
9134
9378
  `);
9135
9379
  try {
9136
9380
  execSync3("vercel --version", { stdio: "pipe" });
9137
9381
  } catch {
9138
- log.error("Vercel CLI not found. Install it:");
9139
- log.error(" bun install -g vercel\n");
9382
+ log2.error("Vercel CLI not found. Install it:");
9383
+ log2.error(" bun install -g vercel\n");
9140
9384
  return 1;
9141
9385
  }
9142
9386
  const isWindows = platform4() === "win32";
@@ -9176,7 +9420,7 @@ async function startVercel(app, _projectRoot) {
9176
9420
  return new Promise((resolve4) => {
9177
9421
  childProcess.on("exit", (code) => resolve4(code ?? 0));
9178
9422
  childProcess.on("error", (error2) => {
9179
- log.error(`Failed to start Vercel dev: ${error2.message}`);
9423
+ log2.error(`Failed to start Vercel dev: ${error2.message}`);
9180
9424
  resolve4(1);
9181
9425
  });
9182
9426
  });
@@ -9207,10 +9451,10 @@ async function main(options) {
9207
9451
  switch (emuTarget) {
9208
9452
  case "firebase": {
9209
9453
  if (!app.functions) {
9210
- log.error(
9454
+ log2.error(
9211
9455
  `App "${app.name}" has Firebase config but no functions directory.`
9212
9456
  );
9213
- log.error('Use "dndev dev" for apps without backend functions.\n');
9457
+ log2.error('Use "dndev dev" for apps without backend functions.\n');
9214
9458
  return 1;
9215
9459
  }
9216
9460
  const selectedServices = parseFirebaseServices(args, options);
@@ -9224,11 +9468,11 @@ async function main(options) {
9224
9468
  case "vercel":
9225
9469
  return startVercel(app, projectRoot);
9226
9470
  default:
9227
- log.error(`App "${app.name}" does not have a detected backend.`);
9228
- log.error(
9471
+ log2.error(`App "${app.name}" does not have a detected backend.`);
9472
+ log2.error(
9229
9473
  "Expected: firebase.json (Firebase), supabase/config.toml or @donotdev/supabase (Supabase), or vercel.json (Vercel)."
9230
9474
  );
9231
- log.error('Use "dndev dev" for apps without a backend.\n');
9475
+ log2.error('Use "dndev dev" for apps without a backend.\n');
9232
9476
  return 1;
9233
9477
  }
9234
9478
  }