@donotdev/cli 0.1.45 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
8
+ get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
@@ -37,31 +37,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
37
  mod
38
38
  ));
39
39
 
40
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
41
- var isAmbiguous, isFullWidth, isWide;
40
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
41
+ var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
42
42
  var init_utils = __esm({
43
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
43
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js"() {
44
44
  init_utils2();
45
- isAmbiguous = (x) => {
46
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
47
- };
45
+ getCodePointsLength = /* @__PURE__ */ (() => {
46
+ const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
47
+ return (input) => {
48
+ let surrogatePairsNr = 0;
49
+ SURROGATE_PAIR_RE.lastIndex = 0;
50
+ while (SURROGATE_PAIR_RE.test(input)) {
51
+ surrogatePairsNr += 1;
52
+ }
53
+ return input.length - surrogatePairsNr;
54
+ };
55
+ })();
48
56
  isFullWidth = (x) => {
49
57
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
50
58
  };
51
- isWide = (x) => {
52
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
59
+ isWideNotCJKTNotEmoji = (x) => {
60
+ return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
53
61
  };
54
62
  }
55
63
  });
56
64
 
57
- // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
58
- var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
65
+ // node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
66
+ var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
59
67
  var init_dist = __esm({
60
- "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
68
+ "node_modules/.bun/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js"() {
61
69
  init_utils2();
62
70
  init_utils();
63
- ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
71
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
64
72
  CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
73
+ CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
65
74
  TAB_RE = /\t{1,1000}/y;
66
75
  EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
67
76
  LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
@@ -71,14 +80,21 @@ var init_dist = __esm({
71
80
  const LIMIT = truncationOptions.limit ?? Infinity;
72
81
  const ELLIPSIS = truncationOptions.ellipsis ?? "";
73
82
  const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
74
- const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
83
+ const ANSI_WIDTH = 0;
75
84
  const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
76
85
  const TAB_WIDTH = widthOptions.tabWidth ?? 8;
77
- const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
78
86
  const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
79
- const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
87
+ const FULL_WIDTH_WIDTH = 2;
80
88
  const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
81
- const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
89
+ const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
90
+ const PARSE_BLOCKS = [
91
+ [LATIN_RE, REGULAR_WIDTH],
92
+ [ANSI_RE, ANSI_WIDTH],
93
+ [CONTROL_RE, CONTROL_WIDTH],
94
+ [TAB_RE, TAB_WIDTH],
95
+ [EMOJI_RE, EMOJI_WIDTH],
96
+ [CJKT_WIDE_RE, WIDE_WIDTH]
97
+ ];
82
98
  let indexPrev = 0;
83
99
  let index = 0;
84
100
  let length = input.length;
@@ -98,10 +114,8 @@ var init_dist = __esm({
98
114
  const codePoint = char.codePointAt(0) || 0;
99
115
  if (isFullWidth(codePoint)) {
100
116
  widthExtra = FULL_WIDTH_WIDTH;
101
- } else if (isWide(codePoint)) {
117
+ } else if (isWideNotCJKTNotEmoji(codePoint)) {
102
118
  widthExtra = WIDE_WIDTH;
103
- } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
104
- widthExtra = AMBIGUOUS_WIDTH;
105
119
  } else {
106
120
  widthExtra = REGULAR_WIDTH;
107
121
  }
@@ -117,88 +131,28 @@ var init_dist = __esm({
117
131
  }
118
132
  unmatchedStart = unmatchedEnd = 0;
119
133
  }
120
- if (index >= length)
121
- break;
122
- LATIN_RE.lastIndex = index;
123
- if (LATIN_RE.test(input)) {
124
- lengthExtra = LATIN_RE.lastIndex - index;
125
- widthExtra = lengthExtra * REGULAR_WIDTH;
126
- if (width + widthExtra > truncationLimit) {
127
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
128
- }
129
- if (width + widthExtra > LIMIT) {
130
- truncationEnabled = true;
131
- break;
132
- }
133
- width += widthExtra;
134
- unmatchedStart = indexPrev;
135
- unmatchedEnd = index;
136
- index = indexPrev = LATIN_RE.lastIndex;
137
- continue;
138
- }
139
- ANSI_RE.lastIndex = index;
140
- if (ANSI_RE.test(input)) {
141
- if (width + ANSI_WIDTH > truncationLimit) {
142
- truncationIndex = Math.min(truncationIndex, index);
143
- }
144
- if (width + ANSI_WIDTH > LIMIT) {
145
- truncationEnabled = true;
146
- break;
147
- }
148
- width += ANSI_WIDTH;
149
- unmatchedStart = indexPrev;
150
- unmatchedEnd = index;
151
- index = indexPrev = ANSI_RE.lastIndex;
152
- continue;
153
- }
154
- CONTROL_RE.lastIndex = index;
155
- if (CONTROL_RE.test(input)) {
156
- lengthExtra = CONTROL_RE.lastIndex - index;
157
- widthExtra = lengthExtra * CONTROL_WIDTH;
158
- if (width + widthExtra > truncationLimit) {
159
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
160
- }
161
- if (width + widthExtra > LIMIT) {
162
- truncationEnabled = true;
163
- break;
164
- }
165
- width += widthExtra;
166
- unmatchedStart = indexPrev;
167
- unmatchedEnd = index;
168
- index = indexPrev = CONTROL_RE.lastIndex;
169
- continue;
134
+ if (index >= length) {
135
+ break outer;
170
136
  }
171
- TAB_RE.lastIndex = index;
172
- if (TAB_RE.test(input)) {
173
- lengthExtra = TAB_RE.lastIndex - index;
174
- widthExtra = lengthExtra * TAB_WIDTH;
175
- if (width + widthExtra > truncationLimit) {
176
- truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
177
- }
178
- if (width + widthExtra > LIMIT) {
179
- truncationEnabled = true;
180
- break;
181
- }
182
- width += widthExtra;
183
- unmatchedStart = indexPrev;
184
- unmatchedEnd = index;
185
- index = indexPrev = TAB_RE.lastIndex;
186
- continue;
187
- }
188
- EMOJI_RE.lastIndex = index;
189
- if (EMOJI_RE.test(input)) {
190
- if (width + EMOJI_WIDTH > truncationLimit) {
191
- truncationIndex = Math.min(truncationIndex, index);
192
- }
193
- if (width + EMOJI_WIDTH > LIMIT) {
194
- truncationEnabled = true;
195
- break;
137
+ for (let i2 = 0, l2 = PARSE_BLOCKS.length; i2 < l2; i2++) {
138
+ const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
139
+ BLOCK_RE.lastIndex = index;
140
+ if (BLOCK_RE.test(input)) {
141
+ lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
142
+ widthExtra = lengthExtra * BLOCK_WIDTH;
143
+ if (width + widthExtra > truncationLimit) {
144
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
145
+ }
146
+ if (width + widthExtra > LIMIT) {
147
+ truncationEnabled = true;
148
+ break outer;
149
+ }
150
+ width += widthExtra;
151
+ unmatchedStart = indexPrev;
152
+ unmatchedEnd = index;
153
+ index = indexPrev = BLOCK_RE.lastIndex;
154
+ continue outer;
196
155
  }
197
- width += EMOJI_WIDTH;
198
- unmatchedStart = indexPrev;
199
- unmatchedEnd = index;
200
- index = indexPrev = EMOJI_RE.lastIndex;
201
- continue;
202
156
  }
203
157
  index += 1;
204
158
  }
@@ -213,10 +167,10 @@ var init_dist = __esm({
213
167
  }
214
168
  });
215
169
 
216
- // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
170
+ // node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
217
171
  var NO_TRUNCATION2, fastStringWidth, dist_default2;
218
172
  var init_dist2 = __esm({
219
- "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
173
+ "node_modules/.bun/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js"() {
220
174
  init_utils2();
221
175
  init_dist();
222
176
  NO_TRUNCATION2 = {
@@ -231,13 +185,13 @@ var init_dist2 = __esm({
231
185
  }
232
186
  });
233
187
 
234
- // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
188
+ // node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
235
189
  function wrapAnsi(string, columns, options) {
236
190
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
237
191
  }
238
192
  var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
239
193
  var init_main = __esm({
240
- "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
194
+ "node_modules/.bun/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js"() {
241
195
  init_utils2();
242
196
  init_dist2();
243
197
  ESC = "\x1B";
@@ -401,16 +355,19 @@ var init_main = __esm({
401
355
  }
402
356
  const preString = rows.join("\n");
403
357
  let inSurrogate = false;
404
- for (let i = 0; i < preString.length; i++) {
405
- const character = preString[i];
358
+ for (let i2 = 0; i2 < preString.length; i2++) {
359
+ const character = preString[i2];
406
360
  returnValue += character;
407
361
  if (!inSurrogate) {
408
362
  inSurrogate = character >= "\uD800" && character <= "\uDBFF";
363
+ if (inSurrogate) {
364
+ continue;
365
+ }
409
366
  } else {
410
- continue;
367
+ inSurrogate = false;
411
368
  }
412
369
  if (character === ESC || character === CSI) {
413
- GROUP_REGEX.lastIndex = i + 1;
370
+ GROUP_REGEX.lastIndex = i2 + 1;
414
371
  const groupsResult = GROUP_REGEX.exec(preString);
415
372
  const groups = groupsResult?.groups;
416
373
  if (groups?.code !== void 0) {
@@ -420,7 +377,7 @@ var init_main = __esm({
420
377
  escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
421
378
  }
422
379
  }
423
- if (preString[i + 1] === "\n") {
380
+ if (preString[i2 + 1] === "\n") {
424
381
  if (escapeUrl) {
425
382
  returnValue += wrapAnsiHyperlink("");
426
383
  }
@@ -451,7 +408,7 @@ var require_src = __commonJS({
451
408
  var ESC2 = "\x1B";
452
409
  var CSI2 = `${ESC2}[`;
453
410
  var beep = "\x07";
454
- var cursor = {
411
+ var cursor3 = {
455
412
  to(x, y2) {
456
413
  if (!y2) return `${CSI2}${x + 1}G`;
457
414
  return `${CSI2}${y2 + 1};${x + 1}H`;
@@ -480,7 +437,7 @@ var require_src = __commonJS({
480
437
  up: (count = 1) => `${CSI2}S`.repeat(count),
481
438
  down: (count = 1) => `${CSI2}T`.repeat(count)
482
439
  };
483
- var erase = {
440
+ var erase3 = {
484
441
  screen: `${CSI2}2J`,
485
442
  up: (count = 1) => `${CSI2}1J`.repeat(count),
486
443
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -489,89 +446,169 @@ var require_src = __commonJS({
489
446
  lineStart: `${CSI2}1K`,
490
447
  lines(count) {
491
448
  let clear = "";
492
- for (let i = 0; i < count; i++)
493
- clear += this.line + (i < count - 1 ? cursor.up() : "");
449
+ for (let i2 = 0; i2 < count; i2++)
450
+ clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
494
451
  if (count)
495
- clear += cursor.left;
452
+ clear += cursor3.left;
496
453
  return clear;
497
454
  }
498
455
  };
499
- module.exports = { cursor, scroll, erase, beep };
456
+ module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
500
457
  }
501
458
  });
502
459
 
503
- // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
504
- import { styleText as y } from "node:util";
505
- import { stdout as S, stdin as $ } from "node:process";
506
- import * as _ from "node:readline";
507
- import P from "node:readline";
508
- import { ReadStream as D } from "node:tty";
509
- function d(r, t2, e) {
510
- if (!e.some((o) => !o.disabled)) return r;
511
- const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
512
- return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
460
+ // node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs
461
+ import { styleText } from "node:util";
462
+ import { stdout, stdin } from "node:process";
463
+ import * as l from "node:readline";
464
+ import l__default from "node:readline";
465
+ import { ReadStream } from "node:tty";
466
+ function findCursor(s, o, l2) {
467
+ if (!l2.some((r2) => !r2.disabled))
468
+ return s;
469
+ const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
470
+ return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
471
+ }
472
+ function isAccessible(n3) {
473
+ if (n3 !== void 0) return n3;
474
+ if (settings.accessible !== void 0) return settings.accessible;
475
+ const e = process.env.ACCESSIBLE;
476
+ return e !== void 0 && e !== "" && e !== "0" && e !== "false";
513
477
  }
514
- function V(r, t2) {
515
- if (typeof r == "string") return u.aliases.get(r) === t2;
516
- for (const e of r) if (e !== void 0 && V(e, t2)) return true;
478
+ function isActionKey(n3, e) {
479
+ if (typeof n3 == "string")
480
+ return settings.aliases.get(n3) === e;
481
+ for (const s of n3)
482
+ if (s !== void 0 && isActionKey(s, e))
483
+ return true;
517
484
  return false;
518
485
  }
519
- function j(r, t2) {
520
- if (r === t2) return;
521
- const e = r.split(`
522
- `), s = t2.split(`
523
- `), i = Math.max(e.length, s.length), n = [];
524
- for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
525
- return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
486
+ function diffLines(i2, s) {
487
+ if (i2 === s) return;
488
+ const e = i2.split(`
489
+ `), t2 = s.split(`
490
+ `), r2 = Math.max(e.length, t2.length), f = [];
491
+ for (let n3 = 0; n3 < r2; n3++)
492
+ e[n3] !== t2[n3] && f.push(n3);
493
+ return {
494
+ lines: f,
495
+ numLinesBefore: e.length,
496
+ numLinesAfter: t2.length,
497
+ numLines: r2
498
+ };
526
499
  }
527
- function q(r) {
528
- return r === C;
500
+ function isCancel(e) {
501
+ return e === CANCEL_SYMBOL;
529
502
  }
530
- function w(r, t2) {
531
- const e = r;
532
- e.isTTY && e.setRawMode(t2);
503
+ function setRawMode(e, r2) {
504
+ const o = e;
505
+ o.isTTY && o.setRawMode(r2);
533
506
  }
534
- function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
535
- const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
536
- _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
537
- const n = (o, { name: a, sequence: h }) => {
538
- const l = String(o);
539
- if (V([l, a, h], "cancel")) {
540
- s && t2.write(import_sisteransi.cursor.show), process.exit(0);
507
+ function block({
508
+ input: e = stdin,
509
+ output: r2 = stdout,
510
+ overwrite: o = true,
511
+ hideCursor: n3 = true
512
+ } = {}) {
513
+ const s = l.createInterface({
514
+ input: e,
515
+ output: r2,
516
+ prompt: "",
517
+ tabSize: 1
518
+ });
519
+ l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
520
+ const t2 = (f, { name: a2, sequence: w }) => {
521
+ const c2 = String(f);
522
+ if (isActionKey([c2, a2, w], "cancel")) {
523
+ n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
541
524
  return;
542
525
  }
543
- if (!e) return;
544
- const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
545
- _.moveCursor(t2, f, v, () => {
546
- _.clearLine(t2, 1, () => {
547
- r.once("keypress", n);
526
+ if (!o) return;
527
+ const i2 = a2 === "return" ? 0 : -1, m = a2 === "return" ? -1 : 0;
528
+ l.moveCursor(r2, i2, m, () => {
529
+ l.clearLine(r2, 1, () => {
530
+ e.once("keypress", t2);
548
531
  });
549
532
  });
550
533
  };
551
- return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
552
- r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
534
+ return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
535
+ e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
553
536
  };
554
537
  }
555
- function R(r, t2, e, s = e) {
556
- const i = O(r ?? S);
557
- return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
558
- `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
538
+ function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
539
+ const f = getColumns(e ?? stdout);
540
+ return wrapAnsi(r2, f - o.length, {
541
+ hard: true,
542
+ trim: false
543
+ }).split(`
544
+ `).map((c2, i2, m) => {
545
+ const d = t2 ? t2(c2, i2) : c2;
546
+ return i2 === 0 ? `${n3}${d}` : i2 === m.length - 1 ? `${s}${d}` : `${o}${d}`;
547
+ }).join(`
559
548
  `);
560
549
  }
561
- var import_sisteransi, E, G, u, Y, C, O, A, p, nt;
550
+ function runValidation(e, a2) {
551
+ if ("~standard" in e) {
552
+ const n3 = e["~standard"].validate(a2);
553
+ return n3 instanceof Promise ? n3.then((r2) => r2.issues?.at(0)?.message) : n3.issues?.at(0)?.message;
554
+ }
555
+ return e(a2);
556
+ }
557
+ var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, n$1;
562
558
  var init_dist3 = __esm({
563
- "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
559
+ "node_modules/.bun/@clack+core@1.5.0/node_modules/@clack/core/dist/index.mjs"() {
564
560
  init_utils2();
565
561
  init_main();
566
562
  import_sisteransi = __toESM(require_src(), 1);
567
- E = ["up", "down", "left", "right", "space", "enter", "cancel"];
568
- G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
569
- u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
570
- Y = globalThis.process.platform.startsWith("win");
571
- C = /* @__PURE__ */ Symbol("clack:cancel");
572
- O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
573
- A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
574
- p = class {
563
+ a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
564
+ t = [
565
+ "January",
566
+ "February",
567
+ "March",
568
+ "April",
569
+ "May",
570
+ "June",
571
+ "July",
572
+ "August",
573
+ "September",
574
+ "October",
575
+ "November",
576
+ "December"
577
+ ];
578
+ settings = {
579
+ actions: new Set(a$1),
580
+ aliases: /* @__PURE__ */ new Map([
581
+ // vim support
582
+ ["k", "up"],
583
+ ["j", "down"],
584
+ ["h", "left"],
585
+ ["l", "right"],
586
+ ["", "cancel"],
587
+ // opinionated defaults!
588
+ ["escape", "cancel"]
589
+ ]),
590
+ messages: {
591
+ cancel: "Canceled",
592
+ error: "Something went wrong"
593
+ },
594
+ withGuide: true,
595
+ accessible: void 0,
596
+ date: {
597
+ monthNames: [...t],
598
+ messages: {
599
+ required: "Please enter a valid date",
600
+ invalidMonth: "There are only 12 months in a year",
601
+ invalidDay: (n3, e) => `There are only ${n3} days in ${e}`,
602
+ afterMin: (n3) => `Date must be on or after ${n3.toISOString().slice(0, 10)}`,
603
+ beforeMax: (n3) => `Date must be on or before ${n3.toISOString().slice(0, 10)}`
604
+ }
605
+ }
606
+ };
607
+ R = globalThis.process.platform.startsWith("win");
608
+ CANCEL_SYMBOL = /* @__PURE__ */ Symbol("clack:cancel");
609
+ getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
610
+ getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
611
+ y = class {
575
612
  input;
576
613
  output;
577
614
  _abortSignal;
@@ -586,46 +623,92 @@ var init_dist3 = __esm({
586
623
  error = "";
587
624
  value;
588
625
  userInput = "";
626
+ /**
627
+ * Whether accessible (static, screen-reader friendly) output is enabled for
628
+ * this prompt, resolved from the `accessible` option, the global setting,
629
+ * and the `ACCESSIBLE` env var.
630
+ */
631
+ get accessible() {
632
+ return isAccessible(this.opts.accessible);
633
+ }
589
634
  constructor(t2, e = true) {
590
- const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
591
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
635
+ const { input: i2 = stdin, output: s = stdout, render: r2, signal: n3, ...o } = t2;
636
+ this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n3, this.input = i2, this.output = s;
592
637
  }
638
+ /**
639
+ * Unsubscribe all listeners
640
+ */
593
641
  unsubscribe() {
594
642
  this._subscribers.clear();
595
643
  }
644
+ /**
645
+ * Set a subscriber with opts
646
+ * @param event - The event name
647
+ */
596
648
  setSubscriber(t2, e) {
597
- const s = this._subscribers.get(t2) ?? [];
598
- s.push(e), this._subscribers.set(t2, s);
649
+ const i2 = this._subscribers.get(t2) ?? [];
650
+ i2.push(e), this._subscribers.set(t2, i2);
599
651
  }
652
+ /**
653
+ * Subscribe to an event
654
+ * @param event - The event name
655
+ * @param cb - The callback
656
+ */
600
657
  on(t2, e) {
601
658
  this.setSubscriber(t2, { cb: e });
602
659
  }
660
+ /**
661
+ * Subscribe to an event once
662
+ * @param event - The event name
663
+ * @param cb - The callback
664
+ */
603
665
  once(t2, e) {
604
666
  this.setSubscriber(t2, { cb: e, once: true });
605
667
  }
668
+ /**
669
+ * Emit an event with data
670
+ * @param event - The event name
671
+ * @param data - The data to pass to the callback
672
+ */
606
673
  emit(t2, ...e) {
607
- const s = this._subscribers.get(t2) ?? [], i = [];
608
- for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
609
- for (const n of i) n();
674
+ const i2 = this._subscribers.get(t2) ?? [], s = [];
675
+ for (const r2 of i2)
676
+ r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
677
+ for (const r2 of s)
678
+ r2();
610
679
  }
611
680
  prompt() {
612
681
  return new Promise((t2) => {
613
682
  if (this._abortSignal) {
614
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
615
- this._abortSignal.addEventListener("abort", () => {
616
- this.state = "cancel", this.close();
617
- }, { once: true });
683
+ if (this._abortSignal.aborted)
684
+ return this.state = "cancel", this.close(), t2(CANCEL_SYMBOL);
685
+ this._abortSignal.addEventListener(
686
+ "abort",
687
+ () => {
688
+ this.state = "cancel", this.close();
689
+ },
690
+ { once: true }
691
+ );
618
692
  }
619
- this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
620
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
693
+ this.rl = l__default.createInterface({
694
+ input: this.input,
695
+ tabSize: 2,
696
+ prompt: "",
697
+ escapeCodeTimeout: 50,
698
+ terminal: true
699
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
700
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
621
701
  }), this.once("cancel", () => {
622
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
702
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
623
703
  });
624
704
  });
625
705
  }
626
706
  _isActionKey(t2, e) {
627
707
  return t2 === " ";
628
708
  }
709
+ _shouldSubmit(t2, e) {
710
+ return true;
711
+ }
629
712
  _setValue(t2) {
630
713
  this.value = t2, this.emit("value", this.value);
631
714
  }
@@ -635,19 +718,22 @@ var init_dist3 = __esm({
635
718
  _clearUserInput() {
636
719
  this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
637
720
  }
638
- onKeypress(t2, e) {
639
- if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
640
- if (this.opts.validate) {
641
- const s = this.opts.validate(this.value);
642
- s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
721
+ async onKeypress(t2, e) {
722
+ if (this.state !== "validating") {
723
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
724
+ if (this.opts.validate) {
725
+ const i2 = runValidation(this.opts.validate, this.value);
726
+ let s;
727
+ i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
728
+ }
729
+ this.state !== "error" && (this.state = "submit");
643
730
  }
644
- this.state !== "error" && (this.state = "submit");
731
+ isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
645
732
  }
646
- V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
647
733
  }
648
734
  close() {
649
735
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
650
- `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
736
+ `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
651
737
  }
652
738
  restoreCursor() {
653
739
  const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
@@ -655,34 +741,39 @@ var init_dist3 = __esm({
655
741
  this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
656
742
  }
657
743
  render() {
658
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
744
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
745
+ hard: true,
746
+ trim: false
747
+ });
659
748
  if (t2 !== this._prevFrame) {
660
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
749
+ if (this.state === "initial")
750
+ this.output.write(import_sisteransi.cursor.hide);
661
751
  else {
662
- const e = j(this._prevFrame, t2), s = A(this.output);
752
+ const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
663
753
  if (this.restoreCursor(), e) {
664
- const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
665
- let o = e.lines.find((a) => a >= i);
666
- if (o === void 0) {
754
+ const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
755
+ let n3 = e.lines.find((o) => o >= s);
756
+ if (n3 === void 0) {
667
757
  this._prevFrame = t2;
668
758
  return;
669
759
  }
670
760
  if (e.lines.length === 1) {
671
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
672
- const a = t2.split(`
761
+ this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
762
+ const o = t2.split(`
673
763
  `);
674
- this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
764
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
675
765
  return;
676
766
  } else if (e.lines.length > 1) {
677
- if (i < n) o = i;
767
+ if (s < r2)
768
+ n3 = s;
678
769
  else {
679
- const h = o - n;
680
- h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
770
+ const h2 = n3 - r2;
771
+ h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
681
772
  }
682
773
  this.output.write(import_sisteransi.erase.down());
683
- const a = t2.split(`
684
- `).slice(o);
685
- this.output.write(a.join(`
774
+ const f = t2.split(`
775
+ `).slice(n3);
776
+ this.output.write(f.join(`
686
777
  `)), this._prevFrame = t2;
687
778
  return;
688
779
  }
@@ -693,27 +784,28 @@ var init_dist3 = __esm({
693
784
  }
694
785
  }
695
786
  };
696
- nt = class extends p {
787
+ n$1 = class n extends y {
697
788
  options;
698
789
  cursor = 0;
699
790
  get _selectedValue() {
700
791
  return this.options[this.cursor];
701
792
  }
702
793
  changeValue() {
703
- this.value = this._selectedValue.value;
704
- }
705
- constructor(t2) {
706
- super(t2, false), this.options = t2.options;
707
- const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
708
- this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
709
- switch (i) {
794
+ const e = this._selectedValue;
795
+ this.value = e === void 0 ? void 0 : e.value;
796
+ }
797
+ constructor(e) {
798
+ super(e, false), this.options = e.options;
799
+ const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
800
+ this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
801
+ switch (s) {
710
802
  case "left":
711
803
  case "up":
712
- this.cursor = d(this.cursor, -1, this.options);
804
+ this.cursor = findCursor(this.cursor, -1, this.options);
713
805
  break;
714
806
  case "down":
715
807
  case "right":
716
- this.cursor = d(this.cursor, 1, this.options);
808
+ this.cursor = findCursor(this.cursor, 1, this.options);
717
809
  break;
718
810
  }
719
811
  this.changeValue();
@@ -723,260 +815,404 @@ var init_dist3 = __esm({
723
815
  }
724
816
  });
725
817
 
726
- // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
727
- import { styleText as t, stripVTControlCharacters as ne } from "node:util";
728
- import P2 from "node:process";
729
- import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
730
- import { dirname as be, join as Qe } from "node:path";
731
- function Ze() {
732
- 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";
818
+ // node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs
819
+ import { styleText as styleText2, stripVTControlCharacters } from "node:util";
820
+ import process$1 from "node:process";
821
+ import { existsSync, lstatSync, readdirSync } from "node:fs";
822
+ import { dirname, join } from "node:path";
823
+ function isUnicodeSupported() {
824
+ if (process$1.platform !== "win32") {
825
+ return process$1.env.TERM !== "linux";
826
+ }
827
+ 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";
733
828
  }
734
- var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, O2, pt, ft, vt, wt, Ct, fe, Ve, re, _t, je;
829
+ function formatInstructionFooter(o, e) {
830
+ const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
831
+ return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
832
+ }
833
+ var import_sisteransi2, unicode, isCI, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, MULTISELECT_INSTRUCTIONS, log, cancel, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, c, select, i;
735
834
  var init_dist4 = __esm({
736
- "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
835
+ "node_modules/.bun/@clack+prompts@1.8.0/node_modules/@clack/prompts/dist/index.mjs"() {
737
836
  init_utils2();
738
837
  init_dist3();
739
838
  init_dist3();
740
839
  init_main();
741
840
  init_dist2();
742
841
  import_sisteransi2 = __toESM(require_src(), 1);
743
- ee = Ze();
744
- ae = () => process.env.CI === "true";
745
- w2 = (e, i) => ee ? e : i;
746
- _e = w2("\u25C6", "*");
747
- oe = w2("\u25A0", "x");
748
- ue = w2("\u25B2", "x");
749
- F = w2("\u25C7", "o");
750
- le = w2("\u250C", "T");
751
- d2 = w2("\u2502", "|");
752
- E2 = w2("\u2514", "\u2014");
753
- Ie = w2("\u2510", "T");
754
- Ee = w2("\u2518", "\u2014");
755
- z2 = w2("\u25CF", ">");
756
- H2 = w2("\u25CB", " ");
757
- te = w2("\u25FB", "[\u2022]");
758
- U = w2("\u25FC", "[+]");
759
- J = w2("\u25FB", "[ ]");
760
- xe = w2("\u25AA", "\u2022");
761
- se = w2("\u2500", "-");
762
- ce = w2("\u256E", "+");
763
- Ge = w2("\u251C", "+");
764
- $e = w2("\u256F", "+");
765
- de = w2("\u2570", "+");
766
- Oe = w2("\u256D", "+");
767
- he = w2("\u25CF", "\u2022");
768
- pe = w2("\u25C6", "*");
769
- me = w2("\u25B2", "!");
770
- ge = w2("\u25A0", "x");
771
- V2 = (e) => {
772
- switch (e) {
842
+ unicode = isUnicodeSupported();
843
+ isCI = () => process.env.CI === "true";
844
+ unicodeOr = (o, e) => unicode ? o : e;
845
+ S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
846
+ S_STEP_CANCEL = unicodeOr("\u25A0", "x");
847
+ S_STEP_ERROR = unicodeOr("\u25B2", "x");
848
+ S_STEP_SUBMIT = unicodeOr("\u25C7", "o");
849
+ S_BAR_START = unicodeOr("\u250C", "T");
850
+ S_BAR = unicodeOr("\u2502", "|");
851
+ S_BAR_END = unicodeOr("\u2514", "\u2014");
852
+ S_BAR_START_RIGHT = unicodeOr("\u2510", "T");
853
+ S_BAR_END_RIGHT = unicodeOr("\u2518", "\u2014");
854
+ S_RADIO_ACTIVE = unicodeOr("\u25CF", ">");
855
+ S_RADIO_INACTIVE = unicodeOr("\u25CB", " ");
856
+ S_CHECKBOX_ACTIVE = unicodeOr("\u25FB", "[\u2022]");
857
+ S_CHECKBOX_SELECTED = unicodeOr("\u25FC", "[+]");
858
+ S_CHECKBOX_INACTIVE = unicodeOr("\u25FB", "[ ]");
859
+ S_PASSWORD_MASK = unicodeOr("\u25AA", "\u2022");
860
+ S_BAR_H = unicodeOr("\u2500", "-");
861
+ S_CORNER_TOP_RIGHT = unicodeOr("\u256E", "+");
862
+ S_CONNECT_LEFT = unicodeOr("\u251C", "+");
863
+ S_CORNER_BOTTOM_RIGHT = unicodeOr("\u256F", "+");
864
+ S_CORNER_BOTTOM_LEFT = unicodeOr("\u2570", "+");
865
+ S_CORNER_TOP_LEFT = unicodeOr("\u256D", "+");
866
+ S_INFO = unicodeOr("\u25CF", "\u2022");
867
+ S_SUCCESS = unicodeOr("\u25C6", "*");
868
+ S_WARN = unicodeOr("\u25B2", "!");
869
+ S_ERROR = unicodeOr("\u25A0", "x");
870
+ symbol = (o) => {
871
+ switch (o) {
773
872
  case "initial":
774
873
  case "active":
775
- return t("cyan", _e);
874
+ return styleText2("cyan", S_STEP_ACTIVE);
776
875
  case "cancel":
777
- return t("red", oe);
876
+ return styleText2("red", S_STEP_CANCEL);
778
877
  case "error":
779
- return t("yellow", ue);
878
+ return styleText2("yellow", S_STEP_ERROR);
780
879
  case "submit":
781
- return t("green", F);
880
+ return styleText2("green", S_STEP_SUBMIT);
881
+ case "validating":
882
+ return styleText2("dim", S_STEP_ACTIVE);
782
883
  }
783
884
  };
784
- ye = (e) => {
785
- switch (e) {
885
+ symbolBar = (o) => {
886
+ switch (o) {
786
887
  case "initial":
787
888
  case "active":
788
- return t("cyan", d2);
889
+ return styleText2("cyan", S_BAR);
789
890
  case "cancel":
790
- return t("red", d2);
891
+ return styleText2("red", S_BAR);
791
892
  case "error":
792
- return t("yellow", d2);
893
+ return styleText2("yellow", S_BAR);
793
894
  case "submit":
794
- return t("green", d2);
795
- }
796
- };
797
- et2 = (e, i, s, r, u2) => {
798
- let n = i, o = 0;
799
- for (let c2 = s; c2 < r; c2++) {
800
- const a = e[c2];
801
- if (n = n - a.length, o++, n <= u2) break;
802
- }
803
- return { lineCount: n, removals: o };
804
- };
805
- Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
806
- 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);
807
- let p2 = 0;
808
- e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
809
- let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
810
- const S2 = Math.min(p2 + y2, i.length), h = [];
895
+ return styleText2("green", S_BAR);
896
+ }
897
+ };
898
+ I = (l2, e, w, p, b, C2 = false) => {
899
+ let r2 = e, O = 0;
900
+ if (C2)
901
+ for (let i2 = p - 1; i2 >= w; i2--) {
902
+ const m = l2[i2];
903
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
904
+ }
905
+ else
906
+ for (let i2 = w; i2 < p; i2++) {
907
+ const m = l2[i2];
908
+ if (m && (r2 -= m.length), O++, r2 <= b) break;
909
+ }
910
+ return { lineCount: r2, removals: O };
911
+ };
912
+ limitOptions = ({
913
+ cursor: l2,
914
+ options: e,
915
+ style: w,
916
+ output: p = process.stdout,
917
+ maxItems: b = Number.POSITIVE_INFINITY,
918
+ columnPadding: C2 = 0,
919
+ rowPadding: r2 = 4
920
+ }) => {
921
+ const i2 = getColumns(p) - C2, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
811
922
  let f = 0;
812
- m && f++, g && f++;
813
- const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
814
- for (let b = v; b < T; b++) {
815
- const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
923
+ l2 >= a2 - 3 && (f = Math.max(
924
+ Math.min(l2 - a2 + 3, e.length - a2),
925
+ 0
926
+ ));
927
+ let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
928
+ const W2 = Math.min(
929
+ f + a2,
930
+ e.length
931
+ ), s = [];
932
+ let g = 0;
933
+ d && g++, c2 && g++;
934
+ const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
935
+ for (let t2 = T; t2 < y2; t2++) {
936
+ const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
937
+ hard: true,
938
+ trim: false
939
+ }).split(`
816
940
  `);
817
- h.push(x), f += x.length;
818
- }
819
- if (f > $2) {
820
- let b = 0, x = 0, G2 = f;
821
- const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
822
- 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));
823
- }
824
- const C2 = [];
825
- m && C2.push(l);
826
- for (const b of h) for (const x of b) C2.push(x);
827
- return g && C2.push(l), C2;
828
- };
829
- O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
830
- const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
831
- for (let p2 = 0; p2 < u2; p2++) o.push(a);
832
- const y2 = Array.isArray(e) ? e : e.split(`
941
+ s.push(h2), g += h2.length;
942
+ }
943
+ if (g > v) {
944
+ let t2 = 0, n3 = 0, o = g;
945
+ const h2 = l2 - T;
946
+ let u3 = v;
947
+ const L = () => I(s, o, 0, h2, u3), E = () => I(
948
+ s,
949
+ o,
950
+ h2 + 1,
951
+ s.length,
952
+ u3,
953
+ true
954
+ );
955
+ 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));
956
+ }
957
+ const x = [];
958
+ d && x.push(M);
959
+ for (const t2 of s)
960
+ for (const n3 of t2)
961
+ x.push(n3);
962
+ return c2 && x.push(M), x;
963
+ };
964
+ MULTISELECT_INSTRUCTIONS = [
965
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
966
+ `${styleText2("dim", "Space:")} select`,
967
+ `${styleText2("dim", "Enter:")} confirm`
968
+ ];
969
+ log = {
970
+ message: (s = [], {
971
+ symbol: e = styleText2("gray", S_BAR),
972
+ secondarySymbol: r2 = styleText2("gray", S_BAR),
973
+ output: m = process.stdout,
974
+ spacing: l2 = 1,
975
+ withGuide: c2
976
+ } = {}) => {
977
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
978
+ for (let i2 = 0; i2 < l2; i2++)
979
+ t2.push(f);
980
+ const g = Array.isArray(s) ? s : s.split(`
833
981
  `);
834
- if (y2.length > 0) {
835
- const [p2, ...m] = y2;
836
- p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
837
- for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
838
- }
839
- r.write(`${o.join(`
982
+ if (g.length > 0) {
983
+ const [i2, ...y2] = g;
984
+ i2.length > 0 ? t2.push(`${O}${i2}`) : t2.push(o ? e : "");
985
+ for (const p of y2)
986
+ p.length > 0 ? t2.push(`${u3}${p}`) : t2.push(o ? r2 : "");
987
+ }
988
+ m.write(`${t2.join(`
840
989
  `)}
841
990
  `);
842
- }, info: (e, i) => {
843
- O2.message(e, { ...i, symbol: t("blue", he) });
844
- }, success: (e, i) => {
845
- O2.message(e, { ...i, symbol: t("green", pe) });
846
- }, step: (e, i) => {
847
- O2.message(e, { ...i, symbol: t("green", F) });
848
- }, warn: (e, i) => {
849
- O2.message(e, { ...i, symbol: t("yellow", me) });
850
- }, warning: (e, i) => {
851
- O2.warn(e, i);
852
- }, error: (e, i) => {
853
- O2.message(e, { ...i, symbol: t("red", ge) });
854
- } };
855
- pt = (e = "", i) => {
856
- const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
857
- s.write(`${r}${t("red", e)}
991
+ },
992
+ info: (s, e) => {
993
+ log.message(s, { ...e, symbol: styleText2("blue", S_INFO) });
994
+ },
995
+ success: (s, e) => {
996
+ log.message(s, { ...e, symbol: styleText2("green", S_SUCCESS) });
997
+ },
998
+ step: (s, e) => {
999
+ log.message(s, { ...e, symbol: styleText2("green", S_STEP_SUBMIT) });
1000
+ },
1001
+ warn: (s, e) => {
1002
+ log.message(s, { ...e, symbol: styleText2("yellow", S_WARN) });
1003
+ },
1004
+ /** alias for `log.warn()`. */
1005
+ warning: (s, e) => {
1006
+ log.warn(s, e);
1007
+ },
1008
+ error: (s, e) => {
1009
+ log.message(s, { ...e, symbol: styleText2("red", S_ERROR) });
1010
+ }
1011
+ };
1012
+ cancel = (o = "", t2) => {
1013
+ const i2 = t2?.output ?? process.stdout, e = t2?.withGuide ?? settings.withGuide ? `${styleText2("gray", S_BAR_END)} ` : "";
1014
+ i2.write(`${e}${styleText2("red", o)}
858
1015
 
859
1016
  `);
860
1017
  };
861
- ft = (e) => t("dim", e);
862
- vt = (e, i, s) => {
863
- const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
864
- `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
865
- return wrapAnsi(e, c2, r);
866
- };
867
- wt = (e = "", i = "", s) => {
868
- const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
869
- `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
870
- const g = dist_default2(m);
871
- return g > p2 ? g : p2;
872
- }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
873
- `), $2 = u2 ? `${t("gray", d2)}
874
- ` : "", y2 = u2 ? Ge : de;
875
- r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
876
- ${l}
877
- ${t("gray", y2 + se.repeat(a + 2) + $e)}
878
- `);
1018
+ W$1 = (o) => o;
1019
+ C = (o, e, s) => {
1020
+ const a2 = {
1021
+ hard: true,
1022
+ trim: false
1023
+ }, i2 = wrapAnsi(o, e, a2).split(`
1024
+ `), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
1025
+ return wrapAnsi(o, g, a2);
1026
+ };
1027
+ note = (o = "", e = "", s) => {
1028
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
1029
+ `).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
1030
+ g.reduce((m, F) => {
1031
+ const O = dist_default2(F);
1032
+ return O > m ? O : m;
1033
+ }, 0),
1034
+ n3
1035
+ ) + 2, h2 = g.map(
1036
+ (m) => `${styleText2("gray", S_BAR)} ${m}${" ".repeat(t2 - dist_default2(m))}${styleText2("gray", S_BAR)}`
1037
+ ).join(`
1038
+ `), T = i2 ? `${styleText2("gray", S_BAR)}
1039
+ ` : "", l$1 = i2 ? S_CONNECT_LEFT : S_CORNER_BOTTOM_LEFT;
1040
+ a2.write(
1041
+ `${T}${styleText2("green", S_STEP_SUBMIT)} ${styleText2("reset", e)} ${styleText2(
1042
+ "gray",
1043
+ S_BAR_H.repeat(Math.max(t2 - n3 - 1, 1)) + S_CORNER_TOP_RIGHT
1044
+ )}
1045
+ ${h2}
1046
+ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
1047
+ `
1048
+ );
879
1049
  };
880
- Ct = (e) => t("magenta", e);
881
- fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
882
- const l = ae();
883
- let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
884
- const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
885
- const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
886
- m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
887
- }, C2 = () => T(2), b = () => T(1), x = () => {
888
- process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
889
- }, G2 = () => {
890
- process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
891
- }, M2 = () => {
892
- if (S2 === void 0) return;
893
- l && s.write(`
1050
+ W = (l2) => styleText2("magenta", l2);
1051
+ spinner = ({
1052
+ indicator: l2 = "dots",
1053
+ onCancel: h2,
1054
+ output: n3 = process.stdout,
1055
+ cancelMessage: G,
1056
+ errorMessage: O,
1057
+ frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
1058
+ delay: F = unicode ? 80 : 120,
1059
+ signal: m,
1060
+ ...I2
1061
+ } = {}) => {
1062
+ const u3 = isCI();
1063
+ let M, T, d = false, S = false, s = "", p, w = performance.now();
1064
+ const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
1065
+ const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
1066
+ S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
1067
+ }, f = () => g(2), i2 = () => g(1), A = () => {
1068
+ process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m && m.addEventListener("abort", i2);
1069
+ }, H = () => {
1070
+ process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m && m.removeEventListener("abort", i2);
1071
+ }, y2 = () => {
1072
+ if (p === void 0) return;
1073
+ u3 && n3.write(`
894
1074
  `);
895
- const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
1075
+ const r2 = wrapAnsi(p, x, {
1076
+ hard: true,
1077
+ trim: false
1078
+ }).split(`
896
1079
  `);
897
- _2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
898
- }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
899
- const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
900
- return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
901
- }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
902
- p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
1080
+ r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
1081
+ }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
1082
+ const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
1083
+ return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
1084
+ }, N = I2.withGuide ?? settings.withGuide, P = (e = "") => {
1085
+ d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N && n3.write(`${styleText2("gray", S_BAR)}
903
1086
  `);
904
- let A2 = 0, k = 0;
905
- x(), y2 = setInterval(() => {
906
- if (l && g === S2) return;
907
- M2(), S2 = g;
908
- const L = v(n[A2]);
909
- let Z;
910
- if (l) Z = `${L} ${g}...`;
911
- else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
1087
+ let r2 = 0, t2 = 0;
1088
+ A(), T = setInterval(() => {
1089
+ if (u3 && s === p)
1090
+ return;
1091
+ y2(), p = s;
1092
+ const o = k(E[r2]);
1093
+ let v;
1094
+ if (u3)
1095
+ v = `${o} ${s}...`;
1096
+ else if (l2 === "timer")
1097
+ v = `${o} ${s} ${_(w)}`;
912
1098
  else {
913
- const Be = ".".repeat(Math.floor(k)).slice(0, 3);
914
- Z = `${L} ${g}${Be}`;
915
- }
916
- const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
917
- s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
918
- }, o);
919
- }, W = (_2 = "", A2 = 0, k = false) => {
920
- if (!p2) return;
921
- p2 = false, clearInterval(y2), M2();
922
- const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
923
- g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
924
- `) : s.write(`${L} ${g}
925
- `)), G2(), $2();
1099
+ const B = ".".repeat(Math.floor(t2)).slice(0, 3);
1100
+ v = `${o} ${s}${B}`;
1101
+ }
1102
+ const j = wrapAnsi(v, x, {
1103
+ hard: true,
1104
+ trim: false
1105
+ });
1106
+ n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
1107
+ }, F);
1108
+ }, a2 = (e = "", r2 = 0, t2 = false) => {
1109
+ if (!d) return;
1110
+ d = false, clearInterval(T), y2();
1111
+ const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
1112
+ s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
1113
+ `) : n3.write(`${o} ${s}
1114
+ `)), H(), M();
926
1115
  };
927
- return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
928
- g = R2(_2 ?? g);
929
- }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
930
- return m;
931
- } };
932
- };
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) {
1116
+ return {
1117
+ start: P,
1118
+ stop: (e = "") => a2(e, 0),
1119
+ message: (e = "") => {
1120
+ s = C2(e ?? s);
1121
+ },
1122
+ cancel: (e = "") => a2(e, 1),
1123
+ error: (e = "") => a2(e, 2),
1124
+ clear: () => a2("", 0, true),
1125
+ get isCancelled() {
1126
+ return S;
1127
+ }
1128
+ };
1129
+ };
1130
+ u2 = {
1131
+ light: unicodeOr("\u2500", "-"),
1132
+ heavy: unicodeOr("\u2501", "="),
1133
+ block: unicodeOr("\u2588", "#")
1134
+ };
1135
+ SELECT_INSTRUCTIONS = [
1136
+ `${styleText2("dim", "\u2191/\u2193")} to navigate`,
1137
+ `${styleText2("dim", "Enter:")} confirm`
1138
+ ];
1139
+ c = (t2, o) => t2.includes(`
1140
+ `) ? t2.split(`
1141
+ `).map((d) => o(d)).join(`
1142
+ `) : o(t2);
1143
+ select = (t2) => {
1144
+ const o = (n3, m) => {
1145
+ if (n3 === void 0)
1146
+ return "";
1147
+ const s = n3.label ?? String(n3.value);
1148
+ switch (m) {
942
1149
  case "disabled":
943
- return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1150
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
944
1151
  case "selected":
945
- return `${re(u2, (n) => t("dim", n))}`;
1152
+ return `${c(s, (i2) => styleText2("dim", i2))}`;
946
1153
  case "active":
947
- return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1154
+ return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
948
1155
  case "cancelled":
949
- return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1156
+ return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
950
1157
  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}
1158
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
1159
+ }
1160
+ }, d = t2.showInstructions ?? true;
1161
+ return new n$1({
1162
+ options: t2.options,
1163
+ signal: t2.signal,
1164
+ input: t2.input,
1165
+ output: t2.output,
1166
+ initialValue: t2.initialValue,
1167
+ render() {
1168
+ const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i2 = wrapTextWithPrefix(
1169
+ t2.output,
1170
+ t2.message,
1171
+ s,
1172
+ m
1173
+ ), u3 = `${n3 ? `${styleText2("gray", S_BAR)}
1174
+ ` : ""}${i2}
957
1175
  `;
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}
1176
+ switch (this.state) {
1177
+ case "submit": {
1178
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1179
+ t2.output,
1180
+ o(this.options[this.cursor], "selected"),
1181
+ r2
1182
+ );
1183
+ return `${u3}${a2}`;
1184
+ }
1185
+ case "cancel": {
1186
+ const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(
1187
+ t2.output,
1188
+ o(this.options[this.cursor], "cancelled"),
1189
+ r2
1190
+ );
1191
+ return `${u3}${a2}${n3 ? `
1192
+ ${styleText2("gray", S_BAR)}` : ""}`;
1193
+ }
1194
+ default: {
1195
+ const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
1196
+ `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
1197
+ `), f = p.length + 1;
1198
+ return `${u3}${r2}${limitOptions({
1199
+ output: t2.output,
1200
+ cursor: this.cursor,
1201
+ options: this.options,
1202
+ maxItems: t2.maxItems,
1203
+ columnPadding: r2.length,
1204
+ rowPadding: a2 + f,
1205
+ style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
1206
+ }).join(`
1207
+ ${r2}`)}
1208
+ ${b}
974
1209
  `;
1210
+ }
975
1211
  }
976
1212
  }
977
- } }).prompt();
1213
+ }).prompt();
978
1214
  };
979
- je = `${t("gray", d2)} `;
1215
+ i = `${styleText2("gray", S_BAR)} `;
980
1216
  }
981
1217
  });
982
1218
 
@@ -989,9 +1225,9 @@ function supportsColor() {
989
1225
  }
990
1226
  return process.stdout.isTTY === true;
991
1227
  }
992
- function colorize(text, color) {
993
- if (!supportsColor()) return text;
994
- return `${color}${text}${colors.reset}`;
1228
+ function colorize(text2, color) {
1229
+ if (!supportsColor()) return text2;
1230
+ return `${color}${text2}${colors.reset}`;
995
1231
  }
996
1232
  function stringify(value) {
997
1233
  if (typeof value === "string") return value;
@@ -1021,7 +1257,7 @@ function stringify(value) {
1021
1257
  function formatMessage(...args) {
1022
1258
  return args.map(stringify).join(" ");
1023
1259
  }
1024
- var colors, currentLogLevel, log, error, warn, info, success;
1260
+ var colors, currentLogLevel, log2, error, warn, info, success;
1025
1261
  var init_cli_output = __esm({
1026
1262
  "packages/tooling/src/utils/cli-output.ts"() {
1027
1263
  "use strict";
@@ -1054,7 +1290,7 @@ var init_cli_output = __esm({
1054
1290
  currentLogLevel = envLevel;
1055
1291
  }
1056
1292
  }
1057
- log = {
1293
+ log2 = {
1058
1294
  /**
1059
1295
  * Logs an error message (always shows unless Quiet level)
1060
1296
  * Uses clack's log.error + explicit red color
@@ -1062,7 +1298,7 @@ var init_cli_output = __esm({
1062
1298
  error(...args) {
1063
1299
  if (currentLogLevel < 0 /* Quiet */) return;
1064
1300
  const message = formatMessage(...args);
1065
- O2.error(colorize(message, colors.brightRed));
1301
+ log.error(colorize(message, colors.brightRed));
1066
1302
  },
1067
1303
  /**
1068
1304
  * Logs a warning message (shows at Normal level and above)
@@ -1071,7 +1307,7 @@ var init_cli_output = __esm({
1071
1307
  warn(...args) {
1072
1308
  if (currentLogLevel < 1 /* Normal */) return;
1073
1309
  const message = formatMessage(...args);
1074
- O2.warn(colorize(message, colors.brightYellow));
1310
+ log.warn(colorize(message, colors.brightYellow));
1075
1311
  },
1076
1312
  /**
1077
1313
  * Logs an info message (shows at Normal level and above)
@@ -1080,7 +1316,7 @@ var init_cli_output = __esm({
1080
1316
  info(...args) {
1081
1317
  if (currentLogLevel < 1 /* Normal */) return;
1082
1318
  const message = formatMessage(...args);
1083
- O2.info(colorize(message, colors.brightCyan));
1319
+ log.info(colorize(message, colors.brightCyan));
1084
1320
  },
1085
1321
  /**
1086
1322
  * Logs a success message (shows at Normal level and above)
@@ -1089,7 +1325,7 @@ var init_cli_output = __esm({
1089
1325
  success(...args) {
1090
1326
  if (currentLogLevel < 1 /* Normal */) return;
1091
1327
  const message = formatMessage(...args);
1092
- O2.success(colorize(message, colors.brightGreen));
1328
+ log.success(colorize(message, colors.brightGreen));
1093
1329
  },
1094
1330
  /**
1095
1331
  * Logs a debug message (only shows at Verbose level and above)
@@ -1098,7 +1334,7 @@ var init_cli_output = __esm({
1098
1334
  debug(...args) {
1099
1335
  if (currentLogLevel < 2 /* Verbose */) return;
1100
1336
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1101
- O2.message(
1337
+ log.message(
1102
1338
  colorize(
1103
1339
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
1104
1340
  colors.gray
@@ -1112,7 +1348,7 @@ var init_cli_output = __esm({
1112
1348
  trace(...args) {
1113
1349
  if (currentLogLevel < 3 /* Debug */) return;
1114
1350
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
1115
- O2.message(
1351
+ log.message(
1116
1352
  colorize(
1117
1353
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
1118
1354
  colors.gray
@@ -1120,10 +1356,10 @@ var init_cli_output = __esm({
1120
1356
  );
1121
1357
  }
1122
1358
  };
1123
- error = log.error.bind(log);
1124
- warn = log.warn.bind(log);
1125
- info = log.info.bind(log);
1126
- success = log.success.bind(log);
1359
+ error = log2.error.bind(log2);
1360
+ warn = log2.warn.bind(log2);
1361
+ info = log2.info.bind(log2);
1362
+ success = log2.success.bind(log2);
1127
1363
  }
1128
1364
  });
1129
1365
 
@@ -1483,9 +1719,9 @@ var require_is_glob = __commonJS({
1483
1719
  index += 2;
1484
1720
  var close = chars[open];
1485
1721
  if (close) {
1486
- var n = str.indexOf(close, index);
1487
- if (n !== -1) {
1488
- index = n + 1;
1722
+ var n3 = str.indexOf(close, index);
1723
+ if (n3 !== -1) {
1724
+ index = n3 + 1;
1489
1725
  }
1490
1726
  }
1491
1727
  if (str[index] === "!") {
@@ -1511,9 +1747,9 @@ var require_is_glob = __commonJS({
1511
1747
  index += 2;
1512
1748
  var close = chars[open];
1513
1749
  if (close) {
1514
- var n = str.indexOf(close, index);
1515
- if (n !== -1) {
1516
- index = n + 1;
1750
+ var n3 = str.indexOf(close, index);
1751
+ if (n3 !== -1) {
1752
+ index = n3 + 1;
1517
1753
  }
1518
1754
  }
1519
1755
  if (str[index] === "!") {
@@ -1591,8 +1827,8 @@ var require_utils = __commonJS({
1591
1827
  if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
1592
1828
  return (Number(max) - Number(min)) / Number(step) >= limit;
1593
1829
  };
1594
- exports.escapeNode = (block, n = 0, type) => {
1595
- const node = block.nodes[n];
1830
+ exports.escapeNode = (block2, n3 = 0, type) => {
1831
+ const node = block2.nodes[n3];
1596
1832
  if (!node) return;
1597
1833
  if (type && node.type === type || node.type === "open" || node.type === "close") {
1598
1834
  if (node.escaped !== true) {
@@ -1609,15 +1845,15 @@ var require_utils = __commonJS({
1609
1845
  }
1610
1846
  return false;
1611
1847
  };
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;
1848
+ exports.isInvalidBrace = (block2) => {
1849
+ if (block2.type !== "brace") return false;
1850
+ if (block2.invalid === true || block2.dollar) return true;
1851
+ if (block2.commas >> 0 + block2.ranges >> 0 === 0) {
1852
+ block2.invalid = true;
1617
1853
  return true;
1618
1854
  }
1619
- if (block.open !== true || block.close !== true) {
1620
- block.invalid = true;
1855
+ if (block2.open !== true || block2.close !== true) {
1856
+ block2.invalid = true;
1621
1857
  return true;
1622
1858
  }
1623
1859
  return false;
@@ -1636,8 +1872,8 @@ var require_utils = __commonJS({
1636
1872
  exports.flatten = (...args) => {
1637
1873
  const result = [];
1638
1874
  const flat = (arr) => {
1639
- for (let i = 0; i < arr.length; i++) {
1640
- const ele = arr[i];
1875
+ for (let i2 = 0; i2 < arr.length; i2++) {
1876
+ const ele = arr[i2];
1641
1877
  if (Array.isArray(ele)) {
1642
1878
  flat(ele);
1643
1879
  continue;
@@ -1731,9 +1967,9 @@ var require_to_regex_range = __commonJS({
1731
1967
  if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1732
1968
  return toRegexRange.cache[cacheKey].result;
1733
1969
  }
1734
- let a = Math.min(min, max);
1970
+ let a2 = Math.min(min, max);
1735
1971
  let b = Math.max(min, max);
1736
- if (Math.abs(a - b) === 1) {
1972
+ if (Math.abs(a2 - b) === 1) {
1737
1973
  let result = min + "|" + max;
1738
1974
  if (opts.capture) {
1739
1975
  return `(${result})`;
@@ -1744,20 +1980,20 @@ var require_to_regex_range = __commonJS({
1744
1980
  return `(?:${result})`;
1745
1981
  }
1746
1982
  let isPadded = hasPadding(min) || hasPadding(max);
1747
- let state = { min, max, a, b };
1983
+ let state = { min, max, a: a2, b };
1748
1984
  let positives = [];
1749
1985
  let negatives = [];
1750
1986
  if (isPadded) {
1751
1987
  state.isPadded = isPadded;
1752
1988
  state.maxLen = String(state.max).length;
1753
1989
  }
1754
- if (a < 0) {
1990
+ if (a2 < 0) {
1755
1991
  let newMin = b < 0 ? Math.abs(b) : 1;
1756
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1757
- a = state.a = 0;
1992
+ negatives = splitToPatterns(newMin, Math.abs(a2), state, opts);
1993
+ a2 = state.a = 0;
1758
1994
  }
1759
1995
  if (b >= 0) {
1760
- positives = splitToPatterns(a, b, state, opts);
1996
+ positives = splitToPatterns(a2, b, state, opts);
1761
1997
  }
1762
1998
  state.negatives = negatives;
1763
1999
  state.positives = positives;
@@ -1805,8 +2041,8 @@ var require_to_regex_range = __commonJS({
1805
2041
  let digits = zipped.length;
1806
2042
  let pattern = "";
1807
2043
  let count = 0;
1808
- for (let i = 0; i < digits; i++) {
1809
- let [startDigit, stopDigit] = zipped[i];
2044
+ for (let i2 = 0; i2 < digits; i2++) {
2045
+ let [startDigit, stopDigit] = zipped[i2];
1810
2046
  if (startDigit === stopDigit) {
1811
2047
  pattern += startDigit;
1812
2048
  } else if (startDigit !== "0" || stopDigit !== "9") {
@@ -1825,8 +2061,8 @@ var require_to_regex_range = __commonJS({
1825
2061
  let tokens = [];
1826
2062
  let start = min;
1827
2063
  let prev;
1828
- for (let i = 0; i < ranges.length; i++) {
1829
- let max2 = ranges[i];
2064
+ for (let i2 = 0; i2 < ranges.length; i2++) {
2065
+ let max2 = ranges[i2];
1830
2066
  let obj = rangeToPattern(String(start), String(max2), options);
1831
2067
  let zeros = "";
1832
2068
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
@@ -1861,13 +2097,13 @@ var require_to_regex_range = __commonJS({
1861
2097
  }
1862
2098
  return result;
1863
2099
  }
1864
- function zip(a, b) {
2100
+ function zip(a2, b) {
1865
2101
  let arr = [];
1866
- for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
2102
+ for (let i2 = 0; i2 < a2.length; i2++) arr.push([a2[i2], b[i2]]);
1867
2103
  return arr;
1868
2104
  }
1869
- function compare(a, b) {
1870
- return a > b ? 1 : b > a ? -1 : 0;
2105
+ function compare(a2, b) {
2106
+ return a2 > b ? 1 : b > a2 ? -1 : 0;
1871
2107
  }
1872
2108
  function contains(arr, key, val) {
1873
2109
  return arr.some((ele) => ele[key] === val);
@@ -1885,8 +2121,8 @@ var require_to_regex_range = __commonJS({
1885
2121
  }
1886
2122
  return "";
1887
2123
  }
1888
- function toCharacterClass(a, b, options) {
1889
- return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
2124
+ function toCharacterClass(a2, b, options) {
2125
+ return `[${a2}${b - a2 === 1 ? "" : "-"}${b}]`;
1890
2126
  }
1891
2127
  function hasPadding(str) {
1892
2128
  return /^-?(0+)\d/.test(str);
@@ -1965,8 +2201,8 @@ var require_fill_range = __commonJS({
1965
2201
  return negative ? "-" + input : input;
1966
2202
  };
1967
2203
  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);
2204
+ parts.negatives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
2205
+ parts.positives.sort((a2, b) => a2 < b ? -1 : a2 > b ? 1 : 0);
1970
2206
  let prefix = options.capture ? "" : "?:";
1971
2207
  let positives = "";
1972
2208
  let negatives = "";
@@ -1987,12 +2223,12 @@ var require_fill_range = __commonJS({
1987
2223
  }
1988
2224
  return result;
1989
2225
  };
1990
- var toRange = (a, b, isNumbers, options) => {
2226
+ var toRange = (a2, b, isNumbers, options) => {
1991
2227
  if (isNumbers) {
1992
- return toRegexRange(a, b, { wrap: false, ...options });
2228
+ return toRegexRange(a2, b, { wrap: false, ...options });
1993
2229
  }
1994
- let start = String.fromCharCode(a);
1995
- if (a === b) return start;
2230
+ let start = String.fromCharCode(a2);
2231
+ if (a2 === b) return start;
1996
2232
  let stop = String.fromCharCode(b);
1997
2233
  return `[${start}-${stop}]`;
1998
2234
  };
@@ -2018,15 +2254,15 @@ var require_fill_range = __commonJS({
2018
2254
  return [];
2019
2255
  };
2020
2256
  var fillNumbers = (start, end, step = 1, options = {}) => {
2021
- let a = Number(start);
2257
+ let a2 = Number(start);
2022
2258
  let b = Number(end);
2023
- if (!Number.isInteger(a) || !Number.isInteger(b)) {
2259
+ if (!Number.isInteger(a2) || !Number.isInteger(b)) {
2024
2260
  if (options.strictRanges === true) throw rangeError([start, end]);
2025
2261
  return [];
2026
2262
  }
2027
- if (a === 0) a = 0;
2263
+ if (a2 === 0) a2 = 0;
2028
2264
  if (b === 0) b = 0;
2029
- let descending = a > b;
2265
+ let descending = a2 > b;
2030
2266
  let startString = String(start);
2031
2267
  let endString = String(end);
2032
2268
  let stepString = String(step);
@@ -2042,13 +2278,13 @@ var require_fill_range = __commonJS({
2042
2278
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
2043
2279
  let range = [];
2044
2280
  let index = 0;
2045
- while (descending ? a >= b : a <= b) {
2281
+ while (descending ? a2 >= b : a2 <= b) {
2046
2282
  if (options.toRegex === true && step > 1) {
2047
- push(a);
2283
+ push(a2);
2048
2284
  } else {
2049
- range.push(pad(format(a, index), maxLen, toNumber));
2285
+ range.push(pad(format(a2, index), maxLen, toNumber));
2050
2286
  }
2051
- a = descending ? a - step : a + step;
2287
+ a2 = descending ? a2 - step : a2 + step;
2052
2288
  index++;
2053
2289
  }
2054
2290
  if (options.toRegex === true) {
@@ -2061,19 +2297,19 @@ var require_fill_range = __commonJS({
2061
2297
  return invalidRange(start, end, options);
2062
2298
  }
2063
2299
  let format = options.transform || ((val) => String.fromCharCode(val));
2064
- let a = `${start}`.charCodeAt(0);
2300
+ let a2 = `${start}`.charCodeAt(0);
2065
2301
  let b = `${end}`.charCodeAt(0);
2066
- let descending = a > b;
2067
- let min = Math.min(a, b);
2068
- let max = Math.max(a, b);
2302
+ let descending = a2 > b;
2303
+ let min = Math.min(a2, b);
2304
+ let max = Math.max(a2, b);
2069
2305
  if (options.toRegex && step === 1) {
2070
2306
  return toRange(min, max, false, options);
2071
2307
  }
2072
2308
  let range = [];
2073
2309
  let index = 0;
2074
- while (descending ? a >= b : a <= b) {
2075
- range.push(format(a, index));
2076
- a = descending ? a - step : a + step;
2310
+ while (descending ? a2 >= b : a2 <= b) {
2311
+ range.push(format(a2, index));
2312
+ a2 = descending ? a2 - step : a2 + step;
2077
2313
  index++;
2078
2314
  }
2079
2315
  if (options.toRegex === true) {
@@ -2196,18 +2432,18 @@ var require_expand = __commonJS({
2196
2432
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2197
2433
  const walk = (node, parent = {}) => {
2198
2434
  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;
2435
+ let p = parent;
2436
+ let q = parent.queue;
2437
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
2438
+ p = p.parent;
2439
+ q = p.queue;
2204
2440
  }
2205
2441
  if (node.invalid || node.dollar) {
2206
- q2.push(append(q2.pop(), stringify2(node, options)));
2442
+ q.push(append(q.pop(), stringify2(node, options)));
2207
2443
  return;
2208
2444
  }
2209
2445
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
2210
- q2.push(append(q2.pop(), ["{}"]));
2446
+ q.push(append(q.pop(), ["{}"]));
2211
2447
  return;
2212
2448
  }
2213
2449
  if (node.nodes && node.ranges > 0) {
@@ -2219,26 +2455,26 @@ var require_expand = __commonJS({
2219
2455
  if (range.length === 0) {
2220
2456
  range = stringify2(node, options);
2221
2457
  }
2222
- q2.push(append(q2.pop(), range));
2458
+ q.push(append(q.pop(), range));
2223
2459
  node.nodes = [];
2224
2460
  return;
2225
2461
  }
2226
2462
  const enclose = utils.encloseBrace(node);
2227
2463
  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;
2464
+ let block2 = node;
2465
+ while (block2.type !== "brace" && block2.type !== "root" && block2.parent) {
2466
+ block2 = block2.parent;
2467
+ queue = block2.queue;
2232
2468
  }
2233
- for (let i = 0; i < node.nodes.length; i++) {
2234
- const child = node.nodes[i];
2469
+ for (let i2 = 0; i2 < node.nodes.length; i2++) {
2470
+ const child = node.nodes[i2];
2235
2471
  if (child.type === "comma" && node.type === "brace") {
2236
- if (i === 1) queue.push("");
2472
+ if (i2 === 1) queue.push("");
2237
2473
  queue.push("");
2238
2474
  continue;
2239
2475
  }
2240
2476
  if (child.type === "close") {
2241
- q2.push(append(q2.pop(), queue, enclose));
2477
+ q.push(append(q.pop(), queue, enclose));
2242
2478
  continue;
2243
2479
  }
2244
2480
  if (child.value && child.type !== "open") {
@@ -2405,7 +2641,7 @@ var require_parse = __commonJS({
2405
2641
  }
2406
2642
  const ast = { type: "root", input, nodes: [] };
2407
2643
  const stack = [ast];
2408
- let block = ast;
2644
+ let block2 = ast;
2409
2645
  let prev = ast;
2410
2646
  let brackets = 0;
2411
2647
  const length = input.length;
@@ -2421,15 +2657,15 @@ var require_parse = __commonJS({
2421
2657
  prev.value += node.value;
2422
2658
  return;
2423
2659
  }
2424
- block.nodes.push(node);
2425
- node.parent = block;
2660
+ block2.nodes.push(node);
2661
+ node.parent = block2;
2426
2662
  node.prev = prev;
2427
2663
  prev = node;
2428
2664
  return node;
2429
2665
  };
2430
2666
  push({ type: "bos" });
2431
2667
  while (index < length) {
2432
- block = stack[stack.length - 1];
2668
+ block2 = stack[stack.length - 1];
2433
2669
  value = advance();
2434
2670
  if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
2435
2671
  continue;
@@ -2466,19 +2702,19 @@ var require_parse = __commonJS({
2466
2702
  continue;
2467
2703
  }
2468
2704
  if (value === CHAR_LEFT_PARENTHESES) {
2469
- block = push({ type: "paren", nodes: [] });
2470
- stack.push(block);
2705
+ block2 = push({ type: "paren", nodes: [] });
2706
+ stack.push(block2);
2471
2707
  push({ type: "text", value });
2472
2708
  continue;
2473
2709
  }
2474
2710
  if (value === CHAR_RIGHT_PARENTHESES) {
2475
- if (block.type !== "paren") {
2711
+ if (block2.type !== "paren") {
2476
2712
  push({ type: "text", value });
2477
2713
  continue;
2478
2714
  }
2479
- block = stack.pop();
2715
+ block2 = stack.pop();
2480
2716
  push({ type: "text", value });
2481
- block = stack[stack.length - 1];
2717
+ block2 = stack[stack.length - 1];
2482
2718
  continue;
2483
2719
  }
2484
2720
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
@@ -2503,7 +2739,7 @@ var require_parse = __commonJS({
2503
2739
  }
2504
2740
  if (value === CHAR_LEFT_CURLY_BRACE) {
2505
2741
  depth++;
2506
- const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
2742
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block2.dollar === true;
2507
2743
  const brace = {
2508
2744
  type: "brace",
2509
2745
  open: true,
@@ -2514,52 +2750,52 @@ var require_parse = __commonJS({
2514
2750
  ranges: 0,
2515
2751
  nodes: []
2516
2752
  };
2517
- block = push(brace);
2518
- stack.push(block);
2753
+ block2 = push(brace);
2754
+ stack.push(block2);
2519
2755
  push({ type: "open", value });
2520
2756
  continue;
2521
2757
  }
2522
2758
  if (value === CHAR_RIGHT_CURLY_BRACE) {
2523
- if (block.type !== "brace") {
2759
+ if (block2.type !== "brace") {
2524
2760
  push({ type: "text", value });
2525
2761
  continue;
2526
2762
  }
2527
2763
  const type = "close";
2528
- block = stack.pop();
2529
- block.close = true;
2764
+ block2 = stack.pop();
2765
+ block2.close = true;
2530
2766
  push({ type, value });
2531
2767
  depth--;
2532
- block = stack[stack.length - 1];
2768
+ block2 = stack[stack.length - 1];
2533
2769
  continue;
2534
2770
  }
2535
2771
  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) }];
2772
+ if (block2.ranges > 0) {
2773
+ block2.ranges = 0;
2774
+ const open = block2.nodes.shift();
2775
+ block2.nodes = [open, { type: "text", value: stringify2(block2) }];
2540
2776
  }
2541
2777
  push({ type: "comma", value });
2542
- block.commas++;
2778
+ block2.commas++;
2543
2779
  continue;
2544
2780
  }
2545
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
2546
- const siblings = block.nodes;
2781
+ if (value === CHAR_DOT && depth > 0 && block2.commas === 0) {
2782
+ const siblings = block2.nodes;
2547
2783
  if (depth === 0 || siblings.length === 0) {
2548
2784
  push({ type: "text", value });
2549
2785
  continue;
2550
2786
  }
2551
2787
  if (prev.type === "dot") {
2552
- block.range = [];
2788
+ block2.range = [];
2553
2789
  prev.value += value;
2554
2790
  prev.type = "range";
2555
- if (block.nodes.length !== 3 && block.nodes.length !== 5) {
2556
- block.invalid = true;
2557
- block.ranges = 0;
2791
+ if (block2.nodes.length !== 3 && block2.nodes.length !== 5) {
2792
+ block2.invalid = true;
2793
+ block2.ranges = 0;
2558
2794
  prev.type = "text";
2559
2795
  continue;
2560
2796
  }
2561
- block.ranges++;
2562
- block.args = [];
2797
+ block2.ranges++;
2798
+ block2.args = [];
2563
2799
  continue;
2564
2800
  }
2565
2801
  if (prev.type === "range") {
@@ -2567,7 +2803,7 @@ var require_parse = __commonJS({
2567
2803
  const before = siblings[siblings.length - 1];
2568
2804
  before.value += prev.value + value;
2569
2805
  prev = before;
2570
- block.ranges--;
2806
+ block2.ranges--;
2571
2807
  continue;
2572
2808
  }
2573
2809
  push({ type: "dot", value });
@@ -2576,9 +2812,9 @@ var require_parse = __commonJS({
2576
2812
  push({ type: "text", value });
2577
2813
  }
2578
2814
  do {
2579
- block = stack.pop();
2580
- if (block.type !== "root") {
2581
- block.nodes.forEach((node) => {
2815
+ block2 = stack.pop();
2816
+ if (block2.type !== "root") {
2817
+ block2.nodes.forEach((node) => {
2582
2818
  if (!node.nodes) {
2583
2819
  if (node.type === "open") node.isOpen = true;
2584
2820
  if (node.type === "close") node.isClose = true;
@@ -2587,8 +2823,8 @@ var require_parse = __commonJS({
2587
2823
  }
2588
2824
  });
2589
2825
  const parent = stack[stack.length - 1];
2590
- const index2 = parent.nodes.indexOf(block);
2591
- parent.nodes.splice(index2, 1, ...block.nodes);
2826
+ const index2 = parent.nodes.indexOf(block2);
2827
+ parent.nodes.splice(index2, 1, ...block2.nodes);
2592
2828
  }
2593
2829
  } while (stack.length > 0);
2594
2830
  push({ type: "eos" });
@@ -3221,9 +3457,9 @@ var require_scan = __commonJS({
3221
3457
  if (opts.parts === true || opts.tokens === true) {
3222
3458
  let prevIndex;
3223
3459
  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);
3460
+ const n3 = prevIndex ? prevIndex + 1 : start;
3461
+ const i2 = slashes[idx];
3462
+ const value = input.slice(n3, i2);
3227
3463
  if (opts.tokens) {
3228
3464
  if (idx === 0 && start !== 0) {
3229
3465
  tokens[idx].isPrefix = true;
@@ -3237,7 +3473,7 @@ var require_scan = __commonJS({
3237
3473
  if (idx !== 0 || value !== "") {
3238
3474
  parts.push(value);
3239
3475
  }
3240
- prevIndex = i;
3476
+ prevIndex = i2;
3241
3477
  }
3242
3478
  if (prevIndex && prevIndex + 1 < input.length) {
3243
3479
  const value = input.slice(prevIndex + 1);
@@ -3366,15 +3602,15 @@ var require_parse2 = __commonJS({
3366
3602
  };
3367
3603
  var hasRepeatedCharPrefixOverlap = (branches) => {
3368
3604
  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)) {
3605
+ for (let i2 = 0; i2 < values.length; i2++) {
3606
+ for (let j = i2 + 1; j < values.length; j++) {
3607
+ const a2 = values[i2];
3608
+ const b = values[j];
3609
+ const char = a2[0];
3610
+ if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
3375
3611
  continue;
3376
3612
  }
3377
- if (a === b || a.startsWith(b) || b.startsWith(a)) {
3613
+ if (a2 === b || a2.startsWith(b) || b.startsWith(a2)) {
3378
3614
  return true;
3379
3615
  }
3380
3616
  }
@@ -3389,8 +3625,8 @@ var require_parse2 = __commonJS({
3389
3625
  let paren = 0;
3390
3626
  let quote = 0;
3391
3627
  let escaped = false;
3392
- for (let i = 1; i < pattern.length; i++) {
3393
- const ch = pattern[i];
3628
+ for (let i2 = 1; i2 < pattern.length; i2++) {
3629
+ const ch = pattern[i2];
3394
3630
  if (escaped === true) {
3395
3631
  escaped = false;
3396
3632
  continue;
@@ -3424,13 +3660,13 @@ var require_parse2 = __commonJS({
3424
3660
  if (ch === ")") {
3425
3661
  paren--;
3426
3662
  if (paren === 0) {
3427
- if (requireEnd === true && i !== pattern.length - 1) {
3663
+ if (requireEnd === true && i2 !== pattern.length - 1) {
3428
3664
  return;
3429
3665
  }
3430
3666
  return {
3431
3667
  type: pattern[0],
3432
- body: pattern.slice(2, i),
3433
- end: i
3668
+ body: pattern.slice(2, i2),
3669
+ end: i2
3434
3670
  };
3435
3671
  }
3436
3672
  }
@@ -3562,7 +3798,7 @@ var require_parse2 = __commonJS({
3562
3798
  let prev = bos;
3563
3799
  let value;
3564
3800
  const eos = () => state.index === len - 1;
3565
- const peek = state.peek = (n = 1) => input[state.index + n];
3801
+ const peek = state.peek = (n3 = 1) => input[state.index + n3];
3566
3802
  const advance = state.advance = () => input[++state.index] || "";
3567
3803
  const remaining = () => input.slice(state.index + 1);
3568
3804
  const consume = (value2 = "", num = 0) => {
@@ -3643,10 +3879,10 @@ var require_parse2 = __commonJS({
3643
3879
  open.type = "text";
3644
3880
  open.value = literal;
3645
3881
  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;
3882
+ for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) {
3883
+ tokens[i2].value = "";
3884
+ tokens[i2].output = "";
3885
+ delete tokens[i2].suffix;
3650
3886
  }
3651
3887
  state.output = token.output + open.output;
3652
3888
  state.backtrack = true;
@@ -3889,13 +4125,13 @@ var require_parse2 = __commonJS({
3889
4125
  if (brace.dots === true) {
3890
4126
  const arr = tokens.slice();
3891
4127
  const range = [];
3892
- for (let i = arr.length - 1; i >= 0; i--) {
4128
+ for (let i2 = arr.length - 1; i2 >= 0; i2--) {
3893
4129
  tokens.pop();
3894
- if (arr[i].type === "brace") {
4130
+ if (arr[i2].type === "brace") {
3895
4131
  break;
3896
4132
  }
3897
- if (arr[i].type !== "dots") {
3898
- range.unshift(arr[i].value);
4133
+ if (arr[i2].type !== "dots") {
4134
+ range.unshift(arr[i2].value);
3899
4135
  }
3900
4136
  }
3901
4137
  output = expandRange(range, opts);
@@ -4354,7 +4590,7 @@ var require_picomatch = __commonJS({
4354
4590
  };
4355
4591
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
4356
4592
  picomatch.parse = (pattern, options) => {
4357
- if (Array.isArray(pattern)) return pattern.map((p2) => picomatch.parse(p2, options));
4593
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
4358
4594
  return parse2(pattern, { ...options, fastpaths: false });
4359
4595
  };
4360
4596
  picomatch.scan = (input, options) => scan(input, options);
@@ -4438,8 +4674,8 @@ var require_micromatch = __commonJS({
4438
4674
  options.onResult(state);
4439
4675
  }
4440
4676
  };
4441
- for (let i = 0; i < patterns.length; i++) {
4442
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
4677
+ for (let i2 = 0; i2 < patterns.length; i2++) {
4678
+ let isMatch = picomatch(String(patterns[i2]), { ...options, onResult }, true);
4443
4679
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
4444
4680
  if (negated) negatives++;
4445
4681
  for (let item of list) {
@@ -4461,7 +4697,7 @@ var require_micromatch = __commonJS({
4461
4697
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
4462
4698
  }
4463
4699
  if (options.nonull === true || options.nullglob === true) {
4464
- return options.unescape ? patterns.map((p2) => p2.replace(/\\/g, "")) : patterns;
4700
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
4465
4701
  }
4466
4702
  }
4467
4703
  return matches;
@@ -4491,7 +4727,7 @@ var require_micromatch = __commonJS({
4491
4727
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4492
4728
  }
4493
4729
  if (Array.isArray(pattern)) {
4494
- return pattern.some((p2) => micromatch.contains(str, p2, options));
4730
+ return pattern.some((p) => micromatch.contains(str, p, options));
4495
4731
  }
4496
4732
  if (typeof pattern === "string") {
4497
4733
  if (isEmptyString(str) || isEmptyString(pattern)) {
@@ -4536,7 +4772,7 @@ var require_micromatch = __commonJS({
4536
4772
  if (typeof str !== "string") {
4537
4773
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4538
4774
  }
4539
- return [].concat(patterns).every((p2) => picomatch(p2, options)(str));
4775
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
4540
4776
  };
4541
4777
  micromatch.capture = (glob, input, options) => {
4542
4778
  let posix = utils.isWindows(options);
@@ -4687,7 +4923,7 @@ var require_pattern = __commonJS({
4687
4923
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4688
4924
  function expandBraceExpansion(pattern) {
4689
4925
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4690
- patterns.sort((a, b) => a.length - b.length);
4926
+ patterns.sort((a2, b) => a2.length - b.length);
4691
4927
  return patterns.filter((pattern2) => pattern2 !== "");
4692
4928
  }
4693
4929
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4768,8 +5004,8 @@ var require_merge2 = __commonJS({
4768
5004
  }
4769
5005
  const mergedStream = PassThrough(options);
4770
5006
  function addStream() {
4771
- for (let i = 0, len = arguments.length; i < len; i++) {
4772
- streamsQueue.push(pauseStreams(arguments[i], options));
5007
+ for (let i2 = 0, len = arguments.length; i2 < len; i2++) {
5008
+ streamsQueue.push(pauseStreams(arguments[i2], options));
4773
5009
  }
4774
5010
  mergeStream();
4775
5011
  return this;
@@ -4818,8 +5054,8 @@ var require_merge2 = __commonJS({
4818
5054
  stream.pipe(mergedStream, { end: false });
4819
5055
  stream.resume();
4820
5056
  }
4821
- for (let i = 0; i < streams.length; i++) {
4822
- pipe(streams[i]);
5057
+ for (let i2 = 0; i2 < streams.length; i2++) {
5058
+ pipe(streams[i2]);
4823
5059
  }
4824
5060
  next();
4825
5061
  }
@@ -4850,8 +5086,8 @@ var require_merge2 = __commonJS({
4850
5086
  }
4851
5087
  streams.pause();
4852
5088
  } else {
4853
- for (let i = 0, len = streams.length; i < len; i++) {
4854
- streams[i] = pauseStreams(streams[i], options);
5089
+ for (let i2 = 0, len = streams.length; i2 < len; i2++) {
5090
+ streams[i2] = pauseStreams(streams[i2], options);
4855
5091
  }
4856
5092
  }
4857
5093
  return streams;
@@ -4933,13 +5169,13 @@ var require_tasks = __commonJS({
4933
5169
  Object.defineProperty(exports, "__esModule", { value: true });
4934
5170
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4935
5171
  var utils = require_utils3();
4936
- function generate(input, settings) {
4937
- const patterns = processPatterns(input, settings);
4938
- const ignore = processPatterns(settings.ignore, settings);
5172
+ function generate(input, settings2) {
5173
+ const patterns = processPatterns(input, settings2);
5174
+ const ignore = processPatterns(settings2.ignore, settings2);
4939
5175
  const positivePatterns = getPositivePatterns(patterns);
4940
5176
  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));
5177
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings2));
5178
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings2));
4943
5179
  const staticTasks = convertPatternsToTasks(
4944
5180
  staticPatterns,
4945
5181
  negativePatterns,
@@ -4955,12 +5191,12 @@ var require_tasks = __commonJS({
4955
5191
  return staticTasks.concat(dynamicTasks);
4956
5192
  }
4957
5193
  exports.generate = generate;
4958
- function processPatterns(input, settings) {
5194
+ function processPatterns(input, settings2) {
4959
5195
  let patterns = input;
4960
- if (settings.braceExpansion) {
5196
+ if (settings2.braceExpansion) {
4961
5197
  patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
4962
5198
  }
4963
- if (settings.baseNameMatch) {
5199
+ if (settings2.baseNameMatch) {
4964
5200
  patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
4965
5201
  }
4966
5202
  return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
@@ -4991,7 +5227,7 @@ var require_tasks = __commonJS({
4991
5227
  }
4992
5228
  exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
4993
5229
  function groupPatternsByBaseDirectory(patterns) {
4994
- const group = {};
5230
+ const group2 = {};
4995
5231
  return patterns.reduce((collection, pattern) => {
4996
5232
  const base = utils.pattern.getBaseDirectory(pattern);
4997
5233
  if (base in collection) {
@@ -5000,7 +5236,7 @@ var require_tasks = __commonJS({
5000
5236
  collection[base] = [pattern];
5001
5237
  }
5002
5238
  return collection;
5003
- }, group);
5239
+ }, group2);
5004
5240
  }
5005
5241
  exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
5006
5242
  function convertPatternGroupsToTasks(positive, negative, dynamic) {
@@ -5029,26 +5265,26 @@ var require_async = __commonJS({
5029
5265
  init_utils2();
5030
5266
  Object.defineProperty(exports, "__esModule", { value: true });
5031
5267
  exports.read = void 0;
5032
- function read(path, settings, callback) {
5033
- settings.fs.lstat(path, (lstatError, lstat) => {
5268
+ function read(path, settings2, callback) {
5269
+ settings2.fs.lstat(path, (lstatError, lstat) => {
5034
5270
  if (lstatError !== null) {
5035
5271
  callFailureCallback(callback, lstatError);
5036
5272
  return;
5037
5273
  }
5038
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5274
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5039
5275
  callSuccessCallback(callback, lstat);
5040
5276
  return;
5041
5277
  }
5042
- settings.fs.stat(path, (statError, stat) => {
5278
+ settings2.fs.stat(path, (statError, stat) => {
5043
5279
  if (statError !== null) {
5044
- if (settings.throwErrorOnBrokenSymbolicLink) {
5280
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5045
5281
  callFailureCallback(callback, statError);
5046
5282
  return;
5047
5283
  }
5048
5284
  callSuccessCallback(callback, lstat);
5049
5285
  return;
5050
5286
  }
5051
- if (settings.markSymbolicLink) {
5287
+ if (settings2.markSymbolicLink) {
5052
5288
  stat.isSymbolicLink = () => true;
5053
5289
  }
5054
5290
  callSuccessCallback(callback, stat);
@@ -5072,19 +5308,19 @@ var require_sync = __commonJS({
5072
5308
  init_utils2();
5073
5309
  Object.defineProperty(exports, "__esModule", { value: true });
5074
5310
  exports.read = void 0;
5075
- function read(path, settings) {
5076
- const lstat = settings.fs.lstatSync(path);
5077
- if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
5311
+ function read(path, settings2) {
5312
+ const lstat = settings2.fs.lstatSync(path);
5313
+ if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
5078
5314
  return lstat;
5079
5315
  }
5080
5316
  try {
5081
- const stat = settings.fs.statSync(path);
5082
- if (settings.markSymbolicLink) {
5317
+ const stat = settings2.fs.statSync(path);
5318
+ if (settings2.markSymbolicLink) {
5083
5319
  stat.isSymbolicLink = () => true;
5084
5320
  }
5085
5321
  return stat;
5086
5322
  } catch (error2) {
5087
- if (!settings.throwErrorOnBrokenSymbolicLink) {
5323
+ if (!settings2.throwErrorOnBrokenSymbolicLink) {
5088
5324
  return lstat;
5089
5325
  }
5090
5326
  throw error2;
@@ -5161,8 +5397,8 @@ var require_out = __commonJS({
5161
5397
  }
5162
5398
  exports.stat = stat;
5163
5399
  function statSync3(path, optionsOrSettings) {
5164
- const settings = getSettings(optionsOrSettings);
5165
- return sync.read(path, settings);
5400
+ const settings2 = getSettings(optionsOrSettings);
5401
+ return sync.read(path, settings2);
5166
5402
  }
5167
5403
  exports.statSync = statSync3;
5168
5404
  function getSettings(settingsOrOptions = {}) {
@@ -5210,8 +5446,8 @@ var require_run_parallel = __commonJS({
5210
5446
  if (isSync) queueMicrotask2(end);
5211
5447
  else end();
5212
5448
  }
5213
- function each(i, err, result) {
5214
- results[i] = result;
5449
+ function each(i2, err, result) {
5450
+ results[i2] = result;
5215
5451
  if (--pending === 0 || err) {
5216
5452
  done(err);
5217
5453
  }
@@ -5225,9 +5461,9 @@ var require_run_parallel = __commonJS({
5225
5461
  });
5226
5462
  });
5227
5463
  } else {
5228
- tasks.forEach(function(task, i) {
5464
+ tasks.forEach(function(task, i2) {
5229
5465
  task(function(err, result) {
5230
- each(i, err, result);
5466
+ each(i2, err, result);
5231
5467
  });
5232
5468
  });
5233
5469
  }
@@ -5302,11 +5538,11 @@ var require_common = __commonJS({
5302
5538
  init_utils2();
5303
5539
  Object.defineProperty(exports, "__esModule", { value: true });
5304
5540
  exports.joinPathSegments = void 0;
5305
- function joinPathSegments(a, b, separator) {
5306
- if (a.endsWith(separator)) {
5307
- return a + b;
5541
+ function joinPathSegments(a2, b, separator) {
5542
+ if (a2.endsWith(separator)) {
5543
+ return a2 + b;
5308
5544
  }
5309
- return a + separator + b;
5545
+ return a2 + separator + b;
5310
5546
  }
5311
5547
  exports.joinPathSegments = joinPathSegments;
5312
5548
  }
@@ -5324,16 +5560,16 @@ var require_async2 = __commonJS({
5324
5560
  var constants_1 = require_constants3();
5325
5561
  var utils = require_utils4();
5326
5562
  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);
5563
+ function read(directory, settings2, callback) {
5564
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5565
+ readdirWithFileTypes(directory, settings2, callback);
5330
5566
  return;
5331
5567
  }
5332
- readdir(directory, settings, callback);
5568
+ readdir(directory, settings2, callback);
5333
5569
  }
5334
5570
  exports.read = read;
5335
- function readdirWithFileTypes(directory, settings, callback) {
5336
- settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5571
+ function readdirWithFileTypes(directory, settings2, callback) {
5572
+ settings2.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
5337
5573
  if (readdirError !== null) {
5338
5574
  callFailureCallback(callback, readdirError);
5339
5575
  return;
@@ -5341,13 +5577,13 @@ var require_async2 = __commonJS({
5341
5577
  const entries = dirents.map((dirent) => ({
5342
5578
  dirent,
5343
5579
  name: dirent.name,
5344
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5580
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5345
5581
  }));
5346
- if (!settings.followSymbolicLinks) {
5582
+ if (!settings2.followSymbolicLinks) {
5347
5583
  callSuccessCallback(callback, entries);
5348
5584
  return;
5349
5585
  }
5350
- const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
5586
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings2));
5351
5587
  rpl(tasks, (rplError, rplEntries) => {
5352
5588
  if (rplError !== null) {
5353
5589
  callFailureCallback(callback, rplError);
@@ -5358,15 +5594,15 @@ var require_async2 = __commonJS({
5358
5594
  });
5359
5595
  }
5360
5596
  exports.readdirWithFileTypes = readdirWithFileTypes;
5361
- function makeRplTaskEntry(entry, settings) {
5597
+ function makeRplTaskEntry(entry, settings2) {
5362
5598
  return (done) => {
5363
5599
  if (!entry.dirent.isSymbolicLink()) {
5364
5600
  done(null, entry);
5365
5601
  return;
5366
5602
  }
5367
- settings.fs.stat(entry.path, (statError, stats) => {
5603
+ settings2.fs.stat(entry.path, (statError, stats) => {
5368
5604
  if (statError !== null) {
5369
- if (settings.throwErrorOnBrokenSymbolicLink) {
5605
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5370
5606
  done(statError);
5371
5607
  return;
5372
5608
  }
@@ -5378,16 +5614,16 @@ var require_async2 = __commonJS({
5378
5614
  });
5379
5615
  };
5380
5616
  }
5381
- function readdir(directory, settings, callback) {
5382
- settings.fs.readdir(directory, (readdirError, names) => {
5617
+ function readdir(directory, settings2, callback) {
5618
+ settings2.fs.readdir(directory, (readdirError, names) => {
5383
5619
  if (readdirError !== null) {
5384
5620
  callFailureCallback(callback, readdirError);
5385
5621
  return;
5386
5622
  }
5387
5623
  const tasks = names.map((name) => {
5388
- const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5624
+ const path = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5389
5625
  return (done) => {
5390
- fsStat.stat(path, settings.fsStatSettings, (error2, stats) => {
5626
+ fsStat.stat(path, settings2.fsStatSettings, (error2, stats) => {
5391
5627
  if (error2 !== null) {
5392
5628
  done(error2);
5393
5629
  return;
@@ -5397,7 +5633,7 @@ var require_async2 = __commonJS({
5397
5633
  path,
5398
5634
  dirent: utils.fs.createDirentFromStats(name, stats)
5399
5635
  };
5400
- if (settings.stats) {
5636
+ if (settings2.stats) {
5401
5637
  entry.stats = stats;
5402
5638
  }
5403
5639
  done(null, entry);
@@ -5434,27 +5670,27 @@ var require_sync2 = __commonJS({
5434
5670
  var constants_1 = require_constants3();
5435
5671
  var utils = require_utils4();
5436
5672
  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);
5673
+ function read(directory, settings2) {
5674
+ if (!settings2.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
5675
+ return readdirWithFileTypes(directory, settings2);
5440
5676
  }
5441
- return readdir(directory, settings);
5677
+ return readdir(directory, settings2);
5442
5678
  }
5443
5679
  exports.read = read;
5444
- function readdirWithFileTypes(directory, settings) {
5445
- const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
5680
+ function readdirWithFileTypes(directory, settings2) {
5681
+ const dirents = settings2.fs.readdirSync(directory, { withFileTypes: true });
5446
5682
  return dirents.map((dirent) => {
5447
5683
  const entry = {
5448
5684
  dirent,
5449
5685
  name: dirent.name,
5450
- path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
5686
+ path: common.joinPathSegments(directory, dirent.name, settings2.pathSegmentSeparator)
5451
5687
  };
5452
- if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
5688
+ if (entry.dirent.isSymbolicLink() && settings2.followSymbolicLinks) {
5453
5689
  try {
5454
- const stats = settings.fs.statSync(entry.path);
5690
+ const stats = settings2.fs.statSync(entry.path);
5455
5691
  entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
5456
5692
  } catch (error2) {
5457
- if (settings.throwErrorOnBrokenSymbolicLink) {
5693
+ if (settings2.throwErrorOnBrokenSymbolicLink) {
5458
5694
  throw error2;
5459
5695
  }
5460
5696
  }
@@ -5463,17 +5699,17 @@ var require_sync2 = __commonJS({
5463
5699
  });
5464
5700
  }
5465
5701
  exports.readdirWithFileTypes = readdirWithFileTypes;
5466
- function readdir(directory, settings) {
5467
- const names = settings.fs.readdirSync(directory);
5702
+ function readdir(directory, settings2) {
5703
+ const names = settings2.fs.readdirSync(directory);
5468
5704
  return names.map((name) => {
5469
- const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
5470
- const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
5705
+ const entryPath = common.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
5706
+ const stats = fsStat.statSync(entryPath, settings2.fsStatSettings);
5471
5707
  const entry = {
5472
5708
  name,
5473
5709
  path: entryPath,
5474
5710
  dirent: utils.fs.createDirentFromStats(name, stats)
5475
5711
  };
5476
- if (settings.stats) {
5712
+ if (settings2.stats) {
5477
5713
  entry.stats = stats;
5478
5714
  }
5479
5715
  return entry;
@@ -5560,8 +5796,8 @@ var require_out2 = __commonJS({
5560
5796
  }
5561
5797
  exports.scandir = scandir;
5562
5798
  function scandirSync(path, optionsOrSettings) {
5563
- const settings = getSettings(optionsOrSettings);
5564
- return sync.read(path, settings);
5799
+ const settings2 = getSettings(optionsOrSettings);
5800
+ return sync.read(path, settings2);
5565
5801
  }
5566
5802
  exports.scandirSync = scandirSync;
5567
5803
  function getSettings(settingsOrOptions = {}) {
@@ -5842,7 +6078,7 @@ var require_queue = __commonJS({
5842
6078
  queue.drained = drained;
5843
6079
  return queue;
5844
6080
  function push(value) {
5845
- var p2 = new Promise(function(resolve5, reject) {
6081
+ var p = new Promise(function(resolve5, reject) {
5846
6082
  pushCb(value, function(err, result) {
5847
6083
  if (err) {
5848
6084
  reject(err);
@@ -5851,11 +6087,11 @@ var require_queue = __commonJS({
5851
6087
  resolve5(result);
5852
6088
  });
5853
6089
  });
5854
- p2.catch(noop);
5855
- return p2;
6090
+ p.catch(noop);
6091
+ return p;
5856
6092
  }
5857
6093
  function unshift(value) {
5858
- var p2 = new Promise(function(resolve5, reject) {
6094
+ var p = new Promise(function(resolve5, reject) {
5859
6095
  unshiftCb(value, function(err, result) {
5860
6096
  if (err) {
5861
6097
  reject(err);
@@ -5864,11 +6100,11 @@ var require_queue = __commonJS({
5864
6100
  resolve5(result);
5865
6101
  });
5866
6102
  });
5867
- p2.catch(noop);
5868
- return p2;
6103
+ p.catch(noop);
6104
+ return p;
5869
6105
  }
5870
6106
  function drained() {
5871
- var p2 = new Promise(function(resolve5) {
6107
+ var p = new Promise(function(resolve5) {
5872
6108
  process.nextTick(function() {
5873
6109
  if (queue.idle()) {
5874
6110
  resolve5();
@@ -5882,7 +6118,7 @@ var require_queue = __commonJS({
5882
6118
  }
5883
6119
  });
5884
6120
  });
5885
- return p2;
6121
+ return p;
5886
6122
  }
5887
6123
  }
5888
6124
  module.exports = fastqueue;
@@ -5897,11 +6133,11 @@ var require_common2 = __commonJS({
5897
6133
  init_utils2();
5898
6134
  Object.defineProperty(exports, "__esModule", { value: true });
5899
6135
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5900
- function isFatalError(settings, error2) {
5901
- if (settings.errorFilter === null) {
6136
+ function isFatalError(settings2, error2) {
6137
+ if (settings2.errorFilter === null) {
5902
6138
  return true;
5903
6139
  }
5904
- return !settings.errorFilter(error2);
6140
+ return !settings2.errorFilter(error2);
5905
6141
  }
5906
6142
  exports.isFatalError = isFatalError;
5907
6143
  function isAppliedFilter(filter, value) {
@@ -5912,14 +6148,14 @@ var require_common2 = __commonJS({
5912
6148
  return filepath.split(/[/\\]/).join(separator);
5913
6149
  }
5914
6150
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5915
- function joinPathSegments(a, b, separator) {
5916
- if (a === "") {
6151
+ function joinPathSegments(a2, b, separator) {
6152
+ if (a2 === "") {
5917
6153
  return b;
5918
6154
  }
5919
- if (a.endsWith(separator)) {
5920
- return a + b;
6155
+ if (a2.endsWith(separator)) {
6156
+ return a2 + b;
5921
6157
  }
5922
- return a + separator + b;
6158
+ return a2 + separator + b;
5923
6159
  }
5924
6160
  exports.joinPathSegments = joinPathSegments;
5925
6161
  }
@@ -6266,14 +6502,14 @@ var require_out3 = __commonJS({
6266
6502
  }
6267
6503
  exports.walk = walk;
6268
6504
  function walkSync(directory, optionsOrSettings) {
6269
- const settings = getSettings(optionsOrSettings);
6270
- const provider = new sync_1.default(directory, settings);
6505
+ const settings2 = getSettings(optionsOrSettings);
6506
+ const provider = new sync_1.default(directory, settings2);
6271
6507
  return provider.read();
6272
6508
  }
6273
6509
  exports.walkSync = walkSync;
6274
6510
  function walkStream(directory, optionsOrSettings) {
6275
- const settings = getSettings(optionsOrSettings);
6276
- const provider = new stream_1.default(directory, settings);
6511
+ const settings2 = getSettings(optionsOrSettings);
6512
+ const provider = new stream_1.default(directory, settings2);
6277
6513
  return provider.read();
6278
6514
  }
6279
6515
  exports.walkStream = walkStream;
@@ -6359,8 +6595,8 @@ var require_stream3 = __commonJS({
6359
6595
  done();
6360
6596
  }).catch(done);
6361
6597
  };
6362
- for (let i = 0; i < filepaths.length; i++) {
6363
- stream.write(i);
6598
+ for (let i2 = 0; i2 < filepaths.length; i2++) {
6599
+ stream.write(i2);
6364
6600
  }
6365
6601
  return stream;
6366
6602
  }
@@ -7021,14 +7257,14 @@ var require_out4 = __commonJS({
7021
7257
  function generateTasks(source, options) {
7022
7258
  assertPatternsInput(source);
7023
7259
  const patterns = [].concat(source);
7024
- const settings = new settings_1.default(options);
7025
- return taskManager.generate(patterns, settings);
7260
+ const settings2 = new settings_1.default(options);
7261
+ return taskManager.generate(patterns, settings2);
7026
7262
  }
7027
7263
  FastGlob2.generateTasks = generateTasks;
7028
7264
  function isDynamicPattern(source, options) {
7029
7265
  assertPatternsInput(source);
7030
- const settings = new settings_1.default(options);
7031
- return utils.pattern.isDynamicPattern(source, settings);
7266
+ const settings2 = new settings_1.default(options);
7267
+ return utils.pattern.isDynamicPattern(source, settings2);
7032
7268
  }
7033
7269
  FastGlob2.isDynamicPattern = isDynamicPattern;
7034
7270
  function escapePath(source) {
@@ -7070,9 +7306,9 @@ var require_out4 = __commonJS({
7070
7306
  })(FastGlob || (FastGlob = {}));
7071
7307
  function getWorks(source, _Provider, options) {
7072
7308
  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);
7309
+ const settings2 = new settings_1.default(options);
7310
+ const tasks = taskManager.generate(patterns, settings2);
7311
+ const provider = new _Provider(settings2);
7076
7312
  return tasks.map(provider.read, provider);
7077
7313
  }
7078
7314
  function assertPatternsInput(input) {
@@ -7250,8 +7486,8 @@ import "node:fs";
7250
7486
  import { createRequire } from "node:module";
7251
7487
  import {
7252
7488
  resolve,
7253
- join,
7254
- dirname,
7489
+ join as join2,
7490
+ dirname as dirname2,
7255
7491
  relative,
7256
7492
  normalize,
7257
7493
  sep,
@@ -7265,7 +7501,7 @@ function safeExecuteAsync(fn, message) {
7265
7501
  );
7266
7502
  });
7267
7503
  }
7268
- var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
7504
+ var import_fast_glob, constants, log3, PACKAGE_PATHS, PathResolver;
7269
7505
  var init_PathResolver = __esm({
7270
7506
  "packages/core/config/utils/PathResolver.ts"() {
7271
7507
  "use strict";
@@ -7278,7 +7514,7 @@ var init_PathResolver = __esm({
7278
7514
  getPatternsFor: getPatternsFor || void 0,
7279
7515
  I18N_PATHS: I18N_PATHS || void 0
7280
7516
  };
7281
- log2 = {
7517
+ log3 = {
7282
7518
  error: (message, error2) => {
7283
7519
  },
7284
7520
  warn: (message, error2) => {
@@ -7399,7 +7635,7 @@ var init_PathResolver = __esm({
7399
7635
  */
7400
7636
  getDirname(path) {
7401
7637
  if (!path) return "";
7402
- return this.normalizePath(dirname(path));
7638
+ return this.normalizePath(dirname2(path));
7403
7639
  }
7404
7640
  /**
7405
7641
  * Resolve package path using Node's module resolution
@@ -7411,7 +7647,7 @@ var init_PathResolver = __esm({
7411
7647
  resolvePackage(packageSpecifier, fromPath = null) {
7412
7648
  try {
7413
7649
  const basePath = fromPath || this.getAppRoot();
7414
- const require3 = createRequire(join(basePath, "package.json"));
7650
+ const require3 = createRequire(join2(basePath, "package.json"));
7415
7651
  const resolved = require3.resolve(packageSpecifier);
7416
7652
  return this.normalizePath(resolved);
7417
7653
  } catch (error2) {
@@ -7563,7 +7799,7 @@ var init_PathResolver = __esm({
7563
7799
  return cleanContent;
7564
7800
  } catch (error2) {
7565
7801
  if (this.options.debug) {
7566
- log2.warn(`Failed to read file: ${filePath}`, error2);
7802
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7567
7803
  }
7568
7804
  return null;
7569
7805
  }
@@ -7591,7 +7827,7 @@ var init_PathResolver = __esm({
7591
7827
  return cleanContent;
7592
7828
  } catch (error2) {
7593
7829
  if (this.options.debug) {
7594
- log2.warn(`Failed to read file: ${filePath}`, error2);
7830
+ log3.warn(`Failed to read file: ${filePath}`, error2);
7595
7831
  }
7596
7832
  return null;
7597
7833
  }
@@ -7613,16 +7849,16 @@ var init_PathResolver = __esm({
7613
7849
  verbose = false
7614
7850
  } = options;
7615
7851
  const normalizedPath = this.normalizePath(filePath);
7616
- const dir = this.normalizePath(dirname(normalizedPath));
7852
+ const dir = this.normalizePath(dirname2(normalizedPath));
7617
7853
  const fileExists = this.pathExists(normalizedPath);
7618
7854
  if (fileExists && !overwrite) {
7619
7855
  if (verbose) {
7620
- log2.info(`Skipping existing file: ${normalizedPath}`);
7856
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7621
7857
  }
7622
7858
  return false;
7623
7859
  }
7624
7860
  if (dryRun) {
7625
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7861
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7626
7862
  return true;
7627
7863
  }
7628
7864
  try {
@@ -7647,7 +7883,7 @@ var init_PathResolver = __esm({
7647
7883
  await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
7648
7884
  }
7649
7885
  if (verbose) {
7650
- log2.info(
7886
+ log3.info(
7651
7887
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7652
7888
  );
7653
7889
  }
@@ -7674,16 +7910,16 @@ var init_PathResolver = __esm({
7674
7910
  verbose = false
7675
7911
  } = options;
7676
7912
  const normalizedPath = this.normalizePath(filePath);
7677
- const dir = this.normalizePath(dirname(normalizedPath));
7913
+ const dir = this.normalizePath(dirname2(normalizedPath));
7678
7914
  const fileExists = this.pathExists(normalizedPath);
7679
7915
  if (fileExists && !overwrite) {
7680
7916
  if (verbose) {
7681
- log2.info(`Skipping existing file: ${normalizedPath}`);
7917
+ log3.info(`Skipping existing file: ${normalizedPath}`);
7682
7918
  }
7683
7919
  return false;
7684
7920
  }
7685
7921
  if (dryRun) {
7686
- log2.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7922
+ log3.info(`[DRY RUN] Would write file: ${normalizedPath}`);
7687
7923
  return true;
7688
7924
  }
7689
7925
  try {
@@ -7707,7 +7943,7 @@ var init_PathResolver = __esm({
7707
7943
  fs.writeFileSync(normalizedPath, writeContent, "utf8");
7708
7944
  }
7709
7945
  if (verbose) {
7710
- log2.info(
7946
+ log3.info(
7711
7947
  `${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
7712
7948
  );
7713
7949
  }
@@ -7732,15 +7968,15 @@ var init_PathResolver = __esm({
7732
7968
  const fileExists = this.pathExists(normalizedDestPath);
7733
7969
  if (fileExists && !overwrite) {
7734
7970
  if (verbose) {
7735
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
7971
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7736
7972
  }
7737
7973
  return false;
7738
7974
  }
7739
7975
  if (dryRun) {
7740
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7976
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7741
7977
  return true;
7742
7978
  }
7743
- const dir = this.normalizePath(dirname(normalizedDestPath));
7979
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7744
7980
  try {
7745
7981
  await fs.promises.mkdir(dir, { recursive: true });
7746
7982
  } catch (error2) {
@@ -7750,7 +7986,7 @@ var init_PathResolver = __esm({
7750
7986
  return await safeExecuteAsync(async () => {
7751
7987
  await fs.promises.copyFile(srcPath, normalizedDestPath);
7752
7988
  if (verbose) {
7753
- log2.info(
7989
+ log3.info(
7754
7990
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7755
7991
  );
7756
7992
  }
@@ -7774,15 +8010,15 @@ var init_PathResolver = __esm({
7774
8010
  const fileExists = this.pathExists(normalizedDestPath);
7775
8011
  if (fileExists && !overwrite) {
7776
8012
  if (verbose) {
7777
- log2.info(`Skipping existing file: ${normalizedDestPath}`);
8013
+ log3.info(`Skipping existing file: ${normalizedDestPath}`);
7778
8014
  }
7779
8015
  return false;
7780
8016
  }
7781
8017
  if (dryRun) {
7782
- log2.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
8018
+ log3.info(`[DRY RUN] Would copy file: ${normalizedDestPath}`);
7783
8019
  return true;
7784
8020
  }
7785
- const dir = this.normalizePath(dirname(normalizedDestPath));
8021
+ const dir = this.normalizePath(dirname2(normalizedDestPath));
7786
8022
  try {
7787
8023
  fs.mkdirSync(dir, { recursive: true });
7788
8024
  } catch (error2) {
@@ -7791,7 +8027,7 @@ var init_PathResolver = __esm({
7791
8027
  try {
7792
8028
  fs.copyFileSync(srcPath, normalizedDestPath);
7793
8029
  if (verbose) {
7794
- log2.info(
8030
+ log3.info(
7795
8031
  `${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
7796
8032
  );
7797
8033
  }
@@ -7808,7 +8044,7 @@ var init_PathResolver = __esm({
7808
8044
  return fs.existsSync(filePath);
7809
8045
  } catch (error2) {
7810
8046
  if (!silent) {
7811
- log2.error(`Error checking path existence: ${filePath}`, error2);
8047
+ log3.error(`Error checking path existence: ${filePath}`, error2);
7812
8048
  }
7813
8049
  return false;
7814
8050
  }
@@ -7834,7 +8070,7 @@ var init_PathResolver = __esm({
7834
8070
  return fs.readdirSync(dirPath, options);
7835
8071
  } catch (error2) {
7836
8072
  if (this.options.debug) {
7837
- log2.warn(`Failed to read directory: ${dirPath}`, error2);
8073
+ log3.warn(`Failed to read directory: ${dirPath}`, error2);
7838
8074
  }
7839
8075
  const isObjectOptions = options && typeof options === "object" && "withFileTypes" in options;
7840
8076
  return isObjectOptions && options.withFileTypes ? [] : [];
@@ -7852,7 +8088,7 @@ var init_PathResolver = __esm({
7852
8088
  return fs.statSync(filePath);
7853
8089
  } catch (error2) {
7854
8090
  if (this.options.debug) {
7855
- log2.warn(`Failed to stat file: ${filePath}`, error2);
8091
+ log3.warn(`Failed to stat file: ${filePath}`, error2);
7856
8092
  }
7857
8093
  return null;
7858
8094
  }
@@ -7869,7 +8105,7 @@ var init_PathResolver = __esm({
7869
8105
  return fs.lstatSync(filePath);
7870
8106
  } catch (error2) {
7871
8107
  if (this.options.debug) {
7872
- log2.warn(`Failed to lstat file: ${filePath}`, error2);
8108
+ log3.warn(`Failed to lstat file: ${filePath}`, error2);
7873
8109
  }
7874
8110
  return null;
7875
8111
  }
@@ -7958,7 +8194,7 @@ var init_PathResolver = __esm({
7958
8194
  * @returns True if repoRoot is the monorepo (has packages directory)
7959
8195
  */
7960
8196
  isMonorepo() {
7961
- const packagesDir = join(this._repoRoot, "packages");
8197
+ const packagesDir = join2(this._repoRoot, "packages");
7962
8198
  return this.pathExists(packagesDir);
7963
8199
  }
7964
8200
  /**
@@ -7975,7 +8211,7 @@ var init_PathResolver = __esm({
7975
8211
  * Find files matching pattern within directory
7976
8212
  */
7977
8213
  async findFiles(directory, pattern, options = {}) {
7978
- const searchPattern = this.normalizePath(join(directory, pattern));
8214
+ const searchPattern = this.normalizePath(join2(directory, pattern));
7979
8215
  const appRoot = this.getAppRoot();
7980
8216
  const normalizeAppRoot = this.normalizePath(appRoot);
7981
8217
  const relativePattern = searchPattern.startsWith(normalizeAppRoot) ? searchPattern.slice(normalizeAppRoot.length + 1) : searchPattern;
@@ -8022,7 +8258,7 @@ var init_PathResolver = __esm({
8022
8258
  return null;
8023
8259
  }
8024
8260
  const resolvedPath = this.normalizePath(
8025
- join(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8261
+ join2(corePackageRoot, I18N_PATHS2.PUBLISHED_ROOT, i18nSubpath)
8026
8262
  );
8027
8263
  const resolvedDir = resolvedPath.replace(/\/[^/]*\*.*$/, "");
8028
8264
  if (this.pathExists(resolvedDir)) {
@@ -8218,13 +8454,13 @@ var init_PathResolver = __esm({
8218
8454
  const maxLevels = this.options.maxLevels;
8219
8455
  while (levelsChecked < maxLevels) {
8220
8456
  const toolingPath = this.normalizePath(
8221
- join(currentDir, PACKAGE_PATHS.TOOLING)
8457
+ join2(currentDir, PACKAGE_PATHS.TOOLING)
8222
8458
  );
8223
- const corePath = this.normalizePath(join(currentDir, PACKAGE_PATHS.CORE));
8459
+ const corePath = this.normalizePath(join2(currentDir, PACKAGE_PATHS.CORE));
8224
8460
  if (this.pathExists(toolingPath) && this.pathExists(corePath)) {
8225
8461
  return currentDir;
8226
8462
  }
8227
- const appsDir = join(currentDir, "apps");
8463
+ const appsDir = join2(currentDir, "apps");
8228
8464
  if (this.pathExists(appsDir)) {
8229
8465
  const appsDirStat = this.statSync(appsDir);
8230
8466
  if (appsDirStat?.isDirectory()) {
@@ -8232,15 +8468,15 @@ var init_PathResolver = __esm({
8232
8468
  }
8233
8469
  }
8234
8470
  const packageJsonPath = this.normalizePath(
8235
- join(currentDir, "package.json")
8471
+ join2(currentDir, "package.json")
8236
8472
  );
8237
8473
  if (this.pathExists(packageJsonPath)) {
8238
- const parentDir2 = this.normalizePath(dirname(currentDir));
8474
+ const parentDir2 = this.normalizePath(dirname2(currentDir));
8239
8475
  if (parentDir2 === currentDir) {
8240
8476
  return currentDir;
8241
8477
  }
8242
8478
  }
8243
- const parentDir = this.normalizePath(dirname(currentDir));
8479
+ const parentDir = this.normalizePath(dirname2(currentDir));
8244
8480
  if (parentDir === currentDir) {
8245
8481
  break;
8246
8482
  }
@@ -8256,8 +8492,8 @@ var init_PathResolver = __esm({
8256
8492
  // packages/tooling/src/utils/pathResolver.ts
8257
8493
  import { createRequire as createRequire2 } from "node:module";
8258
8494
  import {
8259
- join as join2,
8260
- dirname as dirname2,
8495
+ join as join3,
8496
+ dirname as dirname3,
8261
8497
  basename as basename2,
8262
8498
  extname as extname2,
8263
8499
  relative as relative2,
@@ -8266,7 +8502,7 @@ import {
8266
8502
  isAbsolute as pathIsAbsolute
8267
8503
  } from "node:path";
8268
8504
  import { fileURLToPath as fileURLToPath2 } from "node:url";
8269
- function readdirSync2(dirPath, options) {
8505
+ function readdirSync3(dirPath, options) {
8270
8506
  return pathResolverInstance.readdirSync(dirPath, options);
8271
8507
  }
8272
8508
  var pathResolverInstance, getRepoRoot, resolvePackage, normalizePath, pathExists, readSync, statSync2, joinPath;
@@ -8279,7 +8515,7 @@ var init_pathResolver = __esm({
8279
8515
  getRepoRoot = () => pathResolverInstance.getRepoRoot();
8280
8516
  resolvePackage = (spec, from) => pathResolverInstance.resolvePackage(spec, from || null);
8281
8517
  normalizePath = (...pathSegments) => {
8282
- return pathResolverInstance.normalizePath(join2(...pathSegments));
8518
+ return pathResolverInstance.normalizePath(join3(...pathSegments));
8283
8519
  };
8284
8520
  pathExists = (filePath, silent = false) => pathResolverInstance.pathExists(filePath, silent);
8285
8521
  readSync = (filePath, options) => pathResolverInstance.readSync(filePath, options);
@@ -8340,7 +8576,7 @@ var init_typed_file_operations = __esm({
8340
8576
  import { Buffer } from "node:buffer";
8341
8577
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
8342
8578
  import { createRequire as createRequire3 } from "node:module";
8343
- import { dirname as dirname3, resolve as resolve3 } from "node:path";
8579
+ import { dirname as dirname4, resolve as resolve3 } from "node:path";
8344
8580
  import process from "node:process";
8345
8581
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8346
8582
  var require2, __filename, __dirname;
@@ -8349,7 +8585,7 @@ var init_utils2 = __esm({
8349
8585
  "use strict";
8350
8586
  require2 = createRequire3(import.meta.url);
8351
8587
  __filename = fileURLToPath3(import.meta.url);
8352
- __dirname = dirname3(__filename);
8588
+ __dirname = dirname4(__filename);
8353
8589
  if (typeof globalThis !== "undefined") {
8354
8590
  globalThis.require = require2;
8355
8591
  globalThis.__filename = __filename;
@@ -8381,7 +8617,7 @@ function detectApps(projectRoot) {
8381
8617
  const appsDir = joinPath(projectRoot, "apps");
8382
8618
  const appsDirStat = statSync2(appsDir);
8383
8619
  if (pathExists(appsDir) && appsDirStat?.isDirectory()) {
8384
- const appDirs = readdirSync2(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8620
+ const appDirs = readdirSync3(appsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
8385
8621
  for (const appDir of appDirs) {
8386
8622
  const appPath = joinPath(appsDir, appDir);
8387
8623
  const packageJsonPath = joinPath(appPath, "package.json");
@@ -8558,17 +8794,17 @@ var init_app_detection = __esm({
8558
8794
  async function selectApp(projectRoot, appName) {
8559
8795
  const apps = detectApps(projectRoot);
8560
8796
  if (apps.length === 0) {
8561
- log.error("No apps found in this project.");
8562
- log.info('Run "dndev init" to create a new project.');
8797
+ log2.error("No apps found in this project.");
8798
+ log2.info('Run "dndev init" to create a new project.');
8563
8799
  return null;
8564
8800
  }
8565
8801
  if (appName) {
8566
- const app = apps.find((a) => a.name === appName);
8802
+ const app = apps.find((a2) => a2.name === appName);
8567
8803
  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:");
8804
+ log2.warn(`App "${appName}" not found.`);
8805
+ log2.info("Available apps:");
8806
+ apps.forEach((a2) => log2.info(` - ${a2.name}`));
8807
+ log2.info("Please select from the list:");
8572
8808
  } else {
8573
8809
  return app;
8574
8810
  }
@@ -8576,7 +8812,7 @@ async function selectApp(projectRoot, appName) {
8576
8812
  if (apps.length === 1) {
8577
8813
  return apps[0] || null;
8578
8814
  }
8579
- const selected = await _t({
8815
+ const selected = await select({
8580
8816
  message: "Select app:",
8581
8817
  options: apps.map((app) => ({
8582
8818
  value: app.name,
@@ -8586,7 +8822,7 @@ async function selectApp(projectRoot, appName) {
8586
8822
  if (typeof selected !== "string") {
8587
8823
  return null;
8588
8824
  }
8589
- return apps.find((a) => a.name === selected) || null;
8825
+ return apps.find((a2) => a2.name === selected) || null;
8590
8826
  }
8591
8827
  var init_app_selector = __esm({
8592
8828
  "packages/tooling/src/utils/app-selector.ts"() {
@@ -8605,13 +8841,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
8605
8841
  label: choice.title,
8606
8842
  hint: choice.hint
8607
8843
  }));
8608
- const result = await _t({
8844
+ const result = await select({
8609
8845
  message,
8610
8846
  options,
8611
8847
  initialValue: choices[defaultValue]?.value
8612
8848
  });
8613
- if (q(result)) {
8614
- pt("Operation cancelled.");
8849
+ if (isCancel(result)) {
8850
+ cancel("Operation cancelled.");
8615
8851
  process.exit(0);
8616
8852
  }
8617
8853
  return result;
@@ -8718,7 +8954,7 @@ var require_main = __commonJS({
8718
8954
  case 5: {
8719
8955
  let count = bb.read32();
8720
8956
  let value2 = [];
8721
- for (let i = 0; i < count; i++) {
8957
+ for (let i2 = 0; i2 < count; i2++) {
8722
8958
  value2.push(visit());
8723
8959
  }
8724
8960
  return value2;
@@ -8726,7 +8962,7 @@ var require_main = __commonJS({
8726
8962
  case 6: {
8727
8963
  let count = bb.read32();
8728
8964
  let value2 = {};
8729
- for (let i = 0; i < count; i++) {
8965
+ for (let i2 = 0; i2 < count; i2++) {
8730
8966
  value2[decodeUTF8(bb.read())] = visit();
8731
8967
  }
8732
8968
  return value2;
@@ -8800,11 +9036,11 @@ var require_main = __commonJS({
8800
9036
  if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
8801
9037
  let encoder = new TextEncoder();
8802
9038
  let decoder = new TextDecoder();
8803
- encodeUTF8 = (text) => encoder.encode(text);
9039
+ encodeUTF8 = (text2) => encoder.encode(text2);
8804
9040
  decodeUTF8 = (bytes) => decoder.decode(bytes);
8805
9041
  encodeInvariant = 'new TextEncoder().encode("")';
8806
9042
  } else if (typeof Buffer !== "undefined") {
8807
- encodeUTF8 = (text) => Buffer.from(text);
9043
+ encodeUTF8 = (text2) => Buffer.from(text2);
8808
9044
  decodeUTF8 = (bytes) => {
8809
9045
  let { buffer, byteOffset, byteLength } = bytes;
8810
9046
  return Buffer.from(buffer, byteOffset, byteLength).toString();
@@ -8834,8 +9070,8 @@ is not a problem with esbuild. You need to fix your environment instead.
8834
9070
  const c2 = bytes[index];
8835
9071
  let line = 1;
8836
9072
  let column = 0;
8837
- for (let i = 0; i < index; i++) {
8838
- if (bytes[i] === 10) {
9073
+ for (let i2 = 0; i2 < index; i2++) {
9074
+ if (bytes[i2] === 10) {
8839
9075
  line++;
8840
9076
  column = 0;
8841
9077
  } else {
@@ -8857,37 +9093,37 @@ is not a problem with esbuild. You need to fix your environment instead.
8857
9093
  let property = null;
8858
9094
  let state = 0;
8859
9095
  let object;
8860
- let i = 0;
8861
- while (i < length) {
8862
- let c2 = bytes[i++];
9096
+ let i2 = 0;
9097
+ while (i2 < length) {
9098
+ let c2 = bytes[i2++];
8863
9099
  if (c2 <= 32) {
8864
9100
  continue;
8865
9101
  }
8866
9102
  let value;
8867
9103
  if (state === 2 && property === null && c2 !== 34 && c2 !== 125) {
8868
- throwSyntaxError(bytes, --i);
9104
+ throwSyntaxError(bytes, --i2);
8869
9105
  }
8870
9106
  switch (c2) {
8871
9107
  // True
8872
9108
  case 116: {
8873
- if (bytes[i++] !== 114 || bytes[i++] !== 117 || bytes[i++] !== 101) {
8874
- throwSyntaxError(bytes, --i);
9109
+ if (bytes[i2++] !== 114 || bytes[i2++] !== 117 || bytes[i2++] !== 101) {
9110
+ throwSyntaxError(bytes, --i2);
8875
9111
  }
8876
9112
  value = true;
8877
9113
  break;
8878
9114
  }
8879
9115
  // False
8880
9116
  case 102: {
8881
- if (bytes[i++] !== 97 || bytes[i++] !== 108 || bytes[i++] !== 115 || bytes[i++] !== 101) {
8882
- throwSyntaxError(bytes, --i);
9117
+ if (bytes[i2++] !== 97 || bytes[i2++] !== 108 || bytes[i2++] !== 115 || bytes[i2++] !== 101) {
9118
+ throwSyntaxError(bytes, --i2);
8883
9119
  }
8884
9120
  value = false;
8885
9121
  break;
8886
9122
  }
8887
9123
  // Null
8888
9124
  case 110: {
8889
- if (bytes[i++] !== 117 || bytes[i++] !== 108 || bytes[i++] !== 108) {
8890
- throwSyntaxError(bytes, --i);
9125
+ if (bytes[i2++] !== 117 || bytes[i2++] !== 108 || bytes[i2++] !== 108) {
9126
+ throwSyntaxError(bytes, --i2);
8891
9127
  }
8892
9128
  value = null;
8893
9129
  break;
@@ -8905,9 +9141,9 @@ is not a problem with esbuild. You need to fix your environment instead.
8905
9141
  case 55:
8906
9142
  case 56:
8907
9143
  case 57: {
8908
- let index = i;
9144
+ let index = i2;
8909
9145
  value = fromCharCode(c2);
8910
- c2 = bytes[i];
9146
+ c2 = bytes[i2];
8911
9147
  while (true) {
8912
9148
  switch (c2) {
8913
9149
  case 43:
@@ -8926,7 +9162,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8926
9162
  case 101:
8927
9163
  case 69: {
8928
9164
  value += fromCharCode(c2);
8929
- c2 = bytes[++i];
9165
+ c2 = bytes[++i2];
8930
9166
  continue;
8931
9167
  }
8932
9168
  }
@@ -8942,14 +9178,14 @@ is not a problem with esbuild. You need to fix your environment instead.
8942
9178
  case 34: {
8943
9179
  value = "";
8944
9180
  while (true) {
8945
- if (i >= length) {
9181
+ if (i2 >= length) {
8946
9182
  throwSyntaxError(bytes, length);
8947
9183
  }
8948
- c2 = bytes[i++];
9184
+ c2 = bytes[i2++];
8949
9185
  if (c2 === 34) {
8950
9186
  break;
8951
9187
  } else if (c2 === 92) {
8952
- switch (bytes[i++]) {
9188
+ switch (bytes[i2++]) {
8953
9189
  // Normal escape sequence
8954
9190
  case 34:
8955
9191
  value += '"';
@@ -8978,30 +9214,30 @@ is not a problem with esbuild. You need to fix your environment instead.
8978
9214
  // Unicode escape sequence
8979
9215
  case 117: {
8980
9216
  let code = 0;
8981
- for (let j2 = 0; j2 < 4; j2++) {
8982
- c2 = bytes[i++];
9217
+ for (let j = 0; j < 4; j++) {
9218
+ c2 = bytes[i2++];
8983
9219
  code <<= 4;
8984
9220
  if (c2 >= 48 && c2 <= 57) code |= c2 - 48;
8985
9221
  else if (c2 >= 97 && c2 <= 102) code |= c2 + (10 - 97);
8986
9222
  else if (c2 >= 65 && c2 <= 70) code |= c2 + (10 - 65);
8987
- else throwSyntaxError(bytes, --i);
9223
+ else throwSyntaxError(bytes, --i2);
8988
9224
  }
8989
9225
  value += fromCharCode(code);
8990
9226
  break;
8991
9227
  }
8992
9228
  // Invalid escape sequence
8993
9229
  default:
8994
- throwSyntaxError(bytes, --i);
9230
+ throwSyntaxError(bytes, --i2);
8995
9231
  break;
8996
9232
  }
8997
9233
  } else if (c2 <= 127) {
8998
9234
  value += fromCharCode(c2);
8999
9235
  } else if ((c2 & 224) === 192) {
9000
- value += fromCharCode((c2 & 31) << 6 | bytes[i++] & 63);
9236
+ value += fromCharCode((c2 & 31) << 6 | bytes[i2++] & 63);
9001
9237
  } else if ((c2 & 240) === 224) {
9002
- value += fromCharCode((c2 & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63);
9238
+ value += fromCharCode((c2 & 15) << 12 | (bytes[i2++] & 63) << 6 | bytes[i2++] & 63);
9003
9239
  } else if ((c2 & 248) == 240) {
9004
- let codePoint = (c2 & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
9240
+ let codePoint = (c2 & 7) << 18 | (bytes[i2++] & 63) << 12 | (bytes[i2++] & 63) << 6 | bytes[i2++] & 63;
9005
9241
  if (codePoint > 65535) {
9006
9242
  codePoint -= 65536;
9007
9243
  value += fromCharCode(codePoint >> 10 & 1023 | 55296);
@@ -9038,7 +9274,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9038
9274
  // Array end
9039
9275
  case 93: {
9040
9276
  if (state !== 1) {
9041
- throwSyntaxError(bytes, --i);
9277
+ throwSyntaxError(bytes, --i2);
9042
9278
  }
9043
9279
  value = object;
9044
9280
  property = propertyStack.pop();
@@ -9049,7 +9285,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9049
9285
  // Object end
9050
9286
  case 125: {
9051
9287
  if (state !== 2) {
9052
- throwSyntaxError(bytes, --i);
9288
+ throwSyntaxError(bytes, --i2);
9053
9289
  }
9054
9290
  value = object;
9055
9291
  property = propertyStack.pop();
@@ -9058,16 +9294,16 @@ is not a problem with esbuild. You need to fix your environment instead.
9058
9294
  break;
9059
9295
  }
9060
9296
  default: {
9061
- throwSyntaxError(bytes, --i);
9297
+ throwSyntaxError(bytes, --i2);
9062
9298
  }
9063
9299
  }
9064
- c2 = bytes[i];
9300
+ c2 = bytes[i2];
9065
9301
  while (c2 <= 32) {
9066
- c2 = bytes[++i];
9302
+ c2 = bytes[++i2];
9067
9303
  }
9068
9304
  switch (state) {
9069
9305
  case 0: {
9070
- if (i === length) {
9306
+ if (i2 === length) {
9071
9307
  return value;
9072
9308
  }
9073
9309
  break;
@@ -9075,7 +9311,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9075
9311
  case 1: {
9076
9312
  object.push(value);
9077
9313
  if (c2 === 44) {
9078
- i++;
9314
+ i2++;
9079
9315
  continue;
9080
9316
  }
9081
9317
  if (c2 === 93) {
@@ -9087,14 +9323,14 @@ is not a problem with esbuild. You need to fix your environment instead.
9087
9323
  if (property === null) {
9088
9324
  property = value;
9089
9325
  if (c2 === 58) {
9090
- i++;
9326
+ i2++;
9091
9327
  continue;
9092
9328
  }
9093
9329
  } else {
9094
9330
  object[property] = value;
9095
9331
  property = null;
9096
9332
  if (c2 === 44) {
9097
- i++;
9333
+ i2++;
9098
9334
  continue;
9099
9335
  }
9100
9336
  if (c2 === 125) {
@@ -9106,7 +9342,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9106
9342
  }
9107
9343
  break;
9108
9344
  }
9109
- throwSyntaxError(bytes, i);
9345
+ throwSyntaxError(bytes, i2);
9110
9346
  }
9111
9347
  var quote = JSON.stringify;
9112
9348
  var buildLogLevelDefault = "warning";
@@ -9316,7 +9552,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9316
9552
  let footer = getFlag(options, keys, "footer", mustBeObject);
9317
9553
  let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints);
9318
9554
  let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString);
9319
- let stdin = getFlag(options, keys, "stdin", mustBeObject);
9555
+ let stdin2 = getFlag(options, keys, "stdin", mustBeObject);
9320
9556
  let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
9321
9557
  let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean);
9322
9558
  let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
@@ -9374,18 +9610,18 @@ is not a problem with esbuild. You need to fix your environment instead.
9374
9610
  }
9375
9611
  if (entryPoints) {
9376
9612
  if (Array.isArray(entryPoints)) {
9377
- for (let i = 0, n = entryPoints.length; i < n; i++) {
9378
- let entryPoint = entryPoints[i];
9613
+ for (let i2 = 0, n3 = entryPoints.length; i2 < n3; i2++) {
9614
+ let entryPoint = entryPoints[i2];
9379
9615
  if (typeof entryPoint === "object" && entryPoint !== null) {
9380
9616
  let entryPointKeys = /* @__PURE__ */ Object.create(null);
9381
9617
  let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
9382
9618
  let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
9383
- checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i);
9384
- if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i);
9385
- if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i);
9619
+ checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i2);
9620
+ if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i2);
9621
+ if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i2);
9386
9622
  entries.push([output, input]);
9387
9623
  } else {
9388
- entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]);
9624
+ entries.push(["", validateStringValue(entryPoint, "entry point at index " + i2)]);
9389
9625
  }
9390
9626
  }
9391
9627
  } else {
@@ -9394,13 +9630,13 @@ is not a problem with esbuild. You need to fix your environment instead.
9394
9630
  }
9395
9631
  }
9396
9632
  }
9397
- if (stdin) {
9633
+ if (stdin2) {
9398
9634
  let stdinKeys = /* @__PURE__ */ Object.create(null);
9399
- let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array);
9400
- let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString);
9401
- let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString);
9402
- let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString);
9403
- checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object');
9635
+ let contents = getFlag(stdin2, stdinKeys, "contents", mustBeStringOrUint8Array);
9636
+ let resolveDir = getFlag(stdin2, stdinKeys, "resolveDir", mustBeString);
9637
+ let sourcefile = getFlag(stdin2, stdinKeys, "sourcefile", mustBeString);
9638
+ let loader2 = getFlag(stdin2, stdinKeys, "loader", mustBeString);
9639
+ checkForInvalidFlags(stdin2, stdinKeys, 'in "stdin" object');
9404
9640
  if (sourcefile) flags.push(`--sourcefile=${sourcefile}`);
9405
9641
  if (loader2) flags.push(`--loader=${loader2}`);
9406
9642
  if (resolveDir) stdinResolveDir = resolveDir;
@@ -9453,38 +9689,38 @@ is not a problem with esbuild. You need to fix your environment instead.
9453
9689
  let responseCallbacks = {};
9454
9690
  let nextRequestID = 0;
9455
9691
  let nextBuildKey = 0;
9456
- let stdout = new Uint8Array(16 * 1024);
9692
+ let stdout2 = new Uint8Array(16 * 1024);
9457
9693
  let stdoutUsed = 0;
9458
9694
  let readFromStdout = (chunk) => {
9459
9695
  let limit = stdoutUsed + chunk.length;
9460
- if (limit > stdout.length) {
9696
+ if (limit > stdout2.length) {
9461
9697
  let swap = new Uint8Array(limit * 2);
9462
- swap.set(stdout);
9463
- stdout = swap;
9698
+ swap.set(stdout2);
9699
+ stdout2 = swap;
9464
9700
  }
9465
- stdout.set(chunk, stdoutUsed);
9701
+ stdout2.set(chunk, stdoutUsed);
9466
9702
  stdoutUsed += chunk.length;
9467
9703
  let offset = 0;
9468
9704
  while (offset + 4 <= stdoutUsed) {
9469
- let length = readUInt32LE(stdout, offset);
9705
+ let length = readUInt32LE(stdout2, offset);
9470
9706
  if (offset + 4 + length > stdoutUsed) {
9471
9707
  break;
9472
9708
  }
9473
9709
  offset += 4;
9474
- handleIncomingPacket(stdout.subarray(offset, offset + length));
9710
+ handleIncomingPacket(stdout2.subarray(offset, offset + length));
9475
9711
  offset += length;
9476
9712
  }
9477
9713
  if (offset > 0) {
9478
- stdout.copyWithin(0, offset, stdoutUsed);
9714
+ stdout2.copyWithin(0, offset, stdoutUsed);
9479
9715
  stdoutUsed -= offset;
9480
9716
  }
9481
9717
  };
9482
9718
  let afterClose = (error2) => {
9483
9719
  closeData.didClose = true;
9484
9720
  if (error2) closeData.reason = ": " + (error2.message || error2);
9485
- const text = "The service was stopped" + closeData.reason;
9721
+ const text2 = "The service was stopped" + closeData.reason;
9486
9722
  for (let id in responseCallbacks) {
9487
- responseCallbacks[id](text, null);
9723
+ responseCallbacks[id](text2, null);
9488
9724
  }
9489
9725
  responseCallbacks = {};
9490
9726
  };
@@ -9968,15 +10204,15 @@ is not a problem with esbuild. You need to fix your environment instead.
9968
10204
  let onLoadCallbacks = {};
9969
10205
  let onDisposeCallbacks = [];
9970
10206
  let nextCallbackID = 0;
9971
- let i = 0;
10207
+ let i2 = 0;
9972
10208
  let requestPlugins = [];
9973
10209
  let isSetupDone = false;
9974
10210
  plugins = [...plugins];
9975
10211
  for (let item of plugins) {
9976
10212
  let keys = {};
9977
- if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`);
10213
+ if (typeof item !== "object") throw new Error(`Plugin at index ${i2} must be an object`);
9978
10214
  const name = getFlag(item, keys, "name", mustBeString);
9979
- if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`);
10215
+ if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i2} is missing a name`);
9980
10216
  try {
9981
10217
  let setup = getFlag(item, keys, "setup", mustBeFunction);
9982
10218
  if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`);
@@ -9988,7 +10224,7 @@ is not a problem with esbuild. You need to fix your environment instead.
9988
10224
  onResolve: [],
9989
10225
  onLoad: []
9990
10226
  };
9991
- i++;
10227
+ i2++;
9992
10228
  let resolve5 = (path3, options = {}) => {
9993
10229
  if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
9994
10230
  if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`);
@@ -10084,7 +10320,7 @@ is not a problem with esbuild. You need to fix your environment instead.
10084
10320
  requestCallbacks["on-start"] = async (id, request) => {
10085
10321
  details.clear();
10086
10322
  let response = { errors: [], warnings: [] };
10087
- await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
10323
+ await Promise.all(onStartCallbacks.map(async ({ name, callback, note: note2 }) => {
10088
10324
  try {
10089
10325
  let result = await callback();
10090
10326
  if (result != null) {
@@ -10097,16 +10333,16 @@ is not a problem with esbuild. You need to fix your environment instead.
10097
10333
  if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0));
10098
10334
  }
10099
10335
  } catch (e) {
10100
- response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name));
10336
+ response.errors.push(extractErrorMessageV8(e, streamIn, details, note2 && note2(), name));
10101
10337
  }
10102
10338
  }));
10103
10339
  sendResponse(id, response);
10104
10340
  };
10105
10341
  requestCallbacks["on-resolve"] = async (id, request) => {
10106
- let response = {}, name = "", callback, note;
10342
+ let response = {}, name = "", callback, note2;
10107
10343
  for (let id2 of request.ids) {
10108
10344
  try {
10109
- ({ name, callback, note } = onResolveCallbacks[id2]);
10345
+ ({ name, callback, note: note2 } = onResolveCallbacks[id2]);
10110
10346
  let result = await callback({
10111
10347
  path: request.path,
10112
10348
  importer: request.importer,
@@ -10146,17 +10382,17 @@ is not a problem with esbuild. You need to fix your environment instead.
10146
10382
  break;
10147
10383
  }
10148
10384
  } catch (e) {
10149
- response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
10385
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note2 && note2(), name)] };
10150
10386
  break;
10151
10387
  }
10152
10388
  }
10153
10389
  sendResponse(id, response);
10154
10390
  };
10155
10391
  requestCallbacks["on-load"] = async (id, request) => {
10156
- let response = {}, name = "", callback, note;
10392
+ let response = {}, name = "", callback, note2;
10157
10393
  for (let id2 of request.ids) {
10158
10394
  try {
10159
- ({ name, callback, note } = onLoadCallbacks[id2]);
10395
+ ({ name, callback, note: note2 } = onLoadCallbacks[id2]);
10160
10396
  let result = await callback({
10161
10397
  path: request.path,
10162
10398
  namespace: request.namespace,
@@ -10191,7 +10427,7 @@ is not a problem with esbuild. You need to fix your environment instead.
10191
10427
  break;
10192
10428
  }
10193
10429
  } catch (e) {
10194
- response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
10430
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note2 && note2(), name)] };
10195
10431
  break;
10196
10432
  }
10197
10433
  }
@@ -10203,7 +10439,7 @@ is not a problem with esbuild. You need to fix your environment instead.
10203
10439
  (async () => {
10204
10440
  const onEndErrors = [];
10205
10441
  const onEndWarnings = [];
10206
- for (const { name, callback, note } of onEndCallbacks) {
10442
+ for (const { name, callback, note: note2 } of onEndCallbacks) {
10207
10443
  let newErrors;
10208
10444
  let newWarnings;
10209
10445
  try {
@@ -10218,7 +10454,7 @@ is not a problem with esbuild. You need to fix your environment instead.
10218
10454
  if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
10219
10455
  }
10220
10456
  } catch (e) {
10221
- newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)];
10457
+ newErrors = [extractErrorMessageV8(e, streamIn, details, note2 && note2(), name)];
10222
10458
  }
10223
10459
  if (newErrors) {
10224
10460
  onEndErrors.push(...newErrors);
@@ -10271,43 +10507,43 @@ is not a problem with esbuild. You need to fix your environment instead.
10271
10507
  };
10272
10508
  }
10273
10509
  function extractCallerV8(e, streamIn, ident) {
10274
- let note;
10510
+ let note2;
10275
10511
  let tried = false;
10276
10512
  return () => {
10277
- if (tried) return note;
10513
+ if (tried) return note2;
10278
10514
  tried = true;
10279
10515
  try {
10280
10516
  let lines = (e.stack + "").split("\n");
10281
10517
  lines.splice(1, 1);
10282
10518
  let location = parseStackLinesV8(streamIn, lines, ident);
10283
10519
  if (location) {
10284
- note = { text: e.message, location };
10285
- return note;
10520
+ note2 = { text: e.message, location };
10521
+ return note2;
10286
10522
  }
10287
10523
  } catch {
10288
10524
  }
10289
10525
  };
10290
10526
  }
10291
- function extractErrorMessageV8(e, streamIn, stash, note, pluginName) {
10292
- let text = "Internal error";
10527
+ function extractErrorMessageV8(e, streamIn, stash, note2, pluginName) {
10528
+ let text2 = "Internal error";
10293
10529
  let location = null;
10294
10530
  try {
10295
- text = (e && e.message || e) + "";
10531
+ text2 = (e && e.message || e) + "";
10296
10532
  } catch {
10297
10533
  }
10298
10534
  try {
10299
10535
  location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), "");
10300
10536
  } catch {
10301
10537
  }
10302
- return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
10538
+ return { id: "", pluginName, text: text2, location, notes: note2 ? [note2] : [], detail: stash ? stash.store(e) : -1 };
10303
10539
  }
10304
10540
  function parseStackLinesV8(streamIn, lines, ident) {
10305
- let at2 = " at ";
10306
- if (streamIn.readFileSync && !lines[0].startsWith(at2) && lines[1].startsWith(at2)) {
10307
- for (let i = 1; i < lines.length; i++) {
10308
- let line = lines[i];
10309
- if (!line.startsWith(at2)) continue;
10310
- line = line.slice(at2.length);
10541
+ let at = " at ";
10542
+ if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) {
10543
+ for (let i2 = 1; i2 < lines.length; i2++) {
10544
+ let line = lines[i2];
10545
+ if (!line.startsWith(at)) continue;
10546
+ line = line.slice(at.length);
10311
10547
  while (true) {
10312
10548
  let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line);
10313
10549
  if (match) {
@@ -10346,10 +10582,10 @@ is not a problem with esbuild. You need to fix your environment instead.
10346
10582
  }
10347
10583
  return null;
10348
10584
  }
10349
- function failureErrorWithLog(text, errors, warnings) {
10585
+ function failureErrorWithLog(text2, errors, warnings) {
10350
10586
  let limit = 5;
10351
- text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
10352
- if (i === limit) return "\n...";
10587
+ text2 += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i2) => {
10588
+ if (i2 === limit) return "\n...";
10353
10589
  if (!e.location) return `
10354
10590
  error: ${e.text}`;
10355
10591
  let { file, line, column } = e.location;
@@ -10357,7 +10593,7 @@ error: ${e.text}`;
10357
10593
  return `
10358
10594
  ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10359
10595
  }).join("");
10360
- let error2 = new Error(text);
10596
+ let error2 = new Error(text2);
10361
10597
  for (const [key, value] of [["errors", errors], ["warnings", warnings]]) {
10362
10598
  Object.defineProperty(error2, key, {
10363
10599
  configurable: true,
@@ -10415,7 +10651,7 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10415
10651
  let keys = {};
10416
10652
  let id = getFlag(message, keys, "id", mustBeString);
10417
10653
  let pluginName = getFlag(message, keys, "pluginName", mustBeString);
10418
- let text = getFlag(message, keys, "text", mustBeString);
10654
+ let text2 = getFlag(message, keys, "text", mustBeString);
10419
10655
  let location = getFlag(message, keys, "location", mustBeObjectOrNull);
10420
10656
  let notes = getFlag(message, keys, "notes", mustBeArray);
10421
10657
  let detail = getFlag(message, keys, "detail", canBeAnything);
@@ -10423,11 +10659,11 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10423
10659
  checkForInvalidFlags(message, keys, where);
10424
10660
  let notesClone = [];
10425
10661
  if (notes) {
10426
- for (const note of notes) {
10662
+ for (const note2 of notes) {
10427
10663
  let noteKeys = {};
10428
- let noteText = getFlag(note, noteKeys, "text", mustBeString);
10429
- let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
10430
- checkForInvalidFlags(note, noteKeys, where);
10664
+ let noteText = getFlag(note2, noteKeys, "text", mustBeString);
10665
+ let noteLocation = getFlag(note2, noteKeys, "location", mustBeObjectOrNull);
10666
+ checkForInvalidFlags(note2, noteKeys, where);
10431
10667
  notesClone.push({
10432
10668
  text: noteText || "",
10433
10669
  location: sanitizeLocation(noteLocation, where, terminalWidth)
@@ -10437,7 +10673,7 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10437
10673
  messagesClone.push({
10438
10674
  id: id || "",
10439
10675
  pluginName: pluginName || fallbackPluginName,
10440
- text: text || "",
10676
+ text: text2 || "",
10441
10677
  location: sanitizeLocation(location, where, terminalWidth),
10442
10678
  notes: notesClone,
10443
10679
  detail: stash ? stash.store(detail) : -1
@@ -10464,18 +10700,18 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10464
10700
  return result;
10465
10701
  }
10466
10702
  function convertOutputFiles({ path: path3, contents, hash }) {
10467
- let text = null;
10703
+ let text2 = null;
10468
10704
  return {
10469
10705
  path: path3,
10470
10706
  contents,
10471
10707
  hash,
10472
10708
  get text() {
10473
10709
  const binary = this.contents;
10474
- if (text === null || binary !== contents) {
10710
+ if (text2 === null || binary !== contents) {
10475
10711
  contents = binary;
10476
- text = decodeUTF8(binary);
10712
+ text2 = decodeUTF8(binary);
10477
10713
  }
10478
- return text;
10714
+ return text2;
10479
10715
  }
10480
10716
  };
10481
10717
  }
@@ -10485,13 +10721,13 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
10485
10721
  return result;
10486
10722
  }
10487
10723
  function parseJSON(bytes) {
10488
- let text;
10724
+ let text2;
10489
10725
  try {
10490
- text = decodeUTF8(bytes);
10726
+ text2 = decodeUTF8(bytes);
10491
10727
  } catch {
10492
10728
  return JSON_parse(bytes);
10493
10729
  }
10494
- return JSON.parse(text);
10730
+ return JSON.parse(text2);
10495
10731
  }
10496
10732
  var fs3 = __require("fs");
10497
10733
  var os = __require("os");
@@ -10890,13 +11126,13 @@ More information: The file containing the code for esbuild's JavaScript API (${_
10890
11126
  });
10891
11127
  child.stdin.on("error", afterClose);
10892
11128
  child.on("error", afterClose);
10893
- const stdin = child.stdin;
10894
- const stdout = child.stdout;
10895
- stdout.on("data", readFromStdout);
10896
- stdout.on("end", afterClose);
11129
+ const stdin2 = child.stdin;
11130
+ const stdout2 = child.stdout;
11131
+ stdout2.on("data", readFromStdout);
11132
+ stdout2.on("end", afterClose);
10897
11133
  stopService = () => {
10898
- stdin.destroy();
10899
- stdout.destroy();
11134
+ stdin2.destroy();
11135
+ stdout2.destroy();
10900
11136
  child.kill();
10901
11137
  initializeWasCalled = false;
10902
11138
  longLivedService = void 0;
@@ -10904,11 +11140,11 @@ More information: The file containing the code for esbuild's JavaScript API (${_
10904
11140
  };
10905
11141
  let refCount = 0;
10906
11142
  child.unref();
10907
- if (stdin.unref) {
10908
- stdin.unref();
11143
+ if (stdin2.unref) {
11144
+ stdin2.unref();
10909
11145
  }
10910
- if (stdout.unref) {
10911
- stdout.unref();
11146
+ if (stdout2.unref) {
11147
+ stdout2.unref();
10912
11148
  }
10913
11149
  const refs = {
10914
11150
  ref() {
@@ -10965,28 +11201,28 @@ More information: The file containing the code for esbuild's JavaScript API (${_
10965
11201
  };
10966
11202
  var runServiceSync = (callback) => {
10967
11203
  let [command, args] = esbuildCommandAndArgs();
10968
- let stdin = new Uint8Array();
11204
+ let stdin2 = new Uint8Array();
10969
11205
  let { readFromStdout, afterClose, service } = createChannel({
10970
11206
  writeToStdin(bytes) {
10971
- if (stdin.length !== 0) throw new Error("Must run at most one command");
10972
- stdin = bytes;
11207
+ if (stdin2.length !== 0) throw new Error("Must run at most one command");
11208
+ stdin2 = bytes;
10973
11209
  },
10974
11210
  isSync: true,
10975
11211
  hasFS: true,
10976
11212
  esbuild: node_exports
10977
11213
  });
10978
11214
  callback(service);
10979
- let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.27.7"}`), {
11215
+ let stdout2 = child_process.execFileSync(command, args.concat(`--service=${"0.27.7"}`), {
10980
11216
  cwd: defaultWD,
10981
11217
  windowsHide: true,
10982
- input: stdin,
11218
+ input: stdin2,
10983
11219
  // We don't know how large the output could be. If it's too large, the
10984
11220
  // command will fail with ENOBUFS. Reserve 16mb for now since that feels
10985
11221
  // like it should be enough. Also allow overriding this with an environment
10986
11222
  // variable.
10987
11223
  maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
10988
11224
  });
10989
- readFromStdout(stdout);
11225
+ readFromStdout(stdout2);
10990
11226
  afterClose(null);
10991
11227
  };
10992
11228
  var randomFileName = () => {
@@ -11010,10 +11246,10 @@ More information: The file containing the code for esbuild's JavaScript API (${_
11010
11246
  execArgv: []
11011
11247
  });
11012
11248
  let nextID = 0;
11013
- let fakeBuildError = (text) => {
11249
+ let fakeBuildError = (text2) => {
11014
11250
  let error2 = new Error(`Build failed with 1 error:
11015
- error: ${text}`);
11016
- let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
11251
+ error: ${text2}`);
11252
+ let errors = [{ id: "", pluginName: "", text: text2, location: null, notes: [], detail: void 0 }];
11017
11253
  error2.errors = errors;
11018
11254
  error2.warnings = [];
11019
11255
  return error2;
@@ -11131,13 +11367,13 @@ __export(bundle_edge_function_exports, {
11131
11367
  buildSupabaseEdgeFunctions: () => buildSupabaseEdgeFunctions,
11132
11368
  bundleEdgeFunction: () => bundleEdgeFunction
11133
11369
  });
11134
- import { resolve as resolve4, dirname as dirname4, join as join3 } from "node:path";
11135
11370
  import fs2 from "node:fs";
11371
+ import { resolve as resolve4, dirname as dirname5, join as join4 } from "node:path";
11136
11372
  function detectWorkspace() {
11137
11373
  let currentDir = process.cwd();
11138
11374
  const maxDepth = 10;
11139
- for (let i = 0; i < maxDepth; i++) {
11140
- const packageJsonPath = join3(currentDir, "package.json");
11375
+ for (let i2 = 0; i2 < maxDepth; i2++) {
11376
+ const packageJsonPath = join4(currentDir, "package.json");
11141
11377
  if (fs2.existsSync(packageJsonPath)) {
11142
11378
  try {
11143
11379
  const packageJson = JSON.parse(
@@ -11145,20 +11381,20 @@ function detectWorkspace() {
11145
11381
  );
11146
11382
  const hasWorkspaces = Array.isArray(packageJson.workspaces);
11147
11383
  const hasDndevPackages = hasWorkspaces && packageJson.workspaces.some(
11148
- (w3) => w3 === "packages/**" || w3.startsWith("packages/")
11384
+ (w) => w === "packages/**" || w.startsWith("packages/")
11149
11385
  );
11150
- const isDndevRepo = hasDndevPackages && (fs2.existsSync(join3(currentDir, "packages", "core")) || fs2.existsSync(join3(currentDir, "packages", "functions")));
11386
+ const isDndevRepo = hasDndevPackages && (fs2.existsSync(join4(currentDir, "packages", "core")) || fs2.existsSync(join4(currentDir, "packages", "functions")));
11151
11387
  if (isDndevRepo) {
11152
11388
  return { type: "dndev", root: currentDir };
11153
11389
  }
11154
11390
  if (hasWorkspaces) {
11155
11391
  const dndevPattern = packageJson.workspaces.find(
11156
- (w3) => w3.includes("dndev/packages")
11392
+ (w) => w.includes("dndev/packages")
11157
11393
  );
11158
11394
  if (dndevPattern) {
11159
11395
  const dndevRelPath = dndevPattern.replace(/\/packages.*$/, "");
11160
11396
  const dndevRoot = resolve4(currentDir, dndevRelPath);
11161
- if (fs2.existsSync(join3(dndevRoot, "packages", "core"))) {
11397
+ if (fs2.existsSync(join4(dndevRoot, "packages", "core"))) {
11162
11398
  return { type: "dndev", root: dndevRoot };
11163
11399
  }
11164
11400
  }
@@ -11166,14 +11402,14 @@ function detectWorkspace() {
11166
11402
  } catch {
11167
11403
  }
11168
11404
  }
11169
- const parentDir = dirname4(currentDir);
11405
+ const parentDir = dirname5(currentDir);
11170
11406
  if (parentDir === currentDir) break;
11171
11407
  currentDir = parentDir;
11172
11408
  }
11173
11409
  return { type: "npm", root: process.cwd() };
11174
11410
  }
11175
11411
  function readDenoImports(functionsDir) {
11176
- const denoJsonPath = join3(functionsDir, "deno.json");
11412
+ const denoJsonPath = join4(functionsDir, "deno.json");
11177
11413
  if (!fs2.existsSync(denoJsonPath)) {
11178
11414
  throw new Error(
11179
11415
  `deno.json not found in ${functionsDir}. Required for edge function bundling.`
@@ -11194,7 +11430,7 @@ function resolvePackageExport(packageName, subpath, fromDir) {
11194
11430
  if (!pkgDir) return null;
11195
11431
  try {
11196
11432
  const pkgJson = JSON.parse(
11197
- fs2.readFileSync(join3(pkgDir, "package.json"), "utf8")
11433
+ fs2.readFileSync(join4(pkgDir, "package.json"), "utf8")
11198
11434
  );
11199
11435
  const exports = pkgJson.exports;
11200
11436
  if (!exports) return null;
@@ -11371,34 +11607,34 @@ async function bundleEdgeFunction(options) {
11371
11607
  const denoImports = readDenoImports(functionsDir);
11372
11608
  const alias = {};
11373
11609
  if (workspace.type === "dndev") {
11374
- alias["@donotdev/types"] = join3(
11610
+ alias["@donotdev/types"] = join4(
11375
11611
  workspace.root,
11376
11612
  "packages",
11377
11613
  "core",
11378
11614
  "types",
11379
11615
  "src"
11380
11616
  );
11381
- alias["@donotdev/functions"] = join3(
11617
+ alias["@donotdev/functions"] = join4(
11382
11618
  workspace.root,
11383
11619
  "packages",
11384
11620
  "functions",
11385
11621
  "src"
11386
11622
  );
11387
- alias["@donotdev/utils"] = join3(
11623
+ alias["@donotdev/utils"] = join4(
11388
11624
  workspace.root,
11389
11625
  "packages",
11390
11626
  "core",
11391
11627
  "utils",
11392
11628
  "src"
11393
11629
  );
11394
- alias["@donotdev/schemas"] = join3(
11630
+ alias["@donotdev/schemas"] = join4(
11395
11631
  workspace.root,
11396
11632
  "packages",
11397
11633
  "core",
11398
11634
  "schemas",
11399
11635
  "src"
11400
11636
  );
11401
- alias["@donotdev/core"] = join3(workspace.root, "packages", "core");
11637
+ alias["@donotdev/core"] = join4(workspace.root, "packages", "core");
11402
11638
  }
11403
11639
  const config = {
11404
11640
  entryPoints: [entryPointPath],
@@ -11431,7 +11667,7 @@ ${errorMessages}`);
11431
11667
  }
11432
11668
  if (result.warnings.length > 0) {
11433
11669
  for (const warning of result.warnings) {
11434
- log.debug(`[bundle-edge] Warning: ${warning.text}`);
11670
+ log2.debug(`[bundle-edge] Warning: ${warning.text}`);
11435
11671
  }
11436
11672
  }
11437
11673
  if (!result.outputFiles?.[0]) {
@@ -11440,45 +11676,45 @@ ${errorMessages}`);
11440
11676
  return result.outputFiles[0].text;
11441
11677
  }
11442
11678
  async function buildSupabaseEdgeFunctions(functionsDir) {
11443
- const buildDir = join3(functionsDir, ".build");
11679
+ const buildDir = join4(functionsDir, ".build");
11444
11680
  fs2.mkdirSync(buildDir, { recursive: true });
11445
11681
  const entries = fs2.readdirSync(functionsDir).filter((item) => {
11446
- const itemPath = join3(functionsDir, item);
11682
+ const itemPath = join4(functionsDir, item);
11447
11683
  if (!fs2.statSync(itemPath).isDirectory()) return false;
11448
11684
  if (item === ".build") return false;
11449
- return fs2.existsSync(join3(itemPath, "index.ts"));
11685
+ return fs2.existsSync(join4(itemPath, "index.ts"));
11450
11686
  });
11451
11687
  if (entries.length === 0) {
11452
- log.warn("No edge functions found (no index.ts in any subdirectory)");
11688
+ log2.warn("No edge functions found (no index.ts in any subdirectory)");
11453
11689
  return { success: true, functions: [], errors: [] };
11454
11690
  }
11455
- log.info(`Bundling ${entries.length} edge function(s)...`);
11691
+ log2.info(`Bundling ${entries.length} edge function(s)...`);
11456
11692
  const results = [];
11457
11693
  const errors = [];
11458
11694
  for (const functionName of entries) {
11459
- const entryPointPath = join3(functionsDir, functionName, "index.ts");
11695
+ const entryPointPath = join4(functionsDir, functionName, "index.ts");
11460
11696
  try {
11461
11697
  const bundled = await bundleEdgeFunction({
11462
11698
  entryPointPath,
11463
11699
  functionsDir
11464
11700
  });
11465
- const outputPath = join3(buildDir, `${functionName}.js`);
11701
+ const outputPath = join4(buildDir, `${functionName}.js`);
11466
11702
  fs2.writeFileSync(outputPath, bundled, "utf8");
11467
11703
  const size = Buffer.byteLength(bundled, "utf8");
11468
11704
  results.push({ name: functionName, outputPath, size });
11469
- log.info(` ${functionName} \u2192 ${(size / 1024).toFixed(1)} KB`);
11705
+ log2.info(` ${functionName} \u2192 ${(size / 1024).toFixed(1)} KB`);
11470
11706
  } catch (error2) {
11471
11707
  const msg = error2 instanceof Error ? error2.message : String(error2);
11472
11708
  errors.push(`${functionName}: ${msg}`);
11473
- log.error(` ${functionName} \u2014 FAILED: ${msg}`);
11709
+ log2.error(` ${functionName} \u2014 FAILED: ${msg}`);
11474
11710
  }
11475
11711
  }
11476
11712
  if (errors.length > 0) {
11477
- log.error(`
11713
+ log2.error(`
11478
11714
  ${errors.length} function(s) failed to bundle`);
11479
11715
  return { success: false, functions: results, errors };
11480
11716
  }
11481
- log.info(`
11717
+ log2.info(`
11482
11718
  All ${results.length} function(s) built to ${buildDir}`);
11483
11719
  return { success: true, functions: results, errors: [] };
11484
11720
  }
@@ -11505,13 +11741,6 @@ init_utils2();
11505
11741
 
11506
11742
  // packages/tooling/src/apps/build.ts
11507
11743
  init_utils2();
11508
- init_app_detection();
11509
- init_app_selector();
11510
- init_cli_input();
11511
- init_cli_output();
11512
- init_errors();
11513
- init_pathResolver();
11514
- init_typed_file_operations();
11515
11744
  import { execSync, spawnSync as spawnSync2 } from "node:child_process";
11516
11745
 
11517
11746
  // packages/tooling/src/apps/deploy-utils.ts
@@ -11530,14 +11759,21 @@ function checkConfigPlaceholders(appDir) {
11530
11759
  }
11531
11760
  }
11532
11761
  if (bad.length > 0) {
11533
- log.warn(`Unreplaced template placeholders found in: ${bad.join(", ")}`);
11534
- log.warn(` Fix manually or re-run "dndev init" to regenerate.
11762
+ log2.warn(`Unreplaced template placeholders found in: ${bad.join(", ")}`);
11763
+ log2.warn(` Fix manually or re-run "dndev init" to regenerate.
11535
11764
  `);
11536
11765
  }
11537
11766
  return bad.length > 0;
11538
11767
  }
11539
11768
 
11540
11769
  // packages/tooling/src/apps/build.ts
11770
+ init_app_detection();
11771
+ init_app_selector();
11772
+ init_cli_input();
11773
+ init_cli_output();
11774
+ init_errors();
11775
+ init_pathResolver();
11776
+ init_typed_file_operations();
11541
11777
  function validateFirebaseJson(appDir) {
11542
11778
  const firebaseJsonPath = joinPath(appDir, "firebase.json");
11543
11779
  if (!pathExists(firebaseJsonPath)) {
@@ -11600,8 +11836,8 @@ async function main(options = {}) {
11600
11836
  const { appName: parsedAppName, buildType: parsedBuildType } = parseBuildArgs(args);
11601
11837
  const debugMode = process.env.DEBUG === "true" || process.env.DEBUG === "1" || args.includes("--debug") || args.includes("-d");
11602
11838
  if (debugMode) {
11603
- log.debug(` Args: ${args.join(" ")}`);
11604
- log.debug(
11839
+ log2.debug(` Args: ${args.join(" ")}`);
11840
+ log2.debug(
11605
11841
  ` Parsed app: ${parsedAppName || "none"}, build type: ${parsedBuildType || "none"}
11606
11842
  `
11607
11843
  );
@@ -11647,12 +11883,12 @@ async function main(options = {}) {
11647
11883
  });
11648
11884
  }
11649
11885
  if (choices.length === 0) {
11650
- log.error("No build targets found. App must have frontend or functions.");
11886
+ log2.error("No build targets found. App must have frontend or functions.");
11651
11887
  throw new DoNotDevError("No build targets found", "validation-error");
11652
11888
  }
11653
11889
  if (choices.length === 1) {
11654
11890
  buildType = choices[0].value;
11655
- wt(`Building: ${choices[0].title}`, "Auto-selected");
11891
+ note(`Building: ${choices[0].title}`, "Auto-selected");
11656
11892
  } else {
11657
11893
  buildType = await askForSelection(
11658
11894
  "What would you like to build?",
@@ -11662,7 +11898,7 @@ async function main(options = {}) {
11662
11898
  }
11663
11899
  if (buildType === "frontend" || buildType === "both") {
11664
11900
  if (!hasFrontend) {
11665
- log.error(
11901
+ log2.error(
11666
11902
  "Frontend build requested but app has no frontend configuration."
11667
11903
  );
11668
11904
  throw new DoNotDevError(
@@ -11670,7 +11906,7 @@ async function main(options = {}) {
11670
11906
  "validation-error"
11671
11907
  );
11672
11908
  }
11673
- log.info(`Building ${app.name} frontend...
11909
+ log2.info(`Building ${app.name} frontend...
11674
11910
  `);
11675
11911
  const turboArgs = ["build", "--filter", app.packageName];
11676
11912
  if (options.mode) {
@@ -11691,7 +11927,7 @@ async function main(options = {}) {
11691
11927
  }
11692
11928
  if (buildType === "functions" || buildType === "both") {
11693
11929
  if (!hasFunc) {
11694
- log.error(
11930
+ log2.error(
11695
11931
  "Functions build requested but app has no functions directory."
11696
11932
  );
11697
11933
  throw new DoNotDevError(
@@ -11701,13 +11937,13 @@ async function main(options = {}) {
11701
11937
  }
11702
11938
  const funcPath = getFunctionsPath(app);
11703
11939
  if (!funcPath || !pathExists(funcPath)) {
11704
- log.error(`Functions directory not found: ${funcPath}`);
11940
+ log2.error(`Functions directory not found: ${funcPath}`);
11705
11941
  throw new DoNotDevError(
11706
11942
  `Functions directory not found: ${funcPath}`,
11707
11943
  "file-not-found"
11708
11944
  );
11709
11945
  }
11710
- log.info(`Building ${app.name} functions (${app.functions})...
11946
+ log2.info(`Building ${app.name} functions (${app.functions})...
11711
11947
  `);
11712
11948
  if (app.functions === "supabase") {
11713
11949
  const { buildSupabaseEdgeFunctions: buildSupabaseEdgeFunctions2 } = await Promise.resolve().then(() => (init_bundle_edge_function(), bundle_edge_function_exports));
@@ -11719,7 +11955,7 @@ async function main(options = {}) {
11719
11955
  );
11720
11956
  }
11721
11957
  } else {
11722
- const s = fe();
11958
+ const s = spinner();
11723
11959
  s.start("Building functions...");
11724
11960
  try {
11725
11961
  execSync("bun run build", {
@@ -11737,7 +11973,7 @@ async function main(options = {}) {
11737
11973
  }
11738
11974
  }
11739
11975
  }
11740
- log.success(`Build complete for ${app.name}`);
11976
+ log2.success(`Build complete for ${app.name}`);
11741
11977
  return 0;
11742
11978
  }
11743
11979
  export {